From 42bcf513567fdcb0abfc083b0a362ac5c1a97de0 Mon Sep 17 00:00:00 2001 From: allen Date: Sun, 5 Nov 2023 16:50:26 +0800 Subject: [PATCH 1/2] feat(gpt-prompt): add the prompt page --- docs/.vitepress/cache/deps/_metadata.json | 38 +- docs/.vitepress/cache/deps/element-plus.js | 3945 ++++++++--------- .../.vitepress/cache/deps/element-plus.js.map | 8 +- docs/.vitepress/cache/deps/package.json | 4 +- docs/.vitepress/cache/deps/vue.js | 20 +- docs/assets/images/gpt/singular-point.png | Bin 0 -> 241537 bytes docs/router/index.ts | 2 +- docs/router/smallTalk.ts | 4 + docs/view/smallTalk/gpt-prompt-learning.md | 82 + 9 files changed, 1994 insertions(+), 2109 deletions(-) create mode 100644 docs/assets/images/gpt/singular-point.png create mode 100644 docs/view/smallTalk/gpt-prompt-learning.md diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json index 5f2f6e4..a03b119 100644 --- a/docs/.vitepress/cache/deps/_metadata.json +++ b/docs/.vitepress/cache/deps/_metadata.json @@ -1,71 +1,65 @@ { - "hash": "67eef99b", - "browserHash": "50b04381", + "hash": "05d93ade", + "browserHash": "2ad01f89", "optimized": { "vue": { "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "0c42c586", - "needsInterop": false - }, - "vitepress > @vue/devtools-api": { - "src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js", - "file": "vitepress___@vue_devtools-api.js", - "fileHash": "cc248f1f", + "fileHash": "7364f6c6", "needsInterop": false }, "busuanzi.pure.js": { "src": "../../../../node_modules/busuanzi.pure.js/index.js", "file": "busuanzi__pure__js.js", - "fileHash": "e070a5cb", + "fileHash": "15775245", "needsInterop": true }, "element-plus": { "src": "../../../../node_modules/element-plus/es/index.mjs", "file": "element-plus.js", - "fileHash": "386033f4", + "fileHash": "fc74238b", "needsInterop": false }, "gitalk": { "src": "../../../../node_modules/gitalk/dist/gitalk.js", "file": "gitalk.js", - "fileHash": "5f4ce802", + "fileHash": "3d6c64ce", "needsInterop": true }, "dayjs": { "src": "../../../../node_modules/dayjs/dayjs.min.js", "file": "dayjs.js", - "fileHash": "e1ba915c", + "fileHash": "5d28cfb7", "needsInterop": true }, "dayjs/plugin/utc.js": { "src": "../../../../node_modules/dayjs/plugin/utc.js", "file": "dayjs_plugin_utc__js.js", - "fileHash": "41b3be09", + "fileHash": "9dec2f87", "needsInterop": true }, "dayjs/plugin/relativeTime": { "src": "../../../../node_modules/dayjs/plugin/relativeTime.js", "file": "dayjs_plugin_relativeTime.js", - "fileHash": "4eae9017", + "fileHash": "cd1a069d", "needsInterop": true }, "dayjs/locale/zh-tw": { "src": "../../../../node_modules/dayjs/locale/zh-tw.js", "file": "dayjs_locale_zh-tw.js", - "fileHash": "70d1c055", + "fileHash": "b9e6721e", "needsInterop": true } }, "chunks": { - "chunk-FWL6CYUC": { - "file": "chunk-FWL6CYUC.js" + "chunk-4S7LXNVO": { + "file": "chunk-4S7LXNVO.js" }, - "chunk-POBVZSRX": { - "file": "chunk-POBVZSRX.js" + "chunk-7QE72MOB": { + "file": "chunk-7QE72MOB.js" }, - "chunk-UXIASGQL": { - "file": "chunk-UXIASGQL.js" + "chunk-DFKQJ226": { + "file": "chunk-DFKQJ226.js" } } } \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/element-plus.js b/docs/.vitepress/cache/deps/element-plus.js index 9ae21fe..d2113ba 100644 --- a/docs/.vitepress/cache/deps/element-plus.js +++ b/docs/.vitepress/cache/deps/element-plus.js @@ -33,7 +33,6 @@ import { isDate, isFunction, isObject, - isPlainObject, isPromise, isRef, isString, @@ -86,18 +85,227 @@ import { withDirectives, withKeys, withModifiers -} from "./chunk-FWL6CYUC.js"; -import { - require_dayjs_min -} from "./chunk-POBVZSRX.js"; +} from "./chunk-4S7LXNVO.js"; import { __commonJS, __toESM -} from "./chunk-UXIASGQL.js"; +} from "./chunk-DFKQJ226.js"; + +// node_modules/element-plus/node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "node_modules/element-plus/node_modules/dayjs/dayjs.min.js"(exports2, module2) { + !function(t, e) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e(); + }(exports2, function() { + "use strict"; + var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", f2 = "month", h3 = "quarter", c2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) { + var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100; + return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]"; + } }, m2 = function(t2, e2, n2) { + var r2 = String(t2); + return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2; + }, v2 = { s: m2, z: function(t2) { + var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60; + return (e2 <= 0 ? "+" : "-") + m2(r2, 2, "0") + ":" + m2(i2, 2, "0"); + }, m: function t2(e2, n2) { + if (e2.date() < n2.date()) + return -t2(n2, e2); + var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f2), s3 = n2 - i2 < 0, u3 = e2.clone().add(r2 + (s3 ? -1 : 1), f2); + return +(-(r2 + (n2 - i2) / (s3 ? i2 - u3 : u3 - i2)) || 0); + }, a: function(t2) { + return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2); + }, p: function(t2) { + return { M: f2, y: c2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i, ms: r, Q: h3 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t2) { + return void 0 === t2; + } }, g = "en", D2 = {}; + D2[g] = M2; + var p2 = function(t2) { + return t2 instanceof _2; + }, S2 = function t2(e2, n2, r2) { + var i2; + if (!e2) + return g; + if ("string" == typeof e2) { + var s3 = e2.toLowerCase(); + D2[s3] && (i2 = s3), n2 && (D2[s3] = n2, i2 = s3); + var u3 = e2.split("-"); + if (!i2 && u3.length > 1) + return t2(u3[0]); + } else { + var a3 = e2.name; + D2[a3] = e2, i2 = a3; + } + return !r2 && i2 && (g = i2), i2 || !r2 && g; + }, w2 = function(t2, e2) { + if (p2(t2)) + return t2.clone(); + var n2 = "object" == typeof e2 ? e2 : {}; + return n2.date = t2, n2.args = arguments, new _2(n2); + }, O2 = v2; + O2.l = S2, O2.i = p2, O2.w = function(t2, e2) { + return w2(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset }); + }; + var _2 = function() { + function M3(t2) { + this.$L = S2(t2.locale, null, true), this.parse(t2); + } + var m3 = M3.prototype; + return m3.parse = function(t2) { + this.$d = function(t3) { + var e2 = t3.date, n2 = t3.utc; + if (null === e2) + return /* @__PURE__ */ new Date(NaN); + if (O2.u(e2)) + return /* @__PURE__ */ new Date(); + if (e2 instanceof Date) + return new Date(e2); + if ("string" == typeof e2 && !/Z$/i.test(e2)) { + var r2 = e2.match($); + if (r2) { + var i2 = r2[2] - 1 || 0, s3 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3); + } + } + return new Date(e2); + }(t2), this.$x = t2.x || {}, this.init(); + }, m3.init = function() { + var t2 = this.$d; + this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds(); + }, m3.$utils = function() { + return O2; + }, m3.isValid = function() { + return !(this.$d.toString() === l2); + }, m3.isSame = function(t2, e2) { + var n2 = w2(t2); + return this.startOf(e2) <= n2 && n2 <= this.endOf(e2); + }, m3.isAfter = function(t2, e2) { + return w2(t2) < this.startOf(e2); + }, m3.isBefore = function(t2, e2) { + return this.endOf(e2) < w2(t2); + }, m3.$g = function(t2, e2, n2) { + return O2.u(t2) ? this[e2] : this.set(n2, t2); + }, m3.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m3.valueOf = function() { + return this.$d.getTime(); + }, m3.startOf = function(t2, e2) { + var n2 = this, r2 = !!O2.u(e2) || e2, h4 = O2.p(t2), l3 = function(t3, e3) { + var i2 = O2.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2); + return r2 ? i2 : i2.endOf(a2); + }, $2 = function(t3, e3) { + return O2.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2); + }, y2 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : ""); + switch (h4) { + case c2: + return r2 ? l3(1, 0) : l3(31, 11); + case f2: + return r2 ? l3(1, M4) : l3(0, M4 + 1); + case o2: + var g2 = this.$locale().weekStart || 0, D3 = (y2 < g2 ? y2 + 7 : y2) - g2; + return l3(r2 ? m4 - D3 : m4 + (6 - D3), M4); + case a2: + case d2: + return $2(v3 + "Hours", 0); + case u2: + return $2(v3 + "Minutes", 1); + case s2: + return $2(v3 + "Seconds", 2); + case i: + return $2(v3 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m3.endOf = function(t2) { + return this.startOf(t2, false); + }, m3.$set = function(t2, e2) { + var n2, o3 = O2.p(t2), h4 = "set" + (this.$u ? "UTC" : ""), l3 = (n2 = {}, n2[a2] = h4 + "Date", n2[d2] = h4 + "Date", n2[f2] = h4 + "Month", n2[c2] = h4 + "FullYear", n2[u2] = h4 + "Hours", n2[s2] = h4 + "Minutes", n2[i] = h4 + "Seconds", n2[r] = h4 + "Milliseconds", n2)[o3], $2 = o3 === a2 ? this.$D + (e2 - this.$W) : e2; + if (o3 === f2 || o3 === c2) { + var y2 = this.clone().set(d2, 1); + y2.$d[l3]($2), y2.init(), this.$d = y2.set(d2, Math.min(this.$D, y2.daysInMonth())).$d; + } else + l3 && this.$d[l3]($2); + return this.init(), this; + }, m3.set = function(t2, e2) { + return this.clone().$set(t2, e2); + }, m3.get = function(t2) { + return this[O2.p(t2)](); + }, m3.add = function(r2, h4) { + var d3, l3 = this; + r2 = Number(r2); + var $2 = O2.p(h4), y2 = function(t2) { + var e2 = w2(l3); + return O2.w(e2.date(e2.date() + Math.round(t2 * r2)), l3); + }; + if ($2 === f2) + return this.set(f2, this.$M + r2); + if ($2 === c2) + return this.set(c2, this.$y + r2); + if ($2 === a2) + return y2(1); + if ($2 === o2) + return y2(7); + var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n, d3[i] = t, d3)[$2] || 1, m4 = this.$d.getTime() + r2 * M4; + return O2.w(m4, this); + }, m3.subtract = function(t2, e2) { + return this.add(-1 * t2, e2); + }, m3.format = function(t2) { + var e2 = this, n2 = this.$locale(); + if (!this.isValid()) + return n2.invalidDate || l2; + var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n2.weekdays, f3 = n2.months, h4 = function(t3, n3, i3, s4) { + return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s4); + }, c3 = function(t3) { + return O2.s(s3 % 12 || 12, t3, "0"); + }, d3 = n2.meridiem || function(t3, e3, n3) { + var r3 = t3 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a3 + 1, MM: O2.s(a3 + 1, 2, "0"), MMM: h4(n2.monthsShort, a3, f3, 3), MMMM: h4(f3, a3), D: this.$D, DD: O2.s(this.$D, 2, "0"), d: String(this.$W), dd: h4(n2.weekdaysMin, this.$W, o3, 2), ddd: h4(n2.weekdaysShort, this.$W, o3, 3), dddd: o3[this.$W], H: String(s3), HH: O2.s(s3, 2, "0"), h: c3(1), hh: c3(2), a: d3(s3, u3, true), A: d3(s3, u3, false), m: String(u3), mm: O2.s(u3, 2, "0"), s: String(this.$s), ss: O2.s(this.$s, 2, "0"), SSS: O2.s(this.$ms, 3, "0"), Z: i2 }; + return r2.replace(y, function(t3, e3) { + return e3 || $2[t3] || i2.replace(":", ""); + }); + }, m3.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m3.diff = function(r2, d3, l3) { + var $2, y2 = O2.p(d3), M4 = w2(r2), m4 = (M4.utcOffset() - this.utcOffset()) * e, v3 = this - M4, g2 = O2.m(this, M4); + return g2 = ($2 = {}, $2[c2] = g2 / 12, $2[f2] = g2, $2[h3] = g2 / 3, $2[o2] = (v3 - m4) / 6048e5, $2[a2] = (v3 - m4) / 864e5, $2[u2] = v3 / n, $2[s2] = v3 / e, $2[i] = v3 / t, $2)[y2] || v3, l3 ? g2 : O2.a(g2); + }, m3.daysInMonth = function() { + return this.endOf(f2).$D; + }, m3.$locale = function() { + return D2[this.$L]; + }, m3.locale = function(t2, e2) { + if (!t2) + return this.$L; + var n2 = this.clone(), r2 = S2(t2, e2, true); + return r2 && (n2.$L = r2), n2; + }, m3.clone = function() { + return O2.w(this.$d, this); + }, m3.toDate = function() { + return new Date(this.valueOf()); + }, m3.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m3.toISOString = function() { + return this.$d.toISOString(); + }, m3.toString = function() { + return this.$d.toUTCString(); + }, M3; + }(), T2 = _2.prototype; + return w2.prototype = T2, [["$ms", r], ["$s", i], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", f2], ["$y", c2], ["$D", d2]].forEach(function(t2) { + T2[t2[1]] = function(e2) { + return this.$g(e2, t2[0], t2[1]); + }; + }), w2.extend = function(t2, e2) { + return t2.$i || (t2(e2, _2, w2), t2.$i = true), w2; + }, w2.locale = S2, w2.isDayjs = p2, w2.unix = function(t2) { + return w2(1e3 * t2); + }, w2.en = D2[g], w2.Ls = D2, w2.p = {}, w2; + }); + } +}); -// node_modules/dayjs/plugin/customParseFormat.js +// node_modules/element-plus/node_modules/dayjs/plugin/customParseFormat.js var require_customParseFormat = __commonJS({ - "node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t(); }(exports2, function() { @@ -232,9 +440,9 @@ var require_customParseFormat = __commonJS({ } }); -// node_modules/dayjs/plugin/localeData.js +// node_modules/element-plus/node_modules/dayjs/plugin/localeData.js var require_localeData = __commonJS({ - "node_modules/dayjs/plugin/localeData.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/localeData.js"(exports2, module2) { !function(n, e) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e(); }(exports2, function() { @@ -313,9 +521,9 @@ var require_localeData = __commonJS({ } }); -// node_modules/dayjs/plugin/advancedFormat.js +// node_modules/element-plus/node_modules/dayjs/plugin/advancedFormat.js var require_advancedFormat = __commonJS({ - "node_modules/dayjs/plugin/advancedFormat.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/advancedFormat.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t(); }(exports2, function() { @@ -366,9 +574,9 @@ var require_advancedFormat = __commonJS({ } }); -// node_modules/dayjs/plugin/weekOfYear.js +// node_modules/element-plus/node_modules/dayjs/plugin/weekOfYear.js var require_weekOfYear = __commonJS({ - "node_modules/dayjs/plugin/weekOfYear.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/weekOfYear.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t(); }(exports2, function() { @@ -395,9 +603,9 @@ var require_weekOfYear = __commonJS({ } }); -// node_modules/dayjs/plugin/weekYear.js +// node_modules/element-plus/node_modules/dayjs/plugin/weekYear.js var require_weekYear = __commonJS({ - "node_modules/dayjs/plugin/weekYear.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/weekYear.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t(); }(exports2, function() { @@ -412,9 +620,9 @@ var require_weekYear = __commonJS({ } }); -// node_modules/dayjs/plugin/dayOfYear.js +// node_modules/element-plus/node_modules/dayjs/plugin/dayOfYear.js var require_dayOfYear = __commonJS({ - "node_modules/dayjs/plugin/dayOfYear.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/dayOfYear.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t(); }(exports2, function() { @@ -429,9 +637,9 @@ var require_dayOfYear = __commonJS({ } }); -// node_modules/dayjs/plugin/isSameOrAfter.js +// node_modules/element-plus/node_modules/dayjs/plugin/isSameOrAfter.js var require_isSameOrAfter = __commonJS({ - "node_modules/dayjs/plugin/isSameOrAfter.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/isSameOrAfter.js"(exports2, module2) { !function(e, t) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t(); }(exports2, function() { @@ -445,9 +653,9 @@ var require_isSameOrAfter = __commonJS({ } }); -// node_modules/dayjs/plugin/isSameOrBefore.js +// node_modules/element-plus/node_modules/dayjs/plugin/isSameOrBefore.js var require_isSameOrBefore = __commonJS({ - "node_modules/dayjs/plugin/isSameOrBefore.js"(exports2, module2) { + "node_modules/element-plus/node_modules/dayjs/plugin/isSameOrBefore.js"(exports2, module2) { !function(e, i) { "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i(); }(exports2, function() { @@ -590,7 +798,7 @@ var whenMouse = (handler) => { // node_modules/vue-demi/lib/index.mjs var isVue2 = false; -// node_modules/element-plus/node_modules/@vueuse/shared/index.mjs +// node_modules/@vueuse/shared/index.mjs var __defProp$9 = Object.defineProperty; var __defProps$6 = Object.defineProperties; var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors; @@ -623,7 +831,9 @@ function computedEager(fn2, options) { var _a; var isClient = typeof window !== "undefined"; var isDef = (val) => typeof val !== "undefined"; +var isBoolean = (val) => typeof val === "boolean"; var isFunction2 = (val) => typeof val === "function"; +var isNumber = (val) => typeof val === "number"; var isString2 = (val) => typeof val === "string"; var noop = () => { }; @@ -796,7 +1006,7 @@ function useTimeoutFn(cb, interval, options = {}) { }; } -// node_modules/element-plus/node_modules/@vueuse/core/index.mjs +// node_modules/@vueuse/core/index.mjs function unrefElement(elRef) { var _a2; const plain = resolveUnref(elRef); @@ -1195,9 +1405,6 @@ function useWindowSize(options = {}) { return { width, height }; } -// node_modules/element-plus/es/utils/browser.mjs -var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent); - // node_modules/element-plus/es/utils/dom/position.mjs var isInContainer = (el, container) => { if (!isClient || !el || !container) @@ -3081,7 +3288,7 @@ var objectProto15 = Object.prototype; var funcToString3 = funcProto3.toString; var hasOwnProperty13 = objectProto15.hasOwnProperty; var objectCtorString = funcToString3.call(Object); -function isPlainObject2(value) { +function isPlainObject(value) { if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) { return false; } @@ -3092,7 +3299,7 @@ function isPlainObject2(value) { var Ctor = hasOwnProperty13.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString; } -var isPlainObject_default = isPlainObject2; +var isPlainObject_default = isPlainObject; // node_modules/lodash-es/isError.js var domExcTag = "[object DOMException]"; @@ -6008,10 +6215,10 @@ var isArrayBuffer_default = isArrayBuffer; // node_modules/lodash-es/isBoolean.js var boolTag5 = "[object Boolean]"; -function isBoolean(value) { +function isBoolean2(value) { return value === true || value === false || isObjectLike_default(value) && baseGetTag_default(value) == boolTag5; } -var isBoolean_default = isBoolean; +var isBoolean_default = isBoolean2; // node_modules/lodash-es/_baseIsDate.js var dateTag5 = "[object Date]"; @@ -9342,8 +9549,6 @@ if (symIterator2) { // node_modules/element-plus/es/utils/types.mjs var isUndefined2 = (val) => val === void 0; -var isBoolean2 = (val) => typeof val === "boolean"; -var isNumber3 = (val) => typeof val === "number"; var isEmpty2 = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length; var isElement2 = (e) => { if (typeof Element === "undefined") @@ -9435,7 +9640,7 @@ var getStyle = (element, styleName) => { function addUnit(value, defaultUnit = "px") { if (!value) return ""; - if (isNumber3(value) || isStringNumber(value)) { + if (isNumber(value) || isStringNumber(value)) { return `${value}${defaultUnit}`; } else if (isString(value)) { return value; @@ -18079,8 +18284,11 @@ var castArray2 = (arr) => { return Array.isArray(arr) ? arr : [arr]; }; +// node_modules/element-plus/es/utils/browser.mjs +var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent); + // node_modules/element-plus/es/utils/i18n.mjs -var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text); +var isKorean = (text) => /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(text); // node_modules/element-plus/es/utils/raf.mjs var rAF = (fn2) => isClient ? window.requestAnimationFrame(fn2) : setTimeout(fn2, 16); @@ -18398,7 +18606,7 @@ var _bem = (namespace, block, blockSuffix, element, modifier) => { }; var namespaceContextKey = Symbol("namespaceContextKey"); var useGetDerivedNamespace = (namespaceOverrides) => { - const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace)); + const derivedNamespace = namespaceOverrides || inject(namespaceContextKey, ref(defaultNamespace)); const namespace = computed2(() => { return unref(derivedNamespace) || defaultNamespace; }); @@ -18594,7 +18802,7 @@ var createModelToggleComposable = (name) => { } }; const onChange = (val) => { - if (!isBoolean2(val)) + if (!isBoolean(val)) return; if (props.disabled && val) { if (hasUpdateHandler.value) { @@ -19338,6 +19546,26 @@ function deriveState(state) { }; } +// node_modules/element-plus/es/hooks/use-restore-active/index.mjs +var useRestoreActive = (toggle, initialFocus) => { + let previousActive; + watch(() => toggle.value, (val) => { + var _a2, _b; + if (val) { + previousActive = document.activeElement; + if (isRef(initialFocus)) { + (_b = (_a2 = initialFocus.value).focus) == null ? void 0 : _b.call(_a2); + } + } else { + if (false) { + previousActive.focus.call(previousActive); + } else { + previousActive.focus(); + } + } + }); +}; + // node_modules/element-plus/es/hooks/use-same-target/index.mjs var useSameTarget = (handleClick) => { if (!handleClick) { @@ -19652,7 +19880,7 @@ var useDelayedToggle = ({ registerTimeout(() => { open(event); const _autoClose = unref(autoClose); - if (isNumber3(_autoClose) && _autoClose > 0) { + if (isNumber(_autoClose) && _autoClose > 0) { registerTimeoutForAutoClose(() => { close2(event); }, _autoClose); @@ -19700,10 +19928,10 @@ var zIndex = ref(0); var defaultInitialZIndex = 2e3; var zIndexContextKey = Symbol("zIndexContextKey"); var useZIndex = (zIndexOverrides) => { - const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0); + const zIndexInjection = zIndexOverrides || inject(zIndexContextKey, void 0); const initialZIndex = computed2(() => { const zIndexFromInjection = unref(zIndexInjection); - return isNumber3(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex; + return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex; }); const currentZIndex = computed2(() => initialZIndex.value + zIndex.value); const nextZIndex = () => { @@ -19717,82 +19945,31 @@ var useZIndex = (zIndexOverrides) => { }; }; -// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs -var sides = ["top", "right", "bottom", "left"]; -var alignments = ["start", "end"]; -var placements = sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); -var min2 = Math.min; -var max2 = Math.max; -var round2 = Math.round; -var createCoords = (v2) => ({ - x: v2, - y: v2 -}); -function clamp3(start, value, end2) { - return max2(start, min2(value, end2)); -} -function evaluate(value, param) { - return typeof value === "function" ? value(param) : value; -} -function getSide(placement) { - return placement.split("-")[0]; -} +// node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs function getAlignment(placement) { return placement.split("-")[1]; } -function getOppositeAxis(axis) { - return axis === "x" ? "y" : "x"; -} -function getAxisLength(axis) { +function getLengthFromAxis(axis) { return axis === "y" ? "height" : "width"; } -function getSideAxis(placement) { - return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x"; -} -function getAlignmentAxis(placement) { - return getOppositeAxis(getSideAxis(placement)); -} -function expandPaddingObject(padding) { - return { - top: 0, - right: 0, - bottom: 0, - left: 0, - ...padding - }; -} -function getPaddingObject(padding) { - return typeof padding !== "number" ? expandPaddingObject(padding) : { - top: padding, - right: padding, - bottom: padding, - left: padding - }; +function getSide(placement) { + return placement.split("-")[0]; } -function rectToClientRect(rect) { - return { - ...rect, - top: rect.y, - left: rect.x, - right: rect.x + rect.width, - bottom: rect.y + rect.height - }; +function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y"; } - -// node_modules/@floating-ui/core/dist/floating-ui.core.mjs function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference, floating } = _ref; - const sideAxis = getSideAxis(placement); - const alignmentAxis = getAlignmentAxis(placement); - const alignLength = getAxisLength(alignmentAxis); - const side = getSide(placement); - const isVertical = sideAxis === "y"; const commonX = reference.x + reference.width / 2 - floating.width / 2; const commonY = reference.y + reference.height / 2 - floating.height / 2; - const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; + const mainAxis = getMainAxisFromPlacement(placement); + const length = getLengthFromAxis(mainAxis); + const commonAlign = reference[length] / 2 - floating[length] / 2; + const side = getSide(placement); + const isVertical = mainAxis === "x"; let coords; switch (side) { case "top": @@ -19827,10 +20004,10 @@ function computeCoordsFromPlacement(_ref, placement, rtl) { } switch (getAlignment(placement)) { case "start": - coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); + coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case "end": - coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); + coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; @@ -19919,33 +20096,63 @@ var computePosition = async (reference, floating, config) => { middlewareData }; }; +function expandPaddingObject(padding) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...padding + }; +} +function getSideObjectFromPadding(padding) { + return typeof padding !== "number" ? expandPaddingObject(padding) : { + top: padding, + right: padding, + bottom: padding, + left: padding + }; +} +function rectToClientRect(rect) { + return { + ...rect, + top: rect.y, + left: rect.x, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }; +} +var min2 = Math.min; +var max2 = Math.max; +function within(min$1, value, max$1) { + return max2(min$1, min2(value, max$1)); +} var arrow = (options) => ({ name: "arrow", options, async fn(state) { + const { + element, + padding = 0 + } = options || {}; const { x: x2, y, placement, rects, platform: platform2, - elements, - middlewareData + elements } = state; - const { - element, - padding = 0 - } = evaluate(options, state) || {}; if (element == null) { return {}; } - const paddingObject = getPaddingObject(padding); + const paddingObject = getSideObjectFromPadding(padding); const coords = { x: x2, y }; - const axis = getAlignmentAxis(placement); - const length = getAxisLength(axis); + const axis = getMainAxisFromPlacement(placement); + const length = getLengthFromAxis(axis); const arrowDimensions = await platform2.getDimensions(element); const isYAxis = axis === "y"; const minProp = isYAxis ? "top" : "left"; @@ -19959,29 +20166,24 @@ var arrow = (options) => ({ clientSize = elements.floating[clientProp] || rects.floating[length]; } const centerToReference = endDiff / 2 - startDiff / 2; - const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; - const minPadding = min2(paddingObject[minProp], largestPossiblePadding); - const maxPadding = min2(paddingObject[maxProp], largestPossiblePadding); - const min$1 = minPadding; - const max4 = clientSize - arrowDimensions[length] - maxPadding; + const min5 = paddingObject[minProp]; + const max5 = clientSize - arrowDimensions[length] - paddingObject[maxProp]; const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; - const offset2 = clamp3(min$1, center, max4); - const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; - const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max4 : 0; + const offset2 = within(min5, center, max5); + const shouldAddOffset = getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min5 ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0; + const alignmentOffset = shouldAddOffset ? center < min5 ? min5 - center : max5 - center : 0; return { - [axis]: coords[axis] + alignmentOffset, + [axis]: coords[axis] - alignmentOffset, data: { [axis]: offset2, - centerOffset: center - offset2 - alignmentOffset, - ...shouldAddOffset && { - alignmentOffset - } - }, - reset: shouldAddOffset + centerOffset: center - offset2 + } }; } }); -async function convertValueToCoords(state, options) { +var sides = ["top", "right", "bottom", "left"]; +var allPlacements = sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []); +async function convertValueToCoords(state, value) { const { placement, platform: platform2, @@ -19990,10 +20192,10 @@ async function convertValueToCoords(state, options) { const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); const side = getSide(placement); const alignment = getAlignment(placement); - const isVertical = getSideAxis(placement) === "y"; + const isVertical = getMainAxisFromPlacement(placement) === "x"; const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; - const rawValue = evaluate(options, state); + const rawValue = typeof value === "function" ? value(state) : value; let { mainAxis, crossAxis, @@ -20019,19 +20221,19 @@ async function convertValueToCoords(state, options) { y: crossAxis * crossAxisMulti }; } -var offset = function(options) { - if (options === void 0) { - options = 0; +var offset = function(value) { + if (value === void 0) { + value = 0; } return { name: "offset", - options, + options: value, async fn(state) { const { x: x2, y } = state; - const diffCoords = await convertValueToCoords(state, options); + const diffCoords = await convertValueToCoords(state, value); return { x: x2 + diffCoords.x, y: y + diffCoords.y, @@ -20041,35 +20243,44 @@ var offset = function(options) { }; }; -// node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs -function getNodeName(node) { - if (isNode(node)) { - return (node.nodeName || "").toLowerCase(); - } - return "#document"; -} +// node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs function getWindow(node) { var _node$ownerDocument; - return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; + return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; } -function getDocumentElement(node) { - var _ref; - return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; +function getComputedStyle$1(element) { + return getWindow(element).getComputedStyle(element); } function isNode(value) { - return value instanceof Node || value instanceof getWindow(value).Node; + return value instanceof getWindow(value).Node; } -function isElement3(value) { - return value instanceof Element || value instanceof getWindow(value).Element; +function getNodeName(node) { + return isNode(node) ? (node.nodeName || "").toLowerCase() : ""; +} +var uaString; +function getUAString() { + if (uaString) { + return uaString; + } + const uaData = navigator.userAgentData; + if (uaData && Array.isArray(uaData.brands)) { + uaString = uaData.brands.map((item) => item.brand + "/" + item.version).join(" "); + return uaString; + } + return navigator.userAgent; } function isHTMLElement(value) { - return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; + return value instanceof getWindow(value).HTMLElement; +} +function isElement3(value) { + return value instanceof getWindow(value).Element; } -function isShadowRoot(value) { +function isShadowRoot(node) { if (typeof ShadowRoot === "undefined") { return false; } - return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; + const OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; } function isOverflowElement(element) { const { @@ -20077,38 +20288,133 @@ function isOverflowElement(element) { overflowX, overflowY, display - } = getComputedStyle2(element); + } = getComputedStyle$1(element); return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display); } function isTableElement(element) { return ["table", "td", "th"].includes(getNodeName(element)); } function isContainingBlock(element) { - const webkit = isWebKit(); - const css = getComputedStyle2(element); - return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value)); -} -function getContainingBlock(element) { - let currentNode = getParentNode(element); - while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { - if (isContainingBlock(currentNode)) { - return currentNode; - } else { - currentNode = getParentNode(currentNode); - } - } - return null; + const isFirefox2 = /firefox/i.test(getUAString()); + const css = getComputedStyle$1(element); + const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter; + return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox2 && css.willChange === "filter" || isFirefox2 && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some((value) => { + const contain = css.contain; + return contain != null ? contain.includes(value) : false; + }); } -function isWebKit() { - if (typeof CSS === "undefined" || !CSS.supports) - return false; - return CSS.supports("-webkit-backdrop-filter", "none"); +function isClientRectVisualViewportBased() { + return /^((?!chrome|android).)*safari/i.test(getUAString()); } function isLastTraversableNode(node) { return ["html", "body", "#document"].includes(getNodeName(node)); } -function getComputedStyle2(element) { - return getWindow(element).getComputedStyle(element); +var min3 = Math.min; +var max3 = Math.max; +var round2 = Math.round; +function getCssDimensions(element) { + const css = getComputedStyle$1(element); + let width = parseFloat(css.width); + let height = parseFloat(css.height); + const hasOffset = isHTMLElement(element); + const offsetWidth = hasOffset ? element.offsetWidth : width; + const offsetHeight = hasOffset ? element.offsetHeight : height; + const shouldFallback = round2(width) !== offsetWidth || round2(height) !== offsetHeight; + if (shouldFallback) { + width = offsetWidth; + height = offsetHeight; + } + return { + width, + height, + fallback: shouldFallback + }; +} +function unwrapElement(element) { + return !isElement3(element) ? element.contextElement : element; +} +var FALLBACK_SCALE = { + x: 1, + y: 1 +}; +function getScale(element) { + const domElement = unwrapElement(element); + if (!isHTMLElement(domElement)) { + return FALLBACK_SCALE; + } + const rect = domElement.getBoundingClientRect(); + const { + width, + height, + fallback + } = getCssDimensions(domElement); + let x2 = (fallback ? round2(rect.width) : rect.width) / width; + let y = (fallback ? round2(rect.height) : rect.height) / height; + if (!x2 || !Number.isFinite(x2)) { + x2 = 1; + } + if (!y || !Number.isFinite(y)) { + y = 1; + } + return { + x: x2, + y + }; +} +function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { + var _win$visualViewport, _win$visualViewport2; + if (includeScale === void 0) { + includeScale = false; + } + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + const clientRect = element.getBoundingClientRect(); + const domElement = unwrapElement(element); + let scale = FALLBACK_SCALE; + if (includeScale) { + if (offsetParent) { + if (isElement3(offsetParent)) { + scale = getScale(offsetParent); + } + } else { + scale = getScale(element); + } + } + const win = domElement ? getWindow(domElement) : window; + const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy; + let x2 = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale.x; + let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale.y; + let width = clientRect.width / scale.x; + let height = clientRect.height / scale.y; + if (domElement) { + const win2 = getWindow(domElement); + const offsetWin = offsetParent && isElement3(offsetParent) ? getWindow(offsetParent) : offsetParent; + let currentIFrame = win2.frameElement; + while (currentIFrame && offsetParent && offsetWin !== win2) { + const iframeScale = getScale(currentIFrame); + const iframeRect = currentIFrame.getBoundingClientRect(); + const css = getComputedStyle(currentIFrame); + iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; + iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; + x2 *= iframeScale.x; + y *= iframeScale.y; + width *= iframeScale.x; + height *= iframeScale.y; + x2 += iframeRect.x; + y += iframeRect.y; + currentIFrame = getWindow(currentIFrame).frameElement; + } + } + return rectToClientRect({ + width, + height, + x: x2, + y + }); +} +function getDocumentElement(node) { + return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement; } function getNodeScroll(element) { if (isElement3(element)) { @@ -20122,6 +20428,68 @@ function getNodeScroll(element) { scrollTop: element.pageYOffset }; } +function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { + let { + rect, + offsetParent, + strategy + } = _ref; + const isOffsetParentAnElement = isHTMLElement(offsetParent); + const documentElement = getDocumentElement(offsetParent); + if (offsetParent === documentElement) { + return rect; + } + let scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + let scale = { + x: 1, + y: 1 + }; + const offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") { + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + const offsetRect = getBoundingClientRect(offsetParent); + scale = getScale(offsetParent); + offsets.x = offsetRect.x + offsetParent.clientLeft; + offsets.y = offsetRect.y + offsetParent.clientTop; + } + } + return { + width: rect.width * scale.x, + height: rect.height * scale.y, + x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, + y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + }; +} +function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; +} +function getDocumentRect(element) { + const html = getDocumentElement(element); + const scroll = getNodeScroll(element); + const body = element.ownerDocument.body; + const width = max3(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); + const height = max3(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); + let x2 = -scroll.scrollLeft + getWindowScrollBarX(element); + const y = -scroll.scrollTop; + if (getComputedStyle$1(body).direction === "rtl") { + x2 += max3(html.clientWidth, body.clientWidth) - width; + } + return { + width, + height, + x: x2, + y + }; +} function getParentNode(node) { if (getNodeName(node) === "html") { return node; @@ -20138,204 +20506,25 @@ function getParentNode(node) { function getNearestOverflowAncestor(node) { const parentNode = getParentNode(node); if (isLastTraversableNode(parentNode)) { - return node.ownerDocument ? node.ownerDocument.body : node.body; + return parentNode.ownerDocument.body; } if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { return parentNode; } return getNearestOverflowAncestor(parentNode); } -function getOverflowAncestors(node, list, traverseIframes) { - var _node$ownerDocument2; +function getOverflowAncestors(node, list) { + var _node$ownerDocument; if (list === void 0) { list = []; } - if (traverseIframes === void 0) { - traverseIframes = true; - } const scrollableAncestor = getNearestOverflowAncestor(node); - const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); + const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body); const win = getWindow(scrollableAncestor); if (isBody) { - return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); - } - return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); -} - -// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs -function getCssDimensions(element) { - const css = getComputedStyle2(element); - let width = parseFloat(css.width) || 0; - let height = parseFloat(css.height) || 0; - const hasOffset = isHTMLElement(element); - const offsetWidth = hasOffset ? element.offsetWidth : width; - const offsetHeight = hasOffset ? element.offsetHeight : height; - const shouldFallback = round2(width) !== offsetWidth || round2(height) !== offsetHeight; - if (shouldFallback) { - width = offsetWidth; - height = offsetHeight; - } - return { - width, - height, - $: shouldFallback - }; -} -function unwrapElement(element) { - return !isElement3(element) ? element.contextElement : element; -} -function getScale(element) { - const domElement = unwrapElement(element); - if (!isHTMLElement(domElement)) { - return createCoords(1); - } - const rect = domElement.getBoundingClientRect(); - const { - width, - height, - $ - } = getCssDimensions(domElement); - let x2 = ($ ? round2(rect.width) : rect.width) / width; - let y = ($ ? round2(rect.height) : rect.height) / height; - if (!x2 || !Number.isFinite(x2)) { - x2 = 1; - } - if (!y || !Number.isFinite(y)) { - y = 1; - } - return { - x: x2, - y - }; -} -var noOffsets = createCoords(0); -function getVisualOffsets(element) { - const win = getWindow(element); - if (!isWebKit() || !win.visualViewport) { - return noOffsets; - } - return { - x: win.visualViewport.offsetLeft, - y: win.visualViewport.offsetTop - }; -} -function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { - if (isFixed === void 0) { - isFixed = false; - } - if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { - return false; - } - return isFixed; -} -function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { - if (includeScale === void 0) { - includeScale = false; - } - if (isFixedStrategy === void 0) { - isFixedStrategy = false; - } - const clientRect = element.getBoundingClientRect(); - const domElement = unwrapElement(element); - let scale = createCoords(1); - if (includeScale) { - if (offsetParent) { - if (isElement3(offsetParent)) { - scale = getScale(offsetParent); - } - } else { - scale = getScale(element); - } - } - const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); - let x2 = (clientRect.left + visualOffsets.x) / scale.x; - let y = (clientRect.top + visualOffsets.y) / scale.y; - let width = clientRect.width / scale.x; - let height = clientRect.height / scale.y; - if (domElement) { - const win = getWindow(domElement); - const offsetWin = offsetParent && isElement3(offsetParent) ? getWindow(offsetParent) : offsetParent; - let currentIFrame = win.frameElement; - while (currentIFrame && offsetParent && offsetWin !== win) { - const iframeScale = getScale(currentIFrame); - const iframeRect = currentIFrame.getBoundingClientRect(); - const css = getComputedStyle2(currentIFrame); - const left2 = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; - const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; - x2 *= iframeScale.x; - y *= iframeScale.y; - width *= iframeScale.x; - height *= iframeScale.y; - x2 += left2; - y += top; - currentIFrame = getWindow(currentIFrame).frameElement; - } - } - return rectToClientRect({ - width, - height, - x: x2, - y - }); -} -function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { - let { - rect, - offsetParent, - strategy - } = _ref; - const isOffsetParentAnElement = isHTMLElement(offsetParent); - const documentElement = getDocumentElement(offsetParent); - if (offsetParent === documentElement) { - return rect; - } - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - let scale = createCoords(1); - const offsets = createCoords(0); - if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isHTMLElement(offsetParent)) { - const offsetRect = getBoundingClientRect(offsetParent); - scale = getScale(offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } - } - return { - width: rect.width * scale.x, - height: rect.height * scale.y, - x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, - y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y - }; -} -function getClientRects(element) { - return Array.from(element.getClientRects()); -} -function getWindowScrollBarX(element) { - return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; -} -function getDocumentRect(element) { - const html = getDocumentElement(element); - const scroll = getNodeScroll(element); - const body = element.ownerDocument.body; - const width = max2(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); - const height = max2(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); - let x2 = -scroll.scrollLeft + getWindowScrollBarX(element); - const y = -scroll.scrollTop; - if (getComputedStyle2(body).direction === "rtl") { - x2 += max2(html.clientWidth, body.clientWidth) - width; + return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []); } - return { - width, - height, - x: x2, - y - }; + return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor)); } function getViewportRect(element, strategy) { const win = getWindow(element); @@ -20348,7 +20537,7 @@ function getViewportRect(element, strategy) { if (visualViewport) { width = visualViewport.width; height = visualViewport.height; - const visualViewportBased = isWebKit(); + const visualViewportBased = isClientRectVisualViewportBased(); if (!visualViewportBased || visualViewportBased && strategy === "fixed") { x2 = visualViewport.offsetLeft; y = visualViewport.offsetTop; @@ -20365,7 +20554,10 @@ function getInnerBoundingClientRect(element, strategy) { const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); const top = clientRect.top + element.clientTop; const left2 = clientRect.left + element.clientLeft; - const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); + const scale = isHTMLElement(element) ? getScale(element) : { + x: 1, + y: 1 + }; const width = element.clientWidth * scale.x; const height = element.clientHeight * scale.y; const x2 = left2 * scale.x; @@ -20386,38 +20578,35 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) } else if (isElement3(clippingAncestor)) { rect = getInnerBoundingClientRect(clippingAncestor, strategy); } else { - const visualOffsets = getVisualOffsets(element); - rect = { - ...clippingAncestor, - x: clippingAncestor.x - visualOffsets.x, - y: clippingAncestor.y - visualOffsets.y + const mutableRect = { + ...clippingAncestor }; + if (isClientRectVisualViewportBased()) { + var _win$visualViewport, _win$visualViewport2; + const win = getWindow(element); + mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0; + mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0; + } + rect = mutableRect; } return rectToClientRect(rect); } -function hasFixedPositionAncestor(element, stopNode) { - const parentNode = getParentNode(element); - if (parentNode === stopNode || !isElement3(parentNode) || isLastTraversableNode(parentNode)) { - return false; - } - return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode); -} function getClippingElementAncestors(element, cache2) { const cachedResult = cache2.get(element); if (cachedResult) { return cachedResult; } - let result2 = getOverflowAncestors(element, [], false).filter((el) => isElement3(el) && getNodeName(el) !== "body"); + let result2 = getOverflowAncestors(element).filter((el) => isElement3(el) && getNodeName(el) !== "body"); let currentContainingBlockComputedStyle = null; - const elementIsFixed = getComputedStyle2(element).position === "fixed"; + const elementIsFixed = getComputedStyle$1(element).position === "fixed"; let currentNode = elementIsFixed ? getParentNode(element) : element; while (isElement3(currentNode) && !isLastTraversableNode(currentNode)) { - const computedStyle = getComputedStyle2(currentNode); - const currentNodeIsContaining = isContainingBlock(currentNode); - if (!currentNodeIsContaining && computedStyle.position === "fixed") { + const computedStyle = getComputedStyle$1(currentNode); + const containingBlock = isContainingBlock(currentNode); + if (computedStyle.position === "fixed") { currentContainingBlockComputedStyle = null; } - const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); + const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position); if (shouldDropCurrentNode) { result2 = result2.filter((ancestor) => ancestor !== currentNode); } else { @@ -20440,10 +20629,10 @@ function getClippingRect(_ref) { const firstClippingAncestor = clippingAncestors[0]; const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); - accRect.top = max2(rect.top, accRect.top); - accRect.right = min2(rect.right, accRect.right); - accRect.bottom = min2(rect.bottom, accRect.bottom); - accRect.left = max2(rect.left, accRect.left); + accRect.top = max3(rect.top, accRect.top); + accRect.right = min3(rect.right, accRect.right); + accRect.bottom = min3(rect.bottom, accRect.bottom); + accRect.left = max3(rect.left, accRect.left); return accRect; }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); return { @@ -20456,37 +20645,8 @@ function getClippingRect(_ref) { function getDimensions(element) { return getCssDimensions(element); } -function getRectRelativeToOffsetParent(element, offsetParent, strategy) { - const isOffsetParentAnElement = isHTMLElement(offsetParent); - const documentElement = getDocumentElement(offsetParent); - const isFixed = strategy === "fixed"; - const rect = getBoundingClientRect(element, true, isFixed, offsetParent); - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - const offsets = createCoords(0); - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isOffsetParentAnElement) { - const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } else if (documentElement) { - offsets.x = getWindowScrollBarX(documentElement); - } - } - return { - x: rect.left + scroll.scrollLeft - offsets.x, - y: rect.top + scroll.scrollTop - offsets.y, - width: rect.width, - height: rect.height - }; -} function getTrueOffsetParent(element, polyfill) { - if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") { + if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") { return null; } if (polyfill) { @@ -20494,51 +20654,89 @@ function getTrueOffsetParent(element, polyfill) { } return element.offsetParent; } +function getContainingBlock(element) { + let currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { + if (isContainingBlock(currentNode)) { + return currentNode; + } else { + currentNode = getParentNode(currentNode); + } + } + return null; +} function getOffsetParent(element, polyfill) { const window2 = getWindow(element); if (!isHTMLElement(element)) { return window2; } let offsetParent = getTrueOffsetParent(element, polyfill); - while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") { offsetParent = getTrueOffsetParent(offsetParent, polyfill); } - if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static" && !isContainingBlock(offsetParent))) { + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) { return window2; } return offsetParent || getContainingBlock(element) || window2; } -var getElementRects = async function(_ref) { - let { - reference, - floating, - strategy - } = _ref; - const getOffsetParentFn = this.getOffsetParent || getOffsetParent; - const getDimensionsFn = this.getDimensions; - return { - reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy), - floating: { - x: 0, - y: 0, - ...await getDimensionsFn(floating) +function getRectRelativeToOffsetParent(element, offsetParent, strategy) { + const isOffsetParentAnElement = isHTMLElement(offsetParent); + const documentElement = getDocumentElement(offsetParent); + const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent); + let scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + const offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") { + if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + const offsetRect = getBoundingClientRect(offsetParent, true); + offsets.x = offsetRect.x + offsetParent.clientLeft; + offsets.y = offsetRect.y + offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height }; -}; -function isRTL(element) { - return getComputedStyle2(element).direction === "rtl"; } var platform = { - convertOffsetParentRelativeRectToViewportRelativeRect, - getDocumentElement, getClippingRect, - getOffsetParent, - getElementRects, - getClientRects, + convertOffsetParentRelativeRectToViewportRelativeRect, + isElement: isElement3, getDimensions, + getOffsetParent, + getDocumentElement, getScale, - isElement: isElement3, - isRTL + async getElementRects(_ref) { + let { + reference, + floating, + strategy + } = _ref; + const getOffsetParentFn = this.getOffsetParent || getOffsetParent; + const getDimensionsFn = this.getDimensions; + return { + reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy), + floating: { + x: 0, + y: 0, + ...await getDimensionsFn(floating) + } + }; + }, + getClientRects: (element) => Array.from(element.getClientRects()), + isRTL: (element) => getComputedStyle$1(element).direction === "rtl" }; var computePosition2 = (reference, floating, options) => { const cache2 = /* @__PURE__ */ new Map(); @@ -20726,45 +20924,6 @@ var useGlobalSize = () => { }); }; -// node_modules/element-plus/es/hooks/use-focus-controller/index.mjs -function useFocusController(target2, { afterFocus, afterBlur } = {}) { - const instance = getCurrentInstance(); - const { emit } = instance; - const wrapperRef = shallowRef(); - const isFocused = ref(false); - const handleFocus = (event) => { - if (isFocused.value) - return; - isFocused.value = true; - emit("focus", event); - afterFocus == null ? void 0 : afterFocus(); - }; - const handleBlur = (event) => { - var _a2; - if (event.relatedTarget && ((_a2 = wrapperRef.value) == null ? void 0 : _a2.contains(event.relatedTarget))) - return; - isFocused.value = false; - emit("blur", event); - afterBlur == null ? void 0 : afterBlur(); - }; - const handleClick = () => { - var _a2; - (_a2 = target2.value) == null ? void 0 : _a2.focus(); - }; - watch(wrapperRef, (el) => { - if (el) { - el.setAttribute("tabindex", "-1"); - } - }); - useEventListener(wrapperRef, "click", handleClick); - return { - wrapperRef, - isFocused, - handleFocus, - handleBlur - }; -} - // node_modules/element-plus/es/components/config-provider/src/constants.mjs var configProviderContextKey = Symbol(); @@ -20892,7 +21051,7 @@ var ConfigProvider = defineComponent({ var ElConfigProvider = withInstall(ConfigProvider); // node_modules/element-plus/es/version.mjs -var version2 = "2.3.14"; +var version2 = "2.3.3"; // node_modules/element-plus/es/make-installer.mjs var makeInstaller = (components = []) => { @@ -20931,8 +21090,8 @@ var affixProps = buildProps({ } }); var affixEmits = { - scroll: ({ scrollTop, fixed }) => isNumber3(scrollTop) && isBoolean2(fixed), - [CHANGE_EVENT]: (fixed) => isBoolean2(fixed) + scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed), + [CHANGE_EVENT]: (fixed) => isBoolean(fixed) }; // node_modules/element-plus/es/_virtual/plugin-vue_export-helper.mjs @@ -21350,14 +21509,17 @@ var formProps = buildProps({ type: Boolean, default: true }, - hideRequiredAsterisk: Boolean, + hideRequiredAsterisk: { + type: Boolean, + default: false + }, scrollToError: Boolean, scrollIntoViewOptions: { type: [Object, Boolean] } }); var formEmits = { - validate: (prop, isValid, message2) => (isArray(prop) || isString(prop)) && isBoolean2(isValid) && isString(message2) + validate: (prop, isValid, message2) => (isArray(prop) || isString(prop)) && isBoolean(isValid) && isString(message2) }; // node_modules/element-plus/es/components/form/src/utils.mjs @@ -21367,8 +21529,8 @@ function useFormLabelWidth() { const autoLabelWidth = computed2(() => { if (!potentialLabelWidthArr.value.length) return "0"; - const max4 = Math.max(...potentialLabelWidthArr.value); - return max4 ? `${max4}px` : ""; + const max5 = Math.max(...potentialLabelWidthArr.value); + return max5 ? `${max5}px` : ""; }); function getLabelWidthIndex(width) { const index = potentialLabelWidthArr.value.indexOf(width); @@ -21979,8 +22141,8 @@ var type$1 = function type(rule, value, source, errors, options) { }; var range2 = function range3(rule, value, source, errors, options) { var len = typeof rule.len === "number"; - var min4 = typeof rule.min === "number"; - var max4 = typeof rule.max === "number"; + var min5 = typeof rule.min === "number"; + var max5 = typeof rule.max === "number"; var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var val = value; var key = null; @@ -22007,11 +22169,11 @@ var range2 = function range3(rule, value, source, errors, options) { if (val !== rule.len) { errors.push(format(options.messages[key].len, rule.fullField, rule.len)); } - } else if (min4 && !max4 && val < rule.min) { + } else if (min5 && !max5 && val < rule.min) { errors.push(format(options.messages[key].min, rule.fullField, rule.min)); - } else if (max4 && !min4 && val > rule.max) { + } else if (max5 && !min5 && val > rule.max) { errors.push(format(options.messages[key].max, rule.fullField, rule.max)); - } else if (min4 && max4 && (val < rule.min || val > rule.max)) { + } else if (min5 && max5 && (val < rule.min || val > rule.max)) { errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); } }; @@ -22784,7 +22946,7 @@ var _sfc_main5 = defineComponent({ (formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left", { [ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon } ]); - const _inlineMessage = computed2(() => isBoolean2(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false); + const _inlineMessage = computed2(() => isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false); const validateClasses = computed2(() => [ ns.e("error"), { [ns.em("error", "inline")]: _inlineMessage.value } @@ -23091,7 +23253,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows) { } hiddenTextarea.value = ""; const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; - if (isNumber3(minRows)) { + if (isNumber(minRows)) { let minHeight = singleRowHeight * minRows; if (boxSizing === "border-box") { minHeight = minHeight + paddingSize + borderSize; @@ -23099,7 +23261,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows) { height = Math.max(minHeight, height); result2.minHeight = `${minHeight}px`; } - if (isNumber3(maxRows)) { + if (isNumber(maxRows)) { let maxHeight = singleRowHeight * maxRows; if (boxSizing === "border-box") { maxHeight = maxHeight + paddingSize + borderSize; @@ -23197,10 +23359,6 @@ var inputProps = buildProps({ inputStyle: { type: definePropType([Object, Array, String]), default: () => mutable({}) - }, - autofocus: { - type: Boolean, - default: false } }); var inputEmits = { @@ -23220,8 +23378,8 @@ var inputEmits = { // node_modules/element-plus/es/components/input/src/input2.mjs var _hoisted_1295 = ["role"]; -var _hoisted_2294 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"]; -var _hoisted_3293 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"]; +var _hoisted_2294 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"]; +var _hoisted_3293 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"]; var __default__6 = defineComponent({ name: "ElInput", inheritAttrs: false @@ -23260,7 +23418,7 @@ var _sfc_main6 = defineComponent({ ]); const wrapperKls = computed2(() => [ nsInput.e("wrapper"), - nsInput.is("focus", isFocused.value) + nsInput.is("focus", focused.value) ]); const attrs = useAttrs2({ excludeKeys: computed2(() => { @@ -23277,20 +23435,13 @@ var _sfc_main6 = defineComponent({ const nsTextarea = useNamespace("textarea"); const input = shallowRef(); const textarea = shallowRef(); + const focused = ref(false); const hovering = ref(false); const isComposing = ref(false); const passwordVisible = ref(false); const countStyle = ref(); const textareaCalcStyle = shallowRef(props.inputStyle); const _ref = computed2(() => input.value || textarea.value); - const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, { - afterBlur() { - var _a2; - if (props.validateEvent) { - (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - }); const needStatusIcon = computed2(() => { var _a2; return (_a2 = form == null ? void 0 : form.statusIcon) != null ? _a2 : false; @@ -23308,8 +23459,8 @@ var _sfc_main6 = defineComponent({ { resize: props.resize } ]); const nativeInputValue = computed2(() => isNil_default(props.modelValue) ? "" : String(props.modelValue)); - const showClear = computed2(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value)); - const showPwdVisible = computed2(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || isFocused.value)); + const showClear = computed2(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value)); + const showPwdVisible = computed2(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || focused.value)); const isWordLimitVisible = computed2(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword); const textLength = computed2(() => nativeInputValue.value.length); const inputExceed = computed2(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength)); @@ -23363,16 +23514,16 @@ var _sfc_main6 = defineComponent({ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea); const setNativeInputValue = () => { const input2 = _ref.value; - const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value; - if (!input2 || input2.value === formatterValue) + if (!input2 || input2.value === nativeInputValue.value) return; - input2.value = formatterValue; + input2.value = nativeInputValue.value; }; const handleInput = async (event) => { recordCursor(); let { value } = event.target; if (props.formatter) { value = props.parser ? props.parser(value) : value; + value = props.formatter(value); } if (isComposing.value) return; @@ -23420,6 +23571,18 @@ var _sfc_main6 = defineComponent({ var _a2; return (_a2 = _ref.value) == null ? void 0 : _a2.blur(); }; + const handleFocus = (event) => { + focused.value = true; + emit("focus", event); + }; + const handleBlur = (event) => { + var _a2; + focused.value = false; + emit("blur", event); + if (props.validateEvent) { + (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur").catch((err) => debugWarn(err)); + } + }; const handleMouseLeave = (evt) => { hovering.value = false; emit("mouseleave", evt); @@ -23491,8 +23654,6 @@ var _sfc_main6 = defineComponent({ renderSlot(_ctx.$slots, "prepend") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { - ref_key: "wrapperRef", - ref: wrapperRef, class: normalizeClass(unref(wrapperKls)) }, [ createCommentVNode(" prefix slot "), @@ -23501,7 +23662,8 @@ var _sfc_main6 = defineComponent({ class: normalizeClass(unref(nsInput).e("prefix")) }, [ createBaseVNode("span", { - class: normalizeClass(unref(nsInput).e("prefix-inner")) + class: normalizeClass(unref(nsInput).e("prefix-inner")), + onClick: focus }, [ renderSlot(_ctx.$slots, "prefix"), _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), { @@ -23532,13 +23694,12 @@ var _sfc_main6 = defineComponent({ placeholder: _ctx.placeholder, style: _ctx.inputStyle, form: props.form, - autofocus: props.autofocus, onCompositionstart: handleCompositionStart, onCompositionupdate: handleCompositionUpdate, onCompositionend: handleCompositionEnd, onInput: handleInput, - onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)), + onFocus: handleFocus, + onBlur: handleBlur, onChange: handleChange, onKeydown: handleKeydown }), null, 16, _hoisted_2294), @@ -23548,7 +23709,8 @@ var _sfc_main6 = defineComponent({ class: normalizeClass(unref(nsInput).e("suffix")) }, [ createBaseVNode("span", { - class: normalizeClass(unref(nsInput).e("suffix-inner")) + class: normalizeClass(unref(nsInput).e("suffix-inner")), + onClick: focus }, [ !unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ renderSlot(_ctx.$slots, "suffix"), @@ -23630,13 +23792,12 @@ var _sfc_main6 = defineComponent({ "aria-label": _ctx.label, placeholder: _ctx.placeholder, form: props.form, - autofocus: props.autofocus, onCompositionstart: handleCompositionStart, onCompositionupdate: handleCompositionUpdate, onCompositionend: handleCompositionEnd, onInput: handleInput, - onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[3] || (_cache[3] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)), + onFocus: handleFocus, + onBlur: handleBlur, onChange: handleChange, onKeydown: handleKeydown }), null, 16, _hoisted_3293), @@ -23931,7 +24092,7 @@ var scrollbarEmits = { scroll: ({ scrollTop, scrollLeft - }) => [scrollTop, scrollLeft].every(isNumber3) + }) => [scrollTop, scrollLeft].every(isNumber) }; // node_modules/element-plus/es/components/scrollbar/src/scrollbar2.mjs @@ -23987,19 +24148,19 @@ var _sfc_main9 = defineComponent({ function scrollTo(arg1, arg2) { if (isObject(arg1)) { wrapRef.value.scrollTo(arg1); - } else if (isNumber3(arg1) && isNumber3(arg2)) { + } else if (isNumber(arg1) && isNumber(arg2)) { wrapRef.value.scrollTo(arg1, arg2); } } const setScrollTop = (value) => { - if (!isNumber3(value)) { + if (!isNumber(value)) { debugWarn(COMPONENT_NAME5, "value must be a number"); return; } wrapRef.value.scrollTop = value; }; const setScrollLeft = (value) => { - if (!isNumber3(value)) { + if (!isNumber(value)) { debugWarn(COMPONENT_NAME5, "value must be a number"); return; } @@ -24767,7 +24928,7 @@ var _sfc_main13 = defineComponent({ if (!releasedEvent.defaultPrevented && (focusReason2.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) { tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body); } - trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus); + trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, trapOnFocus); focusableStack.remove(focusLayer); } } @@ -25030,8 +25191,8 @@ var usePopperContentDOM = (props, { const contentStyle = computed2(() => { return [ { zIndex: unref(contentZIndex) }, - unref(styles).popper, - props.popperStyle || {} + props.popperStyle || {}, + unref(styles).popper ]; }); const ariaModal = computed2(() => role.value === "dialog" ? "false" : void 0); @@ -25580,7 +25741,7 @@ var _sfc_main17 = defineComponent({ open: show, close: hide2 }); - const controlled = computed2(() => isBoolean2(props.visible) && !hasUpdateHandler.value); + const controlled = computed2(() => isBoolean(props.visible) && !hasUpdateHandler.value); provide(TOOLTIP_INJECTION_KEY, { controlled, id, @@ -25618,11 +25779,10 @@ var _sfc_main17 = defineComponent({ open.value = false; } }); - const isFocusInsideContent = (event) => { + const isFocusInsideContent = () => { var _a2, _b; const popperContent = (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.contentRef) == null ? void 0 : _b.popperContentRef; - const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement; - return popperContent && popperContent.contains(activeElement); + return popperContent && popperContent.contains(document.activeElement); }; onDeactivated(() => open.value && hide2()); expose({ @@ -25830,7 +25990,8 @@ var _sfc_main18 = defineComponent({ } return []; }); - const onSuggestionShow = () => { + const onSuggestionShow = async () => { + await nextTick(); if (suggestionVisible.value) { dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`; } @@ -26012,7 +26173,6 @@ var _sfc_main18 = defineComponent({ trigger: "click", transition: `${unref(ns).namespace.value}-zoom-in-top`, persistent: "", - role: "listbox", onBeforeShow: onSuggestionShow, onHide }, { @@ -26139,7 +26299,7 @@ var avatarProps = buildProps({ type: [Number, String], values: componentSizes, default: "", - validator: (val) => isNumber3(val) + validator: (val) => isNumber(val) }, shape: { type: String, @@ -26190,7 +26350,7 @@ var _sfc_main19 = defineComponent({ }); const sizeStyle = computed2(() => { const { size: size3 } = props; - return isNumber3(size3) ? ns.cssVarBlock({ + return isNumber(size3) ? ns.cssVarBlock({ size: addUnit(size3) || "" }) : void 0; }); @@ -26279,7 +26439,6 @@ var useBackTop = (props, emit, componentName2) => { } container.value = el.value; } - handleScroll2(); }); return { visible, @@ -26370,7 +26529,7 @@ var _sfc_main21 = defineComponent({ const content = computed2(() => { if (props.isDot) return ""; - if (isNumber3(props.value) && isNumber3(props.max)) { + if (isNumber(props.value) && isNumber(props.max)) { return props.max < props.value ? `${props.max}+` : `${props.value}`; } return `${props.value}`; @@ -26482,6 +26641,7 @@ var _sfc_main23 = defineComponent({ const instance = getCurrentInstance(); const breadcrumbContext = inject(breadcrumbKey, void 0); const ns = useNamespace("breadcrumb"); + const { separator, separatorIcon } = toRefs(breadcrumbContext); const router = instance.appContext.config.globalProperties.$router; const link = ref(); const onClick = () => { @@ -26490,7 +26650,6 @@ var _sfc_main23 = defineComponent({ props.replace ? router.replace(props.to) : router.push(props.to); }; return (_ctx, _cache) => { - var _a2, _b; return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("item")) }, [ @@ -26503,19 +26662,19 @@ var _sfc_main23 = defineComponent({ }, [ renderSlot(_ctx.$slots, "default") ], 2), - ((_a2 = unref(breadcrumbContext)) == null ? void 0 : _a2.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), { + unref(separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns).e("separator")) }, { default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon))) + (openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon)))) ]), _: 1 }, 8, ["class"])) : (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(unref(ns).e("separator")), role: "presentation" - }, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3)) + }, toDisplayString(unref(separator)), 3)) ], 2); }; } @@ -26552,17 +26711,6 @@ var useButton = (props, emit) => { var _a2, _b, _c; return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.autoInsertSpace) != null ? _c : false; }); - const _props = computed2(() => { - if (props.tag === "button") { - return { - ariaDisabled: _disabled.value || props.loading, - disabled: _disabled.value || props.loading, - autofocus: props.autofocus, - type: props.nativeType - }; - } - return {}; - }); const shouldAddSpace = computed2(() => { var _a2; const defaultSlot = (_a2 = slots.default) == null ? void 0 : _a2.call(slots); @@ -26586,7 +26734,6 @@ var useButton = (props, emit) => { _size, _type, _ref, - _props, shouldAddSpace, handleClick }; @@ -26637,10 +26784,6 @@ var buttonProps = buildProps({ autoInsertSpace: { type: Boolean, default: void 0 - }, - tag: { - type: definePropType([String, Object]), - default: "button" } }); var buttonEmits = { @@ -26648,22 +26791,22 @@ var buttonEmits = { }; // node_modules/@ctrl/tinycolor/dist/module/util.js -function bound01(n, max4) { +function bound01(n, max5) { if (isOnePointZero(n)) { n = "100%"; } var isPercent = isPercentage(n); - n = max4 === 360 ? n : Math.min(max4, Math.max(0, parseFloat(n))); + n = max5 === 360 ? n : Math.min(max5, Math.max(0, parseFloat(n))); if (isPercent) { - n = parseInt(String(n * max4), 10) / 100; + n = parseInt(String(n * max5), 10) / 100; } - if (Math.abs(n - max4) < 1e-6) { + if (Math.abs(n - max5) < 1e-6) { return 1; } - if (max4 === 360) { - n = (n < 0 ? n % max4 + max4 : n % max4) / parseFloat(String(max4)); + if (max5 === 360) { + n = (n < 0 ? n % max5 + max5 : n % max5) / parseFloat(String(max5)); } else { - n = n % max4 / parseFloat(String(max4)); + n = n % max5 / parseFloat(String(max5)); } return n; } @@ -26705,18 +26848,18 @@ function rgbToHsl(r, g, b2) { r = bound01(r, 255); g = bound01(g, 255); b2 = bound01(b2, 255); - var max4 = Math.max(r, g, b2); - var min4 = Math.min(r, g, b2); + var max5 = Math.max(r, g, b2); + var min5 = Math.min(r, g, b2); var h3 = 0; var s2 = 0; - var l2 = (max4 + min4) / 2; - if (max4 === min4) { + var l2 = (max5 + min5) / 2; + if (max5 === min5) { s2 = 0; h3 = 0; } else { - var d2 = max4 - min4; - s2 = l2 > 0.5 ? d2 / (2 - max4 - min4) : d2 / (max4 + min4); - switch (max4) { + var d2 = max5 - min5; + s2 = l2 > 0.5 ? d2 / (2 - max5 - min5) : d2 / (max5 + min5); + switch (max5) { case r: h3 = (g - b2) / d2 + (g < b2 ? 6 : 0); break; @@ -26775,16 +26918,16 @@ function rgbToHsv(r, g, b2) { r = bound01(r, 255); g = bound01(g, 255); b2 = bound01(b2, 255); - var max4 = Math.max(r, g, b2); - var min4 = Math.min(r, g, b2); + var max5 = Math.max(r, g, b2); + var min5 = Math.min(r, g, b2); var h3 = 0; - var v2 = max4; - var d2 = max4 - min4; - var s2 = max4 === 0 ? 0 : d2 / max4; - if (max4 === min4) { + var v2 = max5; + var d2 = max5 - min5; + var s2 = max5 === 0 ? 0 : d2 / max5; + if (max5 === min5) { h3 = 0; } else { - switch (max4) { + switch (max5) { case r: h3 = (g - b2) / d2 + (g < b2 ? 6 : 0); break; @@ -27600,6 +27743,7 @@ function useButtonCustomStyle(props) { } // node_modules/element-plus/es/components/button/src/button2.mjs +var _hoisted_1300 = ["aria-disabled", "disabled", "autofocus", "type"]; var __default__21 = defineComponent({ name: "ElButton" }); @@ -27611,7 +27755,7 @@ var _sfc_main24 = defineComponent({ const props = __props; const buttonStyle = useButtonCustomStyle(props); const ns = useNamespace("button"); - const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit); + const { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } = useButton(props, emit); expose({ ref: _ref, size: _size, @@ -27620,11 +27764,10 @@ var _sfc_main24 = defineComponent({ shouldAddSpace }); return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({ + return openBlock(), createElementBlock("button", { ref_key: "_ref", - ref: _ref - }, unref(_props), { - class: [ + ref: _ref, + class: normalizeClass([ unref(ns).b(), unref(ns).m(unref(_type)), unref(ns).m(unref(_size)), @@ -27636,36 +27779,37 @@ var _sfc_main24 = defineComponent({ unref(ns).is("text", _ctx.text), unref(ns).is("link", _ctx.link), unref(ns).is("has-bg", _ctx.bg) - ], - style: unref(buttonStyle), - onClick: unref(handleClick) - }), { - default: withCtx(() => [ - _ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ - _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass(unref(ns).is("loading")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon))) - ]), - _: 1 - }, 8, ["class"])) - ], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { + ]), + "aria-disabled": unref(_disabled) || _ctx.loading, + disabled: unref(_disabled) || _ctx.loading, + autofocus: _ctx.autofocus, + type: _ctx.nativeType, + style: normalizeStyle(unref(buttonStyle)), + onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args)) + }, [ + _ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ + _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), { + key: 1, + class: normalizeClass(unref(ns).is("loading")) + }, { default: withCtx(() => [ - _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 }) + (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon))) ]), - _: 3 - })) : createCommentVNode("v-if", true), - _ctx.$slots.default ? (openBlock(), createElementBlock("span", { - key: 2, - class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) }) - }, [ - renderSlot(_ctx.$slots, "default") - ], 2)) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 16, ["class", "style", "onClick"]); + _: 1 + }, 8, ["class"])) + ], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { + default: withCtx(() => [ + _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 }) + ]), + _: 3 + })) : createCommentVNode("v-if", true), + _ctx.$slots.default ? (openBlock(), createElementBlock("span", { + key: 2, + class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) }) + }, [ + renderSlot(_ctx.$slots, "default") + ], 2)) : createCommentVNode("v-if", true) + ], 14, _hoisted_1300); }; } }); @@ -27917,7 +28061,7 @@ var timePickerDefaultProps = buildProps({ }); // node_modules/element-plus/es/components/time-picker/src/common/picker.mjs -var _hoisted_1300 = ["id", "name", "placeholder", "value", "disabled", "readonly"]; +var _hoisted_1301 = ["id", "name", "placeholder", "value", "disabled", "readonly"]; var _hoisted_2297 = ["id", "name", "placeholder", "value", "disabled", "readonly"]; var __default__23 = defineComponent({ name: "Picker" @@ -27937,7 +28081,6 @@ var _sfc_main26 = defineComponent({ ], setup(__props, { expose, emit }) { const props = __props; - const attrs = useAttrs(); const { lang } = useLocale(); const nsDate = useNamespace("date"); const nsInput = useNamespace("input"); @@ -27951,21 +28094,6 @@ var _sfc_main26 = defineComponent({ const valueOnOpen = ref(null); let hasJustTabExitedInput = false; let ignoreFocusEvent = false; - const rangeInputKls = computed2(() => [ - nsDate.b("editor"), - nsDate.bm("editor", props.type), - nsInput.e("wrapper"), - nsDate.is("disabled", pickerDisabled.value), - nsDate.is("active", pickerVisible.value), - nsRange.b("editor"), - pickerSize ? nsRange.bm("editor", pickerSize.value) : "", - attrs.class - ]); - const clearIconKls = computed2(() => [ - nsInput.e("icon"), - nsRange.e("close-icon"), - !showClose.value ? nsRange.e("close-icon--hidden") : "" - ]); watch(pickerVisible, (val) => { if (!val) { userInput.value = null; @@ -28458,7 +28586,16 @@ var _sfc_main26 = defineComponent({ key: 1, ref_key: "inputRef", ref: inputRef, - class: normalizeClass(unref(rangeInputKls)), + class: normalizeClass([ + unref(nsDate).b("editor"), + unref(nsDate).bm("editor", _ctx.type), + unref(nsInput).e("wrapper"), + unref(nsDate).is("disabled", unref(pickerDisabled)), + unref(nsDate).is("active", pickerVisible.value), + unref(nsRange).b("editor"), + unref(pickerSize) ? unref(nsRange).bm("editor", unref(pickerSize)) : "", + _ctx.$attrs.class + ]), style: normalizeStyle(_ctx.$attrs.style), onClick: handleFocusInput, onMouseenter: onMouseEnter, @@ -28491,7 +28628,7 @@ var _sfc_main26 = defineComponent({ onChange: handleStartChange, onFocus: handleFocusInput, onBlur: handleBlurInput - }, null, 42, _hoisted_1300), + }, null, 42, _hoisted_1301), renderSlot(_ctx.$slots, "range-separator", {}, () => [ createBaseVNode("span", { class: normalizeClass(unref(nsRange).b("separator")) @@ -28514,7 +28651,13 @@ var _sfc_main26 = defineComponent({ }, null, 42, _hoisted_2297), _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 1, - class: normalizeClass(unref(clearIconKls)), + class: normalizeClass([ + unref(nsInput).e("icon"), + unref(nsRange).e("close-icon"), + { + [unref(nsRange).e("close-icon--hidden")]: !showClose.value + } + ]), onClick: onClearIconClick }, { default: withCtx(() => [ @@ -28960,7 +29103,7 @@ var basicTimeSpinnerProps = buildProps({ }); // node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs -var _hoisted_1301 = ["onClick"]; +var _hoisted_1302 = ["onClick"]; var _hoisted_2298 = ["onMouseenter"]; var _sfc_main27 = defineComponent({ __name: "basic-time-spinner", @@ -29056,11 +29199,7 @@ var _sfc_main27 = defineComponent({ }; const typeItemHeight = (type4) => { const scrollbar = unref(listRefsMap[type4]); - const listItem = scrollbar == null ? void 0 : scrollbar.$el.querySelector("li"); - if (listItem) { - return Number.parseFloat(getStyle(listItem, "height")) || 0; - } - return 0; + return (scrollbar == null ? void 0 : scrollbar.$el.querySelector("li").offsetHeight) || 0; }; const onIncrement = () => { scrollDown(1); @@ -29188,7 +29327,7 @@ var _sfc_main27 = defineComponent({ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ createTextVNode(toDisplayString(("0" + key).slice(-2)), 1) ], 64)) - ], 10, _hoisted_1301); + ], 10, _hoisted_1302); }), 128)) ]), _: 2 @@ -29417,7 +29556,7 @@ var panelTimeRangeProps = buildProps({ }); // node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs -var _hoisted_1302 = ["disabled"]; +var _hoisted_1303 = ["disabled"]; var _sfc_main29 = defineComponent({ __name: "panel-time-range", props: panelTimeRangeProps, @@ -29442,18 +29581,6 @@ var _sfc_main29 = defineComponent({ disabledSeconds, defaultValue } = pickerBase.props; - const startContainerKls = computed2(() => [ - nsTime.be("range-picker", "body"), - nsTime.be("panel", "content"), - nsTime.is("arrow", arrowControl), - showSeconds.value ? "has-seconds" : "" - ]); - const endContainerKls = computed2(() => [ - nsTime.be("range-picker", "body"), - nsTime.be("panel", "content"), - nsTime.is("arrow", arrowControl), - showSeconds.value ? "has-seconds" : "" - ]); const startTime = computed2(() => props.parsedValue[0]); const endTime = computed2(() => props.parsedValue[1]); const oldValue = useOldValue(props); @@ -29623,7 +29750,12 @@ var _sfc_main29 = defineComponent({ class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.startTime")), 3), createBaseVNode("div", { - class: normalizeClass(unref(startContainerKls)) + class: normalizeClass([ + unref(nsTime).be("range-picker", "body"), + unref(nsTime).be("panel", "content"), + unref(nsTime).is("arrow", unref(arrowControl)), + { "has-seconds": unref(showSeconds) } + ]) }, [ createVNode(TimeSpinner, { ref: "minSpinner", @@ -29648,7 +29780,12 @@ var _sfc_main29 = defineComponent({ class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.endTime")), 3), createBaseVNode("div", { - class: normalizeClass(unref(endContainerKls)) + class: normalizeClass([ + unref(nsTime).be("range-picker", "body"), + unref(nsTime).be("panel", "content"), + unref(nsTime).is("arrow", unref(arrowControl)), + { "has-seconds": unref(showSeconds) } + ]) }, [ createVNode(TimeSpinner, { ref: "maxSpinner", @@ -29680,7 +29817,7 @@ var _sfc_main29 = defineComponent({ class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]), disabled: unref(btnConfirmDisabled), onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm()) - }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_1302) + }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_1303) ], 2) ], 2)) : createCommentVNode("v-if", true); }; @@ -29865,7 +30002,7 @@ var useDateTable = (props, emit) => { }; // node_modules/element-plus/es/components/calendar/src/date-table2.mjs -var _hoisted_1303 = { key: 0 }; +var _hoisted_1304 = { key: 0 }; var _hoisted_2299 = ["onClick"]; var __default__24 = defineComponent({ name: "DateTable" @@ -29909,7 +30046,7 @@ var _sfc_main30 = defineComponent({ cellspacing: "0", cellpadding: "0" }, [ - !_ctx.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_1303, [ + !_ctx.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_1304, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => { return openBlock(), createElementBlock("th", { key: day }, toDisplayString(day), 1); }), 128)) @@ -30228,7 +30365,6 @@ var cardProps = buildProps({ type: definePropType([String, Object, Array]), default: "" }, - bodyClass: String, shadow: { type: String, values: ["always", "hover", "never"], @@ -30258,7 +30394,7 @@ var _sfc_main32 = defineComponent({ ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { - class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]), + class: normalizeClass(unref(ns).e("body")), style: normalizeStyle(_ctx.bodyStyle) }, [ renderSlot(_ctx.$slots, "default") @@ -30325,7 +30461,7 @@ var carouselProps = buildProps({ } }); var carouselEmits = { - change: (current, prev) => [current, prev].every(isNumber3) + change: (current, prev) => [current, prev].every(isNumber) }; // node_modules/element-plus/es/components/carousel/src/constants.mjs @@ -30343,24 +30479,12 @@ var useCarousel = (props, emit, componentName2) => { const timer = ref(null); const hover = ref(false); const root2 = ref(); - const containerHeight = ref(0); const arrowDisplay = computed2(() => props.arrow !== "never" && !unref(isVertical)); const hasLabel = computed2(() => { return items.value.some((item) => item.props.label.toString().length > 0); }); const isCardType = computed2(() => props.type === "card"); const isVertical = computed2(() => props.direction === "vertical"); - const containerStyle = computed2(() => { - if (props.height !== "auto") { - return { - height: props.height - }; - } - return { - height: `${containerHeight.value}px`, - overflow: "hidden" - }; - }); const throttledArrowClick = throttle_default((index) => { setActiveItem(index); }, THROTTLE_TIME, { trailing: true }); @@ -30480,11 +30604,6 @@ var useCarousel = (props, emit, componentName2) => { pauseTimer(); startTimer(); } - function setContainerHeight(height) { - if (props.height !== "auto") - return; - containerHeight.value = height; - } watch(() => activeIndex.value, (current, prev2) => { resetItemPosition(prev2); if (prev2 > -1) { @@ -30524,8 +30643,7 @@ var useCarousel = (props, emit, componentName2) => { loop: props.loop, addItem, removeItem, - setActiveItem, - setContainerHeight + setActiveItem }); return { root: root2, @@ -30535,8 +30653,6 @@ var useCarousel = (props, emit, componentName2) => { hover, isCardType, items, - isVertical, - containerStyle, handleButtonEnter, handleButtonLeave, handleIndicatorClick, @@ -30551,7 +30667,7 @@ var useCarousel = (props, emit, componentName2) => { }; // node_modules/element-plus/es/components/carousel/src/carousel2.mjs -var _hoisted_1304 = ["onMouseenter", "onClick"]; +var _hoisted_1305 = ["onMouseenter", "onClick"]; var _hoisted_2300 = { key: 0 }; var COMPONENT_NAME9 = "ElCarousel"; var __default__27 = defineComponent({ @@ -30571,8 +30687,6 @@ var _sfc_main33 = defineComponent({ hover, isCardType, items, - isVertical, - containerStyle, handleButtonEnter, handleButtonLeave, handleIndicatorClick, @@ -30597,12 +30711,9 @@ var _sfc_main33 = defineComponent({ if (unref(hasLabel)) { classes.push(ns.em("indicators", "labels")); } - if (props.indicatorPosition === "outside") { + if (props.indicatorPosition === "outside" || unref(isCardType)) { classes.push(ns.em("indicators", "outside")); } - if (unref(isVertical)) { - classes.push(ns.em("indicators", "right")); - } return classes; }); expose({ @@ -30620,7 +30731,7 @@ var _sfc_main33 = defineComponent({ }, [ createBaseVNode("div", { class: normalizeClass(unref(ns).e("container")), - style: normalizeStyle(unref(containerStyle)) + style: normalizeStyle({ height: _ctx.height }) }, [ unref(arrowDisplay) ? (openBlock(), createBlock(Transition, { key: 0, @@ -30700,7 +30811,7 @@ var _sfc_main33 = defineComponent({ }, [ unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_2300, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true) ], 2) - ], 42, _hoisted_1304); + ], 42, _hoisted_1305); }), 128)) ], 2)) : createCommentVNode("v-if", true) ], 34); @@ -30729,7 +30840,6 @@ var useCarouselItem = (props, componentName2) => { debugWarn(componentName2, "compositional hook can only be invoked inside setups"); } const CARD_SCALE = 0.83; - const carouselItemRef = ref(); const hover = ref(false); const translate2 = ref(0); const scale = ref(1); @@ -30755,8 +30865,8 @@ var useCarouselItem = (props, componentName2) => { return index; } function calcCardTranslate(index, activeIndex) { - var _a2, _b; - const parentWidth = unref(isVertical) ? ((_a2 = carouselContext.root.value) == null ? void 0 : _a2.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0; + var _a2; + const parentWidth = ((_a2 = carouselContext.root.value) == null ? void 0 : _a2.offsetWidth) || 0; if (inStage.value) { return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4; } else if (index < activeIndex) { @@ -30786,6 +30896,9 @@ var useCarouselItem = (props, componentName2) => { const _isVertical = unref(isVertical); active.value = isActive; if (_isCardType) { + if (_isVertical) { + debugWarn("Carousel", "vertical direction is not supported for card mode"); + } inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1; translate2.value = calcCardTranslate(index, activeIndex); scale.value = unref(active) ? 1 : CARD_SCALE; @@ -30793,9 +30906,6 @@ var useCarouselItem = (props, componentName2) => { translate2.value = calcTranslate(index, activeIndex, _isVertical); } ready.value = true; - if (isActive && carouselItemRef.value) { - carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight); - } }; function handleItemClick() { if (carouselContext && unref(isCardType)) { @@ -30823,7 +30933,6 @@ var useCarouselItem = (props, componentName2) => { carouselContext.removeItem(instance.uid); }); return { - carouselItemRef, active, animating, hover, @@ -30849,7 +30958,6 @@ var _sfc_main34 = defineComponent({ const props = __props; const ns = useNamespace("carousel"); const { - carouselItemRef, active, animating, hover, @@ -30872,18 +30980,13 @@ var _sfc_main34 = defineComponent({ }); return (_ctx, _cache) => { return withDirectives((openBlock(), createElementBlock("div", { - ref_key: "carouselItemRef", - ref: carouselItemRef, class: normalizeClass([ unref(ns).e("item"), unref(ns).is("active", unref(active)), unref(ns).is("in-stage", unref(inStage)), unref(ns).is("hover", unref(hover)), unref(ns).is("animating", unref(animating)), - { - [unref(ns).em("item", "card")]: unref(isCardType), - [unref(ns).em("item", "card-vertical")]: unref(isCardType) && unref(isVertical) - } + { [unref(ns).em("item", "card")]: unref(isCardType) } ]), style: normalizeStyle(unref(itemStyle)), onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args)) @@ -30950,8 +31053,8 @@ var checkboxProps = { } }; var checkboxEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber3(val) || isBoolean2(val), - change: (val) => isString(val) || isNumber3(val) || isBoolean2(val) + [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val), + change: (val) => isString(val) || isNumber(val) || isBoolean(val) }; // node_modules/element-plus/es/components/checkbox/src/constants.mjs @@ -30965,9 +31068,9 @@ var useCheckboxDisabled = ({ const checkboxGroup = inject(checkboxGroupContextKey, void 0); const isLimitDisabled = computed2(() => { var _a2, _b; - const max4 = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value; - const min4 = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value; - return !isUndefined2(max4) && model.value.length >= max4 && !isChecked.value || !isUndefined2(min4) && model.value.length <= min4 && isChecked.value; + const max5 = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value; + const min5 = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value; + return !isUndefined2(max5) && model.value.length >= max5 && !isChecked.value || !isUndefined2(min5) && model.value.length <= min5 && isChecked.value; }); const isDisabled = useFormDisabled(computed2(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value)); return { @@ -31061,7 +31164,7 @@ var useCheckboxStatus = (props, slots, { model }) => { const isFocused = ref(false); const isChecked = computed2(() => { const value = model.value; - if (isBoolean2(value)) { + if (isBoolean(value)) { return value; } else if (isArray(value)) { if (isObject(props.label)) { @@ -31148,7 +31251,7 @@ var useCheckbox = (props, slots) => { }; // node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs -var _hoisted_1305 = ["tabindex", "role", "aria-checked"]; +var _hoisted_1306 = ["tabindex", "role", "aria-checked"]; var _hoisted_2301 = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"]; var _hoisted_3295 = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"]; var __default__29 = defineComponent({ @@ -31219,15 +31322,13 @@ var _sfc_main35 = defineComponent({ "false-value": _ctx.falseLabel, onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)), onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true), - onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false), - onClick: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) + onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false) }, null, 42, _hoisted_2301)), [ [vModelCheckbox, unref(model)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, id: unref(inputId), - "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(model) ? model.value = $event : null), + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(model) ? model.value = $event : null), class: normalizeClass(unref(ns).e("original")), type: "checkbox", "aria-hidden": _ctx.indeterminate ? "true" : "false", @@ -31235,18 +31336,16 @@ var _sfc_main35 = defineComponent({ value: _ctx.label, name: _ctx.name, tabindex: _ctx.tabindex, - onChange: _cache[6] || (_cache[6] = (...args) => unref(handleChange) && unref(handleChange)(...args)), - onFocus: _cache[7] || (_cache[7] = ($event) => isFocused.value = true), - onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false), - onClick: _cache[9] || (_cache[9] = withModifiers(() => { - }, ["stop"])) + onChange: _cache[5] || (_cache[5] = (...args) => unref(handleChange) && unref(handleChange)(...args)), + onFocus: _cache[6] || (_cache[6] = ($event) => isFocused.value = true), + onBlur: _cache[7] || (_cache[7] = ($event) => isFocused.value = false) }, null, 42, _hoisted_3295)), [ [vModelCheckbox, unref(model)] ]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2) - ], 10, _hoisted_1305), + ], 10, _hoisted_1306), unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(ns).e("label")) @@ -31265,7 +31364,7 @@ var _sfc_main35 = defineComponent({ var Checkbox = _export_sfc(_sfc_main35, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]); // node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs -var _hoisted_1306 = ["name", "tabindex", "disabled", "true-value", "false-value"]; +var _hoisted_1307 = ["name", "tabindex", "disabled", "true-value", "false-value"]; var _hoisted_2302 = ["name", "tabindex", "disabled", "value"]; var __default__30 = defineComponent({ name: "ElCheckboxButton" @@ -31322,25 +31421,21 @@ var _sfc_main36 = defineComponent({ "false-value": _ctx.falseLabel, onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)), onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true), - onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false), - onClick: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_1306)), [ + onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false) + }, null, 42, _hoisted_1307)), [ [vModelCheckbox, unref(model)] ]) : withDirectives((openBlock(), createElementBlock("input", { key: 1, - "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(model) ? model.value = $event : null), + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(model) ? model.value = $event : null), class: normalizeClass(unref(ns).be("button", "original")), type: "checkbox", name: _ctx.name, tabindex: _ctx.tabindex, disabled: unref(isDisabled), value: _ctx.label, - onChange: _cache[6] || (_cache[6] = (...args) => unref(handleChange) && unref(handleChange)(...args)), - onFocus: _cache[7] || (_cache[7] = ($event) => isFocused.value = true), - onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false), - onClick: _cache[9] || (_cache[9] = withModifiers(() => { - }, ["stop"])) + onChange: _cache[5] || (_cache[5] = (...args) => unref(handleChange) && unref(handleChange)(...args)), + onFocus: _cache[6] || (_cache[6] = ($event) => isFocused.value = true), + onBlur: _cache[7] || (_cache[7] = ($event) => isFocused.value = false) }, null, 42, _hoisted_2302)), [ [vModelCheckbox, unref(model)] ]), @@ -31481,8 +31576,8 @@ var radioProps = buildProps({ border: Boolean }); var radioEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber3(val) || isBoolean2(val), - [CHANGE_EVENT]: (val) => isString(val) || isNumber3(val) || isBoolean2(val) + [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val), + [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val) }; // node_modules/element-plus/es/components/radio/src/constants.mjs @@ -31525,7 +31620,7 @@ var useRadio = (props, emit) => { }; // node_modules/element-plus/es/components/radio/src/radio2.mjs -var _hoisted_1307 = ["value", "name", "disabled"]; +var _hoisted_1308 = ["value", "name", "disabled"]; var __default__32 = defineComponent({ name: "ElRadio" }); @@ -31570,10 +31665,8 @@ var _sfc_main38 = defineComponent({ type: "radio", onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true), onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false), - onChange: handleChange, - onClick: _cache[3] || (_cache[3] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_1307), [ + onChange: handleChange + }, null, 42, _hoisted_1308), [ [vModelRadio, unref(modelValue)] ]), createBaseVNode("span", { @@ -31582,7 +31675,7 @@ var _sfc_main38 = defineComponent({ ], 2), createBaseVNode("span", { class: normalizeClass(unref(ns).e("label")), - onKeydown: _cache[4] || (_cache[4] = withModifiers(() => { + onKeydown: _cache[3] || (_cache[3] = withModifiers(() => { }, ["stop"])) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ @@ -31605,7 +31698,7 @@ var radioButtonProps = buildProps({ }); // node_modules/element-plus/es/components/radio/src/radio-button2.mjs -var _hoisted_1308 = ["value", "name", "disabled"]; +var _hoisted_1309 = ["value", "name", "disabled"]; var __default__33 = defineComponent({ name: "ElRadioButton" }); @@ -31645,16 +31738,14 @@ var _sfc_main39 = defineComponent({ name: _ctx.name || ((_a2 = unref(radioGroup)) == null ? void 0 : _a2.name), disabled: unref(disabled), onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true), - onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false), - onClick: _cache[3] || (_cache[3] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_1308), [ + onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false) + }, null, 42, _hoisted_1309), [ [vModelRadio, unref(modelValue)] ]), createBaseVNode("span", { class: normalizeClass(unref(ns).be("button", "inner")), style: normalizeStyle(unref(modelValue) === _ctx.label ? unref(activeStyle) : {}), - onKeydown: _cache[4] || (_cache[4] = withModifiers(() => { + onKeydown: _cache[3] || (_cache[3] = withModifiers(() => { }, ["stop"])) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ @@ -31703,7 +31794,7 @@ var radioGroupProps = buildProps({ var radioGroupEmits = radioEmits; // node_modules/element-plus/es/components/radio/src/radio-group2.mjs -var _hoisted_1309 = ["id", "aria-label", "aria-labelledby"]; +var _hoisted_1310 = ["id", "aria-label", "aria-labelledby"]; var __default__34 = defineComponent({ name: "ElRadioGroup" }); @@ -31755,7 +31846,7 @@ var _sfc_main40 = defineComponent({ "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0 }, [ renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_1309); + ], 10, _hoisted_1310); }; } }); @@ -31906,7 +31997,7 @@ var _sfc_main41 = defineComponent({ }; } }); -var _hoisted_1310 = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"]; +var _hoisted_1311 = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"]; var _hoisted_2303 = createBaseVNode("span", null, null, -1); function _sfc_render295(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_checkbox = resolveComponent("el-checkbox"); @@ -31989,7 +32080,7 @@ function _sfc_render295(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["class"])) ], 64)) : createCommentVNode("v-if", true) - ], 42, _hoisted_1310); + ], 42, _hoisted_1311); } var ElCascaderNode = _export_sfc(_sfc_main41, [["render", _sfc_render295], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]); @@ -32138,7 +32229,7 @@ var calculatePathNodes = (node) => { } return nodes; }; -var Node2 = class _Node { +var Node = class { constructor(data, config, parent2, root2 = false) { this.data = data; this.config = config; @@ -32158,7 +32249,7 @@ var Node2 = class _Node { this.pathValues = pathNodes.map((node) => node.value); this.pathLabels = pathNodes.map((node) => node.label); this.childrenData = childrenData; - this.children = (childrenData || []).map((child) => new _Node(child, config, this)); + this.children = (childrenData || []).map((child) => new Node(child, config, this)); this.loaded = !config.lazy || this.isLeaf || !isEmpty2(childrenData); } get isDisabled() { @@ -32178,7 +32269,7 @@ var Node2 = class _Node { } appendChild(childData) { const { childrenData, children } = this; - const node = new _Node(childData, this.config, this); + const node = new Node(childData, this.config, this); if (Array.isArray(childrenData)) { childrenData.push(childData); } else { @@ -32258,7 +32349,7 @@ var flatNodes = (nodes, leafOnly) => { var Store = class { constructor(data, config) { this.config = config; - const nodes = (data || []).map((nodeData) => new Node2(nodeData, this.config)); + const nodes = (data || []).map((nodeData) => new Node(nodeData, this.config)); this.nodes = nodes; this.allNodes = flatNodes(nodes, false); this.leafNodes = flatNodes(nodes, true); @@ -32270,7 +32361,7 @@ var Store = class { return leafOnly ? this.leafNodes : this.allNodes; } appendNode(nodeData, parentNode) { - const node = parentNode ? parentNode.appendChild(nodeData) : new Node2(nodeData, this.config); + const node = parentNode ? parentNode.appendChild(nodeData) : new Node(nodeData, this.config); if (!parentNode) this.nodes.push(node); this.allNodes.push(node); @@ -32411,7 +32502,7 @@ var _sfc_main43 = defineComponent({ }; const lazyLoad = (node, cb) => { const cfg = config.value; - node = node || new Node2({}, cfg, void 0, true); + node = node || new Node({}, cfg, void 0, true); node.loading = true; const resolve = (dataList) => { const _node = node; @@ -32517,11 +32608,7 @@ var _sfc_main43 = defineComponent({ expandingNode.value = null; } oldNodes.forEach((node) => node.doCheck(false)); - if (props.props.multiple) { - reactive(newNodes).forEach((node) => node.doCheck(true)); - } else { - newNodes.forEach((node) => node.doCheck(true)); - } + newNodes.forEach((node) => node.doCheck(true)); checkedNodes.value = newNodes; nextTick(scrollToExpandingNode); }; @@ -32639,14 +32726,14 @@ var ElCascaderPanel = _CascaderPanel; // node_modules/element-plus/es/components/tag/src/tag.mjs var tagProps = buildProps({ + closable: Boolean, type: { type: String, values: ["success", "info", "warning", "danger", ""], default: "" }, - closable: Boolean, - disableTransitions: Boolean, hit: Boolean, + disableTransitions: Boolean, color: { type: String, default: "" @@ -32680,7 +32767,7 @@ var _sfc_main44 = defineComponent({ const props = __props; const tagSize = useFormSize(); const ns = useNamespace("tag"); - const containerKls = computed2(() => { + const classes = computed2(() => { const { type: type4, hit, effect, closable, round: round3 } = props; return [ ns.b(), @@ -32701,7 +32788,7 @@ var _sfc_main44 = defineComponent({ return (_ctx, _cache) => { return _ctx.disableTransitions ? (openBlock(), createElementBlock("span", { key: 0, - class: normalizeClass(unref(containerKls)), + class: normalizeClass(unref(classes)), style: normalizeStyle({ backgroundColor: _ctx.color }), onClick: handleClick }, [ @@ -32727,7 +32814,7 @@ var _sfc_main44 = defineComponent({ }, { default: withCtx(() => [ createBaseVNode("span", { - class: normalizeClass(unref(containerKls)), + class: normalizeClass(unref(classes)), style: normalizeStyle({ backgroundColor: _ctx.color }), onClick: handleClick }, [ @@ -32779,10 +32866,6 @@ var cascaderProps = buildProps({ default: true }, collapseTags: Boolean, - maxCollapseTags: { - type: Number, - default: 1 - }, collapseTagsTooltip: { type: Boolean, default: false @@ -32811,13 +32894,13 @@ var cascaderEmits = { [CHANGE_EVENT]: (val) => !!val || val === null, focus: (evt) => evt instanceof FocusEvent, blur: (evt) => evt instanceof FocusEvent, - visibleChange: (val) => isBoolean2(val), + visibleChange: (val) => isBoolean(val), expandChange: (val) => !!val, removeTag: (val) => !!val }; // node_modules/element-plus/es/components/cascader/src/cascader2.mjs -var _hoisted_1311 = { key: 0 }; +var _hoisted_1312 = { key: 0 }; var _hoisted_2304 = ["placeholder", "onKeydown"]; var _hoisted_3296 = ["onClick"]; var COMPONENT_NAME11 = "ElCascader"; @@ -32980,9 +33063,9 @@ var _sfc_main45 = defineComponent({ nodes.forEach((node) => allTags.push(genTag3(node))); allPresentTags.value = allTags; if (nodes.length) { - nodes.slice(0, props.maxCollapseTags).forEach((node) => tags.push(genTag3(node))); - const rest2 = nodes.slice(props.maxCollapseTags); + const [first, ...rest2] = nodes; const restCount = rest2.length; + tags.push(genTag3(first)); if (restCount) { if (props.collapseTags) { tags.push({ @@ -33175,22 +33258,15 @@ var _sfc_main45 = defineComponent({ return; val ? handleFilter() : hideSuggestionPanel(); }; - const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2; watch(filtering, updatePopperPosition); watch([checkedNodes, isDisabled], calculatePresentTags); watch(presentTags, () => { nextTick(() => updateStyle()); }); - watch(realSize, async () => { - await nextTick(); - const inputInner = input.value.input; - inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight; - updateStyle(); - }); watch(presentText, syncPresentTextValue, { immediate: true }); onMounted(() => { const inputInner = input.value.input; - const inputInnerHeight = getInputInnerHeight(inputInner); + const inputInnerHeight = Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2; inputInitialHeight = inputInner.offsetHeight || inputInnerHeight; useResizeObserver(inputInner, updateStyle); }); @@ -33293,7 +33369,7 @@ var _sfc_main45 = defineComponent({ onClose: ($event) => deleteTag(tag) }, { default: withCtx(() => [ - tag.isCollapseTag === false ? (openBlock(), createElementBlock("span", _hoisted_1311, toDisplayString(tag.text), 1)) : (openBlock(), createBlock(unref(ElTooltip), { + tag.isCollapseTag === false ? (openBlock(), createElementBlock("span", _hoisted_1312, toDisplayString(tag.text), 1)) : (openBlock(), createBlock(unref(ElTooltip), { key: 1, disabled: popperVisible.value || !_ctx.collapseTagsTooltip, "fallback-placements": ["bottom", "top", "right", "left"], @@ -33307,7 +33383,7 @@ var _sfc_main45 = defineComponent({ createBaseVNode("div", { class: normalizeClass(unref(nsCascader).e("collapse-tags")) }, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(allPresentTags.value.slice(_ctx.maxCollapseTags), (tag2, idx) => { + (openBlock(true), createElementBlock(Fragment, null, renderList(allPresentTags.value.slice(1), (tag2, idx) => { return openBlock(), createElementBlock("div", { key: idx, class: normalizeClass(unref(nsCascader).e("collapse-tag")) @@ -33435,8 +33511,8 @@ var checkTagProps = buildProps({ } }); var checkTagEmits = { - "update:checked": (value) => isBoolean2(value), - [CHANGE_EVENT]: (value) => isBoolean2(value) + "update:checked": (value) => isBoolean(value), + [CHANGE_EVENT]: (value) => isBoolean(value) }; // node_modules/element-plus/es/components/check-tag/src/check-tag2.mjs @@ -33450,7 +33526,6 @@ var _sfc_main46 = defineComponent({ setup(__props, { emit }) { const props = __props; const ns = useNamespace("check-tag"); - const containerKls = computed2(() => [ns.b(), ns.is("checked", props.checked)]); const handleChange = () => { const checked = !props.checked; emit(CHANGE_EVENT, checked); @@ -33458,7 +33533,7 @@ var _sfc_main46 = defineComponent({ }; return (_ctx, _cache) => { return openBlock(), createElementBlock("span", { - class: normalizeClass(unref(containerKls)), + class: normalizeClass([unref(ns).b(), unref(ns).is("checked", _ctx.checked)]), onClick: handleChange }, [ renderSlot(_ctx.$slots, "default") @@ -33500,7 +33575,8 @@ var rowProps = buildProps({ }, align: { type: String, - values: RowAlign + values: RowAlign, + default: "top" } }); @@ -33529,7 +33605,7 @@ var _sfc_main47 = defineComponent({ const rowKls = computed2(() => [ ns.b(), ns.is(`justify-${props.justify}`, props.justify !== "start"), - ns.is(`align-${props.align}`, !!props.align) + ns.is(`align-${props.align}`, props.align !== "top") ]); return (_ctx, _cache) => { return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { @@ -33616,7 +33692,7 @@ var _sfc_main48 = defineComponent({ const pos = ["span", "offset", "pull", "push"]; pos.forEach((prop) => { const size3 = props[prop]; - if (isNumber3(size3)) { + if (isNumber(size3)) { if (prop === "span") classes.push(ns.b(`${props[prop]}`)); else if (size3 > 0) @@ -33625,7 +33701,7 @@ var _sfc_main48 = defineComponent({ }); const sizes = ["xs", "sm", "md", "lg", "xl"]; sizes.forEach((size3) => { - if (isNumber3(props[size3])) { + if (isNumber(props[size3])) { classes.push(ns.b(`${size3}-${props[size3]}`)); } else if (isObject(props[size3])) { Object.entries(props[size3]).forEach(([prop, sizeProp]) => { @@ -33657,7 +33733,7 @@ var Col = _export_sfc(_sfc_main48, [["__file", "/home/runner/work/element-plus/e var ElCol = withInstall(Col); // node_modules/element-plus/es/components/collapse/src/collapse.mjs -var emitChangeFn = (value) => typeof isNumber3(value); +var emitChangeFn = (value) => typeof isNumber(value); var collapseProps = buildProps({ accordion: Boolean, modelValue: { @@ -33732,7 +33808,9 @@ var _sfc_main49 = defineComponent({ }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { - class: normalizeClass(unref(rootKls)) + class: normalizeClass(unref(rootKls)), + role: "tablist", + "aria-multiselectable": "true" }, [ renderSlot(_ctx.$slots, "default") ], 2); @@ -33749,12 +33827,6 @@ var _sfc_main50 = defineComponent({ ...__default__41, setup(__props) { const ns = useNamespace("collapse-transition"); - const reset = (el) => { - el.style.maxHeight = ""; - el.style.overflow = el.dataset.oldOverflow; - el.style.paddingTop = el.dataset.oldPaddingTop; - el.style.paddingBottom = el.dataset.oldPaddingBottom; - }; const on2 = { beforeEnter(el) { if (!el.dataset) @@ -33769,20 +33841,19 @@ var _sfc_main50 = defineComponent({ el.dataset.oldOverflow = el.style.overflow; if (el.scrollHeight !== 0) { el.style.maxHeight = `${el.scrollHeight}px`; + el.style.paddingTop = el.dataset.oldPaddingTop; + el.style.paddingBottom = el.dataset.oldPaddingBottom; } else { el.style.maxHeight = 0; + el.style.paddingTop = el.dataset.oldPaddingTop; + el.style.paddingBottom = el.dataset.oldPaddingBottom; } - el.style.paddingTop = el.dataset.oldPaddingTop; - el.style.paddingBottom = el.dataset.oldPaddingBottom; el.style.overflow = "hidden"; }, afterEnter(el) { el.style.maxHeight = ""; el.style.overflow = el.dataset.oldOverflow; }, - enterCancelled(el) { - reset(el); - }, beforeLeave(el) { if (!el.dataset) el.dataset = {}; @@ -33800,10 +33871,10 @@ var _sfc_main50 = defineComponent({ } }, afterLeave(el) { - reset(el); - }, - leaveCancelled(el) { - reset(el); + el.style.maxHeight = ""; + el.style.overflow = el.dataset.oldOverflow; + el.style.paddingTop = el.dataset.oldPaddingTop; + el.style.paddingBottom = el.dataset.oldPaddingBottom; } }; return (_ctx, _cache) => { @@ -33907,8 +33978,9 @@ var useCollapseItemDOM = (props, { focusing, isActive, id }) => { }; // node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs -var _hoisted_1312 = ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex"]; -var _hoisted_2305 = ["id", "aria-hidden", "aria-labelledby"]; +var _hoisted_1313 = ["aria-expanded", "aria-controls", "aria-describedby"]; +var _hoisted_2305 = ["id", "tabindex"]; +var _hoisted_3297 = ["id", "aria-hidden", "aria-labelledby"]; var __default__42 = defineComponent({ name: "ElCollapseItem" }); @@ -33941,36 +34013,41 @@ var _sfc_main51 = defineComponent({ return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [ - createBaseVNode("button", { - id: unref(scopedHeadId), - class: normalizeClass(unref(headKls)), + createBaseVNode("div", { + role: "tab", "aria-expanded": unref(isActive), "aria-controls": unref(scopedContentId), - "aria-describedby": unref(scopedContentId), - tabindex: _ctx.disabled ? -1 : 0, - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)), - onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])), - onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false) + "aria-describedby": unref(scopedContentId) }, [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode(toDisplayString(_ctx.title), 1) - ]), - createVNode(unref(ElIcon), { - class: normalizeClass(unref(arrowKls)) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) + createBaseVNode("div", { + id: unref(scopedHeadId), + class: normalizeClass(unref(headKls)), + role: "button", + tabindex: _ctx.disabled ? -1 : 0, + onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)), + onKeypress: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])), + onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), + onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false) + }, [ + renderSlot(_ctx.$slots, "title", {}, () => [ + createTextVNode(toDisplayString(_ctx.title), 1) ]), - _: 1 - }, 8, ["class"]) - ], 42, _hoisted_1312), + createVNode(unref(ElIcon), { + class: normalizeClass(unref(arrowKls)) + }, { + default: withCtx(() => [ + createVNode(unref(arrow_right_default)) + ]), + _: 1 + }, 8, ["class"]) + ], 42, _hoisted_2305) + ], 8, _hoisted_1313), createVNode(unref(_CollapseTransition), null, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { id: unref(scopedContentId), - role: "region", class: normalizeClass(unref(itemWrapperKls)), + role: "tabpanel", "aria-hidden": !unref(isActive), "aria-labelledby": unref(scopedHeadId) }, [ @@ -33979,7 +34056,7 @@ var _sfc_main51 = defineComponent({ }, [ renderSlot(_ctx.$slots, "default") ], 2) - ], 10, _hoisted_2305), [ + ], 10, _hoisted_3297), [ [vShow, unref(isActive)] ]) ]), @@ -34371,18 +34448,18 @@ var isOnePointZero2 = function(n) { var isPercentage2 = function(n) { return typeof n === "string" && n.includes("%"); }; -var bound012 = function(value, max4) { +var bound012 = function(value, max5) { if (isOnePointZero2(value)) value = "100%"; const processPercent = isPercentage2(value); - value = Math.min(max4, Math.max(0, Number.parseFloat(`${value}`))); + value = Math.min(max5, Math.max(0, Number.parseFloat(`${value}`))); if (processPercent) { - value = Number.parseInt(`${value * max4}`, 10) / 100; + value = Number.parseInt(`${value * max5}`, 10) / 100; } - if (Math.abs(value - max4) < 1e-6) { + if (Math.abs(value - max5) < 1e-6) { return 1; } - return value % max4 / Number.parseFloat(max4); + return value % max5 / Number.parseFloat(max5); }; var INT_HEX_MAP = { 10: "A", @@ -34437,16 +34514,16 @@ var rgb2hsv = (r, g, b2) => { r = bound012(r, 255); g = bound012(g, 255); b2 = bound012(b2, 255); - const max4 = Math.max(r, g, b2); - const min4 = Math.min(r, g, b2); + const max5 = Math.max(r, g, b2); + const min5 = Math.min(r, g, b2); let h3; - const v2 = max4; - const d2 = max4 - min4; - const s2 = max4 === 0 ? 0 : d2 / max4; - if (max4 === min4) { + const v2 = max5; + const d2 = max5 - min5; + const s2 = max5 === 0 ? 0 : d2 / max5; + if (max5 === min5) { h3 = 0; } else { - switch (max4) { + switch (max5) { case r: { h3 = (g - b2) / d2 + (g < b2 ? 6 : 0); break; @@ -34689,7 +34766,7 @@ var _sfc_main54 = defineComponent({ }; } }); -var _hoisted_1313 = ["onClick"]; +var _hoisted_1314 = ["onClick"]; function _sfc_render299(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { class: normalizeClass(_ctx.ns.b()) @@ -34710,7 +34787,7 @@ function _sfc_render299(_ctx, _cache, $props, $setup, $data, $options) { createBaseVNode("div", { style: normalizeStyle({ backgroundColor: item.value }) }, null, 4) - ], 10, _hoisted_1313); + ], 10, _hoisted_1314); }), 128)) ], 2) ], 2); @@ -34788,9 +34865,9 @@ var _sfc_main55 = defineComponent({ }; } }); -var _hoisted_1314 = createBaseVNode("div", null, null, -1); +var _hoisted_1315 = createBaseVNode("div", null, null, -1); var _hoisted_2306 = [ - _hoisted_1314 + _hoisted_1315 ]; function _sfc_render300(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { @@ -34817,7 +34894,7 @@ function _sfc_render300(_ctx, _cache, $props, $setup, $data, $options) { var SvPanel = _export_sfc(_sfc_main55, [["render", _sfc_render300], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/sv-panel.vue"]]); // node_modules/element-plus/es/components/color-picker/src/color-picker2.mjs -var _hoisted_1315 = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex", "onKeydown"]; +var _hoisted_1316 = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex", "onKeydown"]; var __default__44 = defineComponent({ name: "ElColorPicker" }); @@ -35006,8 +35083,7 @@ var _sfc_main56 = defineComponent({ vertical: "" }, null, 8, ["color"]), createVNode(SvPanel, { - ref_key: "sv", - ref: sv, + ref: "svPanel", color: unref(color) }, null, 8, ["color"]) ], 2), @@ -35103,20 +35179,19 @@ var _sfc_main56 = defineComponent({ }, 8, ["class"]), [ [vShow, _ctx.modelValue || showPanelColor.value] ]), - withDirectives(createVNode(unref(ElIcon), { + !_ctx.modelValue && !showPanelColor.value ? (openBlock(), createBlock(unref(ElIcon), { + key: 0, class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")]) }, { default: withCtx(() => [ createVNode(unref(close_default)) ]), _: 1 - }, 8, ["class"]), [ - [vShow, !_ctx.modelValue && !showPanelColor.value] - ]) + }, 8, ["class"])) : createCommentVNode("v-if", true) ], 6) ], 2) ], 2) - ], 42, _hoisted_1315) + ], 42, _hoisted_1316) ]), _: 1 }, 8, ["visible", "popper-class", "transition"]); @@ -35305,7 +35380,6 @@ var ROOT_PICKER_INJECTION_KEY = Symbol(); // node_modules/element-plus/es/components/date-picker/src/props/date-picker.mjs var datePickerProps = buildProps({ - ...timePickerDefaultProps, type: { type: definePropType(String), default: "date" @@ -35378,6 +35452,9 @@ var panelDatePickProps = buildProps({ } }); +// node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +var import_dayjs8 = __toESM(require_dayjs_min(), 1); + // node_modules/element-plus/es/components/date-picker/src/props/basic-date-table.mjs var basicDateTableProps = buildProps({ ...datePickerSharedProps, @@ -35387,10 +35464,6 @@ var basicDateTableProps = buildProps({ showWeekNumber: Boolean, selectionMode: selectionModeWithDefault("date") }); -var basicDateTableEmits = ["changerange", "pick", "select"]; - -// node_modules/element-plus/es/components/date-picker/src/composables/use-basic-date-table.mjs -var import_dayjs8 = __toESM(require_dayjs_min(), 1); // node_modules/element-plus/es/components/date-picker/src/utils.mjs var import_dayjs7 = __toESM(require_dayjs_min(), 1); @@ -35465,347 +35538,6 @@ var buildPickerTable = (dimension, rows, { } }; -// node_modules/element-plus/es/components/date-picker/src/composables/use-basic-date-table.mjs -var isNormalDay = (type4 = "") => { - return ["normal", "today"].includes(type4); -}; -var useBasicDateTable = (props, emit) => { - const { lang } = useLocale(); - const tbodyRef = ref(); - const currentCellRef = ref(); - const lastRow = ref(); - const lastColumn = ref(); - const tableRows = ref([[], [], [], [], [], []]); - let focusWithClick = false; - const firstDayOfWeek = props.date.$locale().weekStart || 7; - const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_2) => _2.toLowerCase()); - const offsetDay = computed2(() => { - return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek; - }); - const startDate = computed2(() => { - const startDayOfMonth = props.date.startOf("month"); - return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day"); - }); - const WEEKS = computed2(() => { - return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7); - }); - const hasCurrent = computed2(() => { - return flatten_default(unref(rows)).some((row) => { - return row.isCurrent; - }); - }); - const days = computed2(() => { - const startOfMonth = props.date.startOf("month"); - const startOfMonthDay = startOfMonth.day() || 7; - const dateCountOfMonth = startOfMonth.daysInMonth(); - const dateCountOfLastMonth = startOfMonth.subtract(1, "month").daysInMonth(); - return { - startOfMonthDay, - dateCountOfMonth, - dateCountOfLastMonth - }; - }); - const selectedDate = computed2(() => { - return props.selectionMode === "dates" ? castArray2(props.parsedValue) : []; - }); - const setDateText = (cell, { count, rowIndex, columnIndex }) => { - const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days); - const offset2 = unref(offsetDay); - if (rowIndex >= 0 && rowIndex <= 1) { - const numberOfDaysFromPreviousMonth = startOfMonthDay + offset2 < 0 ? 7 + startOfMonthDay + offset2 : startOfMonthDay + offset2; - if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) { - cell.text = count; - return true; - } else { - cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7; - cell.type = "prev-month"; - } - } else { - if (count <= dateCountOfMonth) { - cell.text = count; - } else { - cell.text = count - dateCountOfMonth; - cell.type = "next-month"; - } - return true; - } - return false; - }; - const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => { - const { disabledDate: disabledDate2, cellClassName } = props; - const _selectedDate = unref(selectedDate); - const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex }); - const cellDate = cell.dayjs.toDate(); - cell.selected = _selectedDate.find((d2) => d2.valueOf() === cell.dayjs.valueOf()); - cell.isSelected = !!cell.selected; - cell.isCurrent = isCurrent(cell); - cell.disabled = disabledDate2 == null ? void 0 : disabledDate2(cellDate); - cell.customClass = cellClassName == null ? void 0 : cellClassName(cellDate); - return shouldIncrement; - }; - const setRowMetadata = (row) => { - if (props.selectionMode === "week") { - const [start, end2] = props.showWeekNumber ? [1, 7] : [0, 6]; - const isActive = isWeekActive(row[start + 1]); - row[start].inRange = isActive; - row[start].start = isActive; - row[end2].inRange = isActive; - row[end2].end = isActive; - } - }; - const rows = computed2(() => { - const { minDate, maxDate, rangeState, showWeekNumber } = props; - const offset2 = unref(offsetDay); - const rows_ = unref(tableRows); - const dateUnit = "day"; - let count = 1; - if (showWeekNumber) { - for (let rowIndex = 0; rowIndex < 6; rowIndex++) { - if (!rows_[rowIndex][0]) { - rows_[rowIndex][0] = { - type: "week", - text: unref(startDate).add(rowIndex * 7 + 1, dateUnit).week() - }; - } - } - } - buildPickerTable({ row: 6, column: 7 }, rows_, { - startDate: minDate, - columnIndexOffset: showWeekNumber ? 1 : 0, - nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null, - now: (0, import_dayjs8.default)().locale(unref(lang)).startOf(dateUnit), - unit: dateUnit, - relativeDateGetter: (idx) => unref(startDate).add(idx - offset2, dateUnit), - setCellMetadata: (...args) => { - if (setCellMetadata(...args, count)) { - count += 1; - } - }, - setRowMetadata - }); - return rows_; - }); - watch(() => props.date, async () => { - var _a2; - if ((_a2 = unref(tbodyRef)) == null ? void 0 : _a2.contains(document.activeElement)) { - await nextTick(); - await focus(); - } - }); - const focus = async () => { - var _a2; - return (_a2 = unref(currentCellRef)) == null ? void 0 : _a2.focus(); - }; - const isCurrent = (cell) => { - return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue); - }; - const cellMatchesDate = (cell, date5) => { - if (!date5) - return false; - return (0, import_dayjs8.default)(date5).locale(unref(lang)).isSame(props.date.date(Number(cell.text)), "day"); - }; - const getDateOfCell = (row, column2) => { - const offsetFromStart = row * 7 + (column2 - (props.showWeekNumber ? 1 : 0)) - unref(offsetDay); - return unref(startDate).add(offsetFromStart, "day"); - }; - const handleMouseMove = (event) => { - var _a2; - if (!props.rangeState.selecting) - return; - let target2 = event.target; - if (target2.tagName === "SPAN") { - target2 = (_a2 = target2.parentNode) == null ? void 0 : _a2.parentNode; - } - if (target2.tagName === "DIV") { - target2 = target2.parentNode; - } - if (target2.tagName !== "TD") - return; - const row = target2.parentNode.rowIndex - 1; - const column2 = target2.cellIndex; - if (unref(rows)[row][column2].disabled) - return; - if (row !== unref(lastRow) || column2 !== unref(lastColumn)) { - lastRow.value = row; - lastColumn.value = column2; - emit("changerange", { - selecting: true, - endDate: getDateOfCell(row, column2) - }); - } - }; - const isSelectedCell = (cell) => { - return !unref(hasCurrent) && (cell == null ? void 0 : cell.text) === 1 && cell.type === "normal" || cell.isCurrent; - }; - const handleFocus = (event) => { - if (focusWithClick || unref(hasCurrent) || props.selectionMode !== "date") - return; - handlePickDate(event, true); - }; - const handleMouseDown = (event) => { - const target2 = event.target.closest("td"); - if (!target2) - return; - focusWithClick = true; - }; - const handleMouseUp = (event) => { - const target2 = event.target.closest("td"); - if (!target2) - return; - focusWithClick = false; - }; - const handleRangePick = (newDate) => { - if (!props.rangeState.selecting || !props.minDate) { - emit("pick", { minDate: newDate, maxDate: null }); - emit("select", true); - } else { - if (newDate >= props.minDate) { - emit("pick", { minDate: props.minDate, maxDate: newDate }); - } else { - emit("pick", { minDate: newDate, maxDate: props.minDate }); - } - emit("select", false); - } - }; - const handleWeekPick = (newDate) => { - const weekNumber = newDate.week(); - const value = `${newDate.year()}w${weekNumber}`; - emit("pick", { - year: newDate.year(), - week: weekNumber, - value, - date: newDate.startOf("week") - }); - }; - const handleDatesPick = (newDate, selected) => { - const newValue = selected ? castArray2(props.parsedValue).filter((d2) => (d2 == null ? void 0 : d2.valueOf()) !== newDate.valueOf()) : castArray2(props.parsedValue).concat([newDate]); - emit("pick", newValue); - }; - const handlePickDate = (event, isKeyboardMovement = false) => { - const target2 = event.target.closest("td"); - if (!target2) - return; - const row = target2.parentNode.rowIndex - 1; - const column2 = target2.cellIndex; - const cell = unref(rows)[row][column2]; - if (cell.disabled || cell.type === "week") - return; - const newDate = getDateOfCell(row, column2); - switch (props.selectionMode) { - case "range": { - handleRangePick(newDate); - break; - } - case "date": { - emit("pick", newDate, isKeyboardMovement); - break; - } - case "week": { - handleWeekPick(newDate); - break; - } - case "dates": { - handleDatesPick(newDate, !!cell.selected); - break; - } - default: { - break; - } - } - }; - const isWeekActive = (cell) => { - if (props.selectionMode !== "week") - return false; - let newDate = props.date.startOf("day"); - if (cell.type === "prev-month") { - newDate = newDate.subtract(1, "month"); - } - if (cell.type === "next-month") { - newDate = newDate.add(1, "month"); - } - newDate = newDate.date(Number.parseInt(cell.text, 10)); - if (props.parsedValue && !Array.isArray(props.parsedValue)) { - const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1; - const weekDate = props.parsedValue.subtract(dayOffset, "day"); - return weekDate.isSame(newDate, "day"); - } - return false; - }; - return { - WEEKS, - rows, - tbodyRef, - currentCellRef, - focus, - isCurrent, - isWeekActive, - isSelectedCell, - handlePickDate, - handleMouseUp, - handleMouseDown, - handleMouseMove, - handleFocus - }; -}; -var useBasicDateTableDOM = (props, { - isCurrent, - isWeekActive -}) => { - const ns = useNamespace("date-table"); - const { t } = useLocale(); - const tableKls = computed2(() => [ - ns.b(), - { "is-week-mode": props.selectionMode === "week" } - ]); - const tableLabel = computed2(() => t("el.datepicker.dateTablePrompt")); - const weekLabel = computed2(() => t("el.datepicker.week")); - const getCellClasses = (cell) => { - const classes = []; - if (isNormalDay(cell.type) && !cell.disabled) { - classes.push("available"); - if (cell.type === "today") { - classes.push("today"); - } - } else { - classes.push(cell.type); - } - if (isCurrent(cell)) { - classes.push("current"); - } - if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) { - classes.push("in-range"); - if (cell.start) { - classes.push("start-date"); - } - if (cell.end) { - classes.push("end-date"); - } - } - if (cell.disabled) { - classes.push("disabled"); - } - if (cell.selected) { - classes.push("selected"); - } - if (cell.customClass) { - classes.push(cell.customClass); - } - return classes.join(" "); - }; - const getRowKls = (cell) => [ - ns.e("row"), - { current: isWeekActive(cell) } - ]; - return { - tableKls, - tableLabel, - weekLabel, - getCellClasses, - getRowKls, - t - }; -}; - // node_modules/element-plus/es/components/date-picker/src/props/basic-cell.mjs var basicCellProps = buildProps({ cell: { @@ -35844,82 +35576,347 @@ var ElDatePickerCell = defineComponent({ }); // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-date-table.mjs -var _hoisted_1316 = ["aria-label"]; +var _hoisted_1317 = ["aria-label", "onMousedown"]; var _hoisted_2307 = { key: 0, scope: "col" }; -var _hoisted_3297 = ["aria-label"]; +var _hoisted_3298 = ["aria-label"]; var _hoisted_487 = ["aria-current", "aria-selected", "tabindex"]; var _sfc_main62 = defineComponent({ __name: "basic-date-table", props: basicDateTableProps, - emits: basicDateTableEmits, + emits: ["changerange", "pick", "select"], setup(__props, { expose, emit }) { const props = __props; - const { - WEEKS, - rows, - tbodyRef, - currentCellRef, - focus, - isCurrent, - isWeekActive, - isSelectedCell, - handlePickDate, - handleMouseUp, - handleMouseDown, - handleMouseMove, - handleFocus - } = useBasicDateTable(props, emit); - const { tableLabel, tableKls, weekLabel, getCellClasses, getRowKls, t } = useBasicDateTableDOM(props, { - isCurrent, - isWeekActive + const ns = useNamespace("date-table"); + const { t, lang } = useLocale(); + const tbodyRef = ref(); + const currentCellRef = ref(); + const lastRow = ref(); + const lastColumn = ref(); + const tableRows = ref([[], [], [], [], [], []]); + let focusWithClick = false; + const firstDayOfWeek = props.date.$locale().weekStart || 7; + const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_2) => _2.toLowerCase()); + const offsetDay = computed2(() => { + return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek; + }); + const startDate = computed2(() => { + const startDayOfMonth = props.date.startOf("month"); + return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day"); + }); + const WEEKS = computed2(() => { + return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7); + }); + const hasCurrent = computed2(() => { + return flatten_default(rows.value).some((row) => { + return row.isCurrent; + }); + }); + const days = computed2(() => { + const startOfMonth = props.date.startOf("month"); + const startOfMonthDay = startOfMonth.day() || 7; + const dateCountOfMonth = startOfMonth.daysInMonth(); + const dateCountOfLastMonth = startOfMonth.subtract(1, "month").daysInMonth(); + return { + startOfMonthDay, + dateCountOfMonth, + dateCountOfLastMonth + }; + }); + const selectedDate = computed2(() => { + return props.selectionMode === "dates" ? castArray2(props.parsedValue) : []; + }); + const setDateText = (cell, { + count, + rowIndex, + columnIndex + }) => { + const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days); + const offset2 = unref(offsetDay); + if (rowIndex >= 0 && rowIndex <= 1) { + const numberOfDaysFromPreviousMonth = startOfMonthDay + offset2 < 0 ? 7 + startOfMonthDay + offset2 : startOfMonthDay + offset2; + if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) { + cell.text = count; + return true; + } else { + cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7; + cell.type = "prev-month"; + } + } else { + if (count <= dateCountOfMonth) { + cell.text = count; + } else { + cell.text = count - dateCountOfMonth; + cell.type = "next-month"; + } + return true; + } + return false; + }; + const setCellMetadata = (cell, { + columnIndex, + rowIndex + }, count) => { + const { disabledDate: disabledDate2, cellClassName } = props; + const _selectedDate = unref(selectedDate); + const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex }); + const cellDate = cell.dayjs.toDate(); + cell.selected = _selectedDate.find((d2) => d2.valueOf() === cell.dayjs.valueOf()); + cell.isSelected = !!cell.selected; + cell.isCurrent = isCurrent(cell); + cell.disabled = disabledDate2 == null ? void 0 : disabledDate2(cellDate); + cell.customClass = cellClassName == null ? void 0 : cellClassName(cellDate); + return shouldIncrement; + }; + const setRowMetadata = (row) => { + if (props.selectionMode === "week") { + const [start, end2] = props.showWeekNumber ? [1, 7] : [0, 6]; + const isActive = isWeekActive(row[start + 1]); + row[start].inRange = isActive; + row[start].start = isActive; + row[end2].inRange = isActive; + row[end2].end = isActive; + } + }; + const rows = computed2(() => { + const { minDate, maxDate, rangeState, showWeekNumber } = props; + const offset2 = offsetDay.value; + const rows_ = tableRows.value; + const dateUnit = "day"; + let count = 1; + if (showWeekNumber) { + for (let rowIndex = 0; rowIndex < 6; rowIndex++) { + if (!rows_[rowIndex][0]) { + rows_[rowIndex][0] = { + type: "week", + text: startDate.value.add(rowIndex * 7 + 1, dateUnit).week() + }; + } + } + } + buildPickerTable({ row: 6, column: 7 }, rows_, { + startDate: minDate, + columnIndexOffset: showWeekNumber ? 1 : 0, + nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null, + now: (0, import_dayjs8.default)().locale(unref(lang)).startOf(dateUnit), + unit: dateUnit, + relativeDateGetter: (idx) => startDate.value.add(idx - offset2, dateUnit), + setCellMetadata: (...args) => { + if (setCellMetadata(...args, count)) { + count += 1; + } + }, + setRowMetadata + }); + return rows_; }); + watch(() => props.date, async () => { + var _a2, _b; + if ((_a2 = tbodyRef.value) == null ? void 0 : _a2.contains(document.activeElement)) { + await nextTick(); + (_b = currentCellRef.value) == null ? void 0 : _b.focus(); + } + }); + const focus = async () => { + var _a2; + (_a2 = currentCellRef.value) == null ? void 0 : _a2.focus(); + }; + const isNormalDay = (type4 = "") => { + return ["normal", "today"].includes(type4); + }; + const isCurrent = (cell) => { + return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue); + }; + const cellMatchesDate = (cell, date5) => { + if (!date5) + return false; + return (0, import_dayjs8.default)(date5).locale(lang.value).isSame(props.date.date(Number(cell.text)), "day"); + }; + const getCellClasses = (cell) => { + const classes = []; + if (isNormalDay(cell.type) && !cell.disabled) { + classes.push("available"); + if (cell.type === "today") { + classes.push("today"); + } + } else { + classes.push(cell.type); + } + if (isCurrent(cell)) { + classes.push("current"); + } + if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) { + classes.push("in-range"); + if (cell.start) { + classes.push("start-date"); + } + if (cell.end) { + classes.push("end-date"); + } + } + if (cell.disabled) { + classes.push("disabled"); + } + if (cell.selected) { + classes.push("selected"); + } + if (cell.customClass) { + classes.push(cell.customClass); + } + return classes.join(" "); + }; + const getDateOfCell = (row, column2) => { + const offsetFromStart = row * 7 + (column2 - (props.showWeekNumber ? 1 : 0)) - offsetDay.value; + return startDate.value.add(offsetFromStart, "day"); + }; + const handleMouseMove = (event) => { + var _a2; + if (!props.rangeState.selecting) + return; + let target2 = event.target; + if (target2.tagName === "SPAN") { + target2 = (_a2 = target2.parentNode) == null ? void 0 : _a2.parentNode; + } + if (target2.tagName === "DIV") { + target2 = target2.parentNode; + } + if (target2.tagName !== "TD") + return; + const row = target2.parentNode.rowIndex - 1; + const column2 = target2.cellIndex; + if (rows.value[row][column2].disabled) + return; + if (row !== lastRow.value || column2 !== lastColumn.value) { + lastRow.value = row; + lastColumn.value = column2; + emit("changerange", { + selecting: true, + endDate: getDateOfCell(row, column2) + }); + } + }; + const isSelectedCell = (cell) => { + return !hasCurrent.value && (cell == null ? void 0 : cell.text) === 1 && cell.type === "normal" || cell.isCurrent; + }; + const handleFocus = (event) => { + if (focusWithClick || hasCurrent.value || props.selectionMode !== "date") + return; + handlePickDate(event, true); + }; + const handleMouseDown = (event) => { + const target2 = event.target.closest("td"); + if (!target2) + return; + focusWithClick = true; + }; + const handleMouseUp = (event) => { + const target2 = event.target.closest("td"); + if (!target2) + return; + focusWithClick = false; + }; + const handlePickDate = (event, isKeyboardMovement = false) => { + const target2 = event.target.closest("td"); + if (!target2) + return; + const row = target2.parentNode.rowIndex - 1; + const column2 = target2.cellIndex; + const cell = rows.value[row][column2]; + if (cell.disabled || cell.type === "week") + return; + const newDate = getDateOfCell(row, column2); + if (props.selectionMode === "range") { + if (!props.rangeState.selecting || !props.minDate) { + emit("pick", { minDate: newDate, maxDate: null }); + emit("select", true); + } else { + if (newDate >= props.minDate) { + emit("pick", { minDate: props.minDate, maxDate: newDate }); + } else { + emit("pick", { minDate: newDate, maxDate: props.minDate }); + } + emit("select", false); + } + } else if (props.selectionMode === "date") { + emit("pick", newDate, isKeyboardMovement); + } else if (props.selectionMode === "week") { + const weekNumber = newDate.week(); + const value = `${newDate.year()}w${weekNumber}`; + emit("pick", { + year: newDate.year(), + week: weekNumber, + value, + date: newDate.startOf("week") + }); + } else if (props.selectionMode === "dates") { + const newValue = cell.selected ? castArray2(props.parsedValue).filter((d2) => (d2 == null ? void 0 : d2.valueOf()) !== newDate.valueOf()) : castArray2(props.parsedValue).concat([newDate]); + emit("pick", newValue); + } + }; + const isWeekActive = (cell) => { + if (props.selectionMode !== "week") + return false; + let newDate = props.date.startOf("day"); + if (cell.type === "prev-month") { + newDate = newDate.subtract(1, "month"); + } + if (cell.type === "next-month") { + newDate = newDate.add(1, "month"); + } + newDate = newDate.date(Number.parseInt(cell.text, 10)); + if (props.parsedValue && !Array.isArray(props.parsedValue)) { + const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1; + const weekDate = props.parsedValue.subtract(dayOffset, "day"); + return weekDate.isSame(newDate, "day"); + } + return false; + }; expose({ focus }); return (_ctx, _cache) => { return openBlock(), createElementBlock("table", { - "aria-label": unref(tableLabel), - class: normalizeClass(unref(tableKls)), + role: "grid", + "aria-label": unref(t)("el.datepicker.dateTablePrompt"), cellspacing: "0", cellpadding: "0", - role: "grid", - onClick: _cache[1] || (_cache[1] = (...args) => unref(handlePickDate) && unref(handlePickDate)(...args)), - onMousemove: _cache[2] || (_cache[2] = (...args) => unref(handleMouseMove) && unref(handleMouseMove)(...args)), - onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => unref(handleMouseDown) && unref(handleMouseDown)(...args), ["prevent"])), - onMouseup: _cache[4] || (_cache[4] = (...args) => unref(handleMouseUp) && unref(handleMouseUp)(...args)) + class: normalizeClass([unref(ns).b(), { "is-week-mode": _ctx.selectionMode === "week" }]), + onClick: handlePickDate, + onMousemove: handleMouseMove, + onMousedown: withModifiers(handleMouseDown, ["prevent"]), + onMouseup: handleMouseUp }, [ createBaseVNode("tbody", { ref_key: "tbodyRef", ref: tbodyRef }, [ createBaseVNode("tr", null, [ - _ctx.showWeekNumber ? (openBlock(), createElementBlock("th", _hoisted_2307, toDisplayString(unref(weekLabel)), 1)) : createCommentVNode("v-if", true), + _ctx.showWeekNumber ? (openBlock(), createElementBlock("th", _hoisted_2307, toDisplayString(unref(t)("el.datepicker.week")), 1)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEKS), (week, key) => { return openBlock(), createElementBlock("th", { key, - "aria-label": unref(t)("el.datepicker.weeksFull." + week), - scope: "col" - }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_3297); + scope: "col", + "aria-label": unref(t)("el.datepicker.weeksFull." + week) + }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_3298); }), 128)) ]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, rowKey2) => { return openBlock(), createElementBlock("tr", { key: rowKey2, - class: normalizeClass(unref(getRowKls)(row[1])) + class: normalizeClass([unref(ns).e("row"), { current: isWeekActive(row[1]) }]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, columnKey) => { return openBlock(), createElementBlock("td", { key: `${rowKey2}.${columnKey}`, ref_for: true, - ref: (el) => unref(isSelectedCell)(cell) && (currentCellRef.value = el), - class: normalizeClass(unref(getCellClasses)(cell)), + ref: (el) => isSelectedCell(cell) && (currentCellRef.value = el), + class: normalizeClass(getCellClasses(cell)), "aria-current": cell.isCurrent ? "date" : void 0, "aria-selected": cell.isCurrent, - tabindex: unref(isSelectedCell)(cell) ? 0 : -1, - onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)) + tabindex: isSelectedCell(cell) ? 0 : -1, + onFocus: handleFocus }, [ createVNode(unref(ElDatePickerCell), { cell }, null, 8, ["cell"]) ], 42, _hoisted_487); @@ -35927,7 +35924,7 @@ var _sfc_main62 = defineComponent({ ], 2); }), 128)) ], 512) - ], 42, _hoisted_1316); + ], 42, _hoisted_1317); }; } }); @@ -35943,9 +35940,9 @@ var basicMonthTableProps = buildProps({ }); // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-month-table.mjs -var _hoisted_1317 = ["aria-label"]; +var _hoisted_1318 = ["aria-label"]; var _hoisted_2308 = ["aria-selected", "aria-label", "tabindex", "onKeydown"]; -var _hoisted_3298 = { class: "cell" }; +var _hoisted_3299 = { class: "cell" }; var _sfc_main63 = defineComponent({ __name: "basic-month-table", props: basicMonthTableProps, @@ -36128,14 +36125,14 @@ var _sfc_main63 = defineComponent({ ] }, [ createBaseVNode("div", null, [ - createBaseVNode("span", _hoisted_3298, toDisplayString(unref(t)("el.datepicker.months." + months.value[cell.text])), 1) + createBaseVNode("span", _hoisted_3299, toDisplayString(unref(t)("el.datepicker.months." + months.value[cell.text])), 1) ]) ], 42, _hoisted_2308); }), 128)) ]); }), 128)) ], 512) - ], 42, _hoisted_1317); + ], 42, _hoisted_1318); }; } }); @@ -36153,9 +36150,9 @@ var basicYearTableProps = buildProps({ }); // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-year-table.mjs -var _hoisted_1318 = ["aria-label"]; +var _hoisted_1319 = ["aria-label"]; var _hoisted_2309 = ["aria-selected", "tabindex", "onKeydown"]; -var _hoisted_3299 = { class: "cell" }; +var _hoisted_3300 = { class: "cell" }; var _hoisted_488 = { key: 1 }; var _sfc_main64 = defineComponent({ __name: "basic-year-table", @@ -36240,23 +36237,23 @@ var _sfc_main64 = defineComponent({ withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"]) ] }, [ - createBaseVNode("span", _hoisted_3299, toDisplayString(unref(startYear) + i * 4 + j), 1) + createBaseVNode("span", _hoisted_3300, toDisplayString(unref(startYear) + i * 4 + j), 1) ], 42, _hoisted_2309)) : (openBlock(), createElementBlock("td", _hoisted_488)) ], 64); }), 64)) ]); }), 64)) ], 512) - ], 10, _hoisted_1318); + ], 10, _hoisted_1319); }; } }); var YearTable = _export_sfc(_sfc_main64, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/basic-year-table.vue"]]); // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs -var _hoisted_1319 = ["onClick"]; +var _hoisted_1320 = ["onClick"]; var _hoisted_2310 = ["aria-label"]; -var _hoisted_3300 = ["aria-label"]; +var _hoisted_3301 = ["aria-label"]; var _hoisted_489 = ["aria-label"]; var _hoisted_525 = ["aria-label"]; var _sfc_main65 = defineComponent({ @@ -36273,12 +36270,11 @@ var _sfc_main65 = defineComponent({ const { t, lang } = useLocale(); const pickerBase = inject("EP_PICKER_BASE"); const popper = inject(TOOLTIP_INJECTION_KEY); - const { shortcuts, disabledDate: disabledDate2, cellClassName, defaultTime } = pickerBase.props; + const { shortcuts, disabledDate: disabledDate2, cellClassName, defaultTime, arrowControl } = pickerBase.props; const defaultValue = toRef(pickerBase.props, "defaultValue"); const currentViewRef = ref(); const innerDate = ref((0, import_dayjs11.default)().locale(lang.value)); const isChangeToNow = ref(false); - let isShortcut = false; const defaultTimeD = computed2(() => { return (0, import_dayjs11.default)(defaultTime).locale(lang.value); }); @@ -36295,7 +36291,7 @@ var _sfc_main65 = defineComponent({ return selectableRange.value.length > 0 ? timeWithinRange(date5, selectableRange.value, props.format || "HH:mm:ss") : true; }; const formatEmit = (emitDayjs) => { - if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) { + if (defaultTime && !visibleTime.value && !isChangeToNow.value) { return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date()); } if (showTime.value) @@ -36314,7 +36310,6 @@ var _sfc_main65 = defineComponent({ userInputDate.value = null; userInputTime.value = null; isChangeToNow.value = false; - isShortcut = false; }; const handleDatePick = (value, keepOpen) => { if (selectionMode.value === "date") { @@ -36357,7 +36352,6 @@ var _sfc_main65 = defineComponent({ const handleShortcutClick = (shortcut) => { const shortcutValue = isFunction(shortcut.value) ? shortcut.value() : shortcut.value; if (shortcutValue) { - isShortcut = true; emit((0, import_dayjs11.default)(shortcutValue).locale(lang.value)); return; } @@ -36417,16 +36411,6 @@ var _sfc_main65 = defineComponent({ const footerVisible = computed2(() => { return showTime.value || selectionMode.value === "dates"; }); - const disabledConfirm = computed2(() => { - if (!disabledDate2) - return false; - if (!props.parsedValue) - return true; - if (isArray(props.parsedValue)) { - return disabledDate2(props.parsedValue[0].toDate()); - } - return disabledDate2(props.parsedValue.toDate()); - }); const onConfirm = () => { if (selectionMode.value === "dates") { emit(props.parsedValue); @@ -36441,11 +36425,6 @@ var _sfc_main65 = defineComponent({ emit(result2); } }; - const disabledNow = computed2(() => { - if (!disabledDate2) - return false; - return disabledDate2((0, import_dayjs11.default)().locale(lang.value).toDate()); - }); const changeToNow = () => { const now2 = (0, import_dayjs11.default)().locale(lang.value); const nowDate = now2.toDate(); @@ -36686,7 +36665,7 @@ var _sfc_main65 = defineComponent({ type: "button", class: normalizeClass(unref(ppNs).e("shortcut")), onClick: ($event) => handleShortcutClick(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_1319); + }, toDisplayString(shortcut.text), 11, _hoisted_1320); }), 128)) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { @@ -36723,9 +36702,10 @@ var _sfc_main65 = defineComponent({ createVNode(unref(TimePickPanel), { visible: timePickerVisible.value, format: unref(timeFormat), + "time-arrow-control": unref(arrowControl), "parsed-value": innerDate.value, onPick: handleTimePick - }, null, 8, ["visible", "format", "parsed-value"]) + }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"]) ], 2)), [ [unref(ClickOutside), handleTimePickClose] ]) @@ -36764,7 +36744,7 @@ var _sfc_main65 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_3300), [ + ], 10, _hoisted_3301), [ [vShow, currentView.value === "date"] ]) ], 2), @@ -36867,28 +36847,26 @@ var _sfc_main65 = defineComponent({ text: "", size: "small", class: normalizeClass(unref(ppNs).e("link-btn")), - disabled: unref(disabledNow), onClick: changeToNow }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("el.datepicker.now")), 1) ]), _: 1 - }, 8, ["class", "disabled"]), [ + }, 8, ["class"]), [ [vShow, unref(selectionMode) !== "dates"] ]), createVNode(unref(ElButton), { plain: "", size: "small", class: normalizeClass(unref(ppNs).e("link-btn")), - disabled: unref(disabledConfirm), onClick: onConfirm }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1) ]), _: 1 - }, 8, ["class", "disabled"]) + }, 8, ["class"]) ], 2), [ [vShow, unref(footerVisible) && currentView.value === "date"] ]) @@ -37011,15 +36989,11 @@ var useRangePicker = (props, { }; // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-range.mjs -var _hoisted_1320 = ["onClick"]; -var _hoisted_2311 = ["aria-label"]; -var _hoisted_3301 = ["aria-label"]; -var _hoisted_490 = ["disabled", "aria-label"]; -var _hoisted_526 = ["disabled", "aria-label"]; -var _hoisted_63 = ["disabled", "aria-label"]; -var _hoisted_72 = ["disabled", "aria-label"]; -var _hoisted_8 = ["aria-label"]; -var _hoisted_9 = ["aria-label"]; +var _hoisted_1321 = ["onClick"]; +var _hoisted_2311 = ["disabled"]; +var _hoisted_3302 = ["disabled"]; +var _hoisted_490 = ["disabled"]; +var _hoisted_526 = ["disabled"]; var unit = "month"; var _sfc_main66 = defineComponent({ __name: "panel-date-range", @@ -37033,7 +37007,14 @@ var _sfc_main66 = defineComponent({ setup(__props, { emit }) { const props = __props; const pickerBase = inject("EP_PICKER_BASE"); - const { disabledDate: disabledDate2, cellClassName, format: format2, defaultTime, clearable } = pickerBase.props; + const { + disabledDate: disabledDate2, + cellClassName, + format: format2, + defaultTime, + arrowControl, + clearable + } = pickerBase.props; const shortcuts = toRef(pickerBase.props, "shortcuts"); const defaultValue = toRef(pickerBase.props, "defaultValue"); const { lang } = useLocale(); @@ -37118,9 +37099,6 @@ var _sfc_main66 = defineComponent({ const dateFormat = computed2(() => { return extractDateFormat(format2); }); - const isValidValue3 = (date5) => { - return isValidRange2(date5) && (disabledDate2 ? !disabledDate2(date5[0].toDate()) && !disabledDate2(date5[1].toDate()) : true); - }; const leftPrevYear = () => { leftDate.value = leftDate.value.subtract(1, "year"); if (!props.unlinkPanels) { @@ -37226,14 +37204,14 @@ var _sfc_main66 = defineComponent({ if (type4 === "min") { leftDate.value = parsedValueD; minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); - if (!props.unlinkPanels && (!maxDate.value || maxDate.value.isBefore(minDate.value))) { + if (!props.unlinkPanels) { rightDate.value = parsedValueD.add(1, "month"); maxDate.value = minDate.value.add(1, "month"); } } else { rightDate.value = parsedValueD; maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); - if (!props.unlinkPanels && (!minDate.value || minDate.value.isAfter(maxDate.value))) { + if (!props.unlinkPanels) { leftDate.value = parsedValueD.subtract(1, "month"); minDate.value = maxDate.value.subtract(1, "month"); } @@ -37331,7 +37309,7 @@ var _sfc_main66 = defineComponent({ } } } - emit("set-picker-option", ["isValidValue", isValidValue3]); + emit("set-picker-option", ["isValidValue", isValidRange2]); emit("set-picker-option", ["parseUserInput", parseUserInput]); emit("set-picker-option", ["formatToString", formatToString]); emit("set-picker-option", ["handleClear", handleClear]); @@ -37362,7 +37340,7 @@ var _sfc_main66 = defineComponent({ type: "button", class: normalizeClass(unref(ppNs).e("shortcut")), onClick: ($event) => unref(handleShortcutClick)(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_1320); + }, toDisplayString(shortcut.text), 11, _hoisted_1321); }), 128)) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { @@ -37407,9 +37385,10 @@ var _sfc_main66 = defineComponent({ visible: minTimePickerVisible.value, format: unref(timeFormat), "datetime-role": "start", + "time-arrow-control": unref(arrowControl), "parsed-value": leftDate.value, onPick: handleMinTimePick - }, null, 8, ["visible", "format", "parsed-value"]) + }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"]) ], 2)), [ [unref(ClickOutside), handleMinTimeClose] ]) @@ -37459,9 +37438,10 @@ var _sfc_main66 = defineComponent({ "datetime-role": "end", visible: maxTimePickerVisible.value, format: unref(timeFormat), + "time-arrow-control": unref(arrowControl), "parsed-value": rightDate.value, onPick: handleMaxTimePick - }, null, 8, ["visible", "format", "parsed-value"]) + }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"]) ], 2)), [ [unref(ClickOutside), handleMaxTimeClose] ]) @@ -37476,7 +37456,6 @@ var _sfc_main66 = defineComponent({ createBaseVNode("button", { type: "button", class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevYear`), onClick: leftPrevYear }, [ createVNode(unref(ElIcon), null, { @@ -37485,11 +37464,10 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_2311), + ], 2), createBaseVNode("button", { type: "button", class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevMonth`), onClick: leftPrevMonth }, [ createVNode(unref(ElIcon), null, { @@ -37498,13 +37476,12 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_3301), + ], 2), _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { key: 0, type: "button", disabled: !unref(enableYearArrow), class: normalizeClass([[unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableYearArrow) }], "d-arrow-right"]), - "aria-label": unref(t)(`el.datepicker.nextYear`), onClick: leftNextYear }, [ createVNode(unref(ElIcon), null, { @@ -37513,7 +37490,7 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_490)) : createCommentVNode("v-if", true), + ], 10, _hoisted_2311)) : createCommentVNode("v-if", true), _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { key: 1, type: "button", @@ -37522,7 +37499,6 @@ var _sfc_main66 = defineComponent({ unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableMonthArrow) } ], "arrow-right"]), - "aria-label": unref(t)(`el.datepicker.nextMonth`), onClick: leftNextMonth }, [ createVNode(unref(ElIcon), null, { @@ -37531,7 +37507,7 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_526)) : createCommentVNode("v-if", true), + ], 10, _hoisted_3302)) : createCommentVNode("v-if", true), createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1) ], 2), createVNode(DateTable2, { @@ -37558,7 +37534,6 @@ var _sfc_main66 = defineComponent({ type: "button", disabled: !unref(enableYearArrow), class: normalizeClass([[unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableYearArrow) }], "d-arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevYear`), onClick: rightPrevYear }, [ createVNode(unref(ElIcon), null, { @@ -37567,7 +37542,7 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_63)) : createCommentVNode("v-if", true), + ], 10, _hoisted_490)) : createCommentVNode("v-if", true), _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { key: 1, type: "button", @@ -37576,7 +37551,6 @@ var _sfc_main66 = defineComponent({ unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableMonthArrow) } ], "arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevMonth`), onClick: rightPrevMonth }, [ createVNode(unref(ElIcon), null, { @@ -37585,10 +37559,9 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_72)) : createCommentVNode("v-if", true), + ], 10, _hoisted_526)) : createCommentVNode("v-if", true), createBaseVNode("button", { type: "button", - "aria-label": unref(t)(`el.datepicker.nextYear`), class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]), onClick: rightNextYear }, [ @@ -37598,11 +37571,10 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_8), + ], 2), createBaseVNode("button", { type: "button", class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]), - "aria-label": unref(t)(`el.datepicker.nextMonth`), onClick: rightNextMonth }, [ createVNode(unref(ElIcon), null, { @@ -37611,7 +37583,7 @@ var _sfc_main66 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_9), + ], 2), createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1) ], 2), createVNode(DateTable2, { @@ -37671,11 +37643,7 @@ var import_dayjs14 = __toESM(require_dayjs_min(), 1); var panelMonthRangeProps = buildProps({ ...panelRangeSharedProps }); -var panelMonthRangeEmits = [ - "pick", - "set-picker-option", - "calendar-change" -]; +var panelMonthRangeEmits = ["pick", "set-picker-option"]; // node_modules/element-plus/es/components/date-picker/src/composables/use-month-range-header.mjs var useMonthRangeHeader = ({ @@ -37727,9 +37695,9 @@ var useMonthRangeHeader = ({ }; // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-month-range.mjs -var _hoisted_1321 = ["onClick"]; +var _hoisted_1322 = ["onClick"]; var _hoisted_2312 = ["disabled"]; -var _hoisted_3302 = ["disabled"]; +var _hoisted_3303 = ["disabled"]; var unit2 = "year"; var __default__50 = defineComponent({ name: "DatePickerMonthRange" @@ -37787,7 +37755,6 @@ var _sfc_main67 = defineComponent({ if (maxDate.value === maxDate_ && minDate.value === minDate_) { return; } - emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]); maxDate.value = maxDate_; minDate.value = minDate_; if (!close2) @@ -37833,7 +37800,7 @@ var _sfc_main67 = defineComponent({ type: "button", class: normalizeClass(unref(ppNs).e("shortcut")), onClick: ($event) => unref(handleShortcutClick)(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_1321); + }, toDisplayString(shortcut.text), 11, _hoisted_1322); }), 128)) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { @@ -37907,7 +37874,7 @@ var _sfc_main67 = defineComponent({ ]), _: 1 }) - ], 10, _hoisted_3302)) : createCommentVNode("v-if", true), + ], 10, _hoisted_3303)) : createCommentVNode("v-if", true), createBaseVNode("button", { type: "button", class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]), @@ -37970,7 +37937,10 @@ import_dayjs15.default.extend(import_isSameOrBefore.default); var DatePicker = defineComponent({ name: "ElDatePicker", install: null, - props: datePickerProps, + props: { + ...timePickerDefaultProps, + ...datePickerProps + }, emits: ["update:modelValue"], setup(props, { expose, @@ -38119,7 +38089,7 @@ var descriptionsRowProps = buildProps({ }); // node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs -var _hoisted_1322 = { key: 1 }; +var _hoisted_1323 = { key: 1 }; var __default__51 = defineComponent({ name: "ElDescriptionsRow" }); @@ -38150,7 +38120,7 @@ var _sfc_main68 = defineComponent({ }, null, 8, ["cell"]); }), 128)) ]) - ], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1322, [ + ], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1323, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => { return openBlock(), createElementBlock(Fragment, { key: `tr3-${index}` @@ -38423,8 +38393,14 @@ var dialogInjectionKey = Symbol("dialogInjectionKey"); // node_modules/element-plus/es/components/dialog/src/dialog-content.mjs var dialogContentProps = buildProps({ - center: Boolean, - alignCenter: Boolean, + center: { + type: Boolean, + default: false + }, + alignCenter: { + type: Boolean, + default: false + }, closeIcon: { type: iconPropType }, @@ -38432,8 +38408,14 @@ var dialogContentProps = buildProps({ type: String, default: "" }, - draggable: Boolean, - fullscreen: Boolean, + draggable: { + type: Boolean, + default: false + }, + fullscreen: { + type: Boolean, + default: false + }, showClose: { type: Boolean, default: true @@ -38441,10 +38423,6 @@ var dialogContentProps = buildProps({ title: { type: String, default: "" - }, - ariaLevel: { - type: String, - default: "2" } }); var dialogContentEmits = { @@ -38452,9 +38430,8 @@ var dialogContentEmits = { }; // node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs -var _hoisted_1323 = ["aria-level"]; -var _hoisted_2313 = ["aria-label"]; -var _hoisted_3303 = ["id"]; +var _hoisted_1324 = ["aria-label"]; +var _hoisted_2313 = ["id"]; var __default__53 = defineComponent({ name: "ElDialogContent" }); var _sfc_main70 = defineComponent({ ...__default__53, @@ -38466,21 +38443,20 @@ var _sfc_main70 = defineComponent({ const { Close } = CloseComponents; const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey); const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY); - const dialogKls = computed2(() => [ - ns.b(), - ns.is("fullscreen", props.fullscreen), - ns.is("draggable", props.draggable), - ns.is("align-center", props.alignCenter), - { [ns.m("center")]: props.center }, - props.customClass - ]); const composedDialogRef = composeRefs(focusTrapRef, dialogRef); const draggable2 = computed2(() => props.draggable); useDraggable(dialogRef, headerRef, draggable2); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref: unref(composedDialogRef), - class: normalizeClass(unref(dialogKls)), + class: normalizeClass([ + unref(ns).b(), + unref(ns).is("fullscreen", _ctx.fullscreen), + unref(ns).is("draggable", unref(draggable2)), + unref(ns).is("align-center", _ctx.alignCenter), + { [unref(ns).m("center")]: _ctx.center }, + _ctx.customClass + ]), style: normalizeStyle(unref(style)), tabindex: "-1" }, [ @@ -38492,9 +38468,8 @@ var _sfc_main70 = defineComponent({ renderSlot(_ctx.$slots, "header", {}, () => [ createBaseVNode("span", { role: "heading", - "aria-level": _ctx.ariaLevel, class: normalizeClass(unref(ns).e("title")) - }, toDisplayString(_ctx.title), 11, _hoisted_1323) + }, toDisplayString(_ctx.title), 3) ]), _ctx.showClose ? (openBlock(), createElementBlock("button", { key: 0, @@ -38511,14 +38486,14 @@ var _sfc_main70 = defineComponent({ ]), _: 1 }, 8, ["class"]) - ], 10, _hoisted_2313)) : createCommentVNode("v-if", true) + ], 10, _hoisted_1324)) : createCommentVNode("v-if", true) ], 2), createBaseVNode("div", { id: unref(bodyId), class: normalizeClass(unref(ns).e("body")) }, [ renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_3303), + ], 10, _hoisted_2313), _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", { key: 0, class: normalizeClass(unref(ns).e("footer")) @@ -38534,11 +38509,17 @@ var ElDialogContent = _export_sfc(_sfc_main70, [["__file", "/home/runner/work/el // node_modules/element-plus/es/components/dialog/src/dialog.mjs var dialogProps = buildProps({ ...dialogContentProps, - appendToBody: Boolean, + appendToBody: { + type: Boolean, + default: false + }, beforeClose: { type: definePropType(Function) }, - destroyOnClose: Boolean, + destroyOnClose: { + type: Boolean, + default: false + }, closeOnClickModal: { type: Boolean, default: true @@ -38566,7 +38547,10 @@ var dialogProps = buildProps({ top: { type: String }, - modelValue: Boolean, + modelValue: { + type: Boolean, + default: false + }, modalClass: String, width: { type: [String, Number] @@ -38577,10 +38561,6 @@ var dialogProps = buildProps({ trapFocus: { type: Boolean, default: false - }, - headerAriaLevel: { - type: String, - default: "2" } }); var dialogEmits = { @@ -38588,7 +38568,7 @@ var dialogEmits = { opened: () => true, close: () => true, closed: () => true, - [UPDATE_MODEL_EVENT]: (value) => isBoolean2(value), + [UPDATE_MODEL_EVENT]: (value) => isBoolean(value), openAutoFocus: () => true, closeAutoFocus: () => true }; @@ -38765,7 +38745,7 @@ var useDialog = (props, targetRef) => { }; // node_modules/element-plus/es/components/dialog/src/dialog2.mjs -var _hoisted_1324 = ["aria-label", "aria-labelledby", "aria-describedby"]; +var _hoisted_1325 = ["aria-label", "aria-labelledby", "aria-describedby"]; var __default__54 = defineComponent({ name: "ElDialog", inheritAttrs: false @@ -38883,7 +38863,6 @@ var _sfc_main71 = defineComponent({ fullscreen: _ctx.fullscreen, "show-close": _ctx.showClose, title: _ctx.title, - "aria-level": _ctx.headerAriaLevel, onClose: unref(handleClose) }), createSlots({ header: withCtx(() => [ @@ -38905,11 +38884,11 @@ var _sfc_main71 = defineComponent({ renderSlot(_ctx.$slots, "footer") ]) } : void 0 - ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : createCommentVNode("v-if", true) + ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) : createCommentVNode("v-if", true) ]), _: 3 }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"]) - ], 46, _hoisted_1324) + ], 46, _hoisted_1325) ]), _: 3 }, 8, ["mask", "overlay-class", "z-index"]), [ @@ -39000,10 +38979,6 @@ var drawerProps = buildProps({ modalFade: { type: Boolean, default: true - }, - headerAriaLevel: { - type: String, - default: "2" } }); var drawerEmits = dialogEmits; @@ -39053,8 +39028,8 @@ var _sfc_main73 = defineComponent({ }; } }); -var _hoisted_1325 = ["aria-label", "aria-labelledby", "aria-describedby"]; -var _hoisted_2314 = ["id", "aria-level"]; +var _hoisted_1326 = ["aria-label", "aria-labelledby", "aria-describedby"]; +var _hoisted_2314 = ["id"]; var _hoisted_3304 = ["aria-label"]; var _hoisted_491 = ["id"]; function _sfc_render301(_ctx, _cache, $props, $setup, $data, $options) { @@ -39121,7 +39096,6 @@ function _sfc_render301(_ctx, _cache, $props, $setup, $data, $options) { key: 0, id: _ctx.titleId, role: "heading", - "aria-level": _ctx.headerAriaLevel, class: normalizeClass(_ctx.ns.e("title")) }, toDisplayString(_ctx.title), 11, _hoisted_2314)) : createCommentVNode("v-if", true) ]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [ @@ -39157,7 +39131,7 @@ function _sfc_render301(_ctx, _cache, $props, $setup, $data, $options) { }, [ renderSlot(_ctx.$slots, "footer") ], 2)) : createCommentVNode("v-if", true) - ], 16, _hoisted_1325) + ], 16, _hoisted_1326) ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"]) @@ -39682,20 +39656,20 @@ var _sfc_main79 = defineComponent({ maxHeight: addUnit(props.maxHeight) })); const dropdownTriggerKls = computed2(() => [ns.m(dropdownSize.value)]); - const trigger = computed2(() => castArray_default(props.trigger)); const defaultTriggerId = useId().value; const triggerId = computed2(() => { return props.id || defaultTriggerId; }); - watch([triggeringElementRef, trigger], ([triggeringElement, trigger2], [prevTriggeringElement]) => { + watch([triggeringElementRef, toRef(props, "trigger")], ([triggeringElement, trigger], [prevTriggeringElement]) => { var _a2, _b, _c; + const triggerArray = isArray(trigger) ? trigger : [trigger]; if ((_a2 = prevTriggeringElement == null ? void 0 : prevTriggeringElement.$el) == null ? void 0 : _a2.removeEventListener) { prevTriggeringElement.$el.removeEventListener("pointerenter", onAutofocusTriggerEnter); } if ((_b = triggeringElement == null ? void 0 : triggeringElement.$el) == null ? void 0 : _b.removeEventListener) { triggeringElement.$el.removeEventListener("pointerenter", onAutofocusTriggerEnter); } - if (((_c = triggeringElement == null ? void 0 : triggeringElement.$el) == null ? void 0 : _c.addEventListener) && trigger2.includes("hover")) { + if (((_c = triggeringElement == null ? void 0 : triggeringElement.$el) == null ? void 0 : _c.addEventListener) && triggerArray.includes("hover")) { triggeringElement.$el.addEventListener("pointerenter", onAutofocusTriggerEnter); } }, { immediate: true }); @@ -39728,7 +39702,7 @@ var _sfc_main79 = defineComponent({ } function onItemLeave() { const contentEl = unref(contentRef); - trigger.value.includes("hover") && (contentEl == null ? void 0 : contentEl.focus()); + contentEl == null ? void 0 : contentEl.focus(); currentTabId.value = null; } function handleCurrentTabIdChange(id) { @@ -39990,7 +39964,7 @@ var _sfc_main80 = defineComponent({ }; } }); -var _hoisted_1326 = ["aria-disabled", "tabindex", "role"]; +var _hoisted_1327 = ["aria-disabled", "tabindex", "role"]; function _sfc_render308(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_icon = resolveComponent("el-icon"); return openBlock(), createElementBlock(Fragment, null, [ @@ -40018,7 +39992,7 @@ function _sfc_render308(_ctx, _cache, $props, $setup, $data, $options) { _: 1 })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default") - ], 16, _hoisted_1326) + ], 16, _hoisted_1327) ], 64); } var ElDropdownItemImpl = _export_sfc(_sfc_main80, [["render", _sfc_render308], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]]); @@ -40204,7 +40178,7 @@ var _sfc_main82 = defineComponent({ }; } }); -var _hoisted_1327 = ["role", "aria-labelledby"]; +var _hoisted_1328 = ["role", "aria-labelledby"]; function _sfc_render310(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("ul", { ref: _ctx.dropdownListWrapperRef, @@ -40219,7 +40193,7 @@ function _sfc_render310(_ctx, _cache, $props, $setup, $data, $options) { onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onMousedown && _ctx.onMousedown(...args), ["self"])) }, [ renderSlot(_ctx.$slots, "default") - ], 46, _hoisted_1327); + ], 46, _hoisted_1328); } var DropdownMenu = _export_sfc(_sfc_main82, [["render", _sfc_render310], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]); @@ -40232,7 +40206,7 @@ var ElDropdownItem = withNoopInstall(DropdownItem); var ElDropdownMenu = withNoopInstall(DropdownMenu); // node_modules/element-plus/es/components/empty/src/img-empty.mjs -var _hoisted_1328 = { +var _hoisted_1329 = { viewBox: "0 0 79 86", version: "1.1", xmlns: "http://www.w3.org/2000/svg", @@ -40242,10 +40216,10 @@ var _hoisted_2315 = ["id"]; var _hoisted_3305 = ["stop-color"]; var _hoisted_492 = ["stop-color"]; var _hoisted_527 = ["id"]; -var _hoisted_64 = ["stop-color"]; -var _hoisted_73 = ["stop-color"]; -var _hoisted_82 = ["id"]; -var _hoisted_92 = { +var _hoisted_63 = ["stop-color"]; +var _hoisted_72 = ["stop-color"]; +var _hoisted_8 = ["id"]; +var _hoisted_9 = { id: "Illustrations", stroke: "none", "stroke-width": "1", @@ -40261,7 +40235,7 @@ var _hoisted_11 = { transform: "translate(1268.000000, 535.000000)" }; var _hoisted_12100 = ["fill"]; -var _hoisted_1329 = ["fill"]; +var _hoisted_1330 = ["fill"]; var _hoisted_1410 = { id: "Group-Copy", transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" @@ -40287,7 +40261,7 @@ var _sfc_main83 = defineComponent({ const ns = useNamespace("empty"); const id = useId(); return (_ctx, _cache) => { - return openBlock(), createElementBlock("svg", _hoisted_1328, [ + return openBlock(), createElementBlock("svg", _hoisted_1329, [ createBaseVNode("defs", null, [ createBaseVNode("linearGradient", { id: `linearGradient-1-${unref(id)}`, @@ -40315,11 +40289,11 @@ var _sfc_main83 = defineComponent({ createBaseVNode("stop", { "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`, offset: "0%" - }, null, 8, _hoisted_64), + }, null, 8, _hoisted_63), createBaseVNode("stop", { "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`, offset: "100%" - }, null, 8, _hoisted_73) + }, null, 8, _hoisted_72) ], 8, _hoisted_527), createBaseVNode("rect", { id: `path-3-${unref(id)}`, @@ -40327,9 +40301,9 @@ var _sfc_main83 = defineComponent({ y: "0", width: "17", height: "36" - }, null, 8, _hoisted_82) + }, null, 8, _hoisted_8) ]), - createBaseVNode("g", _hoisted_92, [ + createBaseVNode("g", _hoisted_9, [ createBaseVNode("g", _hoisted_10, [ createBaseVNode("g", _hoisted_11, [ createBaseVNode("path", { @@ -40342,7 +40316,7 @@ var _sfc_main83 = defineComponent({ fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`, transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ", points: "13 58 53 58 42 45 2 45" - }, null, 8, _hoisted_1329), + }, null, 8, _hoisted_1330), createBaseVNode("g", _hoisted_1410, [ createBaseVNode("polygon", { id: "Rectangle-Copy-10", @@ -40423,7 +40397,7 @@ var emptyProps = buildProps({ }); // node_modules/element-plus/es/components/empty/src/empty2.mjs -var _hoisted_1330 = ["src"]; +var _hoisted_1331 = ["src"]; var _hoisted_2317 = { key: 1 }; var __default__57 = defineComponent({ name: "ElEmpty" @@ -40451,7 +40425,7 @@ var _sfc_main84 = defineComponent({ key: 0, src: _ctx.image, ondragstart: "return false" - }, null, 8, _hoisted_1330)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [ + }, null, 8, _hoisted_1331)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [ createVNode(ImgEmpty) ]) ], 6), @@ -40492,8 +40466,14 @@ var imageViewerProps = buildProps({ type: Boolean, default: true }, - hideOnClickModal: Boolean, - teleported: Boolean, + hideOnClickModal: { + type: Boolean, + default: false + }, + teleported: { + type: Boolean, + default: false + }, closeOnPressEscape: { type: Boolean, default: true @@ -40505,12 +40485,11 @@ var imageViewerProps = buildProps({ }); var imageViewerEmits = { close: () => true, - switch: (index) => isNumber3(index), - rotate: (deg) => isNumber3(deg) + switch: (index) => isNumber(index) }; // node_modules/element-plus/es/components/image-viewer/src/image-viewer2.mjs -var _hoisted_1331 = ["src"]; +var _hoisted_1332 = ["src"]; var __default__58 = defineComponent({ name: "ElImageViewer" }); @@ -40559,16 +40538,6 @@ var _sfc_main85 = defineComponent({ const currentImg = computed2(() => { return props.urlList[activeIndex.value]; }); - const arrowPrevKls = computed2(() => [ - ns.e("btn"), - ns.e("prev"), - ns.is("disabled", !props.infinite && isFirst.value) - ]); - const arrowNextKls = computed2(() => [ - ns.e("btn"), - ns.e("next"), - ns.is("disabled", !props.infinite && isLast.value) - ]); const imgStyle = computed2(() => { const { scale, deg, offsetX, offsetY, enableTransition } = transform2.value; let translateX = offsetX / scale; @@ -40600,7 +40569,7 @@ var _sfc_main85 = defineComponent({ return style; }); const computedZIndex = computed2(() => { - return isNumber3(props.zIndex) ? props.zIndex : nextZIndex(); + return isNumber(props.zIndex) ? props.zIndex : nextZIndex(); }); function hide2() { unregisterEventListener(); @@ -40727,11 +40696,9 @@ var _sfc_main85 = defineComponent({ break; case "clockwise": transform2.value.deg += rotateDeg; - emit("rotate", transform2.value.deg); break; case "anticlockwise": transform2.value.deg -= rotateDeg; - emit("rotate", transform2.value.deg); break; } transform2.value.enableTransition = enableTransition; @@ -40792,7 +40759,11 @@ var _sfc_main85 = defineComponent({ createCommentVNode(" ARROW "), !unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createBaseVNode("span", { - class: normalizeClass(unref(arrowPrevKls)), + class: normalizeClass([ + unref(ns).e("btn"), + unref(ns).e("prev"), + unref(ns).is("disabled", !_ctx.infinite && unref(isFirst)) + ]), onClick: prev }, [ createVNode(unref(ElIcon), null, { @@ -40803,7 +40774,11 @@ var _sfc_main85 = defineComponent({ }) ], 2), createBaseVNode("span", { - class: normalizeClass(unref(arrowNextKls)), + class: normalizeClass([ + unref(ns).e("btn"), + unref(ns).e("next"), + unref(ns).is("disabled", !_ctx.infinite && unref(isLast)) + ]), onClick: next }, [ createVNode(unref(ElIcon), null, { @@ -40882,7 +40857,7 @@ var _sfc_main85 = defineComponent({ onLoad: handleImgLoad, onError: handleImgError, onMousedown: handleMouseDown - }, null, 46, _hoisted_1331)), [ + }, null, 46, _hoisted_1332)), [ [vShow, i === activeIndex.value] ]); }), 128)) @@ -40903,7 +40878,10 @@ var ElImageViewer = withInstall(ImageViewer); // node_modules/element-plus/es/components/image/src/image.mjs var imageProps = buildProps({ - hideOnClickModal: Boolean, + hideOnClickModal: { + type: Boolean, + default: false + }, src: { type: String, default: "" @@ -40917,7 +40895,10 @@ var imageProps = buildProps({ type: String, values: ["eager", "lazy"] }, - lazy: Boolean, + lazy: { + type: Boolean, + default: false + }, scrollContainer: { type: definePropType([String, Object]) }, @@ -40925,7 +40906,10 @@ var imageProps = buildProps({ type: definePropType(Array), default: () => mutable([]) }, - previewTeleported: Boolean, + previewTeleported: { + type: Boolean, + default: false + }, zIndex: { type: Number }, @@ -40949,13 +40933,13 @@ var imageProps = buildProps({ var imageEmits = { load: (evt) => evt instanceof Event, error: (evt) => evt instanceof Event, - switch: (val) => isNumber3(val), + switch: (val) => isNumber(val), close: () => true, show: () => true }; // node_modules/element-plus/es/components/image/src/image2.mjs -var _hoisted_1332 = ["src", "loading"]; +var _hoisted_1333 = ["src", "loading"]; var _hoisted_2318 = { key: 0 }; var __default__59 = defineComponent({ name: "ElImage", @@ -40981,11 +40965,6 @@ var _sfc_main86 = defineComponent({ const supportLoading = isClient && "loading" in HTMLImageElement.prototype; let stopScrollListener; let stopWheelListener; - const imageKls = computed2(() => [ - ns.e("inner"), - preview.value && ns.e("preview"), - isLoading.value && ns.is("loading") - ]); const containerStyle = computed2(() => rawAttrs.style); const imageStyle = computed2(() => { const { fit } = props; @@ -41034,7 +41013,7 @@ var _sfc_main86 = defineComponent({ removeLazyLoadListener(); } } - const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true); + const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200); async function addLazyLoadListener() { var _a2; if (!isClient) @@ -41114,31 +41093,33 @@ var _sfc_main86 = defineComponent({ class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]), style: normalizeStyle(unref(containerStyle)) }, [ - hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [ - createBaseVNode("div", { - class: normalizeClass(unref(ns).e("error")) - }, toDisplayString(unref(t)("el.image.error")), 3) - ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ - imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(attrs), { - src: imageSrc.value, - loading: _ctx.loading, - style: unref(imageStyle), - class: unref(imageKls), - onClick: clickHandler, - onLoad: handleLoad, - onError: handleError - }), null, 16, _hoisted_1332)) : createCommentVNode("v-if", true), - isLoading.value ? (openBlock(), createElementBlock("div", { - key: 1, - class: normalizeClass(unref(ns).e("wrapper")) - }, [ - renderSlot(_ctx.$slots, "placeholder", {}, () => [ - createBaseVNode("div", { - class: normalizeClass(unref(ns).e("placeholder")) - }, null, 2) - ]) - ], 2)) : createCommentVNode("v-if", true) - ], 64)), + imageSrc.value !== void 0 && !hasLoadError.value ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(attrs), { + src: imageSrc.value, + loading: _ctx.loading, + style: unref(imageStyle), + class: [ + unref(ns).e("inner"), + unref(preview) && unref(ns).e("preview"), + isLoading.value && unref(ns).is("loading") + ], + onClick: clickHandler, + onLoad: handleLoad, + onError: handleError + }), null, 16, _hoisted_1333)) : createCommentVNode("v-if", true), + isLoading.value || hasLoadError.value ? (openBlock(), createElementBlock("div", { + key: 1, + class: normalizeClass(unref(ns).e("wrapper")) + }, [ + isLoading.value ? renderSlot(_ctx.$slots, "placeholder", { key: 0 }, () => [ + createBaseVNode("div", { + class: normalizeClass(unref(ns).e("placeholder")) + }, null, 2) + ]) : hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 1 }, () => [ + createBaseVNode("div", { + class: normalizeClass(unref(ns).e("error")) + }, toDisplayString(unref(t)("el.image.error")), 3) + ]) : createCommentVNode("v-if", true) + ], 2)) : createCommentVNode("v-if", true), unref(preview) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [ showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), { key: 0, @@ -41204,7 +41185,7 @@ var inputNumberProps = buildProps({ }, valueOnClear: { type: [String, Number, null], - validator: (val) => val === null || isNumber3(val) || ["min", "max"].includes(val), + validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val), default: null }, name: String, @@ -41223,12 +41204,12 @@ var inputNumberEmits = { [CHANGE_EVENT]: (cur, prev) => prev !== cur, blur: (e) => e instanceof FocusEvent, focus: (e) => e instanceof FocusEvent, - [INPUT_EVENT]: (val) => isNumber3(val) || isNil_default(val), - [UPDATE_MODEL_EVENT]: (val) => isNumber3(val) || isNil_default(val) + [INPUT_EVENT]: (val) => isNumber(val) || isNil_default(val), + [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil_default(val) }; // node_modules/element-plus/es/components/input-number/src/input-number2.mjs -var _hoisted_1333 = ["aria-label", "onKeydown"]; +var _hoisted_1334 = ["aria-label", "onKeydown"]; var _hoisted_2319 = ["aria-label", "onKeydown"]; var __default__60 = defineComponent({ name: "ElInputNumber" @@ -41247,8 +41228,8 @@ var _sfc_main87 = defineComponent({ userInput: null }); const { formItem } = useFormItem(); - const minDisabled = computed2(() => isNumber3(props.modelValue) && props.modelValue <= props.min); - const maxDisabled = computed2(() => isNumber3(props.modelValue) && props.modelValue >= props.max); + const minDisabled = computed2(() => isNumber(props.modelValue) && props.modelValue <= props.min); + const maxDisabled = computed2(() => isNumber(props.modelValue) && props.modelValue >= props.max); const numPrecision = computed2(() => { const stepPrecision = getPrecision(props.step); if (!isUndefined2(props.precision)) { @@ -41272,7 +41253,7 @@ var _sfc_main87 = defineComponent({ let currentValue = data.currentValue; if (isNil_default(currentValue)) return ""; - if (isNumber3(currentValue)) { + if (isNumber(currentValue)) { if (Number.isNaN(currentValue)) return ""; if (!isUndefined2(props.precision)) { @@ -41312,7 +41293,7 @@ var _sfc_main87 = defineComponent({ return precision; }; const ensurePrecision = (val, coefficient = 1) => { - if (!isNumber3(val)) + if (!isNumber(val)) return data.currentValue; return toPrecision(val + props.step * coefficient); }; @@ -41333,10 +41314,7 @@ var _sfc_main87 = defineComponent({ emit(INPUT_EVENT, data.currentValue); }; const verifyValue = (value, update2) => { - const { max: max4, min: min4, step, precision, stepStrictly, valueOnClear } = props; - if (max4 < min4) { - throwError("InputNumber", "min should not be greater than max."); - } + const { max: max5, min: min5, step, precision, stepStrictly, valueOnClear } = props; let newVal = Number(value); if (isNil_default(value) || Number.isNaN(newVal)) { return null; @@ -41345,7 +41323,7 @@ var _sfc_main87 = defineComponent({ if (valueOnClear === null) { return null; } - newVal = isString(valueOnClear) ? { min: min4, max: max4 }[valueOnClear] : valueOnClear; + newVal = isString(valueOnClear) ? { min: min5, max: max5 }[valueOnClear] : valueOnClear; } if (stepStrictly) { newVal = toPrecision(Math.round(newVal / step) * step, precision); @@ -41353,8 +41331,8 @@ var _sfc_main87 = defineComponent({ if (!isUndefined2(precision)) { newVal = toPrecision(newVal, precision); } - if (newVal > max4 || newVal < min4) { - newVal = newVal > max4 ? max4 : min4; + if (newVal > max5 || newVal < min5) { + newVal = newVal > max5 ? max5 : min5; update2 && emit(UPDATE_MODEL_EVENT, newVal); } return newVal; @@ -41385,7 +41363,7 @@ var _sfc_main87 = defineComponent({ }; const handleInputChange = (value) => { const newVal = value !== "" ? Number(value) : ""; - if (isNumber3(newVal) && !Number.isNaN(newVal) || value === "") { + if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") { setCurrentValue(newVal); } data.userInput = null; @@ -41411,29 +41389,29 @@ var _sfc_main87 = defineComponent({ watch(() => props.modelValue, (value) => { const userInput = verifyValue(data.userInput); const newValue = verifyValue(value, true); - if (!isNumber3(userInput) && (!userInput || userInput !== newValue)) { + if (!isNumber(userInput) && (!userInput || userInput !== newValue)) { data.currentValue = newValue; data.userInput = null; } }, { immediate: true }); onMounted(() => { var _a2; - const { min: min4, max: max4, modelValue } = props; + const { min: min5, max: max5, modelValue } = props; const innerInput = (_a2 = input.value) == null ? void 0 : _a2.input; innerInput.setAttribute("role", "spinbutton"); - if (Number.isFinite(max4)) { - innerInput.setAttribute("aria-valuemax", String(max4)); + if (Number.isFinite(max5)) { + innerInput.setAttribute("aria-valuemax", String(max5)); } else { innerInput.removeAttribute("aria-valuemax"); } - if (Number.isFinite(min4)) { - innerInput.setAttribute("aria-valuemin", String(min4)); + if (Number.isFinite(min5)) { + innerInput.setAttribute("aria-valuemin", String(min5)); } else { innerInput.removeAttribute("aria-valuemin"); } - innerInput.setAttribute("aria-valuenow", data.currentValue || data.currentValue === 0 ? String(data.currentValue) : ""); + innerInput.setAttribute("aria-valuenow", String(data.currentValue)); innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value)); - if (!isNumber3(modelValue) && modelValue != null) { + if (!isNumber(modelValue) && modelValue != null) { let val = Number(modelValue); if (Number.isNaN(val)) { val = null; @@ -41442,9 +41420,9 @@ var _sfc_main87 = defineComponent({ } }); onUpdated(() => { - var _a2, _b; + var _a2; const innerInput = (_a2 = input.value) == null ? void 0 : _a2.input; - innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${(_b = data.currentValue) != null ? _b : ""}`); + innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${data.currentValue}`); }); expose({ focus, @@ -41475,7 +41453,7 @@ var _sfc_main87 = defineComponent({ ]), _: 1 }) - ], 42, _hoisted_1333)), [ + ], 42, _hoisted_1334)), [ [unref(vRepeatClick), decrease] ]) : createCommentVNode("v-if", true), _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", { @@ -41552,7 +41530,7 @@ var linkEmits = { }; // node_modules/element-plus/es/components/link/src/link2.mjs -var _hoisted_1334 = ["href"]; +var _hoisted_1335 = ["href"]; var __default__61 = defineComponent({ name: "ElLink" }); @@ -41592,7 +41570,7 @@ var _sfc_main88 = defineComponent({ renderSlot(_ctx.$slots, "default") ], 2)) : createCommentVNode("v-if", true), _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true) - ], 10, _hoisted_1334); + ], 10, _hoisted_1335); }; } }); @@ -41927,8 +41905,6 @@ var SubMenu2 = defineComponent({ "left-start" ] : [ "right-start", - "right", - "right-end", "left-start", "bottom-start", "bottom-end", @@ -41959,7 +41935,6 @@ var SubMenu2 = defineComponent({ indexPath, active }); - const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1); const titleStyle = computed2(() => { if (mode.value !== "horizontal") { return { @@ -42060,6 +42035,7 @@ var SubMenu2 = defineComponent({ default: () => isString(subMenuTitleIcon.value) ? h(instance.appContext.components[subMenuTitleIcon.value]) : h(subMenuTitleIcon.value) }) ]; + const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1); const child = rootMenu.isMenuPopup ? h(ElTooltip, { ref: vPopper, visible: opened.value, @@ -42281,7 +42257,7 @@ var Menu2 = defineComponent({ var _a2, _b; if (!menu.value) return -1; - const items2 = Array.from((_b = (_a2 = menu.value) == null ? void 0 : _a2.childNodes) != null ? _b : []).filter((item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue)); + const items2 = Array.from((_b = (_a2 = menu.value) == null ? void 0 : _a2.childNodes) != null ? _b : []).filter((item) => item.nodeName !== "#text" || item.nodeValue); const moreItemWidth = 64; const paddingLeft = Number.parseInt(getComputedStyle(menu.value).paddingLeft, 10); const paddingRight = Number.parseInt(getComputedStyle(menu.value).paddingRight, 10); @@ -42596,7 +42572,7 @@ var pageHeaderEmits = { }; // node_modules/element-plus/es/components/page-header/src/page-header2.mjs -var _hoisted_1335 = ["aria-label"]; +var _hoisted_1336 = ["aria-label"]; var __default__62 = defineComponent({ name: "ElPageHeader" }); @@ -42656,7 +42632,7 @@ var _sfc_main92 = defineComponent({ _: 1 })) : createCommentVNode("v-if", true) ]) - ], 10, _hoisted_1335)) : createCommentVNode("v-if", true), + ], 10, _hoisted_1336)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [ @@ -42718,7 +42694,7 @@ var paginationPrevEmits = { }; // node_modules/element-plus/es/components/pagination/src/components/prev2.mjs -var _hoisted_1336 = ["disabled", "aria-label", "aria-disabled"]; +var _hoisted_1337 = ["disabled", "aria-label", "aria-disabled"]; var _hoisted_2320 = { key: 0 }; var __default__63 = defineComponent({ name: "ElPaginationPrev" @@ -42746,7 +42722,7 @@ var _sfc_main93 = defineComponent({ ]), _: 1 })) - ], 8, _hoisted_1336); + ], 8, _hoisted_1337); }; } }); @@ -42772,7 +42748,7 @@ var paginationNextProps = buildProps({ }); // node_modules/element-plus/es/components/pagination/src/components/next2.mjs -var _hoisted_1337 = ["disabled", "aria-label", "aria-disabled"]; +var _hoisted_1338 = ["disabled", "aria-label", "aria-disabled"]; var _hoisted_2321 = { key: 0 }; var __default__64 = defineComponent({ name: "ElPaginationNext" @@ -42800,7 +42776,7 @@ var _sfc_main94 = defineComponent({ ]), _: 1 })) - ], 8, _hoisted_1337); + ], 8, _hoisted_1338); }; } }); @@ -42915,18 +42891,13 @@ var _sfc_main95 = defineComponent({ }, label: [String, Number], created: Boolean, - disabled: Boolean + disabled: { + type: Boolean, + default: false + } }, setup(props) { const ns = useNamespace("select"); - const containerKls = computed2(() => [ - ns.be("dropdown", "item"), - ns.is("disabled", unref(isDisabled)), - { - selected: unref(itemSelected), - hover: unref(hover) - } - ]); const states = reactive({ index: -1, groupDisabled: false, @@ -42954,12 +42925,11 @@ var _sfc_main95 = defineComponent({ }); function selectOptionClick() { if (props.disabled !== true && states.groupDisabled !== true) { - select.handleOptionSelect(vm); + select.handleOptionSelect(vm, true); } } return { ns, - containerKls, currentLabel, itemSelected, isDisabled, @@ -42974,7 +42944,14 @@ var _sfc_main95 = defineComponent({ }); function _sfc_render314(_ctx, _cache, $props, $setup, $data, $options) { return withDirectives((openBlock(), createElementBlock("li", { - class: normalizeClass(_ctx.containerKls), + class: normalizeClass([ + _ctx.ns.be("dropdown", "item"), + _ctx.ns.is("disabled", _ctx.isDisabled), + { + selected: _ctx.itemSelected, + hover: _ctx.hover + } + ]), onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)), onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"])) }, [ @@ -43031,7 +43008,6 @@ function useSelectStates(props) { return reactive({ options: /* @__PURE__ */ new Map(), cachedOptions: /* @__PURE__ */ new Map(), - disabledOptions: /* @__PURE__ */ new Map(), createdLabel: null, createdSelected: false, selected: props.multiple ? [] : {}, @@ -43040,6 +43016,7 @@ function useSelectStates(props) { optionsCount: 0, filteredOptionsCount: 0, visible: false, + softFocus: false, selectedLabel: "", hoverIndex: -1, query: "", @@ -43049,9 +43026,10 @@ function useSelectStates(props) { currentPlaceholder: t("el.select.placeholder"), menuVisibleOnFocus: false, isOnComposition: false, + isSilentBlur: false, prefixWidth: 11, - mouseEnter: false, - focused: false + tagInMultiLine: false, + mouseEnter: false }); } var useSelect = (props, states, ctx) => { @@ -43068,7 +43046,6 @@ var useSelect = (props, states, ctx) => { const input = ref(null); const iOSInput = ref(null); const tooltipRef = ref(null); - const tagTooltipRef = ref(null); const tags = ref(null); const selectWrapper = ref(null); const scrollbar = ref(null); @@ -43087,7 +43064,6 @@ var useSelect = (props, states, ctx) => { }); const iconComponent = computed2(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon); const iconReverse = computed2(() => ns.is("reverse", iconComponent.value && states.visible && props.suffixTransition)); - const showStatusIconAndState = computed2(() => (form == null ? void 0 : form.statusIcon) && (formItem == null ? void 0 : formItem.validateState) && ValidateComponentsMap[formItem == null ? void 0 : formItem.validateState]); const debounce$1 = computed2(() => props.remote ? 300 : 0); const emptyText = computed2(() => { if (props.loading) { @@ -43113,7 +43089,7 @@ var useSelect = (props, states, ctx) => { newList.push(list[index]); } }); - return newList.length >= list.length ? newList : list; + return newList.length ? newList : list; }); const cachedOptionsArray = computed2(() => Array.from(states.cachedOptions.values())); const showNewOption = computed2(() => { @@ -43141,10 +43117,6 @@ var useSelect = (props, states, ctx) => { }); watch(() => props.placeholder, (val) => { states.cachedPlaceHolder = states.currentPlaceholder = val; - const hasValue = props.multiple && Array.isArray(props.modelValue) && props.modelValue.length > 0; - if (hasValue) { - states.currentPlaceholder = ""; - } }); watch(() => props.modelValue, (val, oldVal) => { if (props.multiple) { @@ -43181,6 +43153,7 @@ var useSelect = (props, states, ctx) => { props.remoteMethod(""); } } + input.value && input.value.blur(); states.query = ""; states.previousQuery = null; states.selectedLabel = ""; @@ -43239,7 +43212,7 @@ var useSelect = (props, states, ctx) => { resetInputHeight(); } const inputs = ((_c = selectWrapper.value) == null ? void 0 : _c.querySelectorAll("input")) || []; - if (!props.filterable && !props.defaultFirstOption && !isUndefined2(props.modelValue) || !Array.from(inputs).includes(document.activeElement)) { + if (!Array.from(inputs).includes(document.activeElement)) { setSelected(); } if (props.defaultFirstOption && (props.filterable || props.remote) && states.filteredOptionsCount) { @@ -43249,7 +43222,7 @@ var useSelect = (props, states, ctx) => { flush: "post" }); watch(() => states.hoverIndex, (val) => { - if (isNumber3(val) && val > -1) { + if (isNumber(val) && val > -1) { hoverOption.value = optionsArray.value[val] || {}; } else { hoverOption.value = {}; @@ -43267,9 +43240,10 @@ var useSelect = (props, states, ctx) => { originClientHeight = originClientHeight || (input2.clientHeight > 0 ? input2.clientHeight + 2 : 0); const _tags = tags.value; const gotSize = getComponentSize(selectSize.value || (form == null ? void 0 : form.size)); - const sizeInMap = selectSize.value || gotSize === originClientHeight || originClientHeight <= 0 ? gotSize : originClientHeight; + const sizeInMap = gotSize === originClientHeight || originClientHeight <= 0 ? gotSize : originClientHeight; const isElHidden = input2.offsetParent === null; !isElHidden && (input2.style.height = `${(states.selected.length === 0 ? sizeInMap : Math.max(_tags ? _tags.clientHeight + (_tags.clientHeight > sizeInMap ? 6 : 0) : 0, sizeInMap)) - 2}px`); + states.tagInMultiLine = Number.parseFloat(input2.style.height) >= sizeInMap; if (states.visible && emptyText.value !== false) { (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2); } @@ -43291,11 +43265,9 @@ var useSelect = (props, states, ctx) => { states.hoverIndex = -1; if (props.multiple && props.filterable) { nextTick(() => { - if (!selectDisabled.value) { - const length = input.value.value.length * 15 + 20; - states.inputLength = props.collapseTags ? Math.min(50, length) : length; - managePlaceholder(); - } + const length = input.value.value.length * 15 + 20; + states.inputLength = props.collapseTags ? Math.min(50, length) : length; + managePlaceholder(); resetInputHeight(); }); } @@ -43360,7 +43332,7 @@ var useSelect = (props, states, ctx) => { let option; const isObjectValue = toRawType(value).toLowerCase() === "object"; const isNull2 = toRawType(value).toLowerCase() === "null"; - const isUndefined22 = toRawType(value).toLowerCase() === "undefined"; + const isUndefined3 = toRawType(value).toLowerCase() === "undefined"; for (let i = states.cachedOptions.size - 1; i >= 0; i--) { const cachedOption = cachedOptionsArray.value[i]; const isEqualValue = isObjectValue ? get_default(cachedOption.value, props.valueKey) === get_default(value, props.valueKey) : cachedOption.value === value; @@ -43375,7 +43347,7 @@ var useSelect = (props, states, ctx) => { } if (option) return option; - const label = isObjectValue ? value.label : !isNull2 && !isUndefined22 ? value : ""; + const label = isObjectValue ? value.label : !isNull2 && !isUndefined3 ? value : ""; const newOption = { value, currentLabel: label @@ -43410,7 +43382,8 @@ var useSelect = (props, states, ctx) => { var _a2, _b; resetInputWidth(); (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2); - props.multiple && resetInputHeight(); + if (props.multiple) + resetInputHeight(); }; const resetInputWidth = () => { var _a2; @@ -43433,16 +43406,10 @@ var useSelect = (props, states, ctx) => { ctx.emit(CHANGE_EVENT, val); } }; - const getLastNotDisabledIndex = (value) => findLastIndex_default(value, (it2) => !states.disabledOptions.has(it2)); const deletePrevTag = (e) => { - if (e.code === EVENT_CODE.delete) - return; if (e.target.value.length <= 0 && !toggleLastOptionHitState()) { const value = props.modelValue.slice(); - const lastNotDisabledIndex = getLastNotDisabledIndex(value); - if (lastNotDisabledIndex < 0) - return; - value.splice(lastNotDisabledIndex, 1); + value.pop(); ctx.emit(UPDATE_MODEL_EVENT, value); emitChange(value); } @@ -43460,7 +43427,6 @@ var useSelect = (props, states, ctx) => { ctx.emit("remove-tag", tag.value); } event.stopPropagation(); - focus(); }; const deleteSelected = (event) => { event.stopPropagation(); @@ -43476,9 +43442,8 @@ var useSelect = (props, states, ctx) => { states.hoverIndex = -1; states.visible = false; ctx.emit("clear"); - focus(); }; - const handleOptionSelect = (option) => { + const handleOptionSelect = (option, byClick) => { var _a2; if (props.multiple) { const value = (props.modelValue || []).slice(); @@ -43502,6 +43467,7 @@ var useSelect = (props, states, ctx) => { emitChange(option.value); states.visible = false; } + states.isSilentBlur = byClick; setSoftFocus(); if (states.visible) return; @@ -43524,6 +43490,7 @@ var useSelect = (props, states, ctx) => { return index; }; const setSoftFocus = () => { + states.softFocus = true; const _input = input.value || reference.value; if (_input) { _input == null ? void 0 : _input.focus(); @@ -43552,7 +43519,6 @@ var useSelect = (props, states, ctx) => { states.filteredOptionsCount++; states.options.set(vm.value, vm); states.cachedOptions.set(vm.value, vm); - vm.disabled && states.disabledOptions.set(vm.value, vm); }; const onOptionDestroy = (key, vm) => { if (states.options.get(key) === vm) { @@ -43570,8 +43536,7 @@ var useSelect = (props, states, ctx) => { const toggleLastOptionHitState = (hit) => { if (!Array.isArray(states.selected)) return; - const lastNotDisabledIndex = getLastNotDisabledIndex(states.selected.map((it2) => it2.value)); - const option = states.selected[lastNotDisabledIndex]; + const option = states.selected[states.selected.length - 1]; if (!option) return; if (hit === true || hit === false) { @@ -43595,24 +43560,16 @@ var useSelect = (props, states, ctx) => { nextTick(() => scrollToOption(states.selected)); }; const handleFocus = (event) => { - if (!states.focused) { + if (!states.softFocus) { if (props.automaticDropdown || props.filterable) { if (props.filterable && !states.visible) { states.menuVisibleOnFocus = true; } states.visible = true; } - states.focused = true; ctx.emit("focus", event); - } - }; - const focus = () => { - var _a2, _b; - if (states.visible) { - ; - (_a2 = input.value || reference.value) == null ? void 0 : _a2.focus(); } else { - (_b = reference.value) == null ? void 0 : _b.focus(); + states.softFocus = false; } }; const blur = () => { @@ -43622,13 +43579,14 @@ var useSelect = (props, states, ctx) => { (_c = (_b = iOSInput.value) == null ? void 0 : _b.blur) == null ? void 0 : _c.call(_b); }; const handleBlur = (event) => { - var _a2, _b, _c; - if (((_a2 = tooltipRef.value) == null ? void 0 : _a2.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event)) || ((_c = selectWrapper.value) == null ? void 0 : _c.contains(event.relatedTarget))) { - return; - } - states.visible && handleClose(); - states.focused = false; - ctx.emit("blur", event); + nextTick(() => { + if (states.isSilentBlur) { + states.isSilentBlur = false; + } else { + ctx.emit("blur", event); + } + }); + states.softFocus = false; }; const handleClearClick = (event) => { deleteSelected(event); @@ -43644,6 +43602,7 @@ var useSelect = (props, states, ctx) => { } }; const toggleMenu = (e) => { + var _a2; if (e && !states.mouseEnter) { return; } @@ -43655,7 +43614,10 @@ var useSelect = (props, states, ctx) => { states.visible = !states.visible; } } - focus(); + if (states.visible) { + ; + (_a2 = input.value || reference.value) == null ? void 0 : _a2.focus(); + } } }; const selectOption = () => { @@ -43663,7 +43625,7 @@ var useSelect = (props, states, ctx) => { toggleMenu(); } else { if (optionsArray.value[states.hoverIndex]) { - handleOptionSelect(optionsArray.value[states.hoverIndex]); + handleOptionSelect(optionsArray.value[states.hoverIndex], void 0); } } }; @@ -43671,8 +43633,8 @@ var useSelect = (props, states, ctx) => { return isObject(item.value) ? get_default(item.value, props.valueKey) : item.value; }; const optionsAllDisabled = computed2(() => optionsArray.value.filter((option) => option.visible).every((option) => option.disabled)); - const showTagList = computed2(() => props.multiple ? states.selected.slice(0, props.maxCollapseTags) : []); - const collapseTagList = computed2(() => props.multiple ? states.selected.slice(props.maxCollapseTags) : []); + const showTagList = computed2(() => states.selected.slice(0, props.maxCollapseTags)); + const collapseTagList = computed2(() => states.selected.slice(props.maxCollapseTags)); const navigateOptions = (direction2) => { if (!states.visible) { states.visible = true; @@ -43707,15 +43669,6 @@ var useSelect = (props, states, ctx) => { const handleMouseLeave = () => { states.mouseEnter = false; }; - const handleDeleteTooltipTag = (event, tag) => { - var _a2, _b; - deleteTag(event, tag); - (_b = (_a2 = tagTooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2); - }; - const selectTagsStyle = computed2(() => ({ - maxWidth: `${unref(states.inputWidth) - 32 - (showStatusIconAndState.value ? 22 : 0)}px`, - width: "100%" - })); return { optionList, optionsArray, @@ -43746,7 +43699,6 @@ var useSelect = (props, states, ctx) => { onOptionDestroy, handleMenuEnter, handleFocus, - focus, blur, handleBlur, handleClearClick, @@ -43756,18 +43708,15 @@ var useSelect = (props, states, ctx) => { selectOption, getValueKey, navigateOptions, - handleDeleteTooltipTag, dropMenuVisible, queryChange, groupQueryChange, showTagList, collapseTagList, - selectTagsStyle, reference, input, iOSInput, tooltipRef, - tagTooltipRef, tags, selectWrapper, scrollbar, @@ -43896,7 +43845,10 @@ var _sfc_main97 = defineComponent({ default: "value" }, collapseTags: Boolean, - collapseTagsTooltip: Boolean, + collapseTagsTooltip: { + type: Boolean, + default: false + }, maxCollapseTags: { type: Number, default: 1 @@ -43910,7 +43862,10 @@ var _sfc_main97 = defineComponent({ type: iconPropType, default: circle_close_default }, - fitInputWidth: Boolean, + fitInputWidth: { + type: Boolean, + default: false + }, suffixIcon: { type: iconPropType, default: arrow_down_default @@ -43920,7 +43875,10 @@ var _sfc_main97 = defineComponent({ type: Boolean, default: true }, - remoteShowSuffix: Boolean, + remoteShowSuffix: { + type: Boolean, + default: false + }, suffixTransition: { type: Boolean, default: true @@ -43929,10 +43887,6 @@ var _sfc_main97 = defineComponent({ type: String, values: Ee, default: "bottom-start" - }, - ariaLabel: { - type: String, - default: void 0 } }, emits: [ @@ -43979,7 +43933,6 @@ var _sfc_main97 = defineComponent({ onOptionDestroy, handleMenuEnter, handleFocus, - focus, blur, handleBlur, handleClearClick, @@ -43989,13 +43942,11 @@ var _sfc_main97 = defineComponent({ selectOption, getValueKey, navigateOptions, - handleDeleteTooltipTag, dropMenuVisible, reference, input, iOSInput, tooltipRef, - tagTooltipRef, tags, selectWrapper, scrollbar, @@ -44004,15 +43955,16 @@ var _sfc_main97 = defineComponent({ handleMouseEnter, handleMouseLeave, showTagList, - collapseTagList, - selectTagsStyle + collapseTagList } = useSelect(props, states, ctx); + const { focus } = useFocus(reference); const { inputWidth, selected, inputLength, filteredOptionsCount, visible, + softFocus, selectedLabel, hoverIndex, query, @@ -44020,10 +43972,12 @@ var _sfc_main97 = defineComponent({ currentPlaceholder, menuVisibleOnFocus, isOnComposition, + isSilentBlur, options, cachedOptions, optionsCount, - prefixWidth + prefixWidth, + tagInMultiLine } = toRefs(states); const wrapperKls = computed2(() => { const classList = [nsSelect.b()]; @@ -44036,37 +43990,14 @@ var _sfc_main97 = defineComponent({ } return classList; }); - const tagsKls = computed2(() => [ - nsSelect.e("tags"), - nsSelect.is("disabled", unref(selectDisabled)) - ]); - const tagWrapperKls = computed2(() => [ - nsSelect.b("tags-wrapper"), - { "has-prefix": unref(prefixWidth) && unref(selected).length } - ]); - const inputKls = computed2(() => [ - nsSelect.e("input"), - nsSelect.is(unref(selectSize)), - nsSelect.is("disabled", unref(selectDisabled)) - ]); - const iOSInputKls = computed2(() => [ - nsSelect.e("input"), - nsSelect.is(unref(selectSize)), - nsSelect.em("input", "iOS") - ]); - const scrollbarKls = computed2(() => [ - nsSelect.is("empty", !props.allowCreate && Boolean(unref(query)) && unref(filteredOptionsCount) === 0) - ]); + const selectTagsStyle = computed2(() => ({ + maxWidth: `${unref(inputWidth) - 32}px`, + width: "100%" + })); const tagTextStyle = computed2(() => { const maxWidth = unref(inputWidth) > 123 ? unref(inputWidth) - 123 : unref(inputWidth) - 75; return { maxWidth: `${maxWidth}px` }; }); - const inputStyle = computed2(() => ({ - marginLeft: `${unref(prefixWidth)}px`, - flexGrow: 1, - width: `${unref(inputLength) / (unref(inputWidth) - 32)}%`, - maxWidth: `${unref(inputWidth) - 42}px` - })); provide(selectKey, reactive({ props, options, @@ -44100,7 +44031,7 @@ var _sfc_main97 = defineComponent({ inputWidth.value = refEl.getBoundingClientRect().width; if (ctx.slots.prefix) { const prefix = refEl.querySelector(`.${nsInput.e("prefix")}`); - prefixWidth.value = Math.max(prefix.getBoundingClientRect().width + 11, 30); + prefixWidth.value = Math.max(prefix.getBoundingClientRect().width + 5, 30); } }); setSelected(); @@ -44121,6 +44052,7 @@ var _sfc_main97 = defineComponent({ return { isIOS, onOptionsRendered, + tagInMultiLine, prefixWidth, selectSize, readonly: readonly2, @@ -44130,7 +44062,6 @@ var _sfc_main97 = defineComponent({ debouncedQueryChange, deletePrevTag, deleteTag, - handleDeleteTooltipTag, deleteSelected, handleOptionSelect, scrollToOption, @@ -44139,6 +44070,7 @@ var _sfc_main97 = defineComponent({ inputLength, filteredOptionsCount, visible, + softFocus, selectedLabel, hoverIndex, query, @@ -44146,6 +44078,7 @@ var _sfc_main97 = defineComponent({ currentPlaceholder, menuVisibleOnFocus, isOnComposition, + isSilentBlur, options, resetInputHeight, managePlaceholder, @@ -44160,7 +44093,6 @@ var _sfc_main97 = defineComponent({ handleComposition, handleMenuEnter, handleFocus, - focus, blur, handleBlur, handleClearClick, @@ -44171,6 +44103,7 @@ var _sfc_main97 = defineComponent({ getValueKey, navigateOptions, dropMenuVisible, + focus, reference, input, iOSInput, @@ -44180,24 +44113,17 @@ var _sfc_main97 = defineComponent({ selectWrapper, scrollbar, wrapperKls, - tagsKls, - tagWrapperKls, - inputKls, - iOSInputKls, - scrollbarKls, selectTagsStyle, nsSelect, tagTextStyle, - inputStyle, handleMouseEnter, handleMouseLeave, showTagList, - collapseTagList, - tagTooltipRef + collapseTagList }; } }); -var _hoisted_1338 = ["disabled", "autocomplete", "aria-label"]; +var _hoisted_1339 = ["disabled", "autocomplete"]; var _hoisted_2322 = ["disabled"]; var _hoisted_3306 = { style: { "height": "100%", "display": "flex", "justify-content": "center", "align-items": "center" } }; function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { @@ -44213,9 +44139,9 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { return withDirectives((openBlock(), createElementBlock("div", { ref: "selectWrapper", class: normalizeClass(_ctx.wrapperKls), - onMouseenter: _cache[22] || (_cache[22] = (...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args)), - onMouseleave: _cache[23] || (_cache[23] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)), - onClick: _cache[24] || (_cache[24] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])) + onMouseenter: _cache[21] || (_cache[21] = (...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args)), + onMouseleave: _cache[22] || (_cache[22] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)), + onClick: _cache[23] || (_cache[23] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])) }, [ createVNode(_component_el_tooltip, { ref: "tooltipRef", @@ -44237,16 +44163,17 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { default: withCtx(() => [ createBaseVNode("div", { class: "select-trigger", - onMouseenter: _cache[20] || (_cache[20] = ($event) => _ctx.inputHovering = true), - onMouseleave: _cache[21] || (_cache[21] = ($event) => _ctx.inputHovering = false) + onMouseenter: _cache[19] || (_cache[19] = ($event) => _ctx.inputHovering = true), + onMouseleave: _cache[20] || (_cache[20] = ($event) => _ctx.inputHovering = false) }, [ _ctx.multiple ? (openBlock(), createElementBlock("div", { key: 0, ref: "tags", - tabindex: "-1", - class: normalizeClass(_ctx.tagsKls), - style: normalizeStyle(_ctx.selectTagsStyle), - onClick: _cache[15] || (_cache[15] = (...args) => _ctx.focus && _ctx.focus(...args)) + class: normalizeClass([ + _ctx.nsSelect.e("tags"), + _ctx.nsSelect.is("disabled", _ctx.selectDisabled) + ]), + style: normalizeStyle(_ctx.selectTagsStyle) }, [ _ctx.collapseTags && _ctx.selected.length ? (openBlock(), createBlock(Transition, { key: 0, @@ -44254,7 +44181,10 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { }, { default: withCtx(() => [ createBaseVNode("span", { - class: normalizeClass(_ctx.tagWrapperKls) + class: normalizeClass([ + _ctx.nsSelect.b("tags-wrapper"), + { "has-prefix": _ctx.prefixWidth && _ctx.selected.length } + ]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => { return openBlock(), createBlock(_component_el_tag, { @@ -44285,7 +44215,6 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { default: withCtx(() => [ _ctx.collapseTagsTooltip ? (openBlock(), createBlock(_component_el_tooltip, { key: 0, - ref: "tagTooltipRef", disabled: _ctx.dropMenuVisible, "fallback-placements": ["bottom", "top", "right", "left"], effect: _ctx.effect, @@ -44314,7 +44243,7 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { type: _ctx.tagType, "disable-transitions": "", style: { margin: "2px" }, - onClose: ($event) => _ctx.handleDeleteTooltipTag($event, item) + onClose: ($event) => _ctx.deleteTag($event, item) }, { default: withCtx(() => [ createBaseVNode("span", { @@ -44348,8 +44277,10 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { }, { default: withCtx(() => [ createBaseVNode("span", { - class: normalizeClass(_ctx.tagWrapperKls), - style: normalizeStyle(_ctx.prefixWidth && _ctx.selected.length ? { marginLeft: `${_ctx.prefixWidth}px` } : "") + class: normalizeClass([ + _ctx.nsSelect.b("tags-wrapper"), + { "has-prefix": _ctx.prefixWidth && _ctx.selected.length } + ]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => { return openBlock(), createBlock(_component_el_tag, { @@ -44370,20 +44301,28 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { _: 2 }, 1032, ["closable", "size", "hit", "type", "onClose"]); }), 128)) - ], 6) + ], 2) ]), _: 1 }, 8, ["onAfterLeave"])) : createCommentVNode("v-if", true), - _ctx.filterable && !_ctx.selectDisabled ? withDirectives((openBlock(), createElementBlock("input", { + _ctx.filterable ? withDirectives((openBlock(), createElementBlock("input", { key: 2, ref: "input", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.query = $event), type: "text", - class: normalizeClass(_ctx.inputKls), + class: normalizeClass([ + _ctx.nsSelect.e("input"), + _ctx.nsSelect.is(_ctx.selectSize), + _ctx.nsSelect.is("disabled", _ctx.selectDisabled) + ]), disabled: _ctx.selectDisabled, autocomplete: _ctx.autocomplete, - style: normalizeStyle(_ctx.inputStyle), - "aria-label": _ctx.ariaLabel, + style: normalizeStyle({ + marginLeft: _ctx.prefixWidth && !_ctx.selected.length || _ctx.tagInMultiLine ? `${_ctx.prefixWidth}px` : "", + flexGrow: 1, + width: `${_ctx.inputLength / (_ctx.inputWidth - 32)}%`, + maxWidth: `${_ctx.inputWidth - 42}px` + }), onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), onKeyup: _cache[3] || (_cache[3] = (...args) => _ctx.managePlaceholder && _ctx.managePlaceholder(...args)), @@ -44400,7 +44339,7 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { onCompositionupdate: _cache[12] || (_cache[12] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)), onCompositionend: _cache[13] || (_cache[13] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)), onInput: _cache[14] || (_cache[14] = (...args) => _ctx.debouncedQueryChange && _ctx.debouncedQueryChange(...args)) - }, null, 46, _hoisted_1338)), [ + }, null, 46, _hoisted_1339)), [ [vModelText, _ctx.query] ]) : createCommentVNode("v-if", true) ], 6)) : createCommentVNode("v-if", true), @@ -44408,7 +44347,11 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { _ctx.isIOS && !_ctx.multiple && _ctx.filterable && _ctx.readonly ? (openBlock(), createElementBlock("input", { key: 1, ref: "iOSInput", - class: normalizeClass(_ctx.iOSInputKls), + class: normalizeClass([ + _ctx.nsSelect.e("input"), + _ctx.nsSelect.is(_ctx.selectSize), + _ctx.nsSelect.em("input", "iOS") + ]), disabled: _ctx.selectDisabled, type: "text" }, null, 10, _hoisted_2322)) : createCommentVNode("v-if", true), @@ -44416,7 +44359,7 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { id: _ctx.id, ref: "reference", modelValue: _ctx.selectedLabel, - "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.selectedLabel = $event), + "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.selectedLabel = $event), type: "text", placeholder: typeof _ctx.currentPlaceholder === "function" ? _ctx.currentPlaceholder() : _ctx.currentPlaceholder, name: _ctx.name, @@ -44427,7 +44370,6 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { "validate-event": false, class: normalizeClass([_ctx.nsSelect.is("focus", _ctx.visible)]), tabindex: _ctx.multiple && _ctx.filterable ? -1 : void 0, - label: _ctx.ariaLabel, onFocus: _ctx.handleFocus, onBlur: _ctx.handleBlur, onInput: _ctx.debouncedOnInputChange, @@ -44436,11 +44378,11 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { onCompositionupdate: _ctx.handleComposition, onCompositionend: _ctx.handleComposition, onKeydown: [ - _cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"])), - _cache[18] || (_cache[18] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"])), + _cache[16] || (_cache[16] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"])), + _cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"])), withKeys(withModifiers(_ctx.selectOption, ["stop", "prevent"]), ["enter"]), withKeys(_ctx.handleKeydownEscape, ["esc"]), - _cache[19] || (_cache[19] = withKeys(($event) => _ctx.visible = false, ["tab"])) + _cache[18] || (_cache[18] = withKeys(($event) => _ctx.visible = false, ["tab"])) ] }, createSlots({ suffix: withCtx(() => [ @@ -44474,7 +44416,7 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { ]) ]) } : void 0 - ]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "label", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"]) + ]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"]) ], 32) ]), content: withCtx(() => [ @@ -44485,7 +44427,9 @@ function _sfc_render316(_ctx, _cache, $props, $setup, $data, $options) { tag: "ul", "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"), "view-class": _ctx.nsSelect.be("dropdown", "list"), - class: normalizeClass(_ctx.scrollbarKls) + class: normalizeClass([ + _ctx.nsSelect.is("empty", !_ctx.allowCreate && Boolean(_ctx.query) && _ctx.filteredOptionsCount === 0) + ]) }, { default: withCtx(() => [ _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, { @@ -44528,7 +44472,10 @@ var _sfc_main98 = defineComponent({ componentName: "ElOptionGroup", props: { label: String, - disabled: Boolean + disabled: { + type: Boolean, + default: false + } }, setup(props) { const ns = useNamespace("select"); @@ -44611,7 +44558,6 @@ var paginationSizesProps = buildProps({ type: String }, disabled: Boolean, - teleported: Boolean, size: { type: String, values: componentSizes @@ -44660,7 +44606,6 @@ var _sfc_main99 = defineComponent({ disabled: _ctx.disabled, "popper-class": _ctx.popperClass, size: _ctx.size, - teleported: _ctx.teleported, "validate-event": false, onChange: handleChange }, { @@ -44674,7 +44619,7 @@ var _sfc_main99 = defineComponent({ }), 128)) ]), _: 1 - }, 8, ["model-value", "disabled", "popper-class", "size", "teleported"]) + }, 8, ["model-value", "disabled", "popper-class", "size"]) ], 2); }; } @@ -44690,7 +44635,7 @@ var paginationJumperProps = buildProps({ }); // node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs -var _hoisted_1339 = ["disabled"]; +var _hoisted_1340 = ["disabled"]; var __default__66 = defineComponent({ name: "ElPaginationJumper" }); @@ -44738,7 +44683,7 @@ var _sfc_main100 = defineComponent({ createBaseVNode("span", { class: normalizeClass([unref(ns).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3) - ], 10, _hoisted_1339); + ], 10, _hoisted_1340); }; } }); @@ -44753,7 +44698,7 @@ var paginationTotalProps = buildProps({ }); // node_modules/element-plus/es/components/pagination/src/components/total2.mjs -var _hoisted_1340 = ["disabled"]; +var _hoisted_1341 = ["disabled"]; var __default__67 = defineComponent({ name: "ElPaginationTotal" }); @@ -44770,7 +44715,7 @@ var _sfc_main101 = defineComponent({ disabled: unref(disabled) }, toDisplayString(unref(t)("el.pagination.total", { total: _ctx.total - })), 11, _hoisted_1340); + })), 11, _hoisted_1341); }; } }); @@ -44794,12 +44739,12 @@ var paginationPagerProps = buildProps({ }); // node_modules/element-plus/es/components/pagination/src/components/pager2.mjs -var _hoisted_1341 = ["onKeyup"]; +var _hoisted_1342 = ["onKeyup"]; var _hoisted_2323 = ["aria-current", "aria-label", "tabindex"]; var _hoisted_3307 = ["tabindex", "aria-label"]; var _hoisted_493 = ["aria-current", "aria-label", "tabindex"]; var _hoisted_528 = ["tabindex", "aria-label"]; -var _hoisted_65 = ["aria-current", "aria-label", "tabindex"]; +var _hoisted_64 = ["aria-current", "aria-label", "tabindex"]; var __default__68 = defineComponent({ name: "ElPaginationPager" }); @@ -44855,18 +44800,6 @@ var _sfc_main102 = defineComponent({ } return array4; }); - const prevMoreKls = computed2(() => [ - "more", - "btn-quickprev", - nsIcon.b(), - nsPager.is("disabled", props.disabled) - ]); - const nextMoreKls = computed2(() => [ - "more", - "btn-quicknext", - nsIcon.b(), - nsPager.is("disabled", props.disabled) - ]); const tabindex = computed2(() => props.disabled ? -1 : 0); watchEffect(() => { const halfPagerCount = (props.pagerCount - 1) / 2; @@ -44954,7 +44887,12 @@ var _sfc_main102 = defineComponent({ }, " 1 ", 10, _hoisted_2323)) : createCommentVNode("v-if", true), showPrevMore.value ? (openBlock(), createElementBlock("li", { key: 1, - class: normalizeClass(unref(prevMoreKls)), + class: normalizeClass([ + "more", + "btn-quickprev", + unref(nsIcon).b(), + unref(nsPager).is("disabled", _ctx.disabled) + ]), tabindex: unref(tabindex), "aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }), onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)), @@ -44978,7 +44916,12 @@ var _sfc_main102 = defineComponent({ }), 128)), showNextMore.value ? (openBlock(), createElementBlock("li", { key: 2, - class: normalizeClass(unref(nextMoreKls)), + class: normalizeClass([ + "more", + "btn-quicknext", + unref(nsIcon).b(), + unref(nsPager).is("disabled", _ctx.disabled) + ]), tabindex: unref(tabindex), "aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }), onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()), @@ -44997,8 +44940,8 @@ var _sfc_main102 = defineComponent({ "aria-current": _ctx.currentPage === _ctx.pageCount, "aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }), tabindex: unref(tabindex) - }, toDisplayString(_ctx.pageCount), 11, _hoisted_65)) : createCommentVNode("v-if", true) - ], 42, _hoisted_1341); + }, toDisplayString(_ctx.pageCount), 11, _hoisted_64)) : createCommentVNode("v-if", true) + ], 42, _hoisted_1342); }; } }); @@ -45007,19 +44950,19 @@ var Pager = _export_sfc(_sfc_main102, [["__file", "/home/runner/work/element-plu // node_modules/element-plus/es/components/pagination/src/pagination.mjs var isAbsent = (v2) => typeof v2 !== "number"; var paginationProps = buildProps({ + total: Number, pageSize: Number, defaultPageSize: Number, - total: Number, + currentPage: Number, + defaultCurrentPage: Number, pageCount: Number, pagerCount: { type: Number, validator: (value) => { - return isNumber3(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1; + return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1; }, default: 7 }, - currentPage: Number, - defaultCurrentPage: Number, layout: { type: String, default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ") @@ -45048,22 +44991,18 @@ var paginationProps = buildProps({ type: iconPropType, default: () => arrow_right_default }, - teleported: { - type: Boolean, - default: true - }, small: Boolean, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean }); var paginationEmits = { - "update:current-page": (val) => isNumber3(val), - "update:page-size": (val) => isNumber3(val), - "size-change": (val) => isNumber3(val), - "current-change": (val) => isNumber3(val), - "prev-click": (val) => isNumber3(val), - "next-click": (val) => isNumber3(val) + "update:current-page": (val) => isNumber(val), + "update:page-size": (val) => isNumber(val), + "size-change": (val) => isNumber(val), + "current-change": (val) => isNumber(val), + "prev-click": (val) => isNumber(val), + "next-click": (val) => isNumber(val) }; var componentName = "ElPagination"; var Pagination = defineComponent({ @@ -45226,7 +45165,6 @@ var Pagination = defineComponent({ pageSizes: props.pageSizes, popperClass: props.popperClass, disabled: props.disabled, - teleported: props.teleported, size: props.small ? "small" : "default" }), slot: (_b = (_a2 = slots == null ? void 0 : slots.default) == null ? void 0 : _a2.call(slots)) != null ? _b : null, @@ -45472,7 +45410,7 @@ var popoverProps = buildProps({ } }); var popoverEmits = { - "update:visible": (value) => isBoolean2(value), + "update:visible": (value) => isBoolean(value), "before-enter": () => true, "before-leave": () => true, "after-enter": () => true, @@ -45663,8 +45601,6 @@ var progressProps = buildProps({ ]), default: "" }, - striped: Boolean, - stripedFlow: Boolean, format: { type: definePropType(Function), default: (percentage) => `${percentage}%` @@ -45672,9 +45608,9 @@ var progressProps = buildProps({ }); // node_modules/element-plus/es/components/progress/src/progress2.mjs -var _hoisted_1342 = ["aria-valuenow"]; +var _hoisted_1343 = ["aria-valuenow"]; var _hoisted_2324 = { viewBox: "0 0 100 100" }; -var _hoisted_3308 = ["d", "stroke", "stroke-linecap", "stroke-width"]; +var _hoisted_3308 = ["d", "stroke", "stroke-width"]; var _hoisted_494 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"]; var _hoisted_529 = { key: 0 }; var __default__71 = defineComponent({ @@ -45808,9 +45744,7 @@ var _sfc_main105 = defineComponent({ createBaseVNode("div", { class: normalizeClass([ unref(ns).be("bar", "inner"), - { [unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate }, - { [unref(ns).bem("bar", "inner", "striped")]: _ctx.striped }, - { [unref(ns).bem("bar", "inner", "striped-flow")]: _ctx.stripedFlow } + { [unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate } ]), style: normalizeStyle(unref(barStyle)) }, [ @@ -45834,7 +45768,6 @@ var _sfc_main105 = defineComponent({ class: normalizeClass(unref(ns).be("circle", "track")), d: unref(trackPath), stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`, - "stroke-linecap": _ctx.strokeLinecap, "stroke-width": unref(relativeStrokeWidth), fill: "none", style: normalizeStyle(unref(trailPathStyle)) @@ -45865,7 +45798,7 @@ var _sfc_main105 = defineComponent({ })) ]) ], 6)) : createCommentVNode("v-if", true) - ], 10, _hoisted_1342); + ], 10, _hoisted_1343); }; } }); @@ -45953,12 +45886,12 @@ var rateProps = buildProps({ } }); var rateEmits = { - [CHANGE_EVENT]: (value) => isNumber3(value), - [UPDATE_MODEL_EVENT]: (value) => isNumber3(value) + [CHANGE_EVENT]: (value) => isNumber(value), + [UPDATE_MODEL_EVENT]: (value) => isNumber(value) }; // node_modules/element-plus/es/components/rate/src/rate2.mjs -var _hoisted_1343 = ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"]; +var _hoisted_1344 = ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"]; var _hoisted_2325 = ["onMousemove", "onClick"]; var __default__72 = defineComponent({ name: "ElRate" @@ -46194,10 +46127,9 @@ var _sfc_main106 = defineComponent({ }), 128)), _ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock("span", { key: 0, - class: normalizeClass(unref(ns).e("text")), - style: normalizeStyle({ color: _ctx.textColor }) - }, toDisplayString(unref(text)), 7)) : createCommentVNode("v-if", true) - ], 46, _hoisted_1343); + class: normalizeClass(unref(ns).e("text")) + }, toDisplayString(unref(text)), 3)) : createCommentVNode("v-if", true) + ], 46, _hoisted_1344); }; } }); @@ -46562,7 +46494,7 @@ var virtualizedScrollbarProps = buildProps({ // node_modules/element-plus/es/components/virtual-list/src/utils.mjs var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD; var isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL; -var isRTL2 = (dir) => dir === RTL; +var isRTL = (dir) => dir === RTL; var cachedRTLResult = null; function getRTLOffsetType(recalculate = false) { if (cachedRTLResult === null || recalculate) { @@ -46785,7 +46717,7 @@ var createList = ({ const states = ref({ isScrolling: false, scrollDir: "forward", - scrollOffset: isNumber3(props.initScrollOffset) ? props.initScrollOffset : 0, + scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0, updateRequested: false, isScrollbarDragging: false, scrollbarAlwaysOn: props.scrollbarAlwaysOn @@ -46818,8 +46750,8 @@ var createList = ({ }, { direction: props.direction, - height: isNumber3(props.height) ? `${props.height}px` : props.height, - width: isNumber3(props.width) ? `${props.width}px` : props.width + height: isNumber(props.height) ? `${props.height}px` : props.height, + width: isNumber(props.width) ? `${props.width}px` : props.width }, props.style ]); @@ -46964,7 +46896,7 @@ var createList = ({ return; const { initScrollOffset: initScrollOffset2 } = props; const windowElement = unref(windowRef); - if (isNumber3(initScrollOffset2) && windowElement) { + if (isNumber(initScrollOffset2) && windowElement) { if (unref(_isHorizontal)) { windowElement.scrollLeft = initScrollOffset2; } else { @@ -47397,8 +47329,8 @@ var createGrid = ({ const innerRef = ref(null); const states = ref({ isScrolling: false, - scrollLeft: isNumber3(props.initScrollLeft) ? props.initScrollLeft : 0, - scrollTop: isNumber3(props.initScrollTop) ? props.initScrollTop : 0, + scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0, + scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0, updateRequested: false, xAxisScrollDir: FORWARD, yAxisScrollDir: FORWARD @@ -47453,8 +47385,8 @@ var createGrid = ({ }, { direction: props.direction, - height: isNumber3(props.height) ? `${props.height}px` : props.height, - width: isNumber3(props.width) ? `${props.width}px` : props.width + height: isNumber(props.height) ? `${props.height}px` : props.height, + width: isNumber(props.width) ? `${props.width}px` : props.width }, (_a2 = props.style) != null ? _a2 : {} ]; @@ -47518,7 +47450,7 @@ var createGrid = ({ return; } let _scrollLeft = scrollLeft; - if (isRTL2(props.direction)) { + if (isRTL(props.direction)) { switch (getRTLOffsetType()) { case RTL_OFFSET_NAG: _scrollLeft = -scrollLeft; @@ -47563,7 +47495,7 @@ var createGrid = ({ }, (x2, y) => { var _a2, _b, _c, _d; (_b = (_a2 = hScrollbar.value) == null ? void 0 : _a2.onMouseUp) == null ? void 0 : _b.call(_a2); - (_d = (_c = vScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c); + (_d = (_c = hScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c); const width = unref(parsedWidth); const height = unref(parsedHeight); scrollTo({ @@ -47615,7 +47547,7 @@ var createGrid = ({ } else { const [, left2] = getColumnPosition(props, columnIndex, unref(cache2)); const _cache = unref(cache2); - const rtl = isRTL2(direction2); + const rtl = isRTL(direction2); const [height, top] = getRowPosition(props, rowIndex, _cache); const [width] = getColumnPosition(props, columnIndex, _cache); itemStyleCache[key] = { @@ -47641,10 +47573,10 @@ var createGrid = ({ const { initScrollLeft, initScrollTop } = props; const windowElement = unref(windowRef); if (windowElement) { - if (isNumber3(initScrollLeft)) { + if (isNumber(initScrollLeft)) { windowElement.scrollLeft = initScrollLeft; } - if (isNumber3(initScrollTop)) { + if (isNumber(initScrollTop)) { windowElement.scrollTop = initScrollTop; } } @@ -47904,13 +47836,13 @@ var FixedSizeGrid = createGrid({ clearCache: true, validateProps: ({ columnWidth, rowHeight }) => { if (true) { - if (!isNumber3(columnWidth)) { + if (!isNumber(columnWidth)) { throwError(SCOPE5, ` "columnWidth" must be passed as number, instead ${typeof columnWidth} was given. `); } - if (!isNumber3(rowHeight)) { + if (!isNumber(rowHeight)) { throwError(SCOPE5, ` "columnWidth" must be passed as number, instead ${typeof rowHeight} was given. @@ -47921,7 +47853,7 @@ var FixedSizeGrid = createGrid({ }); // node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs -var { max: max3, min: min3, floor: floor3 } = Math; +var { max: max4, min: min4, floor: floor2 } = Math; var SCOPE6 = "ElDynamicSizeGrid"; var ACCESS_SIZER_KEY_MAP = { column: "columnWidth", @@ -47957,7 +47889,7 @@ var getItemFromCache2 = (props, index, gridCache, type4) => { }; var bs2 = (props, gridCache, low, high, offset2, type4) => { while (low <= high) { - const mid = low + floor3((high - low) / 2); + const mid = low + floor2((high - low) / 2); const currentOffset = getItemFromCache2(props, mid, gridCache, type4).offset; if (currentOffset === offset2) { return mid; @@ -47967,7 +47899,7 @@ var bs2 = (props, gridCache, low, high, offset2, type4) => { high = mid - 1; } } - return max3(0, low - 1); + return max4(0, low - 1); }; var es2 = (props, gridCache, idx, offset2, type4) => { const total2 = type4 === "column" ? props.totalColumn : props.totalRow; @@ -47976,7 +47908,7 @@ var es2 = (props, gridCache, idx, offset2, type4) => { idx += exponent; exponent *= 2; } - return bs2(props, gridCache, floor3(idx / 2), min3(idx, total2 - 1), offset2, type4); + return bs2(props, gridCache, floor2(idx / 2), min4(idx, total2 - 1), offset2, type4); }; var findItem2 = (props, gridCache, offset2, type4) => { const [cache2, lastVisitedIndex] = [ @@ -47987,7 +47919,7 @@ var findItem2 = (props, gridCache, offset2, type4) => { if (lastVisitedItemOffset >= offset2) { return bs2(props, gridCache, 0, lastVisitedIndex, offset2, type4); } - return es2(props, gridCache, max3(0, lastVisitedIndex), offset2, type4); + return es2(props, gridCache, max4(0, lastVisitedIndex), offset2, type4); }; var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => { let sizeOfVisitedRows = 0; @@ -48026,8 +47958,8 @@ var getOffset = (props, index, alignment, scrollOffset, cache2, type4, scrollBar ]; const item = getItemFromCache2(props, index, cache2, type4); const estimatedSize = estimatedSizeAssociates(props, cache2); - const maxOffset = max3(0, min3(estimatedSize - size3, item.offset)); - const minOffset = max3(0, item.offset - size3 + scrollBarWidth2 + item.size); + const maxOffset = max4(0, min4(estimatedSize - size3, item.offset)); + const minOffset = max4(0, item.offset - size3 + scrollBarWidth2 + item.size); if (alignment === SMART_ALIGNMENT) { if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) { alignment = AUTO_ALIGNMENT; @@ -48102,10 +48034,10 @@ var DynamicSizeGrid = createGrid({ const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => { var _a2, _b; forceUpdate = isUndefined2(forceUpdate) ? true : forceUpdate; - if (isNumber3(columnIndex)) { + if (isNumber(columnIndex)) { cache2.value.lastVisitedColumnIndex = Math.min(cache2.value.lastVisitedColumnIndex, columnIndex - 1); } - if (isNumber3(rowIndex)) { + if (isNumber(rowIndex)) { cache2.value.lastVisitedRowIndex = Math.min(cache2.value.lastVisitedRowIndex, rowIndex - 1); } (_a2 = instance.exposed) == null ? void 0 : _a2.getItemStyleCache.value(-1, null, null); @@ -48340,7 +48272,7 @@ var _sfc_main109 = defineComponent({ }; } }); -var _hoisted_1344 = ["aria-selected"]; +var _hoisted_1345 = ["aria-selected"]; function _sfc_render319(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("li", { "aria-selected": _ctx.selected, @@ -48362,7 +48294,7 @@ function _sfc_render319(_ctx, _cache, $props, $setup, $data, $options) { }, () => [ createBaseVNode("span", null, toDisplayString(_ctx.item.label), 1) ]) - ], 46, _hoisted_1344); + ], 46, _hoisted_1345); } var OptionItem = _export_sfc(_sfc_main109, [["render", _sfc_render319], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]); @@ -48828,13 +48760,6 @@ var useSelect2 = (props, emit) => { return null; }).filter((v2) => v2 !== null)); }); - const filteredOptionsValueMap = computed2(() => { - const valueMap = /* @__PURE__ */ new Map(); - filteredOptions.value.forEach((option, index) => { - valueMap.set(getValueKey(option), { option, index }); - }); - return valueMap; - }); const optionsAllDisabled = computed2(() => filteredOptions.value.every((option) => option.disabled)); const selectSize = useFormSize(); const collapseTagSize = computed2(() => selectSize.value === "small" ? "small" : "default"); @@ -48871,14 +48796,12 @@ var useSelect2 = (props, emit) => { const indexRef = computed2(() => { if (props.multiple) { const len = props.modelValue.length; - if (props.modelValue.length > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) { - const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]); - return index; + if (props.modelValue.length > 0) { + return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue[len - 1]); } } else { - if (props.modelValue && filteredOptionsValueMap.value.has(props.modelValue)) { - const { index } = filteredOptionsValueMap.value.get(props.modelValue); - return index; + if (props.modelValue) { + return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue); } } return -1; @@ -49222,16 +49145,16 @@ var useSelect2 = (props, emit) => { let initHovering = false; states.cachedOptions.length = 0; states.previousValue = props.modelValue.toString(); - for (const value of props.modelValue) { - if (filteredOptionsValueMap.value.has(value)) { - const { index, option } = filteredOptionsValueMap.value.get(value); - states.cachedOptions.push(option); + props.modelValue.forEach((selected) => { + const itemIndex = filteredOptions.value.findIndex((option) => getValueKey(option) === selected); + if (~itemIndex) { + states.cachedOptions.push(filteredOptions.value[itemIndex]); if (!initHovering) { - updateHoveringIndex(index); + updateHoveringIndex(itemIndex); } initHovering = true; } - } + }); } else { states.cachedOptions = []; states.previousValue = void 0; @@ -49408,7 +49331,7 @@ var _sfc_main110 = defineComponent({ }; } }); -var _hoisted_1345 = { key: 0 }; +var _hoisted_1346 = { key: 0 }; var _hoisted_2326 = ["id", "autocomplete", "aria-expanded", "aria-labelledby", "disabled", "readonly", "name", "unselectable"]; var _hoisted_3309 = ["textContent"]; var _hoisted_495 = ["id", "aria-labelledby", "aria-expanded", "autocomplete", "disabled", "name", "readonly", "unselectable"]; @@ -49456,7 +49379,7 @@ function _sfc_render320(_ctx, _cache, $props, $setup, $data, $options) { _ctx.nsSelectV2.is("disabled", _ctx.selectDisabled) ]) }, [ - _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_1345, [ + _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_1346, [ renderSlot(_ctx.$slots, "prefix") ])) : createCommentVNode("v-if", true), _ctx.multiple ? (openBlock(), createElementBlock("div", { @@ -49960,7 +49883,7 @@ var sliderProps = buildProps({ default: true } }); -var isValidValue = (value) => isNumber3(value) || isArray(value) && value.every(isNumber3); +var isValidValue = (value) => isNumber(value) || isArray(value) && value.every(isNumber); var sliderEmits = { [UPDATE_MODEL_EVENT]: isValidValue, [INPUT_EVENT]: isValidValue, @@ -50177,8 +50100,8 @@ var useTooltip = (props, formatTooltip, showTooltip) => { var useSliderButton = (props, initData, emit) => { const { disabled, - min: min4, - max: max4, + min: min5, + max: max5, step, showTooltip, precision, @@ -50191,7 +50114,7 @@ var useSliderButton = (props, initData, emit) => { const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip); const button = ref(); const currentPosition = computed2(() => { - return `${(props.modelValue - min4.value) / (max4.value - min4.value) * 100}%`; + return `${(props.modelValue - min5.value) / (max5.value - min5.value) * 100}%`; }); const wrapperStyle = computed2(() => { return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value }; @@ -50221,7 +50144,7 @@ var useSliderButton = (props, initData, emit) => { const incrementPosition = (amount) => { if (disabled.value) return; - initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max4.value - min4.value) * 100; + initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max5.value - min5.value) * 100; setPosition(initData.newPosition); emitChange(); }; @@ -50340,9 +50263,9 @@ var useSliderButton = (props, initData, emit) => { } else if (newPosition > 100) { newPosition = 100; } - const lengthPerStep = 100 / ((max4.value - min4.value) / step.value); + const lengthPerStep = 100 / ((max5.value - min5.value) / step.value); const steps = Math.round(newPosition / lengthPerStep); - let value = steps * lengthPerStep * (max4.value - min4.value) * 0.01 + min4.value; + let value = steps * lengthPerStep * (max5.value - min5.value) * 0.01 + min5.value; value = Number.parseFloat(value.toFixed(precision.value)); if (value !== props.modelValue) { emit(UPDATE_MODEL_EVENT, value); @@ -50490,11 +50413,11 @@ var sliderButtonProps = buildProps({ } }); var sliderButtonEmits = { - [UPDATE_MODEL_EVENT]: (value) => isNumber3(value) + [UPDATE_MODEL_EVENT]: (value) => isNumber(value) }; // node_modules/element-plus/es/components/slider/src/button2.mjs -var _hoisted_1346 = ["tabindex"]; +var _hoisted_1347 = ["tabindex"]; var __default__76 = defineComponent({ name: "ElSliderButton" }); @@ -50575,7 +50498,7 @@ var _sfc_main113 = defineComponent({ ]), _: 1 }, 8, ["visible", "placement", "popper-class", "disabled"]) - ], 46, _hoisted_1346); + ], 46, _hoisted_1347); }; } }); @@ -50605,7 +50528,7 @@ var SliderMarker = defineComponent({ }); // node_modules/element-plus/es/components/slider/src/slider2.mjs -var _hoisted_1347 = ["id", "role", "aria-label", "aria-labelledby"]; +var _hoisted_1348 = ["id", "role", "aria-label", "aria-labelledby"]; var _hoisted_2327 = { key: 1 }; var __default__77 = defineComponent({ name: "ElSlider" @@ -50816,7 +50739,7 @@ var _sfc_main114 = defineComponent({ "onUpdate:modelValue": unref(setFirstValue), onChange: unref(emitChange) }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true) - ], 42, _hoisted_1347); + ], 42, _hoisted_1348); }; } }); @@ -50875,7 +50798,7 @@ function useSpace(props) { verticalSize.value = v2; } else { let val; - if (isNumber3(size3)) { + if (isNumber(size3)) { val = size3; } else { val = SIZE_MAP[size3 || "small"] || SIZE_MAP.small; @@ -50929,7 +50852,7 @@ var spaceProps = buildProps({ spacer: { type: definePropType([Object, String, Number, Array]), default: null, - validator: (val) => isVNode(val) || isNumber3(val) || isString(val) + validator: (val) => isVNode(val) || isNumber(val) || isString(val) }, wrap: Boolean, fill: Boolean, @@ -50941,7 +50864,7 @@ var spaceProps = buildProps({ type: [String, Array, Number], values: componentSizes, validator: (val) => { - return isNumber3(val) || isArray(val) && val.length === 2 && val.every(isNumber3); + return isNumber(val) || isArray(val) && val.length === 2 && val.every(isNumber); } } }); @@ -51061,7 +50984,7 @@ var _sfc_main115 = defineComponent({ const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props; if (isFunction(formatter2)) return formatter2(value); - if (!isNumber3(value)) + if (!isNumber(value)) return value; let [integer4, decimal = ""] = String(value).split("."); decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0); @@ -51135,7 +51058,7 @@ var countdownProps = buildProps({ }); var countdownEmits = { finish: () => true, - [CHANGE_EVENT]: (value) => isNumber3(value) + [CHANGE_EVENT]: (value) => isNumber(value) }; // node_modules/element-plus/es/components/countdown/src/utils.mjs @@ -51149,7 +51072,7 @@ var timeUnits2 = [ ["S", 1] ]; var getTime = (value) => { - return isNumber3(value) ? new Date(value).getTime() : value.valueOf(); + return isNumber(value) ? new Date(value).getTime() : value.valueOf(); }; var formatTime = (timestamp2, format2) => { let timeLeft = timestamp2; @@ -51273,7 +51196,7 @@ var stepsProps = buildProps({ } }); var stepsEmits = { - [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber3) + [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber) }; // node_modules/element-plus/es/components/steps/src/steps2.mjs @@ -51287,17 +51210,13 @@ var _sfc_main117 = defineComponent({ setup(__props, { emit }) { const props = __props; const ns = useNamespace("steps"); - const { - children: steps, - addChild: addStep, - removeChild: removeStep - } = useOrderedChildren(getCurrentInstance(), "ElStep"); + const steps = ref([]); watch(steps, () => { steps.value.forEach((instance, index) => { instance.setIndex(index); }); }); - provide("ElSteps", { props, steps, addStep, removeStep }); + provide("ElSteps", { props, steps }); watch(() => props.active, (newVal, oldVal) => { emit(CHANGE_EVENT, newVal, oldVal); }); @@ -51357,7 +51276,7 @@ var _sfc_main118 = defineComponent({ }, { immediate: true }); }); onBeforeUnmount(() => { - parent2.removeStep(stepItemState.uid); + parent2.steps.value = parent2.steps.value.filter((instance) => instance.uid !== (currentInstance == null ? void 0 : currentInstance.uid)); }); const currentStatus = computed2(() => { return props.status || internalStatus.value; @@ -51385,17 +51304,9 @@ var _sfc_main118 = defineComponent({ const space = computed2(() => { return isSimple.value ? "" : parent2.props.space; }); - const containerKls = computed2(() => { - return [ - ns.b(), - ns.is(isSimple.value ? "simple" : parent2.props.direction), - ns.is("flex", isLast.value && !space.value && !isCenter.value), - ns.is("center", isCenter.value && !isVertical.value && !isSimple.value) - ]; - }); const style = computed2(() => { const style2 = { - flexBasis: isNumber3(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` + flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` }; if (isVertical.value) return style2; @@ -51430,16 +51341,21 @@ var _sfc_main118 = defineComponent({ prevChild.calcProgress(internalStatus.value); }; const stepItemState = reactive({ - uid: currentInstance.uid, + uid: computed2(() => currentInstance == null ? void 0 : currentInstance.uid), currentStatus, setIndex, calcProgress }); - parent2.addStep(stepItemState); + parent2.steps.value = [...parent2.steps.value, stepItemState]; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { style: normalizeStyle(unref(style)), - class: normalizeClass(unref(containerKls)) + class: normalizeClass([ + unref(ns).b(), + unref(ns).is(unref(isSimple) ? "simple" : unref(parent2).props.direction), + unref(ns).is("flex", unref(isLast) && !unref(space) && !unref(isCenter)), + unref(ns).is("center", unref(isCenter) && !unref(isVertical) && !unref(isSimple)) + ]) }, [ createCommentVNode(" icon & line "), createBaseVNode("div", { @@ -51530,18 +51446,14 @@ var switchProps = buildProps({ type: [Boolean, String, Number], default: false }, - disabled: { - type: Boolean, + value: { + type: [Boolean, String, Number], default: false }, - loading: { + disabled: { type: Boolean, default: false }, - size: { - type: String, - validator: isValidComponentSize - }, width: { type: [String, Number], default: "" @@ -51550,12 +51462,6 @@ var switchProps = buildProps({ type: Boolean, default: false }, - inactiveActionIcon: { - type: iconPropType - }, - activeActionIcon: { - type: iconPropType - }, activeIcon: { type: iconPropType }, @@ -51570,14 +51476,6 @@ var switchProps = buildProps({ type: String, default: "" }, - activeValue: { - type: [Boolean, String, Number], - default: true - }, - inactiveValue: { - type: [Boolean, String, Number], - default: false - }, activeColor: { type: String, default: "" @@ -51590,6 +51488,14 @@ var switchProps = buildProps({ type: String, default: "" }, + activeValue: { + type: [Boolean, String, Number], + default: true + }, + inactiveValue: { + type: [Boolean, String, Number], + default: false + }, name: { type: String, default: "" @@ -51598,26 +51504,30 @@ var switchProps = buildProps({ type: Boolean, default: true }, + id: String, + loading: { + type: Boolean, + default: false + }, beforeChange: { type: definePropType(Function) }, - id: String, + size: { + type: String, + validator: isValidComponentSize + }, tabindex: { type: [String, Number] - }, - value: { - type: [Boolean, String, Number], - default: false } }); var switchEmits = { - [UPDATE_MODEL_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber3(val), - [CHANGE_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber3(val), - [INPUT_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber3(val) + [UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val), + [CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val), + [INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val) }; // node_modules/element-plus/es/components/switch/src/switch2.mjs -var _hoisted_1348 = ["onClick"]; +var _hoisted_1349 = ["onClick"]; var _hoisted_2328 = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]; var _hoisted_3310 = ["aria-hidden"]; var _hoisted_496 = ["aria-hidden"]; @@ -51636,27 +51546,17 @@ var _sfc_main119 = defineComponent({ const { formItem } = useFormItem(); const switchSize = useFormSize(); const ns = useNamespace("switch"); - const useBatchDeprecated = (list) => { - list.forEach((param) => { - useDeprecated({ - from: param[0], - replacement: param[1], - scope: COMPONENT_NAME17, - version: "2.3.0", - ref: "https://element-plus.org/en-US/component/switch.html#attributes", - type: "Attribute" - }, computed2(() => { - var _a2; - return !!((_a2 = vm.vnode.props) == null ? void 0 : _a2[param[2]]); - })); - }); - }; - useBatchDeprecated([ - ['"value"', '"model-value" or "v-model"', "value"], - ['"active-color"', "CSS var `--el-switch-on-color`", "activeColor"], - ['"inactive-color"', "CSS var `--el-switch-off-color`", "inactiveColor"], - ['"border-color"', "CSS var `--el-switch-border-color`", "borderColor"] - ]); + useDeprecated({ + from: '"value"', + replacement: '"model-value" or "v-model"', + scope: COMPONENT_NAME17, + version: "2.3.0", + ref: "https://element-plus.org/en-US/component/switch.html#attributes", + type: "Attribute" + }, computed2(() => { + var _a2; + return !!((_a2 = vm.vnode.props) == null ? void 0 : _a2.value); + })); const { inputId } = useFormItemInputId(props, { formItemContext: formItem }); @@ -51670,16 +51570,6 @@ var _sfc_main119 = defineComponent({ ns.is("disabled", switchDisabled.value), ns.is("checked", checked.value) ]); - const labelLeftKls = computed2(() => [ - ns.e("label"), - ns.em("label", "left"), - ns.is("active", !checked.value) - ]); - const labelRightKls = computed2(() => [ - ns.e("label"), - ns.em("label", "right"), - ns.is("active", checked.value) - ]); const coreStyle = computed2(() => ({ width: addUnit(props.width) })); @@ -51725,7 +51615,7 @@ var _sfc_main119 = defineComponent({ const shouldChange = beforeChange(); const isPromiseOrBool = [ isPromise(shouldChange), - isBoolean2(shouldChange) + isBoolean(shouldChange) ].includes(true); if (!isPromiseOrBool) { throwError(COMPONENT_NAME17, "beforeChange must return type `Promise` or `boolean`"); @@ -51785,7 +51675,11 @@ var _sfc_main119 = defineComponent({ }, null, 42, _hoisted_2328), !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", { key: 0, - class: normalizeClass(unref(labelLeftKls)) + class: normalizeClass([ + unref(ns).e("label"), + unref(ns).em("label", "left"), + unref(ns).is("active", !unref(checked)) + ]) }, [ _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { default: withCtx(() => [ @@ -51833,22 +51727,16 @@ var _sfc_main119 = defineComponent({ createVNode(unref(loading_default)) ]), _: 1 - }, 8, ["class"])) : _ctx.activeActionIcon && unref(checked) ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeActionIcon))) - ]), - _: 1 - })) : _ctx.inactiveActionIcon && !unref(checked) ? (openBlock(), createBlock(unref(ElIcon), { key: 2 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveActionIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true) + }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 6), !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", { key: 1, - class: normalizeClass(unref(labelRightKls)) + class: normalizeClass([ + unref(ns).e("label"), + unref(ns).em("label", "right"), + unref(ns).is("active", unref(checked)) + ]) }, [ _ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { default: withCtx(() => [ @@ -51861,7 +51749,7 @@ var _sfc_main119 = defineComponent({ "aria-hidden": !unref(checked) }, toDisplayString(_ctx.activeText), 9, _hoisted_531)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) - ], 14, _hoisted_1348); + ], 14, _hoisted_1349); }; } }); @@ -52062,7 +51950,7 @@ function toggleRowStatus(statusArr, row, newVal) { }); } }; - if (isBoolean2(newVal)) { + if (isBoolean(newVal)) { if (newVal && !included) { toggleStatus("add"); } else if (!newVal && included) { @@ -52611,7 +52499,7 @@ var sortData = (data, states) => { var doFlattenColumns = (columns2) => { const result2 = []; columns2.forEach((column2) => { - if (column2.children && column2.children.length > 0) { + if (column2.children) { result2.push.apply(result2, doFlattenColumns(column2.children)); } else { result2.push(column2); @@ -53610,7 +53498,7 @@ var _sfc_main120 = defineComponent({ }; } }); -var _hoisted_1349 = { key: 0 }; +var _hoisted_1350 = { key: 0 }; var _hoisted_2329 = ["disabled"]; var _hoisted_3311 = ["label", "onClick"]; function _sfc_render321(_ctx, _cache, $props, $setup, $data, $options) { @@ -53636,7 +53524,7 @@ function _sfc_render321(_ctx, _cache, $props, $setup, $data, $options) { persistent: "" }, { content: withCtx(() => [ - _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_1349, [ + _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_1350, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("content")) }, [ @@ -53880,13 +53768,10 @@ function useEvent(props, emit) { } }; const handleMouseMove = (event, column2) => { + var _a2; if (column2.children && column2.children.length > 0) return; - const el = event.target; - if (!isElement2(el)) { - return; - } - const target2 = el == null ? void 0 : el.closest("th"); + const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("th"); if (!column2 || !column2.resizable) return; if (!dragging.value && props.border) { @@ -54311,19 +54196,6 @@ function useEvents(props) { const handleMouseLeave = debounce_default(() => { props.store.commit("setHoverRow", null); }, 30); - const getPadding = (el) => { - const style = window.getComputedStyle(el, null); - const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0; - const paddingRight = Number.parseInt(style.paddingRight, 10) || 0; - const paddingTop = Number.parseInt(style.paddingTop, 10) || 0; - const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0; - return { - left: paddingLeft, - right: paddingRight, - top: paddingTop, - bottom: paddingBottom - }; - }; const handleCellMouseEnter = (event, row, tooltipOptions) => { var _a2; const table = parent2; @@ -54346,20 +54218,9 @@ function useEvents(props) { const range4 = document.createRange(); range4.setStart(cellChild, 0); range4.setEnd(cellChild, cellChild.childNodes.length); - let rangeWidth = range4.getBoundingClientRect().width; - let rangeHeight = range4.getBoundingClientRect().height; - const offsetWidth = rangeWidth - Math.floor(rangeWidth); - if (offsetWidth < 1e-3) { - rangeWidth = Math.floor(rangeWidth); - } - const offsetHeight = rangeHeight - Math.floor(rangeHeight); - if (offsetHeight < 1e-3) { - rangeHeight = Math.floor(rangeHeight); - } - const { top, left: left2, right: right2, bottom } = getPadding(cellChild); - const horizontalPadding = left2 + right2; - const verticalPadding = top + bottom; - if (rangeWidth + horizontalPadding > cellChild.offsetWidth || rangeHeight + verticalPadding > cellChild.offsetHeight || cellChild.scrollWidth > cellChild.offsetWidth) { + const rangeWidth = Math.round(range4.getBoundingClientRect().width); + const padding = (Number.parseInt(getStyle(cellChild, "paddingLeft"), 10) || 0) + (Number.parseInt(getStyle(cellChild, "paddingRight"), 10) || 0); + if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) { createTablePopper(parent2 == null ? void 0 : parent2.refs.tableWrapper, cell, cell.innerText || cell.textContent, nextZIndex, tooltipOptions); } }; @@ -54546,7 +54407,7 @@ function useRender(props) { if (!rowspan || !colspan) { return null; } - const columnData = Object.assign({}, column2); + const columnData = { ...column2 }; columnData.realWidth = getColspanRealWidth(columns2.value, colspan, cellIndex); const data = { store: props.store, @@ -54732,7 +54593,11 @@ var TableBody = defineComponent({ watch(props.store.states.hoverRow, (newVal, oldVal) => { if (!props.store.states.isComplex.value || !isClient) return; - rAF(() => { + let raf = window.requestAnimationFrame; + if (!raf) { + raf = (fn2) => window.setTimeout(fn2, 16); + } + raf(() => { const el = instance == null ? void 0 : instance.vnode.el; const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`)); const oldRow = rows[oldVal]; @@ -54761,7 +54626,7 @@ var TableBody = defineComponent({ render() { const { wrappedRowRender, store } = this; const data = store.states.data.value || []; - return h("tbody", { tabIndex: -1 }, [ + return h("tbody", {}, [ data.reduce((acc, row) => { return acc.concat(wrappedRowRender(row, acc.length)); }, []) @@ -55036,7 +54901,6 @@ function useStyle3(props, layout2, store, table) { const bodyScrollHeight = ref(0); const headerScrollHeight = ref(0); const footerScrollHeight = ref(0); - const appendScrollHeight = ref(0); watchEffect(() => { layout2.setHeight(props.height); }); @@ -55176,7 +55040,7 @@ function useStyle3(props, layout2, store, table) { }); }; const resizeListener = () => { - var _a2, _b, _c, _d; + var _a2, _b, _c; const el = table.vnode.el; if (!table.$ready || !el) return; @@ -55201,8 +55065,7 @@ function useStyle3(props, layout2, store, table) { tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0; headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0; footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0; - appendScrollHeight.value = ((_d = table.refs.appendWrapper) == null ? void 0 : _d.offsetHeight) || 0; - bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value; + bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value; if (shouldUpdateLayout) { resizeState.value = { width, @@ -55256,9 +55119,13 @@ function useStyle3(props, layout2, store, table) { } if (props.maxHeight) { if (!Number.isNaN(Number(props.maxHeight))) { - return { - maxHeight: `${props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` - }; + const maxHeight = props.maxHeight; + const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight); + if (reachMaxHeight) { + return { + maxHeight: `${tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value}px` + }; + } } else { return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` @@ -55402,8 +55269,7 @@ var defaultProps2 = { type: Boolean, default: false }, - flexible: Boolean, - showOverflowTooltip: [Boolean, Object] + flexible: Boolean }; // node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs @@ -55417,7 +55283,7 @@ var useScrollbar = () => { }; const setScrollPosition = (position, offset2) => { const scrollbar = scrollBarRef.value; - if (scrollbar && isNumber3(offset2) && ["Top", "Left"].includes(position)) { + if (scrollbar && isNumber(offset2) && ["Top", "Left"].includes(position)) { scrollbar[`setScroll${position}`](offset2); } }; @@ -55572,7 +55438,7 @@ var _sfc_main121 = defineComponent({ }; } }); -var _hoisted_1350 = ["data-prefix"]; +var _hoisted_1351 = ["data-prefix"]; var _hoisted_2330 = { ref: "hiddenColumns", class: "hidden-columns" @@ -55742,7 +55608,7 @@ function _sfc_render322(_ctx, _cache, $props, $setup, $data, $options) { }, null, 2), [ [vShow, _ctx.resizeProxyVisible] ]) - ], 46, _hoisted_1350); + ], 46, _hoisted_1351); } var Table = _export_sfc(_sfc_main121, [["render", _sfc_render322], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]); @@ -55779,7 +55645,7 @@ var getDefaultClassName = (type4) => { }; var cellForced = { selection: { - renderHeader({ store, column: column2 }) { + renderHeader({ store }) { function isDisabled() { return store.states.data.value && store.states.data.value.length === 0; } @@ -55788,8 +55654,7 @@ var cellForced = { size: store.states.tableSize.value, indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value, "onUpdate:modelValue": store.toggleAllSelection, - modelValue: store.states.isAllSelected.value, - ariaLabel: column2.label + modelValue: store.states.isAllSelected.value }); }, renderCell({ @@ -55805,8 +55670,7 @@ var cellForced = { store.commit("rowSelectedChanged", row); }, onClick: (event) => event.stopPropagation(), - modelValue: store.isSelected(row), - ariaLabel: column2.label + modelValue: store.isSelected(row) }); }, sortable: false, @@ -55980,7 +55844,6 @@ function useWatcher2(owner, props_) { "label", "filters", "filterMultiple", - "filteredValue", "sortable", "index", "formatter", @@ -56198,10 +56061,7 @@ var defaultProps3 = { columnKey: String, align: String, headerAlign: String, - showOverflowTooltip: { - type: [Boolean, Object], - default: void 0 - }, + showOverflowTooltip: [Boolean, Object], fixed: [Boolean, String], formatter: Function, selectable: Function, @@ -56264,7 +56124,6 @@ var ElTableColumn = defineComponent({ isSubColumn.value = owner.value !== parent2; const type4 = props.type || "default"; const sortable = props.sortable === "" ? true : props.sortable; - const showOverflowTooltip = isUndefined2(props.showOverflowTooltip) ? parent2.props.showOverflowTooltip : props.showOverflowTooltip; const defaults2 = { ...cellStarts[type4], id: columnId.value, @@ -56272,7 +56131,7 @@ var ElTableColumn = defineComponent({ property: props.prop || props.property, align: realAlign, headerAlign: realHeaderAlign, - showOverflowTooltip, + showOverflowTooltip: props.showOverflowTooltip, filterable: props.filters || props.filterMethod, filteredValue: [], filterPlacement: "", @@ -56575,7 +56434,7 @@ var useRow = (props, { mainTableRef, leftTableRef, rightTableRef }) => { const leftTableHeights = shallowRef({}); const mainTableHeights = shallowRef({}); const rightTableHeights = shallowRef({}); - const isDynamic = computed2(() => isNumber3(props.estimatedRowHeight)); + const isDynamic = computed2(() => isNumber(props.estimatedRowHeight)); function onRowsRendered(params) { var _a2; (_a2 = props.onRowsRendered) == null ? void 0 : _a2.call(props, params); @@ -56761,7 +56620,7 @@ var useStyles2 = (props, { const rowsHeight = computed2(() => { const { rowHeight, estimatedRowHeight } = props; const _data = unref(data); - if (isNumber3(estimatedRowHeight)) { + if (isNumber(estimatedRowHeight)) { return _data.length * estimatedRowHeight; } return _data.length * rowHeight; @@ -56769,7 +56628,7 @@ var useStyles2 = (props, { const fixedTableHeight = computed2(() => { const { maxHeight } = props; const tableHeight = unref(mainTableHeight); - if (isNumber3(maxHeight) && maxHeight > 0) + if (isNumber(maxHeight) && maxHeight > 0) return tableHeight; const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight); return Math.min(tableHeight, totalHeight); @@ -57409,7 +57268,7 @@ var useTableRow = (props) => { const measured = ref(false); const rowRef = ref(); const measurable = computed2(() => { - return isNumber3(props.estimatedRowHeight) && props.rowIndex >= 0; + return isNumber(props.estimatedRowHeight) && props.rowIndex >= 0; }); const doMeasure = (isInit = false) => { const $rowRef = unref(rowRef); @@ -57793,7 +57652,7 @@ var TableGrid = defineComponent({ getRowHeight, onScroll } = props; - const isDynamicRowEnabled = isNumber3(estimatedRowHeight); + const isDynamicRowEnabled = isNumber(estimatedRowHeight); const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid; const _headerHeight = unref(headerHeight); return createVNode("div", { @@ -58043,7 +57902,7 @@ var CellRenderer = ({ }; const Cell = CellComponent(cellProps); const kls = [ns.e("row-cell"), column2.class, column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right")]; - const expandable = rowIndex >= 0 && expandColumnKey2 && column2.key === expandColumnKey2; + const expandable = rowIndex >= 0 && column2.key === expandColumnKey2; const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey2]); let IconOrPlaceholder; const iconStyle = `margin-inline-start: ${depth * indentSize}px;`; @@ -58296,7 +58155,7 @@ var TableV2 = defineComponent({ data: _data, fixedData, estimatedRowHeight, - bodyWidth: unref(bodyWidth) + vScrollbarSize, + bodyWidth: unref(bodyWidth), headerHeight, headerWidth: unref(headerWidth), height: unref(mainTableHeight), @@ -58870,7 +58729,7 @@ var tabsProps = buildProps({ }, stretch: Boolean }); -var isPaneName = (value) => isString(value) || isNumber3(value); +var isPaneName = (value) => isString(value) || isNumber(value); var tabsEmits = { [UPDATE_MODEL_EVENT]: (name) => isPaneName(name), tabClick: (pane, ev) => ev instanceof Event, @@ -59010,7 +58869,7 @@ var tabPaneProps = buildProps({ }); // node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs -var _hoisted_1351 = ["id", "aria-hidden", "aria-labelledby"]; +var _hoisted_1352 = ["id", "aria-hidden", "aria-labelledby"]; var COMPONENT_NAME24 = "ElTabPane"; var __default__84 = defineComponent({ name: COMPONENT_NAME24 @@ -59067,7 +58926,7 @@ var _sfc_main123 = defineComponent({ "aria-labelledby": `tab-${unref(paneName)}` }, [ renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_1351)), [ + ], 10, _hoisted_1352)), [ [vShow, unref(active)] ]) : createCommentVNode("v-if", true); }; @@ -59423,14 +59282,7 @@ var _sfc_main126 = defineComponent({ ...__default__87, props: timelineItemProps, setup(__props) { - const props = __props; const ns = useNamespace("timeline-item"); - const defaultNodeKls = computed2(() => [ - ns.e("node"), - ns.em("node", props.size || ""), - ns.em("node", props.type || ""), - ns.is("hollow", props.hollow) - ]); return (_ctx, _cache) => { return openBlock(), createElementBlock("li", { class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }]) @@ -59440,7 +59292,12 @@ var _sfc_main126 = defineComponent({ }, null, 2), !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", { key: 0, - class: normalizeClass(unref(defaultNodeKls)), + class: normalizeClass([ + unref(ns).e("node"), + unref(ns).em("node", _ctx.size || ""), + unref(ns).em("node", _ctx.type || ""), + unref(ns).is("hollow", _ctx.hollow) + ]), style: normalizeStyle({ backgroundColor: _ctx.color }) @@ -59652,7 +59509,7 @@ var _sfc_main127 = defineComponent({ (_a2 = props["onUpdate:open"]) == null ? void 0 : _a2.call(props, open2); } }); - const isOpenDelayed = computed2(() => isNumber3(props.delayDuration) && props.delayDuration > 0); + const isOpenDelayed = computed2(() => isNumber(props.delayDuration) && props.delayDuration > 0); const { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(() => { open.value = true; }, computed2(() => props.delayDuration), { @@ -59788,7 +59645,7 @@ var _sfc_main129 = defineComponent({ var ElVisuallyHidden = _export_sfc(_sfc_main129, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]); // node_modules/element-plus/es/components/tooltip-v2/src/content2.mjs -var _hoisted_1352 = ["data-side"]; +var _hoisted_1353 = ["data-side"]; var __default__91 = defineComponent({ name: "ElTooltipV2Content" }); @@ -59883,7 +59740,7 @@ var _sfc_main130 = defineComponent({ style: normalizeStyle(unref(arrowStyle)), side: unref(side) }) - ], 10, _hoisted_1352)) : createCommentVNode("v-if", true) + ], 10, _hoisted_1353)) : createCommentVNode("v-if", true) ], 4); }; } @@ -60454,7 +60311,7 @@ var _sfc_main133 = defineComponent({ var TransferPanel = _export_sfc(_sfc_main133, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]); // node_modules/element-plus/es/components/transfer/src/transfer2.mjs -var _hoisted_1353 = { key: 0 }; +var _hoisted_1354 = { key: 0 }; var _hoisted_2331 = { key: 0 }; var __default__95 = defineComponent({ name: "ElTransfer" @@ -60550,7 +60407,7 @@ var _sfc_main134 = defineComponent({ ]), _: 1 }), - !unref(isUndefined2)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_1353, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true) + !unref(isUndefined2)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_1354, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true) ]), _: 1 }, 8, ["class", "disabled", "onClick"]), @@ -60680,7 +60537,7 @@ var getPropertyFromData = function(node, prop) { } }; var nodeIdSeed = 0; -var Node3 = class _Node { +var Node2 = class { constructor(options) { this.id = nodeIdSeed++; this.text = null; @@ -60808,7 +60665,7 @@ var Node3 = class _Node { insertChild(child, index, batch) { if (!child) throw new Error("InsertChild error: child is required."); - if (!(child instanceof _Node)) { + if (!(child instanceof Node2)) { if (!batch) { const children = this.getChildren(true); if (!children.includes(child.data)) { @@ -60823,8 +60680,8 @@ var Node3 = class _Node { parent: this, store: this.store }); - child = reactive(new _Node(child)); - if (child instanceof _Node) { + child = reactive(new Node2(child)); + if (child instanceof Node2) { child.initialize(); } } @@ -61061,7 +60918,7 @@ var TreeStore = class { this.nodesMap = {}; } initialize() { - this.root = new Node3({ + this.root = new Node2({ data: this.data, store: this }); @@ -61113,7 +60970,7 @@ var TreeStore = class { } } getNode(data) { - if (data instanceof Node3) + if (data instanceof Node2) return data; const key = isObject(data) ? getNodeKey(this.key, data) : data; return this.nodesMap[key] || null; @@ -61425,7 +61282,7 @@ function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) { const treeNodeDragOver = ({ event, treeNode }) => { const dropNode = treeNode; const oldDropNode = dragState.value.dropNode; - if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) { + if (oldDropNode && oldDropNode !== dropNode) { removeClass(oldDropNode.$el, ns.is("drop-inner")); } const draggingNode = dragState.value.draggingNode; @@ -61441,7 +61298,7 @@ function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) { dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next"); } event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none"; - if ((dropPrev || dropInner || dropNext) && (oldDropNode == null ? void 0 : oldDropNode.node.id) !== dropNode.node.id) { + if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) { if (oldDropNode) { ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event); } @@ -61464,7 +61321,7 @@ function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) { dropInner = false; dropNext = false; } - const targetPosition = dropNode.$el.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect(); + const targetPosition = dropNode.$el.getBoundingClientRect(); const treePosition = el$.value.getBoundingClientRect(); let dropType; const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1; @@ -61554,7 +61411,7 @@ var _sfc_main136 = defineComponent({ }, props: { node: { - type: Node3, + type: Node2, default: () => ({}) }, props: { @@ -61589,7 +61446,7 @@ var _sfc_main136 = defineComponent({ expanded.value = true; childNodeRendered.value = true; } - const childrenKey = tree.props.props["children"] || "children"; + const childrenKey = tree.props["children"] || "children"; watch(() => { const children = props.node.data[childrenKey]; return children && [...children]; @@ -61729,7 +61586,7 @@ var _sfc_main136 = defineComponent({ }; } }); -var _hoisted_1354 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"]; +var _hoisted_1355 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"]; var _hoisted_2332 = ["aria-expanded"]; function _sfc_render323(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_icon = resolveComponent("el-icon"); @@ -61832,7 +61689,7 @@ function _sfc_render323(_ctx, _cache, $props, $setup, $data, $options) { ]), _: 1 }) - ], 42, _hoisted_1354)), [ + ], 42, _hoisted_1355)), [ [vShow, _ctx.node.visible] ]); } @@ -62193,6 +62050,7 @@ var _sfc_main137 = defineComponent({ } }); function _sfc_render324(_ctx, _cache, $props, $setup, $data, $options) { + var _a2; const _component_el_tree_node = resolveComponent("el-tree-node"); return openBlock(), createElementBlock("div", { ref: "el$", @@ -62221,14 +62079,9 @@ function _sfc_render324(_ctx, _cache, $props, $setup, $data, $options) { key: 0, class: normalizeClass(_ctx.ns.e("empty-block")) }, [ - renderSlot(_ctx.$slots, "empty", {}, () => { - var _a2; - return [ - createBaseVNode("span", { - class: normalizeClass(_ctx.ns.e("empty-text")) - }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : _ctx.t("el.tree.emptyText")), 3) - ]; - }) + createBaseVNode("span", { + class: normalizeClass(_ctx.ns.e("empty-text")) + }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : _ctx.t("el.tree.emptyText")), 3) ], 2)) : createCommentVNode("v-if", true), withDirectives(createBaseVNode("div", { ref: "dropIndicator$", @@ -62392,9 +62245,6 @@ var useTree2 = (props, { attrs, slots, emit }, { }, (data) => getNodeValByProp("children", data)); return options; }); - const cacheOptionsMap = computed2(() => { - return cacheOptions.value.reduce((prev, next) => ({ ...prev, [next.value]: next }), {}); - }); return { ...pick_default(toRefs(props), Object.keys(_Tree.props)), ...attrs, @@ -62428,21 +62278,18 @@ var useTree2 = (props, { attrs, slots, emit }, { if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) { if (!getNodeValByProp("disabled", data)) { const option = (_b = select.value) == null ? void 0 : _b.options.get(getNodeValByProp("value", data)); - (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option); + (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option, true); } } else if (props.expandOnClickNode) { e.proxy.handleExpandIconClick(); } }, onCheck: (data, params) => { - if (!props.showCheckbox) - return; + var _a2; + (_a2 = attrs.onCheck) == null ? void 0 : _a2.call(attrs, data, params); const dataValue = getNodeValByProp("value", data); - const uncachedCheckedKeys = params.checkedKeys; - const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => item in cacheOptionsMap.value && !tree.value.getNode(item) && !uncachedCheckedKeys.includes(item)) : []; - const checkedKeys = uncachedCheckedKeys.concat(cachedKeys); if (props.checkStrictly) { - emit(UPDATE_MODEL_EVENT, props.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0); + emit(UPDATE_MODEL_EVENT, props.multiple ? params.checkedKeys : params.checkedKeys.includes(dataValue) ? dataValue : void 0); } else { if (props.multiple) { emit(UPDATE_MODEL_EVENT, tree.value.getCheckedKeys(true)); @@ -62453,17 +62300,6 @@ var useTree2 = (props, { attrs, slots, emit }, { emit(UPDATE_MODEL_EVENT, firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey); } } - nextTick(() => { - var _a2; - const checkedKeys2 = toValidArray(props.modelValue); - tree.value.setCheckedKeys(checkedKeys2); - (_a2 = attrs.onCheck) == null ? void 0 : _a2.call(attrs, data, { - checkedKeys: tree.value.getCheckedKeys(), - checkedNodes: tree.value.getCheckedNodes(), - halfCheckedKeys: tree.value.getHalfCheckedKeys(), - halfCheckedNodes: tree.value.getHalfCheckedNodes() - }); - }); }, cacheOptions }; @@ -63166,7 +63002,7 @@ function useTree3(props, emit) { } function isCurrent(node) { const current = currentKey.value; - return current !== void 0 && current === node.key; + return !!current && current === node.key; } function getCurrentNode() { var _a2, _b; @@ -63238,7 +63074,7 @@ var ElNodeContent = defineComponent({ }); // node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs -var _hoisted_1355 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"]; +var _hoisted_1356 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"]; var __default__96 = defineComponent({ name: "ElTreeNode" }); @@ -63330,7 +63166,7 @@ var _sfc_main139 = defineComponent({ }, null, 8, ["model-value", "indeterminate", "disabled"])) : createCommentVNode("v-if", true), createVNode(unref(ElNodeContent), { node: _ctx.node }, null, 8, ["node"]) ], 6) - ], 42, _hoisted_1355); + ], 42, _hoisted_1356); }; } }); @@ -63508,7 +63344,7 @@ var ajaxUpload = (option) => { const formData = new FormData(); if (option.data) { for (const [key, value] of Object.entries(option.data)) { - if (isArray(value) && value.length) + if (Array.isArray(value)) formData.append(key, ...value); else formData.append(key, value); @@ -63559,7 +63395,7 @@ var uploadBaseProps = buildProps({ default: "post" }, data: { - type: definePropType([Object, Function, Promise]), + type: Object, default: () => mutable({}) }, multiple: { @@ -63671,12 +63507,11 @@ var uploadListEmits = { }; // node_modules/element-plus/es/components/upload/src/upload-list2.mjs -var _hoisted_1356 = ["onKeydown"]; +var _hoisted_1357 = ["onKeydown"]; var _hoisted_2333 = ["src"]; var _hoisted_3312 = ["onClick"]; -var _hoisted_497 = ["title"]; +var _hoisted_497 = ["onClick"]; var _hoisted_532 = ["onClick"]; -var _hoisted_66 = ["onClick"]; var __default__98 = defineComponent({ name: "ElUploadList" }); @@ -63743,9 +63578,8 @@ var _sfc_main141 = defineComponent({ _: 1 }, 8, ["class"]), createBaseVNode("span", { - class: normalizeClass(unref(nsUpload).be("list", "item-file-name")), - title: file.name - }, toDisplayString(file.name), 11, _hoisted_497) + class: normalizeClass(unref(nsUpload).be("list", "item-file-name")) + }, toDisplayString(file.name), 3) ], 10, _hoisted_3312), file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), { key: 0, @@ -63809,7 +63643,7 @@ var _sfc_main141 = defineComponent({ ]), _: 1 }, 8, ["class"]) - ], 10, _hoisted_532), + ], 10, _hoisted_497), !unref(disabled) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(nsUpload).be("list", "item-delete")), @@ -63823,10 +63657,10 @@ var _sfc_main141 = defineComponent({ ]), _: 1 }, 8, ["class"]) - ], 10, _hoisted_66)) : createCommentVNode("v-if", true) + ], 10, _hoisted_532)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ]) - ], 42, _hoisted_1356); + ], 42, _hoisted_1357); }), 128)), renderSlot(_ctx.$slots, "append") ]), @@ -63849,7 +63683,7 @@ var uploadDraggerEmits = { }; // node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs -var _hoisted_1357 = ["onDrop", "onDragover"]; +var _hoisted_1358 = ["onDrop", "onDragover"]; var COMPONENT_NAME25 = "ElUploadDrag"; var __default__99 = defineComponent({ name: COMPONENT_NAME25 @@ -63908,7 +63742,7 @@ var _sfc_main142 = defineComponent({ onDragleave: _cache[0] || (_cache[0] = withModifiers(($event) => dragover.value = false, ["prevent"])) }, [ renderSlot(_ctx.$slots, "default") - ], 42, _hoisted_1357); + ], 42, _hoisted_1358); }; } }); @@ -63948,7 +63782,7 @@ var uploadContentProps = buildProps({ }); // node_modules/element-plus/es/components/upload/src/upload-content2.mjs -var _hoisted_1358 = ["onKeydown"]; +var _hoisted_1359 = ["onKeydown"]; var _hoisted_2334 = ["name", "multiple", "accept"]; var __default__100 = defineComponent({ name: "ElUploadContent", @@ -63990,13 +63824,9 @@ var _sfc_main143 = defineComponent({ let hookResult; let beforeData = {}; try { - const originData = props.data; const beforeUploadPromise = props.beforeUpload(rawFile); - beforeData = isPlainObject(props.data) ? cloneDeep_default(props.data) : props.data; + beforeData = isObject(props.data) ? cloneDeep_default(props.data) : props.data; hookResult = await beforeUploadPromise; - if (isPlainObject(props.data) && isEqual_default(originData, beforeData)) { - beforeData = cloneDeep_default(props.data); - } } catch (e) { hookResult = false; } @@ -64018,13 +63848,7 @@ var _sfc_main143 = defineComponent({ uid: rawFile.uid }), beforeData); }; - const resolveData = async (data, rawFile) => { - if (isFunction(data)) { - return data(rawFile); - } - return data; - }; - const doUpload = async (rawFile, beforeData) => { + const doUpload = (rawFile, beforeData) => { const { headers, data, @@ -64037,18 +63861,12 @@ var _sfc_main143 = defineComponent({ onError, httpRequest } = props; - try { - beforeData = await resolveData(beforeData != null ? beforeData : data, rawFile); - } catch (e) { - props.onRemove(rawFile); - return; - } const { uid: uid2 } = rawFile; const options = { headers: headers || {}, withCredentials, file: rawFile, - data: beforeData, + data: beforeData != null ? beforeData : data, method: method5, filename, action, @@ -64126,7 +63944,7 @@ var _sfc_main143 = defineComponent({ onClick: _cache[0] || (_cache[0] = withModifiers(() => { }, ["stop"])) }, null, 42, _hoisted_2334) - ], 42, _hoisted_1358); + ], 42, _hoisted_1359); }; } }); @@ -64134,7 +63952,7 @@ var UploadContent = _export_sfc(_sfc_main143, [["__file", "/home/runner/work/ele // node_modules/element-plus/es/components/upload/src/use-handlers.mjs var SCOPE8 = "ElUpload"; -var revokeFileObjectURL = (file) => { +var revokeObjectURL = (file) => { var _a2; if ((_a2 = file.url) == null ? void 0 : _a2.startsWith("blob:")) { URL.revokeObjectURL(file.url); @@ -64208,7 +64026,7 @@ var useHandlers = (props, uploadRef) => { const fileList = uploadFiles.value; fileList.splice(fileList.indexOf(file2), 1); props.onRemove(file2, fileList); - revokeFileObjectURL(file2); + revokeObjectURL(file2); }; if (props.beforeRemove) { const before2 = await props.beforeRemove(uploadFile, uploadFiles.value); @@ -64255,8 +64073,7 @@ var useHandlers = (props, uploadRef) => { handleStart, handleSuccess, handleRemove, - submit, - revokeFileObjectURL + submit }; }; @@ -64269,6 +64086,7 @@ var _sfc_main144 = defineComponent({ props: uploadProps, setup(__props, { expose }) { const props = __props; + const slots = useSlots(); const disabled = useFormDisabled(); const uploadRef = shallowRef(); const { @@ -64280,8 +64098,7 @@ var _sfc_main144 = defineComponent({ handleError, handleRemove, handleSuccess, - handleProgress, - revokeFileObjectURL: revokeFileObjectURL2 + handleProgress } = useHandlers(props, uploadRef); const isPictureCard = computed2(() => props.listType === "picture-card"); const uploadContentProps2 = computed2(() => ({ @@ -64294,7 +64111,10 @@ var _sfc_main144 = defineComponent({ onRemove: handleRemove })); onBeforeUnmount(() => { - uploadFiles.value.forEach(revokeFileObjectURL2); + uploadFiles.value.forEach(({ url: url2 }) => { + if (url2 == null ? void 0 : url2.startsWith("blob:")) + URL.revokeObjectURL(url2); + }); }); provide(uploadContextKey, { accept: toRef(props, "accept") @@ -64322,8 +64142,8 @@ var _sfc_main144 = defineComponent({ ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ - _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), - !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) + unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), + !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16) @@ -64343,8 +64163,8 @@ var _sfc_main144 = defineComponent({ ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ - _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), - !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) + unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), + !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16)) : createCommentVNode("v-if", true), @@ -64658,7 +64478,8 @@ function createLoadingComponent(options) { const elLoadingComponent = defineComponent({ name: "ElLoading", setup(_2, { expose }) { - const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("loading"); + const { ns } = useGlobalComponentSettings("loading"); + const zIndex2 = useZIndex(); expose({ ns, zIndex: zIndex2 @@ -64776,7 +64597,7 @@ var resolveOptions = (options) => { }; }; var addStyle = async (options, parent2, instance) => { - const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex; + const { nextZIndex } = instance.vm.zIndex; const maskStyle = {}; if (options.fullscreen) { instance.originalPosition.value = getStyle(document.body, "position"); @@ -64800,7 +64621,7 @@ var addStyle = async (options, parent2, instance) => { } }; var addClassList = (options, parent2, instance) => { - const ns = instance.vm.ns || instance.vm._.exposed.ns; + const ns = instance.vm.ns; if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) { addClass(parent2, ns.bm("parent", "relative")); } else { @@ -64995,7 +64816,7 @@ var getOffsetOrSpace = (id, offset2) => { }; // node_modules/element-plus/es/components/message/src/message2.mjs -var _hoisted_1359 = ["id"]; +var _hoisted_1360 = ["id"]; var _hoisted_2335 = ["innerHTML"]; var __default__102 = defineComponent({ name: "ElMessage" @@ -65123,7 +64944,7 @@ var _sfc_main145 = defineComponent({ ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) - ], 46, _hoisted_1359), [ + ], 46, _hoisted_1360), [ [vShow, visible.value] ]) ]), @@ -65201,7 +65022,7 @@ var createMessage = ({ appendTo, ...options }, context) => { var message = (options = {}, context) => { if (!isClient) return { close: () => void 0 }; - if (isNumber3(messageConfig.max) && instances.length >= messageConfig.max) { + if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) { return { close: () => void 0 }; } const normalized = normalizeOptions(options); @@ -65482,6 +65303,7 @@ var _sfc_main146 = defineComponent({ if (props.lockScroll) { useLockscreen(visible); } + useRestoreActive(visible); return { ...toRefs(state), ns, @@ -65509,7 +65331,7 @@ var _sfc_main146 = defineComponent({ }; } }); -var _hoisted_1360 = ["aria-label", "aria-describedby"]; +var _hoisted_1361 = ["aria-label", "aria-describedby"]; var _hoisted_2336 = ["aria-label"]; var _hoisted_3313 = ["id"]; function _sfc_render325(_ctx, _cache, $props, $setup, $data, $options) { @@ -65700,7 +65522,7 @@ function _sfc_render325(_ctx, _cache, $props, $setup, $data, $options) { ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"]) - ], 42, _hoisted_1360) + ], 42, _hoisted_1361) ]), _: 3 }, 8, ["z-index", "overlay-class", "mask"]), [ @@ -65913,14 +65735,17 @@ var notificationProps = buildProps({ values: [...notificationTypes, ""], default: "" }, - zIndex: Number + zIndex: { + type: Number, + default: 0 + } }); var notificationEmits = { destroy: () => true }; // node_modules/element-plus/es/components/notification/src/notification2.mjs -var _hoisted_1361 = ["id"]; +var _hoisted_1362 = ["id"]; var _hoisted_2337 = ["textContent"]; var _hoisted_3314 = { key: 0 }; var _hoisted_498 = ["innerHTML"]; @@ -65950,10 +65775,9 @@ var _sfc_main147 = defineComponent({ const horizontalClass = computed2(() => props.position.endsWith("right") ? "right" : "left"); const verticalProperty = computed2(() => props.position.startsWith("top") ? "top" : "bottom"); const positionStyle = computed2(() => { - var _a2; return { [verticalProperty.value]: `${props.offset}px`, - zIndex: (_a2 = props.zIndex) != null ? _a2 : currentZIndex.value + zIndex: currentZIndex.value }; }); function startTimer() { @@ -66049,7 +65873,7 @@ var _sfc_main147 = defineComponent({ _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 2) - ], 46, _hoisted_1361), [ + ], 46, _hoisted_1362), [ [vShow, visible.value] ]) ]), @@ -66407,7 +66231,6 @@ export { createModelToggleComposable, dateEquals, datePickTypes, - datePickerProps, export_dayjs as dayjs, installer as default, defaultInitialZIndex, @@ -66562,7 +66385,6 @@ export { useFloating, useFloatingProps, useFocus, - useFocusController, useFormDisabled, useFormItem, useFormItemInputId, @@ -66594,6 +66416,7 @@ export { usePopperTriggerProps, usePreventGlobal, useProp, + useRestoreActive, useSameTarget, useSize, useSizeProp, diff --git a/docs/.vitepress/cache/deps/element-plus.js.map b/docs/.vitepress/cache/deps/element-plus.js.map index 38c1705..26ea668 100644 --- a/docs/.vitepress/cache/deps/element-plus.js.map +++ b/docs/.vitepress/cache/deps/element-plus.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../../../../node_modules/dayjs/plugin/customParseFormat.js", "../../../../node_modules/dayjs/plugin/localeData.js", "../../../../node_modules/dayjs/plugin/advancedFormat.js", "../../../../node_modules/dayjs/plugin/weekOfYear.js", "../../../../node_modules/dayjs/plugin/weekYear.js", "../../../../node_modules/dayjs/plugin/dayOfYear.js", "../../../../node_modules/dayjs/plugin/isSameOrAfter.js", "../../../../node_modules/dayjs/plugin/isSameOrBefore.js", "../../../../node_modules/escape-html/index.js", "../../../../packages/utils/dom/aria.ts", "../../../../packages/utils/dom/event.ts", "../../../../node_modules/vue-demi/lib/index.mjs", "../../../../node_modules/element-plus/node_modules/@vueuse/shared/index.mjs", "../../../../node_modules/element-plus/node_modules/@vueuse/core/index.mjs", "../../../../packages/utils/browser.ts", "../../../../packages/utils/dom/position.ts", "../../../../node_modules/lodash-es/_freeGlobal.js", "../../../../node_modules/lodash-es/_root.js", "../../../../node_modules/lodash-es/_Symbol.js", "../../../../node_modules/lodash-es/_getRawTag.js", "../../../../node_modules/lodash-es/_objectToString.js", "../../../../node_modules/lodash-es/_baseGetTag.js", "../../../../node_modules/lodash-es/isObjectLike.js", "../../../../node_modules/lodash-es/isSymbol.js", "../../../../node_modules/lodash-es/_baseToNumber.js", "../../../../node_modules/lodash-es/_arrayMap.js", "../../../../node_modules/lodash-es/isArray.js", "../../../../node_modules/lodash-es/_baseToString.js", "../../../../node_modules/lodash-es/_createMathOperation.js", "../../../../node_modules/lodash-es/add.js", "../../../../node_modules/lodash-es/_trimmedEndIndex.js", "../../../../node_modules/lodash-es/_baseTrim.js", "../../../../node_modules/lodash-es/isObject.js", "../../../../node_modules/lodash-es/toNumber.js", "../../../../node_modules/lodash-es/toFinite.js", "../../../../node_modules/lodash-es/toInteger.js", "../../../../node_modules/lodash-es/after.js", "../../../../node_modules/lodash-es/identity.js", "../../../../node_modules/lodash-es/isFunction.js", "../../../../node_modules/lodash-es/_coreJsData.js", "../../../../node_modules/lodash-es/_isMasked.js", "../../../../node_modules/lodash-es/_toSource.js", "../../../../node_modules/lodash-es/_baseIsNative.js", "../../../../node_modules/lodash-es/_getValue.js", "../../../../node_modules/lodash-es/_getNative.js", "../../../../node_modules/lodash-es/_WeakMap.js", "../../../../node_modules/lodash-es/_metaMap.js", "../../../../node_modules/lodash-es/_baseSetData.js", "../../../../node_modules/lodash-es/_baseCreate.js", "../../../../node_modules/lodash-es/_createCtor.js", "../../../../node_modules/lodash-es/_createBind.js", "../../../../node_modules/lodash-es/_apply.js", "../../../../node_modules/lodash-es/_composeArgs.js", "../../../../node_modules/lodash-es/_composeArgsRight.js", "../../../../node_modules/lodash-es/_countHolders.js", "../../../../node_modules/lodash-es/_baseLodash.js", "../../../../node_modules/lodash-es/_LazyWrapper.js", "../../../../node_modules/lodash-es/noop.js", "../../../../node_modules/lodash-es/_getData.js", "../../../../node_modules/lodash-es/_realNames.js", "../../../../node_modules/lodash-es/_getFuncName.js", "../../../../node_modules/lodash-es/_LodashWrapper.js", "../../../../node_modules/lodash-es/_copyArray.js", "../../../../node_modules/lodash-es/_wrapperClone.js", "../../../../node_modules/lodash-es/wrapperLodash.js", "../../../../node_modules/lodash-es/_isLaziable.js", "../../../../node_modules/lodash-es/_shortOut.js", "../../../../node_modules/lodash-es/_setData.js", "../../../../node_modules/lodash-es/_getWrapDetails.js", "../../../../node_modules/lodash-es/_insertWrapDetails.js", "../../../../node_modules/lodash-es/constant.js", "../../../../node_modules/lodash-es/_defineProperty.js", "../../../../node_modules/lodash-es/_baseSetToString.js", "../../../../node_modules/lodash-es/_setToString.js", "../../../../node_modules/lodash-es/_arrayEach.js", "../../../../node_modules/lodash-es/_baseFindIndex.js", "../../../../node_modules/lodash-es/_baseIsNaN.js", "../../../../node_modules/lodash-es/_strictIndexOf.js", "../../../../node_modules/lodash-es/_baseIndexOf.js", "../../../../node_modules/lodash-es/_arrayIncludes.js", "../../../../node_modules/lodash-es/_updateWrapDetails.js", "../../../../node_modules/lodash-es/_setWrapToString.js", "../../../../node_modules/lodash-es/_createRecurry.js", "../../../../node_modules/lodash-es/_getHolder.js", "../../../../node_modules/lodash-es/_isIndex.js", "../../../../node_modules/lodash-es/_reorder.js", "../../../../node_modules/lodash-es/_replaceHolders.js", "../../../../node_modules/lodash-es/_createHybrid.js", "../../../../node_modules/lodash-es/_createCurry.js", "../../../../node_modules/lodash-es/_createPartial.js", "../../../../node_modules/lodash-es/_mergeData.js", "../../../../node_modules/lodash-es/_createWrap.js", "../../../../node_modules/lodash-es/ary.js", "../../../../node_modules/lodash-es/_baseAssignValue.js", "../../../../node_modules/lodash-es/eq.js", "../../../../node_modules/lodash-es/_assignValue.js", "../../../../node_modules/lodash-es/_copyObject.js", "../../../../node_modules/lodash-es/_overRest.js", "../../../../node_modules/lodash-es/_baseRest.js", "../../../../node_modules/lodash-es/isLength.js", "../../../../node_modules/lodash-es/isArrayLike.js", "../../../../node_modules/lodash-es/_isIterateeCall.js", "../../../../node_modules/lodash-es/_createAssigner.js", "../../../../node_modules/lodash-es/_isPrototype.js", "../../../../node_modules/lodash-es/_baseTimes.js", "../../../../node_modules/lodash-es/_baseIsArguments.js", "../../../../node_modules/lodash-es/isArguments.js", "../../../../node_modules/lodash-es/stubFalse.js", "../../../../node_modules/lodash-es/isBuffer.js", "../../../../node_modules/lodash-es/_baseIsTypedArray.js", "../../../../node_modules/lodash-es/_baseUnary.js", "../../../../node_modules/lodash-es/_nodeUtil.js", "../../../../node_modules/lodash-es/isTypedArray.js", "../../../../node_modules/lodash-es/_arrayLikeKeys.js", "../../../../node_modules/lodash-es/_overArg.js", "../../../../node_modules/lodash-es/_nativeKeys.js", "../../../../node_modules/lodash-es/_baseKeys.js", "../../../../node_modules/lodash-es/keys.js", "../../../../node_modules/lodash-es/assign.js", "../../../../node_modules/lodash-es/_nativeKeysIn.js", "../../../../node_modules/lodash-es/_baseKeysIn.js", "../../../../node_modules/lodash-es/keysIn.js", "../../../../node_modules/lodash-es/assignIn.js", "../../../../node_modules/lodash-es/assignInWith.js", "../../../../node_modules/lodash-es/assignWith.js", "../../../../node_modules/lodash-es/_isKey.js", "../../../../node_modules/lodash-es/_nativeCreate.js", "../../../../node_modules/lodash-es/_hashClear.js", "../../../../node_modules/lodash-es/_hashDelete.js", "../../../../node_modules/lodash-es/_hashGet.js", "../../../../node_modules/lodash-es/_hashHas.js", "../../../../node_modules/lodash-es/_hashSet.js", "../../../../node_modules/lodash-es/_Hash.js", "../../../../node_modules/lodash-es/_listCacheClear.js", "../../../../node_modules/lodash-es/_assocIndexOf.js", "../../../../node_modules/lodash-es/_listCacheDelete.js", "../../../../node_modules/lodash-es/_listCacheGet.js", "../../../../node_modules/lodash-es/_listCacheHas.js", "../../../../node_modules/lodash-es/_listCacheSet.js", "../../../../node_modules/lodash-es/_ListCache.js", "../../../../node_modules/lodash-es/_Map.js", "../../../../node_modules/lodash-es/_mapCacheClear.js", "../../../../node_modules/lodash-es/_isKeyable.js", "../../../../node_modules/lodash-es/_getMapData.js", "../../../../node_modules/lodash-es/_mapCacheDelete.js", "../../../../node_modules/lodash-es/_mapCacheGet.js", "../../../../node_modules/lodash-es/_mapCacheHas.js", "../../../../node_modules/lodash-es/_mapCacheSet.js", "../../../../node_modules/lodash-es/_MapCache.js", "../../../../node_modules/lodash-es/memoize.js", "../../../../node_modules/lodash-es/_memoizeCapped.js", "../../../../node_modules/lodash-es/_stringToPath.js", "../../../../node_modules/lodash-es/toString.js", "../../../../node_modules/lodash-es/_castPath.js", "../../../../node_modules/lodash-es/_toKey.js", "../../../../node_modules/lodash-es/_baseGet.js", "../../../../node_modules/lodash-es/get.js", "../../../../node_modules/lodash-es/_baseAt.js", "../../../../node_modules/lodash-es/_arrayPush.js", "../../../../node_modules/lodash-es/_isFlattenable.js", "../../../../node_modules/lodash-es/_baseFlatten.js", "../../../../node_modules/lodash-es/flatten.js", "../../../../node_modules/lodash-es/_flatRest.js", "../../../../node_modules/lodash-es/at.js", "../../../../node_modules/lodash-es/_getPrototype.js", "../../../../node_modules/lodash-es/isPlainObject.js", "../../../../node_modules/lodash-es/isError.js", "../../../../node_modules/lodash-es/attempt.js", "../../../../node_modules/lodash-es/before.js", "../../../../node_modules/lodash-es/bind.js", "../../../../node_modules/lodash-es/bindAll.js", "../../../../node_modules/lodash-es/bindKey.js", "../../../../node_modules/lodash-es/_baseSlice.js", "../../../../node_modules/lodash-es/_castSlice.js", "../../../../node_modules/lodash-es/_hasUnicode.js", "../../../../node_modules/lodash-es/_asciiToArray.js", "../../../../node_modules/lodash-es/_unicodeToArray.js", "../../../../node_modules/lodash-es/_stringToArray.js", "../../../../node_modules/lodash-es/_createCaseFirst.js", "../../../../node_modules/lodash-es/upperFirst.js", "../../../../node_modules/lodash-es/capitalize.js", "../../../../node_modules/lodash-es/_arrayReduce.js", "../../../../node_modules/lodash-es/_basePropertyOf.js", "../../../../node_modules/lodash-es/_deburrLetter.js", "../../../../node_modules/lodash-es/deburr.js", "../../../../node_modules/lodash-es/_asciiWords.js", "../../../../node_modules/lodash-es/_hasUnicodeWord.js", "../../../../node_modules/lodash-es/_unicodeWords.js", "../../../../node_modules/lodash-es/words.js", "../../../../node_modules/lodash-es/_createCompounder.js", "../../../../node_modules/lodash-es/camelCase.js", "../../../../node_modules/lodash-es/castArray.js", "../../../../node_modules/lodash-es/_createRound.js", "../../../../node_modules/lodash-es/ceil.js", "../../../../node_modules/lodash-es/chain.js", "../../../../node_modules/lodash-es/chunk.js", "../../../../node_modules/lodash-es/_baseClamp.js", "../../../../node_modules/lodash-es/clamp.js", "../../../../node_modules/lodash-es/_stackClear.js", "../../../../node_modules/lodash-es/_stackDelete.js", "../../../../node_modules/lodash-es/_stackGet.js", "../../../../node_modules/lodash-es/_stackHas.js", "../../../../node_modules/lodash-es/_stackSet.js", "../../../../node_modules/lodash-es/_Stack.js", "../../../../node_modules/lodash-es/_baseAssign.js", "../../../../node_modules/lodash-es/_baseAssignIn.js", "../../../../node_modules/lodash-es/_cloneBuffer.js", "../../../../node_modules/lodash-es/_arrayFilter.js", "../../../../node_modules/lodash-es/stubArray.js", "../../../../node_modules/lodash-es/_getSymbols.js", "../../../../node_modules/lodash-es/_copySymbols.js", "../../../../node_modules/lodash-es/_getSymbolsIn.js", "../../../../node_modules/lodash-es/_copySymbolsIn.js", "../../../../node_modules/lodash-es/_baseGetAllKeys.js", "../../../../node_modules/lodash-es/_getAllKeys.js", "../../../../node_modules/lodash-es/_getAllKeysIn.js", "../../../../node_modules/lodash-es/_DataView.js", "../../../../node_modules/lodash-es/_Promise.js", "../../../../node_modules/lodash-es/_Set.js", "../../../../node_modules/lodash-es/_getTag.js", "../../../../node_modules/lodash-es/_initCloneArray.js", "../../../../node_modules/lodash-es/_Uint8Array.js", "../../../../node_modules/lodash-es/_cloneArrayBuffer.js", "../../../../node_modules/lodash-es/_cloneDataView.js", "../../../../node_modules/lodash-es/_cloneRegExp.js", "../../../../node_modules/lodash-es/_cloneSymbol.js", "../../../../node_modules/lodash-es/_cloneTypedArray.js", "../../../../node_modules/lodash-es/_initCloneByTag.js", "../../../../node_modules/lodash-es/_initCloneObject.js", "../../../../node_modules/lodash-es/_baseIsMap.js", "../../../../node_modules/lodash-es/isMap.js", "../../../../node_modules/lodash-es/_baseIsSet.js", "../../../../node_modules/lodash-es/isSet.js", "../../../../node_modules/lodash-es/_baseClone.js", "../../../../node_modules/lodash-es/clone.js", "../../../../node_modules/lodash-es/cloneDeep.js", "../../../../node_modules/lodash-es/cloneDeepWith.js", "../../../../node_modules/lodash-es/cloneWith.js", "../../../../node_modules/lodash-es/commit.js", "../../../../node_modules/lodash-es/compact.js", "../../../../node_modules/lodash-es/concat.js", "../../../../node_modules/lodash-es/_setCacheAdd.js", "../../../../node_modules/lodash-es/_setCacheHas.js", "../../../../node_modules/lodash-es/_SetCache.js", "../../../../node_modules/lodash-es/_arraySome.js", "../../../../node_modules/lodash-es/_cacheHas.js", "../../../../node_modules/lodash-es/_equalArrays.js", "../../../../node_modules/lodash-es/_mapToArray.js", "../../../../node_modules/lodash-es/_setToArray.js", "../../../../node_modules/lodash-es/_equalByTag.js", "../../../../node_modules/lodash-es/_equalObjects.js", "../../../../node_modules/lodash-es/_baseIsEqualDeep.js", "../../../../node_modules/lodash-es/_baseIsEqual.js", "../../../../node_modules/lodash-es/_baseIsMatch.js", "../../../../node_modules/lodash-es/_isStrictComparable.js", "../../../../node_modules/lodash-es/_getMatchData.js", "../../../../node_modules/lodash-es/_matchesStrictComparable.js", "../../../../node_modules/lodash-es/_baseMatches.js", "../../../../node_modules/lodash-es/_baseHasIn.js", "../../../../node_modules/lodash-es/_hasPath.js", "../../../../node_modules/lodash-es/hasIn.js", "../../../../node_modules/lodash-es/_baseMatchesProperty.js", "../../../../node_modules/lodash-es/_baseProperty.js", "../../../../node_modules/lodash-es/_basePropertyDeep.js", "../../../../node_modules/lodash-es/property.js", "../../../../node_modules/lodash-es/_baseIteratee.js", "../../../../node_modules/lodash-es/cond.js", "../../../../node_modules/lodash-es/_baseConformsTo.js", "../../../../node_modules/lodash-es/_baseConforms.js", "../../../../node_modules/lodash-es/conforms.js", "../../../../node_modules/lodash-es/conformsTo.js", "../../../../node_modules/lodash-es/_arrayAggregator.js", "../../../../node_modules/lodash-es/_createBaseFor.js", "../../../../node_modules/lodash-es/_baseFor.js", "../../../../node_modules/lodash-es/_baseForOwn.js", "../../../../node_modules/lodash-es/_createBaseEach.js", "../../../../node_modules/lodash-es/_baseEach.js", "../../../../node_modules/lodash-es/_baseAggregator.js", "../../../../node_modules/lodash-es/_createAggregator.js", "../../../../node_modules/lodash-es/countBy.js", "../../../../node_modules/lodash-es/create.js", "../../../../node_modules/lodash-es/curry.js", "../../../../node_modules/lodash-es/curryRight.js", "../../../../node_modules/lodash-es/now.js", "../../../../node_modules/lodash-es/debounce.js", "../../../../node_modules/lodash-es/defaultTo.js", "../../../../node_modules/lodash-es/defaults.js", "../../../../node_modules/lodash-es/_assignMergeValue.js", "../../../../node_modules/lodash-es/isArrayLikeObject.js", "../../../../node_modules/lodash-es/_safeGet.js", "../../../../node_modules/lodash-es/toPlainObject.js", "../../../../node_modules/lodash-es/_baseMergeDeep.js", "../../../../node_modules/lodash-es/_baseMerge.js", "../../../../node_modules/lodash-es/_customDefaultsMerge.js", "../../../../node_modules/lodash-es/mergeWith.js", "../../../../node_modules/lodash-es/defaultsDeep.js", "../../../../node_modules/lodash-es/_baseDelay.js", "../../../../node_modules/lodash-es/defer.js", "../../../../node_modules/lodash-es/delay.js", "../../../../node_modules/lodash-es/_arrayIncludesWith.js", "../../../../node_modules/lodash-es/_baseDifference.js", "../../../../node_modules/lodash-es/difference.js", "../../../../node_modules/lodash-es/last.js", "../../../../node_modules/lodash-es/differenceBy.js", "../../../../node_modules/lodash-es/differenceWith.js", "../../../../node_modules/lodash-es/divide.js", "../../../../node_modules/lodash-es/drop.js", "../../../../node_modules/lodash-es/dropRight.js", "../../../../node_modules/lodash-es/_baseWhile.js", "../../../../node_modules/lodash-es/dropRightWhile.js", "../../../../node_modules/lodash-es/dropWhile.js", "../../../../node_modules/lodash-es/_castFunction.js", "../../../../node_modules/lodash-es/forEach.js", "../../../../node_modules/lodash-es/_arrayEachRight.js", "../../../../node_modules/lodash-es/_baseForRight.js", "../../../../node_modules/lodash-es/_baseForOwnRight.js", "../../../../node_modules/lodash-es/_baseEachRight.js", "../../../../node_modules/lodash-es/forEachRight.js", "../../../../node_modules/lodash-es/endsWith.js", "../../../../node_modules/lodash-es/_baseToPairs.js", "../../../../node_modules/lodash-es/_setToPairs.js", "../../../../node_modules/lodash-es/_createToPairs.js", "../../../../node_modules/lodash-es/toPairs.js", "../../../../node_modules/lodash-es/toPairsIn.js", "../../../../node_modules/lodash-es/_escapeHtmlChar.js", "../../../../node_modules/lodash-es/escape.js", "../../../../node_modules/lodash-es/escapeRegExp.js", "../../../../node_modules/lodash-es/_arrayEvery.js", "../../../../node_modules/lodash-es/_baseEvery.js", "../../../../node_modules/lodash-es/every.js", "../../../../node_modules/lodash-es/toLength.js", "../../../../node_modules/lodash-es/_baseFill.js", "../../../../node_modules/lodash-es/fill.js", "../../../../node_modules/lodash-es/_baseFilter.js", "../../../../node_modules/lodash-es/filter.js", "../../../../node_modules/lodash-es/_createFind.js", "../../../../node_modules/lodash-es/findIndex.js", "../../../../node_modules/lodash-es/find.js", "../../../../node_modules/lodash-es/_baseFindKey.js", "../../../../node_modules/lodash-es/findKey.js", "../../../../node_modules/lodash-es/findLastIndex.js", "../../../../node_modules/lodash-es/findLast.js", "../../../../node_modules/lodash-es/findLastKey.js", "../../../../node_modules/lodash-es/head.js", "../../../../node_modules/lodash-es/_baseMap.js", "../../../../node_modules/lodash-es/map.js", "../../../../node_modules/lodash-es/flatMap.js", "../../../../node_modules/lodash-es/flatMapDeep.js", "../../../../node_modules/lodash-es/flatMapDepth.js", "../../../../node_modules/lodash-es/flattenDeep.js", "../../../../node_modules/lodash-es/flattenDepth.js", "../../../../node_modules/lodash-es/flip.js", "../../../../node_modules/lodash-es/floor.js", "../../../../node_modules/lodash-es/_createFlow.js", "../../../../node_modules/lodash-es/flow.js", "../../../../node_modules/lodash-es/flowRight.js", "../../../../node_modules/lodash-es/forIn.js", "../../../../node_modules/lodash-es/forInRight.js", "../../../../node_modules/lodash-es/forOwn.js", "../../../../node_modules/lodash-es/forOwnRight.js", "../../../../node_modules/lodash-es/fromPairs.js", "../../../../node_modules/lodash-es/_baseFunctions.js", "../../../../node_modules/lodash-es/functions.js", "../../../../node_modules/lodash-es/functionsIn.js", "../../../../node_modules/lodash-es/groupBy.js", "../../../../node_modules/lodash-es/_baseGt.js", "../../../../node_modules/lodash-es/_createRelationalOperation.js", "../../../../node_modules/lodash-es/gt.js", "../../../../node_modules/lodash-es/gte.js", "../../../../node_modules/lodash-es/_baseHas.js", "../../../../node_modules/lodash-es/has.js", "../../../../node_modules/lodash-es/_baseInRange.js", "../../../../node_modules/lodash-es/inRange.js", "../../../../node_modules/lodash-es/isString.js", "../../../../node_modules/lodash-es/_baseValues.js", "../../../../node_modules/lodash-es/values.js", "../../../../node_modules/lodash-es/includes.js", "../../../../node_modules/lodash-es/indexOf.js", "../../../../node_modules/lodash-es/initial.js", "../../../../node_modules/lodash-es/_baseIntersection.js", "../../../../node_modules/lodash-es/_castArrayLikeObject.js", "../../../../node_modules/lodash-es/intersection.js", "../../../../node_modules/lodash-es/intersectionBy.js", "../../../../node_modules/lodash-es/intersectionWith.js", "../../../../node_modules/lodash-es/_baseInverter.js", "../../../../node_modules/lodash-es/_createInverter.js", "../../../../node_modules/lodash-es/invert.js", "../../../../node_modules/lodash-es/invertBy.js", "../../../../node_modules/lodash-es/_parent.js", "../../../../node_modules/lodash-es/_baseInvoke.js", "../../../../node_modules/lodash-es/invoke.js", "../../../../node_modules/lodash-es/invokeMap.js", "../../../../node_modules/lodash-es/_baseIsArrayBuffer.js", "../../../../node_modules/lodash-es/isArrayBuffer.js", "../../../../node_modules/lodash-es/isBoolean.js", "../../../../node_modules/lodash-es/_baseIsDate.js", "../../../../node_modules/lodash-es/isDate.js", "../../../../node_modules/lodash-es/isElement.js", "../../../../node_modules/lodash-es/isEmpty.js", "../../../../node_modules/lodash-es/isEqual.js", "../../../../node_modules/lodash-es/isEqualWith.js", "../../../../node_modules/lodash-es/isFinite.js", "../../../../node_modules/lodash-es/isInteger.js", "../../../../node_modules/lodash-es/isMatch.js", "../../../../node_modules/lodash-es/isMatchWith.js", "../../../../node_modules/lodash-es/isNumber.js", "../../../../node_modules/lodash-es/isNaN.js", "../../../../node_modules/lodash-es/_isMaskable.js", "../../../../node_modules/lodash-es/isNative.js", "../../../../node_modules/lodash-es/isNil.js", "../../../../node_modules/lodash-es/isNull.js", "../../../../node_modules/lodash-es/_baseIsRegExp.js", "../../../../node_modules/lodash-es/isRegExp.js", "../../../../node_modules/lodash-es/isSafeInteger.js", "../../../../node_modules/lodash-es/isUndefined.js", "../../../../node_modules/lodash-es/isWeakMap.js", "../../../../node_modules/lodash-es/isWeakSet.js", "../../../../node_modules/lodash-es/iteratee.js", "../../../../node_modules/lodash-es/join.js", "../../../../node_modules/lodash-es/kebabCase.js", "../../../../node_modules/lodash-es/keyBy.js", "../../../../node_modules/lodash-es/_strictLastIndexOf.js", "../../../../node_modules/lodash-es/lastIndexOf.js", "../../../../node_modules/lodash-es/lowerCase.js", "../../../../node_modules/lodash-es/lowerFirst.js", "../../../../node_modules/lodash-es/_baseLt.js", "../../../../node_modules/lodash-es/lt.js", "../../../../node_modules/lodash-es/lte.js", "../../../../node_modules/lodash-es/mapKeys.js", "../../../../node_modules/lodash-es/mapValues.js", "../../../../node_modules/lodash-es/matches.js", "../../../../node_modules/lodash-es/matchesProperty.js", "../../../../node_modules/lodash-es/_baseExtremum.js", "../../../../node_modules/lodash-es/max.js", "../../../../node_modules/lodash-es/maxBy.js", "../../../../node_modules/lodash-es/_baseSum.js", "../../../../node_modules/lodash-es/_baseMean.js", "../../../../node_modules/lodash-es/mean.js", "../../../../node_modules/lodash-es/meanBy.js", "../../../../node_modules/lodash-es/merge.js", "../../../../node_modules/lodash-es/method.js", "../../../../node_modules/lodash-es/methodOf.js", "../../../../node_modules/lodash-es/min.js", "../../../../node_modules/lodash-es/minBy.js", "../../../../node_modules/lodash-es/mixin.js", "../../../../node_modules/lodash-es/multiply.js", "../../../../node_modules/lodash-es/negate.js", "../../../../node_modules/lodash-es/_iteratorToArray.js", "../../../../node_modules/lodash-es/toArray.js", "../../../../node_modules/lodash-es/next.js", "../../../../node_modules/lodash-es/_baseNth.js", "../../../../node_modules/lodash-es/nth.js", "../../../../node_modules/lodash-es/nthArg.js", "../../../../node_modules/lodash-es/_baseUnset.js", "../../../../node_modules/lodash-es/_customOmitClone.js", "../../../../node_modules/lodash-es/omit.js", "../../../../node_modules/lodash-es/_baseSet.js", "../../../../node_modules/lodash-es/_basePickBy.js", "../../../../node_modules/lodash-es/pickBy.js", "../../../../node_modules/lodash-es/omitBy.js", "../../../../node_modules/lodash-es/once.js", "../../../../node_modules/lodash-es/_baseSortBy.js", "../../../../node_modules/lodash-es/_compareAscending.js", "../../../../node_modules/lodash-es/_compareMultiple.js", "../../../../node_modules/lodash-es/_baseOrderBy.js", "../../../../node_modules/lodash-es/orderBy.js", "../../../../node_modules/lodash-es/_createOver.js", "../../../../node_modules/lodash-es/over.js", "../../../../node_modules/lodash-es/_castRest.js", "../../../../node_modules/lodash-es/overArgs.js", "../../../../node_modules/lodash-es/overEvery.js", "../../../../node_modules/lodash-es/overSome.js", "../../../../node_modules/lodash-es/_baseRepeat.js", "../../../../node_modules/lodash-es/_asciiSize.js", "../../../../node_modules/lodash-es/_unicodeSize.js", "../../../../node_modules/lodash-es/_stringSize.js", "../../../../node_modules/lodash-es/_createPadding.js", "../../../../node_modules/lodash-es/pad.js", "../../../../node_modules/lodash-es/padEnd.js", "../../../../node_modules/lodash-es/padStart.js", "../../../../node_modules/lodash-es/parseInt.js", "../../../../node_modules/lodash-es/partial.js", "../../../../node_modules/lodash-es/partialRight.js", "../../../../node_modules/lodash-es/partition.js", "../../../../node_modules/lodash-es/_basePick.js", "../../../../node_modules/lodash-es/pick.js", "../../../../node_modules/lodash-es/plant.js", "../../../../node_modules/lodash-es/propertyOf.js", "../../../../node_modules/lodash-es/_baseIndexOfWith.js", "../../../../node_modules/lodash-es/_basePullAll.js", "../../../../node_modules/lodash-es/pullAll.js", "../../../../node_modules/lodash-es/pull.js", "../../../../node_modules/lodash-es/pullAllBy.js", "../../../../node_modules/lodash-es/pullAllWith.js", "../../../../node_modules/lodash-es/_basePullAt.js", "../../../../node_modules/lodash-es/pullAt.js", "../../../../node_modules/lodash-es/_baseRandom.js", "../../../../node_modules/lodash-es/random.js", "../../../../node_modules/lodash-es/_baseRange.js", "../../../../node_modules/lodash-es/_createRange.js", "../../../../node_modules/lodash-es/range.js", "../../../../node_modules/lodash-es/rangeRight.js", "../../../../node_modules/lodash-es/rearg.js", "../../../../node_modules/lodash-es/_baseReduce.js", "../../../../node_modules/lodash-es/reduce.js", "../../../../node_modules/lodash-es/_arrayReduceRight.js", "../../../../node_modules/lodash-es/reduceRight.js", "../../../../node_modules/lodash-es/reject.js", "../../../../node_modules/lodash-es/remove.js", "../../../../node_modules/lodash-es/repeat.js", "../../../../node_modules/lodash-es/replace.js", "../../../../node_modules/lodash-es/rest.js", "../../../../node_modules/lodash-es/result.js", "../../../../node_modules/lodash-es/reverse.js", "../../../../node_modules/lodash-es/round.js", "../../../../node_modules/lodash-es/_arraySample.js", "../../../../node_modules/lodash-es/_baseSample.js", "../../../../node_modules/lodash-es/sample.js", "../../../../node_modules/lodash-es/_shuffleSelf.js", "../../../../node_modules/lodash-es/_arraySampleSize.js", "../../../../node_modules/lodash-es/_baseSampleSize.js", "../../../../node_modules/lodash-es/sampleSize.js", "../../../../node_modules/lodash-es/set.js", "../../../../node_modules/lodash-es/setWith.js", "../../../../node_modules/lodash-es/_arrayShuffle.js", "../../../../node_modules/lodash-es/_baseShuffle.js", "../../../../node_modules/lodash-es/shuffle.js", "../../../../node_modules/lodash-es/size.js", "../../../../node_modules/lodash-es/slice.js", "../../../../node_modules/lodash-es/snakeCase.js", "../../../../node_modules/lodash-es/_baseSome.js", "../../../../node_modules/lodash-es/some.js", "../../../../node_modules/lodash-es/sortBy.js", "../../../../node_modules/lodash-es/_baseSortedIndexBy.js", "../../../../node_modules/lodash-es/_baseSortedIndex.js", "../../../../node_modules/lodash-es/sortedIndex.js", "../../../../node_modules/lodash-es/sortedIndexBy.js", "../../../../node_modules/lodash-es/sortedIndexOf.js", "../../../../node_modules/lodash-es/sortedLastIndex.js", "../../../../node_modules/lodash-es/sortedLastIndexBy.js", "../../../../node_modules/lodash-es/sortedLastIndexOf.js", "../../../../node_modules/lodash-es/_baseSortedUniq.js", "../../../../node_modules/lodash-es/sortedUniq.js", "../../../../node_modules/lodash-es/sortedUniqBy.js", "../../../../node_modules/lodash-es/split.js", "../../../../node_modules/lodash-es/spread.js", "../../../../node_modules/lodash-es/startCase.js", "../../../../node_modules/lodash-es/startsWith.js", "../../../../node_modules/lodash-es/stubObject.js", "../../../../node_modules/lodash-es/stubString.js", "../../../../node_modules/lodash-es/stubTrue.js", "../../../../node_modules/lodash-es/subtract.js", "../../../../node_modules/lodash-es/sum.js", "../../../../node_modules/lodash-es/sumBy.js", "../../../../node_modules/lodash-es/tail.js", "../../../../node_modules/lodash-es/take.js", "../../../../node_modules/lodash-es/takeRight.js", "../../../../node_modules/lodash-es/takeRightWhile.js", "../../../../node_modules/lodash-es/takeWhile.js", "../../../../node_modules/lodash-es/tap.js", "../../../../node_modules/lodash-es/_customDefaultsAssignIn.js", "../../../../node_modules/lodash-es/_escapeStringChar.js", "../../../../node_modules/lodash-es/_reInterpolate.js", "../../../../node_modules/lodash-es/_reEscape.js", "../../../../node_modules/lodash-es/_reEvaluate.js", "../../../../node_modules/lodash-es/templateSettings.js", "../../../../node_modules/lodash-es/template.js", "../../../../node_modules/lodash-es/throttle.js", "../../../../node_modules/lodash-es/thru.js", "../../../../node_modules/lodash-es/times.js", "../../../../node_modules/lodash-es/toIterator.js", "../../../../node_modules/lodash-es/_baseWrapperValue.js", "../../../../node_modules/lodash-es/wrapperValue.js", "../../../../node_modules/lodash-es/toLower.js", "../../../../node_modules/lodash-es/toPath.js", "../../../../node_modules/lodash-es/toSafeInteger.js", "../../../../node_modules/lodash-es/toUpper.js", "../../../../node_modules/lodash-es/transform.js", "../../../../node_modules/lodash-es/_charsEndIndex.js", "../../../../node_modules/lodash-es/_charsStartIndex.js", "../../../../node_modules/lodash-es/trim.js", "../../../../node_modules/lodash-es/trimEnd.js", "../../../../node_modules/lodash-es/trimStart.js", "../../../../node_modules/lodash-es/truncate.js", "../../../../node_modules/lodash-es/unary.js", "../../../../node_modules/lodash-es/_unescapeHtmlChar.js", "../../../../node_modules/lodash-es/unescape.js", "../../../../node_modules/lodash-es/_createSet.js", "../../../../node_modules/lodash-es/_baseUniq.js", "../../../../node_modules/lodash-es/union.js", "../../../../node_modules/lodash-es/unionBy.js", "../../../../node_modules/lodash-es/unionWith.js", "../../../../node_modules/lodash-es/uniq.js", "../../../../node_modules/lodash-es/uniqBy.js", "../../../../node_modules/lodash-es/uniqWith.js", "../../../../node_modules/lodash-es/uniqueId.js", "../../../../node_modules/lodash-es/unset.js", "../../../../node_modules/lodash-es/unzip.js", "../../../../node_modules/lodash-es/unzipWith.js", "../../../../node_modules/lodash-es/_baseUpdate.js", "../../../../node_modules/lodash-es/update.js", "../../../../node_modules/lodash-es/updateWith.js", "../../../../node_modules/lodash-es/upperCase.js", "../../../../node_modules/lodash-es/valuesIn.js", "../../../../node_modules/lodash-es/without.js", "../../../../node_modules/lodash-es/wrap.js", "../../../../node_modules/lodash-es/wrapperAt.js", "../../../../node_modules/lodash-es/wrapperChain.js", "../../../../node_modules/lodash-es/wrapperReverse.js", "../../../../node_modules/lodash-es/_baseXor.js", "../../../../node_modules/lodash-es/xor.js", "../../../../node_modules/lodash-es/xorBy.js", "../../../../node_modules/lodash-es/xorWith.js", "../../../../node_modules/lodash-es/zip.js", "../../../../node_modules/lodash-es/_baseZipObject.js", "../../../../node_modules/lodash-es/zipObject.js", "../../../../node_modules/lodash-es/zipObjectDeep.js", "../../../../node_modules/lodash-es/zipWith.js", "../../../../node_modules/lodash-es/array.default.js", "../../../../node_modules/lodash-es/collection.default.js", "../../../../node_modules/lodash-es/date.default.js", "../../../../node_modules/lodash-es/function.default.js", "../../../../node_modules/lodash-es/lang.default.js", "../../../../node_modules/lodash-es/math.default.js", "../../../../node_modules/lodash-es/number.default.js", "../../../../node_modules/lodash-es/object.default.js", "../../../../node_modules/lodash-es/seq.default.js", "../../../../node_modules/lodash-es/string.default.js", "../../../../node_modules/lodash-es/util.default.js", "../../../../node_modules/lodash-es/_lazyClone.js", "../../../../node_modules/lodash-es/_lazyReverse.js", "../../../../node_modules/lodash-es/_getView.js", "../../../../node_modules/lodash-es/_lazyValue.js", "../../../../node_modules/lodash-es/lodash.default.js", "../../../../packages/utils/types.ts", "../../../../packages/utils/strings.ts", "../../../../packages/utils/objects.ts", "../../../../packages/utils/error.ts", "../../../../packages/utils/dom/style.ts", "../../../../packages/utils/dom/scroll.ts", "../../../../packages/utils/vue/global-node.ts", "../../../../node_modules/@element-plus/icons-vue/dist/index.js", "../../../../packages/utils/vue/props/runtime.ts", "../../../../packages/utils/vue/icon.ts", "../../../../packages/utils/vue/install.ts", "../../../../packages/utils/vue/refs.ts", "../../../../packages/constants/aria.ts", "../../../../packages/constants/date.ts", "../../../../packages/constants/event.ts", "../../../../packages/constants/key.ts", "../../../../packages/constants/size.ts", "../../../../packages/utils/vue/size.ts", "../../../../packages/utils/vue/validator.ts", "../../../../packages/utils/vue/vnode.ts", "../../../../packages/utils/arrays.ts", "../../../../packages/utils/i18n.ts", "../../../../packages/utils/raf.ts", "../../../../packages/utils/rand.ts", "../../../../packages/utils/typescript.ts", "../../../../packages/hooks/use-attrs/index.ts", "../../../../packages/hooks/use-deprecated/index.ts", "../../../../packages/hooks/use-draggable/index.ts", "../../../../packages/hooks/use-focus/index.ts", "../../../../packages/locale/lang/en.ts", "../../../../packages/hooks/use-locale/index.ts", "../../../../packages/hooks/use-namespace/index.ts", "../../../../packages/hooks/use-lockscreen/index.ts", "../../../../packages/hooks/use-modal/index.ts", "../../../../packages/hooks/use-model-toggle/index.ts", "../../../../packages/hooks/use-prevent-global/index.ts", "../../../../packages/hooks/use-prop/index.ts", "../../../../node_modules/@popperjs/core/dist/index.mjs", "../../../../packages/hooks/use-popper/index.ts", "../../../../packages/hooks/use-same-target/index.ts", "../../../../packages/hooks/use-teleport/index.ts", "../../../../packages/hooks/use-throttle-render/index.ts", "../../../../packages/hooks/use-timeout/index.ts", "../../../../packages/hooks/use-transition-fallthrough/index.ts", "../../../../packages/hooks/use-id/index.ts", "../../../../packages/hooks/use-escape-keydown/index.ts", "../../../../packages/hooks/use-popper-container/index.ts", "../../../../packages/hooks/use-intermediate-render/index.ts", "../../../../packages/hooks/use-delayed-toggle/index.ts", "../../../../packages/hooks/use-forward-ref/index.ts", "../../../../packages/hooks/use-z-index/index.ts", "../../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs", "../../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs", "../../../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs", "../../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs", "../../../../packages/hooks/use-floating/index.ts", "../../../../packages/hooks/use-cursor/index.ts", "../../../../packages/hooks/use-ordered-children/index.ts", "../../../../packages/hooks/use-size/index.ts", "../../../../packages/hooks/use-focus-controller/index.ts", "../../../../packages/components/config-provider/src/constants.ts", "../../../../packages/components/config-provider/src/hooks/use-global-config.ts", "../../../../packages/components/config-provider/src/config-provider-props.ts", "../../../../packages/components/config-provider/src/config-provider.ts", "../../../../packages/components/config-provider/index.ts", "../../../../packages/element-plus/version.ts", "../../../../packages/element-plus/make-installer.ts", "../../../../packages/components/affix/src/affix.ts", "../../../../internal/build/plugin-vue:export-helper", "../../../../packages/components/affix/src/affix.vue", "../../../../packages/components/affix/index.ts", "../../../../packages/components/icon/src/icon.ts", "../../../../packages/components/icon/src/icon.vue", "../../../../packages/components/icon/index.ts", "../../../../packages/components/alert/src/alert.ts", "../../../../packages/components/alert/src/alert.vue", "../../../../packages/components/alert/index.ts", "../../../../packages/components/form/src/constants.ts", "../../../../packages/components/form/src/hooks/use-form-common-props.ts", "../../../../packages/components/form/src/hooks/use-form-item.ts", "../../../../packages/components/form/src/form.ts", "../../../../packages/components/form/src/utils.ts", "../../../../packages/components/form/src/form.vue", "../../../../node_modules/src/util.ts", "../../../../node_modules/src/rule/required.ts", "../../../../node_modules/src/rule/whitespace.ts", "../../../../node_modules/src/rule/url.ts", "../../../../node_modules/src/rule/type.ts", "../../../../node_modules/src/rule/range.ts", "../../../../node_modules/src/rule/enum.ts", "../../../../node_modules/src/rule/pattern.ts", "../../../../node_modules/src/rule/index.ts", "../../../../node_modules/src/validator/string.ts", "../../../../node_modules/src/validator/method.ts", "../../../../node_modules/src/validator/number.ts", "../../../../node_modules/src/validator/boolean.ts", "../../../../node_modules/src/validator/regexp.ts", "../../../../node_modules/src/validator/integer.ts", "../../../../node_modules/src/validator/float.ts", "../../../../node_modules/src/validator/array.ts", "../../../../node_modules/src/validator/object.ts", "../../../../node_modules/src/validator/enum.ts", "../../../../node_modules/src/validator/pattern.ts", "../../../../node_modules/src/validator/date.ts", "../../../../node_modules/src/validator/required.ts", "../../../../node_modules/src/validator/type.ts", "../../../../node_modules/src/validator/any.ts", "../../../../node_modules/src/validator/index.ts", "../../../../node_modules/src/messages.ts", "../../../../node_modules/src/index.ts", "../../../../packages/components/form/src/form-item.ts", "../../../../packages/components/form/src/form-label-wrap.tsx", "../../../../packages/components/form/src/form-item.vue", "../../../../packages/components/form/index.ts", "../../../../packages/components/input/src/utils.ts", "../../../../packages/components/input/src/input.ts", "../../../../packages/components/input/src/input.vue", "../../../../packages/components/input/index.ts", "../../../../packages/components/scrollbar/src/util.ts", "../../../../packages/components/scrollbar/src/constants.ts", "../../../../packages/components/scrollbar/src/thumb.ts", "../../../../packages/components/scrollbar/src/thumb.vue", "../../../../packages/components/scrollbar/src/bar.ts", "../../../../packages/components/scrollbar/src/bar.vue", "../../../../packages/components/scrollbar/src/scrollbar.ts", "../../../../packages/components/scrollbar/src/scrollbar.vue", "../../../../packages/components/scrollbar/index.ts", "../../../../packages/components/popper/src/constants.ts", "../../../../packages/components/popper/src/popper.ts", "../../../../packages/components/popper/src/popper.vue", "../../../../packages/components/popper/src/arrow.ts", "../../../../packages/components/popper/src/arrow.vue", "../../../../packages/components/slot/src/only-child.tsx", "../../../../packages/components/popper/src/trigger.ts", "../../../../packages/components/popper/src/trigger.vue", "../../../../packages/components/focus-trap/src/tokens.ts", "../../../../packages/components/focus-trap/src/utils.ts", "../../../../packages/components/focus-trap/src/focus-trap.vue", "../../../../packages/components/popper/src/content.ts", "../../../../packages/components/popper/src/utils.ts", "../../../../packages/components/popper/src/composables/use-content.ts", "../../../../packages/components/popper/src/composables/use-content-dom.ts", "../../../../packages/components/popper/src/composables/use-focus-trap.ts", "../../../../packages/components/popper/src/content.vue", "../../../../packages/components/popper/index.ts", "../../../../packages/components/tooltip/src/constants.ts", "../../../../packages/components/tooltip/src/content.ts", "../../../../packages/components/tooltip/src/trigger.ts", "../../../../packages/components/tooltip/src/tooltip.ts", "../../../../packages/components/tooltip/src/utils.ts", "../../../../packages/components/tooltip/src/trigger.vue", "../../../../packages/components/tooltip/src/content.vue", "../../../../packages/components/tooltip/src/tooltip.vue", "../../../../packages/components/tooltip/index.ts", "../../../../packages/components/autocomplete/src/autocomplete.ts", "../../../../packages/components/autocomplete/src/autocomplete.vue", "../../../../packages/components/autocomplete/index.ts", "../../../../packages/components/avatar/src/avatar.ts", "../../../../packages/components/avatar/src/avatar.vue", "../../../../packages/components/avatar/index.ts", "../../../../packages/components/backtop/src/backtop.ts", "../../../../packages/components/backtop/src/use-backtop.ts", "../../../../packages/components/backtop/src/backtop.vue", "../../../../packages/components/backtop/index.ts", "../../../../packages/components/badge/src/badge.ts", "../../../../packages/components/badge/src/badge.vue", "../../../../packages/components/badge/index.ts", "../../../../packages/components/breadcrumb/src/constants.ts", "../../../../packages/components/breadcrumb/src/breadcrumb.ts", "../../../../packages/components/breadcrumb/src/breadcrumb.vue", "../../../../packages/components/breadcrumb/src/breadcrumb-item.ts", "../../../../packages/components/breadcrumb/src/breadcrumb-item.vue", "../../../../packages/components/breadcrumb/index.ts", "../../../../packages/components/button/src/constants.ts", "../../../../packages/components/button/src/use-button.ts", "../../../../packages/components/button/src/button.ts", "../../../../node_modules/@ctrl/tinycolor/dist/module/util.js", "../../../../node_modules/@ctrl/tinycolor/dist/module/conversion.js", "../../../../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js", "../../../../node_modules/@ctrl/tinycolor/dist/module/format-input.js", "../../../../node_modules/@ctrl/tinycolor/dist/module/index.js", "../../../../packages/components/button/src/button-custom.ts", "../../../../packages/components/button/src/button.vue", "../../../../packages/components/button/src/button-group.ts", "../../../../packages/components/button/src/button-group.vue", "../../../../packages/components/button/index.ts", "../../../../packages/components/time-picker/src/constants.ts", "../../../../packages/components/time-picker/src/utils.ts", "../../../../packages/components/time-picker/src/props/shared.ts", "../../../../packages/components/time-picker/src/common/props.ts", "../../../../packages/components/time-picker/src/common/picker.vue", "../../../../packages/components/time-picker/src/props/panel-time-picker.ts", "../../../../packages/components/time-picker/src/composables/use-time-panel.ts", "../../../../packages/components/time-picker/src/composables/use-time-picker.ts", "../../../../packages/directives/click-outside/index.ts", "../../../../packages/directives/repeat-click/index.ts", "../../../../packages/directives/trap-focus/index.ts", "../../../../node_modules/normalize-wheel-es/src/UserAgent_DEPRECATED.js", "../../../../node_modules/normalize-wheel-es/src/ExecutionEnvironment.js", "../../../../node_modules/normalize-wheel-es/src/isEventSupported.js", "../../../../node_modules/normalize-wheel-es/src/normalizeWheel.js", "../../../../packages/directives/mousewheel/index.ts", "../../../../packages/components/time-picker/src/props/basic-time-spinner.ts", "../../../../packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue", "../../../../packages/components/time-picker/src/time-picker-com/panel-time-pick.vue", "../../../../packages/components/time-picker/src/props/panel-time-range.ts", "../../../../packages/components/time-picker/src/time-picker-com/panel-time-range.vue", "../../../../packages/components/time-picker/src/time-picker.tsx", "../../../../packages/components/time-picker/index.ts", "../../../../packages/components/calendar/src/date-table.ts", "../../../../packages/components/calendar/src/use-date-table.ts", "../../../../packages/components/calendar/src/date-table.vue", "../../../../packages/components/calendar/src/use-calendar.ts", "../../../../packages/components/calendar/src/calendar.ts", "../../../../packages/components/calendar/src/calendar.vue", "../../../../packages/components/calendar/index.ts", "../../../../packages/components/card/src/card.ts", "../../../../packages/components/card/src/card.vue", "../../../../packages/components/card/index.ts", "../../../../packages/components/carousel/src/carousel.ts", "../../../../packages/components/carousel/src/constants.ts", "../../../../packages/components/carousel/src/use-carousel.ts", "../../../../packages/components/carousel/src/carousel.vue", "../../../../packages/components/carousel/src/carousel-item.ts", "../../../../packages/components/carousel/src/use-carousel-item.ts", "../../../../packages/components/carousel/src/carousel-item.vue", "../../../../packages/components/carousel/index.ts", "../../../../packages/components/checkbox/src/checkbox.ts", "../../../../packages/components/checkbox/src/constants.ts", "../../../../packages/components/checkbox/src/composables/use-checkbox-disabled.ts", "../../../../packages/components/checkbox/src/composables/use-checkbox-event.ts", "../../../../packages/components/checkbox/src/composables/use-checkbox-model.ts", "../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts", "../../../../packages/components/checkbox/src/composables/use-checkbox.ts", "../../../../packages/components/checkbox/src/checkbox.vue", "../../../../packages/components/checkbox/src/checkbox-button.vue", "../../../../packages/components/checkbox/src/checkbox-group.ts", "../../../../packages/components/checkbox/src/checkbox-group.vue", "../../../../packages/components/checkbox/index.ts", "../../../../packages/components/radio/src/radio.ts", "../../../../packages/components/radio/src/constants.ts", "../../../../packages/components/radio/src/use-radio.ts", "../../../../packages/components/radio/src/radio.vue", "../../../../packages/components/radio/src/radio-button.ts", "../../../../packages/components/radio/src/radio-button.vue", "../../../../packages/components/radio/src/radio-group.ts", "../../../../packages/components/radio/src/radio-group.vue", "../../../../packages/components/radio/index.ts", "../../../../packages/components/cascader-panel/src/node-content.ts", "../../../../packages/components/cascader-panel/src/types.ts", "../../../../packages/components/cascader-panel/src/node.vue", "../../../../packages/components/cascader-panel/src/menu.vue", "../../../../packages/components/cascader-panel/src/node.ts", "../../../../packages/components/cascader-panel/src/store.ts", "../../../../packages/components/cascader-panel/src/config.ts", "../../../../packages/components/cascader-panel/src/utils.ts", "../../../../packages/components/cascader-panel/src/index.vue", "../../../../packages/components/cascader-panel/index.ts", "../../../../packages/components/tag/src/tag.ts", "../../../../packages/components/tag/src/tag.vue", "../../../../packages/components/tag/index.ts", "../../../../packages/components/cascader/src/cascader.ts", "../../../../packages/components/cascader/src/cascader.vue", "../../../../packages/components/cascader/index.ts", "../../../../packages/components/check-tag/src/check-tag.ts", "../../../../packages/components/check-tag/src/check-tag.vue", "../../../../packages/components/check-tag/index.ts", "../../../../packages/components/row/src/constants.ts", "../../../../packages/components/row/src/row.ts", "../../../../packages/components/row/src/row.vue", "../../../../packages/components/row/index.ts", "../../../../packages/components/col/src/col.ts", "../../../../packages/components/col/src/col.vue", "../../../../packages/components/col/index.ts", "../../../../packages/components/collapse/src/collapse.ts", "../../../../packages/components/collapse/src/constants.ts", "../../../../packages/components/collapse/src/use-collapse.ts", "../../../../packages/components/collapse/src/collapse.vue", "../../../../packages/components/collapse-transition/src/collapse-transition.vue", "../../../../packages/components/collapse-transition/index.ts", "../../../../packages/components/collapse/src/collapse-item.ts", "../../../../packages/components/collapse/src/use-collapse-item.ts", "../../../../packages/components/collapse/src/collapse-item.vue", "../../../../packages/components/collapse/index.ts", "../../../../packages/components/color-picker/src/props/alpha-slider.ts", "../../../../packages/components/color-picker/src/utils/draggable.ts", "../../../../packages/components/color-picker/src/composables/use-alpha-slider.ts", "../../../../packages/components/color-picker/src/components/alpha-slider.vue", "../../../../packages/components/color-picker/src/components/hue-slider.vue", "../../../../packages/components/color-picker/src/color-picker.ts", "../../../../packages/components/color-picker/src/utils/color.ts", "../../../../packages/components/color-picker/src/components/predefine.vue", "../../../../packages/components/color-picker/src/components/sv-panel.vue", "../../../../packages/components/color-picker/src/color-picker.vue", "../../../../packages/components/color-picker/index.ts", "../../../../packages/components/container/src/container.vue", "../../../../packages/components/container/src/aside.vue", "../../../../packages/components/container/src/footer.vue", "../../../../packages/components/container/src/header.vue", "../../../../packages/components/container/src/main.vue", "../../../../packages/components/container/index.ts", "../../../../packages/components/date-picker/src/constants.ts", "../../../../packages/components/date-picker/src/props/date-picker.ts", "../../../../packages/components/date-picker/src/props/shared.ts", "../../../../packages/components/date-picker/src/props/panel-date-pick.ts", "../../../../packages/components/date-picker/src/props/basic-date-table.ts", "../../../../packages/components/date-picker/src/utils.ts", "../../../../packages/components/date-picker/src/composables/use-basic-date-table.ts", "../../../../packages/components/date-picker/src/props/basic-cell.ts", "../../../../packages/components/date-picker/src/date-picker-com/basic-cell-render.tsx", "../../../../packages/components/date-picker/src/date-picker-com/basic-date-table.vue", "../../../../packages/components/date-picker/src/props/basic-month-table.ts", "../../../../packages/components/date-picker/src/date-picker-com/basic-month-table.vue", "../../../../packages/components/date-picker/src/props/basic-year-table.ts", "../../../../packages/components/date-picker/src/date-picker-com/basic-year-table.vue", "../../../../packages/components/date-picker/src/date-picker-com/panel-date-pick.vue", "../../../../packages/components/date-picker/src/props/panel-date-range.ts", "../../../../packages/components/date-picker/src/composables/use-shortcut.ts", "../../../../packages/components/date-picker/src/composables/use-range-picker.ts", "../../../../packages/components/date-picker/src/date-picker-com/panel-date-range.vue", "../../../../packages/components/date-picker/src/props/panel-month-range.ts", "../../../../packages/components/date-picker/src/composables/use-month-range-header.ts", "../../../../packages/components/date-picker/src/date-picker-com/panel-month-range.vue", "../../../../packages/components/date-picker/src/panel-utils.ts", "../../../../packages/components/date-picker/src/date-picker.tsx", "../../../../packages/components/date-picker/index.ts", "../../../../packages/components/descriptions/src/token.ts", "../../../../packages/components/descriptions/src/descriptions-cell.ts", "../../../../packages/components/descriptions/src/descriptions-row.ts", "../../../../packages/components/descriptions/src/descriptions-row.vue", "../../../../packages/components/descriptions/src/description.ts", "../../../../packages/components/descriptions/src/description.vue", "../../../../packages/components/descriptions/src/description-item.ts", "../../../../packages/components/descriptions/index.ts", "../../../../packages/components/overlay/src/overlay.ts", "../../../../packages/components/overlay/index.ts", "../../../../packages/components/dialog/src/constants.ts", "../../../../packages/components/dialog/src/dialog-content.ts", "../../../../packages/components/dialog/src/dialog-content.vue", "../../../../packages/components/dialog/src/dialog.ts", "../../../../packages/components/dialog/src/use-dialog.ts", "../../../../packages/components/dialog/src/dialog.vue", "../../../../packages/components/dialog/index.ts", "../../../../packages/components/divider/src/divider.ts", "../../../../packages/components/divider/src/divider.vue", "../../../../packages/components/divider/index.ts", "../../../../packages/components/drawer/src/drawer.ts", "../../../../packages/components/drawer/src/drawer.vue", "../../../../packages/components/drawer/index.ts", "../../../../packages/components/collection/src/collection.vue", "../../../../packages/components/collection/src/collection-item.vue", "../../../../packages/components/collection/src/collection.ts", "../../../../packages/components/roving-focus-group/src/roving-focus-group.ts", "../../../../packages/components/roving-focus-group/src/tokens.ts", "../../../../packages/components/roving-focus-group/src/utils.ts", "../../../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue", "../../../../packages/components/roving-focus-group/src/roving-focus-group.vue", "../../../../packages/components/roving-focus-group/src/roving-focus-item.vue", "../../../../packages/components/dropdown/src/dropdown.ts", "../../../../packages/components/dropdown/src/tokens.ts", "../../../../packages/components/dropdown/src/dropdown.vue", "../../../../packages/components/dropdown/src/dropdown-item-impl.vue", "../../../../packages/components/dropdown/src/useDropdown.ts", "../../../../packages/components/dropdown/src/dropdown-item.vue", "../../../../packages/components/dropdown/src/dropdown-menu.vue", "../../../../packages/components/dropdown/index.ts", "../../../../packages/components/empty/src/img-empty.vue", "../../../../packages/components/empty/src/empty.ts", "../../../../packages/components/empty/src/empty.vue", "../../../../packages/components/empty/index.ts", "../../../../packages/components/image-viewer/src/image-viewer.ts", "../../../../packages/components/image-viewer/src/image-viewer.vue", "../../../../packages/components/image-viewer/index.ts", "../../../../packages/components/image/src/image.ts", "../../../../packages/components/image/src/image.vue", "../../../../packages/components/image/index.ts", "../../../../packages/components/input-number/src/input-number.ts", "../../../../packages/components/input-number/src/input-number.vue", "../../../../packages/components/input-number/index.ts", "../../../../packages/components/link/src/link.ts", "../../../../packages/components/link/src/link.vue", "../../../../packages/components/link/index.ts", "../../../../packages/components/menu/src/utils/submenu.ts", "../../../../packages/components/menu/src/utils/menu-item.ts", "../../../../packages/components/menu/src/utils/menu-bar.ts", "../../../../packages/components/menu/src/menu-collapse-transition.vue", "../../../../packages/components/menu/src/use-menu.ts", "../../../../packages/components/menu/src/use-menu-color.ts", "../../../../packages/components/menu/src/use-menu-css-var.ts", "../../../../packages/components/menu/src/sub-menu.ts", "../../../../packages/components/menu/src/menu.ts", "../../../../packages/components/menu/src/menu-item.ts", "../../../../packages/components/menu/src/menu-item.vue", "../../../../packages/components/menu/src/menu-item-group.ts", "../../../../packages/components/menu/src/menu-item-group.vue", "../../../../packages/components/menu/index.ts", "../../../../packages/components/page-header/src/page-header.ts", "../../../../packages/components/page-header/src/page-header.vue", "../../../../packages/components/page-header/index.ts", "../../../../packages/components/pagination/src/constants.ts", "../../../../packages/components/pagination/src/components/prev.ts", "../../../../packages/components/pagination/src/components/prev.vue", "../../../../packages/components/pagination/src/components/next.ts", "../../../../packages/components/pagination/src/components/next.vue", "../../../../packages/components/select/src/token.ts", "../../../../packages/components/select/src/useOption.ts", "../../../../packages/components/select/src/option.vue", "../../../../packages/components/select/src/select-dropdown.vue", "../../../../packages/components/select/src/useSelect.ts", "../../../../packages/components/select/src/options.ts", "../../../../packages/components/select/src/select.vue", "../../../../packages/components/select/src/option-group.vue", "../../../../packages/components/select/index.ts", "../../../../packages/components/pagination/src/usePagination.ts", "../../../../packages/components/pagination/src/components/sizes.ts", "../../../../packages/components/pagination/src/components/sizes.vue", "../../../../packages/components/pagination/src/components/jumper.ts", "../../../../packages/components/pagination/src/components/jumper.vue", "../../../../packages/components/pagination/src/components/total.ts", "../../../../packages/components/pagination/src/components/total.vue", "../../../../packages/components/pagination/src/components/pager.ts", "../../../../packages/components/pagination/src/components/pager.vue", "../../../../packages/components/pagination/src/pagination.ts", "../../../../packages/components/pagination/index.ts", "../../../../packages/components/popconfirm/src/popconfirm.ts", "../../../../packages/components/popconfirm/src/popconfirm.vue", "../../../../packages/components/popconfirm/index.ts", "../../../../packages/components/popover/src/popover.ts", "../../../../packages/components/popover/src/popover.vue", "../../../../packages/components/popover/src/directive.ts", "../../../../packages/components/popover/index.ts", "../../../../packages/components/progress/src/progress.ts", "../../../../packages/components/progress/src/progress.vue", "../../../../packages/components/progress/index.ts", "../../../../packages/components/rate/src/rate.ts", "../../../../packages/components/rate/src/rate.vue", "../../../../packages/components/rate/index.ts", "../../../../packages/components/result/src/result.ts", "../../../../packages/components/result/src/result.vue", "../../../../packages/components/result/index.ts", "../../../../node_modules/memoize-one/dist/memoize-one.esm.js", "../../../../packages/components/virtual-list/src/hooks/use-cache.ts", "../../../../packages/components/virtual-list/src/defaults.ts", "../../../../packages/components/virtual-list/src/hooks/use-wheel.ts", "../../../../packages/components/virtual-list/src/props.ts", "../../../../packages/components/virtual-list/src/utils.ts", "../../../../packages/components/virtual-list/src/components/scrollbar.ts", "../../../../packages/components/virtual-list/src/builders/build-list.ts", "../../../../packages/components/virtual-list/src/components/fixed-size-list.ts", "../../../../packages/components/virtual-list/src/components/dynamic-size-list.ts", "../../../../packages/components/virtual-list/src/hooks/use-grid-wheel.ts", "../../../../packages/components/virtual-list/src/builders/build-grid.ts", "../../../../packages/components/virtual-list/src/components/fixed-size-grid.ts", "../../../../packages/components/virtual-list/src/components/dynamic-size-grid.ts", "../../../../packages/components/select-v2/src/group-item.vue", "../../../../packages/components/select-v2/src/useOption.ts", "../../../../packages/components/select-v2/src/defaults.ts", "../../../../packages/components/select-v2/src/option-item.vue", "../../../../packages/components/select-v2/src/token.ts", "../../../../packages/components/select-v2/src/select-dropdown.tsx", "../../../../packages/components/select-v2/src/useAllowCreate.ts", "../../../../packages/components/select-v2/src/util.ts", "../../../../packages/components/select-v2/src/useInput.ts", "../../../../packages/components/select-v2/src/useSelect.ts", "../../../../packages/components/select-v2/src/select.vue", "../../../../packages/components/select-v2/index.ts", "../../../../packages/components/skeleton/src/skeleton.ts", "../../../../packages/components/skeleton/src/skeleton-item.ts", "../../../../packages/components/skeleton/src/skeleton-item.vue", "../../../../packages/components/skeleton/src/skeleton.vue", "../../../../packages/components/skeleton/index.ts", "../../../../packages/components/slider/src/constants.ts", "../../../../packages/components/slider/src/slider.ts", "../../../../packages/components/slider/src/composables/use-lifecycle.ts", "../../../../packages/components/slider/src/composables/use-marks.ts", "../../../../packages/components/slider/src/composables/use-slide.ts", "../../../../packages/components/slider/src/composables/use-slider-button.ts", "../../../../packages/components/slider/src/composables/use-stops.ts", "../../../../packages/components/slider/src/composables/use-watch.ts", "../../../../packages/components/slider/src/button.ts", "../../../../packages/components/slider/src/button.vue", "../../../../packages/components/slider/src/marker.ts", "../../../../packages/components/slider/src/slider.vue", "../../../../packages/components/slider/index.ts", "../../../../packages/components/space/src/item.ts", "../../../../packages/components/space/src/use-space.ts", "../../../../packages/components/space/src/space.ts", "../../../../packages/components/space/index.ts", "../../../../packages/components/statistic/src/statistic.ts", "../../../../packages/components/statistic/src/statistic.vue", "../../../../packages/components/statistic/index.ts", "../../../../packages/components/countdown/src/countdown.ts", "../../../../packages/components/countdown/src/utils.ts", "../../../../packages/components/countdown/src/countdown.vue", "../../../../packages/components/countdown/index.ts", "../../../../packages/components/steps/src/steps.ts", "../../../../packages/components/steps/src/steps.vue", "../../../../packages/components/steps/src/item.ts", "../../../../packages/components/steps/src/item.vue", "../../../../packages/components/steps/index.ts", "../../../../packages/components/switch/src/switch.ts", "../../../../packages/components/switch/src/switch.vue", "../../../../packages/components/switch/index.ts", "../../../../packages/components/table/src/util.ts", "../../../../packages/components/table/src/store/expand.ts", "../../../../packages/components/table/src/store/current.ts", "../../../../packages/components/table/src/store/tree.ts", "../../../../packages/components/table/src/store/watcher.ts", "../../../../packages/components/table/src/store/index.ts", "../../../../packages/components/table/src/store/helper.ts", "../../../../packages/components/table/src/table-layout.ts", "../../../../packages/components/table/src/filter-panel.vue", "../../../../packages/components/table/src/layout-observer.ts", "../../../../packages/components/table/src/tokens.ts", "../../../../packages/components/table/src/table-header/event-helper.ts", "../../../../packages/components/table/src/table-header/style.helper.ts", "../../../../packages/components/table/src/table-header/utils-helper.ts", "../../../../packages/components/table/src/table-header/index.ts", "../../../../packages/components/table/src/table-body/events-helper.ts", "../../../../packages/components/table/src/table-body/styles-helper.ts", "../../../../packages/components/table/src/table-body/render-helper.ts", "../../../../packages/components/table/src/table-body/defaults.ts", "../../../../packages/components/table/src/table-body/index.ts", "../../../../packages/components/table/src/h-helper.ts", "../../../../packages/components/table/src/table-footer/mapState-helper.ts", "../../../../packages/components/table/src/table-footer/style-helper.ts", "../../../../packages/components/table/src/table-footer/index.ts", "../../../../packages/components/table/src/table/utils-helper.ts", "../../../../packages/components/table/src/table/style-helper.ts", "../../../../packages/components/table/src/table/key-render-helper.ts", "../../../../packages/components/table/src/table/defaults.ts", "../../../../packages/components/table/src/composables/use-scrollbar.ts", "../../../../packages/components/table/src/table.vue", "../../../../packages/components/table/src/config.ts", "../../../../packages/components/table/src/table-column/watcher-helper.ts", "../../../../packages/components/table/src/table-column/render-helper.ts", "../../../../packages/components/table/src/table-column/defaults.ts", "../../../../packages/components/table/src/table-column/index.ts", "../../../../packages/components/table/index.ts", "../../../../packages/components/table-v2/src/constants.ts", "../../../../packages/components/table-v2/src/private.ts", "../../../../packages/components/table-v2/src/composables/utils.ts", "../../../../packages/components/table-v2/src/composables/use-columns.ts", "../../../../packages/components/table-v2/src/composables/use-scrollbar.ts", "../../../../packages/components/table-v2/src/composables/use-row.ts", "../../../../packages/components/table-v2/src/composables/use-data.ts", "../../../../packages/components/table-v2/src/utils.ts", "../../../../packages/components/table-v2/src/composables/use-styles.ts", "../../../../packages/components/table-v2/src/composables/use-auto-resize.ts", "../../../../packages/components/table-v2/src/use-table.ts", "../../../../packages/components/table-v2/src/tokens.ts", "../../../../packages/components/table-v2/src/common.ts", "../../../../packages/components/table-v2/src/row.ts", "../../../../packages/components/table-v2/src/header.ts", "../../../../packages/components/table-v2/src/grid.ts", "../../../../packages/components/table-v2/src/table.ts", "../../../../packages/components/table-v2/src/components/cell.tsx", "../../../../packages/components/table-v2/src/components/header-cell.tsx", "../../../../packages/components/table-v2/src/header-row.ts", "../../../../packages/components/table-v2/src/components/header-row.tsx", "../../../../packages/components/table-v2/src/components/header.tsx", "../../../../packages/components/table-v2/src/components/row.tsx", "../../../../packages/components/table-v2/src/components/sort-icon.tsx", "../../../../packages/components/table-v2/src/components/expand-icon.tsx", "../../../../packages/components/table-v2/src/table-grid.tsx", "../../../../packages/components/table-v2/src/renderers/main-table.tsx", "../../../../packages/components/table-v2/src/renderers/left-table.tsx", "../../../../packages/components/table-v2/src/renderers/right-table.tsx", "../../../../packages/components/table-v2/src/renderers/row.tsx", "../../../../packages/components/table-v2/src/renderers/cell.tsx", "../../../../packages/components/table-v2/src/renderers/header.tsx", "../../../../packages/components/table-v2/src/renderers/header-cell.tsx", "../../../../packages/components/table-v2/src/renderers/footer.tsx", "../../../../packages/components/table-v2/src/renderers/empty.tsx", "../../../../packages/components/table-v2/src/renderers/overlay.tsx", "../../../../packages/components/table-v2/src/table-v2.tsx", "../../../../packages/components/table-v2/src/auto-resizer.ts", "../../../../packages/components/table-v2/src/components/auto-resizer.tsx", "../../../../packages/components/table-v2/index.ts", "../../../../packages/components/tabs/src/constants.ts", "../../../../packages/components/tabs/src/tab-bar.ts", "../../../../packages/components/tabs/src/tab-bar.vue", "../../../../packages/components/tabs/src/tab-nav.tsx", "../../../../packages/components/tabs/src/tabs.tsx", "../../../../packages/components/tabs/src/tab-pane.ts", "../../../../packages/components/tabs/src/tab-pane.vue", "../../../../packages/components/tabs/index.ts", "../../../../packages/components/text/src/text.ts", "../../../../packages/components/text/src/text.vue", "../../../../packages/components/text/index.ts", "../../../../packages/components/time-select/src/time-select.ts", "../../../../packages/components/time-select/src/utils.ts", "../../../../packages/components/time-select/src/time-select.vue", "../../../../packages/components/time-select/index.ts", "../../../../packages/components/timeline/src/timeline.ts", "../../../../packages/components/timeline/src/timeline-item.ts", "../../../../packages/components/timeline/src/timeline-item.vue", "../../../../packages/components/timeline/index.ts", "../../../../packages/components/tooltip-v2/src/common.ts", "../../../../packages/components/tooltip-v2/src/arrow.ts", "../../../../packages/components/tooltip-v2/src/content.ts", "../../../../packages/components/tooltip-v2/src/root.ts", "../../../../packages/components/tooltip-v2/src/trigger.ts", "../../../../packages/components/tooltip-v2/src/tooltip.ts", "../../../../packages/components/tooltip-v2/src/constants.ts", "../../../../packages/components/tooltip-v2/src/root.vue", "../../../../packages/components/tooltip-v2/src/arrow.vue", "../../../../packages/components/visual-hidden/src/visual-hidden.ts", "../../../../packages/components/visual-hidden/src/visual-hidden.vue", "../../../../packages/components/tooltip-v2/src/content.vue", "../../../../packages/components/tooltip-v2/src/forward-ref.tsx", "../../../../packages/components/tooltip-v2/src/trigger.vue", "../../../../packages/components/tooltip-v2/src/tooltip.vue", "../../../../packages/components/tooltip-v2/index.ts", "../../../../packages/components/transfer/src/transfer.ts", "../../../../packages/components/transfer/src/transfer-panel.ts", "../../../../packages/components/transfer/src/composables/use-props-alias.ts", "../../../../packages/components/transfer/src/composables/use-check.ts", "../../../../packages/components/transfer/src/composables/use-checked-change.ts", "../../../../packages/components/transfer/src/composables/use-computed-data.ts", "../../../../packages/components/transfer/src/composables/use-move.ts", "../../../../packages/components/transfer/src/transfer-panel.vue", "../../../../packages/components/transfer/src/transfer.vue", "../../../../packages/components/transfer/index.ts", "../../../../packages/components/tree/src/model/util.ts", "../../../../packages/components/tree/src/model/node.ts", "../../../../packages/components/tree/src/model/tree-store.ts", "../../../../packages/components/tree/src/tree-node-content.vue", "../../../../packages/components/tree/src/model/useNodeExpandEventBroadcast.ts", "../../../../packages/components/tree/src/model/useDragNode.ts", "../../../../packages/components/tree/src/tree-node.vue", "../../../../packages/components/tree/src/model/useKeydown.ts", "../../../../packages/components/tree/src/tree.vue", "../../../../packages/components/tree/index.ts", "../../../../packages/components/tree-select/src/select.ts", "../../../../packages/components/tree-select/src/tree-select-option.ts", "../../../../packages/components/tree-select/src/utils.ts", "../../../../packages/components/tree-select/src/tree.ts", "../../../../packages/components/tree-select/src/cache-options.ts", "../../../../packages/components/tree-select/src/tree-select.vue", "../../../../packages/components/tree-select/index.ts", "../../../../packages/components/tree-v2/src/virtual-tree.ts", "../../../../packages/components/tree-v2/src/composables/useCheck.ts", "../../../../packages/components/tree-v2/src/composables/useFilter.ts", "../../../../packages/components/tree-v2/src/composables/useTree.ts", "../../../../packages/components/tree-v2/src/tree-node-content.ts", "../../../../packages/components/tree-v2/src/tree-node.vue", "../../../../packages/components/tree-v2/src/tree.vue", "../../../../packages/components/tree-v2/index.ts", "../../../../packages/components/upload/src/constants.ts", "../../../../packages/components/upload/src/ajax.ts", "../../../../packages/components/upload/src/upload.ts", "../../../../packages/components/upload/src/upload-list.ts", "../../../../packages/components/upload/src/upload-list.vue", "../../../../packages/components/upload/src/upload-dragger.ts", "../../../../packages/components/upload/src/upload-dragger.vue", "../../../../packages/components/upload/src/upload-content.ts", "../../../../packages/components/upload/src/upload-content.vue", "../../../../packages/components/upload/src/use-handlers.ts", "../../../../packages/components/upload/src/upload.vue", "../../../../packages/components/upload/index.ts", "../../../../packages/element-plus/component.ts", "../../../../packages/components/infinite-scroll/src/index.ts", "../../../../packages/components/infinite-scroll/index.ts", "../../../../packages/components/loading/src/loading.ts", "../../../../packages/components/loading/src/service.ts", "../../../../packages/components/loading/src/directive.ts", "../../../../packages/components/loading/index.ts", "../../../../packages/components/message/src/message.ts", "../../../../packages/components/message/src/instance.ts", "../../../../packages/components/message/src/message.vue", "../../../../packages/components/message/src/method.ts", "../../../../packages/components/message/index.ts", "../../../../packages/components/message-box/src/index.vue", "../../../../packages/components/message-box/src/messageBox.ts", "../../../../packages/components/message-box/index.ts", "../../../../packages/components/notification/src/notification.ts", "../../../../packages/components/notification/src/notification.vue", "../../../../packages/components/notification/src/notify.ts", "../../../../packages/components/notification/index.ts", "../../../../packages/element-plus/plugin.ts", "../../../../packages/element-plus/defaults.ts", "../../../../packages/element-plus/index.ts"], - "sourcesContent": ["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));", "!function(n,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(n=\"undefined\"!=typeof globalThis?globalThis:n||self).dayjs_plugin_localeData=e()}(this,(function(){\"use strict\";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format(\"MMMM\"):u(n,\"months\")},monthsShort:function(e){return e?e.format(\"MMM\"):u(n,\"monthsShort\",\"months\",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format(\"dddd\"):u(n,\"weekdays\")},weekdaysMin:function(e){return e?e.format(\"dd\"):u(n,\"weekdaysMin\",\"weekdays\",2)},weekdaysShort:function(e){return e?e.format(\"ddd\"):u(n,\"weekdaysShort\",\"weekdays\",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),\"months\")},t.monthsShort=function(){return u(i(),\"monthsShort\",\"months\",3)},t.weekdays=function(n){return u(i(),\"weekdays\",null,null,n)},t.weekdaysShort=function(n){return u(i(),\"weekdaysShort\",\"weekdays\",3,n)},t.weekdaysMin=function(n){return u(i(),\"weekdaysMin\",\"weekdays\",2,n)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){\"use strict\";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||\"YYYY-MM-DDTHH:mm:ssZ\").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case\"Q\":return Math.ceil((t.$M+1)/3);case\"Do\":return r.ordinal(t.$D);case\"gggg\":return t.weekYear();case\"GGGG\":return t.isoWeekYear();case\"wo\":return r.ordinal(t.week(),\"W\");case\"w\":case\"ww\":return s.s(t.week(),\"w\"===e?1:2,\"0\");case\"W\":case\"WW\":return s.s(t.isoWeek(),\"W\"===e?1:2,\"0\");case\"k\":case\"kk\":return s.s(String(0===t.$H?24:t.$H),\"k\"===e?1:2,\"0\");case\"X\":return Math.floor(t.$d.getTime()/1e3);case\"x\":return t.$d.getTime();case\"z\":return\"[\"+t.offsetName()+\"]\";case\"zzz\":return\"[\"+t.offsetName(\"long\")+\"]\";default:return e}}));return n.bind(this)(a)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekYear=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_dayOfYear=t()}(this,(function(){\"use strict\";return function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf(\"day\")-n(this).startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"day\")}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));", "!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));", "/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n", "const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n // HTMLButtonElement has disabled\n if ((element as HTMLButtonElement).disabled) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\nexport const attemptFocus = (element: HTMLElement): boolean => {\n if (!isFocusable(element)) {\n return false\n }\n // Remove the old try catch block since there will be no error to be thrown\n element.focus?.()\n return document.activeElement === element\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n el.focus()\n !isLeaf(el) && el.click()\n}\n", "export const composeEventHandlers = (\n theirsHandler?: (event: E) => boolean | void,\n oursHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) => {\n const handleEvent = (event: E) => {\n const shouldPrevent = theirsHandler?.(event)\n\n if (checkForDefaultPrevented === false || !shouldPrevent) {\n return oursHandler?.(event)\n }\n }\n return handleEvent\n}\n\ntype WhenMouseHandler = (e: PointerEvent) => any\nexport const whenMouse = (handler: WhenMouseHandler): WhenMouseHandler => {\n return (e: PointerEvent) =>\n e.pointerType === 'mouse' ? handler(e) : undefined\n}\n", "import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n}\n", "import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = (val) => typeof val === \"boolean\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isNumber = (val) => typeof val === \"number\";\nconst isString = (val) => typeof val === \"string\";\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst isWindow = (val) => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\n\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = resolveUnref(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction __onlyVue3(name = \"this function\") {\n if (isVue3)\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 3.`);\n}\nfunction __onlyVue27Plus(name = \"this function\") {\n if (isVue3 || version.startsWith(\"2.7.\"))\n return;\n throw new Error(`[VueUse] ${name} is only works on Vue 2.7 or above.`);\n}\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = isFunction(fn) ? fn : fn.get;\n const set = isFunction(fn) ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = [];\n const off = (fn) => {\n const index = fns.indexOf(fn);\n if (index !== -1)\n fns.splice(index, 1);\n };\n const on = (fn) => {\n fns.push(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n fns.forEach((fn) => fn(param));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return () => {\n if (!initialized) {\n state = scope.run(stateFactory);\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n __onlyVue27Plus();\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$8({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : resolveUnref;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n }));\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, resolveUnref(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(ref, {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n }, { enumerable: true });\n}\nconst controlledRef = refWithControl;\n\nfunction resolveRef(r) {\n return typeof r === \"function\" ? computed(r) : ref(r);\n}\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(left, (newValue) => right.value = transformLTR(newValue), { flush, deep, immediate });\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(right, (newValue) => left.value = transformRTL(newValue), { flush, deep, immediate });\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction toRefs(objectRef) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, objectRef.value);\n objectRef.value = newObject;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(r, (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch([r, value], ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n }, {\n flush,\n deep,\n immediate: true\n });\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {\n stop == null ? void 0 : stop();\n return resolveUnref(r);\n }));\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(resolveUnref(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(resolveUnref(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => resolveUnref(resolveUnref(list).find((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => resolveUnref(list).findIndex((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => resolveUnref(list).map((i) => resolveUnref(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(resolveUnref(sum), resolveUnref(value), index);\n return computed(() => {\n const resolved = resolveUnref(list);\n return args.length ? resolved.reduce(reduceCallback, resolveUnref(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => resolveUnref(list).some((element, index, array) => fn(resolveUnref(element), index, array)));\n}\n\nfunction useArrayUnique(list) {\n return computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n const count = ref(initialValue);\n const {\n max = Infinity,\n min = -Infinity\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = initialValue) => {\n initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nconst defaultMeridiem = (hours, minutes, isLowercase, hasPeriod) => {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n};\nconst formatDate = (date, formatStr, options = {}) => {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]());\n};\nconst normalizeDate = (date) => {\n if (date === null)\n return new Date(NaN);\n if (date === void 0)\n return new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n};\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(resolveUnref(date)), resolveUnref(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = resolveUnref(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || isFunction(interval)) {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(callback ? () => {\n update();\n callback(counter.value);\n } : update, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$6({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(source, () => ms.value = timestamp(), options);\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, resolveUnref(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$5({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = resolveUnref(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${resolveUnref(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = resolveUnref(truthyValue);\n _value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = new Array(oldList.length);\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(source, (...args) => {\n current.value += 1;\n if (current.value >= resolveUnref(count))\n nextTick(() => stop());\n cb(...args);\n }, watchOptions);\n return { count: current, stop };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n }));\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(eventFilter, cb);\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(source, (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n }, watchOptions);\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(watch(source, () => {\n syncCounter.value++;\n }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: \"sync\" })));\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(watch(source, (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n }, watchOptions));\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n }));\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n }));\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => getOneWatchSource(item));\n return getOneWatchSource(sources);\n}\nfunction getOneWatchSource(source) {\n return typeof source === \"function\" ? source() : unref(source);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(source, (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n }, options);\n}\n\nexport { __onlyVue27Plus, __onlyVue3, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n", "import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isObject, isNumber, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = false,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nconst createUnrefFn = (fn) => {\n return function(...args) {\n return fn.apply(this, args.map((i) => unref(i)));\n };\n};\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = resolveUnref(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n }));\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nconst createKeyPredicate = (keyFilter) => {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n};\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const { target = defaultWindow, eventName = \"keydown\", passive = false } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, \"pointerup\", clear, listenerOptions);\n useEventListener(elementRef, \"pointerleave\", clear, listenerOptions);\n}\n\nconst isFocusedElementEditable = () => {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n};\nconst isTypedCharValid = ({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) => {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n};\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const { window = defaultWindow } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop\n } = options;\n const promiseState = {\n pending: \"pending\",\n rejected: \"rejected\",\n fulfilled: \"fulfilled\"\n };\n const initialResult = Array.from(new Array(tasks.length), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n return curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n }).catch((e) => {\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = ref(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw error;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n return {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = resolveUnref(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || isFunction(target))\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useSupported(callback, sync = false) {\n const isSupported = ref();\n const update = () => isSupported.value = Boolean(callback());\n update();\n tryOnMounted(update, sync);\n return isSupported;\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n for (const event of events)\n useEventListener(battery, event, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n device,\n requestDevice,\n server,\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", update);\n else\n mediaQuery.removeListener(update);\n };\n const update = () => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(resolveRef(query).value);\n matches.value = mediaQuery.matches;\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", update);\n else\n mediaQuery.addListener(update);\n };\n watchEffect(update);\n tryOnScopeDispose(() => cleanup());\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nvar __defProp$m = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return __spreadValues$m({\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n }\n }, shortcutMethods);\n}\n\nconst useBroadcastChannel = (options) => {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = ref(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n};\n\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const buildState = (trigger) => {\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { hash, host, hostname, href, origin, pathname, port, protocol, search } = (window == null ? void 0 : window.location) || {};\n return {\n trigger,\n state: state2,\n length,\n hash,\n host,\n hostname,\n href,\n origin,\n pathname,\n port,\n protocol,\n search\n };\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const events = [\"copy\", \"cut\"];\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read) {\n for (const event of events)\n useEventListener(event, updateText);\n }\n async function copy(value = resolveUnref(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(unref(source));\n }\n if (!manual && isRef(source)) {\n watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\n_global[globalKey] = _global[globalKey] || {};\nconst handlers = _global[globalKey];\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(b)) {\n if (__propIsEnum$m.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = resolveUnref(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, () => write(data.value), { flush, deep, eventFilter });\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$k(__spreadValues$k({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto\n } = options;\n const modes = __spreadValues$j({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const preferredMode = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? ref(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed({\n get() {\n return store.value === \"auto\" && !emitAuto ? preferredMode.value : store.value;\n },\n set(v) {\n store.value = v;\n }\n });\n const updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector2, attribute2, value) => {\n const el = window == null ? void 0 : window.document.querySelector(selector2);\n if (!el)\n return;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n });\n function defaultOnChanged(mode) {\n var _a;\n const resolvedMode = mode === \"auto\" ? preferredMode.value : mode;\n updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n if (emitAuto)\n watch(preferredMode, () => onChanged(state.value), { flush: \"post\" });\n tryOnMounted(() => onChanged(state.value));\n return state;\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, { window = defaultWindow, initialValue = \"\" } = {}) {\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {\n var _a;\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }, { immediate: true });\n watch(variable, (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(resolveUnref(prop), val);\n });\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(() => null, () => vm.proxy.$el);\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n var _a;\n const state = shallowRef((_a = options == null ? void 0 : options.initialValue) != null ? _a : list[0]);\n const index = computed({\n get() {\n var _a2;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, list) : list.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a2 = options == null ? void 0 : options.fallbackIndex) != null ? _a2 : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const length = list.length;\n const index2 = (i % length + length) % length;\n const value = list[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\");\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const preferredDark = usePreferredDark({ window });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n if (v === preferredDark.value)\n mode.value = \"auto\";\n else\n mode.value = v ? \"dark\" : \"light\";\n }\n });\n return isDark;\n}\n\nconst fnBypass = (v) => v;\nconst fnSetSource = (source, value) => source.value = value;\nfunction defaultDump(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? isFunction(clone) ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Infinity);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(source, commit, { deep, flush, eventFilter: composedFilter });\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$6(__spreadValues$h({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));\n return __spreadValues$g({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(eventFilter, (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n });\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n stream.getTracks().forEach((t) => t.stop());\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(b)) {\n if (__propIsEnum$h.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b, _c;\n const draggingElement = (_a = options.draggingElement) != null ? _a : defaultWindow;\n const draggingHandle = (_b = options.handle) != null ? _b : target;\n const position = ref((_c = resolveUnref(options.initialValue)) != null ? _c : { x: 0, y: 0 });\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (options.pointerTypes)\n return options.pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (resolveUnref(options.preventDefault))\n e.preventDefault();\n if (resolveUnref(options.stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (resolveUnref(options.exact) && e.target !== resolveUnref(target))\n return;\n const rect = resolveUnref(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n position.value = {\n x: e.clientX - pressedDelta.value.x,\n y: e.clientY - pressedDelta.value.y\n };\n (_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n (_a2 = options.onEnd) == null ? void 0 : _a2.call(options, position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n useEventListener(draggingHandle, \"pointerdown\", start, true);\n useEventListener(draggingElement, \"pointermove\", move, true);\n useEventListener(draggingElement, \"pointerup\", end, true);\n }\n return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n });\n}\n\nfunction useDropZone(target, onDrop) {\n const isOverDropZone = ref(false);\n let counter = 0;\n if (isClient) {\n useEventListener(target, \"dragenter\", (event) => {\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n });\n useEventListener(target, \"dragover\", (event) => {\n event.preventDefault();\n });\n useEventListener(target, \"dragleave\", (event) => {\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n });\n useEventListener(target, \"drop\", (event) => {\n var _a, _b;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n onDrop == null ? void 0 : onDrop(files.length === 0 ? null : files);\n });\n }\n return {\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new ResizeObserver(callback);\n observer.observe(el, observerOptions);\n }\n }, { immediate: true, flush: \"post\" });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - previousFrameTimestamp;\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const element = ref(null);\n const { x, y, document = defaultDocument } = options;\n const controls = useRafFn(() => {\n element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;\n });\n return __spreadValues$e({\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const delayEnter = options ? options.delayEnter : 0;\n const delayLeave = options ? options.delayLeave : 0;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(target, ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = parseFloat(styles.width);\n height.value = parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n }, options);\n watch(() => unrefElement(target), (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n });\n return {\n width,\n height\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n const testBounding = () => {\n if (!window)\n return;\n const document = window.document;\n const el = unrefElement(element);\n if (!el) {\n elementIsVisible.value = false;\n } else {\n const rect = el.getBoundingClientRect();\n elementIsVisible.value = rect.top <= (window.innerHeight || document.documentElement.clientHeight) && rect.left <= (window.innerWidth || document.documentElement.clientWidth) && rect.bottom >= 0 && rect.right >= 0;\n }\n };\n watch(() => unrefElement(element), () => testBounding(), { immediate: true, flush: \"post\" });\n if (window) {\n useEventListener(scrollTarget || window, \"scroll\", testBounding, {\n capture: false,\n passive: true\n });\n }\n return elementIsVisible;\n}\n\nconst events = new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || [];\n listeners.push(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n const index = listeners.indexOf(listener);\n if (index > -1)\n listeners.splice(index, 1);\n if (!listeners.length)\n events.delete(key);\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = ref(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = resolveRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(favicon, (i, o) => {\n if (isString(i) && i !== o)\n applyIcon(i);\n }, { immediate: true });\n return favicon;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback !== void 0)\n await callback(ctx);\n return ctx;\n };\n } else {\n return async (ctx) => {\n await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {\n if (callback)\n ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));\n }), Promise.resolve());\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = resolveUnref(config.baseUrl);\n const targetUrl = resolveUnref(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$d(__spreadValues$d({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort && controller) {\n controller.abort();\n controller = void 0;\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n if (supportsAbort) {\n abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {\n signal: controller.signal\n });\n }\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n const payload = resolveUnref(config.payload);\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: resolveUnref(url),\n options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (options.afterFetch && statusCode.value >= 200 && statusCode.value < 300)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n if (!fetchResponse.ok)\n throw new Error(fetchResponse.statusText);\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ data: responseData, error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n data.value = responseData;\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = resolveRef(options.refetch);\n watch([\n refetch,\n resolveRef(url)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch([\n refetch,\n resolveRef(config.payload)\n ], ([refetch2]) => refetch2 && execute(), { deep: true });\n }\n const rawPayload = resolveUnref(config.payload);\n if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))\n config.payloadType = \"json\";\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n setTimeout(execute, 0);\n return __spreadProps$3(__spreadValues$d({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\"\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n };\n }\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n input.click();\n };\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n return {\n files: readonly(files),\n open,\n reset\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = unref(options);\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n if (unref(dataType) === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n if (unref(dataType) === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n if (unref(dataType) === \"Blob\")\n data.value = file.value;\n }\n watch(() => unref(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", () => innerFocused.value = true);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(targetElement, () => {\n focused.value = initialValue;\n }, { immediate: true, flush: \"post\" });\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst functionsMap = [\n [\n \"requestFullscreen\",\n \"exitFullscreen\",\n \"fullscreenElement\",\n \"fullscreenEnabled\",\n \"fullscreenchange\",\n \"fullscreenerror\"\n ],\n [\n \"webkitRequestFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitFullscreenElement\",\n \"webkitFullscreenEnabled\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"webkitRequestFullScreen\",\n \"webkitCancelFullScreen\",\n \"webkitCurrentFullScreenElement\",\n \"webkitCancelFullScreen\",\n \"webkitfullscreenchange\",\n \"webkitfullscreenerror\"\n ],\n [\n \"mozRequestFullScreen\",\n \"mozCancelFullScreen\",\n \"mozFullScreenElement\",\n \"mozFullScreenEnabled\",\n \"mozfullscreenchange\",\n \"mozfullscreenerror\"\n ],\n [\n \"msRequestFullscreen\",\n \"msExitFullscreen\",\n \"msFullscreenElement\",\n \"msFullscreenEnabled\",\n \"MSFullscreenChange\",\n \"MSFullscreenError\"\n ]\n];\nfunction useFullscreen(target, options = {}) {\n const { document = defaultDocument, autoExit = false } = options;\n const targetRef = target || (document == null ? void 0 : document.querySelector(\"html\"));\n const isFullscreen = ref(false);\n let map = functionsMap[0];\n const isSupported = useSupported(() => {\n if (!document) {\n return false;\n } else {\n for (const m of functionsMap) {\n if (m[1] in document) {\n map = m;\n return true;\n }\n }\n }\n return false;\n });\n const [REQUEST, EXIT, ELEMENT, , EVENT] = map;\n async function exit() {\n if (!isSupported.value)\n return;\n if (document == null ? void 0 : document[ELEMENT])\n await document[EXIT]();\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value)\n return;\n await exit();\n const target2 = unrefElement(targetRef);\n if (target2) {\n await target2[REQUEST]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n if (isFullscreen.value)\n await exit();\n else\n await enter();\n }\n if (document) {\n useEventListener(document, EVENT, () => {\n isFullscreen.value = !!(document == null ? void 0 : document[ELEMENT]);\n }, false);\n }\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n hapticActuators,\n index: gamepad.index,\n mapping: gamepad.mapping,\n connected: gamepad.connected,\n timestamp: gamepad.timestamp,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = ref(null);\n const coords = ref({\n accuracy: 0,\n latitude: Infinity,\n longitude: Infinity,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n enableHighAccuracy,\n maximumAge,\n timeout\n });\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const onEvent = createFilterWrapper(eventFilter, () => {\n idle.value = false;\n lastActive.value = timestamp();\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n });\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n }\n timer = setTimeout(() => idle.value = true, timeout);\n return { idle, lastActive };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nconst useImage = (options, asyncStateOptions = {}) => {\n const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions));\n watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n return state;\n};\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\"\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n const _element = resolveUnref(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = resolveUnref(_y)) != null ? _a : y.value,\n left: (_b = resolveUnref(_x)) != null ? _b : x.value,\n behavior: resolveUnref(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const onScrollHandler = (e) => {\n const eventTarget = e.target === document ? e.target.documentElement : e.target;\n const scrollLeft = eventTarget.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalY.value;\n arrivedState.left = scrollLeft <= 0 + (offset.left || 0);\n arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalX.value = scrollLeft;\n let scrollTop = eventTarget.scrollTop;\n if (e.target === document && !scrollTop)\n scrollTop = document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n arrivedState.top = scrollTop <= 0 + (offset.top || 0);\n arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n internalY.value = scrollTop;\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n useEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a, _b;\n const direction = (_a = options.direction) != null ? _a : \"bottom\";\n const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_b = options.distance) != null ? _b : 0\n }, options.offset)\n })));\n watch(() => state.arrivedState[direction], async (v) => {\n var _a2, _b2;\n if (v) {\n const elem = resolveUnref(element);\n const previous = {\n height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,\n width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0\n };\n await onLoadMore(state);\n if (options.preserveScrollPosition && elem) {\n nextTick(() => {\n elem.scrollTo({\n top: elem.scrollHeight - previous.height,\n left: elem.scrollWidth - previous.width\n });\n });\n }\n }\n });\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n let cleanup = noop;\n const stopWatch = isSupported.value ? watch(() => ({\n el: unrefElement(target),\n root: unrefElement(root)\n }), ({ el, root: root2 }) => {\n cleanup();\n if (!el)\n return;\n const observer = new IntersectionObserver(callback, {\n root: root2,\n rootMargin,\n threshold\n });\n observer.observe(el);\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n }, { immediate: true, flush: \"post\" }) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = new Set();\n const usedKeys = new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(refs, {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => unref(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? unref(r) : r;\n }\n });\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (resolveUnref(source))\n cb(resolveUnref(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = isNumber(track) ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = isNumber(track) ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = resolveUnref(target);\n if (!el)\n return;\n const src = resolveUnref(options.src);\n let sources = [];\n if (!src)\n return;\n if (isString(src))\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch(volume, (vol) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.volume = vol;\n });\n watch(muted, (mute) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.muted = mute;\n });\n watch(rate, (rate2) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.playbackRate = rate2;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = resolveUnref(options.tracks);\n const el = resolveUnref(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = resolveUnref(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = resolveUnref(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = resolveUnref(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(resolveUnref(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, \"waiting\", () => waiting.value = true);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n });\n useEventListener(target, \"ratechange\", () => rate.value = resolveUnref(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = resolveUnref(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n volume,\n muted,\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n onSourceError: sourceErrorEvent.on\n };\n}\n\nconst getMapVue2Compat = () => {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n};\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n onMounted(() => {\n isMounted.value = true;\n });\n return isMounted;\n}\n\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const mouseHandler = (event) => {\n if (type === \"page\") {\n x.value = event.pageX;\n y.value = event.pageY;\n } else if (type === \"client\") {\n x.value = event.clientX;\n y.value = event.clientY;\n } else if (type === \"movement\") {\n x.value = event.movementX;\n y.value = event.movementY;\n }\n sourceType.value = \"mouse\";\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const touch2 = event.touches[0];\n if (type === \"page\") {\n x.value = touch2.pageX;\n y.value = touch2.pageY;\n } else if (type === \"client\") {\n x.value = touch2.clientX;\n y.value = touch2.clientY;\n }\n sourceType.value = \"touch\";\n }\n };\n const mouseHandlerWrapper = (event) => {\n return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});\n };\n const touchHandlerWrapper = (event) => {\n return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});\n };\n if (window) {\n useEventListener(window, \"mousemove\", mouseHandlerWrapper, { passive: true });\n useEventListener(window, \"dragover\", mouseHandlerWrapper, { passive: true });\n if (touch && type !== \"movement\") {\n useEventListener(window, \"touchstart\", touchHandlerWrapper, { passive: true });\n useEventListener(window, \"touchmove\", touchHandlerWrapper, { passive: true });\n if (resetOnTouchEnds)\n useEventListener(window, \"touchend\", reset, { passive: true });\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch([targetRef, x, y], () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n }, { immediate: true });\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$1(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(() => unrefElement(target), (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n }, { immediate: true });\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nconst useNavigatorLanguage = (options = {}) => {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n};\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(b)) {\n if (__propIsEnum$7.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(new Date());\n const update = () => now.value = new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(() => unref(object), (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n }, { immediate: true });\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (isFunction(value) || isReadonly(value))\n return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, resolveUnref(min), resolveUnref(max));\n },\n set(value2) {\n _value.value = clamp(value2, resolveUnref(min), resolveUnref(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Infinity,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Infinity);\n const pageCount = computed(() => Math.max(1, Math.ceil(unref(total) / unref(currentPageSize))));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n useEventListener(target, \"pointerdown\", handler, { passive: true });\n useEventListener(target, \"pointermove\", handler, { passive: true });\n useEventListener(target, \"pointerleave\", () => isInside.value = false, { passive: true });\n }\n return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nvar SwipeDirection;\n(function(SwipeDirection2) {\n SwipeDirection2[\"UP\"] = \"UP\";\n SwipeDirection2[\"RIGHT\"] = \"RIGHT\";\n SwipeDirection2[\"DOWN\"] = \"DOWN\";\n SwipeDirection2[\"LEFT\"] = \"LEFT\";\n SwipeDirection2[\"NONE\"] = \"NONE\";\n})(SwipeDirection || (SwipeDirection = {}));\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return diffY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"touchend\", onTouchEnd, listenerOptions),\n useEventListener(target, \"touchcancel\", onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = resolveRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return SwipeDirection.NONE;\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT;\n } else {\n return distanceY.value > 0 ? SwipeDirection.UP : SwipeDirection.DOWN;\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(resolveRef(value), (_, oldValue) => {\n previous.value = oldValue;\n }, { flush: \"sync\" });\n return readonly(previous);\n}\n\nconst useScreenOrientation = (options = {}) => {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n};\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = resolveUnref(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${resolveUnref(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientHeight < ele.scrollHeight || style.overflowY === \"auto\" && ele.clientWidth < ele.scrollWidth) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(resolveRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = resolveUnref(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(ele, \"touchmove\", (e) => {\n preventDefault(e);\n }, { passive: false });\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = resolveUnref(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...unref(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(unref(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = resolveRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = unref(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = unref(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = resolveRef(text || \"\");\n const lang = resolveRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = unref(lang);\n utterance2.voice = unref(options.voice) || null;\n utterance2.pitch = pitch;\n utterance2.rate = rate;\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = resolveUnref(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (isFunction(mergeDefaults))\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => setTimeout(() => read(e), 0));\n if (storage) {\n watchWithFilter(data, async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n }, {\n flush,\n deep,\n eventFilter\n });\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.type = \"text/css\";\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(cssRef, (value) => {\n el.textContent = value;\n }, { immediate: true });\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n const ranges = new Array(rangeCount);\n for (let i = 0; i < rangeCount; i++) {\n const range = selection.getRangeAt(i);\n ranges[i] = range;\n }\n return ranges;\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n textarea.value.style.height = \"1px\";\n textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], triggerResize, { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Infinity, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nconst DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval);\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = resolveRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && isFunction(newTitle);\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return isFunction(template) ? template(t) : unref(template).replace(/%s/g, t);\n }\n watch(title, (t, o) => {\n if (t !== o && document)\n document.title = format(isString(t) ? t : \"\");\n }, { immediate: true });\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver((_b = document.head) == null ? void 0 : _b.querySelector(\"title\"), () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n }, { childList: true });\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = __spreadValues({\n linear: identity\n}, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction useTransition(source, options = {}) {\n const {\n delay = 0,\n disabled = false,\n duration = 1e3,\n onFinished = noop,\n onStarted = noop,\n transition = identity\n } = options;\n const currentTransition = computed(() => {\n const t = unref(transition);\n return isFunction(t) ? t : createEasingFunction(t);\n });\n const sourceValue = computed(() => {\n const s = unref(source);\n return isNumber(s) ? s : s.map(unref);\n });\n const sourceVector = computed(() => isNumber(sourceValue.value) ? [sourceValue.value] : sourceValue.value);\n const outputVector = ref(sourceVector.value.slice(0));\n let currentDuration;\n let diffVector;\n let endAt;\n let startAt;\n let startVector;\n const { resume, pause } = useRafFn(() => {\n const now = Date.now();\n const progress = clamp(1 - (endAt - now) / currentDuration, 0, 1);\n outputVector.value = startVector.map((val, i) => {\n var _a;\n return val + ((_a = diffVector[i]) != null ? _a : 0) * currentTransition.value(progress);\n });\n if (progress >= 1) {\n pause();\n onFinished();\n }\n }, { immediate: false });\n const start = () => {\n pause();\n currentDuration = unref(duration);\n diffVector = outputVector.value.map((n, i) => {\n var _a, _b;\n return ((_a = sourceVector.value[i]) != null ? _a : 0) - ((_b = outputVector.value[i]) != null ? _b : 0);\n });\n startVector = outputVector.value.slice(0);\n startAt = Date.now();\n endAt = startAt + currentDuration;\n resume();\n onStarted();\n };\n const timeout = useTimeoutFn(start, delay, { immediate: false });\n watch(sourceVector, () => {\n if (unref(disabled))\n return;\n if (unref(delay) <= 0)\n start();\n else\n timeout.start();\n }, { deep: true });\n watch(() => unref(disabled), (v) => {\n if (v) {\n outputVector.value = sourceVector.value.slice(0);\n pause();\n }\n });\n return computed(() => {\n const targetVector = unref(disabled) ? sourceVector : outputVector;\n return isNumber(sourceValue.value) ? targetVector.value[0] : targetVector.value;\n });\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(state, () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n }, { deep: true });\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const videoDeviceId = ref(options.videoDeviceId);\n const audioDeviceId = ref(options.audioDeviceId);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(device) {\n if (device.value === \"none\" || device.value === false)\n return false;\n if (device.value == null)\n return true;\n return {\n deviceId: device.value\n };\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(videoDeviceId),\n audio: getDeviceOptions(audioDeviceId)\n });\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(enabled, (v) => {\n if (v)\n _start();\n else\n _stop();\n }, { immediate: true });\n watch([videoDeviceId, audioDeviceId], () => {\n if (autoSwitch.value && stream.value)\n restart();\n }, { immediate: true });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n videoDeviceId,\n audioDeviceId,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = eventName || event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(() => props[key], (v) => proxy.value = cloneFn(v));\n watch(proxy, (v) => {\n if (v !== props[key] || deep)\n _emit(event, v);\n }, { deep });\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n _emit(event, value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = resolveRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(vibrate, interval, {\n immediate: false,\n immediateCallback: false\n });\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nconst useWakeLock = (options = {}) => {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n};\n\nconst useWebNotification = (defaultOptions = {}) => {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const onClick = createEventHook();\n const onShow = createEventHook();\n const onError = createEventHook();\n const onClose = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = (event) => onClick.trigger(event);\n notification.value.onshow = (event) => onShow.trigger(event);\n notification.value.onerror = (event) => onError.trigger(event);\n notification.value.onclose = (event) => onClose.trigger(event);\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n};\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = resolveRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(() => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n }, interval, { immediate: false });\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = function post2(val) {\n if (!worker.value)\n return;\n worker.value.postMessage(val);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (isString(arg0))\n worker.value = new Worker(arg0, workerOptions);\n else if (isFunction(arg0))\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nconst jobRunner = (userFunc) => (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n};\n\nconst depsParser = (deps) => {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n};\n\nconst createWorkerBlobUrl = (fn, deps) => {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n};\n\nconst useWebWorkerFn = (fn, options = {}) => {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n};\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(window, \"scroll\", () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n }, {\n capture: false,\n passive: true\n });\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Infinity,\n initialHeight = Infinity,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation)\n useEventListener(\"orientationchange\", update, { passive: true });\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n", "import { isClient, isIOS } from '@vueuse/core'\n\nexport const isFirefox = (): boolean =>\n isClient && /firefox/i.test(window.navigator.userAgent)\n\nexport { isClient, isIOS }\n", "import { isClient } from '../browser'\n\nexport const isInContainer = (\n el?: Element,\n container?: Element | Window\n): boolean => {\n if (!isClient || !el || !container) return false\n\n const elRect = el.getBoundingClientRect()\n\n let containerRect: Pick\n if (container instanceof Element) {\n containerRect = container.getBoundingClientRect()\n } else {\n containerRect = {\n top: 0,\n right: window.innerWidth,\n bottom: window.innerHeight,\n left: 0,\n }\n }\n return (\n elRect.top < containerRect.bottom &&\n elRect.bottom > containerRect.top &&\n elRect.right > containerRect.left &&\n elRect.left < containerRect.right\n )\n}\n\nexport const getOffsetTop = (el: HTMLElement) => {\n let offset = 0\n let parent = el\n\n while (parent) {\n offset += parent.offsetTop\n parent = parent.offsetParent as HTMLElement\n }\n\n return offset\n}\n\nexport const getOffsetTopDistance = (\n el: HTMLElement,\n containerEl: HTMLElement\n) => {\n return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl))\n}\n\nexport const getClientXY = (event: MouseEvent | TouchEvent) => {\n let clientX: number\n let clientY: number\n if (event.type === 'touchend') {\n clientY = (event as TouchEvent).changedTouches[0].clientY\n clientX = (event as TouchEvent).changedTouches[0].clientX\n } else if (event.type.startsWith('touch')) {\n clientY = (event as TouchEvent).touches[0].clientY\n clientX = (event as TouchEvent).touches[0].clientX\n } else {\n clientY = (event as MouseEvent).clientY\n clientX = (event as MouseEvent).clientX\n }\n return {\n clientX,\n clientY,\n }\n}\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n", "import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n", "import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\nfunction baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n}\n\nexport default baseToNumber;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n", "import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n", "import baseToNumber from './_baseToNumber.js';\nimport baseToString from './_baseToString.js';\n\n/**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\nfunction createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n}\n\nexport default createMathOperation;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\nvar add = createMathOperation(function(augend, addend) {\n return augend + addend;\n}, 0);\n\nexport default add;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n", "import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n", "import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n", "import toNumber from './toNumber.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nexport default toFinite;\n", "import toFinite from './toFinite.js';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n", "import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\nfunction after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n\nexport default after;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n", "import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n", "import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n", "import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n", "import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n", "import WeakMap from './_WeakMap.js';\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nexport default metaMap;\n", "import identity from './identity.js';\nimport metaMap from './_metaMap.js';\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nexport default baseSetData;\n", "import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n", "import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nexport default createCtor;\n", "import createCtor from './_createCtor.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nexport default createBind;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nexport default composeArgs;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nexport default composeArgsRight;\n", "/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nexport default countHolders;\n", "/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nexport default baseLodash;\n", "import baseCreate from './_baseCreate.js';\nimport baseLodash from './_baseLodash.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nexport default LazyWrapper;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n", "import metaMap from './_metaMap.js';\nimport noop from './noop.js';\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nexport default getData;\n", "/** Used to lookup unminified function names. */\nvar realNames = {};\n\nexport default realNames;\n", "import realNames from './_realNames.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\n\nexport default getFuncName;\n", "import baseCreate from './_baseCreate.js';\nimport baseLodash from './_baseLodash.js';\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nexport default LodashWrapper;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport LodashWrapper from './_LodashWrapper.js';\nimport copyArray from './_copyArray.js';\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nexport default wrapperClone;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport LodashWrapper from './_LodashWrapper.js';\nimport baseLodash from './_baseLodash.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\nimport wrapperClone from './_wrapperClone.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nexport default lodash;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport getData from './_getData.js';\nimport getFuncName from './_getFuncName.js';\nimport lodash from './wrapperLodash.js';\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\n\nexport default isLaziable;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n", "import baseSetData from './_baseSetData.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nexport default setData;\n", "/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nexport default getWrapDetails;\n", "/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nexport default insertWrapDetails;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n", "import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n", "import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n", "import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n", "import baseIndexOf from './_baseIndexOf.js';\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n", "import arrayEach from './_arrayEach.js';\nimport arrayIncludes from './_arrayIncludes.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\n\nexport default updateWrapDetails;\n", "import getWrapDetails from './_getWrapDetails.js';\nimport insertWrapDetails from './_insertWrapDetails.js';\nimport setToString from './_setToString.js';\nimport updateWrapDetails from './_updateWrapDetails.js';\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nexport default setWrapToString;\n", "import isLaziable from './_isLaziable.js';\nimport setData from './_setData.js';\nimport setWrapToString from './_setWrapToString.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nexport default createRecurry;\n", "/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nexport default getHolder;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n", "import copyArray from './_copyArray.js';\nimport isIndex from './_isIndex.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nexport default reorder;\n", "/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\n\nexport default replaceHolders;\n", "import composeArgs from './_composeArgs.js';\nimport composeArgsRight from './_composeArgsRight.js';\nimport countHolders from './_countHolders.js';\nimport createCtor from './_createCtor.js';\nimport createRecurry from './_createRecurry.js';\nimport getHolder from './_getHolder.js';\nimport reorder from './_reorder.js';\nimport replaceHolders from './_replaceHolders.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nexport default createHybrid;\n", "import apply from './_apply.js';\nimport createCtor from './_createCtor.js';\nimport createHybrid from './_createHybrid.js';\nimport createRecurry from './_createRecurry.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\nimport root from './_root.js';\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nexport default createCurry;\n", "import apply from './_apply.js';\nimport createCtor from './_createCtor.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nexport default createPartial;\n", "import composeArgs from './_composeArgs.js';\nimport composeArgsRight from './_composeArgsRight.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nexport default mergeData;\n", "import baseSetData from './_baseSetData.js';\nimport createBind from './_createBind.js';\nimport createCurry from './_createCurry.js';\nimport createHybrid from './_createHybrid.js';\nimport createPartial from './_createPartial.js';\nimport getData from './_getData.js';\nimport mergeData from './_mergeData.js';\nimport setData from './_setData.js';\nimport setWrapToString from './_setWrapToString.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nexport default createWrap;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\n\nexport default ary;\n", "import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n", "import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n", "import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n", "import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n", "import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n", "import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n", "import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n", "import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n", "import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n", "import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n", "import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n", "import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n", "import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n", "import assignValue from './_assignValue.js';\nimport copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport isArrayLike from './isArrayLike.js';\nimport isPrototype from './_isPrototype.js';\nimport keys from './keys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nexport default assign;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n", "import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\nvar assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n});\n\nexport default assignIn;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n});\n\nexport default assignInWith;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n/**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n});\n\nexport default assignWith;\n", "import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n", "import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n", "import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n", "import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n", "import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n", "import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n", "import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n", "import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n", "import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n", "import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n", "import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n", "import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n", "import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n", "import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n", "import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n", "import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n", "import get from './get.js';\n\n/**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\nfunction baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n}\n\nexport default baseAt;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n", "import Symbol from './_Symbol.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nexport default isFlattenable;\n", "import arrayPush from './_arrayPush.js';\nimport isFlattenable from './_isFlattenable.js';\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexport default baseFlatten;\n", "import baseFlatten from './_baseFlatten.js';\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nexport default flatten;\n", "import flatten from './flatten.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nexport default flatRest;\n", "import baseAt from './_baseAt.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\nvar at = flatRest(baseAt);\n\nexport default at;\n", "import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n", "import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\nexport default isError;\n", "import apply from './_apply.js';\nimport baseRest from './_baseRest.js';\nimport isError from './isError.js';\n\n/**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\nvar attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n});\n\nexport default attempt;\n", "import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nexport default before;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\nvar bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n});\n\n// Assign default placeholders.\nbind.placeholder = {};\n\nexport default bind;\n", "import arrayEach from './_arrayEach.js';\nimport baseAssignValue from './_baseAssignValue.js';\nimport bind from './bind.js';\nimport flatRest from './_flatRest.js';\nimport toKey from './_toKey.js';\n\n/**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\nvar bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n});\n\nexport default bindAll;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\nvar bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n});\n\n// Assign default placeholders.\nbindKey.placeholder = {};\n\nexport default bindKey;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n", "/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nexport default asciiToArray;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n", "import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nexport default stringToArray;\n", "import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nexport default createCaseFirst;\n", "import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n", "import toString from './toString.js';\nimport upperFirst from './upperFirst.js';\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nexport default capitalize;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nexport default arrayReduce;\n", "/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default basePropertyOf;\n", "import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nexport default deburrLetter;\n", "import deburrLetter from './_deburrLetter.js';\nimport toString from './toString.js';\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nexport default deburr;\n", "/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nexport default asciiWords;\n", "/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nexport default hasUnicodeWord;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nexport default unicodeWords;\n", "import asciiWords from './_asciiWords.js';\nimport hasUnicodeWord from './_hasUnicodeWord.js';\nimport toString from './toString.js';\nimport unicodeWords from './_unicodeWords.js';\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nexport default words;\n", "import arrayReduce from './_arrayReduce.js';\nimport deburr from './deburr.js';\nimport words from './words.js';\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nexport default createCompounder;\n", "import capitalize from './capitalize.js';\nimport createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nexport default camelCase;\n", "import isArray from './isArray.js';\n\n/**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\nfunction castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n}\n\nexport default castArray;\n", "import root from './_root.js';\nimport toInteger from './toInteger.js';\nimport toNumber from './toNumber.js';\nimport toString from './toString.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite,\n nativeMin = Math.min;\n\n/**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\nfunction createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n}\n\nexport default createRound;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\nvar ceil = createRound('ceil');\n\nexport default ceil;\n", "import lodash from './wrapperLodash.js';\n\n/**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\nfunction chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n}\n\nexport default chain;\n", "import baseSlice from './_baseSlice.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\nfunction chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n}\n\nexport default chunk;\n", "/**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\nfunction baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n}\n\nexport default baseClamp;\n", "import baseClamp from './_baseClamp.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\nfunction clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n}\n\nexport default clamp;\n", "import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n", "import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n", "import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n", "import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n", "import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n", "import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n", "import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n", "import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n", "import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n", "import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n", "import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n", "import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n", "import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n", "import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n", "import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n", "import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n", "import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneDeepWith;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\nfunction cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneWith;\n", "import LodashWrapper from './_LodashWrapper.js';\n\n/**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\nfunction wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n}\n\nexport default wrapperCommit;\n", "/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default compact;\n", "import arrayPush from './_arrayPush.js';\nimport baseFlatten from './_baseFlatten.js';\nimport copyArray from './_copyArray.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nexport default concat;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n", "import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n", "import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n", "import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n", "import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n", "import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n", "import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n", "import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nexport default baseIsMatch;\n", "import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n", "import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nexport default getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nexport default matchesStrictComparable;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nexport default baseMatches;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n", "import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n", "import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n", "import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nexport default baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default baseProperty;\n", "import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nexport default basePropertyDeep;\n", "import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n", "import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nexport default baseIteratee;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\nfunction cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = baseIteratee;\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n}\n\nexport default cond;\n", "/**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\nfunction baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n}\n\nexport default baseConformsTo;\n", "import baseConformsTo from './_baseConformsTo.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n}\n\nexport default baseConforms;\n", "import baseClone from './_baseClone.js';\nimport baseConforms from './_baseConforms.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\nfunction conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n}\n\nexport default conforms;\n", "import baseConformsTo from './_baseConformsTo.js';\nimport keys from './keys.js';\n\n/**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\nfunction conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n}\n\nexport default conformsTo;\n", "/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n", "import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n", "import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n", "import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n", "import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n", "import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\nvar countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n});\n\nexport default countBy;\n", "import baseAssign from './_baseAssign.js';\nimport baseCreate from './_baseCreate.js';\n\n/**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\nfunction create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n}\n\nexport default create;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nexport default curry;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_RIGHT_FLAG = 16;\n\n/**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\nfunction curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurryRight.placeholder = {};\n\nexport default curryRight;\n", "import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n", "import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n", "/**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\nfunction defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n}\n\nexport default defaultTo;\n", "import baseRest from './_baseRest.js';\nimport eq from './eq.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keysIn from './keysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nexport default defaults;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n", "import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n", "/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n", "import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n", "import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n", "import baseMerge from './_baseMerge.js';\nimport isObject from './isObject.js';\n\n/**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n}\n\nexport default customDefaultsMerge;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nexport default mergeWith;\n", "import apply from './_apply.js';\nimport baseRest from './_baseRest.js';\nimport customDefaultsMerge from './_customDefaultsMerge.js';\nimport mergeWith from './mergeWith.js';\n\n/**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\nvar defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n});\n\nexport default defaultsDeep;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\nfunction baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n}\n\nexport default baseDelay;\n", "import baseDelay from './_baseDelay.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\nvar defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n});\n\nexport default defer;\n", "import baseDelay from './_baseDelay.js';\nimport baseRest from './_baseRest.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\nvar delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n});\n\nexport default delay;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseDifference;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nexport default difference;\n", "/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nvar differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))\n : [];\n});\n\nexport default differenceBy;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\nvar differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n});\n\nexport default differenceWith;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\nvar divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n}, 1);\n\nexport default divide;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default drop;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default dropRight;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n}\n\nexport default baseWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), true, true)\n : [];\n}\n\nexport default dropRightWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), true)\n : [];\n}\n\nexport default dropWhile;\n", "import identity from './identity.js';\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nexport default castFunction;\n", "import arrayEach from './_arrayEach.js';\nimport baseEach from './_baseEach.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEach;\n", "/**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEachRight;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseForRight = createBaseFor(true);\n\nexport default baseForRight;\n", "import baseForRight from './_baseForRight.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n}\n\nexport default baseForOwnRight;\n", "import baseForOwnRight from './_baseForOwnRight.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEachRight = createBaseEach(baseForOwnRight, true);\n\nexport default baseEachRight;\n", "import arrayEachRight from './_arrayEachRight.js';\nimport baseEachRight from './_baseEachRight.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\nfunction forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEachRight;\n", "import baseClamp from './_baseClamp.js';\nimport baseToString from './_baseToString.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\nfunction endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n}\n\nexport default endsWith;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\nfunction baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n}\n\nexport default baseToPairs;\n", "/**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\nfunction setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n}\n\nexport default setToPairs;\n", "import baseToPairs from './_baseToPairs.js';\nimport getTag from './_getTag.js';\nimport mapToArray from './_mapToArray.js';\nimport setToPairs from './_setToPairs.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\nfunction createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n}\n\nexport default createToPairs;\n", "import createToPairs from './_createToPairs.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\nvar toPairs = createToPairs(keys);\n\nexport default toPairs;\n", "import createToPairs from './_createToPairs.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\nvar toPairsIn = createToPairs(keysIn);\n\nexport default toPairsIn;\n", "import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map characters to HTML entities. */\nvar htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\n/**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nvar escapeHtmlChar = basePropertyOf(htmlEscapes);\n\nexport default escapeHtmlChar;\n", "import escapeHtmlChar from './_escapeHtmlChar.js';\nimport toString from './toString.js';\n\n/** Used to match HTML entities and HTML characters. */\nvar reUnescapedHtml = /[&<>\"']/g,\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n}\n\nexport default escape;\n", "import toString from './toString.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n}\n\nexport default escapeRegExp;\n", "/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nexport default arrayEvery;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nexport default baseEvery;\n", "import arrayEvery from './_arrayEvery.js';\nimport baseEvery from './_baseEvery.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default every;\n", "import baseClamp from './_baseClamp.js';\nimport toInteger from './toInteger.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\nfunction toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n}\n\nexport default toLength;\n", "import toInteger from './toInteger.js';\nimport toLength from './toLength.js';\n\n/**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\nfunction baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n}\n\nexport default baseFill;\n", "import baseFill from './_baseFill.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\nfunction fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n}\n\nexport default fill;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nexport default baseFilter;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default filter;\n", "import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n", "import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n", "/**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\nfunction baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n}\n\nexport default baseFindKey;\n", "import baseFindKey from './_baseFindKey.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\nfunction findKey(object, predicate) {\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\n}\n\nexport default findKey;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\nfunction findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\n}\n\nexport default findLastIndex;\n", "import createFind from './_createFind.js';\nimport findLastIndex from './findLastIndex.js';\n\n/**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\nvar findLast = createFind(findLastIndex);\n\nexport default findLast;\n", "import baseFindKey from './_baseFindKey.js';\nimport baseForOwnRight from './_baseForOwnRight.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\nfunction findLastKey(object, predicate) {\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\n}\n\nexport default findLastKey;\n", "/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nexport default head;\n", "import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nexport default flatMap;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n}\n\nexport default flatMapDeep;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\nimport toInteger from './toInteger.js';\n\n/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\nfunction flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n}\n\nexport default flatMapDepth;\n", "import baseFlatten from './_baseFlatten.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nexport default flattenDeep;\n", "import baseFlatten from './_baseFlatten.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\nfunction flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n}\n\nexport default flattenDepth;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\nfunction flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n}\n\nexport default flip;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\nvar floor = createRound('floor');\n\nexport default floor;\n", "import LodashWrapper from './_LodashWrapper.js';\nimport flatRest from './_flatRest.js';\nimport getData from './_getData.js';\nimport getFuncName from './_getFuncName.js';\nimport isArray from './isArray.js';\nimport isLaziable from './_isLaziable.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\nfunction createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n}\n\nexport default createFlow;\n", "import createFlow from './_createFlow.js';\n\n/**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flow = createFlow();\n\nexport default flow;\n", "import createFlow from './_createFlow.js';\n\n/**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flowRight = createFlow(true);\n\nexport default flowRight;\n", "import baseFor from './_baseFor.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nexport default forIn;\n", "import baseForRight from './_baseForRight.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\nfunction forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, castFunction(iteratee), keysIn);\n}\n\nexport default forInRight;\n", "import baseForOwn from './_baseForOwn.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nexport default forOwn;\n", "import baseForOwnRight from './_baseForOwnRight.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\nfunction forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, castFunction(iteratee));\n}\n\nexport default forOwnRight;\n", "/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n}\n\nexport default fromPairs;\n", "import arrayFilter from './_arrayFilter.js';\nimport isFunction from './isFunction.js';\n\n/**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\nfunction baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n}\n\nexport default baseFunctions;\n", "import baseFunctions from './_baseFunctions.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\nfunction functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n}\n\nexport default functions;\n", "import baseFunctions from './_baseFunctions.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\nfunction functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n}\n\nexport default functionsIn;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nexport default groupBy;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nexport default baseGt;\n", "import toNumber from './toNumber.js';\n\n/**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\nfunction createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n}\n\nexport default createRelationalOperation;\n", "import baseGt from './_baseGt.js';\nimport createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\nvar gt = createRelationalOperation(baseGt);\n\nexport default gt;\n", "import createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\nvar gte = createRelationalOperation(function(value, other) {\n return value >= other;\n});\n\nexport default gte;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nexport default baseHas;\n", "import baseHas from './_baseHas.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nexport default has;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\nfunction baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n}\n\nexport default baseInRange;\n", "import baseInRange from './_baseInRange.js';\nimport toFinite from './toFinite.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\nfunction inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n}\n\nexport default inRange;\n", "import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nexport default baseValues;\n", "import baseValues from './_baseValues.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nexport default values;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport toInteger from './toInteger.js';\nimport values from './values.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nexport default includes;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n}\n\nexport default indexOf;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\nfunction initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n}\n\nexport default initial;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseIntersection;\n", "import isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nexport default castArrayLikeObject;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nexport default intersection;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\nvar intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, baseIteratee(iteratee, 2))\n : [];\n});\n\nexport default intersectionBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nvar intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n});\n\nexport default intersectionWith;\n", "import baseForOwn from './_baseForOwn.js';\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nexport default baseInverter;\n", "import baseInverter from './_baseInverter.js';\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nexport default createInverter;\n", "import constant from './constant.js';\nimport createInverter from './_createInverter.js';\nimport identity from './identity.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nexport default invert;\n", "import baseIteratee from './_baseIteratee.js';\nimport createInverter from './_createInverter.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\nvar invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n}, baseIteratee);\n\nexport default invertBy;\n", "import baseGet from './_baseGet.js';\nimport baseSlice from './_baseSlice.js';\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nexport default parent;\n", "import apply from './_apply.js';\nimport castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\nfunction baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n}\n\nexport default baseInvoke;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\nvar invoke = baseRest(baseInvoke);\n\nexport default invoke;\n", "import apply from './_apply.js';\nimport baseEach from './_baseEach.js';\nimport baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\nvar invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n});\n\nexport default invokeMap;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\nvar arrayBufferTag = '[object ArrayBuffer]';\n\n/**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\nfunction baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n}\n\nexport default baseIsArrayBuffer;\n", "import baseIsArrayBuffer from './_baseIsArrayBuffer.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;\n\n/**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\nvar isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\nexport default isArrayBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar dateTag = '[object Date]';\n\n/**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\nfunction baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n}\n\nexport default baseIsDate;\n", "import baseIsDate from './_baseIsDate.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsDate = nodeUtil && nodeUtil.isDate;\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\nvar isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\nexport default isDate;\n", "import isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\nfunction isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nexport default isElement;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n", "import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n", "import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\nfunction isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n}\n\nexport default isEqualWith;\n", "import root from './_root.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite;\n\n/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\nfunction isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n}\n\nexport default isFinite;\n", "import toInteger from './toInteger.js';\n\n/**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\nfunction isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n}\n\nexport default isInteger;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\n\n/**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\nfunction isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n}\n\nexport default isMatch;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\n\n/**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\nfunction isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n}\n\nexport default isMatchWith;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nexport default isNumber;\n", "import isNumber from './isNumber.js';\n\n/**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\nfunction isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n}\n\nexport default isNaN;\n", "import coreJsData from './_coreJsData.js';\nimport isFunction from './isFunction.js';\nimport stubFalse from './stubFalse.js';\n\n/**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\nvar isMaskable = coreJsData ? isFunction : stubFalse;\n\nexport default isMaskable;\n", "import baseIsNative from './_baseIsNative.js';\nimport isMaskable from './_isMaskable.js';\n\n/** Error message constants. */\nvar CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';\n\n/**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n}\n\nexport default isNative;\n", "/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nexport default isNil;\n", "/**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\nfunction isNull(value) {\n return value === null;\n}\n\nexport default isNull;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar regexpTag = '[object RegExp]';\n\n/**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\nfunction baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n}\n\nexport default baseIsRegExp;\n", "import baseIsRegExp from './_baseIsRegExp.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;\n\n/**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\nvar isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\nexport default isRegExp;\n", "import isInteger from './isInteger.js';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\nfunction isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isSafeInteger;\n", "/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nexport default isUndefined;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n}\n\nexport default isWeakMap;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar weakSetTag = '[object WeakSet]';\n\n/**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\nfunction isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n}\n\nexport default isWeakSet;\n", "import baseClone from './_baseClone.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nexport default iteratee;\n", "/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeJoin = arrayProto.join;\n\n/**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\nfunction join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n}\n\nexport default join;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\nvar kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n});\n\nexport default kebabCase;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nexport default keyBy;\n", "/**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n}\n\nexport default strictLastIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictLastIndexOf from './_strictLastIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\nfunction lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n}\n\nexport default lastIndexOf;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\nvar lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n});\n\nexport default lowerCase;\n", "import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\nvar lowerFirst = createCaseFirst('toLowerCase');\n\nexport default lowerFirst;\n", "/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nexport default baseLt;\n", "import baseLt from './_baseLt.js';\nimport createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\nvar lt = createRelationalOperation(baseLt);\n\nexport default lt;\n", "import createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\nvar lte = createRelationalOperation(function(value, other) {\n return value <= other;\n});\n\nexport default lte;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\nfunction mapKeys(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n}\n\nexport default mapKeys;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nexport default mapValues;\n", "import baseClone from './_baseClone.js';\nimport baseMatches from './_baseMatches.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\nfunction matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n}\n\nexport default matches;\n", "import baseClone from './_baseClone.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\nfunction matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n}\n\nexport default matchesProperty;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nexport default baseExtremum;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nexport default max;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nfunction maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)\n : undefined;\n}\n\nexport default maxBy;\n", "/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nexport default baseSum;\n", "import baseSum from './_baseSum.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\nfunction baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n}\n\nexport default baseMean;\n", "import baseMean from './_baseMean.js';\nimport identity from './identity.js';\n\n/**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\nfunction mean(array) {\n return baseMean(array, identity);\n}\n\nexport default mean;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseMean from './_baseMean.js';\n\n/**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\nfunction meanBy(array, iteratee) {\n return baseMean(array, baseIteratee(iteratee, 2));\n}\n\nexport default meanBy;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\nvar method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n});\n\nexport default method;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\nvar methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n});\n\nexport default methodOf;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseLt from './_baseLt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nexport default min;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseLt from './_baseLt.js';\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nexport default minBy;\n", "import arrayEach from './_arrayEach.js';\nimport arrayPush from './_arrayPush.js';\nimport baseFunctions from './_baseFunctions.js';\nimport copyArray from './_copyArray.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport keys from './keys.js';\n\n/**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\nfunction mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n}\n\nexport default mixin;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\nvar multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n}, 1);\n\nexport default multiply;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nexport default negate;\n", "/**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n}\n\nexport default iteratorToArray;\n", "import Symbol from './_Symbol.js';\nimport copyArray from './_copyArray.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport iteratorToArray from './_iteratorToArray.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\nimport stringToArray from './_stringToArray.js';\nimport values from './values.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Built-in value references. */\nvar symIterator = Symbol ? Symbol.iterator : undefined;\n\n/**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\nfunction toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n}\n\nexport default toArray;\n", "import toArray from './toArray.js';\n\n/**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\nfunction wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n}\n\nexport default wrapperNext;\n", "import isIndex from './_isIndex.js';\n\n/**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\nfunction baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n}\n\nexport default baseNth;\n", "import baseNth from './_baseNth.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\nfunction nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n}\n\nexport default nth;\n", "import baseNth from './_baseNth.js';\nimport baseRest from './_baseRest.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\nfunction nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n}\n\nexport default nthArg;\n", "import castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nexport default baseUnset;\n", "import isPlainObject from './isPlainObject.js';\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nexport default customOmitClone;\n", "import arrayMap from './_arrayMap.js';\nimport baseClone from './_baseClone.js';\nimport baseUnset from './_baseUnset.js';\nimport castPath from './_castPath.js';\nimport copyObject from './_copyObject.js';\nimport customOmitClone from './_customOmitClone.js';\nimport flatRest from './_flatRest.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\n\nexport default omit;\n", "import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n", "import baseGet from './_baseGet.js';\nimport baseSet from './_baseSet.js';\nimport castPath from './_castPath.js';\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nexport default basePickBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport basePickBy from './_basePickBy.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nexport default pickBy;\n", "import baseIteratee from './_baseIteratee.js';\nimport negate from './negate.js';\nimport pickBy from './pickBy.js';\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\nfunction omitBy(object, predicate) {\n return pickBy(object, negate(baseIteratee(predicate)));\n}\n\nexport default omitBy;\n", "import before from './before.js';\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nexport default once;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nexport default baseSortBy;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nexport default compareAscending;\n", "import compareAscending from './_compareAscending.js';\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nexport default compareMultiple;\n", "import arrayMap from './_arrayMap.js';\nimport baseGet from './_baseGet.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport baseSortBy from './_baseSortBy.js';\nimport baseUnary from './_baseUnary.js';\nimport compareMultiple from './_compareMultiple.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nexport default baseOrderBy;\n", "import baseOrderBy from './_baseOrderBy.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\nfunction orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n}\n\nexport default orderBy;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport baseUnary from './_baseUnary.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\nfunction createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n}\n\nexport default createOver;\n", "import arrayMap from './_arrayMap.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\nvar over = createOver(arrayMap);\n\nexport default over;\n", "import baseRest from './_baseRest.js';\n\n/**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nvar castRest = baseRest;\n\nexport default castRest;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport baseUnary from './_baseUnary.js';\nimport castRest from './_castRest.js';\nimport isArray from './isArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\nvar overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(baseIteratee))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n});\n\nexport default overArgs;\n", "import arrayEvery from './_arrayEvery.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\nvar overEvery = createOver(arrayEvery);\n\nexport default overEvery;\n", "import arraySome from './_arraySome.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\nvar overSome = createOver(arraySome);\n\nexport default overSome;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor;\n\n/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\nfunction baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n}\n\nexport default baseRepeat;\n", "import baseProperty from './_baseProperty.js';\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nexport default asciiSize;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nexport default unicodeSize;\n", "import asciiSize from './_asciiSize.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeSize from './_unicodeSize.js';\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nexport default stringSize;\n", "import baseRepeat from './_baseRepeat.js';\nimport baseToString from './_baseToString.js';\nimport castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringSize from './_stringSize.js';\nimport stringToArray from './_stringToArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil;\n\n/**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\nfunction createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n}\n\nexport default createPadding;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeFloor = Math.floor;\n\n/**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\nfunction pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n}\n\nexport default pad;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\nfunction padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n}\n\nexport default padEnd;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\nfunction padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n}\n\nexport default padStart;\n", "import root from './_root.js';\nimport toString from './toString.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeParseInt = root.parseInt;\n\n/**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\nfunction parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n}\n\nexport default parseInt;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\nvar partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n});\n\n// Assign default placeholders.\npartial.placeholder = {};\n\nexport default partial;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\nvar partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n});\n\n// Assign default placeholders.\npartialRight.placeholder = {};\n\nexport default partialRight;\n", "import createAggregator from './_createAggregator.js';\n\n/**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\nvar partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n}, function() { return [[], []]; });\n\nexport default partition;\n", "import basePickBy from './_basePickBy.js';\nimport hasIn from './hasIn.js';\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nexport default basePick;\n", "import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nexport default pick;\n", "import baseLodash from './_baseLodash.js';\nimport wrapperClone from './_wrapperClone.js';\n\n/**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\nfunction wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n}\n\nexport default wrapperPlant;\n", "import baseGet from './_baseGet.js';\n\n/**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\nfunction propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n}\n\nexport default propertyOf;\n", "/**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseIndexOfWith;\n", "import arrayMap from './_arrayMap.js';\nimport baseIndexOf from './_baseIndexOf.js';\nimport baseIndexOfWith from './_baseIndexOfWith.js';\nimport baseUnary from './_baseUnary.js';\nimport copyArray from './_copyArray.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n}\n\nexport default basePullAll;\n", "import basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\nfunction pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n}\n\nexport default pullAll;\n", "import baseRest from './_baseRest.js';\nimport pullAll from './pullAll.js';\n\n/**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\nvar pull = baseRest(pullAll);\n\nexport default pull;\n", "import baseIteratee from './_baseIteratee.js';\nimport basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nfunction pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, baseIteratee(iteratee, 2))\n : array;\n}\n\nexport default pullAllBy;\n", "import basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nfunction pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n}\n\nexport default pullAllWith;\n", "import baseUnset from './_baseUnset.js';\nimport isIndex from './_isIndex.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n}\n\nexport default basePullAt;\n", "import arrayMap from './_arrayMap.js';\nimport baseAt from './_baseAt.js';\nimport basePullAt from './_basePullAt.js';\nimport compareAscending from './_compareAscending.js';\nimport flatRest from './_flatRest.js';\nimport isIndex from './_isIndex.js';\n\n/**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\nvar pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n});\n\nexport default pullAt;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor,\n nativeRandom = Math.random;\n\n/**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\nfunction baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n}\n\nexport default baseRandom;\n", "import baseRandom from './_baseRandom.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseFloat = parseFloat;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min,\n nativeRandom = Math.random;\n\n/**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\nfunction random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n}\n\nexport default random;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nexport default baseRange;\n", "import baseRange from './_baseRange.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nexport default createRange;\n", "import createRange from './_createRange.js';\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nexport default range;\n", "import createRange from './_createRange.js';\n\n/**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\nvar rangeRight = createRange(true);\n\nexport default rangeRight;\n", "import createWrap from './_createWrap.js';\nimport flatRest from './_flatRest.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\n\nexport default rearg;\n", "/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\nexport default baseReduce;\n", "import arrayReduce from './_arrayReduce.js';\nimport baseEach from './_baseEach.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nexport default reduce;\n", "/**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n}\n\nexport default arrayReduceRight;\n", "import arrayReduceRight from './_arrayReduceRight.js';\nimport baseEachRight from './_baseEachRight.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\nfunction reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n}\n\nexport default reduceRight;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport negate from './negate.js';\n\n/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\nfunction reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(baseIteratee(predicate, 3)));\n}\n\nexport default reject;\n", "import baseIteratee from './_baseIteratee.js';\nimport basePullAt from './_basePullAt.js';\n\n/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\nfunction remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = baseIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n}\n\nexport default remove;\n", "import baseRepeat from './_baseRepeat.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\nfunction repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n}\n\nexport default repeat;\n", "import toString from './toString.js';\n\n/**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\nfunction replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n}\n\nexport default replace;\n", "import baseRest from './_baseRest.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n}\n\nexport default rest;\n", "import castPath from './_castPath.js';\nimport isFunction from './isFunction.js';\nimport toKey from './_toKey.js';\n\n/**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\nfunction result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n}\n\nexport default result;\n", "/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeReverse = arrayProto.reverse;\n\n/**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\nfunction reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n}\n\nexport default reverse;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\nvar round = createRound('round');\n\nexport default round;\n", "import baseRandom from './_baseRandom.js';\n\n/**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\nfunction arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n}\n\nexport default arraySample;\n", "import arraySample from './_arraySample.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\nfunction baseSample(collection) {\n return arraySample(values(collection));\n}\n\nexport default baseSample;\n", "import arraySample from './_arraySample.js';\nimport baseSample from './_baseSample.js';\nimport isArray from './isArray.js';\n\n/**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\nfunction sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n}\n\nexport default sample;\n", "import baseRandom from './_baseRandom.js';\n\n/**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\nfunction shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n}\n\nexport default shuffleSelf;\n", "import baseClamp from './_baseClamp.js';\nimport copyArray from './_copyArray.js';\nimport shuffleSelf from './_shuffleSelf.js';\n\n/**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\nfunction arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n}\n\nexport default arraySampleSize;\n", "import baseClamp from './_baseClamp.js';\nimport shuffleSelf from './_shuffleSelf.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\nfunction baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n}\n\nexport default baseSampleSize;\n", "import arraySampleSize from './_arraySampleSize.js';\nimport baseSampleSize from './_baseSampleSize.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\nfunction sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n}\n\nexport default sampleSize;\n", "import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n", "import baseSet from './_baseSet.js';\n\n/**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\nfunction setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n}\n\nexport default setWith;\n", "import copyArray from './_copyArray.js';\nimport shuffleSelf from './_shuffleSelf.js';\n\n/**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\nfunction arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n}\n\nexport default arrayShuffle;\n", "import shuffleSelf from './_shuffleSelf.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\nfunction baseShuffle(collection) {\n return shuffleSelf(values(collection));\n}\n\nexport default baseShuffle;\n", "import arrayShuffle from './_arrayShuffle.js';\nimport baseShuffle from './_baseShuffle.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\nfunction shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n}\n\nexport default shuffle;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport stringSize from './_stringSize.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nexport default size;\n", "import baseSlice from './_baseSlice.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n}\n\nexport default slice;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\nvar snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n});\n\nexport default snakeCase;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nexport default baseSome;\n", "import arraySome from './_arraySome.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseSome from './_baseSome.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default some;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseOrderBy from './_baseOrderBy.js';\nimport baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nexport default sortBy;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor,\n nativeMin = Math.min;\n\n/**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\nfunction baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n}\n\nexport default baseSortedIndexBy;\n", "import baseSortedIndexBy from './_baseSortedIndexBy.js';\nimport identity from './identity.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n/**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\nfunction baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n}\n\nexport default baseSortedIndex;\n", "import baseSortedIndex from './_baseSortedIndex.js';\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\nfunction sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n}\n\nexport default sortedIndex;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedIndexBy from './_baseSortedIndexBy.js';\n\n/**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\nfunction sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));\n}\n\nexport default sortedIndexBy;\n", "import baseSortedIndex from './_baseSortedIndex.js';\nimport eq from './eq.js';\n\n/**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\nfunction sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default sortedIndexOf;\n", "import baseSortedIndex from './_baseSortedIndex.js';\n\n/**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\nfunction sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n}\n\nexport default sortedLastIndex;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedIndexBy from './_baseSortedIndexBy.js';\n\n/**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\nfunction sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);\n}\n\nexport default sortedLastIndexBy;\n", "import baseSortedIndex from './_baseSortedIndex.js';\nimport eq from './eq.js';\n\n/**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\nfunction sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default sortedLastIndexOf;\n", "import eq from './eq.js';\n\n/**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n}\n\nexport default baseSortedUniq;\n", "import baseSortedUniq from './_baseSortedUniq.js';\n\n/**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\nfunction sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n}\n\nexport default sortedUniq;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedUniq from './_baseSortedUniq.js';\n\n/**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\nfunction sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, baseIteratee(iteratee, 2))\n : [];\n}\n\nexport default sortedUniqBy;\n", "import baseToString from './_baseToString.js';\nimport castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport isRegExp from './isRegExp.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\nfunction split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n}\n\nexport default split;\n", "import apply from './_apply.js';\nimport arrayPush from './_arrayPush.js';\nimport baseRest from './_baseRest.js';\nimport castSlice from './_castSlice.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\nfunction spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n}\n\nexport default spread;\n", "import createCompounder from './_createCompounder.js';\nimport upperFirst from './upperFirst.js';\n\n/**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\nvar startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n});\n\nexport default startCase;\n", "import baseClamp from './_baseClamp.js';\nimport baseToString from './_baseToString.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\nfunction startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n}\n\nexport default startsWith;\n", "/**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\nfunction stubObject() {\n return {};\n}\n\nexport default stubObject;\n", "/**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\nfunction stubString() {\n return '';\n}\n\nexport default stubString;\n", "/**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\nfunction stubTrue() {\n return true;\n}\n\nexport default stubTrue;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\nvar subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n}, 0);\n\nexport default subtract;\n", "import baseSum from './_baseSum.js';\nimport identity from './identity.js';\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nexport default sum;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSum from './_baseSum.js';\n\n/**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\nfunction sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, baseIteratee(iteratee, 2))\n : 0;\n}\n\nexport default sumBy;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\nfunction tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n}\n\nexport default tail;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default take;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\nfunction takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default takeRight;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\nfunction takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), false, true)\n : [];\n}\n\nexport default takeRightWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\nfunction takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3))\n : [];\n}\n\nexport default takeWhile;\n", "/**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\nfunction tap(value, interceptor) {\n interceptor(value);\n return value;\n}\n\nexport default tap;\n", "import eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n}\n\nexport default customDefaultsAssignIn;\n", "/** Used to escape characters for inclusion in compiled string literals. */\nvar stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\n/**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nfunction escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n}\n\nexport default escapeStringChar;\n", "/** Used to match template delimiters. */\nvar reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\nexport default reInterpolate;\n", "/** Used to match template delimiters. */\nvar reEscape = /<%-([\\s\\S]+?)%>/g;\n\nexport default reEscape;\n", "/** Used to match template delimiters. */\nvar reEvaluate = /<%([\\s\\S]+?)%>/g;\n\nexport default reEvaluate;\n", "import escape from './escape.js';\nimport reEscape from './_reEscape.js';\nimport reEvaluate from './_reEvaluate.js';\nimport reInterpolate from './_reInterpolate.js';\n\n/**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\nvar templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': { 'escape': escape }\n }\n};\n\nexport default templateSettings;\n", "import assignInWith from './assignInWith.js';\nimport attempt from './attempt.js';\nimport baseValues from './_baseValues.js';\nimport customDefaultsAssignIn from './_customDefaultsAssignIn.js';\nimport escapeStringChar from './_escapeStringChar.js';\nimport isError from './isError.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keys from './keys.js';\nimport reInterpolate from './_reInterpolate.js';\nimport templateSettings from './templateSettings.js';\nimport toString from './toString.js';\n\n/** Error message constants. */\nvar INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n/** Used to match empty string literals in compiled template source. */\nvar reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n/**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\nvar reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n/**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\nvar reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n/** Used to ensure capturing order of template delimiters. */\nvar reNoMatch = /($^)/;\n\n/** Used to match unescaped characters in compiled string literals. */\nvar reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\n", "import { withInstall } from '@element-plus/utils'\n\nimport Affix from './src/affix.vue'\n\nexport const ElAffix = withInstall(Affix)\nexport default ElAffix\n\nexport * from './src/affix'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Icon from './icon.vue'\n\nexport const iconProps = buildProps({\n /**\n * @description SVG icon size, size x size\n */\n size: {\n type: definePropType([Number, String]),\n },\n /**\n * @description SVG tag's fill attribute\n */\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes\nexport type IconInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Icon from './src/icon.vue'\n\nexport const ElIcon = withInstall(Icon)\nexport default ElIcon\n\nexport * from './src/icon'\n", "import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Alert from './src/alert.vue'\n\nexport const ElAlert = withInstall(Alert)\nexport default ElAlert\n\nexport * from './src/alert'\nexport type { AlertInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { FormContext, FormItemContext } from './types'\n\nexport const formContextKey: InjectionKey =\n Symbol('formContextKey')\nexport const formItemContextKey: InjectionKey =\n Symbol('formItemContextKey')\n", "import { computed, inject, ref, unref } from 'vue'\nimport { useGlobalSize, useProp } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport const useFormSize = (\n fallback?: MaybeRef,\n ignore: Partial> = {}\n) => {\n const emptyRef = ref(undefined)\n\n const size = ignore.prop ? emptyRef : useProp('size')\n const globalConfig = ignore.global ? emptyRef : useGlobalSize()\n const form = ignore.form\n ? { size: undefined }\n : inject(formContextKey, undefined)\n const formItem = ignore.formItem\n ? { size: undefined }\n : inject(formItemContextKey, undefined)\n\n return computed(\n (): ComponentSize =>\n size.value ||\n unref(fallback) ||\n formItem?.size ||\n form?.size ||\n globalConfig.value ||\n ''\n )\n}\n\nexport const useFormDisabled = (fallback?: MaybeRef) => {\n const disabled = useProp('disabled')\n const form = inject(formContextKey, undefined)\n return computed(\n () => disabled.value || unref(fallback) || form?.disabled || false\n )\n}\n\n// These exports are used for preventing breaking changes\nexport const useSize = useFormSize\nexport const useDisabled = useFormDisabled\n", "import {\n computed,\n inject,\n onMounted,\n onUnmounted,\n ref,\n toRef,\n watch,\n} from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComputedRef, Ref, WatchStopHandle } from 'vue'\nimport type { FormItemContext } from '../types'\n\nexport const useFormItem = () => {\n const form = inject(formContextKey, undefined)\n const formItem = inject(formItemContextKey, undefined)\n return {\n form,\n formItem,\n }\n}\n\nexport type IUseFormItemInputCommonProps = {\n id?: string\n label?: string | number | boolean | Record\n}\n\nexport const useFormItemInputId = (\n props: Partial,\n {\n formItemContext,\n disableIdGeneration,\n disableIdManagement,\n }: {\n formItemContext?: FormItemContext\n disableIdGeneration?: ComputedRef | Ref\n disableIdManagement?: ComputedRef | Ref\n }\n) => {\n if (!disableIdGeneration) {\n disableIdGeneration = ref(false)\n }\n if (!disableIdManagement) {\n disableIdManagement = ref(false)\n }\n\n const inputId = ref()\n let idUnwatch: WatchStopHandle | undefined = undefined\n\n const isLabeledByFormItem = computed(() => {\n return !!(\n !props.label &&\n formItemContext &&\n formItemContext.inputIds &&\n formItemContext.inputIds?.length <= 1\n )\n })\n\n // Generate id for ElFormItem label if not provided as prop\n onMounted(() => {\n idUnwatch = watch(\n [toRef(props, 'id'), disableIdGeneration] as any,\n ([id, disableIdGeneration]: [string, boolean]) => {\n const newId = id ?? (!disableIdGeneration ? useId().value : undefined)\n if (newId !== inputId.value) {\n if (formItemContext?.removeInputId) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n if (!disableIdManagement?.value && !disableIdGeneration && newId) {\n formItemContext.addInputId(newId)\n }\n }\n inputId.value = newId\n }\n },\n { immediate: true }\n )\n })\n\n onUnmounted(() => {\n idUnwatch && idUnwatch()\n if (formItemContext?.removeInputId) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n }\n })\n\n return {\n isLabeledByFormItem,\n inputId,\n }\n}\n", "import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nconst formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes\nexport type FormMetaProps = ExtractPropTypes\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n", "import { computed, ref } from 'vue'\nimport { debugWarn, ensureArray } from '@element-plus/utils'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemContext } from './types'\nimport type { FormItemProp } from './form-item'\n\nconst SCOPE = 'ElForm'\n\nexport function useFormLabelWidth() {\n const potentialLabelWidthArr = ref([])\n\n const autoLabelWidth = computed(() => {\n if (!potentialLabelWidthArr.value.length) return '0'\n const max = Math.max(...potentialLabelWidthArr.value)\n return max ? `${max}px` : ''\n })\n\n function getLabelWidthIndex(width: number) {\n const index = potentialLabelWidthArr.value.indexOf(width)\n if (index === -1 && autoLabelWidth.value === '0') {\n debugWarn(SCOPE, `unexpected width ${width}`)\n }\n return index\n }\n\n function registerLabelWidth(val: number, oldVal: number) {\n if (val && oldVal) {\n const index = getLabelWidthIndex(oldVal)\n potentialLabelWidthArr.value.splice(index, 1, val)\n } else if (val) {\n potentialLabelWidthArr.value.push(val)\n }\n }\n\n function deregisterLabelWidth(val: number) {\n const index = getLabelWidthIndex(val)\n if (index > -1) {\n potentialLabelWidthArr.value.splice(index, 1)\n }\n }\n\n return {\n autoLabelWidth,\n registerLabelWidth,\n deregisterLabelWidth,\n }\n}\n\nexport const filterFields = (\n fields: FormItemContext[],\n props: Arrayable\n) => {\n const normalized = ensureArray(props)\n return normalized.length > 0\n ? fields.filter((field) => field.prop && normalized.includes(field.prop))\n : fields\n}\n", "\n\n\n", "/* eslint no-console:0 */\n\nimport {\n ValidateError,\n ValidateOption,\n RuleValuePackage,\n InternalRuleItem,\n SyncErrorType,\n RuleType,\n Value,\n Values,\n} from './interface';\n\nconst formatRegExp = /%[sdj%]/g;\n\ndeclare var ASYNC_VALIDATOR_NO_WARNING;\n\nexport let warning: (type: string, errors: SyncErrorType[]) => void = () => {};\n\n// don't print warning message when in production env or node runtime\nif (\n typeof process !== 'undefined' &&\n process.env &&\n process.env.NODE_ENV !== 'production' &&\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n) {\n warning = (type, errors) => {\n if (\n typeof console !== 'undefined' &&\n console.warn &&\n typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined'\n ) {\n if (errors.every(e => typeof e === 'string')) {\n console.warn(type, errors);\n }\n }\n };\n}\n\nexport function convertFieldsError(\n errors: ValidateError[],\n): Record {\n if (!errors || !errors.length) return null;\n const fields = {};\n errors.forEach(error => {\n const field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\n\nexport function format(\n template: ((...args: any[]) => string) | string,\n ...args: any[]\n): string {\n let i = 0;\n const len = args.length;\n if (typeof template === 'function') {\n return template.apply(null, args);\n }\n if (typeof template === 'string') {\n let str = template.replace(formatRegExp, x => {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return (Number(args[i++]) as unknown) as string;\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return template;\n}\n\nfunction isNativeStringType(type: string) {\n return (\n type === 'string' ||\n type === 'url' ||\n type === 'hex' ||\n type === 'email' ||\n type === 'date' ||\n type === 'pattern'\n );\n}\n\nexport function isEmptyValue(value: Value, type?: string) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\n\nexport function isEmptyObject(obj: object) {\n return Object.keys(obj).length === 0;\n}\n\nfunction asyncParallelArray(\n arr: RuleValuePackage[],\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n) {\n const results: ValidateError[] = [];\n let total = 0;\n const arrLength = arr.length;\n\n function count(errors: ValidateError[]) {\n results.push(...(errors || []));\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n\n arr.forEach(a => {\n func(a, count);\n });\n}\n\nfunction asyncSerialArray(\n arr: RuleValuePackage[],\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n) {\n let index = 0;\n const arrLength = arr.length;\n\n function next(errors: ValidateError[]) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n const original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n\n next([]);\n}\n\nfunction flattenObjArr(objArr: Record) {\n const ret: RuleValuePackage[] = [];\n Object.keys(objArr).forEach(k => {\n ret.push(...(objArr[k] || []));\n });\n return ret;\n}\n\nexport class AsyncValidationError extends Error {\n errors: ValidateError[];\n fields: Record;\n\n constructor(\n errors: ValidateError[],\n fields: Record,\n ) {\n super('Async Validation Error');\n this.errors = errors;\n this.fields = fields;\n }\n}\n\ntype ValidateFunc = (\n data: RuleValuePackage,\n doIt: (errors: ValidateError[]) => void,\n) => void;\n\nexport function asyncMap(\n objArr: Record,\n option: ValidateOption,\n func: ValidateFunc,\n callback: (errors: ValidateError[]) => void,\n source: Values,\n): Promise {\n if (option.first) {\n const pending = new Promise((resolve, reject) => {\n const next = (errors: ValidateError[]) => {\n callback(errors);\n return errors.length\n ? reject(new AsyncValidationError(errors, convertFieldsError(errors)))\n : resolve(source);\n };\n const flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n pending.catch(e => e);\n return pending;\n }\n const firstFields =\n option.firstFields === true\n ? Object.keys(objArr)\n : option.firstFields || [];\n\n const objArrKeys = Object.keys(objArr);\n const objArrLength = objArrKeys.length;\n let total = 0;\n const results: ValidateError[] = [];\n const pending = new Promise((resolve, reject) => {\n const next = (errors: ValidateError[]) => {\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length\n ? reject(\n new AsyncValidationError(results, convertFieldsError(results)),\n )\n : resolve(source);\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n objArrKeys.forEach(key => {\n const arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(e => e);\n return pending;\n}\n\nfunction isErrorObj(\n obj: ValidateError | string | (() => string),\n): obj is ValidateError {\n return !!(obj && (obj as ValidateError).message !== undefined);\n}\n\nfunction getValue(value: Values, path: string[]) {\n let v = value;\n for (let i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n v = v[path[i]];\n }\n return v;\n}\n\nexport function complementError(rule: InternalRuleItem, source: Values) {\n return (oe: ValidateError | (() => string) | string): ValidateError => {\n let fieldValue;\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[(oe as any).field || rule.fullField];\n }\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue,\n field: ((oe as unknown) as ValidateError).field || rule.fullField,\n };\n };\n}\n\nexport function deepMerge(target: T, source: Partial): T {\n if (source) {\n for (const s in source) {\n if (source.hasOwnProperty(s)) {\n const value = source[s];\n if (typeof value === 'object' && typeof target[s] === 'object') {\n target[s] = {\n ...target[s],\n ...value,\n };\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}\n", "import { ExecuteRule } from '../interface';\nimport { format, isEmptyValue } from '../util';\n\nconst required: ExecuteRule = (rule, value, source, errors, options, type) => {\n if (\n rule.required &&\n (!source.hasOwnProperty(rule.field) ||\n isEmptyValue(value, type || rule.type))\n ) {\n errors.push(format(options.messages.required, rule.fullField));\n }\n};\n\nexport default required;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nconst whitespace: ExecuteRule = (rule, value, source, errors, options) => {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(format(options.messages.whitespace, rule.fullField));\n }\n};\n\nexport default whitespace;\n", "// https://github.com/kevva/url-regex/blob/master/index.js\nlet urlReg: RegExp;\n\nexport default () => {\n if (urlReg) {\n return urlReg;\n }\n\n const word = '[a-fA-F\\\\d:]';\n const b = options =>\n options && options.includeBoundaries\n ? `(?:(?<=\\\\s|^)(?=${word})|(?<=${word})(?=\\\\s|$))`\n : '';\n\n const v4 =\n '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n\n const v6seg = '[a-fA-F\\\\d]{1,4}';\n const v6 = `\n(?:\n(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`\n .replace(/\\s*\\/\\/.*$/gm, '')\n .replace(/\\n/g, '')\n .trim();\n\n // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);\n const v4exact = new RegExp(`^${v4}$`);\n const v6exact = new RegExp(`^${v6}$`);\n\n const ip = options =>\n options && options.exact\n ? v46Exact\n : new RegExp(\n `(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(\n options,\n )})`,\n 'g',\n );\n\n ip.v4 = (options?) =>\n options && options.exact\n ? v4exact\n : new RegExp(`${b(options)}${v4}${b(options)}`, 'g');\n ip.v6 = (options?) =>\n options && options.exact\n ? v6exact\n : new RegExp(`${b(options)}${v6}${b(options)}`, 'g');\n\n const protocol = `(?:(?:[a-z]+:)?//)`;\n const auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n const ipv4 = ip.v4().source;\n const ipv6 = ip.v6().source;\n const host = '(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)';\n const domain =\n '(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*';\n const tld = `(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))`;\n const port = '(?::\\\\d{2,5})?';\n const path = '(?:[/?#][^\\\\s\"]*)?';\n const regex = `(?:${protocol}|www\\\\.)${auth}(?:localhost|${ipv4}|${ipv6}|${host}${domain}${tld})${port}${path}`;\n urlReg = new RegExp(`(?:^${regex}$)`, 'i');\n return urlReg;\n};\n", "import { ExecuteRule, Value } from '../interface';\nimport { format } from '../util';\nimport required from './required';\nimport getUrlRegex from './url';\n/* eslint max-len:0 */\n\nconst pattern = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,\n // url: new RegExp(\n // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n // 'i',\n // ),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,\n};\n\nconst types = {\n integer(value: Value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n float(value: Value) {\n return types.number(value) && !types.integer(value);\n },\n array(value: Value) {\n return Array.isArray(value);\n },\n regexp(value: Value) {\n if (value instanceof RegExp) {\n return true;\n }\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date(value: Value) {\n return (\n typeof value.getTime === 'function' &&\n typeof value.getMonth === 'function' &&\n typeof value.getYear === 'function' &&\n !isNaN(value.getTime())\n );\n },\n number(value: Value) {\n if (isNaN(value)) {\n return false;\n }\n return typeof value === 'number';\n },\n object(value: Value) {\n return typeof value === 'object' && !types.array(value);\n },\n method(value: Value) {\n return typeof value === 'function';\n },\n email(value: Value) {\n return (\n typeof value === 'string' &&\n value.length <= 320 &&\n !!value.match(pattern.email)\n );\n },\n url(value: Value) {\n return (\n typeof value === 'string' &&\n value.length <= 2048 &&\n !!value.match(getUrlRegex())\n );\n },\n hex(value: Value) {\n return typeof value === 'string' && !!value.match(pattern.hex);\n },\n};\n\nconst type: ExecuteRule = (rule, value, source, errors, options) => {\n if (rule.required && value === undefined) {\n required(rule, value, source, errors, options);\n return;\n }\n const custom = [\n 'integer',\n 'float',\n 'array',\n 'regexp',\n 'object',\n 'method',\n 'email',\n 'number',\n 'date',\n 'url',\n 'hex',\n ];\n const ruleType = rule.type;\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(\n format(options.messages.types[ruleType], rule.fullField, rule.type),\n );\n }\n // straight typeof check\n } else if (ruleType && typeof value !== rule.type) {\n errors.push(\n format(options.messages.types[ruleType], rule.fullField, rule.type),\n );\n }\n};\n\nexport default type;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst range: ExecuteRule = (rule, value, source, errors, options) => {\n const len = typeof rule.len === 'number';\n const min = typeof rule.min === 'number';\n const max = typeof rule.max === 'number';\n // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n const spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n let val = value;\n let key = null;\n const num = typeof value === 'number';\n const str = typeof value === 'string';\n const arr = Array.isArray(value);\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n }\n // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n if (!key) {\n return false;\n }\n if (arr) {\n val = value.length;\n }\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".lenght !== 3\n val = value.replace(spRegexp, '_').length;\n }\n if (len) {\n if (val !== rule.len) {\n errors.push(format(options.messages[key].len, rule.fullField, rule.len));\n }\n } else if (min && !max && val < rule.min) {\n errors.push(format(options.messages[key].min, rule.fullField, rule.min));\n } else if (max && !min && val > rule.max) {\n errors.push(format(options.messages[key].max, rule.fullField, rule.max));\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(\n format(options.messages[key].range, rule.fullField, rule.min, rule.max),\n );\n }\n};\n\nexport default range;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst ENUM = 'enum' as const;\n\nconst enumerable: ExecuteRule = (rule, value, source, errors, options) => {\n rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];\n if (rule[ENUM].indexOf(value) === -1) {\n errors.push(\n format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')),\n );\n }\n};\n\nexport default enumerable;\n", "import { ExecuteRule } from '../interface';\nimport { format } from '../util';\n\nconst pattern: ExecuteRule = (rule, value, source, errors, options) => {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(\n format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n } else if (typeof rule.pattern === 'string') {\n const _pattern = new RegExp(rule.pattern);\n if (!_pattern.test(value)) {\n errors.push(\n format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n }\n }\n};\n\nexport default pattern;\n", "import required from './required';\nimport whitespace from './whitespace';\nimport type from './type';\nimport range from './range';\nimport enumRule from './enum';\nimport pattern from './pattern';\n\nexport default {\n required,\n whitespace,\n type,\n range,\n enum: enumRule,\n pattern,\n};\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst string: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'string');\n if (!isEmptyValue(value, 'string')) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n rules.pattern(rule, value, source, errors, options);\n if (rule.whitespace === true) {\n rules.whitespace(rule, value, source, errors, options);\n }\n }\n }\n callback(errors);\n};\n\nexport default string;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst method: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default method;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst number: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (value === '') {\n value = undefined;\n }\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default number;\n", "import { isEmptyValue } from '../util';\nimport rules from '../rule';\nimport { ExecuteValidator } from '../interface';\n\nconst boolean: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default boolean;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst regexp: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default regexp;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst integer: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default integer;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst floatFn: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default floatFn;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule/index';\n\nconst array: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if ((value === undefined || value === null) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'array');\n if (value !== undefined && value !== null) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default array;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst object: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default object;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst ENUM = 'enum' as const;\n\nconst enumerable: ExecuteValidator = (\n rule,\n value,\n callback,\n source,\n options,\n) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules[ENUM](rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default enumerable;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst pattern: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'string')) {\n rules.pattern(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default pattern;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst date: ExecuteValidator = (rule, value, callback, source, options) => {\n // console.log('integer rule called %j', rule);\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n // console.log('validate on %s value', value);\n if (validate) {\n if (isEmptyValue(value, 'date') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'date')) {\n let dateObject;\n\n if (value instanceof Date) {\n dateObject = value;\n } else {\n dateObject = new Date(value);\n }\n\n rules.type(rule, dateObject, source, errors, options);\n if (dateObject) {\n rules.range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n callback(errors);\n};\n\nexport default date;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\n\nconst required: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const type = Array.isArray(value) ? 'array' : typeof value;\n rules.required(rule, value, source, errors, options, type);\n callback(errors);\n};\n\nexport default required;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst type: ExecuteValidator = (rule, value, callback, source, options) => {\n const ruleType = rule.type;\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, ruleType) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, ruleType);\n if (!isEmptyValue(value, ruleType)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n};\n\nexport default type;\n", "import { ExecuteValidator } from '../interface';\nimport rules from '../rule';\nimport { isEmptyValue } from '../util';\n\nconst any: ExecuteValidator = (rule, value, callback, source, options) => {\n const errors: string[] = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n }\n callback(errors);\n};\n\nexport default any;\n", "import string from './string';\nimport method from './method';\nimport number from './number';\nimport boolean from './boolean';\nimport regexp from './regexp';\nimport integer from './integer';\nimport float from './float';\nimport array from './array';\nimport object from './object';\nimport enumValidator from './enum';\nimport pattern from './pattern';\nimport date from './date';\nimport required from './required';\nimport type from './type';\nimport any from './any';\n\nexport default {\n string,\n method,\n number,\n boolean,\n regexp,\n integer,\n float,\n array,\n object,\n enum: enumValidator,\n pattern,\n date,\n url: type,\n hex: type,\n email: type,\n required,\n any,\n};\n", "import { InternalValidateMessages } from './interface';\n\nexport function newMessages(): InternalValidateMessages {\n return {\n default: 'Validation error on field %s',\n required: '%s is required',\n enum: '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid',\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n boolean: '%s is not a %s',\n integer: '%s is not an %s',\n float: '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s',\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters',\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s',\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length',\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s',\n },\n clone() {\n const cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n },\n };\n}\n\nexport const messages = newMessages();\n", "import {\n format,\n complementError,\n asyncMap,\n warning,\n deepMerge,\n convertFieldsError,\n} from './util';\nimport validators from './validator/index';\nimport { messages as defaultMessages, newMessages } from './messages';\nimport {\n InternalRuleItem,\n InternalValidateMessages,\n Rule,\n RuleItem,\n Rules,\n ValidateCallback,\n ValidateMessages,\n ValidateOption,\n Values,\n RuleValuePackage,\n ValidateError,\n ValidateFieldsError,\n SyncErrorType,\n ValidateResult,\n} from './interface';\n\nexport * from './interface';\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\nclass Schema {\n // ========================= Static =========================\n static register = function register(type: string, validator) {\n if (typeof validator !== 'function') {\n throw new Error(\n 'Cannot register a validator by type, validator is not a function',\n );\n }\n validators[type] = validator;\n };\n\n static warning = warning;\n\n static messages = defaultMessages;\n\n static validators = validators;\n\n // ======================== Instance ========================\n rules: Record = null;\n _messages: InternalValidateMessages = defaultMessages;\n\n constructor(descriptor: Rules) {\n this.define(descriptor);\n }\n\n define(rules: Rules) {\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n if (typeof rules !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n this.rules = {};\n\n Object.keys(rules).forEach(name => {\n const item: Rule = rules[name];\n this.rules[name] = Array.isArray(item) ? item : [item];\n });\n }\n\n messages(messages?: ValidateMessages) {\n if (messages) {\n this._messages = deepMerge(newMessages(), messages);\n }\n return this._messages;\n }\n\n validate(\n source: Values,\n option?: ValidateOption,\n callback?: ValidateCallback,\n ): Promise;\n validate(source: Values, callback: ValidateCallback): Promise;\n validate(source: Values): Promise;\n\n validate(source_: Values, o: any = {}, oc: any = () => {}): Promise {\n let source: Values = source_;\n let options: ValidateOption = o;\n let callback: ValidateCallback = oc;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback(null, source);\n }\n return Promise.resolve(source);\n }\n\n function complete(results: (ValidateError | ValidateError[])[]) {\n let errors: ValidateError[] = [];\n let fields: ValidateFieldsError = {};\n\n function add(e: ValidateError | ValidateError[]) {\n if (Array.isArray(e)) {\n errors = errors.concat(...e);\n } else {\n errors.push(e);\n }\n }\n\n for (let i = 0; i < results.length; i++) {\n add(results[i]);\n }\n if (!errors.length) {\n callback(null, source);\n } else {\n fields = convertFieldsError(errors);\n (callback as (\n errors: ValidateError[],\n fields: ValidateFieldsError,\n ) => void)(errors, fields);\n }\n }\n\n if (options.messages) {\n let messages = this.messages();\n if (messages === defaultMessages) {\n messages = newMessages();\n }\n deepMerge(messages, options.messages);\n options.messages = messages;\n } else {\n options.messages = this.messages();\n }\n\n const series: Record = {};\n const keys = options.keys || Object.keys(this.rules);\n keys.forEach(z => {\n const arr = this.rules[z];\n let value = source[z];\n arr.forEach(r => {\n let rule: InternalRuleItem = r;\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = { ...source };\n }\n value = source[z] = rule.transform(value);\n }\n if (typeof rule === 'function') {\n rule = {\n validator: rule,\n };\n } else {\n rule = { ...rule };\n }\n\n // Fill validator. Skip if nothing need to validate\n rule.validator = this.getValidationMethod(rule);\n if (!rule.validator) {\n return;\n }\n\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = this.getType(rule);\n series[z] = series[z] || [];\n series[z].push({\n rule,\n value,\n source,\n field: z,\n });\n });\n });\n const errorFields = {};\n return asyncMap(\n series,\n options,\n (data, doIt) => {\n const rule = data.rule;\n let deep =\n (rule.type === 'object' || rule.type === 'array') &&\n (typeof rule.fields === 'object' ||\n typeof rule.defaultField === 'object');\n deep = deep && (rule.required || (!rule.required && data.value));\n rule.field = data.field;\n\n function addFullField(key: string, schema: RuleItem) {\n return {\n ...schema,\n fullField: `${rule.fullField}.${key}`,\n fullFields: rule.fullFields ? [...rule.fullFields, key] : [key],\n };\n }\n\n function cb(e: SyncErrorType | SyncErrorType[] = []) {\n let errorList = Array.isArray(e) ? e : [e];\n if (!options.suppressWarning && errorList.length) {\n Schema.warning('async-validator:', errorList);\n }\n if (errorList.length && rule.message !== undefined) {\n errorList = [].concat(rule.message);\n }\n\n // Fill error info\n let filledErrors = errorList.map(complementError(rule, source));\n\n if (options.first && filledErrors.length) {\n errorFields[rule.field] = 1;\n return doIt(filledErrors);\n }\n if (!deep) {\n doIt(filledErrors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message !== undefined) {\n filledErrors = []\n .concat(rule.message)\n .map(complementError(rule, source));\n } else if (options.error) {\n filledErrors = [\n options.error(\n rule,\n format(options.messages.required, rule.field),\n ),\n ];\n }\n return doIt(filledErrors);\n }\n\n let fieldsSchema: Record = {};\n if (rule.defaultField) {\n Object.keys(data.value).map(key => {\n fieldsSchema[key] = rule.defaultField;\n });\n }\n fieldsSchema = {\n ...fieldsSchema,\n ...data.rule.fields,\n };\n\n const paredFieldsSchema: Record = {};\n\n Object.keys(fieldsSchema).forEach(field => {\n const fieldSchema = fieldsSchema[field];\n const fieldSchemaList = Array.isArray(fieldSchema)\n ? fieldSchema\n : [fieldSchema];\n paredFieldsSchema[field] = fieldSchemaList.map(\n addFullField.bind(null, field),\n );\n });\n const schema = new Schema(paredFieldsSchema);\n schema.messages(options.messages);\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n schema.validate(data.value, data.rule.options || options, errs => {\n const finalErrors = [];\n if (filledErrors && filledErrors.length) {\n finalErrors.push(...filledErrors);\n }\n if (errs && errs.length) {\n finalErrors.push(...errs);\n }\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n\n let res: ValidateResult;\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n try {\n res = rule.validator(rule, data.value, cb, data.source, options);\n } catch (error) {\n console.error?.(error);\n // rethrow to report error\n if (!options.suppressValidatorError) {\n setTimeout(() => {\n throw error;\n }, 0);\n }\n cb(error.message);\n }\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(\n typeof rule.message === 'function'\n ? rule.message(rule.fullField || rule.field)\n : rule.message || `${rule.fullField || rule.field} fails`,\n );\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n if (res && (res as Promise).then) {\n (res as Promise).then(\n () => cb(),\n e => cb(e),\n );\n }\n },\n results => {\n complete(results);\n },\n source,\n );\n }\n\n getType(rule: InternalRuleItem) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n if (\n typeof rule.validator !== 'function' &&\n rule.type &&\n !validators.hasOwnProperty(rule.type)\n ) {\n throw new Error(format('Unknown rule type %s', rule.type));\n }\n return rule.type || 'string';\n }\n\n getValidationMethod(rule: InternalRuleItem) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n const keys = Object.keys(rule);\n const messageIndex = keys.indexOf('message');\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n if (keys.length === 1 && keys[0] === 'required') {\n return validators.required;\n }\n return validators[this.getType(rule)] || undefined;\n }\n}\n\nexport default Schema;\n", "import { componentSizes } from '@element-plus/constants'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemRule } from './types'\n\nexport const formItemValidateStates = [\n '',\n 'error',\n 'validating',\n 'success',\n] as const\nexport type FormItemValidateState = typeof formItemValidateStates[number]\n\nexport type FormItemProp = Arrayable\n\nexport const formItemProps = buildProps({\n /**\n * @description Label text.\n */\n label: String,\n /**\n * @description Width of label, e.g. `'50px'`. `'auto'` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description A key of `model`. It could be an array of property paths (e.g `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required.\n */\n prop: {\n type: definePropType([String, Array]),\n },\n /**\n * @description Whether the field is required or not, will be determined by validation rules if omitted.\n */\n required: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator).\n */\n rules: {\n type: definePropType>([Object, Array]),\n },\n /**\n * @description Field error message, set its value and the field will validate error and show this message immediately.\n */\n error: String,\n /**\n * @description Validation state of formItem.\n */\n validateStatus: {\n type: String,\n values: formItemValidateStates,\n },\n /**\n * @description Same as for in native label.\n */\n for: String,\n /**\n * @description Inline style validate message.\n */\n inlineMessage: {\n type: [String, Boolean],\n default: '',\n },\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Control the size of components in this form-item.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\nexport type FormItemProps = ExtractPropTypes\n", "import {\n Fragment,\n computed,\n defineComponent,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { formContextKey, formItemContextKey } from './constants'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElLabelWrap'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: {\n isAutoWidth: Boolean,\n updateAll: Boolean,\n },\n\n setup(props, { slots }) {\n const formContext = inject(formContextKey, undefined)\n const formItemContext = inject(formItemContextKey)\n if (!formItemContext)\n throwError(\n COMPONENT_NAME,\n 'usage: '\n )\n\n const ns = useNamespace('form')\n\n const el = ref()\n const computedWidth = ref(0)\n\n const getLabelWidth = () => {\n if (el.value?.firstElementChild) {\n const width = window.getComputedStyle(el.value.firstElementChild).width\n return Math.ceil(Number.parseFloat(width))\n } else {\n return 0\n }\n }\n\n const updateLabelWidth = (action: 'update' | 'remove' = 'update') => {\n nextTick(() => {\n if (slots.default && props.isAutoWidth) {\n if (action === 'update') {\n computedWidth.value = getLabelWidth()\n } else if (action === 'remove') {\n formContext?.deregisterLabelWidth(computedWidth.value)\n }\n }\n })\n }\n const updateLabelWidthFn = () => updateLabelWidth('update')\n\n onMounted(() => {\n updateLabelWidthFn()\n })\n onBeforeUnmount(() => {\n updateLabelWidth('remove')\n })\n onUpdated(() => updateLabelWidthFn())\n\n watch(computedWidth, (val, oldVal) => {\n if (props.updateAll) {\n formContext?.registerLabelWidth(val, oldVal)\n }\n })\n\n useResizeObserver(\n computed(\n () => (el.value?.firstElementChild ?? null) as HTMLElement | null\n ),\n updateLabelWidthFn\n )\n\n return () => {\n if (!slots) return null\n\n const { isAutoWidth } = props\n if (isAutoWidth) {\n const autoLabelWidth = formContext?.autoLabelWidth\n const hasLabel = formItemContext?.hasLabel\n const style: CSSProperties = {}\n if (hasLabel && autoLabelWidth && autoLabelWidth !== 'auto') {\n const marginWidth = Math.max(\n 0,\n Number.parseInt(autoLabelWidth, 10) - computedWidth.value\n )\n const marginPosition =\n formContext.labelPosition === 'left' ? 'marginRight' : 'marginLeft'\n if (marginWidth) {\n style[marginPosition] = `${marginWidth}px`\n }\n }\n return (\n
\n {slots.default?.()}\n
\n )\n } else {\n return {slots.default?.()}\n }\n }\n },\n})\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType\nexport type FormItemInstance = InstanceType\n", "import { isFirefox, isNumber } from '@element-plus/utils'\n\nlet hiddenTextarea: HTMLTextAreaElement | undefined = undefined\n\nconst HIDDEN_STYLE = `\n height:0 !important;\n visibility:hidden !important;\n ${isFirefox() ? '' : 'overflow:hidden !important;'}\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n`\n\nconst CONTEXT_STYLE = [\n 'letter-spacing',\n 'line-height',\n 'padding-top',\n 'padding-bottom',\n 'font-family',\n 'font-weight',\n 'font-size',\n 'text-rendering',\n 'text-transform',\n 'width',\n 'text-indent',\n 'padding-left',\n 'padding-right',\n 'border-width',\n 'box-sizing',\n]\n\ntype NodeStyle = {\n contextStyle: string\n boxSizing: string\n paddingSize: number\n borderSize: number\n}\n\ntype TextAreaHeight = {\n height: string\n minHeight?: string\n}\n\nfunction calculateNodeStyling(targetElement: Element): NodeStyle {\n const style = window.getComputedStyle(targetElement)\n\n const boxSizing = style.getPropertyValue('box-sizing')\n\n const paddingSize =\n Number.parseFloat(style.getPropertyValue('padding-bottom')) +\n Number.parseFloat(style.getPropertyValue('padding-top'))\n\n const borderSize =\n Number.parseFloat(style.getPropertyValue('border-bottom-width')) +\n Number.parseFloat(style.getPropertyValue('border-top-width'))\n\n const contextStyle = CONTEXT_STYLE.map(\n (name) => `${name}:${style.getPropertyValue(name)}`\n ).join(';')\n\n return { contextStyle, paddingSize, borderSize, boxSizing }\n}\n\nexport function calcTextareaHeight(\n targetElement: HTMLTextAreaElement,\n minRows = 1,\n maxRows?: number\n): TextAreaHeight {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea')\n document.body.appendChild(hiddenTextarea)\n }\n\n const { paddingSize, borderSize, boxSizing, contextStyle } =\n calculateNodeStyling(targetElement)\n\n hiddenTextarea.setAttribute('style', `${contextStyle};${HIDDEN_STYLE}`)\n hiddenTextarea.value = targetElement.value || targetElement.placeholder || ''\n\n let height = hiddenTextarea.scrollHeight\n const result = {} as TextAreaHeight\n\n if (boxSizing === 'border-box') {\n height = height + borderSize\n } else if (boxSizing === 'content-box') {\n height = height - paddingSize\n }\n\n hiddenTextarea.value = ''\n const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize\n\n if (isNumber(minRows)) {\n let minHeight = singleRowHeight * minRows\n if (boxSizing === 'border-box') {\n minHeight = minHeight + paddingSize + borderSize\n }\n height = Math.max(minHeight, height)\n result.minHeight = `${minHeight}px`\n }\n if (isNumber(maxRows)) {\n let maxHeight = singleRowHeight * maxRows\n if (boxSizing === 'border-box') {\n maxHeight = maxHeight + paddingSize + borderSize\n }\n height = Math.min(maxHeight, height)\n }\n result.height = `${height}px`\n hiddenTextarea.parentNode?.removeChild(hiddenTextarea)\n hiddenTextarea = undefined\n\n return result\n}\n", "import { isString } from '@vue/shared'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type Input from './input.vue'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n /**\n * @description type of input\n */\n type: {\n type: String,\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * @description native input readonly\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n /**\n * @description toggleable password input\n */\n showPassword: {\n type: Boolean,\n default: false,\n },\n /**\n * @description word count\n */\n showWordLimit: {\n type: Boolean,\n default: false,\n },\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description native input aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or textarea element style\n */\n inputStyle: {\n type: definePropType([Object, Array, String]),\n default: () => mutable({} as const),\n },\n /**\n * @description native input autofocus\n */\n autofocus: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type InputProps = ExtractPropTypes\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n\nexport type InputInstance = InstanceType\n", "\n\n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Input from './src/input.vue'\n\nexport const ElInput = withInstall(Input)\nexport default ElInput\n\nexport * from './src/input'\nexport type { InputInstance } from './src/instance'\n", "import type { CSSProperties } from 'vue'\nimport type { ThumbProps } from './thumb'\n\nexport const GAP = 4 // top 2 + bottom 2 of bar instance\n\nexport const BAR_MAP = {\n vertical: {\n offset: 'offsetHeight',\n scroll: 'scrollTop',\n scrollSize: 'scrollHeight',\n size: 'height',\n key: 'vertical',\n axis: 'Y',\n client: 'clientY',\n direction: 'top',\n },\n horizontal: {\n offset: 'offsetWidth',\n scroll: 'scrollLeft',\n scrollSize: 'scrollWidth',\n size: 'width',\n key: 'horizontal',\n axis: 'X',\n client: 'clientX',\n direction: 'left',\n },\n} as const\n\nexport const renderThumbStyle = ({\n move,\n size,\n bar,\n}: Pick & {\n bar: typeof BAR_MAP[keyof typeof BAR_MAP]\n}): CSSProperties => ({\n [bar.size]: size,\n transform: `translate${bar.axis}(${move}%)`,\n})\n", "import type { InjectionKey } from 'vue'\n\nexport interface ScrollbarContext {\n scrollbarElement: HTMLDivElement\n wrapElement: HTMLDivElement\n}\n\nexport const scrollbarContextKey: InjectionKey = Symbol(\n 'scrollbarContextKey'\n)\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Thumb from './thumb.vue'\n\nexport const thumbProps = buildProps({\n vertical: Boolean,\n size: String,\n move: Number,\n ratio: {\n type: Number,\n required: true,\n },\n always: Boolean,\n} as const)\nexport type ThumbProps = ExtractPropTypes\n\nexport type ThumbInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n width: String,\n height: String,\n ratioX: {\n type: Number,\n default: 1,\n },\n ratioY: {\n type: Number,\n default: 1,\n },\n} as const)\nexport type BarProps = ExtractPropTypes\n\nexport type BarInstance = InstanceType\n", "\n\n", "import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n} as const)\nexport type ScrollbarProps = ExtractPropTypes\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Scrollbar from './src/scrollbar.vue'\n\nexport const ElScrollbar = withInstall(Scrollbar)\nexport default ElScrollbar\n\nexport * from './src/util'\nexport * from './src/scrollbar'\nexport * from './src/thumb'\nexport * from './src/constants'\n", "import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { Instance } from '@popperjs/core'\n\nexport type Measurable = {\n getBoundingClientRect: () => DOMRect\n}\n\n/**\n * triggerRef indicates the element that triggers popper\n * contentRef indicates the element of popper content\n * referenceRef indicates the element that popper content relative with\n */\nexport type ElPopperInjectionContext = {\n triggerRef: Ref\n contentRef: Ref\n popperInstanceRef: Ref\n referenceRef: Ref\n role: ComputedRef\n}\n\nexport type ElPopperContentInjectionContext = {\n arrowRef: Ref\n arrowOffset: Ref\n arrowStyle: ComputedRef\n}\n\nexport const POPPER_INJECTION_KEY: InjectionKey =\n Symbol('popper')\n\nexport const POPPER_CONTENT_INJECTION_KEY: InjectionKey =\n Symbol('popperContent')\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Popper from './popper.vue'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const\n\nexport const roleTypes = [\n 'dialog',\n 'grid',\n 'group',\n 'listbox',\n 'menu',\n 'navigation',\n 'tooltip',\n 'tree',\n] as const\n\nexport type PopperEffect = typeof effects[number]\nexport type PopperTrigger = typeof triggers[number]\n\nexport const popperProps = buildProps({\n role: {\n type: String,\n values: roleTypes,\n default: 'tooltip',\n },\n} as const)\n\nexport type PopperProps = ExtractPropTypes\n\nexport type PopperInstance = InstanceType\n\n/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */\nexport const usePopperProps = popperProps\n\n/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperProps = PopperProps\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Arrow from './arrow.vue'\n\nexport const popperArrowProps = buildProps({\n arrowOffset: {\n type: Number,\n default: 5,\n },\n} as const)\nexport type PopperArrowProps = ExtractPropTypes\n\nexport type PopperArrowInstance = InstanceType\n\n/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */\nexport const usePopperArrowProps = popperArrowProps\n\n/** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperArrowProps = PopperArrowProps\n\n/** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowInstance = PopperArrowInstance\n", "\n\n\n", "import {\n Comment,\n Fragment,\n Text,\n cloneVNode,\n defineComponent,\n inject,\n withDirectives,\n} from 'vue'\nimport { NOOP, isObject } from '@vue/shared'\nimport {\n FORWARD_REF_INJECTION_KEY,\n useForwardRefDirective,\n useNamespace,\n} from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\n\nimport type { Ref, VNode } from 'vue'\n\nconst NAME = 'ElOnlyChild'\n\nexport const OnlyChild = defineComponent({\n name: NAME,\n setup(_, { slots, attrs }) {\n const forwardRefInjection = inject(FORWARD_REF_INJECTION_KEY)\n const forwardRefDirective = useForwardRefDirective(\n forwardRefInjection?.setForwardRef ?? NOOP\n )\n return () => {\n const defaultSlot = slots.default?.(attrs)\n if (!defaultSlot) return null\n\n if (defaultSlot.length > 1) {\n debugWarn(NAME, 'requires exact only one valid child.')\n return null\n }\n\n const firstLegitNode = findFirstLegitChild(defaultSlot)\n if (!firstLegitNode) {\n debugWarn(NAME, 'no valid child node found')\n return null\n }\n\n return withDirectives(cloneVNode(firstLegitNode!, attrs), [\n [forwardRefDirective],\n ])\n }\n },\n})\n\nfunction findFirstLegitChild(node: VNode[] | undefined): VNode | null {\n if (!node) return null\n const children = node as VNode[]\n for (const child of children) {\n /**\n * when user uses h(Fragment, [text]) to render plain string,\n * this switch case just cannot handle, when the value is primitives\n * we should just return the wrapped string\n */\n if (isObject(child)) {\n switch (child.type) {\n case Comment:\n continue\n case Text:\n case 'svg':\n return wrapTextContent(child)\n case Fragment:\n return findFirstLegitChild(child.children as VNode[])\n default:\n return child\n }\n }\n return wrapTextContent(child)\n }\n return null\n}\n\nfunction wrapTextContent(s: string | VNode) {\n const ns = useNamespace('only-child')\n return {s}\n}\n\nexport type OnlyChildExpose = {\n forwardRef: Ref\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from './constants'\nimport type Trigger from './trigger.vue'\n\nexport const popperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType(Object),\n },\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: Event) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerProps = typeof popperTriggerProps\n\nexport type PopperTriggerInstance = InstanceType\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n", "\n\n\n", "import type { InjectionKey, Ref } from 'vue'\n\nexport const FOCUS_AFTER_TRAPPED = 'focus-trap.focus-after-trapped'\nexport const FOCUS_AFTER_RELEASED = 'focus-trap.focus-after-released'\nexport const FOCUSOUT_PREVENTED = 'focus-trap.focusout-prevented'\nexport const FOCUS_AFTER_TRAPPED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\nexport const FOCUSOUT_PREVENTED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\n\nexport const ON_TRAP_FOCUS_EVT = 'focusAfterTrapped'\nexport const ON_RELEASE_FOCUS_EVT = 'focusAfterReleased'\n\nexport type FocusTrapInjectionContext = {\n focusTrapRef: Ref\n onKeydown: (e: KeyboardEvent) => void\n}\n\nexport const FOCUS_TRAP_INJECTION_KEY: InjectionKey =\n Symbol('elFocusTrap')\n", "import { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS } from './tokens'\n\nconst focusReason = ref<'pointer' | 'keyboard'>()\nconst lastUserFocusTimestamp = ref(0)\nconst lastAutomatedFocusTimestamp = ref(0)\nlet focusReasonUserCount = 0\n\nexport type FocusLayer = {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nexport type FocusStack = FocusLayer[]\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n const nodes: HTMLElement[] = []\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (\n node: Element & {\n disabled: boolean\n hidden: boolean\n type: string\n tabIndex: number\n }\n ) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP\n return node.tabIndex >= 0 || node === document.activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n },\n })\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n\n return nodes\n}\n\nexport const getVisibleElement = (\n elements: HTMLElement[],\n container: HTMLElement\n) => {\n for (const element of elements) {\n if (!isHidden(element, container)) return element\n }\n}\n\nexport const isHidden = (element: HTMLElement, container: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return false\n if (getComputedStyle(element).visibility === 'hidden') return true\n\n while (element) {\n if (container && element === container) return false\n if (getComputedStyle(element).display === 'none') return true\n element = element.parentElement as HTMLElement\n }\n\n return false\n}\n\nexport const getEdges = (container: HTMLElement) => {\n const focusable = obtainAllFocusableElements(container)\n const first = getVisibleElement(focusable, container)\n const last = getVisibleElement(focusable.reverse(), container)\n return [first, last]\n}\n\nconst isSelectable = (\n element: any\n): element is HTMLInputElement & { select: () => void } => {\n return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport const tryFocus = (\n element?: HTMLElement | { focus: () => void } | null,\n shouldSelect?: boolean\n) => {\n if (element && element.focus) {\n const prevFocusedElement = document.activeElement\n element.focus({ preventScroll: true })\n lastAutomatedFocusTimestamp.value = window.performance.now()\n if (\n element !== prevFocusedElement &&\n isSelectable(element) &&\n shouldSelect\n ) {\n element.select()\n }\n }\n}\n\nfunction removeFromStack(list: T[], item: T) {\n const copy = [...list]\n\n const idx = list.indexOf(item)\n\n if (idx !== -1) {\n copy.splice(idx, 1)\n }\n return copy\n}\n\nconst createFocusableStack = () => {\n let stack = [] as FocusStack\n\n const push = (layer: FocusLayer) => {\n const currentLayer = stack[0]\n\n if (currentLayer && layer !== currentLayer) {\n currentLayer.pause()\n }\n\n stack = removeFromStack(stack, layer)\n stack.unshift(layer)\n }\n\n const remove = (layer: FocusLayer) => {\n stack = removeFromStack(stack, layer)\n stack[0]?.resume?.()\n }\n\n return {\n push,\n remove,\n }\n}\n\nexport const focusFirstDescendant = (\n elements: HTMLElement[],\n shouldSelect = false\n) => {\n const prevFocusedElement = document.activeElement\n for (const element of elements) {\n tryFocus(element, shouldSelect)\n if (document.activeElement !== prevFocusedElement) return\n }\n}\n\nexport const focusableStack = createFocusableStack()\n\nexport const isFocusCausedByUserEvent = (): boolean => {\n return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value\n}\n\nconst notifyFocusReasonPointer = () => {\n focusReason.value = 'pointer'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nconst notifyFocusReasonKeydown = () => {\n focusReason.value = 'keyboard'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nexport const useFocusReason = (): {\n focusReason: typeof focusReason\n lastUserFocusTimestamp: typeof lastUserFocusTimestamp\n lastAutomatedFocusTimestamp: typeof lastAutomatedFocusTimestamp\n} => {\n onMounted(() => {\n if (focusReasonUserCount === 0) {\n document.addEventListener('mousedown', notifyFocusReasonPointer)\n document.addEventListener('touchstart', notifyFocusReasonPointer)\n document.addEventListener('keydown', notifyFocusReasonKeydown)\n }\n focusReasonUserCount++\n })\n\n onBeforeUnmount(() => {\n focusReasonUserCount--\n if (focusReasonUserCount <= 0) {\n document.removeEventListener('mousedown', notifyFocusReasonPointer)\n document.removeEventListener('touchstart', notifyFocusReasonPointer)\n document.removeEventListener('keydown', notifyFocusReasonKeydown)\n }\n })\n\n return {\n focusReason,\n lastUserFocusTimestamp,\n lastAutomatedFocusTimestamp,\n }\n}\n\nexport const createFocusOutPreventedEvent = (\n detail: CustomEventInit['detail']\n) => {\n return new CustomEvent(FOCUSOUT_PREVENTED, {\n ...FOCUSOUT_PREVENTED_OPTS,\n detail,\n })\n}\n", "\n\n", "import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType([String, Array, Object]),\n },\n className: {\n type: definePropType([String, Array, Object]),\n },\n effect: {\n type: String,\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType(Object),\n },\n triggerTargetEl: {\n type: definePropType(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n ariaLabel: {\n type: String,\n default: undefined,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n} as const)\nexport type PopperContentProps = ExtractPropTypes\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n", "import { unrefElement } from '@vueuse/core'\nimport { isClient } from '@element-plus/utils'\n\nimport type { ComponentPublicInstance } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Modifier } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type { PopperCoreConfigProps } from './content'\n\nexport const buildPopperOptions = (\n props: PopperCoreConfigProps,\n modifiers: Modifier[] = []\n) => {\n const { placement, strategy, popperOptions } = props\n const options = {\n placement,\n strategy,\n ...popperOptions,\n modifiers: [...genModifiers(props), ...modifiers],\n }\n\n deriveExtraModifiers(options, popperOptions?.modifiers)\n return options\n}\n\nexport const unwrapMeasurableEl = (\n $el: MaybeRef\n) => {\n if (!isClient) return\n return unrefElement($el as HTMLElement)\n}\n\nfunction genModifiers(options: PopperCoreConfigProps) {\n const { offset, gpuAcceleration, fallbackPlacements } = options\n return [\n {\n name: 'offset',\n options: {\n offset: [0, offset ?? 12],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5,\n },\n },\n },\n {\n name: 'flip',\n options: {\n padding: 5,\n fallbackPlacements,\n },\n },\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration,\n },\n },\n ]\n}\n\nfunction deriveExtraModifiers(\n options: any,\n modifiers: PopperCoreConfigProps['popperOptions']['modifiers']\n) {\n if (modifiers) {\n options.modifiers = [...options.modifiers, ...(modifiers ?? [])]\n }\n}\n", "import { computed, inject, onMounted, ref, unref, watch } from 'vue'\nimport { isUndefined } from 'lodash-unified'\nimport { usePopper } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY } from '../constants'\nimport { buildPopperOptions, unwrapMeasurableEl } from '../utils'\n\nimport type { Modifier } from '@popperjs/core'\nimport type { PartialOptions } from '@element-plus/hooks'\nimport type { PopperContentProps } from '../content'\n\nconst DEFAULT_ARROW_OFFSET = 0\n\nexport const usePopperContent = (props: PopperContentProps) => {\n const { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n\n const arrowRef = ref()\n const arrowOffset = ref()\n\n const eventListenerModifier = computed(() => {\n return {\n name: 'eventListeners',\n enabled: !!props.visible,\n } as Modifier<'eventListeners', any>\n })\n\n const arrowModifier = computed(() => {\n const arrowEl = unref(arrowRef)\n const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET\n // Seems like the `phase` and `fn` is required by Modifier type\n // But on its documentation they didn't specify that.\n // Refer to https://popper.js.org/docs/v2/modifiers/arrow/\n return {\n name: 'arrow',\n enabled: !isUndefined(arrowEl),\n options: {\n element: arrowEl,\n padding: offset,\n },\n } as any\n })\n\n const options = computed(() => {\n return {\n onFirstUpdate: () => {\n update()\n },\n ...buildPopperOptions(props, [\n unref(arrowModifier),\n unref(eventListenerModifier),\n ]),\n }\n })\n\n const computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n )\n\n const { attributes, state, styles, update, forceUpdate, instanceRef } =\n usePopper(computedReference, contentRef, options)\n\n watch(instanceRef, (instance) => (popperInstanceRef.value = instance))\n\n onMounted(() => {\n watch(\n () => unref(computedReference)?.getBoundingClientRect(),\n () => {\n update()\n }\n )\n })\n\n return {\n attributes,\n arrowRef,\n contentRef,\n instanceRef,\n state,\n styles,\n role,\n\n forceUpdate,\n update,\n }\n}\n\nexport type UsePopperContentReturn = ReturnType\n", "import { computed, ref, unref } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\n\nimport type { CSSProperties, StyleValue } from 'vue'\nimport type { UsePopperReturn } from '@element-plus/hooks'\nimport type { UsePopperContentReturn } from './use-content'\nimport type { PopperContentProps } from '../content'\n\nexport const usePopperContentDOM = (\n props: PopperContentProps,\n {\n attributes,\n styles,\n role,\n }: Pick &\n Pick\n) => {\n const { nextZIndex } = useZIndex()\n const ns = useNamespace('popper')\n\n const contentAttrs = computed(() => unref(attributes).popper)\n const contentZIndex = ref(props.zIndex || nextZIndex())\n const contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n ])\n const contentStyle = computed(() => {\n return [\n { zIndex: unref(contentZIndex) } as CSSProperties,\n unref(styles).popper as CSSProperties,\n props.popperStyle || {},\n ]\n })\n const ariaModal = computed(() =>\n role.value === 'dialog' ? 'false' : undefined\n )\n const arrowStyle = computed(\n () => (unref(styles).arrow || {}) as CSSProperties\n )\n\n const updateZIndex = () => {\n contentZIndex.value = props.zIndex || nextZIndex()\n }\n\n return {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n contentZIndex,\n\n updateZIndex,\n }\n}\n\nexport type UsePopperContentDOMReturn = ReturnType\n", "import { ref } from 'vue'\n\nimport type { SetupContext } from 'vue'\nimport type { PopperContentEmits, PopperContentProps } from '../content'\n\nexport const usePopperContentFocusTrap = (\n props: PopperContentProps,\n emit: SetupContext['emit']\n) => {\n const trapped = ref(false)\n const focusStartRef = ref<'container' | 'first' | HTMLElement>()\n\n const onFocusAfterTrapped = () => {\n emit('focus')\n }\n\n const onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n }\n\n const onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n }\n\n const onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n }\n\n const onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n }\n\n return {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n }\n}\n\nexport type UsePopperContentFocusTrapReturn = ReturnType<\n typeof usePopperContentFocusTrap\n>\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Popper from './src/popper.vue'\n\nimport ElPopperArrow from './src/arrow.vue'\nimport ElPopperTrigger from './src/trigger.vue'\nimport ElPopperContent from './src/content.vue'\n\nexport { ElPopperArrow, ElPopperTrigger, ElPopperContent }\n\nexport const ElPopper = withInstall(Popper)\nexport default ElPopper\n\nexport * from './src/popper'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/arrow'\nexport * from './src/constants'\n\nexport type { Placement, Options } from '@popperjs/core'\n", "import type { Arrayable } from '@element-plus/utils'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport type ElTooltipInjectionContext = {\n controlled: Ref\n id: Ref\n open: Ref\n trigger: Ref>\n onOpen: (e?: Event) => void\n onClose: (e?: Event) => void\n onToggle: (e: Event) => void\n onShow: () => void\n onHide: () => void\n onBeforeShow: () => void\n onBeforeHide: () => void\n updatePopper: () => void\n}\n\nexport const TOOLTIP_INJECTION_KEY: InjectionKey =\n Symbol('elTooltip')\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useDelayedToggleProps } from '@element-plus/hooks'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: definePropType([String, Object]),\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: {\n type: Boolean,\n default: false,\n },\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n /**\n * @description same as `aria-label`\n */\n ariaLabel: String,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n ...popperTriggerProps,\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n /**\n * @description How should the tooltip be triggered (to show)\n */\n trigger: {\n type: definePropType>([String, Array]),\n default: 'hover',\n },\n /**\n * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard\n */\n triggerKeys: {\n type: definePropType(Array),\n default: () => [EVENT_CODE.enter, EVENT_CODE.space],\n },\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n typeof useTooltipTriggerProps\n>\n", "import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\nimport type Tooltip from './tooltip.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n]\n\nexport type ElTooltipProps = ExtractPropTypes\n\nexport type TooltipInstance = InstanceType\n", "import { unref } from 'vue'\nimport { isArray } from '@element-plus/utils'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport const isTriggerType = (\n trigger: Arrayable,\n type: TooltipTriggerType\n) => {\n if (isArray(trigger)) {\n return trigger.includes(type)\n }\n return trigger === type\n}\n\nexport const whenTrigger = (\n trigger: Ref>,\n type: TooltipTriggerType,\n handler: (e: Event) => void\n) => {\n return (e: Event) => {\n isTriggerType(unref(trigger), type) && handler(e)\n }\n}\n", "\n\n", "\n\n\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Tooltip from './src/tooltip.vue'\n\nexport const ElTooltip = withInstall(Tooltip)\nexport * from './src/tooltip'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/constants'\nexport default ElTooltip\n", "import { NOOP } from '@vue/shared'\nimport {\n buildProps,\n definePropType,\n isObject,\n isString,\n} from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Autocomplete from './autocomplete.vue'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { Awaitable } from '@element-plus/utils'\n\nexport type AutocompleteData = Record[]\nexport type AutocompleteFetchSuggestionsCallback = (\n data: AutocompleteData\n) => void\nexport type AutocompleteFetchSuggestions =\n | ((\n queryString: string,\n cb: AutocompleteFetchSuggestionsCallback\n ) => Awaitable | void)\n | AutocompleteData\n\nexport const autocompleteProps = buildProps({\n /**\n * @description key name of the input suggestion object for display\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description debounce delay when typing, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description placement of the popup menu\n */\n placement: {\n type: definePropType(String),\n values: [\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n ],\n default: 'bottom-start',\n },\n /**\n * @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete\n */\n fetchSuggestions: {\n type: definePropType([Function, Array]),\n default: NOOP,\n },\n /**\n * @description custom class name for autocomplete's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether show suggestions when input focus\n */\n triggerOnFocus: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to emit a `select` event on enter when there is no autocomplete match\n */\n selectWhenUnmatched: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to hide the loading icon in remote search\n */\n hideLoading: {\n type: Boolean,\n default: false,\n },\n /**\n * @description label text\n */\n label: {\n type: String,\n },\n teleported: useTooltipContentProps.teleported,\n /**\n * @description whether to highlight first item in remote search suggestions by default\n */\n highlightFirstItem: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether to disable\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n} as const)\nexport type AutocompleteProps = ExtractPropTypes\n\nexport const autocompleteEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n [INPUT_EVENT]: (value: string) => isString(value),\n [CHANGE_EVENT]: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n select: (item: Record) => isObject(item),\n}\nexport type AutocompleteEmits = typeof autocompleteEmits\n\nexport type AutocompleteInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Autocomplete from './src/autocomplete.vue'\n\nexport const ElAutocomplete = withInstall(Autocomplete)\n\nexport default ElAutocomplete\n\nexport * from './src/autocomplete'\n", "import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ObjectFitProperty } from 'csstype'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n default: '',\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n default: 'circle',\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Avatar from './src/avatar.vue'\n\nexport const ElAvatar = withInstall(Avatar)\nexport default ElAvatar\n\nexport * from './src/avatar'\nexport type { AvatarInstance } from './src/instance'\n", "import type { ExtractPropTypes } from 'vue'\n\nexport const backtopProps = {\n /**\n * @description the button will not show until the scroll height reaches this value.\n */\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n /**\n * @description the target to trigger scroll.\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description right distance.\n */\n right: {\n type: Number,\n default: 40,\n },\n /**\n * @description bottom distance.\n */\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes\n\nexport const backtopEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type BacktopEmits = typeof backtopEmits\n", "import { onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport type { SetupContext } from 'vue'\nimport type { BacktopEmits, BacktopProps } from './backtop'\n\nexport const useBackTop = (\n props: BacktopProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const el = shallowRef()\n const container = shallowRef()\n const visible = ref(false)\n\n const handleScroll = () => {\n if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight\n }\n\n const handleClick = (event: MouseEvent) => {\n el.value?.scrollTo({ top: 0, behavior: 'smooth' })\n emit('click', event)\n }\n\n const handleScrollThrottled = useThrottleFn(handleScroll, 300, true)\n\n useEventListener(container, 'scroll', handleScrollThrottled)\n onMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector(props.target) ?? undefined\n if (!el.value) {\n throwError(componentName, `target does not exist: ${props.target}`)\n }\n container.value = el.value\n }\n // Give visible an initial value, fix #13066\n handleScroll()\n })\n\n return {\n visible,\n handleClick,\n }\n}\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Backtop from './src/backtop.vue'\n\nexport const ElBacktop = withInstall(Backtop)\nexport default ElBacktop\n\nexport * from './src/backtop'\nexport type { BacktopInstance } from './src/instance'\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const badgeProps = buildProps({\n /**\n * @description display value.\n */\n value: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n */\n max: {\n type: Number,\n default: 99,\n },\n /**\n * @description if a little dot is displayed.\n */\n isDot: Boolean,\n /**\n * @description hidden badge.\n */\n hidden: Boolean,\n /**\n * @description badge type.\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger'],\n default: 'danger',\n },\n} as const)\nexport type BadgeProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Badge from './src/badge.vue'\n\nexport const ElBadge = withInstall(Badge)\nexport default ElBadge\n\nexport * from './src/badge'\nexport type { BadgeInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { BreadcrumbProps } from './breadcrumb'\n\nexport const breadcrumbKey: InjectionKey =\n Symbol('breadcrumbKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const breadcrumbProps = buildProps({\n /**\n * @description separator character\n */\n separator: {\n type: String,\n default: '/',\n },\n /**\n * @description icon component of icon separator\n */\n separatorIcon: {\n type: iconPropType,\n },\n} as const)\nexport type BreadcrumbProps = ExtractPropTypes\n", "\n\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nexport const breadcrumbItemProps = buildProps({\n /**\n * @description target route of the link, same as `to` of `vue-router`\n */\n to: {\n type: definePropType([String, Object]),\n default: '',\n },\n /**\n * @description if `true`, the navigation will not leave a history record\n */\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Breadcrumb from './src/breadcrumb.vue'\nimport BreadcrumbItem from './src/breadcrumb-item.vue'\n\nexport const ElBreadcrumb = withInstall(Breadcrumb, {\n BreadcrumbItem,\n})\nexport const ElBreadcrumbItem = withNoopInstall(BreadcrumbItem)\nexport default ElBreadcrumb\n\nexport * from './src/breadcrumb'\nexport * from './src/breadcrumb-item'\nexport * from './src/constants'\nexport type {\n BreadcrumbInstance,\n BreadcrumbItemInstance,\n} from './src/instances'\n", "import type { InjectionKey } from 'vue'\n\nimport type { ButtonProps } from './button'\n\nexport interface ButtonGroupContext {\n size?: ButtonProps['size']\n type?: ButtonProps['type']\n}\n\nexport const buttonGroupContextKey: InjectionKey = Symbol(\n 'buttonGroupContextKey'\n)\n", "import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n shouldAddSpace,\n handleClick,\n }\n}\n", "import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n autoInsertSpace?: boolean\n}\n", "/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n", "import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n", "// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n", "import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n", "import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport type { ButtonProps } from './button'\n\nexport function darken(color: TinyColor, amount = 20) {\n return color.mix('#141414', amount).toString()\n}\n\nexport function useButtonCustomStyle(props: ButtonProps) {\n const _disabled = useFormDisabled()\n const ns = useNamespace('button')\n\n // calculate hover & active color by custom color\n // only work when custom color\n return computed(() => {\n let styles: Record = {}\n\n const buttonColor = props.color\n\n if (buttonColor) {\n const color = new TinyColor(buttonColor)\n const activeBgColor = props.dark\n ? color.tint(20).toString()\n : darken(color, 20)\n\n if (props.plain) {\n styles = ns.cssVarBlock({\n 'bg-color': props.dark\n ? darken(color, 90)\n : color.tint(90).toString(),\n 'text-color': buttonColor,\n 'border-color': props.dark\n ? darken(color, 50)\n : color.tint(50).toString(),\n 'hover-text-color': `var(${ns.cssVarName('color-white')})`,\n 'hover-bg-color': buttonColor,\n 'hover-border-color': buttonColor,\n 'active-bg-color': activeBgColor,\n 'active-text-color': `var(${ns.cssVarName('color-white')})`,\n 'active-border-color': activeBgColor,\n })\n\n if (_disabled.value) {\n styles[ns.cssVarBlockName('disabled-bg-color')] = props.dark\n ? darken(color, 90)\n : color.tint(90).toString()\n styles[ns.cssVarBlockName('disabled-text-color')] = props.dark\n ? darken(color, 50)\n : color.tint(50).toString()\n styles[ns.cssVarBlockName('disabled-border-color')] = props.dark\n ? darken(color, 80)\n : color.tint(80).toString()\n }\n } else {\n const hoverBgColor = props.dark\n ? darken(color, 30)\n : color.tint(30).toString()\n const textColor = color.isDark()\n ? `var(${ns.cssVarName('color-white')})`\n : `var(${ns.cssVarName('color-black')})`\n styles = ns.cssVarBlock({\n 'bg-color': buttonColor,\n 'text-color': textColor,\n 'border-color': buttonColor,\n 'hover-bg-color': hoverBgColor,\n 'hover-text-color': textColor,\n 'hover-border-color': hoverBgColor,\n 'active-bg-color': activeBgColor,\n 'active-border-color': activeBgColor,\n })\n\n if (_disabled.value) {\n const disabledButtonColor = props.dark\n ? darken(color, 50)\n : color.tint(50).toString()\n styles[ns.cssVarBlockName('disabled-bg-color')] = disabledButtonColor\n styles[ns.cssVarBlockName('disabled-text-color')] = props.dark\n ? 'rgba(255, 255, 255, 0.5)'\n : `var(${ns.cssVarName('color-white')})`\n styles[ns.cssVarBlockName('disabled-border-color')] =\n disabledButtonColor\n }\n }\n }\n\n return styles\n })\n}\n", "\n\n\n", "import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const buttonGroupProps = {\n /**\n * @description control the size of buttons in this button-group\n */\n size: buttonProps.size,\n /**\n * @description control the type of buttons in this button-group\n */\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Button from './src/button.vue'\nimport ButtonGroup from './src/button-group.vue'\n\nexport const ElButton = withInstall(Button, {\n ButtonGroup,\n})\nexport const ElButtonGroup = withNoopInstall(ButtonGroup)\nexport default ElButton\n\nexport * from './src/button'\nexport * from './src/constants'\nexport type { ButtonInstance, ButtonGroupInstance } from './src/instance'\n", "export const timeUnits = ['hours', 'minutes', 'seconds'] as const\n\nexport const DEFAULT_FORMATS_TIME = 'HH:mm:ss'\nexport const DEFAULT_FORMATS_DATE = 'YYYY-MM-DD'\nexport const DEFAULT_FORMATS_DATEPICKER = {\n date: DEFAULT_FORMATS_DATE,\n dates: DEFAULT_FORMATS_DATE,\n week: 'gggg[w]ww',\n year: 'YYYY',\n month: 'YYYY-MM',\n datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,\n monthrange: 'YYYY-MM',\n daterange: DEFAULT_FORMATS_DATE,\n datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,\n}\n\nexport type TimeUnit = typeof timeUnits[number]\n", "import dayjs from 'dayjs'\nimport { isArray, isDate, isEmpty } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nexport type TimeList = [number | undefined, number, undefined | number]\n\nexport const buildTimeList = (value: number, bound: number): TimeList => {\n return [\n value > 0 ? value - 1 : undefined,\n value,\n value < bound ? value + 1 : undefined,\n ]\n}\n\nexport const rangeArr = (n: number) =>\n Array.from(Array.from({ length: n }).keys())\n\nexport const extractDateFormat = (format: string) => {\n return format\n .replace(/\\W?m{1,2}|\\W?ZZ/g, '')\n .replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, '')\n .trim()\n}\n\nexport const extractTimeFormat = (format: string) => {\n return format\n .replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, '')\n .trim()\n}\n\nexport const dateEquals = function (a: Date | unknown, b: Date | unknown) {\n const aIsDate = isDate(a)\n const bIsDate = isDate(b)\n if (aIsDate && bIsDate) {\n return a.getTime() === b.getTime()\n }\n if (!aIsDate && !bIsDate) {\n return a === b\n }\n return false\n}\n\nexport const valueEquals = function (\n a: Array | unknown,\n b: Array | unknown\n) {\n const aIsArray = isArray(a)\n const bIsArray = isArray(b)\n if (aIsArray && bIsArray) {\n if (a.length !== b.length) {\n return false\n }\n return a.every((item, index) => dateEquals(item, b[index]))\n }\n if (!aIsArray && !bIsArray) {\n return dateEquals(a, b)\n }\n return false\n}\n\nexport const parseDate = function (\n date: string | number | Date,\n format: string | undefined,\n lang: string\n) {\n const day =\n isEmpty(format) || format === 'x'\n ? dayjs(date).locale(lang)\n : dayjs(date, format).locale(lang)\n return day.isValid() ? day : undefined\n}\n\nexport const formatter = function (\n date: string | number | Date | Dayjs,\n format: string | undefined,\n lang: string\n) {\n if (isEmpty(format)) return date\n if (format === 'x') return +date\n return dayjs(date).locale(lang).format(format)\n}\n\nexport const makeList = (total: number, method?: () => number[]) => {\n const arr: boolean[] = []\n const disabledArr = method?.()\n for (let i = 0; i < total; i++) {\n arr.push(disabledArr?.includes(i) ?? false)\n }\n return arr\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]\nexport type GetDisabledMinutes = (\n hour: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\nexport type GetDisabledSeconds = (\n hour: number,\n minute: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\n\nexport const disabledTimeListsProps = buildProps({\n /**\n * @description To specify the array of hours that cannot be selected\n */\n disabledHours: {\n type: definePropType(Function),\n },\n /**\n * @description To specify the array of minutes that cannot be selected\n */\n disabledMinutes: {\n type: definePropType(Function),\n },\n /**\n * @description To specify the array of seconds that cannot be selected\n */\n disabledSeconds: {\n type: definePropType(Function),\n },\n} as const)\n\nexport type DisabledTimeListsProps = ExtractPropTypes<\n typeof disabledTimeListsProps\n>\n\nexport const timePanelSharedProps = buildProps({\n visible: Boolean,\n actualVisible: {\n type: Boolean,\n default: undefined,\n },\n format: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type TimePanelSharedProps = ExtractPropTypes\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CircleClose } from '@element-plus/icons-vue'\nimport { disabledTimeListsProps } from '../props/shared'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type { Options } from '@popperjs/core'\nimport type { Dayjs } from 'dayjs'\n\nexport type SingleOrRange = T | [T, T]\nexport type DateModelType = number | string | Date\nexport type ModelValueType = SingleOrRange\nexport type DayOrDays = SingleOrRange\nexport type DateOrDates = SingleOrRange\nexport type UserInput = SingleOrRange\nexport type GetDisabledHours = (role: string, comparingDate?: Dayjs) => number[]\nexport type GetDisabledMinutes = (\n hour: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\nexport type GetDisabledSeconds = (\n hour: number,\n minute: number,\n role: string,\n comparingDate?: Dayjs\n) => number[]\n\nexport const timePickerDefaultProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: definePropType>([Array, String]),\n },\n /**\n * @description same as `name` in native input\n */\n name: {\n type: definePropType>([Array, String]),\n default: '',\n },\n /**\n * @description custom class name for TimePicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description format of the displayed value in the input box\n */\n format: String,\n /**\n * @description optional, format of binding value. If not specified, the binding value will be a Date object\n */\n valueFormat: String,\n /**\n * @description type of the picker\n */\n type: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Custom clear icon component\n */\n clearIcon: {\n type: definePropType([String, Object]),\n default: CircleClose,\n },\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Custom prefix icon component\n */\n prefixIcon: {\n type: definePropType([String, Object]),\n default: '',\n },\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description whether TimePicker is read only\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether TimePicker is disabled\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * @description placeholder in non-range mode\n */\n placeholder: {\n type: String,\n default: '',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n /**\n * @description binding value, if it is an array, the length should be 2\n */\n modelValue: {\n type: definePropType([Date, Array, String, Number]),\n default: '',\n },\n /**\n * @description range separator\n */\n rangeSeparator: {\n type: String,\n default: '-',\n },\n /**\n * @description placeholder for the start date in range mode\n */\n startPlaceholder: String,\n /**\n * @description placeholder for the end date in range mode\n */\n endPlaceholder: String,\n /**\n * @description optional, default date of the calendar\n */\n defaultValue: {\n type: definePropType>([Date, Array]),\n },\n /**\n * @description optional, the time value to use when selecting date range\n */\n defaultTime: {\n type: definePropType>([Date, Array]),\n },\n /**\n * @description whether to pick a time range\n */\n isRange: {\n type: Boolean,\n default: false,\n },\n ...disabledTimeListsProps,\n /**\n * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean\n */\n disabledDate: {\n type: Function,\n },\n /**\n * @description set custom className\n */\n cellClassName: {\n type: Function,\n },\n /**\n * @description an object array to set shortcut options\n */\n shortcuts: {\n type: Array,\n default: () => [],\n },\n /**\n * @description whether to pick time using arrow buttons\n */\n arrowControl: {\n type: Boolean,\n default: false,\n },\n /**\n * @description same as `aria-label` in native input\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: definePropType([String, Number]),\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description unlink two date-panels in range-picker\n */\n unlinkPanels: Boolean,\n} as const)\n\nexport type TimePickerDefaultProps = ExtractPropTypes<\n typeof timePickerDefaultProps\n>\n\nexport interface PickerOptions {\n isValidValue: (date: DayOrDays) => boolean\n handleKeydownInput: (event: KeyboardEvent) => void\n parseUserInput: (value: UserInput) => DayOrDays\n formatToString: (value: DayOrDays) => UserInput\n getRangeAvailableTime: (date: DayOrDays) => DayOrDays\n getDefaultValue: () => DayOrDays\n panelReady: boolean\n handleClear: () => void\n handleFocusPicker?: () => void\n}\n", "\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { timePanelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelTimePickerProps = buildProps({\n ...timePanelSharedProps,\n datetimeRole: String,\n parsedValue: {\n type: definePropType(Object),\n },\n} as const)\n\nexport type PanelTimePickerProps = ExtractPropTypes\n", "import type { Dayjs } from 'dayjs'\n\nimport type {\n GetDisabledHoursState,\n GetDisabledMinutesState,\n GetDisabledSecondsState,\n} from '../types'\n\ntype UseTimePanelProps = {\n getAvailableHours: GetDisabledHoursState\n getAvailableMinutes: GetDisabledMinutesState\n getAvailableSeconds: GetDisabledSecondsState\n}\n\nexport const useTimePanel = ({\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds,\n}: UseTimePanelProps) => {\n const getAvailableTime = (\n date: Dayjs,\n role: string,\n first: boolean,\n compareDate?: Dayjs\n ) => {\n const availableTimeGetters = {\n hour: getAvailableHours,\n minute: getAvailableMinutes,\n second: getAvailableSeconds,\n } as const\n let result = date\n ;(['hour', 'minute', 'second'] as const).forEach((type) => {\n if (availableTimeGetters[type]) {\n let availableTimeSlots: number[]\n const method = availableTimeGetters[type]\n switch (type) {\n case 'minute': {\n availableTimeSlots = (method as typeof getAvailableMinutes)(\n result.hour(),\n role,\n compareDate\n )\n break\n }\n case 'second': {\n availableTimeSlots = (method as typeof getAvailableSeconds)(\n result.hour(),\n result.minute(),\n role,\n compareDate\n )\n break\n }\n default: {\n availableTimeSlots = (method as typeof getAvailableHours)(\n role,\n compareDate\n )\n break\n }\n }\n\n if (\n availableTimeSlots?.length &&\n !availableTimeSlots.includes(result[type]())\n ) {\n const pos = first ? 0 : availableTimeSlots.length - 1\n result = result[type](availableTimeSlots[pos]) as unknown as Dayjs\n }\n }\n })\n return result\n }\n\n const timePickerOptions: Record void> = {}\n\n const onSetOption = ([key, val]: [string, (...args: any[]) => void]) => {\n timePickerOptions[key] = val\n }\n\n return {\n timePickerOptions,\n\n getAvailableTime,\n onSetOption,\n }\n}\n", "import { ref, watch } from 'vue'\nimport { makeList } from '../utils'\n\nimport type { Dayjs } from 'dayjs'\nimport type {\n GetDisabledHoursState,\n GetDisabledMinutesState,\n GetDisabledSecondsState,\n} from '../types'\nimport type {\n GetDisabledHours,\n GetDisabledMinutes,\n GetDisabledSeconds,\n} from '../props/shared'\n\nconst makeAvailableArr = (disabledList: boolean[]): number[] => {\n const trueOrNumber = (isDisabled: boolean, index: number) =>\n isDisabled || index\n\n const getNumber = (predicate: number | true): predicate is number =>\n predicate !== true\n\n return disabledList.map(trueOrNumber).filter(getNumber)\n}\n\nexport const getTimeLists = (\n disabledHours?: GetDisabledHours,\n disabledMinutes?: GetDisabledMinutes,\n disabledSeconds?: GetDisabledSeconds\n) => {\n const getHoursList = (role: string, compare?: Dayjs) => {\n return makeList(24, disabledHours && (() => disabledHours?.(role, compare)))\n }\n\n const getMinutesList = (hour: number, role: string, compare?: Dayjs) => {\n return makeList(\n 60,\n disabledMinutes && (() => disabledMinutes?.(hour, role, compare))\n )\n }\n\n const getSecondsList = (\n hour: number,\n minute: number,\n role: string,\n compare?: Dayjs\n ) => {\n return makeList(\n 60,\n disabledSeconds && (() => disabledSeconds?.(hour, minute, role, compare))\n )\n }\n\n return {\n getHoursList,\n getMinutesList,\n getSecondsList,\n }\n}\n\nexport const buildAvailableTimeSlotGetter = (\n disabledHours: GetDisabledHours,\n disabledMinutes: GetDisabledMinutes,\n disabledSeconds: GetDisabledSeconds\n) => {\n const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(\n disabledHours,\n disabledMinutes,\n disabledSeconds\n )\n\n const getAvailableHours: GetDisabledHoursState = (role, compare?) => {\n return makeAvailableArr(getHoursList(role, compare))\n }\n\n const getAvailableMinutes: GetDisabledMinutesState = (\n hour,\n role,\n compare?\n ) => {\n return makeAvailableArr(getMinutesList(hour, role, compare))\n }\n\n const getAvailableSeconds: GetDisabledSecondsState = (\n hour,\n minute,\n role,\n compare?\n ) => {\n return makeAvailableArr(getSecondsList(hour, minute, role, compare))\n }\n\n return {\n getAvailableHours,\n getAvailableMinutes,\n getAvailableSeconds,\n }\n}\n\nexport const useOldValue = (props: {\n parsedValue?: string | Dayjs | Dayjs[]\n visible: boolean\n}) => {\n const oldValue = ref(props.parsedValue)\n\n watch(\n () => props.visible,\n (val) => {\n if (!val) {\n oldValue.value = props.parsedValue\n }\n }\n )\n\n return oldValue\n}\n", "import { isClient, isElement } from '@element-plus/utils'\n\nimport type {\n ComponentPublicInstance,\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\ntype DocumentHandler = (mouseup: T, mousedown: T) => void\ntype FlushList = Map<\n HTMLElement,\n {\n documentHandler: DocumentHandler\n bindingFn: (...args: unknown[]) => unknown\n }[]\n>\n\nconst nodeList: FlushList = new Map()\n\nlet startClick: MouseEvent\n\nif (isClient) {\n document.addEventListener('mousedown', (e: MouseEvent) => (startClick = e))\n document.addEventListener('mouseup', (e: MouseEvent) => {\n for (const handlers of nodeList.values()) {\n for (const { documentHandler } of handlers) {\n documentHandler(e as MouseEvent, startClick)\n }\n }\n })\n}\n\nfunction createDocumentHandler(\n el: HTMLElement,\n binding: DirectiveBinding\n): DocumentHandler {\n let excludes: HTMLElement[] = []\n if (Array.isArray(binding.arg)) {\n excludes = binding.arg\n } else if (isElement(binding.arg)) {\n // due to current implementation on binding type is wrong the type casting is necessary here\n excludes.push(binding.arg as unknown as HTMLElement)\n }\n return function (mouseup, mousedown) {\n const popperRef = (\n binding.instance as ComponentPublicInstance<{\n popperRef: HTMLElement\n }>\n ).popperRef\n const mouseUpTarget = mouseup.target as Node\n const mouseDownTarget = mousedown?.target as Node\n const isBound = !binding || !binding.instance\n const isTargetExists = !mouseUpTarget || !mouseDownTarget\n const isContainedByEl =\n el.contains(mouseUpTarget) || el.contains(mouseDownTarget)\n const isSelf = el === mouseUpTarget\n\n const isTargetExcluded =\n (excludes.length &&\n excludes.some((item) => item?.contains(mouseUpTarget))) ||\n (excludes.length && excludes.includes(mouseDownTarget as HTMLElement))\n const isContainedByPopper =\n popperRef &&\n (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget))\n if (\n isBound ||\n isTargetExists ||\n isContainedByEl ||\n isSelf ||\n isTargetExcluded ||\n isContainedByPopper\n ) {\n return\n }\n binding.value(mouseup, mousedown)\n }\n}\n\nconst ClickOutside: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n // there could be multiple handlers on the element\n if (!nodeList.has(el)) {\n nodeList.set(el, [])\n }\n\n nodeList.get(el)!.push({\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n })\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, [])\n }\n\n const handlers = nodeList.get(el)!\n const oldHandlerIndex = handlers.findIndex(\n (item) => item.bindingFn === binding.oldValue\n )\n const newHandler = {\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n }\n\n if (oldHandlerIndex >= 0) {\n // replace the old handler to the new handler\n handlers.splice(oldHandlerIndex, 1, newHandler)\n } else {\n handlers.push(newHandler)\n }\n },\n unmounted(el: HTMLElement) {\n // remove all listeners when a component unmounted\n nodeList.delete(el)\n },\n}\n\nexport default ClickOutside\n", "import { isFunction } from '@element-plus/utils'\n\nimport type { ObjectDirective } from 'vue'\n\nexport const REPEAT_INTERVAL = 100\nexport const REPEAT_DELAY = 600\n\nexport interface RepeatClickOptions {\n interval?: number\n delay?: number\n handler: (...args: unknown[]) => unknown\n}\n\nexport const vRepeatClick: ObjectDirective<\n HTMLElement,\n RepeatClickOptions | RepeatClickOptions['handler']\n> = {\n beforeMount(el, binding) {\n const value = binding.value\n const { interval = REPEAT_INTERVAL, delay = REPEAT_DELAY } = isFunction(\n value\n )\n ? {}\n : value\n\n let intervalId: ReturnType | undefined\n let delayId: ReturnType | undefined\n\n const handler = () => (isFunction(value) ? value() : value.handler())\n\n const clear = () => {\n if (delayId) {\n clearTimeout(delayId)\n delayId = undefined\n }\n if (intervalId) {\n clearInterval(intervalId)\n intervalId = undefined\n }\n }\n\n el.addEventListener('mousedown', (evt: MouseEvent) => {\n if (evt.button !== 0) return\n clear()\n handler()\n\n document.addEventListener('mouseup', () => clear(), {\n once: true,\n })\n\n delayId = setTimeout(() => {\n intervalId = setInterval(() => {\n handler()\n }, interval)\n }, delay)\n })\n },\n}\n", "import { nextTick } from 'vue'\nimport { obtainAllFocusableElements } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { ObjectDirective } from 'vue'\n\nexport const FOCUSABLE_CHILDREN = '_trap-focus-children'\nexport const TRAP_FOCUS_HANDLER = '_trap-focus-handler'\n\nexport interface TrapFocusElement extends HTMLElement {\n [FOCUSABLE_CHILDREN]: HTMLElement[]\n [TRAP_FOCUS_HANDLER]: (e: KeyboardEvent) => void\n}\n\nconst FOCUS_STACK: TrapFocusElement[] = []\n\nconst FOCUS_HANDLER = (e: KeyboardEvent) => {\n // Getting the top layer.\n if (FOCUS_STACK.length === 0) return\n const focusableElement =\n FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN]\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault()\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus()\n }\n return\n }\n const goingBackward = e.shiftKey\n const isFirst = e.target === focusableElement[0]\n const isLast = e.target === focusableElement[focusableElement.length - 1]\n if (isFirst && goingBackward) {\n e.preventDefault()\n focusableElement[focusableElement.length - 1].focus()\n }\n if (isLast && !goingBackward) {\n e.preventDefault()\n focusableElement[0].focus()\n }\n\n // the is critical since jsdom did not implement user actions, you can only mock it\n // DELETE ME: when testing env switches to puppeteer\n if (process.env.NODE_ENV === 'test') {\n const index = focusableElement.indexOf(e.target as HTMLElement)\n if (index !== -1) {\n focusableElement[goingBackward ? index - 1 : index + 1]?.focus()\n }\n }\n }\n}\n\nconst TrapFocus: ObjectDirective = {\n beforeMount(el: TrapFocusElement) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el)\n FOCUS_STACK.push(el)\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener('keydown', FOCUS_HANDLER)\n }\n },\n updated(el: TrapFocusElement) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el)\n })\n },\n unmounted() {\n FOCUS_STACK.shift()\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener('keydown', FOCUS_HANDLER)\n }\n },\n}\n\nexport default TrapFocus\n", "/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent =\n /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(\n uas\n );\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!/Win64/.exec(uas);\n\n if (agent) {\n _ie = agent[1]\n ? parseFloat(agent[1])\n : agent[5]\n ? parseFloat(agent[5])\n : NaN;\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function () {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function () {\n return _populate() || _ie_real_version > _ie;\n },\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function () {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function () {\n return _populate() || _firefox;\n },\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function () {\n return _populate() || _opera;\n },\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function () {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function () {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome: function () {\n return _populate() || _chrome;\n },\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function () {\n return _populate() || _windows;\n },\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function () {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function () {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function () {\n return _populate() || _iphone;\n },\n\n mobile: function () {\n return _populate() || _iphone || _ipad || _android || _mobile;\n },\n\n nativeApp: function () {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function () {\n return _populate() || _android;\n },\n\n ipad: function () {\n return _populate() || _ipad;\n },\n};\n\nexport default UserAgent_DEPRECATED;\n", "/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM, // For now, this is true - might change in the future.\n};\n\nexport default ExecutionEnvironment;\n", "/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\nimport ExecutionEnvironment from './ExecutionEnvironment';\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (\n !ExecutionEnvironment.canUseDOM ||\n (capture && !('addEventListener' in document))\n ) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nexport default isEventSupported;\n", "/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\nimport UserAgent_DEPRECATED from './UserAgent_DEPRECATED';\n\nimport isEventSupported from './isEventSupported';\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0,\n sY = 0, // spinX, spinY\n pX = 0,\n pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) {\n // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else {\n // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = pX < 1 ? -1 : 1;\n }\n if (pY && !sY) {\n sY = pY < 1 ? -1 : 1;\n }\n\n return { spinX: sX, spinY: sY, pixelX: pX, pixelY: pY };\n}\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function () /*string*/ {\n return UserAgent_DEPRECATED.firefox()\n ? 'DOMMouseScroll'\n : isEventSupported('wheel')\n ? 'wheel'\n : 'mousewheel';\n};\n\nexport default normalizeWheel;\n", "import normalizeWheel from 'normalize-wheel-es'\n\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\nimport type { NormalizedWheelEvent } from 'normalize-wheel-es'\n\nconst mousewheel = function (\n element: HTMLElement,\n callback: (e: WheelEvent, normalized: NormalizedWheelEvent) => void\n) {\n if (element && element.addEventListener) {\n const fn = function (this: HTMLElement, event: WheelEvent) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n element.addEventListener('wheel', fn, { passive: true })\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { disabledTimeListsProps } from '../props/shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const basicTimeSpinnerProps = buildProps({\n role: {\n type: String,\n required: true,\n },\n spinnerDate: {\n type: definePropType(Object),\n required: true,\n },\n showSeconds: {\n type: Boolean,\n default: true,\n },\n arrowControl: Boolean,\n amPmMode: {\n // 'a': am/pm; 'A': AM/PM\n type: definePropType<'a' | 'A' | ''>(String),\n default: '',\n },\n ...disabledTimeListsProps,\n} as const)\n\nexport type BasicTimeSpinnerProps = ExtractPropTypes<\n typeof basicTimeSpinnerProps\n>\n", "\n\n", "\n\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { timePanelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelTimeRangeProps = buildProps({\n ...timePanelSharedProps,\n parsedValue: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n} as const)\n\nexport type PanelTimeRangeProps = ExtractPropTypes\n", "\n\n\n", "import { defineComponent, provide, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport { DEFAULT_FORMATS_TIME } from './constants'\nimport Picker from './common/picker.vue'\nimport TimePickPanel from './time-picker-com/panel-time-pick.vue'\nimport TimeRangePanel from './time-picker-com/panel-time-range.vue'\nimport { timePickerDefaultProps } from './common/props'\ndayjs.extend(customParseFormat)\n\nexport default defineComponent({\n name: 'ElTimePicker',\n install: null,\n props: {\n ...timePickerDefaultProps,\n /**\n * @description whether to pick a time range\n */\n isRange: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['update:modelValue'],\n setup(props, ctx) {\n const commonPicker = ref>()\n const [type, Panel] = props.isRange\n ? ['timerange', TimeRangePanel]\n : ['time', TimePickPanel]\n\n const modelUpdater = (value: any) => ctx.emit('update:modelValue', value)\n provide('ElPopperOptions', props.popperOptions)\n ctx.expose({\n /**\n * @description focus the Input component\n */\n focus: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleFocusInput(e)\n },\n /**\n * @description blur the Input component\n */\n blur: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleBlurInput(e)\n },\n /**\n * @description open the TimePicker popper\n */\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n /**\n * @description close the TimePicker popper\n */\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n })\n\n return () => {\n const format = props.format ?? DEFAULT_FORMATS_TIME\n\n return (\n \n {{\n default: (props: any) => ,\n }}\n \n )\n }\n },\n})\n", "import TimePicker from './src/time-picker'\nimport CommonPicker from './src/common/picker.vue'\nimport TimePickPanel from './src/time-picker-com/panel-time-pick.vue'\n\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport * from './src/utils'\nexport * from './src/constants'\nexport * from './src/common/props'\n\nconst _TimePicker = TimePicker as SFCWithInstall\n\n_TimePicker.install = (app: App) => {\n app.component(_TimePicker.name, _TimePicker)\n}\n\nexport { CommonPicker, TimePickPanel }\nexport default _TimePicker\nexport const ElTimePicker = _TimePicker\n", "import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n", "import { computed } from 'vue'\nimport dayjs from 'dayjs'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport { useLocale } from '@element-plus/hooks'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport { WEEK_DAYS } from '@element-plus/constants'\nimport { getMonthDays, getPrevMonthLastDays, toNestedArr } from './date-table'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type {\n CalendarDateCell,\n CalendarDateCellType,\n DateTableEmits,\n DateTableProps,\n} from './date-table'\n\nexport const useDateTable = (\n props: DateTableProps,\n emit: SetupContext['emit']\n) => {\n dayjs.extend(localeData)\n // https://day.js.org/docs/en/i18n/locale-data\n const firstDayOfWeek: number = dayjs.localeData().firstDayOfWeek()\n\n const { t, lang } = useLocale()\n const now = dayjs().locale(lang.value)\n\n const isInRange = computed(() => !!props.range && !!props.range.length)\n\n const rows = computed(() => {\n let days: CalendarDateCell[] = []\n if (isInRange.value) {\n const [start, end] = props.range!\n const currentMonthRange: CalendarDateCell[] = rangeArr(\n end.date() - start.date() + 1\n ).map((index) => ({\n text: start.date() + index,\n type: 'current',\n }))\n\n let remaining = currentMonthRange.length % 7\n remaining = remaining === 0 ? 0 : 7 - remaining\n const nextMonthRange: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = currentMonthRange.concat(nextMonthRange)\n } else {\n const firstDay = props.date.startOf('month').day()\n const prevMonthDays: CalendarDateCell[] = getPrevMonthLastDays(\n props.date,\n (firstDay - firstDayOfWeek + 7) % 7\n ).map((day) => ({\n text: day,\n type: 'prev',\n }))\n const currentMonthDays: CalendarDateCell[] = getMonthDays(props.date).map(\n (day) => ({\n text: day,\n type: 'current',\n })\n )\n days = [...prevMonthDays, ...currentMonthDays]\n const remaining = 7 - (days.length % 7 || 7)\n const nextMonthDays: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = days.concat(nextMonthDays)\n }\n return toNestedArr(days)\n })\n\n const weekDays = computed(() => {\n const start = firstDayOfWeek\n if (start === 0) {\n return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`))\n } else {\n return WEEK_DAYS.slice(start)\n .concat(WEEK_DAYS.slice(0, start))\n .map((_) => t(`el.datepicker.weeks.${_}`))\n }\n })\n\n const getFormattedDate = (day: number, type: CalendarDateCellType): Dayjs => {\n switch (type) {\n case 'prev':\n return props.date.startOf('month').subtract(1, 'month').date(day)\n case 'next':\n return props.date.startOf('month').add(1, 'month').date(day)\n case 'current':\n return props.date.date(day)\n }\n }\n\n const handlePickDay = ({ text, type }: CalendarDateCell) => {\n const date = getFormattedDate(text, type)\n emit('pick', date)\n }\n\n const getSlotData = ({ text, type }: CalendarDateCell) => {\n const day = getFormattedDate(text, type)\n return {\n isSelected: day.isSame(props.selectedDay),\n type: `${type}-month`,\n day: day.format('YYYY-MM-DD'),\n date: day.toDate(),\n }\n }\n\n return {\n now,\n isInRange,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n }\n}\n", "\n\n\n", "import { computed, ref, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { useDeprecated, useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nconst adjacentMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nconst threeConsecutiveMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const secondMonthFirstDay = start.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, 'week')\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const slots = useSlots()\n const { lang } = useLocale()\n\n const selectedDay = ref()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef = computed(() => {\n if (!props.modelValue) {\n return (\n realSelectedDay.value ||\n (validatedRange.value.length ? validatedRange.value[0][0] : now)\n )\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if ((firstMonth + 1) % 12 === lastMonth) {\n return adjacentMonth(firstDay, lastDay)\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n return threeConsecutiveMonth(firstDay, lastDay)\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n useDeprecated(\n {\n from: '\"dateCell\"',\n replacement: '\"date-cell\"',\n scope: 'ElCalendar',\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/calendar.html#slots',\n type: 'Slot',\n },\n computed(() => !!slots.dateCell)\n )\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n }\n}\n", "import {\n buildProps,\n definePropType,\n isArray,\n isDate,\n} from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nconst isValidRange = (range: unknown): range is [Date, Date] =>\n isArray(range) && range.length === 2 && range.every((item) => isDate(item))\n\nexport const calendarProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Date,\n },\n /**\n * @description time range, including start time and end time.\n * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.\n */\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: isValidRange,\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => isDate(value),\n [INPUT_EVENT]: (value: Date) => isDate(value),\n}\nexport type CalendarEmits = typeof calendarEmits\n", "\n \n \n
\n \n \n \n \n \n \n
\n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\nexport type {\n CalendarDateTableInstance,\n DateTableInstance,\n CalendarInstance,\n} from './src/instance'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Card from './src/card.vue'\n\nexport const ElCard = withInstall(Card)\nexport default ElCard\n\nexport * from './src/card'\nexport type { CardInstance } from './src/instance'\n", "import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes\nexport type CarouselEmits = typeof carouselEmits\n", "import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref\n items: Ref\n isCardType: Ref\n isVertical: Ref\n loop: boolean\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey =\n Symbol('carouselContextKey')\n", "import {\n computed,\n getCurrentInstance,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n unref,\n watch,\n} from 'vue'\nimport { throttle } from 'lodash-unified'\nimport { useResizeObserver } from '@vueuse/core'\nimport { debugWarn, isString } from '@element-plus/utils'\nimport { useOrderedChildren } from '@element-plus/hooks'\nimport { carouselContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { CarouselItemContext } from './constants'\nimport type { CarouselEmits, CarouselProps } from './carousel'\n\nconst THROTTLE_TIME = 300\n\nexport const useCarousel = (\n props: CarouselProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const {\n children: items,\n addChild: addItem,\n removeChild: removeItem,\n } = useOrderedChildren(\n getCurrentInstance()!,\n 'ElCarouselItem'\n )\n\n // refs\n const activeIndex = ref(-1)\n const timer = ref | null>(null)\n const hover = ref(false)\n const root = ref()\n const containerHeight = ref(0)\n\n // computed\n const arrowDisplay = computed(\n () => props.arrow !== 'never' && !unref(isVertical)\n )\n\n const hasLabel = computed(() => {\n return items.value.some((item) => item.props.label.toString().length > 0)\n })\n\n const isCardType = computed(() => props.type === 'card')\n const isVertical = computed(() => props.direction === 'vertical')\n\n const containerStyle = computed(() => {\n if (props.height !== 'auto') {\n return {\n height: props.height,\n }\n }\n return {\n height: `${containerHeight.value}px`,\n overflow: 'hidden',\n }\n })\n\n // methods\n const throttledArrowClick = throttle(\n (index: number) => {\n setActiveItem(index)\n },\n THROTTLE_TIME,\n { trailing: true }\n )\n\n const throttledIndicatorHover = throttle((index: number) => {\n handleIndicatorHover(index)\n }, THROTTLE_TIME)\n\n function pauseTimer() {\n if (timer.value) {\n clearInterval(timer.value)\n timer.value = null\n }\n }\n\n function startTimer() {\n if (props.interval <= 0 || !props.autoplay || timer.value) return\n timer.value = setInterval(() => playSlides(), props.interval)\n }\n\n const playSlides = () => {\n if (activeIndex.value < items.value.length - 1) {\n activeIndex.value = activeIndex.value + 1\n } else if (props.loop) {\n activeIndex.value = 0\n }\n }\n\n function setActiveItem(index: number | string) {\n if (isString(index)) {\n const filteredItems = items.value.filter(\n (item) => item.props.name === index\n )\n if (filteredItems.length > 0) {\n index = items.value.indexOf(filteredItems[0])\n }\n }\n index = Number(index)\n if (Number.isNaN(index) || index !== Math.floor(index)) {\n debugWarn(componentName, 'index must be integer.')\n return\n }\n const itemCount = items.value.length\n const oldIndex = activeIndex.value\n if (index < 0) {\n activeIndex.value = props.loop ? itemCount - 1 : 0\n } else if (index >= itemCount) {\n activeIndex.value = props.loop ? 0 : itemCount - 1\n } else {\n activeIndex.value = index\n }\n if (oldIndex === activeIndex.value) {\n resetItemPosition(oldIndex)\n }\n resetTimer()\n }\n\n function resetItemPosition(oldIndex?: number) {\n items.value.forEach((item, index) => {\n item.translateItem(index, activeIndex.value, oldIndex)\n })\n }\n\n function itemInStage(item: CarouselItemContext, index: number) {\n const _items = unref(items)\n const itemCount = _items.length\n if (itemCount === 0 || !item.states.inStage) return false\n const nextItemIndex = index + 1\n const prevItemIndex = index - 1\n const lastItemIndex = itemCount - 1\n const isLastItemActive = _items[lastItemIndex].states.active\n const isFirstItemActive = _items[0].states.active\n const isNextItemActive = _items[nextItemIndex]?.states?.active\n const isPrevItemActive = _items[prevItemIndex]?.states?.active\n\n if ((index === lastItemIndex && isFirstItemActive) || isNextItemActive) {\n return 'left'\n } else if ((index === 0 && isLastItemActive) || isPrevItemActive) {\n return 'right'\n }\n return false\n }\n\n function handleMouseEnter() {\n hover.value = true\n if (props.pauseOnHover) {\n pauseTimer()\n }\n }\n\n function handleMouseLeave() {\n hover.value = false\n startTimer()\n }\n\n function handleButtonEnter(arrow: 'left' | 'right') {\n if (unref(isVertical)) return\n items.value.forEach((item, index) => {\n if (arrow === itemInStage(item, index)) {\n item.states.hover = true\n }\n })\n }\n\n function handleButtonLeave() {\n if (unref(isVertical)) return\n items.value.forEach((item) => {\n item.states.hover = false\n })\n }\n\n function handleIndicatorClick(index: number) {\n activeIndex.value = index\n }\n\n function handleIndicatorHover(index: number) {\n if (props.trigger === 'hover' && index !== activeIndex.value) {\n activeIndex.value = index\n }\n }\n\n function prev() {\n setActiveItem(activeIndex.value - 1)\n }\n\n function next() {\n setActiveItem(activeIndex.value + 1)\n }\n\n function resetTimer() {\n pauseTimer()\n startTimer()\n }\n\n function setContainerHeight(height: number) {\n if (props.height !== 'auto') return\n containerHeight.value = height\n }\n\n // watch\n watch(\n () => activeIndex.value,\n (current, prev) => {\n resetItemPosition(prev)\n if (prev > -1) {\n emit('change', current, prev)\n }\n }\n )\n watch(\n () => props.autoplay,\n (autoplay) => {\n autoplay ? startTimer() : pauseTimer()\n }\n )\n watch(\n () => props.loop,\n () => {\n setActiveItem(activeIndex.value)\n }\n )\n\n watch(\n () => props.interval,\n () => {\n resetTimer()\n }\n )\n\n watch(\n () => items.value,\n () => {\n if (items.value.length > 0) setActiveItem(props.initialIndex)\n }\n )\n\n const resizeObserver = shallowRef>()\n // lifecycle\n onMounted(() => {\n resizeObserver.value = useResizeObserver(root.value, () => {\n resetItemPosition()\n })\n startTimer()\n })\n\n onBeforeUnmount(() => {\n pauseTimer()\n if (root.value && resizeObserver.value) resizeObserver.value.stop()\n })\n\n // provide\n provide(carouselContextKey, {\n root,\n isCardType,\n isVertical,\n items,\n loop: props.loop,\n addItem,\n removeItem,\n setActiveItem,\n setContainerHeight,\n })\n\n return {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n throttledArrowClick,\n throttledIndicatorHover,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n name: { type: String, default: '' },\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes\n", "import {\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n unref,\n} from 'vue'\nimport { debugWarn, isUndefined } from '@element-plus/utils'\nimport { carouselContextKey } from './constants'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport const useCarouselItem = (\n props: CarouselItemProps,\n componentName: string\n) => {\n const carouselContext = inject(carouselContextKey)!\n // instance\n const instance = getCurrentInstance()!\n if (!carouselContext) {\n debugWarn(\n componentName,\n 'usage: '\n )\n }\n\n if (!instance) {\n debugWarn(\n componentName,\n 'compositional hook can only be invoked inside setups'\n )\n }\n\n const CARD_SCALE = 0.83\n\n const carouselItemRef = ref()\n const hover = ref(false)\n const translate = ref(0)\n const scale = ref(1)\n const active = ref(false)\n const ready = ref(false)\n const inStage = ref(false)\n const animating = ref(false)\n\n // computed\n const { isCardType, isVertical } = carouselContext\n\n // methods\n\n function processIndex(index: number, activeIndex: number, length: number) {\n const lastItemIndex = length - 1\n const prevItemIndex = activeIndex - 1\n const nextItemIndex = activeIndex + 1\n const halfItemIndex = length / 2\n\n if (activeIndex === 0 && index === lastItemIndex) {\n return -1\n } else if (activeIndex === lastItemIndex && index === 0) {\n return length\n } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {\n return length + 1\n } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {\n return -2\n }\n return index\n }\n\n function calcCardTranslate(index: number, activeIndex: number) {\n const parentWidth = unref(isVertical)\n ? carouselContext.root.value?.offsetHeight || 0\n : carouselContext.root.value?.offsetWidth || 0\n\n if (inStage.value) {\n return (parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1)) / 4\n } else if (index < activeIndex) {\n return (-(1 + CARD_SCALE) * parentWidth) / 4\n } else {\n return ((3 + CARD_SCALE) * parentWidth) / 4\n }\n }\n\n function calcTranslate(\n index: number,\n activeIndex: number,\n isVertical: boolean\n ) {\n const rootEl = carouselContext.root.value\n if (!rootEl) return 0\n\n const distance =\n (isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0\n return distance * (index - activeIndex)\n }\n\n const translateItem = (\n index: number,\n activeIndex: number,\n oldIndex?: number\n ) => {\n const _isCardType = unref(isCardType)\n const carouselItemLength = carouselContext.items.value.length ?? Number.NaN\n\n const isActive = index === activeIndex\n if (!_isCardType && !isUndefined(oldIndex)) {\n animating.value = isActive || index === oldIndex\n }\n\n if (!isActive && carouselItemLength > 2 && carouselContext.loop) {\n index = processIndex(index, activeIndex, carouselItemLength)\n }\n\n const _isVertical = unref(isVertical)\n active.value = isActive\n\n if (_isCardType) {\n inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1\n translate.value = calcCardTranslate(index, activeIndex)\n scale.value = unref(active) ? 1 : CARD_SCALE\n } else {\n translate.value = calcTranslate(index, activeIndex, _isVertical)\n }\n\n ready.value = true\n\n if (isActive && carouselItemRef.value) {\n carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight)\n }\n }\n\n function handleItemClick() {\n if (carouselContext && unref(isCardType)) {\n const index = carouselContext.items.value.findIndex(\n ({ uid }) => uid === instance.uid\n )\n carouselContext.setActiveItem(index)\n }\n }\n\n // lifecycle\n onMounted(() => {\n carouselContext.addItem({\n props,\n states: reactive({\n hover,\n translate,\n scale,\n active,\n ready,\n inStage,\n animating,\n }),\n uid: instance.uid,\n translateItem,\n })\n })\n\n onUnmounted(() => {\n carouselContext.removeItem(instance.uid)\n })\n\n return {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n }\n}\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Carousel from './src/carousel.vue'\nimport CarouselItem from './src/carousel-item.vue'\n\nexport const ElCarousel = withInstall(Carousel, {\n CarouselItem,\n})\n\nexport default ElCarousel\n\nexport const ElCarouselItem = withNoopInstall(CarouselItem)\n\nexport * from './src/carousel'\nexport * from './src/carousel-item'\nexport * from './src/constants'\n\nexport type { CarouselInstance, CarouselItemInstance } from './src/instance'\n", "import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType\n", "import type { InjectionKey, ToRefs, WritableComputedRef } from 'vue'\nimport type { CheckboxGroupProps } from './checkbox-group'\n\ntype CheckboxGroupContext = {\n modelValue?: WritableComputedRef\n changeEvent?: (...args: any) => any\n} & ToRefs<\n Pick<\n CheckboxGroupProps,\n 'size' | 'min' | 'max' | 'disabled' | 'validateEvent' | 'fill' | 'textColor'\n >\n>\n\nexport const checkboxGroupContextKey: InjectionKey =\n Symbol('checkboxGroupContextKey')\n", "import { computed, inject } from 'vue'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { CheckboxModel, CheckboxStatus } from '../composables'\n\nexport const useCheckboxDisabled = ({\n model,\n isChecked,\n}: Pick & Pick) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n\n const isLimitDisabled = computed(() => {\n const max = checkboxGroup?.max?.value\n const min = checkboxGroup?.min?.value\n return (\n (!isUndefined(max) && model.value.length >= max && !isChecked.value) ||\n (!isUndefined(min) && model.value.length <= min && isChecked.value)\n )\n })\n\n const isDisabled = useFormDisabled(\n computed(() => checkboxGroup?.disabled.value || isLimitDisabled.value)\n )\n\n return {\n isDisabled,\n isLimitDisabled,\n }\n}\n\nexport type CheckboxDisabled = ReturnType\n", "import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick &\n Pick &\n Pick &\n Pick, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return value === props.trueLabel || value === true\n ? props.trueLabel ?? true\n : props.falseLabel ?? false\n }\n\n function emitChangeEvent(\n checked: string | number | boolean,\n e: InputEvent | MouseEvent\n ) {\n emit('change', getLabeledValue(checked), e)\n }\n\n function handleChange(e: Event) {\n if (isLimitExceeded.value) return\n\n const target = e.target as HTMLInputElement\n emit('change', getLabeledValue(target.checked), e)\n }\n\n async function onClickRoot(e: MouseEvent) {\n if (isLimitExceeded.value) return\n\n if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {\n // fix: https://github.com/element-plus/element-plus/issues/9981\n const eventTargets: EventTarget[] = e.composedPath()\n const hasLabel = eventTargets.some(\n (item) => (item as HTMLElement).tagName === 'LABEL'\n )\n if (!hasLabel) {\n model.value = getLabeledValue(\n [false, props.falseLabel].includes(model.value)\n )\n await nextTick()\n emitChangeEvent(model.value, e)\n }\n }\n }\n\n const validateEvent = computed(\n () => checkboxGroup?.validateEvent || props.validateEvent\n )\n\n watch(\n () => props.modelValue,\n () => {\n if (validateEvent.value) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n handleChange,\n onClickRoot,\n }\n}\n", "import { computed, getCurrentInstance, inject, ref } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { CheckboxProps } from '../checkbox'\n\nexport const useCheckboxModel = (props: CheckboxProps) => {\n const selfModel = ref(false)\n const { emit } = getCurrentInstance()!\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isGroup = computed(() => isUndefined(checkboxGroup) === false)\n const isLimitExceeded = ref(false)\n const model = computed({\n get() {\n return isGroup.value\n ? checkboxGroup?.modelValue?.value\n : props.modelValue ?? selfModel.value\n },\n\n set(val: unknown) {\n if (isGroup.value && isArray(val)) {\n isLimitExceeded.value =\n checkboxGroup?.max?.value !== undefined &&\n val.length > checkboxGroup?.max.value\n isLimitExceeded.value === false && checkboxGroup?.changeEvent?.(val)\n } else {\n emit(UPDATE_MODEL_EVENT, val)\n selfModel.value = val\n }\n },\n })\n\n return {\n model,\n isGroup,\n isLimitExceeded,\n }\n}\n\nexport type CheckboxModel = ReturnType\n", "import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed(() => {\n return !!(slots.default || props.label)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n }\n}\n\nexport type CheckboxStatus = ReturnType\n", "import { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray } from '@element-plus/utils'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from './use-checkbox-model'\n\nconst setStoreValue = (\n props: CheckboxProps,\n { model }: Pick\n) => {\n function addToStore() {\n if (isArray(model.value) && !model.value.includes(props.label)) {\n model.value.push(props.label)\n } else {\n model.value = props.trueLabel || true\n }\n }\n props.checked && addToStore()\n}\n\nexport const useCheckbox = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots']\n) => {\n const { formItem: elFormItem } = useFormItem()\n const { model, isGroup, isLimitExceeded } = useCheckboxModel(props)\n const {\n isFocused,\n isChecked,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n } = useCheckboxStatus(props, slots, { model })\n const { isDisabled } = useCheckboxDisabled({ model, isChecked })\n const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n disableIdGeneration: hasOwnLabel,\n disableIdManagement: isGroup,\n })\n const { handleChange, onClickRoot } = useCheckboxEvent(props, {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n })\n\n setStoreValue(props, { model })\n\n return {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n }\n}\n", "\n\n\n", "\n\n\n", "import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, isArray } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type checkboxGroup from './checkbox-group.vue'\nimport type { CheckboxValueType } from './checkbox'\n\nexport type CheckboxGroupValueType = Exclude[]\n\nexport const checkboxGroupProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType(Array),\n default: () => [],\n },\n /**\n * @description whether the nesting checkboxes are disabled\n */\n disabled: Boolean,\n /**\n * @description minimum number of checkbox checked\n */\n min: Number,\n /**\n * @description maximum number of checkbox checked\n */\n max: Number,\n /**\n * @description size of checkbox\n */\n size: useSizeProp,\n /**\n * @description label for screen reader\n */\n label: String,\n /**\n * @description border and background color when button is active\n */\n fill: String,\n /**\n * @description font color when button is active\n */\n textColor: String,\n /**\n * @description element tag of the checkbox group\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const checkboxGroupEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxGroupValueType) => isArray(val),\n change: (val: CheckboxValueType[]) => isArray(val),\n}\n\nexport type CheckboxGroupProps = ExtractPropTypes\nexport type CheckboxGroupEmits = typeof checkboxGroupEmits\nexport type CheckboxGroupInstance = InstanceType\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Checkbox from './src/checkbox.vue'\nimport CheckboxButton from './src/checkbox-button.vue'\nimport CheckboxGroup from './src/checkbox-group.vue'\n\nexport const ElCheckbox = withInstall(Checkbox, {\n CheckboxButton,\n CheckboxGroup,\n})\nexport default ElCheckbox\n\nexport const ElCheckboxButton = withNoopInstall(CheckboxButton)\nexport const ElCheckboxGroup = withNoopInstall(CheckboxGroup)\n\nexport * from './src/checkbox-group'\nexport * from './src/checkbox'\nexport * from './src/constants'\n", "import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description the value of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: '',\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType\n", "import type { InjectionKey } from 'vue'\nimport type { RadioGroupProps } from './radio-group'\n\nexport interface RadioGroupContext extends RadioGroupProps {\n changeEvent: (val: RadioGroupProps['modelValue']) => void\n}\n\nexport const radioGroupKey: InjectionKey =\n Symbol('radioGroupKey')\n", "import { computed, inject, ref } from 'vue'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useFormDisabled, useFormSize } from '@element-plus/components/form'\nimport { radioGroupKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { RadioEmits, RadioProps } from './radio'\n\nexport const useRadio = (\n props: { label: RadioProps['label']; modelValue?: RadioProps['modelValue'] },\n emit?: SetupContext['emit']\n) => {\n const radioRef = ref()\n const radioGroup = inject(radioGroupKey, undefined)\n const isGroup = computed(() => !!radioGroup)\n const modelValue = computed({\n get() {\n return isGroup.value ? radioGroup!.modelValue : props.modelValue!\n },\n set(val) {\n if (isGroup.value) {\n radioGroup!.changeEvent(val)\n } else {\n emit && emit(UPDATE_MODEL_EVENT, val)\n }\n radioRef.value!.checked = props.modelValue === props.label\n },\n })\n\n const size = useFormSize(computed(() => radioGroup?.size))\n const disabled = useFormDisabled(computed(() => radioGroup?.disabled))\n const focus = ref(false)\n const tabIndex = computed(() => {\n return disabled.value || (isGroup.value && modelValue.value !== props.label)\n ? -1\n : 0\n })\n\n return {\n radioRef,\n isGroup,\n radioGroup,\n focus,\n size,\n disabled,\n tabIndex,\n modelValue,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes\nexport type RadioButtonInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\nimport type { ExtractPropTypes } from '@vue/runtime-core'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @description same as `aria-label` in RadioGroup\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type RadioGroupProps = ExtractPropTypes\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Radio from './src/radio.vue'\nimport RadioButton from './src/radio-button.vue'\nimport RadioGroup from './src/radio-group.vue'\n\nexport const ElRadio = withInstall(Radio, {\n RadioButton,\n RadioGroup,\n})\nexport default ElRadio\nexport const ElRadioGroup = withNoopInstall(RadioGroup)\nexport const ElRadioButton = withNoopInstall(RadioButton)\n\nexport * from './src/radio'\nexport * from './src/radio-group'\nexport * from './src/radio-button'\nexport * from './src/constants'\n", "// @ts-nocheck\nimport { defineComponent, h } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nexport default defineComponent({\n name: 'NodeContent',\n setup() {\n const ns = useNamespace('cascader-node')\n return {\n ns,\n }\n },\n render() {\n const { ns } = this\n const { node, panel } = this.$parent\n const { data, label } = node\n const { renderLabelFn } = panel\n return h(\n 'span',\n { class: ns.e('label') },\n renderLabelFn ? renderLabelFn({ node, data }) : label\n )\n },\n})\n", "// @ts-nocheck\nimport type { InjectionKey, VNode } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n default as CascaderNode,\n CascaderOption,\n CascaderProps,\n ExpandTrigger,\n} from './node'\n\nexport type { CascaderNode, CascaderOption, CascaderProps, ExpandTrigger }\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required\nexport type isDisabled = (data: CascaderOption, node: CascaderNode) => boolean\nexport type isLeaf = (data: CascaderOption, node: CascaderNode) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: CascaderNode, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: CascaderNode,\n data: CascaderOption,\n}) => VNode | VNode[]\n\nexport interface Tag {\n node?: CascaderNode\n key: number\n text: string\n hitState?: boolean\n closable: boolean\n isCollapseTag: boolean\n}\n\nexport interface ElCascaderPanelContext {\n config: CascaderConfig\n expandingNode: Nullable\n checkedNodes: CascaderNode[]\n isHoverMenu: boolean\n initialLoaded: boolean\n renderLabelFn: RenderLabel\n lazyLoad: (\n node?: CascaderNode,\n cb?: (dataList: CascaderOption[]) => void\n ) => void\n expandNode: (node: CascaderNode, silent?: boolean) => void\n handleCheckChange: (\n node: CascaderNode,\n checked: boolean,\n emitClose?: boolean\n ) => void\n}\n\nexport const CASCADER_PANEL_INJECTION_KEY: InjectionKey =\n Symbol()\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { capitalize, isEmpty, isUndefined } from '@element-plus/utils'\nimport type { VNode } from 'vue'\n\nexport type CascaderNodeValue = string | number\nexport type CascaderNodePathValue = CascaderNodeValue[]\nexport type CascaderValue =\n | CascaderNodeValue\n | CascaderNodePathValue\n | (CascaderNodeValue | CascaderNodePathValue)[]\nexport type CascaderConfig = Required\nexport type ExpandTrigger = 'click' | 'hover'\nexport type isDisabled = (data: CascaderOption, node: Node) => boolean\nexport type isLeaf = (data: CascaderOption, node: Node) => boolean\nexport type Resolve = (dataList?: CascaderOption[]) => void\nexport type LazyLoad = (node: Node, resolve: Resolve) => void\nexport type RenderLabel = ({\n node: Node,\n data: CascaderOption,\n}) => VNode | VNode[]\nexport interface CascaderOption extends Record {\n label?: string\n value?: CascaderNodeValue\n children?: CascaderOption[]\n disabled?: boolean\n leaf?: boolean\n}\n\nexport interface CascaderProps {\n expandTrigger?: ExpandTrigger\n multiple?: boolean\n checkStrictly?: boolean\n emitPath?: boolean\n lazy?: boolean\n lazyLoad?: LazyLoad\n value?: string\n label?: string\n children?: string\n disabled?: string | isDisabled\n leaf?: string | isLeaf\n hoverThreshold?: number\n}\n\nexport type Nullable = null | T\n\ntype ChildrenData = CascaderOption[] | undefined\n\nlet uid = 0\n\nconst calculatePathNodes = (node: Node) => {\n const nodes = [node]\n let { parent } = node\n\n while (parent) {\n nodes.unshift(parent)\n parent = parent.parent\n }\n\n return nodes\n}\n\nclass Node {\n readonly uid: number = uid++\n readonly level: number\n readonly value: CascaderNodeValue\n readonly label: string\n readonly pathNodes: Node[]\n readonly pathValues: CascaderNodePathValue\n readonly pathLabels: string[]\n\n childrenData: ChildrenData\n children: Node[]\n text: string\n loaded: boolean\n /**\n * Is it checked\n *\n * @default false\n */\n checked = false\n /**\n * Used to indicate the intermediate state of unchecked and fully checked child nodes\n *\n * @default false\n */\n indeterminate = false\n /**\n * Loading Status\n *\n * @default false\n */\n loading = false\n\n constructor(\n readonly data: Nullable,\n readonly config: CascaderConfig,\n readonly parent?: Node,\n readonly root = false\n ) {\n const { value: valueKey, label: labelKey, children: childrenKey } = config\n\n const childrenData = data[childrenKey] as ChildrenData\n const pathNodes = calculatePathNodes(this)\n\n this.level = root ? 0 : parent ? parent.level + 1 : 1\n this.value = data[valueKey] as CascaderNodeValue\n this.label = data[labelKey] as string\n this.pathNodes = pathNodes\n this.pathValues = pathNodes.map((node) => node.value)\n this.pathLabels = pathNodes.map((node) => node.label)\n this.childrenData = childrenData\n this.children = (childrenData || []).map(\n (child) => new Node(child, config, this)\n )\n this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData)\n }\n\n get isDisabled(): boolean {\n const { data, parent, config } = this\n const { disabled, checkStrictly } = config\n const isDisabled = isFunction(disabled)\n ? disabled(data, this)\n : !!data[disabled]\n return isDisabled || (!checkStrictly && parent?.isDisabled)\n }\n\n get isLeaf(): boolean {\n const { data, config, childrenData, loaded } = this\n const { lazy, leaf } = config\n const isLeaf = isFunction(leaf) ? leaf(data, this) : data[leaf]\n\n return isUndefined(isLeaf)\n ? lazy && !loaded\n ? false\n : !(Array.isArray(childrenData) && childrenData.length)\n : !!isLeaf\n }\n\n get valueByOption() {\n return this.config.emitPath ? this.pathValues : this.value\n }\n\n appendChild(childData: CascaderOption) {\n const { childrenData, children } = this\n const node = new Node(childData, this.config, this)\n\n if (Array.isArray(childrenData)) {\n childrenData.push(childData)\n } else {\n this.childrenData = [childData]\n }\n\n children.push(node)\n\n return node\n }\n\n calcText(allLevels: boolean, separator: string) {\n const text = allLevels ? this.pathLabels.join(separator) : this.label\n this.text = text\n return text\n }\n\n broadcast(event: string, ...args: unknown[]) {\n const handlerName = `onParent${capitalize(event)}`\n this.children.forEach((child) => {\n if (child) {\n // bottom up\n child.broadcast(event, ...args)\n child[handlerName] && child[handlerName](...args)\n }\n })\n }\n\n emit(event: string, ...args: unknown[]) {\n const { parent } = this\n const handlerName = `onChild${capitalize(event)}`\n if (parent) {\n parent[handlerName] && parent[handlerName](...args)\n parent.emit(event, ...args)\n }\n }\n\n onParentCheck(checked: boolean) {\n if (!this.isDisabled) {\n this.setCheckState(checked)\n }\n }\n\n onChildCheck() {\n const { children } = this\n const validChildren = children.filter((child) => !child.isDisabled)\n const checked = validChildren.length\n ? validChildren.every((child) => child.checked)\n : false\n\n this.setCheckState(checked)\n }\n\n setCheckState(checked: boolean) {\n const totalNum = this.children.length\n const checkedNum = this.children.reduce((c, p) => {\n const num = p.checked ? 1 : p.indeterminate ? 0.5 : 0\n return c + num\n }, 0)\n\n this.checked =\n this.loaded &&\n this.children\n .filter((child) => !child.isDisabled)\n .every((child) => child.loaded && child.checked) &&\n checked\n this.indeterminate =\n this.loaded && checkedNum !== totalNum && checkedNum > 0\n }\n\n doCheck(checked: boolean) {\n if (this.checked === checked) return\n\n const { checkStrictly, multiple } = this.config\n\n if (checkStrictly || !multiple) {\n this.checked = checked\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast('check', checked)\n this.setCheckState(checked)\n this.emit('check')\n }\n }\n}\n\nexport default Node\n", "import { isEqual } from 'lodash-unified'\nimport Node from './node'\n\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n CascaderConfig,\n CascaderNodePathValue,\n CascaderNodeValue,\n CascaderOption,\n} from './node'\n\nconst flatNodes = (nodes: Node[], leafOnly: boolean) => {\n return nodes.reduce((res, node) => {\n if (node.isLeaf) {\n res.push(node)\n } else {\n !leafOnly && res.push(node)\n res = res.concat(flatNodes(node.children, leafOnly))\n }\n return res\n }, [] as Node[])\n}\n\nexport default class Store {\n readonly nodes: Node[]\n readonly allNodes: Node[]\n readonly leafNodes: Node[]\n\n constructor(data: CascaderOption[], readonly config: CascaderConfig) {\n const nodes = (data || []).map(\n (nodeData) => new Node(nodeData, this.config)\n )\n this.nodes = nodes\n this.allNodes = flatNodes(nodes, false)\n this.leafNodes = flatNodes(nodes, true)\n }\n\n getNodes() {\n return this.nodes\n }\n\n getFlattedNodes(leafOnly: boolean) {\n return leafOnly ? this.leafNodes : this.allNodes\n }\n\n appendNode(nodeData: CascaderOption, parentNode?: Node) {\n const node = parentNode\n ? parentNode.appendChild(nodeData)\n : new Node(nodeData, this.config)\n\n if (!parentNode) this.nodes.push(node)\n\n this.allNodes.push(node)\n node.isLeaf && this.leafNodes.push(node)\n }\n\n appendNodes(nodeDataList: CascaderOption[], parentNode: Node) {\n nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode))\n }\n\n // when checkStrictly, leaf node first\n getNodeByValue(\n value: CascaderNodeValue | CascaderNodePathValue,\n leafOnly = false\n ): Nullable {\n if (!value && value !== 0) return null\n\n const node = this.getFlattedNodes(leafOnly).find(\n (node) => isEqual(node.value, value) || isEqual(node.pathValues, value)\n )\n\n return node || null\n }\n\n getSameNode(node: Node): Nullable {\n if (!node) return null\n\n const node_ = this.getFlattedNodes(false).find(\n ({ value, level }) => isEqual(node.value, value) && node.level === level\n )\n\n return node_ || null\n }\n}\n", "import { computed } from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport type {\n CascaderConfig,\n CascaderOption,\n CascaderProps,\n CascaderValue,\n} from './node'\n\nexport const CommonProps = buildProps({\n /**\n * @description specify which key of node object is used as the node's value\n */\n modelValue: {\n type: definePropType([Number, String, Array]),\n },\n /**\n * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n */\n options: {\n type: definePropType(Array),\n default: () => [] as CascaderOption[],\n },\n /**\n * @description configuration options, see the following `CascaderProps` table.\n */\n props: {\n type: definePropType(Object),\n default: () => ({} as CascaderProps),\n },\n} as const)\n\nexport const DefaultProps: CascaderConfig = {\n /**\n * @description trigger mode of expanding options\n */\n expandTrigger: 'click',\n /**\n * @description whether multiple selection is enabled\n */\n multiple: false,\n /**\n * @description whether checked state of a node not affects its parent and child nodes\n */\n checkStrictly: false, // whether all nodes can be selected\n /**\n * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n */\n emitPath: true, // wether to emit an array of all levels value in which node is located\n /**\n * @description whether to dynamic load child nodes, use with `lazyload` attribute\n */\n lazy: false,\n /**\n * @description method for loading child nodes data, only works when `lazy` is true\n */\n lazyLoad: NOOP,\n /**\n * @description specify which key of node object is used as the node's value\n */\n value: 'value',\n /**\n * @description specify which key of node object is used as the node's label\n */\n label: 'label',\n /**\n * @description specify which key of node object is used as the node's children\n */\n children: 'children',\n /**\n * @description specify which key of node object is used as the node's leaf\n */\n leaf: 'leaf',\n /**\n * @description specify which key of node object is used as the node's disabled\n */\n disabled: 'disabled',\n /**\n * @description hover threshold of expanding options\n */\n hoverThreshold: 500,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps }) => {\n return computed(() => ({\n ...DefaultProps,\n ...props.props,\n }))\n}\n", "import { isLeaf } from '@element-plus/utils'\nimport type { default as CascaderNode } from './node'\n\nexport const getMenuIndex = (el: HTMLElement) => {\n if (!el) return 0\n const pieces = el.id.split('-')\n return Number(pieces[pieces.length - 2])\n}\n\nexport const checkNode = (el: HTMLElement) => {\n if (!el) return\n\n const input = el.querySelector('input')\n if (input) {\n input.click()\n } else if (isLeaf(el)) {\n el.click()\n }\n}\n\nexport const sortByOriginalOrder = (\n oldNodes: CascaderNode[],\n newNodes: CascaderNode[]\n) => {\n const newNodesCopy = newNodes.slice(0)\n const newIds = newNodesCopy.map((node) => node.uid)\n const res = oldNodes.reduce((acc, item) => {\n const index = newIds.indexOf(item.uid)\n if (index > -1) {\n acc.push(item)\n newNodesCopy.splice(index, 1)\n newIds.splice(index, 1)\n }\n return acc\n }, [] as CascaderNode[])\n\n res.push(...newNodesCopy)\n\n return res\n}\n", "\n\n\n", "import CascaderPanel from './src/index.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCascaderPanel.install = (app: App): void => {\n app.component(CascaderPanel.name, CascaderPanel)\n}\n\nconst _CascaderPanel = CascaderPanel as SFCWithInstall\n\nexport default _CascaderPanel\nexport const ElCascaderPanel = _CascaderPanel\nexport * from './src/types'\nexport * from './src/config'\nexport * from './src/instance'\n", "import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type Tag from './tag.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\nexport type TagProps = ExtractPropTypes\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Tag from './src/tag.vue'\n\nexport const ElTag = withInstall(Tag)\nexport default ElTag\n\nexport * from './src/tag'\n", "import { CommonProps } from '@element-plus/components/cascader-panel'\nimport { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type {\n CascaderNode,\n CascaderValue,\n} from '@element-plus/components/cascader-panel'\n\nexport const cascaderProps = buildProps({\n ...CommonProps,\n /**\n * @description size of input\n */\n size: useSizeProp,\n /**\n * @description placeholder of input\n */\n placeholder: String,\n /**\n * @description whether Cascader is disabled\n */\n disabled: Boolean,\n /**\n * @description whether selected value can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether the options can be searched\n */\n filterable: Boolean,\n /**\n * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.\n */\n filterMethod: {\n type: definePropType<(node: CascaderNode, keyword: string) => boolean>(\n Function\n ),\n default: (node: CascaderNode, keyword: string) =>\n node.text.includes(keyword),\n },\n /**\n * @description option label separator\n */\n separator: {\n type: String,\n default: ' / ',\n },\n /**\n * @description whether to display all levels of the selected value in the input\n */\n showAllLevels: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to collapse tags in multiple selection mode\n */\n collapseTags: Boolean,\n /**\n * @description The max tags number to be shown. To use this, collapse-tags must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description native input id\n */\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n /**\n * @description debounce delay when typing filter keyword, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted\n */\n beforeFilter: {\n type: definePropType<(value: string) => boolean | Promise>(Function),\n default: () => true,\n },\n /**\n * @description custom class name for Cascader's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether cascader popup is teleported\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const cascaderEmits = {\n [UPDATE_MODEL_EVENT]: (val: CascaderValue) => !!val || val === null,\n [CHANGE_EVENT]: (val: CascaderValue) => !!val || val === null,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n visibleChange: (val: boolean) => isBoolean(val),\n expandChange: (val: CascaderValue) => !!val,\n removeTag: (val: CascaderNode['valueByOption']) => !!val,\n}\n\n// Type name is taken(cascader-panel/src/node), needs discussion\n// export type CascaderProps = ExtractPropTypes\n\nexport type CascaderEmits = typeof cascaderEmits\n", "\n\n\n", "import Cascader from './src/cascader.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCascader.install = (app: App): void => {\n app.component(Cascader.name, Cascader)\n}\n\nconst _Cascader = Cascader as SFCWithInstall\n\nexport default _Cascader\nexport const ElCascader = _Cascader\n\nexport * from './src/cascader'\nexport * from './src/instances'\n", "import { buildProps, isBoolean } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type CheckTag from './check-tag.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const checkTagProps = buildProps({\n /**\n * @description is checked\n */\n checked: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type CheckTagProps = ExtractPropTypes\n\nexport const checkTagEmits = {\n 'update:checked': (value: boolean) => isBoolean(value),\n [CHANGE_EVENT]: (value: boolean) => isBoolean(value),\n}\nexport type CheckTagEmits = typeof checkTagEmits\n\nexport type CheckTagInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport CheckTag from './src/check-tag.vue'\n\nexport const ElCheckTag = withInstall(CheckTag)\nexport default ElCheckTag\n\nexport * from './src/check-tag'\n", "import type { ComputedRef, InjectionKey } from 'vue'\n\ninterface RowContext {\n gutter: ComputedRef\n}\n\nexport const rowContextKey: InjectionKey = Symbol('rowContextKey')\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Row from './row.vue'\n\nexport const RowJustify = [\n 'start',\n 'center',\n 'end',\n 'space-around',\n 'space-between',\n 'space-evenly',\n] as const\n\nexport const RowAlign = ['top', 'middle', 'bottom'] as const\n\nexport const rowProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description grid spacing\n */\n gutter: {\n type: Number,\n default: 0,\n },\n /**\n * @description horizontal alignment of flex layout\n */\n justify: {\n type: String,\n values: RowJustify,\n default: 'start',\n },\n /**\n * @description vertical alignment of flex layout\n */\n align: {\n type: String,\n values: RowAlign,\n },\n} as const)\n\nexport type RowProps = ExtractPropTypes\nexport type RowInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Row from './src/row.vue'\n\nexport const ElRow = withInstall(Row)\nexport default ElRow\n\nexport * from './src/row'\nexport * from './src/constants'\n", "import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes\nexport type ColInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Col from './src/col.vue'\n\nexport const ElCol = withInstall(Col)\nexport default ElCol\n\nexport * from './src/col'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Arrayable } from '@element-plus/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n typeof isNumber(value) || isString(value) || Array.isArray(value)\n\nexport const collapseProps = buildProps({\n accordion: Boolean,\n modelValue: {\n type: definePropType([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n", "import type { InjectionKey, Ref } from 'vue'\nimport type { CollapseActiveName } from './collapse'\n\nexport interface CollapseContext {\n activeNames: Ref\n handleItemClick: (name: CollapseActiveName) => void\n}\n\nexport const collapseContextKey: InjectionKey =\n Symbol('collapseContextKey')\n", "import { computed, provide, ref, watch } from 'vue'\nimport { ensureArray } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { collapseContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type {\n CollapseActiveName,\n CollapseEmits,\n CollapseProps,\n} from './collapse'\n\nexport const useCollapse = (\n props: CollapseProps,\n emit: SetupContext['emit']\n) => {\n const activeNames = ref(ensureArray(props.modelValue))\n\n const setActiveNames = (_activeNames: CollapseActiveName[]) => {\n activeNames.value = _activeNames\n const value = props.accordion ? activeNames.value[0] : activeNames.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n }\n\n const handleItemClick = (name: CollapseActiveName) => {\n if (props.accordion) {\n setActiveNames([activeNames.value[0] === name ? '' : name])\n } else {\n const _activeNames = [...activeNames.value]\n const index = _activeNames.indexOf(name)\n\n if (index > -1) {\n _activeNames.splice(index, 1)\n } else {\n _activeNames.push(name)\n }\n setActiveNames(_activeNames)\n }\n }\n\n watch(\n () => props.modelValue,\n () => (activeNames.value = ensureArray(props.modelValue)),\n { deep: true }\n )\n\n provide(collapseContextKey, {\n activeNames,\n handleItemClick,\n })\n return {\n activeNames,\n setActiveNames,\n }\n}\n\nexport const useCollapseDOM = () => {\n const ns = useNamespace('collapse')\n\n const rootKls = computed(() => ns.b())\n return {\n rootKls,\n }\n}\n", "\n\n\n", "\n\n", "import CollapseTransition from './src/collapse-transition.vue'\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nCollapseTransition.install = (app: App): void => {\n app.component(CollapseTransition.name, CollapseTransition)\n}\n\nconst _CollapseTransition = CollapseTransition as SFCWithInstall<\n typeof CollapseTransition\n>\n\nexport default _CollapseTransition\nexport const ElCollapseTransition = _CollapseTransition\n", "import { buildProps, definePropType, generateId } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { CollapseActiveName } from './collapse'\n\nexport const collapseItemProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n name: {\n type: definePropType([String, Number]),\n default: () => generateId(),\n },\n disabled: Boolean,\n} as const)\nexport type CollapseItemProps = ExtractPropTypes\n", "import { computed, inject, ref, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { generateId } from '@element-plus/utils'\nimport { collapseContextKey } from './constants'\n\nimport type { CollapseItemProps } from './collapse-item'\n\nexport const useCollapseItem = (props: CollapseItemProps) => {\n const collapse = inject(collapseContextKey)\n\n const focusing = ref(false)\n const isClick = ref(false)\n const id = ref(generateId())\n\n const isActive = computed(() =>\n collapse?.activeNames.value.includes(props.name)\n )\n\n const handleFocus = () => {\n setTimeout(() => {\n if (!isClick.value) {\n focusing.value = true\n } else {\n isClick.value = false\n }\n }, 50)\n }\n\n const handleHeaderClick = () => {\n if (props.disabled) return\n collapse?.handleItemClick(props.name)\n focusing.value = false\n isClick.value = true\n }\n\n const handleEnterClick = () => {\n collapse?.handleItemClick(props.name)\n }\n\n return {\n focusing,\n id,\n isActive,\n handleFocus,\n handleHeaderClick,\n handleEnterClick,\n }\n}\n\nexport const useCollapseItemDOM = (\n props: CollapseItemProps,\n { focusing, isActive, id }: Partial>\n) => {\n const ns = useNamespace('collapse')\n\n const rootKls = computed(() => [\n ns.b('item'),\n ns.is('active', unref(isActive)),\n ns.is('disabled', props.disabled),\n ])\n const headKls = computed(() => [\n ns.be('item', 'header'),\n ns.is('active', unref(isActive)),\n { focusing: unref(focusing) && !props.disabled },\n ])\n const arrowKls = computed(() => [\n ns.be('item', 'arrow'),\n ns.is('active', unref(isActive)),\n ])\n const itemWrapperKls = computed(() => ns.be('item', 'wrap'))\n const itemContentKls = computed(() => ns.be('item', 'content'))\n const scopedContentId = computed(() => ns.b(`content-${unref(id)}`))\n const scopedHeadId = computed(() => ns.b(`head-${unref(id)}`))\n\n return {\n arrowKls,\n headKls,\n rootKls,\n itemWrapperKls,\n itemContentKls,\n scopedContentId,\n scopedHeadId,\n }\n}\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Collapse from './src/collapse.vue'\nimport CollapseItem from './src/collapse-item.vue'\n\nexport const ElCollapse = withInstall(Collapse, {\n CollapseItem,\n})\nexport default ElCollapse\nexport const ElCollapseItem = withNoopInstall(CollapseItem)\n\nexport * from './src/collapse'\nexport * from './src/collapse-item'\nexport * from './src/constants'\nexport type { CollapseInstance, CollapseItemInstance } from './src/instance'\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Color from '../utils/color'\n\nexport const alphaSliderProps = buildProps({\n color: {\n type: definePropType(Object),\n required: true,\n },\n vertical: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type AlphaSliderProps = ExtractPropTypes\n", "import { isClient } from '@element-plus/utils'\n\nlet isDragging = false\n\nexport interface DraggableOptions {\n drag?: (event: MouseEvent | TouchEvent) => void\n start?: (event: MouseEvent | TouchEvent) => void\n end?: (event: MouseEvent | TouchEvent) => void\n}\n\nexport function draggable(element: HTMLElement, options: DraggableOptions) {\n if (!isClient) return\n\n const moveFn = function (event: MouseEvent | TouchEvent) {\n options.drag?.(event)\n }\n\n const upFn = function (event: MouseEvent | TouchEvent) {\n document.removeEventListener('mousemove', moveFn)\n document.removeEventListener('mouseup', upFn)\n document.removeEventListener('touchmove', moveFn)\n document.removeEventListener('touchend', upFn)\n document.onselectstart = null\n document.ondragstart = null\n\n isDragging = false\n\n options.end?.(event)\n }\n\n const downFn = function (event: MouseEvent | TouchEvent) {\n if (isDragging) return\n event.preventDefault()\n document.onselectstart = () => false\n document.ondragstart = () => false\n document.addEventListener('mousemove', moveFn)\n document.addEventListener('mouseup', upFn)\n document.addEventListener('touchmove', moveFn)\n document.addEventListener('touchend', upFn)\n\n isDragging = true\n\n options.start?.(event)\n }\n\n element.addEventListener('mousedown', downFn)\n element.addEventListener('touchstart', downFn)\n}\n", "import {\n computed,\n getCurrentInstance,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { addUnit, getClientXY } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { draggable } from '../utils/draggable'\n\nimport type { AlphaSliderProps } from '../props/alpha-slider'\n\nexport const useAlphaSlider = (props: AlphaSliderProps) => {\n const instance = getCurrentInstance()!\n\n const thumb = shallowRef()\n const bar = shallowRef()\n\n function handleClick(event: MouseEvent | TouchEvent) {\n const target = event.target\n\n if (target !== thumb.value) {\n handleDrag(event)\n }\n }\n\n function handleDrag(event: MouseEvent | TouchEvent) {\n if (!bar.value || !thumb.value) return\n\n const el = instance.vnode.el as HTMLElement\n const rect = el.getBoundingClientRect()\n const { clientX, clientY } = getClientXY(event)\n\n if (!props.vertical) {\n let left = clientX - rect.left\n left = Math.max(thumb.value.offsetWidth / 2, left)\n left = Math.min(left, rect.width - thumb.value.offsetWidth / 2)\n\n props.color.set(\n 'alpha',\n Math.round(\n ((left - thumb.value.offsetWidth / 2) /\n (rect.width - thumb.value.offsetWidth)) *\n 100\n )\n )\n } else {\n let top = clientY - rect.top\n top = Math.max(thumb.value.offsetHeight / 2, top)\n top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)\n\n props.color.set(\n 'alpha',\n Math.round(\n ((top - thumb.value.offsetHeight / 2) /\n (rect.height - thumb.value.offsetHeight)) *\n 100\n )\n )\n }\n }\n\n return {\n thumb,\n bar,\n handleDrag,\n handleClick,\n }\n}\n\nexport const useAlphaSliderDOM = (\n props: AlphaSliderProps,\n {\n bar,\n thumb,\n handleDrag,\n }: Pick, 'bar' | 'thumb' | 'handleDrag'>\n) => {\n const instance = getCurrentInstance()!\n\n const ns = useNamespace('color-alpha-slider')\n // refs\n\n const thumbLeft = ref(0)\n const thumbTop = ref(0)\n const background = ref()\n\n function getThumbLeft() {\n if (!thumb.value) return 0\n\n if (props.vertical) return 0\n const el = instance.vnode.el\n const alpha = props.color.get('alpha')\n\n if (!el) return 0\n return Math.round(\n (alpha * (el.offsetWidth - thumb.value.offsetWidth / 2)) / 100\n )\n }\n\n function getThumbTop() {\n if (!thumb.value) return 0\n\n const el = instance.vnode.el\n if (!props.vertical) return 0\n const alpha = props.color.get('alpha')\n\n if (!el) return 0\n return Math.round(\n (alpha * (el.offsetHeight - thumb.value.offsetHeight / 2)) / 100\n )\n }\n\n function getBackground() {\n if (props.color && props.color.value) {\n const { r, g, b } = props.color.toRgb()\n return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`\n }\n return ''\n }\n\n function update() {\n thumbLeft.value = getThumbLeft()\n thumbTop.value = getThumbTop()\n background.value = getBackground()\n }\n\n onMounted(() => {\n if (!bar.value || !thumb.value) return\n\n const dragConfig = {\n drag: (event: MouseEvent | TouchEvent) => {\n handleDrag(event)\n },\n end: (event: MouseEvent | TouchEvent) => {\n handleDrag(event)\n },\n }\n\n draggable(bar.value, dragConfig)\n draggable(thumb.value, dragConfig)\n update()\n })\n\n watch(\n () => props.color.get('alpha'),\n () => update()\n )\n watch(\n () => props.color.value,\n () => update()\n )\n\n const rootKls = computed(() => [ns.b(), ns.is('vertical', props.vertical)])\n const barKls = computed(() => ns.e('bar'))\n const thumbKls = computed(() => ns.e('thumb'))\n const barStyle = computed(() => ({ background: background.value }))\n const thumbStyle = computed(() => ({\n left: addUnit(thumbLeft.value),\n top: addUnit(thumbTop.value),\n }))\n\n return { rootKls, barKls, barStyle, thumbKls, thumbStyle, update }\n}\n", "\n\n\n", "\n\n\n", "import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n}\n\nexport type ColorPickerProps = ExtractPropTypes\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef\n}\n\nexport const colorPickerContextKey: InjectionKey = Symbol(\n 'colorPickerContextKey'\n)\n", "import { hasOwn } from '@element-plus/utils'\n\nconst hsv2hsl = function (hue: number, sat: number, val: number) {\n return [\n hue,\n (sat * val) / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,\n hue / 2,\n ]\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nconst isOnePointZero = function (n: unknown) {\n return typeof n === 'string' && n.includes('.') && Number.parseFloat(n) === 1\n}\n\nconst isPercentage = function (n: unknown) {\n return typeof n === 'string' && n.includes('%')\n}\n\n// Take input from [0, n] and return it as [0, 1]\nconst bound01 = function (value: number | string, max: number | string) {\n if (isOnePointZero(value)) value = '100%'\n\n const processPercent = isPercentage(value)\n value = Math.min(max as number, Math.max(0, Number.parseFloat(`${value}`)))\n\n // Automatically convert percentage into number\n if (processPercent) {\n value = Number.parseInt(`${value * (max as number)}`, 10) / 100\n }\n\n // Handle floating point rounding errors\n if (Math.abs(value - (max as number)) < 0.000001) {\n return 1\n }\n\n // Convert into [0, 1] range if it isn't already\n return (value % (max as number)) / Number.parseFloat(max as string)\n}\n\nconst INT_HEX_MAP: Record = {\n 10: 'A',\n 11: 'B',\n 12: 'C',\n 13: 'D',\n 14: 'E',\n 15: 'F',\n}\n\nconst hexOne = (value: number) => {\n value = Math.min(Math.round(value), 255)\n const high = Math.floor(value / 16)\n const low = value % 16\n return `${INT_HEX_MAP[high] || high}${INT_HEX_MAP[low] || low}`\n}\n\nconst toHex = function ({ r, g, b }: { r: number; g: number; b: number }) {\n if (Number.isNaN(+r) || Number.isNaN(+g) || Number.isNaN(+b)) return ''\n return `#${hexOne(r)}${hexOne(g)}${hexOne(b)}`\n}\n\nconst HEX_INT_MAP: Record = {\n A: 10,\n B: 11,\n C: 12,\n D: 13,\n E: 14,\n F: 15,\n}\n\nconst parseHexChannel = function (hex: string) {\n if (hex.length === 2) {\n return (\n (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 +\n (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1])\n )\n }\n\n return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]\n}\n\nconst hsl2hsv = function (hue: number, sat: number, light: number) {\n sat = sat / 100\n light = light / 100\n let smin = sat\n const lmin = Math.max(light, 0.01)\n // let sv\n // let v\n\n light *= 2\n sat *= light <= 1 ? light : 2 - light\n smin *= lmin <= 1 ? lmin : 2 - lmin\n const v = (light + sat) / 2\n const sv =\n light === 0 ? (2 * smin) / (lmin + smin) : (2 * sat) / (light + sat)\n\n return {\n h: hue,\n s: sv * 100,\n v: v * 100,\n }\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nconst rgb2hsv = (r: number, g: number, b: number) => {\n r = bound01(r, 255)\n g = bound01(g, 255)\n b = bound01(b, 255)\n\n const max = Math.max(r, g, b)\n const min = Math.min(r, g, b)\n let h: number\n const v = max\n\n const d = max - min\n const s = max === 0 ? 0 : d / max\n\n if (max === min) {\n h = 0 // achromatic\n } else {\n switch (max) {\n case r: {\n h = (g - b) / d + (g < b ? 6 : 0)\n break\n }\n case g: {\n h = (b - r) / d + 2\n break\n }\n case b: {\n h = (r - g) / d + 4\n break\n }\n }\n h! /= 6\n }\n\n return { h: h! * 360, s: s * 100, v: v * 100 }\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nconst hsv2rgb = function (h: number, s: number, v: number) {\n h = bound01(h, 360) * 6\n s = bound01(s, 100)\n v = bound01(v, 100)\n\n const i = Math.floor(h)\n const f = h - i\n const p = v * (1 - s)\n const q = v * (1 - f * s)\n const t = v * (1 - (1 - f) * s)\n const mod = i % 6\n const r = [v, q, p, p, t, v][mod]\n const g = [t, v, v, q, p, p][mod]\n const b = [p, p, t, v, v, q][mod]\n\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n }\n}\n\ninterface ColorOptions {\n enableAlpha: boolean\n format: string\n value?: string\n}\n\nexport default class Color {\n private _hue = 0\n private _saturation = 100\n private _value = 100\n _alpha = 100\n public enableAlpha = false\n public format = 'hex'\n public value = ''\n public selected?: boolean\n\n constructor(options: Partial = {}) {\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option]\n }\n }\n if (options.value) {\n this.fromString(options.value)\n } else {\n this.doOnChange()\n }\n }\n\n set(prop: { [key: string]: any } | any, value?: number) {\n if (arguments.length === 1 && typeof prop === 'object') {\n for (const p in prop) {\n if (hasOwn(prop, p)) {\n this.set(p, prop[p])\n }\n }\n\n return\n }\n\n ;(this as any)[`_${prop}`] = value\n this.doOnChange()\n }\n\n get(prop: string) {\n if (prop === 'alpha') {\n return Math.floor(this[`_${prop}`])\n }\n return (this as any)[`_${prop}`]\n }\n\n toRgb() {\n return hsv2rgb(this._hue, this._saturation, this._value)\n }\n\n fromString(value: string) {\n if (!value) {\n this._hue = 0\n this._saturation = 100\n this._value = 100\n\n this.doOnChange()\n return\n }\n\n const fromHSV = (h: number, s: number, v: number) => {\n this._hue = Math.max(0, Math.min(360, h))\n this._saturation = Math.max(0, Math.min(100, s))\n this._value = Math.max(0, Math.min(100, v))\n\n this.doOnChange()\n }\n\n if (value.includes('hsl')) {\n const parts = value\n .replace(/hsla|hsl|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = hsl2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('hsv')) {\n const parts = value\n .replace(/hsva|hsv|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n fromHSV(parts[0], parts[1], parts[2])\n }\n } else if (value.includes('rgb')) {\n const parts = value\n .replace(/rgba|rgb|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = rgb2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('#')) {\n const hex = value.replace('#', '').trim()\n if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex))\n return\n let r: number, g: number, b: number\n\n if (hex.length === 3) {\n r = parseHexChannel(hex[0] + hex[0])\n g = parseHexChannel(hex[1] + hex[1])\n b = parseHexChannel(hex[2] + hex[2])\n } else if (hex.length === 6 || hex.length === 8) {\n r = parseHexChannel(hex.slice(0, 2))\n g = parseHexChannel(hex.slice(2, 4))\n b = parseHexChannel(hex.slice(4, 6))\n }\n\n if (hex.length === 8) {\n this._alpha = (parseHexChannel(hex.slice(6)) / 255) * 100\n } else if (hex.length === 3 || hex.length === 6) {\n this._alpha = 100\n }\n\n const { h, s, v } = rgb2hsv(r!, g!, b!)\n fromHSV(h, s, v)\n }\n }\n\n compare(color: this) {\n return (\n Math.abs(color._hue - this._hue) < 2 &&\n Math.abs(color._saturation - this._saturation) < 1 &&\n Math.abs(color._value - this._value) < 1 &&\n Math.abs(color._alpha - this._alpha) < 1\n )\n }\n\n doOnChange() {\n const { _hue, _saturation, _value, _alpha, format } = this\n\n if (this.enableAlpha) {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsla(${_hue}, ${Math.round(\n hsl[1] * 100\n )}%, ${Math.round(hsl[2] * 100)}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hsv': {\n this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hex': {\n this.value = `${toHex(hsv2rgb(_hue, _saturation, _value))}${hexOne(\n (_alpha * 255) / 100\n )}`\n break\n }\n default: {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgba(${r}, ${g}, ${b}, ${this.get('alpha') / 100})`\n }\n }\n } else {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(\n hsl[2] * 100\n )}%)`\n break\n }\n case 'hsv': {\n this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%)`\n break\n }\n case 'rgb': {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgb(${r}, ${g}, ${b})`\n break\n }\n default: {\n this.value = toHex(hsv2rgb(_hue, _saturation, _value))\n }\n }\n }\n }\n}\n", "\n\n\n", "\n\n\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport ColorPicker from './src/color-picker.vue'\n\nexport const ElColorPicker = withInstall(ColorPicker)\nexport default ElColorPicker\n\nexport * from './src/color-picker'\n", "\n\n", "\n\n", "\n\n", "\n\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Container from './src/container.vue'\nimport Aside from './src/aside.vue'\nimport Footer from './src/footer.vue'\nimport Header from './src/header.vue'\nimport Main from './src/main.vue'\n\nexport const ElContainer = withInstall(Container, {\n Aside,\n Footer,\n Header,\n Main,\n})\n\nexport default ElContainer\nexport const ElAside = withNoopInstall(Aside)\nexport const ElFooter = withNoopInstall(Footer)\nexport const ElHeader = withNoopInstall(Header)\nexport const ElMain = withNoopInstall(Main)\n\nexport type ContainerInstance = InstanceType\nexport type AsideInstance = InstanceType\nexport type FooterInstance = InstanceType\nexport type HeaderInstance = InstanceType\nexport type MainInstance = InstanceType\n", "import type { InjectionKey, SetupContext } from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\ninterface DatePickerContext {\n slots: SetupContext['slots']\n pickerNs: UseNamespaceReturn\n}\n\nexport const ROOT_PICKER_INJECTION_KEY: InjectionKey =\n Symbol()\n", "import { timePickerDefaultProps } from '@element-plus/components/time-picker'\nimport { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { IDatePickerType } from '../date-picker.type'\n\nexport const datePickerProps = buildProps({\n ...timePickerDefaultProps,\n type: {\n type: definePropType(String),\n default: 'date',\n },\n} as const)\n\nexport type DatePickerProps = ExtractPropTypes\n", "import { buildProps, definePropType, isArray } from '@element-plus/utils'\nimport { datePickTypes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DatePickType } from '@element-plus/constants'\n\nconst selectionModes = ['date', 'dates', 'year', 'month', 'week', 'range']\n\nexport type RangeState = {\n endDate: null | Dayjs\n selecting: boolean\n}\n\nexport const datePickerSharedProps = buildProps({\n disabledDate: {\n type: definePropType<(date: Date) => boolean>(Function),\n },\n date: {\n type: definePropType(Object),\n required: true,\n },\n minDate: {\n type: definePropType(Object),\n },\n maxDate: {\n type: definePropType(Object),\n },\n parsedValue: {\n type: definePropType([Object, Array]),\n },\n rangeState: {\n type: definePropType(Object),\n default: () => ({\n endDate: null,\n selecting: false,\n }),\n },\n} as const)\n\nexport const panelSharedProps = buildProps({\n type: {\n type: definePropType(String),\n required: true,\n values: datePickTypes,\n },\n} as const)\n\nexport const panelRangeSharedProps = buildProps({\n unlinkPanels: Boolean,\n parsedValue: {\n type: definePropType(Array),\n },\n} as const)\n\nexport const selectionModeWithDefault = (\n mode: typeof selectionModes[number]\n) => {\n return {\n type: String,\n values: selectionModes,\n default: mode,\n }\n}\n\nexport const rangePickerSharedEmits = {\n pick: (range: [Dayjs, Dayjs]) => isArray(range),\n}\n\nexport type RangePickerSharedEmits = typeof rangePickerSharedEmits\nexport type PanelRangeSharedProps = ExtractPropTypes<\n typeof panelRangeSharedProps\n>\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { panelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const panelDatePickProps = buildProps({\n ...panelSharedProps,\n parsedValue: {\n type: definePropType([Object, Array]),\n },\n visible: {\n type: Boolean,\n },\n format: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type PanelDatePickProps = ExtractPropTypes\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { datePickerSharedProps, selectionModeWithDefault } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const basicDateTableProps = buildProps({\n ...datePickerSharedProps,\n cellClassName: {\n type: definePropType<(date: Date) => string>(Function),\n },\n showWeekNumber: Boolean,\n selectionMode: selectionModeWithDefault('date'),\n} as const)\n\nexport const basicDateTableEmits = ['changerange', 'pick', 'select']\n\nexport type BasicDateTableProps = ExtractPropTypes\nexport type BasicDateTableEmits = typeof basicDateTableEmits\n\nexport type RangePickerEmits = { minDate: Dayjs; maxDate: null }\nexport type DatePickerEmits = Dayjs\nexport type DatesPickerEmits = Dayjs[]\nexport type WeekPickerEmits = {\n year: number\n week: number\n value: string\n date: Dayjs\n}\n\nexport type DateTableEmits =\n | RangePickerEmits\n | DatePickerEmits\n | DatesPickerEmits\n | WeekPickerEmits\n", "import dayjs from 'dayjs'\nimport { isArray } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from './date-picker.type'\n\ntype DayRange = [Dayjs | undefined, Dayjs | undefined]\n\nexport const isValidRange = (range: DayRange): boolean => {\n if (!isArray(range)) return false\n\n const [left, right] = range\n\n return (\n dayjs.isDayjs(left) && dayjs.isDayjs(right) && left.isSameOrBefore(right)\n )\n}\n\ntype GetDefaultValueParams = {\n lang: string\n unit: 'month' | 'year'\n unlinkPanels: boolean\n}\n\nexport type DefaultValue = [Date, Date] | Date | undefined\n\nexport const getDefaultValue = (\n defaultValue: DefaultValue,\n { lang, unit, unlinkPanels }: GetDefaultValueParams\n) => {\n let start: Dayjs\n\n if (isArray(defaultValue)) {\n let [left, right] = defaultValue.map((d) => dayjs(d).locale(lang))\n if (!unlinkPanels) {\n right = left.add(1, unit)\n }\n return [left, right]\n } else if (defaultValue) {\n start = dayjs(defaultValue)\n } else {\n start = dayjs()\n }\n start = start.locale(lang)\n return [start, start.add(1, unit)]\n}\n\ntype Dimension = {\n row: number\n column: number\n}\n\ntype BuildPickerTableMetadata = {\n startDate?: Dayjs | null\n unit: 'month' | 'day'\n columnIndexOffset: number\n now: Dayjs\n nextEndDate: Dayjs | null\n relativeDateGetter: (index: number) => Dayjs\n setCellMetadata?: (\n cell: DateCell,\n dimension: { rowIndex: number; columnIndex: number }\n ) => void\n setRowMetadata?: (row: DateCell[]) => void\n}\n\nexport const buildPickerTable = (\n dimension: Dimension,\n rows: DateCell[][],\n {\n columnIndexOffset,\n startDate,\n nextEndDate,\n now,\n unit,\n relativeDateGetter,\n setCellMetadata,\n setRowMetadata,\n }: BuildPickerTableMetadata\n) => {\n for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {\n const row = rows[rowIndex]\n for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {\n let cell = row[columnIndex + columnIndexOffset]\n if (!cell) {\n cell = {\n row: rowIndex,\n column: columnIndex,\n type: 'normal',\n inRange: false,\n start: false,\n end: false,\n }\n }\n const index = rowIndex * dimension.column + columnIndex\n const nextStartDate = relativeDateGetter(index)\n cell.dayjs = nextStartDate\n cell.date = nextStartDate.toDate()\n cell.timestamp = nextStartDate.valueOf()\n cell.type = 'normal'\n\n cell.inRange =\n !!(\n startDate &&\n nextStartDate.isSameOrAfter(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrBefore(nextEndDate, unit)\n ) ||\n !!(\n startDate &&\n nextStartDate.isSameOrBefore(startDate, unit) &&\n nextEndDate &&\n nextStartDate.isSameOrAfter(nextEndDate, unit)\n )\n\n if (startDate?.isSameOrAfter(nextEndDate)) {\n cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n cell.end = startDate && nextStartDate.isSame(startDate, unit)\n } else {\n cell.start = !!startDate && nextStartDate.isSame(startDate, unit)\n cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit)\n }\n\n const isToday = nextStartDate.isSame(now, unit)\n\n if (isToday) {\n cell.type = 'today'\n }\n setCellMetadata?.(cell, { rowIndex, columnIndex })\n row[columnIndex + columnIndexOffset] = cell\n }\n setRowMetadata?.(row)\n }\n}\n", "import { computed, nextTick, ref, unref, watch } from 'vue'\nimport dayjs from 'dayjs'\nimport { flatten } from 'lodash-unified'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { castArray } from '@element-plus/utils'\nimport { buildPickerTable } from '../utils'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { DateCell } from '../date-picker.type'\nimport type {\n BasicDateTableEmits,\n BasicDateTableProps,\n} from '../props/basic-date-table'\n\nconst isNormalDay = (type = '') => {\n return ['normal', 'today'].includes(type)\n}\n\nexport const useBasicDateTable = (\n props: BasicDateTableProps,\n emit: SetupContext['emit']\n) => {\n const { lang } = useLocale()\n const tbodyRef = ref()\n const currentCellRef = ref()\n // data\n const lastRow = ref()\n const lastColumn = ref()\n const tableRows = ref([[], [], [], [], [], []])\n\n let focusWithClick = false\n\n // todo better way to get Day.js locale object\n const firstDayOfWeek = (props.date as any).$locale().weekStart || 7\n const WEEKS_CONSTANT = props.date\n .locale('en')\n .localeData()\n .weekdaysShort()\n .map((_) => _.toLowerCase())\n\n const offsetDay = computed(() => {\n // Sunday 7(0), cal the left and right offset days, 3217654, such as Monday is -1, the is to adjust the position of the first two rows of dates\n return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek\n })\n\n const startDate = computed(() => {\n const startDayOfMonth = props.date.startOf('month')\n return startDayOfMonth.subtract(startDayOfMonth.day() || 7, 'day')\n })\n\n const WEEKS = computed(() => {\n return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(\n firstDayOfWeek,\n firstDayOfWeek + 7\n )\n })\n\n const hasCurrent = computed(() => {\n return flatten(unref(rows)).some((row) => {\n return row.isCurrent\n })\n })\n\n const days = computed(() => {\n const startOfMonth = props.date.startOf('month')\n const startOfMonthDay = startOfMonth.day() || 7 // day of first day\n const dateCountOfMonth = startOfMonth.daysInMonth()\n\n const dateCountOfLastMonth = startOfMonth.subtract(1, 'month').daysInMonth()\n\n return {\n startOfMonthDay,\n dateCountOfMonth,\n dateCountOfLastMonth,\n }\n })\n\n const selectedDate = computed(() => {\n return props.selectionMode === 'dates'\n ? (castArray(props.parsedValue) as Dayjs[])\n : ([] as Dayjs[])\n })\n\n // Return value indicates should the counter be incremented\n type CellCoordinate = { columnIndex: number; rowIndex: number }\n type CellMeta = CellCoordinate & {\n count: number\n }\n const setDateText = (\n cell: DateCell,\n { count, rowIndex, columnIndex }: CellMeta\n ): boolean => {\n const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } =\n unref(days)\n const offset = unref(offsetDay)\n if (rowIndex >= 0 && rowIndex <= 1) {\n const numberOfDaysFromPreviousMonth =\n startOfMonthDay + offset < 0\n ? 7 + startOfMonthDay + offset\n : startOfMonthDay + offset\n\n if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {\n cell.text = count\n return true\n } else {\n cell.text =\n dateCountOfLastMonth -\n (numberOfDaysFromPreviousMonth - (columnIndex % 7)) +\n 1 +\n rowIndex * 7\n cell.type = 'prev-month'\n }\n } else {\n if (count <= dateCountOfMonth) {\n cell.text = count\n } else {\n cell.text = count - dateCountOfMonth\n cell.type = 'next-month'\n }\n return true\n }\n return false\n }\n\n const setCellMetadata = (\n cell: DateCell,\n { columnIndex, rowIndex }: CellCoordinate,\n count: number\n ) => {\n const { disabledDate, cellClassName } = props\n const _selectedDate = unref(selectedDate)\n const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex })\n\n const cellDate = cell.dayjs!.toDate()\n cell.selected = _selectedDate.find(\n (d) => d.valueOf() === cell.dayjs!.valueOf()\n )\n cell.isSelected = !!cell.selected\n cell.isCurrent = isCurrent(cell)\n cell.disabled = disabledDate?.(cellDate)\n cell.customClass = cellClassName?.(cellDate)\n return shouldIncrement\n }\n\n const setRowMetadata = (row: DateCell[]) => {\n if (props.selectionMode === 'week') {\n const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6]\n const isActive = isWeekActive(row[start + 1])\n row[start].inRange = isActive\n row[start].start = isActive\n row[end].inRange = isActive\n row[end].end = isActive\n }\n }\n\n const rows = computed(() => {\n const { minDate, maxDate, rangeState, showWeekNumber } = props\n\n const offset = unref(offsetDay)\n const rows_ = unref(tableRows)\n const dateUnit = 'day'\n let count = 1\n\n if (showWeekNumber) {\n for (let rowIndex = 0; rowIndex < 6; rowIndex++) {\n if (!rows_[rowIndex][0]) {\n rows_[rowIndex][0] = {\n type: 'week',\n text: unref(startDate)\n .add(rowIndex * 7 + 1, dateUnit)\n .week(),\n }\n }\n }\n }\n\n buildPickerTable({ row: 6, column: 7 }, rows_, {\n startDate: minDate,\n columnIndexOffset: showWeekNumber ? 1 : 0,\n nextEndDate:\n rangeState.endDate ||\n maxDate ||\n (rangeState.selecting && minDate) ||\n null,\n now: dayjs().locale(unref(lang)).startOf(dateUnit),\n unit: dateUnit,\n relativeDateGetter: (idx: number) =>\n unref(startDate).add(idx - offset, dateUnit),\n setCellMetadata: (...args) => {\n if (setCellMetadata(...args, count)) {\n count += 1\n }\n },\n\n setRowMetadata,\n })\n\n return rows_\n })\n\n watch(\n () => props.date,\n async () => {\n if (unref(tbodyRef)?.contains(document.activeElement)) {\n await nextTick()\n await focus()\n // currentCellRef.value?.focus()\n }\n }\n )\n\n const focus = async () => unref(currentCellRef)?.focus()\n\n const isCurrent = (cell: DateCell): boolean => {\n return (\n props.selectionMode === 'date' &&\n isNormalDay(cell.type) &&\n cellMatchesDate(cell, props.parsedValue as Dayjs)\n )\n }\n\n const cellMatchesDate = (cell: DateCell, date: Dayjs) => {\n if (!date) return false\n return dayjs(date)\n .locale(unref(lang))\n .isSame(props.date.date(Number(cell.text)), 'day')\n }\n\n const getDateOfCell = (row: number, column: number) => {\n const offsetFromStart =\n row * 7 + (column - (props.showWeekNumber ? 1 : 0)) - unref(offsetDay)\n return unref(startDate).add(offsetFromStart, 'day')\n }\n\n const handleMouseMove = (event: MouseEvent) => {\n if (!props.rangeState.selecting) return\n\n let target = event.target as HTMLElement\n if (target.tagName === 'SPAN') {\n target = target.parentNode?.parentNode as HTMLElement\n }\n if (target.tagName === 'DIV') {\n target = target.parentNode as HTMLElement\n }\n if (target.tagName !== 'TD') return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n\n // can not select disabled date\n if (unref(rows)[row][column].disabled) return\n\n // only update rangeState when mouse moves to a new cell\n // this avoids frequent Date object creation and improves performance\n if (row !== unref(lastRow) || column !== unref(lastColumn)) {\n lastRow.value = row\n lastColumn.value = column\n emit('changerange', {\n selecting: true,\n endDate: getDateOfCell(row, column),\n })\n }\n }\n\n const isSelectedCell = (cell: DateCell) => {\n return (\n (!unref(hasCurrent) && cell?.text === 1 && cell.type === 'normal') ||\n cell.isCurrent\n )\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (focusWithClick || unref(hasCurrent) || props.selectionMode !== 'date')\n return\n handlePickDate(event, true)\n }\n\n const handleMouseDown = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = true\n }\n\n const handleMouseUp = (event: MouseEvent) => {\n const target = (event.target as HTMLElement).closest('td')\n if (!target) return\n focusWithClick = false\n }\n\n const handleRangePick = (newDate: Dayjs) => {\n if (!props.rangeState.selecting || !props.minDate) {\n emit('pick', { minDate: newDate, maxDate: null })\n emit('select', true)\n } else {\n if (newDate >= props.minDate) {\n emit('pick', { minDate: props.minDate, maxDate: newDate })\n } else {\n emit('pick', { minDate: newDate, maxDate: props.minDate })\n }\n emit('select', false)\n }\n }\n\n const handleWeekPick = (newDate: Dayjs) => {\n const weekNumber = newDate.week()\n const value = `${newDate.year()}w${weekNumber}`\n emit('pick', {\n year: newDate.year(),\n week: weekNumber,\n value,\n date: newDate.startOf('week'),\n })\n }\n\n const handleDatesPick = (newDate: Dayjs, selected: boolean) => {\n const newValue = selected\n ? castArray(props.parsedValue).filter(\n (d) => d?.valueOf() !== newDate.valueOf()\n )\n : castArray(props.parsedValue).concat([newDate])\n emit('pick', newValue)\n }\n\n const handlePickDate = (\n event: FocusEvent | MouseEvent,\n isKeyboardMovement = false\n ) => {\n const target = (event.target as HTMLElement).closest('td')\n\n if (!target) return\n\n const row = (target.parentNode as HTMLTableRowElement).rowIndex - 1\n const column = (target as HTMLTableCellElement).cellIndex\n const cell = unref(rows)[row][column]\n\n if (cell.disabled || cell.type === 'week') return\n\n const newDate = getDateOfCell(row, column)\n\n switch (props.selectionMode) {\n case 'range': {\n handleRangePick(newDate)\n break\n }\n case 'date': {\n emit('pick', newDate, isKeyboardMovement)\n break\n }\n case 'week': {\n handleWeekPick(newDate)\n break\n }\n case 'dates': {\n handleDatesPick(newDate, !!cell.selected)\n break\n }\n default: {\n break\n }\n }\n }\n\n const isWeekActive = (cell: DateCell) => {\n if (props.selectionMode !== 'week') return false\n let newDate = props.date.startOf('day')\n\n if (cell.type === 'prev-month') {\n newDate = newDate.subtract(1, 'month')\n }\n\n if (cell.type === 'next-month') {\n newDate = newDate.add(1, 'month')\n }\n\n newDate = newDate.date(Number.parseInt(cell.text as any, 10))\n\n if (props.parsedValue && !Array.isArray(props.parsedValue)) {\n const dayOffset = ((props.parsedValue.day() - firstDayOfWeek + 7) % 7) - 1\n const weekDate = props.parsedValue.subtract(dayOffset, 'day')\n return weekDate.isSame(newDate, 'day')\n }\n return false\n }\n\n return {\n WEEKS,\n rows,\n tbodyRef,\n currentCellRef,\n\n // cellMatchesDate,\n // getDateOfCell,\n focus,\n isCurrent,\n isWeekActive,\n isSelectedCell,\n\n handlePickDate,\n handleMouseUp,\n handleMouseDown,\n handleMouseMove,\n handleFocus,\n }\n}\n\nexport const useBasicDateTableDOM = (\n props: BasicDateTableProps,\n {\n isCurrent,\n isWeekActive,\n }: Pick, 'isCurrent' | 'isWeekActive'>\n) => {\n const ns = useNamespace('date-table')\n const { t } = useLocale()\n\n const tableKls = computed(() => [\n ns.b(),\n { 'is-week-mode': props.selectionMode === 'week' },\n ])\n\n const tableLabel = computed(() => t('el.datepicker.dateTablePrompt'))\n const weekLabel = computed(() => t('el.datepicker.week'))\n\n const getCellClasses = (cell: DateCell) => {\n const classes: string[] = []\n if (isNormalDay(cell.type) && !cell.disabled) {\n classes.push('available')\n if (cell.type === 'today') {\n classes.push('today')\n }\n } else {\n classes.push(cell.type!)\n }\n\n if (isCurrent(cell)) {\n classes.push('current')\n }\n\n if (\n cell.inRange &&\n (isNormalDay(cell.type) || props.selectionMode === 'week')\n ) {\n classes.push('in-range')\n\n if (cell.start) {\n classes.push('start-date')\n }\n\n if (cell.end) {\n classes.push('end-date')\n }\n }\n\n if (cell.disabled) {\n classes.push('disabled')\n }\n\n if (cell.selected) {\n classes.push('selected')\n }\n\n if (cell.customClass) {\n classes.push(cell.customClass)\n }\n\n return classes.join(' ')\n }\n\n const getRowKls = (cell: DateCell) => [\n ns.e('row'),\n { current: isWeekActive(cell) },\n ]\n\n return {\n tableKls,\n tableLabel,\n weekLabel,\n\n getCellClasses,\n getRowKls,\n t,\n }\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { DateCell } from '../date-picker.type'\n\nexport const basicCellProps = buildProps({\n cell: {\n type: definePropType(Object),\n },\n} as const)\n\nexport type BasicCellProps = ExtractPropTypes\n", "import { defineComponent, inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ROOT_PICKER_INJECTION_KEY } from '../constants'\nimport { basicCellProps } from '../props/basic-cell'\n\nexport default defineComponent({\n name: 'ElDatePickerCell',\n props: basicCellProps,\n setup(props) {\n const ns = useNamespace('date-table-cell')\n const { slots } = inject(ROOT_PICKER_INJECTION_KEY)!\n return () => {\n const { cell } = props\n if (slots.default) {\n const list = slots.default(cell).filter((item) => {\n return (\n item.patchFlag !== -2 && item.type.toString() !== 'Symbol(Comment)'\n )\n })\n if (list.length) {\n return list\n }\n }\n\n return (\n
\n {cell?.text}\n
\n )\n }\n },\n})\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { datePickerSharedProps, selectionModeWithDefault } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const basicMonthTableProps = buildProps({\n ...datePickerSharedProps,\n selectionMode: selectionModeWithDefault('month'),\n})\n\nexport type BasicMonthTableProps = ExtractPropTypes\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { datePickerSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nconst { date, disabledDate, parsedValue } = datePickerSharedProps\n\nexport const basicYearTableProps = buildProps({\n date,\n disabledDate,\n parsedValue,\n})\n\nexport type BasicYearTableProps = ExtractPropTypes\n", "\n\n\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { panelRangeSharedProps, panelSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const panelDateRangeProps = buildProps({\n ...panelSharedProps,\n ...panelRangeSharedProps,\n} as const)\n\nexport type PanelDateRangeProps = ExtractPropTypes\n", "import { getCurrentInstance, useAttrs, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { isFunction } from '@element-plus/utils'\n\nimport type { SetupContext } from 'vue'\nimport type { useLocale } from '@element-plus/hooks'\nimport type { RangePickerSharedEmits } from '../props/shared'\n\n// FIXME: extract this to `date-picker.ts`\nexport type Shortcut = {\n text: string\n value: [Date, Date] | (() => [Date, Date])\n onClick?: (ctx: Omit, 'expose'>) => void\n}\n\nexport const useShortcut = (lang: ReturnType['lang']) => {\n const { emit } = getCurrentInstance()!\n const attrs = useAttrs()\n const slots = useSlots()\n\n const handleShortcutClick = (shortcut: Shortcut) => {\n const shortcutValues = isFunction(shortcut.value)\n ? shortcut.value()\n : shortcut.value\n\n if (shortcutValues) {\n emit('pick', [\n dayjs(shortcutValues[0]).locale(lang.value),\n dayjs(shortcutValues[1]).locale(lang.value),\n ])\n return\n }\n if (shortcut.onClick) {\n shortcut.onClick({\n attrs,\n slots,\n emit,\n })\n }\n }\n\n return handleShortcutClick\n}\n", "import { getCurrentInstance, inject, ref, unref, watch } from 'vue'\nimport { isArray } from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { getDefaultValue, isValidRange } from '../utils'\nimport { ROOT_PICKER_INJECTION_KEY } from '../constants'\nimport { useShortcut } from './use-shortcut'\n\nimport type { Ref } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { PanelRangeSharedProps, RangeState } from '../props/shared'\nimport type { DefaultValue } from '../utils'\n\ntype UseRangePickerProps = {\n onParsedValueChanged: (\n minDate: Dayjs | undefined,\n maxDate: Dayjs | undefined\n ) => void\n defaultValue: Ref\n leftDate: Ref\n rightDate: Ref\n unit: 'month' | 'year'\n}\n\nexport const useRangePicker = (\n props: PanelRangeSharedProps,\n {\n defaultValue,\n leftDate,\n rightDate,\n unit,\n\n onParsedValueChanged,\n }: UseRangePickerProps\n) => {\n const { emit } = getCurrentInstance()!\n\n const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY)!\n const drpNs = useNamespace('date-range-picker')\n const { t, lang } = useLocale()\n const handleShortcutClick = useShortcut(lang)\n const minDate = ref()\n const maxDate = ref()\n const rangeState = ref({\n endDate: null,\n selecting: false,\n })\n\n const handleChangeRange = (val: RangeState) => {\n rangeState.value = val\n }\n\n const handleRangeConfirm = (visible = false) => {\n const _minDate = unref(minDate)\n const _maxDate = unref(maxDate)\n\n if (isValidRange([_minDate, _maxDate])) {\n emit('pick', [_minDate, _maxDate], visible)\n }\n }\n\n const onSelect = (selecting: boolean) => {\n rangeState.value.selecting = selecting\n if (!selecting) {\n rangeState.value.endDate = null\n }\n }\n\n const restoreDefault = () => {\n const [start, end] = getDefaultValue(unref(defaultValue), {\n lang: unref(lang),\n unit,\n unlinkPanels: props.unlinkPanels,\n })\n minDate.value = undefined\n maxDate.value = undefined\n leftDate.value = start\n rightDate.value = end\n }\n\n watch(\n defaultValue,\n (val) => {\n if (val) {\n restoreDefault()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => props.parsedValue,\n (parsedValue) => {\n if (isArray(parsedValue) && parsedValue.length === 2) {\n const [start, end] = parsedValue\n minDate.value = start\n leftDate.value = start\n maxDate.value = end\n onParsedValueChanged(unref(minDate), unref(maxDate))\n } else {\n restoreDefault()\n }\n },\n { immediate: true }\n )\n\n return {\n minDate,\n maxDate,\n rangeState,\n lang,\n ppNs: pickerNs,\n drpNs,\n\n handleChangeRange,\n handleRangeConfirm,\n handleShortcutClick,\n onSelect,\n t,\n }\n}\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { panelRangeSharedProps } from './shared'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const panelMonthRangeProps = buildProps({\n ...panelRangeSharedProps,\n} as const)\n\nexport const panelMonthRangeEmits = [\n 'pick',\n 'set-picker-option',\n 'calendar-change',\n]\n\nexport type PanelMonthRangeProps = ExtractPropTypes\n", "import { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport type { Ref, ToRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport const useMonthRangeHeader = ({\n unlinkPanels,\n leftDate,\n rightDate,\n}: {\n unlinkPanels: ToRef\n leftDate: Ref\n rightDate: Ref\n}) => {\n const { t } = useLocale()\n const leftPrevYear = () => {\n leftDate.value = leftDate.value.subtract(1, 'year')\n if (!unlinkPanels.value) {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n }\n\n const rightNextYear = () => {\n if (!unlinkPanels.value) {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n rightDate.value = rightDate.value.add(1, 'year')\n }\n\n const leftNextYear = () => {\n leftDate.value = leftDate.value.add(1, 'year')\n }\n\n const rightPrevYear = () => {\n rightDate.value = rightDate.value.subtract(1, 'year')\n }\n const leftLabel = computed(() => {\n return `${leftDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const rightLabel = computed(() => {\n return `${rightDate.value.year()} ${t('el.datepicker.year')}`\n })\n\n const leftYear = computed(() => {\n return leftDate.value.year()\n })\n\n const rightYear = computed(() => {\n return rightDate.value.year() === leftDate.value.year()\n ? leftDate.value.year() + 1\n : rightDate.value.year()\n })\n\n return {\n leftPrevYear,\n rightNextYear,\n leftNextYear,\n rightPrevYear,\n leftLabel,\n rightLabel,\n leftYear,\n rightYear,\n }\n}\n", "\n\n\n", "import DatePickPanel from './date-picker-com/panel-date-pick.vue'\nimport DateRangePickPanel from './date-picker-com/panel-date-range.vue'\nimport MonthRangePickPanel from './date-picker-com/panel-month-range.vue'\nimport type { IDatePickerType } from './date-picker.type'\n\nexport const getPanel = function (type: IDatePickerType) {\n switch (type) {\n case 'daterange':\n case 'datetimerange': {\n return DateRangePickPanel\n }\n case 'monthrange': {\n return MonthRangePickPanel\n }\n default: {\n return DatePickPanel\n }\n }\n}\n", "import { defineComponent, provide, reactive, ref, toRef } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js'\nimport weekYear from 'dayjs/plugin/weekYear.js'\nimport dayOfYear from 'dayjs/plugin/dayOfYear.js'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n CommonPicker,\n DEFAULT_FORMATS_DATE,\n DEFAULT_FORMATS_DATEPICKER,\n} from '@element-plus/components/time-picker'\nimport { ROOT_PICKER_INJECTION_KEY } from './constants'\n\nimport { datePickerProps } from './props/date-picker'\nimport { getPanel } from './panel-utils'\nimport type { DatePickerExpose } from './instance'\n\ndayjs.extend(localeData)\ndayjs.extend(advancedFormat)\ndayjs.extend(customParseFormat)\ndayjs.extend(weekOfYear)\ndayjs.extend(weekYear)\ndayjs.extend(dayOfYear)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\n\nexport default defineComponent({\n name: 'ElDatePicker',\n install: null,\n props: datePickerProps,\n emits: ['update:modelValue'],\n setup(props, { expose, emit, slots }) {\n const ns = useNamespace('picker-panel')\n\n provide('ElPopperOptions', reactive(toRef(props, 'popperOptions')))\n provide(ROOT_PICKER_INJECTION_KEY, {\n slots,\n pickerNs: ns,\n })\n\n const commonPicker = ref>()\n const refProps: DatePickerExpose = {\n focus: (focusStartInput = true) => {\n commonPicker.value?.focus(focusStartInput)\n },\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n }\n\n expose(refProps)\n\n const onModelValueUpdated = (val: any) => {\n emit('update:modelValue', val)\n }\n\n return () => {\n // since props always have all defined keys on it, {format, ...props} will always overwrite format\n // pick props.format or provide default value here before spreading\n const format =\n props.format ??\n (DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE)\n\n const Component = getPanel(props.type)\n\n return (\n \n {{\n default: (scopedProps: /**FIXME: remove any type */ any) => (\n \n ),\n 'range-separator': slots['range-separator'],\n }}\n \n )\n }\n },\n})\n", "import DatePicker from './src/date-picker'\n\nimport type { App } from 'vue'\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nconst _DatePicker = DatePicker as SFCWithInstall\n\n_DatePicker.install = (app: App) => {\n app.component(_DatePicker.name, _DatePicker)\n}\n\nexport default _DatePicker\nexport const ElDatePicker = _DatePicker\nexport * from './src/constants'\nexport * from './src/props/date-picker'\nexport type { DatePickerInstance } from './src/instance'\n", "import type { InjectionKey } from 'vue'\nimport type { IDescriptionsInject } from './descriptions.type'\n\nexport const descriptionsKey: InjectionKey =\n Symbol('elDescriptions')\n", "// @ts-nocheck\nimport { defineComponent, h, inject } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { addUnit, getNormalizedProps } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { descriptionsKey } from './token'\n\nimport type { VNode } from 'vue'\nimport type {\n IDescriptionsInject,\n IDescriptionsItemInject,\n} from './descriptions.type'\n\nexport default defineComponent({\n name: 'ElDescriptionsCell',\n props: {\n cell: {\n type: Object,\n },\n tag: {\n type: String,\n },\n type: {\n type: String,\n },\n },\n setup() {\n const descriptions = inject(descriptionsKey, {} as IDescriptionsInject)\n\n return {\n descriptions,\n }\n },\n render() {\n const item = getNormalizedProps(\n this.cell as VNode\n ) as IDescriptionsItemInject\n\n const { border, direction } = this.descriptions\n const isVertical = direction === 'vertical'\n const label = this.cell?.children?.label?.() || item.label\n const content = this.cell?.children?.default?.()\n const span = item.span\n const align = item.align ? `is-${item.align}` : ''\n const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : '' || align\n const className = item.className\n const labelClassName = item.labelClassName\n const style = {\n width: addUnit(item.width),\n minWidth: addUnit(item.minWidth),\n }\n const ns = useNamespace('descriptions')\n\n switch (this.type) {\n case 'label':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('label'),\n ns.is('bordered-label', border),\n ns.is('vertical-label', isVertical),\n labelAlign,\n labelClassName,\n ],\n colSpan: isVertical ? span : 1,\n },\n label\n )\n case 'content':\n return h(\n this.tag,\n {\n style,\n class: [\n ns.e('cell'),\n ns.e('content'),\n ns.is('bordered-content', border),\n ns.is('vertical-content', isVertical),\n align,\n className,\n ],\n colSpan: isVertical ? span : span * 2 - 1,\n },\n content\n )\n default:\n return h(\n 'td',\n {\n style,\n class: [ns.e('cell'), align],\n colSpan: span,\n },\n [\n !isNil(label)\n ? h(\n 'span',\n {\n class: [ns.e('label'), labelClassName],\n },\n label\n )\n : undefined,\n h(\n 'span',\n {\n class: [ns.e('content'), className],\n },\n content\n ),\n ]\n )\n }\n },\n})\n", "import { buildProps } from '@element-plus/utils'\n\nexport const descriptionsRowProps = buildProps({\n row: {\n type: Array,\n default: () => [],\n },\n} as const)\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type Description from './description.vue'\n\nexport const descriptionProps = buildProps({\n border: {\n type: Boolean,\n default: false,\n },\n column: {\n type: Number,\n default: 3,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n size: useSizeProp,\n title: {\n type: String,\n default: '',\n },\n extra: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type DescriptionInstance = InstanceType\n", "\n\n\n", "import { defineComponent } from 'vue'\n\nexport default defineComponent({\n name: 'ElDescriptionsItem',\n props: {\n label: {\n type: String,\n default: '',\n },\n span: {\n type: Number,\n default: 1,\n },\n width: {\n type: [String, Number],\n default: '',\n },\n minWidth: {\n type: [String, Number],\n default: '',\n },\n align: {\n type: String,\n default: 'left',\n },\n labelAlign: {\n type: String,\n default: '',\n },\n className: {\n type: String,\n default: '',\n },\n labelClassName: {\n type: String,\n default: '',\n },\n },\n})\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\n", "import { createVNode, defineComponent, h, renderSlot } from 'vue'\nimport { PatchFlags, buildProps, definePropType } from '@element-plus/utils'\nimport { useNamespace, useSameTarget } from '@element-plus/hooks'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\n\nexport const overlayProps = buildProps({\n mask: {\n type: Boolean,\n default: true,\n },\n customMaskEvent: {\n type: Boolean,\n default: false,\n },\n overlayClass: {\n type: definePropType>([\n String,\n Array,\n Object,\n ]),\n },\n zIndex: {\n type: definePropType([String, Number]),\n },\n} as const)\nexport type OverlayProps = ExtractPropTypes\n\nexport const overlayEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type OverlayEmits = typeof overlayEmits\n\nconst BLOCK = 'overlay'\n\nexport default defineComponent({\n name: 'ElOverlay',\n\n props: overlayProps,\n emits: overlayEmits,\n\n setup(props, { slots, emit }) {\n // No reactivity on this prop because when its rendering with a global\n // component, this will be a constant flag.\n const ns = useNamespace(BLOCK)\n\n const onMaskClick = (e: MouseEvent) => {\n emit('click', e)\n }\n\n const { onClick, onMousedown, onMouseup } = useSameTarget(\n props.customMaskEvent ? undefined : onMaskClick\n )\n\n // init here\n return () => {\n // when the vnode meets the same structure but with different change trigger\n // it will not automatically update, thus we simply use h function to manage updating\n return props.mask\n ? createVNode(\n 'div',\n {\n class: [ns.b(), props.overlayClass],\n style: {\n zIndex: props.zIndex,\n },\n onClick,\n onMousedown,\n onMouseup,\n },\n [renderSlot(slots, 'default')],\n PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS,\n ['onClick', 'onMouseup', 'onMousedown']\n )\n : h(\n 'div',\n {\n class: props.overlayClass,\n style: {\n zIndex: props.zIndex,\n position: 'fixed',\n top: '0px',\n right: '0px',\n bottom: '0px',\n left: '0px',\n } as CSSProperties,\n },\n [renderSlot(slots, 'default')]\n )\n }\n },\n})\n", "import Overlay from './src/overlay'\n\nexport const ElOverlay = Overlay\nexport default ElOverlay\n\nexport * from './src/overlay'\n", "import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\n\nexport type DialogContext = {\n dialogRef: Ref\n headerRef: Ref\n bodyId: Ref\n ns: UseNamespaceReturn\n rendered: Ref\n style: ComputedRef\n}\n\nexport const dialogInjectionKey: InjectionKey =\n Symbol('dialogInjectionKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\n\nexport const dialogContentProps = buildProps({\n /**\n * @description whether to align the header and footer in center\n */\n center: Boolean,\n /**\n * @description whether to align the dialog both horizontally and vertically\n */\n alignCenter: Boolean,\n /**\n * @description custom close icon, default is Close\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @deprecated will be removed in version 2.4.0, please use class\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description enable dragging feature for Dialog\n */\n draggable: Boolean,\n /**\n * @description whether the Dialog takes up full screen\n */\n fullscreen: Boolean,\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title of Dialog. Can also be passed with a named slot (see the following table)\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description header's aria-level attribute\n */\n ariaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport const dialogContentEmits = {\n close: () => true,\n}\n", "\n\n\n", "import { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { dialogContentProps } from './dialog-content'\n\nimport type { ExtractPropTypes } from 'vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n ...dialogContentProps,\n /**\n * @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`\n */\n appendToBody: Boolean,\n /**\n * @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog\n */\n beforeClose: {\n type: definePropType(Function),\n },\n /**\n * @description destroy elements in Dialog when closed\n */\n destroyOnClose: Boolean,\n /**\n * @description whether the Dialog can be closed by clicking the mask\n */\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the Dialog can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether scroll of body is disabled while Dialog is displayed\n */\n lockScroll: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether a mask is displayed\n */\n modal: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the Time(milliseconds) before open\n */\n openDelay: {\n type: Number,\n default: 0,\n },\n /**\n * @description the Time(milliseconds) before close\n */\n closeDelay: {\n type: Number,\n default: 0,\n },\n /**\n * @description value for `margin-top` of Dialog CSS, default is 15vh\n */\n top: {\n type: String,\n },\n /**\n * @description visibility of Dialog\n */\n modelValue: Boolean,\n /**\n * @description custom class names for mask\n */\n modalClass: String,\n /**\n * @description width of Dialog, default is 50%\n */\n width: {\n type: [String, Number],\n },\n /**\n * @description same as z-index in native CSS, z-order of dialog\n */\n zIndex: {\n type: Number,\n },\n trapFocus: {\n type: Boolean,\n default: false,\n },\n /**\n * @description header's aria-level attribute\n */\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DialogProps = ExtractPropTypes\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n openAutoFocus: () => true,\n closeAutoFocus: () => true,\n}\nexport type DialogEmits = typeof dialogEmits\n", "import {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\n\nimport {\n defaultNamespace,\n useId,\n useLockscreen,\n useZIndex,\n} from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { addUnit, isClient } from '@element-plus/utils'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\n\nimport type { CSSProperties, Ref, SetupContext } from 'vue'\nimport type { DialogEmits, DialogProps } from './dialog'\n\nexport const useDialog = (\n props: DialogProps,\n targetRef: Ref\n) => {\n const instance = getCurrentInstance()!\n const emit = instance.emit as SetupContext['emit']\n const { nextZIndex } = useZIndex()\n\n let lastPosition = ''\n const titleId = useId()\n const bodyId = useId()\n const visible = ref(false)\n const closed = ref(false)\n const rendered = ref(false) // when desctroyOnClose is true, we initialize it as false vise versa\n const zIndex = ref(props.zIndex || nextZIndex())\n\n let openTimer: (() => void) | undefined = undefined\n let closeTimer: (() => void) | undefined = undefined\n\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n\n const style = computed(() => {\n const style: CSSProperties = {}\n const varPrefix = `--${namespace.value}-dialog` as const\n if (!props.fullscreen) {\n if (props.top) {\n style[`${varPrefix}-margin-top`] = props.top\n }\n if (props.width) {\n style[`${varPrefix}-width`] = addUnit(props.width)\n }\n }\n return style\n })\n\n const overlayDialogStyle = computed(() => {\n if (props.alignCenter) {\n return { display: 'flex' }\n }\n return {}\n })\n\n function afterEnter() {\n emit('opened')\n }\n\n function afterLeave() {\n emit('closed')\n emit(UPDATE_MODEL_EVENT, false)\n if (props.destroyOnClose) {\n rendered.value = false\n }\n }\n\n function beforeLeave() {\n emit('close')\n }\n\n function open() {\n closeTimer?.()\n openTimer?.()\n\n if (props.openDelay && props.openDelay > 0) {\n ;({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay))\n } else {\n doOpen()\n }\n }\n\n function close() {\n openTimer?.()\n closeTimer?.()\n\n if (props.closeDelay && props.closeDelay > 0) {\n ;({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay))\n } else {\n doClose()\n }\n }\n\n function handleClose() {\n function hide(shouldCancel?: boolean) {\n if (shouldCancel) return\n closed.value = true\n visible.value = false\n }\n\n if (props.beforeClose) {\n props.beforeClose(hide)\n } else {\n close()\n }\n }\n\n function onModalClick() {\n if (props.closeOnClickModal) {\n handleClose()\n }\n }\n\n function doOpen() {\n if (!isClient) return\n visible.value = true\n }\n\n function doClose() {\n visible.value = false\n }\n\n function onOpenAutoFocus() {\n emit('openAutoFocus')\n }\n\n function onCloseAutoFocus() {\n emit('closeAutoFocus')\n }\n\n function onFocusoutPrevented(event: CustomEvent) {\n if (event.detail?.focusReason === 'pointer') {\n event.preventDefault()\n }\n }\n\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n function onCloseRequested() {\n if (props.closeOnPressEscape) {\n handleClose()\n }\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n if (val) {\n closed.value = false\n open()\n rendered.value = true // enables lazy rendering\n zIndex.value = props.zIndex ? zIndex.value++ : nextZIndex()\n // this.$el.addEventListener('scroll', this.updatePopper)\n nextTick(() => {\n emit('open')\n if (targetRef.value) {\n targetRef.value.scrollTop = 0\n }\n })\n } else {\n // this.$el.removeEventListener('scroll', this.updatePopper\n if (visible.value) {\n close()\n }\n }\n }\n )\n\n watch(\n () => props.fullscreen,\n (val) => {\n if (!targetRef.value) return\n if (val) {\n lastPosition = targetRef.value.style.transform\n targetRef.value.style.transform = ''\n } else {\n targetRef.value.style.transform = lastPosition\n }\n }\n )\n\n onMounted(() => {\n if (props.modelValue) {\n visible.value = true\n rendered.value = true // enables lazy rendering\n open()\n }\n })\n\n return {\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n close,\n doClose,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onCloseRequested,\n onFocusoutPrevented,\n titleId,\n bodyId,\n closed,\n style,\n overlayDialogStyle,\n rendered,\n visible,\n zIndex,\n }\n}\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Dialog from './src/dialog.vue'\n\nexport const ElDialog = withInstall(Dialog)\nexport default ElDialog\n\nexport * from './src/use-dialog'\nexport * from './src/dialog'\nexport * from './src/constants'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n /**\n * @description Set divider's direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Set the style of divider\n */\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n /**\n * @description the position of the customized content on the divider line\n */\n borderStyle: {\n type: definePropType(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes\n\nexport type DividerInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Divider from './src/divider.vue'\n\nexport const ElDivider = withInstall(Divider)\nexport default ElDivider\n\nexport * from './src/divider'\n", "import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n headerAriaLevel: {\n type: String,\n default: '2',\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes\n\nexport const drawerEmits = dialogEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Drawer from './src/drawer.vue'\n\nexport const ElDrawer = withInstall(Drawer)\nexport default ElDrawer\n\nexport * from './src/drawer'\n", "\n\n\n", "\n\n\n", "import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type { SetupContext } from '@vue/runtime-core'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref(null)\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref(null)\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\nimport type { ExtractPropTypes, HTMLAttributes, StyleValue } from 'vue'\n\nexport const rovingFocusGroupProps = buildProps({\n style: { type: definePropType([String, Array, Object]) },\n currentTabId: {\n type: definePropType(String),\n },\n defaultCurrentTabId: String,\n loop: Boolean,\n dir: {\n type: String, // left for direction support\n values: ['ltr', 'rtl'],\n default: 'ltr',\n },\n orientation: {\n // left for orientation support\n type: definePropType(String),\n },\n\n onBlur: Function,\n onFocus: Function,\n onMousedown: Function,\n})\n\nexport type ElRovingFocusGroupProps = ExtractPropTypes<\n typeof rovingFocusGroupProps\n>\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('RovingFocusGroup')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n}\n", "import type { InjectionKey, Ref, StyleValue } from 'vue'\nimport type { ElRovingFocusGroupProps } from './roving-focus-group'\n\ntype EventHandler = (e: T) => void\n\nexport type RovingGroupInjectionContext = {\n currentTabbedId: Ref\n dir: Ref\n loop: Ref\n orientation: Ref\n tabIndex: Ref\n rovingFocusGroupRef: Ref\n rovingFocusGroupRootStyle: Ref\n onBlur: EventHandler\n onFocus: EventHandler\n onMousedown: EventHandler\n onItemFocus: (id: string) => void\n onItemShiftTab: () => void\n}\n\nexport type RovingFocusGroupItemInjectionContext = {\n rovingFocusGroupItemRef: Ref\n tabIndex: Ref\n handleMousedown: EventHandler\n handleFocus: EventHandler\n handleKeydown: EventHandler\n}\n\nexport const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey =\n Symbol('elRovingFocusGroup')\n\nexport const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey =\n Symbol('elRovingFocusGroupItem')\n", "import { EVENT_CODE } from '@element-plus/constants'\nimport type { HTMLAttributes } from 'vue'\n\ntype Orientation = HTMLAttributes['aria-orientation']\ntype Direction = 'ltr' | 'rtl'\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next'\n\nconst MAP_KEY_TO_FOCUS_INTENT: Record = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last',\n}\n\nconst getDirectionAwareKey = (key: string, dir?: Direction) => {\n if (dir !== 'rtl') return key\n\n switch (key) {\n case EVENT_CODE.right:\n return EVENT_CODE.left\n case EVENT_CODE.left:\n return EVENT_CODE.right\n default:\n return key\n }\n}\n\nexport const getFocusIntent = (\n event: KeyboardEvent,\n orientation?: Orientation,\n dir?: Direction\n) => {\n const key = getDirectionAwareKey(event.key, dir)\n if (\n orientation === 'vertical' &&\n [EVENT_CODE.left, EVENT_CODE.right].includes(key)\n )\n return undefined\n if (\n orientation === 'horizontal' &&\n [EVENT_CODE.up, EVENT_CODE.down].includes(key)\n )\n return undefined\n return MAP_KEY_TO_FOCUS_INTENT[key]\n}\n\nexport const reorderArray = (array: T[], atIdx: number) => {\n return array.map((_, idx) => array[(idx + atIdx) % array.length])\n}\n\nexport const focusFirst = (elements: HTMLElement[]) => {\n const { activeElement: prevActive } = document\n\n for (const element of elements) {\n if (element === prevActive) return\n element.focus()\n if (prevActive !== document.activeElement) return\n }\n}\n", "\n\n\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { Options } from '@popperjs/core'\nimport type { ButtonProps, ButtonType } from '@element-plus/components/button'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ComponentInternalInstance, ComputedRef } from 'vue'\nimport type { Nullable } from '@element-plus/utils'\n\nexport interface IElDropdownInstance {\n instance?: ComponentInternalInstance\n dropdownSize?: ComputedRef\n handleClick?: () => void\n commandHandler?: (...arg) => void\n show?: () => void\n hide?: () => void\n trigger?: ComputedRef\n hideOnClick?: ComputedRef\n triggerElm?: ComputedRef>\n}\n\nexport const dropdownProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n type: {\n type: definePropType(String),\n },\n placement: {\n type: definePropType(String),\n default: 'bottom',\n },\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n id: String,\n size: {\n type: String,\n default: '',\n },\n splitButton: Boolean,\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n loop: {\n type: Boolean,\n default: true,\n },\n showTimeout: {\n type: Number,\n default: 150,\n },\n hideTimeout: {\n type: Number,\n default: 150,\n },\n tabindex: {\n type: definePropType([Number, String]),\n default: 0,\n },\n maxHeight: {\n type: definePropType([Number, String]),\n default: '',\n },\n popperClass: {\n type: String,\n default: '',\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n role: {\n type: String,\n default: 'menu',\n },\n buttonProps: {\n type: definePropType(Object),\n },\n teleported: useTooltipContentProps.teleported,\n} as const)\n\nexport const dropdownItemProps = buildProps({\n command: {\n type: [Object, String, Number],\n default: () => ({}),\n },\n disabled: Boolean,\n divided: Boolean,\n textValue: String,\n icon: {\n type: iconPropType,\n },\n} as const)\n\nexport const dropdownMenuProps = buildProps({\n onKeydown: { type: definePropType<(e: KeyboardEvent) => void>(Function) },\n})\n\nexport const FIRST_KEYS = [\n EVENT_CODE.down,\n EVENT_CODE.pageDown,\n EVENT_CODE.home,\n]\n\nexport const LAST_KEYS = [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end]\n\nexport const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('Dropdown')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as DROPDOWN_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,\n}\n", "import type { ComputedRef, InjectionKey, Ref } from 'vue'\n\nexport type ElDropdownInjectionContext = {\n contentRef: Ref\n role: ComputedRef\n triggerId: ComputedRef\n isUsingKeyboard: Ref\n onItemLeave: (e: PointerEvent) => void\n onItemEnter: (e: PointerEvent) => void\n}\n\nexport const DROPDOWN_INJECTION_KEY: InjectionKey =\n Symbol('elDropdown')\n", "\n\n", "\n\n\n", "// @ts-nocheck\nimport { computed, inject, ref } from 'vue'\nimport { addClass, generateId } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { Nullable } from '@element-plus/utils'\nimport type { IElDropdownInstance } from './dropdown'\n\nexport const useDropdown = () => {\n const elDropdown = inject('elDropdown', {})\n const _elDropdownSize = computed(() => elDropdown?.dropdownSize)\n\n return {\n elDropdown,\n _elDropdownSize,\n }\n}\n\nexport const initDropdownDomEvent = (\n dropdownChildren,\n triggerElm,\n _instance\n) => {\n const ns = useNamespace('dropdown')\n const menuItems = ref>(null)\n const menuItemsArray = ref>(null)\n const dropdownElm = ref>(null)\n const listId = ref(`dropdown-menu-${generateId()}`)\n dropdownElm.value = dropdownChildren?.subTree.el\n\n function removeTabindex() {\n triggerElm.setAttribute('tabindex', '-1')\n menuItemsArray.value?.forEach((item) => {\n item.setAttribute('tabindex', '-1')\n })\n }\n\n function resetTabindex(ele) {\n removeTabindex()\n ele?.setAttribute('tabindex', '0')\n }\n\n function handleTriggerKeyDown(ev: KeyboardEvent) {\n const code = ev.code\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n removeTabindex()\n resetTabindex(menuItems.value[0])\n menuItems.value[0].focus()\n ev.preventDefault()\n ev.stopPropagation()\n } else if (code === EVENT_CODE.enter) {\n _instance.handleClick()\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide()\n }\n }\n\n function handleItemKeyDown(ev) {\n const code = ev.code\n const target = ev.target\n const currentIndex = menuItemsArray.value.indexOf(target)\n const max = menuItemsArray.value.length - 1\n let nextIndex\n if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {\n if (code === EVENT_CODE.up) {\n nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0\n } else {\n nextIndex = currentIndex < max ? currentIndex + 1 : max\n }\n removeTabindex()\n resetTabindex(menuItems.value[nextIndex])\n menuItems.value[nextIndex].focus()\n ev.preventDefault()\n ev.stopPropagation()\n } else if (code === EVENT_CODE.enter) {\n triggerElmFocus()\n target.click()\n if (_instance.props.hideOnClick) {\n _instance.hide()\n }\n } else if ([EVENT_CODE.tab, EVENT_CODE.esc].includes(code)) {\n _instance.hide()\n triggerElmFocus()\n }\n }\n\n function initAria() {\n dropdownElm.value.setAttribute('id', listId.value)\n triggerElm.setAttribute('aria-haspopup', 'list')\n triggerElm.setAttribute('aria-controls', listId.value)\n if (!_instance.props.splitButton) {\n triggerElm.setAttribute('role', 'button')\n triggerElm.setAttribute('tabindex', _instance.props.tabindex)\n addClass(triggerElm, ns.b('selfdefine'))\n }\n }\n\n function initEvent() {\n triggerElm?.addEventListener('keydown', handleTriggerKeyDown)\n dropdownElm.value?.addEventListener('keydown', handleItemKeyDown, true)\n }\n\n function initDomOperation() {\n menuItems.value = dropdownElm.value.querySelectorAll(\n \"[tabindex='-1']\"\n ) as unknown as HTMLButtonElement[]\n menuItemsArray.value = Array.from(menuItems.value)\n\n initEvent()\n initAria()\n }\n\n function triggerElmFocus() {\n triggerElm.focus()\n }\n\n initDomOperation()\n}\n", "\n\n", "\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Dropdown from './src/dropdown.vue'\nimport DropdownItem from './src/dropdown-item.vue'\nimport DropdownMenu from './src/dropdown-menu.vue'\n\nexport const ElDropdown = withInstall(Dropdown, {\n DropdownItem,\n DropdownMenu,\n})\nexport default ElDropdown\nexport const ElDropdownItem = withNoopInstall(DropdownItem)\nexport const ElDropdownMenu = withNoopInstall(DropdownMenu)\nexport * from './src/dropdown'\nexport * from './src/instance'\nexport * from './src/tokens'\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const emptyProps = buildProps({\n /**\n * @description image URL of empty\n */\n image: {\n type: String,\n default: '',\n },\n /**\n * @description image size (width) of empty\n */\n imageSize: Number,\n /**\n * @description description of empty\n */\n description: {\n type: String,\n default: '',\n },\n} as const)\n\nexport type EmptyProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Empty from './src/empty.vue'\n\nexport const ElEmpty = withInstall(Empty)\nexport default ElEmpty\n\nexport * from './src/empty'\nexport type { EmptyInstance } from './src/instance'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type ImageViewer from './image-viewer.vue'\n\nexport type ImageViewerAction =\n | 'zoomIn'\n | 'zoomOut'\n | 'clockwise'\n | 'anticlockwise'\n\nexport const imageViewerProps = buildProps({\n /**\n * @description preview link list.\n */\n urlList: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description preview backdrop z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description the initial preview image index, less than or equal to the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether user can emit close event when clicking backdrop.\n */\n hideOnClickModal: Boolean,\n /**\n * @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n teleported: Boolean,\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event.\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n} as const)\nexport type ImageViewerProps = ExtractPropTypes\n\nexport const imageViewerEmits = {\n close: () => true,\n switch: (index: number) => isNumber(index),\n rotate: (deg: number) => isNumber(deg),\n}\nexport type ImageViewerEmits = typeof imageViewerEmits\n\nexport interface ImageViewerMode {\n name: string\n icon: Component\n}\n\nexport type ImageViewerInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport ImageViewer from './src/image-viewer.vue'\n\nexport const ElImageViewer = withInstall(ImageViewer)\nexport default ElImageViewer\n\nexport * from './src/image-viewer'\n", "import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const imageProps = buildProps({\n /**\n * @description when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode.\n */\n hideOnClickModal: Boolean,\n /**\n * @description image source, same as native.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).\n */\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n /**\n * @description Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading)\n */\n loading: {\n type: String,\n values: ['eager', 'lazy'],\n },\n /**\n * @description whether to use lazy load.\n */\n lazy: Boolean,\n /**\n * @description the container to add scroll listener when using lazy load.\n */\n scrollContainer: {\n type: definePropType([String, Object]),\n },\n /**\n * @description allow big image preview.\n */\n previewSrcList: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n previewTeleported: Boolean,\n /**\n * @description set image preview z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description initial preview image index, less than the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether the viewer preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n} as const)\nexport type ImageProps = ExtractPropTypes\n\nexport const imageEmits = {\n load: (evt: Event) => evt instanceof Event,\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n show: () => true,\n}\nexport type ImageEmits = typeof imageEmits\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Image from './src/image.vue'\n\nexport const ElImage = withInstall(Image)\nexport default ElImage\n\nexport * from './src/image'\n", "import { isNil } from 'lodash-unified'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type InputNumber from './input-number.vue'\n\nexport const inputNumberProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description incremental step\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether input value can only be multiple of step\n */\n stepStrictly: Boolean,\n /**\n * @description the maximum allowed value\n */\n max: {\n type: Number,\n default: Number.POSITIVE_INFINITY,\n },\n /**\n * @description the minimum allowed value\n */\n min: {\n type: Number,\n default: Number.NEGATIVE_INFINITY,\n },\n /**\n * @description binding value\n */\n modelValue: Number,\n /**\n * @description same as `readonly` in native input\n */\n readonly: Boolean,\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description size of the component\n */\n size: useSizeProp,\n /**\n * @description whether to enable the control buttons\n */\n controls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the control buttons\n */\n controlsPosition: {\n type: String,\n default: '',\n values: ['', 'right'],\n },\n /**\n * @description value should be set when input box is cleared\n */\n valueOnClear: {\n type: [String, Number, null],\n validator: (val: 'min' | 'max' | number | null) =>\n val === null || isNumber(val) || ['min', 'max'].includes(val),\n default: null,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description same as `label` in native input\n */\n label: String,\n /**\n * @description same as `placeholder` in native input\n */\n placeholder: String,\n /**\n * @description precision of input value\n */\n precision: {\n type: Number,\n validator: (val: number) =>\n val >= 0 && val === Number.parseInt(`${val}`, 10),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type InputNumberProps = ExtractPropTypes\n\nexport const inputNumberEmits = {\n [CHANGE_EVENT]: (cur: number | undefined, prev: number | undefined) =>\n prev !== cur,\n blur: (e: FocusEvent) => e instanceof FocusEvent,\n focus: (e: FocusEvent) => e instanceof FocusEvent,\n [INPUT_EVENT]: (val: number | null | undefined) =>\n isNumber(val) || isNil(val),\n [UPDATE_MODEL_EVENT]: (val: number | undefined) =>\n isNumber(val) || isNil(val),\n}\nexport type InputNumberEmits = typeof inputNumberEmits\n\nexport type InputNumberInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\nimport InputNumber from './src/input-number.vue'\n\nexport const ElInputNumber = withInstall(InputNumber)\n\nexport default ElInputNumber\nexport * from './src/input-number'\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: 'default',\n },\n /**\n * @description whether the component has underline\n */\n underline: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: { type: Boolean, default: false },\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Link from './src/link.vue'\n\nexport const ElLink = withInstall(Link)\nexport default ElLink\n\nexport * from './src/link'\n", "// @ts-nocheck\nimport { triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type MenuItem from './menu-item'\n\nclass SubMenu {\n public subMenuItems: NodeList\n public subIndex = 0\n constructor(public parent: MenuItem, public domNode: ParentNode) {\n this.subIndex = 0\n this.init()\n }\n\n init(): void {\n this.subMenuItems = this.domNode.querySelectorAll('li')\n this.addListeners()\n }\n\n gotoSubIndex(idx: number): void {\n if (idx === this.subMenuItems.length) {\n idx = 0\n } else if (idx < 0) {\n idx = this.subMenuItems.length - 1\n }\n ;(this.subMenuItems[idx] as HTMLElement).focus()\n this.subIndex = idx\n }\n\n addListeners(): void {\n const parentNode = this.parent.domNode\n Array.prototype.forEach.call(this.subMenuItems, (el: Element) => {\n el.addEventListener('keydown', (event: KeyboardEvent) => {\n let prevDef = false\n switch (event.code) {\n case EVENT_CODE.down: {\n this.gotoSubIndex(this.subIndex + 1)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n this.gotoSubIndex(this.subIndex - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(parentNode as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n event.stopPropagation()\n }\n return false\n })\n })\n }\n}\n\nexport default SubMenu\n", "// @ts-nocheck\nimport { triggerEvent } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport SubMenu from './submenu'\n\nclass MenuItem {\n public submenu: SubMenu = null\n constructor(public domNode: HTMLElement, namespace: string) {\n this.submenu = null\n this.init(namespace)\n }\n\n init(namespace: string): void {\n this.domNode.setAttribute('tabindex', '0')\n const menuChild = this.domNode.querySelector(`.${namespace}-menu`)\n if (menuChild) {\n this.submenu = new SubMenu(this, menuChild)\n }\n this.addListeners()\n }\n\n addListeners(): void {\n this.domNode.addEventListener('keydown', (event: KeyboardEvent) => {\n let prevDef = false\n switch (event.code) {\n case EVENT_CODE.down: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu && this.submenu.gotoSubIndex(0)\n prevDef = true\n break\n }\n case EVENT_CODE.up: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseenter')\n this.submenu &&\n this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1)\n prevDef = true\n break\n }\n case EVENT_CODE.tab: {\n triggerEvent(event.currentTarget as HTMLElement, 'mouseleave')\n break\n }\n case EVENT_CODE.enter:\n case EVENT_CODE.space: {\n prevDef = true\n ;(event.currentTarget as HTMLElement).click()\n break\n }\n }\n if (prevDef) {\n event.preventDefault()\n }\n })\n }\n}\n\nexport default MenuItem\n", "import MenuItem from './menu-item'\n\nimport type { RendererNode } from 'vue'\n\nclass Menu {\n constructor(public domNode: RendererNode, namespace: string) {\n this.init(namespace)\n }\n init(namespace: string): void {\n const menuChildren = this.domNode.childNodes\n Array.from(menuChildren).forEach((child) => {\n if (child.nodeType === 1) {\n new MenuItem(child as HTMLElement, namespace)\n }\n })\n }\n}\n\nexport default Menu\n", "\n\n", "import { computed } from 'vue'\n\nimport type { ComponentInternalInstance, Ref } from 'vue'\n\nexport default function useMenu(\n instance: ComponentInternalInstance,\n currentIndex: Ref\n) {\n const indexPath = computed(() => {\n let parent = instance.parent!\n const path = [currentIndex.value]\n while (parent.type.name !== 'ElMenu') {\n if (parent.props.index) {\n path.unshift(parent.props.index as string)\n }\n parent = parent.parent!\n }\n return path\n })\n\n const parentMenu = computed(() => {\n let parent = instance.parent\n while (parent && !['ElMenu', 'ElSubMenu'].includes(parent.type.name!)) {\n parent = parent.parent\n }\n return parent!\n })\n\n return {\n parentMenu,\n indexPath,\n }\n}\n", "import { computed } from 'vue'\nimport { TinyColor } from '@ctrl/tinycolor'\n\nimport type { MenuProps } from './menu'\n\nexport default function useMenuColor(props: MenuProps) {\n const menuBarColor = computed(() => {\n const color = props.backgroundColor\n if (!color) {\n return ''\n } else {\n return new TinyColor(color).shade(20).toString()\n }\n })\n return menuBarColor\n}\n", "import { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenuColor from './use-menu-color'\n\nimport type { MenuProps } from './menu'\n\nexport const useMenuCssVar = (props: MenuProps, level: number) => {\n const ns = useNamespace('menu')\n return computed(() => {\n return ns.cssVarBlock({\n 'text-color': props.textColor || '',\n 'hover-text-color': props.textColor || '',\n 'bg-color': props.backgroundColor || '',\n 'hover-bg-color': useMenuColor(props).value || '',\n 'active-color': props.activeTextColor || '',\n level: `${level}`,\n })\n })\n}\n", "import {\n Fragment,\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n buildProps,\n iconPropType,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport { useDeprecated, useNamespace } from '@element-plus/hooks'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { CSSProperties, ExtractPropTypes, VNodeArrayChildren } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n teleported: {\n type: Boolean,\n default: undefined,\n },\n popperOffset: {\n type: Number,\n default: 6,\n },\n expandCloseIcon: {\n type: iconPropType,\n },\n expandOpenIcon: {\n type: iconPropType,\n },\n collapseCloseIcon: {\n type: iconPropType,\n },\n collapseOpenIcon: {\n type: iconPropType,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n useDeprecated(\n {\n from: 'popper-append-to-body',\n replacement: 'teleported',\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/menu.html#submenu-attributes',\n },\n computed(() => props.popperAppendToBody !== undefined)\n )\n\n const instance = getCurrentInstance()!\n const { indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // inject\n const rootMenu = inject('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref({})\n const subMenus = ref({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref()\n const vPopper = ref | null>(null)\n\n // computed\n const currentPlacement = computed(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? props.expandCloseIcon && props.expandOpenIcon\n ? opened.value\n ? props.expandOpenIcon\n : props.expandCloseIcon\n : ArrowDown\n : props.collapseCloseIcon && props.collapseOpenIcon\n ? opened.value\n ? props.collapseOpenIcon\n : props.collapseCloseIcon\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n return subMenu.level === 0\n })\n const appendToBody = computed(() => {\n const value = props.teleported ?? props.popperAppendToBody\n return value === undefined ? isFirstLevel.value : value\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse\n ? `${nsMenu.namespace.value}-zoom-in-left`\n : `${nsMenu.namespace.value}-zoom-in-top`\n )\n const fallbackPlacements = computed(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'right',\n 'right-end',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const backgroundColor = computed(() => rootMenu.props.backgroundColor || '')\n const activeTextColor = computed(() => rootMenu.props.activeTextColor || '')\n const textColor = computed(() => rootMenu.props.textColor || '')\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)\n const titleStyle = computed(() => {\n if (mode.value !== 'horizontal') {\n return {\n color: textColor.value,\n }\n }\n return {\n borderBottomColor: active.value\n ? rootMenu.props.activeTextColor\n ? activeTextColor.value\n : ''\n : 'transparent',\n color: active.value ? activeTextColor.value : textColor.value,\n }\n })\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus') {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n level: subMenu.level + 1,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-arrow'),\n style: {\n transform: opened.value\n ? (props.expandCloseIcon && props.expandOpenIcon) ||\n (props.collapseCloseIcon &&\n props.collapseOpenIcon &&\n rootMenu.props.collapse)\n ? 'none'\n : 'rotateZ(180deg)'\n : 'none',\n },\n },\n {\n default: () =>\n isString(subMenuTitleIcon.value)\n ? h(instance.appContext.components[subMenuTitleIcon.value])\n : h(subMenuTitleIcon.value),\n }\n ),\n ]\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: props.popperOffset,\n showArrow: false,\n persistent: true,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [\n nsMenu.m(mode.value),\n nsMenu.m('popup-container'),\n props.popperClass,\n ],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n nsMenu.b(),\n nsMenu.m('popup'),\n nsMenu.m(`popup-${currentPlacement.value}`),\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: nsSubMenu.e('title'),\n style: [\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: [nsMenu.b(), nsMenu.m('inline')],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n nsSubMenu.b(),\n nsSubMenu.is('active', active.value),\n nsSubMenu.is('opened', opened.value),\n nsSubMenu.is('disabled', props.disabled),\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n", "import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n isObject,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type { ExtractPropTypes, VNode, VNodeArrayChildren } from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n defaultActive: {\n type: String,\n default: '',\n },\n defaultOpeneds: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n uniqueOpened: Boolean,\n router: Boolean,\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n collapse: Boolean,\n backgroundColor: String,\n textColor: String,\n activeTextColor: String,\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n ellipsis: {\n type: Boolean,\n default: true,\n },\n popperEffect: {\n type: String,\n values: ['dark', 'light'],\n default: 'dark',\n },\n} as const)\nexport type MenuProps = ExtractPropTypes\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n Array.isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (routerResult === undefined || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref(props.defaultActive)\n const items = ref({})\n const subMenus = ref({})\n\n // computed\n const isMenuPopup = computed(() => {\n return (\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n })\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n if (isOpened) {\n closeMenu(index, indexPath)\n } else {\n openMenu(index, indexPath)\n }\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n if (item) {\n activeIndex.value = item.index\n } else {\n activeIndex.value = val\n }\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n const items = Array.from(menu.value?.childNodes ?? []).filter(\n (item) =>\n // remove comment type node #12634\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n const moreItemWidth = 64\n const paddingLeft = Number.parseInt(\n getComputedStyle(menu.value!).paddingLeft,\n 10\n )\n const paddingRight = Number.parseInt(\n getComputedStyle(menu.value!).paddingRight,\n 10\n )\n const menuWidth = menu.value!.clientWidth - paddingLeft - paddingRight\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += item.offsetWidth || 0\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timmer: ReturnType | null\n return () => {\n timmer && clearTimeout(timmer)\n timmer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n provide(\n 'rootMenu',\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n provide(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild: ref(false),\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n handleResize,\n })\n }\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = flattedChildren(slot) as VNodeArrayChildren\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n { default: () => h(More) }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n const vMenu = h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n", "import { buildProps, definePropType, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\n\nexport const menuItemProps = buildProps({\n index: {\n type: definePropType([String, null]),\n default: null,\n },\n route: {\n type: definePropType([String, Object]),\n },\n disabled: Boolean,\n} as const)\nexport type MenuItemProps = ExtractPropTypes\n\nexport const menuItemEmits = {\n click: (item: MenuItemRegistered) =>\n isString(item.index) && Array.isArray(item.indexPath),\n}\nexport type MenuItemEmits = typeof menuItemEmits\n", "\n\n\n", "import type { ExtractPropTypes } from 'vue'\n\nexport const menuItemGroupProps = {\n title: String,\n} as const\nexport type MenuItemGroupProps = ExtractPropTypes\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Menu from './src/menu'\nimport MenuItem from './src/menu-item.vue'\nimport MenuItemGroup from './src/menu-item-group.vue'\nimport SubMenu from './src/sub-menu'\n\nexport const ElMenu = withInstall(Menu, {\n MenuItem,\n MenuItemGroup,\n SubMenu,\n})\nexport default ElMenu\nexport const ElMenuItem = withNoopInstall(MenuItem)\nexport const ElMenuItemGroup = withNoopInstall(MenuItemGroup)\nexport const ElSubMenu = withNoopInstall(SubMenu)\n\nexport * from './src/menu'\nexport * from './src/menu-item'\nexport * from './src/menu-item-group'\nexport * from './src/sub-menu'\nexport * from './src/types'\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport { Back } from '@element-plus/icons-vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type PageHeader from './page-header.vue'\n\nexport const pageHeaderProps = buildProps({\n /**\n * @description icon component of page header\n */\n icon: {\n type: iconPropType,\n default: () => Back,\n },\n /**\n * @description main title of page header\n */\n title: String,\n /**\n * @description content of page header\n */\n content: {\n type: String,\n default: '',\n },\n} as const)\nexport type PageHeaderProps = ExtractPropTypes\n\nexport const pageHeaderEmits = {\n back: () => true,\n}\nexport type PageHeaderEmits = typeof pageHeaderEmits\n\nexport type PageHeaderInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport PageHeader from './src/page-header.vue'\n\nexport const ElPageHeader = withInstall(PageHeader)\nexport default ElPageHeader\n\nexport * from './src/page-header'\n", "import type { ComputedRef, InjectionKey, WritableComputedRef } from 'vue'\n\nexport interface ElPaginationContext {\n currentPage?: WritableComputedRef\n pageCount?: ComputedRef\n disabled?: ComputedRef\n changeEvent?: (val: number) => void\n handleSizeChange?: (val: number) => void\n}\n\nexport const elPaginationKey: InjectionKey =\n Symbol('elPaginationKey')\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Prev from './prev.vue'\n\nexport const paginationPrevProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n prevText: {\n type: String,\n },\n prevIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport const paginationPrevEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type PaginationPrevProps = ExtractPropTypes\n\nexport type PrevInstance = InstanceType\n", "\n\n\n", "import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Next from './next.vue'\n\nexport const paginationNextProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n default: 50,\n },\n nextText: {\n type: String,\n },\n nextIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport type PaginationNextProps = ExtractPropTypes\n\nexport type NextInstance = InstanceType\n", "\n\n\n", "import type { InjectionKey, Ref } from 'vue'\n\ninterface SelectGroupContext {\n disabled: boolean\n}\n\nexport interface QueryChangeCtx {\n query: string\n}\n\nexport interface SelectContext {\n props: {\n multiple?: boolean\n multipleLimit?: number\n valueKey?: string\n modelValue?: string | number | unknown | unknown[]\n popperClass?: string\n remote?: boolean\n fitInputWidth?: boolean\n }\n queryChange: Ref\n groupQueryChange: Ref\n selectWrapper: HTMLElement\n cachedOptions: Map\n hoverIndex: number\n optionsCount: number\n filteredOptionsCount: number\n options: Map\n optionsArray: any[]\n selected: any | any[]\n setSelected(): void\n onOptionCreate(vm: SelectOptionProxy): void\n onOptionDestroy(key: number | string | Record): void\n handleOptionSelect(vm: unknown): void\n}\n\n// For individual build sharing injection key, we had to make `Symbol` to string\nexport const selectGroupKey: InjectionKey =\n Symbol('ElSelectGroup')\n\nexport const selectKey: InjectionKey = Symbol('ElSelect')\n\nexport interface SelectOptionProxy {\n value: string | number | Record\n label: string | number\n created: boolean\n disabled: boolean\n currentLabel: string\n itemSelected: boolean\n isDisabled: boolean\n select: SelectContext\n hoverItem: () => void\n visible: boolean\n hover: boolean\n selectOptionClick: () => void\n}\n", "// @ts-nocheck\nimport { computed, getCurrentInstance, inject, toRaw, unref, watch } from 'vue'\nimport { get } from 'lodash-unified'\nimport { escapeStringRegexp } from '@element-plus/utils'\nimport { selectGroupKey, selectKey } from './token'\n\nimport type { Ref } from 'vue'\nimport type { QueryChangeCtx } from './token'\n\nexport function useOption(props, states) {\n // inject\n const select = inject(selectKey)\n const selectGroup = inject(selectGroupKey, { disabled: false })\n\n // computed\n const isObject = computed(() => {\n return (\n Object.prototype.toString.call(props.value).toLowerCase() ===\n '[object object]'\n )\n })\n\n const itemSelected = computed(() => {\n if (!select.props.multiple) {\n return isEqual(props.value, select.props.modelValue)\n } else {\n return contains(select.props.modelValue as unknown[], props.value)\n }\n })\n\n const limitReached = computed(() => {\n if (select.props.multiple) {\n const modelValue = (select.props.modelValue || []) as unknown[]\n return (\n !itemSelected.value &&\n modelValue.length >= select.props.multipleLimit &&\n select.props.multipleLimit > 0\n )\n } else {\n return false\n }\n })\n\n const currentLabel = computed(() => {\n return props.label || (isObject.value ? '' : props.value)\n })\n\n const currentValue = computed(() => {\n return props.value || props.label || ''\n })\n\n const isDisabled = computed(() => {\n return props.disabled || states.groupDisabled || limitReached.value\n })\n\n const instance = getCurrentInstance()\n\n const contains = (arr = [], target) => {\n if (!isObject.value) {\n return arr && arr.includes(target)\n } else {\n const valueKey = select.props.valueKey\n return (\n arr &&\n arr.some((item) => {\n return toRaw(get(item, valueKey)) === get(target, valueKey)\n })\n )\n }\n }\n\n const isEqual = (a: unknown, b: unknown) => {\n if (!isObject.value) {\n return a === b\n } else {\n const { valueKey } = select.props\n return get(a, valueKey) === get(b, valueKey)\n }\n }\n\n const hoverItem = () => {\n if (!props.disabled && !selectGroup.disabled) {\n select.hoverIndex = select.optionsArray.indexOf(instance.proxy)\n }\n }\n\n watch(\n () => currentLabel.value,\n () => {\n if (!props.created && !select.props.remote) select.setSelected()\n }\n )\n\n watch(\n () => props.value,\n (val, oldVal) => {\n const { remote, valueKey } = select.props\n\n if (!Object.is(val, oldVal)) {\n select.onOptionDestroy(oldVal, instance.proxy)\n select.onOptionCreate(instance.proxy)\n }\n\n if (!props.created && !remote) {\n if (\n valueKey &&\n typeof val === 'object' &&\n typeof oldVal === 'object' &&\n val[valueKey] === oldVal[valueKey]\n ) {\n return\n }\n select.setSelected()\n }\n }\n )\n\n watch(\n () => selectGroup.disabled,\n () => {\n states.groupDisabled = selectGroup.disabled\n },\n { immediate: true }\n )\n\n const { queryChange } = toRaw(select)\n watch(\n queryChange,\n (changes: Ref) => {\n const { query } = unref(changes)\n\n const regexp = new RegExp(escapeStringRegexp(query), 'i')\n states.visible = regexp.test(currentLabel.value) || props.created\n if (!states.visible) {\n select.filteredOptionsCount--\n }\n },\n { immediate: true }\n )\n\n return {\n select,\n currentLabel,\n currentValue,\n itemSelected,\n isDisabled,\n hoverItem,\n }\n}\n", "\n\n\n", "\n\n\n", "// @ts-nocheck\nimport {\n computed,\n nextTick,\n reactive,\n ref,\n shallowRef,\n toRaw,\n triggerRef,\n unref,\n watch,\n} from 'vue'\nimport { isObject, toRawType } from '@vue/shared'\nimport {\n findLastIndex,\n get,\n isEqual,\n debounce as lodashDebounce,\n} from 'lodash-unified'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport {\n ValidateComponentsMap,\n debugWarn,\n getComponentSize,\n isClient,\n isFunction,\n isKorean,\n isNumber,\n isString,\n isUndefined,\n scrollIntoView,\n} from '@element-plus/utils'\nimport { useDeprecated, useLocale, useNamespace } from '@element-plus/hooks'\nimport { useFormItem, useFormSize } from '@element-plus/components/form'\n\nimport type { ComponentPublicInstance } from 'vue'\nimport type ElTooltip from '@element-plus/components/tooltip'\nimport type { QueryChangeCtx, SelectOptionProxy } from './token'\n\nexport function useSelectStates(props) {\n const { t } = useLocale()\n return reactive({\n options: new Map(),\n cachedOptions: new Map(),\n disabledOptions: new Map(),\n createdLabel: null,\n createdSelected: false,\n selected: props.multiple ? [] : ({} as any),\n inputLength: 20,\n inputWidth: 0,\n optionsCount: 0,\n filteredOptionsCount: 0,\n visible: false,\n selectedLabel: '',\n hoverIndex: -1,\n query: '',\n previousQuery: null,\n inputHovering: false,\n cachedPlaceHolder: '',\n currentPlaceholder: t('el.select.placeholder') as string | (() => string),\n menuVisibleOnFocus: false,\n isOnComposition: false,\n prefixWidth: 11,\n mouseEnter: false,\n focused: false,\n })\n}\n\ntype States = ReturnType\n\nexport const useSelect = (props, states: States, ctx) => {\n const { t } = useLocale()\n const ns = useNamespace('select')\n\n useDeprecated(\n {\n from: 'suffixTransition',\n replacement: 'override style scheme',\n version: '2.3.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/select.html#select-attributes',\n },\n computed(() => props.suffixTransition === false)\n )\n\n // template refs\n const reference = ref void\n blur: () => void\n input: HTMLInputElement\n }> | null>(null)\n const input = ref(null)\n const iOSInput = ref(null)\n const tooltipRef = ref | null>(null)\n const tagTooltipRef = ref | null>(null)\n const tags = ref(null)\n const selectWrapper = ref(null)\n const scrollbar = ref<{\n handleScroll: () => void\n } | null>(null)\n const hoverOption = ref(-1)\n const queryChange = shallowRef({ query: '' })\n const groupQueryChange = shallowRef('')\n const optionList = ref([])\n let originClientHeight = 0\n\n const { form, formItem } = useFormItem()\n\n const readonly = computed(\n () => !props.filterable || props.multiple || !states.visible\n )\n\n const selectDisabled = computed(() => props.disabled || form?.disabled)\n\n const showClose = computed(() => {\n const hasValue = props.multiple\n ? Array.isArray(props.modelValue) && props.modelValue.length > 0\n : props.modelValue !== undefined &&\n props.modelValue !== null &&\n props.modelValue !== ''\n\n const criteria =\n props.clearable &&\n !selectDisabled.value &&\n states.inputHovering &&\n hasValue\n return criteria\n })\n const iconComponent = computed(() =>\n props.remote && props.filterable && !props.remoteShowSuffix\n ? ''\n : props.suffixIcon\n )\n const iconReverse = computed(() =>\n ns.is(\n 'reverse',\n iconComponent.value && states.visible && props.suffixTransition\n )\n )\n\n // Consistent with the processing of Form in the input component\n const showStatusIconAndState = computed(\n () =>\n form?.statusIcon &&\n formItem?.validateState &&\n ValidateComponentsMap[formItem?.validateState]\n )\n\n const debounce = computed(() => (props.remote ? 300 : 0))\n\n const emptyText = computed(() => {\n if (props.loading) {\n return props.loadingText || t('el.select.loading')\n } else {\n if (props.remote && states.query === '' && states.options.size === 0)\n return false\n if (\n props.filterable &&\n states.query &&\n states.options.size > 0 &&\n states.filteredOptionsCount === 0\n ) {\n return props.noMatchText || t('el.select.noMatch')\n }\n if (states.options.size === 0) {\n return props.noDataText || t('el.select.noData')\n }\n }\n return null\n })\n\n const optionsArray = computed(() => {\n const list = Array.from(states.options.values())\n const newList = []\n optionList.value.forEach((item) => {\n const index = list.findIndex((i) => i.currentLabel === item)\n if (index > -1) {\n newList.push(list[index])\n }\n })\n return newList.length >= list.length ? newList : list\n })\n\n const cachedOptionsArray = computed(() =>\n Array.from(states.cachedOptions.values())\n )\n\n const showNewOption = computed(() => {\n const hasExistingOption = optionsArray.value\n .filter((option) => {\n return !option.created\n })\n .some((option) => {\n return option.currentLabel === states.query\n })\n return (\n props.filterable &&\n props.allowCreate &&\n states.query !== '' &&\n !hasExistingOption\n )\n })\n\n const selectSize = useFormSize()\n\n const collapseTagSize = computed(() =>\n ['small'].includes(selectSize.value) ? 'small' : 'default'\n )\n\n const dropMenuVisible = computed({\n get() {\n return states.visible && emptyText.value !== false\n },\n set(val: boolean) {\n states.visible = val\n },\n })\n\n // watch\n watch(\n [() => selectDisabled.value, () => selectSize.value, () => form?.size],\n () => {\n nextTick(() => {\n resetInputHeight()\n })\n }\n )\n\n watch(\n () => props.placeholder,\n (val) => {\n states.cachedPlaceHolder = states.currentPlaceholder = val\n\n const hasValue =\n props.multiple &&\n Array.isArray(props.modelValue) &&\n props.modelValue.length > 0\n\n if (hasValue) {\n states.currentPlaceholder = ''\n }\n }\n )\n\n watch(\n () => props.modelValue,\n (val, oldVal) => {\n if (props.multiple) {\n resetInputHeight()\n if ((val && val.length > 0) || (input.value && states.query !== '')) {\n states.currentPlaceholder = ''\n } else {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n if (props.filterable && !props.reserveKeyword) {\n states.query = ''\n handleQueryChange(states.query)\n }\n }\n setSelected()\n if (props.filterable && !props.multiple) {\n states.inputLength = 20\n }\n if (!isEqual(val, oldVal) && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n },\n {\n flush: 'post',\n deep: true,\n }\n )\n\n watch(\n () => states.visible,\n (val) => {\n if (!val) {\n if (props.filterable) {\n if (isFunction(props.filterMethod)) {\n props.filterMethod('')\n }\n if (isFunction(props.remoteMethod)) {\n props.remoteMethod('')\n }\n }\n states.query = ''\n states.previousQuery = null\n states.selectedLabel = ''\n states.inputLength = 20\n states.menuVisibleOnFocus = false\n resetHoverIndex()\n nextTick(() => {\n if (\n input.value &&\n input.value.value === '' &&\n states.selected.length === 0\n ) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n })\n\n if (!props.multiple) {\n if (states.selected) {\n if (\n props.filterable &&\n props.allowCreate &&\n states.createdSelected &&\n states.createdLabel\n ) {\n states.selectedLabel = states.createdLabel\n } else {\n states.selectedLabel = states.selected.currentLabel\n }\n if (props.filterable) states.query = states.selectedLabel\n }\n\n if (props.filterable) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n }\n } else {\n tooltipRef.value?.updatePopper?.()\n\n if (props.filterable) {\n states.filteredOptionsCount = states.optionsCount\n states.query = props.remote ? '' : states.selectedLabel\n iOSInput.value?.focus?.()\n if (props.multiple) {\n input.value?.focus()\n } else {\n if (states.selectedLabel) {\n states.currentPlaceholder = `${states.selectedLabel}`\n states.selectedLabel = ''\n }\n }\n handleQueryChange(states.query)\n if (!props.multiple && !props.remote) {\n queryChange.value.query = ''\n\n triggerRef(queryChange)\n triggerRef(groupQueryChange)\n }\n }\n }\n ctx.emit('visible-change', val)\n }\n )\n\n watch(\n // fix `Array.prototype.push/splice/..` cannot trigger non-deep watcher\n // https://github.com/vuejs/vue-next/issues/2116\n () => states.options.entries(),\n () => {\n if (!isClient) return\n tooltipRef.value?.updatePopper?.()\n if (props.multiple) {\n resetInputHeight()\n }\n const inputs = selectWrapper.value?.querySelectorAll('input') || []\n if (\n (!props.filterable &&\n !props.defaultFirstOption &&\n !isUndefined(props.modelValue)) ||\n !Array.from(inputs).includes(document.activeElement as HTMLInputElement)\n ) {\n setSelected()\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n states.filteredOptionsCount\n ) {\n checkDefaultFirstOption()\n }\n },\n {\n flush: 'post',\n }\n )\n\n watch(\n () => states.hoverIndex,\n (val) => {\n if (isNumber(val) && val > -1) {\n hoverOption.value = optionsArray.value[val] || {}\n } else {\n hoverOption.value = {}\n }\n optionsArray.value.forEach((option) => {\n option.hover = hoverOption.value === option\n })\n }\n )\n\n // methods\n const resetInputHeight = () => {\n nextTick(() => {\n if (!reference.value) return\n const input = reference.value.$el.querySelector(\n 'input'\n ) as HTMLInputElement\n originClientHeight =\n originClientHeight ||\n (input.clientHeight > 0 ? input.clientHeight + 2 : 0)\n const _tags = tags.value\n const gotSize = getComponentSize(selectSize.value || form?.size)\n\n const sizeInMap =\n selectSize.value ||\n gotSize === originClientHeight ||\n originClientHeight <= 0\n ? gotSize\n : originClientHeight\n\n const isElHidden = input.offsetParent === null\n\n // it's an inner input so reduce it by 2px.\n !isElHidden &&\n (input.style.height = `${\n (states.selected.length === 0\n ? sizeInMap\n : Math.max(\n _tags\n ? _tags.clientHeight +\n (_tags.clientHeight > sizeInMap ? 6 : 0)\n : 0,\n sizeInMap\n )) - 2\n }px`)\n\n if (states.visible && emptyText.value !== false) {\n tooltipRef.value?.updatePopper?.()\n }\n })\n }\n\n const handleQueryChange = async (val) => {\n if (states.previousQuery === val || states.isOnComposition) return\n if (\n states.previousQuery === null &&\n (isFunction(props.filterMethod) || isFunction(props.remoteMethod))\n ) {\n states.previousQuery = val\n return\n }\n states.previousQuery = val\n nextTick(() => {\n if (states.visible) tooltipRef.value?.updatePopper?.()\n })\n states.hoverIndex = -1\n if (props.multiple && props.filterable) {\n nextTick(() => {\n // fix: https://github.com/element-plus/element-plus/issues/13872\n if (!selectDisabled.value) {\n const length = input.value!.value.length * 15 + 20\n states.inputLength = props.collapseTags\n ? Math.min(50, length)\n : length\n managePlaceholder()\n }\n resetInputHeight()\n })\n }\n if (props.remote && isFunction(props.remoteMethod)) {\n states.hoverIndex = -1\n props.remoteMethod(val)\n } else if (isFunction(props.filterMethod)) {\n props.filterMethod(val)\n triggerRef(groupQueryChange)\n } else {\n states.filteredOptionsCount = states.optionsCount\n queryChange.value.query = val\n\n triggerRef(queryChange)\n triggerRef(groupQueryChange)\n }\n if (\n props.defaultFirstOption &&\n (props.filterable || props.remote) &&\n states.filteredOptionsCount\n ) {\n await nextTick()\n checkDefaultFirstOption()\n }\n }\n\n const managePlaceholder = () => {\n if (states.currentPlaceholder !== '') {\n states.currentPlaceholder = input.value!.value\n ? ''\n : states.cachedPlaceHolder\n }\n }\n\n /**\n * find and highlight first option as default selected\n * @remark\n * - if the first option in dropdown list is user-created,\n * it would be at the end of the optionsArray\n * so find it and set hover.\n * (NOTE: there must be only one user-created option in dropdown list with query)\n * - if there's no user-created option in list, just find the first one as usual\n * (NOTE: exclude options that are disabled or in disabled-group)\n */\n const checkDefaultFirstOption = () => {\n const optionsInDropdown = optionsArray.value.filter(\n (n) => n.visible && !n.disabled && !n.states.groupDisabled\n )\n const userCreatedOption = optionsInDropdown.find((n) => n.created)\n const firstOriginOption = optionsInDropdown[0]\n states.hoverIndex = getValueIndex(\n optionsArray.value,\n userCreatedOption || firstOriginOption\n )\n }\n\n const setSelected = () => {\n if (!props.multiple) {\n const option = getOption(props.modelValue)\n if (option.props?.created) {\n states.createdLabel = option.props.value\n states.createdSelected = true\n } else {\n states.createdSelected = false\n }\n states.selectedLabel = option.currentLabel\n states.selected = option\n if (props.filterable) states.query = states.selectedLabel\n return\n } else {\n states.selectedLabel = ''\n }\n const result: any[] = []\n if (Array.isArray(props.modelValue)) {\n props.modelValue.forEach((value) => {\n result.push(getOption(value))\n })\n }\n states.selected = result\n nextTick(() => {\n resetInputHeight()\n })\n }\n\n const getOption = (value) => {\n let option\n const isObjectValue = toRawType(value).toLowerCase() === 'object'\n const isNull = toRawType(value).toLowerCase() === 'null'\n const isUndefined = toRawType(value).toLowerCase() === 'undefined'\n\n for (let i = states.cachedOptions.size - 1; i >= 0; i--) {\n const cachedOption = cachedOptionsArray.value[i]\n const isEqualValue = isObjectValue\n ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey)\n : cachedOption.value === value\n if (isEqualValue) {\n option = {\n value,\n currentLabel: cachedOption.currentLabel,\n isDisabled: cachedOption.isDisabled,\n }\n break\n }\n }\n if (option) return option\n const label = isObjectValue\n ? value.label\n : !isNull && !isUndefined\n ? value\n : ''\n const newOption = {\n value,\n currentLabel: label,\n }\n if (props.multiple) {\n ;(newOption as any).hitState = false\n }\n return newOption\n }\n\n const resetHoverIndex = () => {\n setTimeout(() => {\n const valueKey = props.valueKey\n if (!props.multiple) {\n states.hoverIndex = optionsArray.value.findIndex((item) => {\n return getValueKey(item) === getValueKey(states.selected)\n })\n } else {\n if (states.selected.length > 0) {\n states.hoverIndex = Math.min.apply(\n null,\n states.selected.map((selected) => {\n return optionsArray.value.findIndex((item) => {\n return get(item, valueKey) === get(selected, valueKey)\n })\n })\n )\n } else {\n states.hoverIndex = -1\n }\n }\n }, 300)\n }\n\n const handleResize = () => {\n resetInputWidth()\n tooltipRef.value?.updatePopper?.()\n props.multiple && resetInputHeight()\n }\n\n const resetInputWidth = () => {\n states.inputWidth = reference.value?.$el.offsetWidth\n }\n\n const onInputChange = () => {\n if (props.filterable && states.query !== states.selectedLabel) {\n states.query = states.selectedLabel\n handleQueryChange(states.query)\n }\n }\n\n const debouncedOnInputChange = lodashDebounce(() => {\n onInputChange()\n }, debounce.value)\n\n const debouncedQueryChange = lodashDebounce((e) => {\n handleQueryChange(e.target.value)\n }, debounce.value)\n\n const emitChange = (val) => {\n if (!isEqual(props.modelValue, val)) {\n ctx.emit(CHANGE_EVENT, val)\n }\n }\n\n const getLastNotDisabledIndex = (value) =>\n findLastIndex(value, (it) => !states.disabledOptions.has(it))\n\n const deletePrevTag = (e) => {\n if (e.code === EVENT_CODE.delete) return\n if (e.target.value.length <= 0 && !toggleLastOptionHitState()) {\n const value = props.modelValue.slice()\n const lastNotDisabledIndex = getLastNotDisabledIndex(value)\n if (lastNotDisabledIndex < 0) return\n value.splice(lastNotDisabledIndex, 1)\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n }\n\n if (e.target.value.length === 1 && props.modelValue.length === 0) {\n states.currentPlaceholder = states.cachedPlaceHolder\n }\n }\n\n const deleteTag = (event, tag) => {\n const index = states.selected.indexOf(tag)\n if (index > -1 && !selectDisabled.value) {\n const value = props.modelValue.slice()\n value.splice(index, 1)\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n ctx.emit('remove-tag', tag.value)\n }\n event.stopPropagation()\n focus()\n }\n\n const deleteSelected = (event) => {\n event.stopPropagation()\n const value: string | any[] = props.multiple ? [] : ''\n if (!isString(value)) {\n for (const item of states.selected) {\n if (item.isDisabled) value.push(item.value)\n }\n }\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n states.hoverIndex = -1\n states.visible = false\n ctx.emit('clear')\n focus()\n }\n\n const handleOptionSelect = (option) => {\n if (props.multiple) {\n const value = (props.modelValue || []).slice()\n const optionIndex = getValueIndex(value, option.value)\n if (optionIndex > -1) {\n value.splice(optionIndex, 1)\n } else if (\n props.multipleLimit <= 0 ||\n value.length < props.multipleLimit\n ) {\n value.push(option.value)\n }\n ctx.emit(UPDATE_MODEL_EVENT, value)\n emitChange(value)\n if (option.created) {\n states.query = ''\n handleQueryChange('')\n states.inputLength = 20\n }\n if (props.filterable) input.value?.focus()\n } else {\n ctx.emit(UPDATE_MODEL_EVENT, option.value)\n emitChange(option.value)\n states.visible = false\n }\n\n setSoftFocus()\n if (states.visible) return\n nextTick(() => {\n scrollToOption(option)\n })\n }\n\n const getValueIndex = (arr: any[] = [], value) => {\n if (!isObject(value)) return arr.indexOf(value)\n\n const valueKey = props.valueKey\n let index = -1\n arr.some((item, i) => {\n if (toRaw(get(item, valueKey)) === get(value, valueKey)) {\n index = i\n return true\n }\n return false\n })\n return index\n }\n\n const setSoftFocus = () => {\n const _input = input.value || reference.value\n if (_input) {\n _input?.focus()\n }\n }\n\n const scrollToOption = (option) => {\n const targetOption = Array.isArray(option) ? option[0] : option\n let target = null\n\n if (targetOption?.value) {\n const options = optionsArray.value.filter(\n (item) => item.value === targetOption.value\n )\n if (options.length > 0) {\n target = options[0].$el\n }\n }\n\n if (tooltipRef.value && target) {\n const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(\n `.${ns.be('dropdown', 'wrap')}`\n )\n if (menu) {\n scrollIntoView(menu as HTMLElement, target)\n }\n }\n scrollbar.value?.handleScroll()\n }\n\n const onOptionCreate = (vm: SelectOptionProxy) => {\n states.optionsCount++\n states.filteredOptionsCount++\n states.options.set(vm.value, vm)\n states.cachedOptions.set(vm.value, vm)\n vm.disabled && states.disabledOptions.set(vm.value, vm)\n }\n\n const onOptionDestroy = (key, vm: SelectOptionProxy) => {\n if (states.options.get(key) === vm) {\n states.optionsCount--\n states.filteredOptionsCount--\n states.options.delete(key)\n }\n }\n\n const resetInputState = (e: KeyboardEvent) => {\n if (e.code !== EVENT_CODE.backspace) toggleLastOptionHitState(false)\n states.inputLength = input.value!.value.length * 15 + 20\n resetInputHeight()\n }\n\n const toggleLastOptionHitState = (hit?: boolean) => {\n if (!Array.isArray(states.selected)) return\n const lastNotDisabledIndex = getLastNotDisabledIndex(\n states.selected.map((it) => it.value)\n )\n const option = states.selected[lastNotDisabledIndex]\n if (!option) return\n\n if (hit === true || hit === false) {\n option.hitState = hit\n return hit\n }\n\n option.hitState = !option.hitState\n return option.hitState\n }\n\n const handleComposition = (event) => {\n const text = event.target.value\n if (event.type === 'compositionend') {\n states.isOnComposition = false\n nextTick(() => handleQueryChange(text))\n } else {\n const lastCharacter = text[text.length - 1] || ''\n states.isOnComposition = !isKorean(lastCharacter)\n }\n }\n\n const handleMenuEnter = () => {\n nextTick(() => scrollToOption(states.selected))\n }\n\n const handleFocus = (event: FocusEvent) => {\n if (!states.focused) {\n if (props.automaticDropdown || props.filterable) {\n if (props.filterable && !states.visible) {\n states.menuVisibleOnFocus = true\n }\n states.visible = true\n }\n states.focused = true\n ctx.emit('focus', event)\n }\n }\n\n const focus = () => {\n if (states.visible) {\n ;(input.value || reference.value)?.focus()\n } else {\n reference.value?.focus()\n }\n }\n\n const blur = () => {\n states.visible = false\n reference.value?.blur()\n iOSInput.value?.blur?.()\n }\n\n const handleBlur = (event: FocusEvent) => {\n // validate current focus event is inside el-tooltip-content or el-select\n // if so, ignore the blur event.\n if (\n tooltipRef.value?.isFocusInsideContent(event) ||\n tagTooltipRef.value?.isFocusInsideContent(event) ||\n selectWrapper.value?.contains(event.relatedTarget)\n ) {\n return\n }\n\n states.visible && handleClose()\n states.focused = false\n ctx.emit('blur', event)\n }\n\n const handleClearClick = (event: Event) => {\n deleteSelected(event)\n }\n\n const handleClose = () => {\n states.visible = false\n }\n\n const handleKeydownEscape = (event: KeyboardEvent) => {\n if (states.visible) {\n event.preventDefault()\n event.stopPropagation()\n states.visible = false\n }\n }\n\n const toggleMenu = (e?: PointerEvent) => {\n if (e && !states.mouseEnter) {\n return\n }\n if (!selectDisabled.value) {\n if (states.menuVisibleOnFocus) {\n states.menuVisibleOnFocus = false\n } else {\n if (!tooltipRef.value || !tooltipRef.value.isFocusInsideContent()) {\n states.visible = !states.visible\n }\n }\n focus()\n }\n }\n\n const selectOption = () => {\n if (!states.visible) {\n toggleMenu()\n } else {\n if (optionsArray.value[states.hoverIndex]) {\n handleOptionSelect(optionsArray.value[states.hoverIndex])\n }\n }\n }\n\n const getValueKey = (item) => {\n return isObject(item.value) ? get(item.value, props.valueKey) : item.value\n }\n\n const optionsAllDisabled = computed(() =>\n optionsArray.value\n .filter((option) => option.visible)\n .every((option) => option.disabled)\n )\n\n const showTagList = computed(() =>\n props.multiple ? states.selected.slice(0, props.maxCollapseTags) : []\n )\n\n const collapseTagList = computed(() =>\n props.multiple ? states.selected.slice(props.maxCollapseTags) : []\n )\n\n const navigateOptions = (direction) => {\n if (!states.visible) {\n states.visible = true\n return\n }\n if (states.options.size === 0 || states.filteredOptionsCount === 0) return\n if (states.isOnComposition) return\n\n if (!optionsAllDisabled.value) {\n if (direction === 'next') {\n states.hoverIndex++\n if (states.hoverIndex === states.options.size) {\n states.hoverIndex = 0\n }\n } else if (direction === 'prev') {\n states.hoverIndex--\n if (states.hoverIndex < 0) {\n states.hoverIndex = states.options.size - 1\n }\n }\n const option = optionsArray.value[states.hoverIndex]\n if (\n option.disabled === true ||\n option.states.groupDisabled === true ||\n !option.visible\n ) {\n navigateOptions(direction)\n }\n nextTick(() => scrollToOption(hoverOption.value))\n }\n }\n\n const handleMouseEnter = () => {\n states.mouseEnter = true\n }\n\n const handleMouseLeave = () => {\n states.mouseEnter = false\n }\n const handleDeleteTooltipTag = (event, tag) => {\n deleteTag(event, tag)\n tagTooltipRef.value?.updatePopper?.()\n }\n\n // computed style\n // if in form and use statusIcon, the width of the icon needs to be subtracted, fix #13526\n const selectTagsStyle = computed(() => ({\n maxWidth: `${\n unref(states.inputWidth) - 32 - (showStatusIconAndState.value ? 22 : 0)\n }px`,\n width: '100%',\n }))\n return {\n optionList,\n optionsArray,\n selectSize,\n handleResize,\n debouncedOnInputChange,\n debouncedQueryChange,\n deletePrevTag,\n deleteTag,\n deleteSelected,\n handleOptionSelect,\n scrollToOption,\n readonly,\n resetInputHeight,\n showClose,\n iconComponent,\n iconReverse,\n showNewOption,\n collapseTagSize,\n setSelected,\n managePlaceholder,\n selectDisabled,\n emptyText,\n toggleLastOptionHitState,\n resetInputState,\n handleComposition,\n onOptionCreate,\n onOptionDestroy,\n handleMenuEnter,\n handleFocus,\n focus,\n blur,\n handleBlur,\n handleClearClick,\n handleClose,\n handleKeydownEscape,\n toggleMenu,\n selectOption,\n getValueKey,\n navigateOptions,\n handleDeleteTooltipTag,\n dropMenuVisible,\n queryChange,\n groupQueryChange,\n showTagList,\n collapseTagList,\n\n // computed style\n selectTagsStyle,\n\n // DOM ref\n reference,\n input,\n iOSInput,\n tooltipRef,\n tagTooltipRef,\n tags,\n selectWrapper,\n scrollbar,\n\n // Mouser Event\n handleMouseEnter,\n handleMouseLeave,\n }\n}\n", "import { defineComponent } from 'vue'\nimport { isFunction, isString } from '@element-plus/utils'\nimport type { Component, VNode, VNodeNormalizedChildren } from 'vue'\n\nexport default defineComponent({\n name: 'ElOptions',\n emits: ['update-options'],\n setup(_, { slots, emit }) {\n let cachedOptions: any[] = []\n\n function isSameOptions(a: any[], b: any[]) {\n if (a.length !== b.length) return false\n for (const [index] of a.entries()) {\n if (a[index] != b[index]) {\n return false\n }\n }\n return true\n }\n\n return () => {\n const children = slots.default?.()!\n const filteredOptions: any[] = []\n\n function filterOptions(children?: VNodeNormalizedChildren) {\n if (!Array.isArray(children)) return\n ;(children as VNode[]).forEach((item) => {\n const name = ((item?.type || {}) as Component)?.name\n\n if (name === 'ElOptionGroup') {\n filterOptions(\n !isString(item.children) &&\n !Array.isArray(item.children) &&\n isFunction(item.children?.default)\n ? item.children?.default()\n : item.children\n )\n } else if (name === 'ElOption') {\n filteredOptions.push(item.props?.label)\n } else if (Array.isArray(item.children)) {\n filterOptions(item.children)\n }\n })\n }\n\n if (children.length) {\n filterOptions(children![0]?.children)\n }\n\n if (!isSameOptions(filteredOptions, cachedOptions)) {\n cachedOptions = filteredOptions\n emit('update-options', filteredOptions)\n }\n\n return children\n }\n },\n})\n", "\n \n \n\n\n\n", "\n\n\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Select from './src/select.vue'\nimport Option from './src/option.vue'\nimport OptionGroup from './src/option-group.vue'\n\nexport const ElSelect = withInstall(Select, {\n Option,\n OptionGroup,\n})\nexport default ElSelect\nexport const ElOption = withNoopInstall(Option)\nexport const ElOptionGroup = withNoopInstall(OptionGroup)\n\nexport * from './src/token'\n", "import { inject } from 'vue'\nimport { elPaginationKey } from './constants'\n\nexport const usePagination = () => inject(elPaginationKey, {})\n", "import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Sizes from './sizes.vue'\n\nexport const paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n },\n disabled: Boolean,\n teleported: Boolean,\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationSizesProps = ExtractPropTypes\n\nexport type SizesInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Jumper from './jumper.vue'\n\nexport const paginationJumperProps = buildProps({\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationJumperProps = ExtractPropTypes<\n typeof paginationJumperProps\n>\n\nexport type PaginationJumperInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type Total from './total.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const paginationTotalProps = buildProps({\n total: {\n type: Number,\n default: 1000,\n },\n} as const)\n\nexport type PaginationTotalProps = ExtractPropTypes\n\nexport type TotalInstance = InstanceType\n", "\n\n\n", "import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Pager from './pager.vue'\n\nexport const paginationPagerProps = buildProps({\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n required: true,\n },\n pagerCount: {\n type: Number,\n default: 7,\n },\n disabled: Boolean,\n} as const)\n\nexport type PaginationPagerProps = ExtractPropTypes\n\nexport type PagerInstance = InstanceType\n", "\n\n", "import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n provide,\n ref,\n watch,\n} from 'vue'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport {\n buildProps,\n debugWarn,\n definePropType,\n iconPropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { elPaginationKey } from './constants'\n\nimport Prev from './components/prev.vue'\nimport Next from './components/next.vue'\nimport Sizes from './components/sizes.vue'\nimport Jumper from './components/jumper.vue'\nimport Total from './components/total.vue'\nimport Pager from './components/pager.vue'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\n\n/**\n * It it user's responsibility to guarantee that the value of props.total... is number\n * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)\n * Otherwise we can reasonable infer that the corresponding field is absent\n */\nconst isAbsent = (v: unknown): v is undefined => typeof v !== 'number'\n\ntype LayoutKey =\n | 'prev'\n | 'pager'\n | 'next'\n | 'jumper'\n | '->'\n | 'total'\n | 'sizes'\n | 'slot'\n\nexport const paginationProps = buildProps({\n /**\n * @description options of item count per page\n */\n pageSize: Number,\n /**\n * @description default initial value of page size, not setting is the same as setting 10\n */\n defaultPageSize: Number,\n /**\n * @description total item count\n */\n total: Number,\n /**\n * @description total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required\n */\n pageCount: Number,\n /**\n * @description number of pagers. Pagination collapses when the total page count exceeds this value\n */\n pagerCount: {\n type: Number,\n validator: (value: unknown) => {\n return (\n isNumber(value) &&\n Math.trunc(value) === value &&\n value > 4 &&\n value < 22 &&\n value % 2 === 1\n )\n },\n default: 7,\n },\n /**\n * @description current page number\n */\n currentPage: Number,\n /**\n * @description default initial value of current-page, not setting is the same as setting 1\n */\n defaultCurrentPage: Number,\n /**\n * @description layout of Pagination, elements separated with a comma\n */\n layout: {\n type: String,\n default: (\n ['prev', 'pager', 'next', 'jumper', '->', 'total'] as LayoutKey[]\n ).join(', '),\n },\n /**\n * @description item count of each page\n */\n pageSizes: {\n type: definePropType(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n /**\n * @description custom class name for the page size Select's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description text for the prev button\n */\n prevText: {\n type: String,\n default: '',\n },\n /**\n * @description icon for the prev button, higher priority of `prev-text`\n */\n prevIcon: {\n type: iconPropType,\n default: () => ArrowLeft,\n },\n /**\n * @description text for the next button\n */\n nextText: {\n type: String,\n default: '',\n },\n /**\n * @description icon for the next button, higher priority of `next-text`\n */\n nextIcon: {\n type: iconPropType,\n default: () => ArrowRight,\n },\n /**\n * @description whether Pagination size is teleported to body\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to use small pagination\n */\n small: Boolean,\n /**\n * @description whether the buttons have a background color\n */\n background: Boolean,\n /**\n * @description whether Pagination is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to hide when there's only one page\n */\n hideOnSinglePage: Boolean,\n} as const)\nexport type PaginationProps = ExtractPropTypes\n\nexport const paginationEmits = {\n 'update:current-page': (val: number) => isNumber(val),\n 'update:page-size': (val: number) => isNumber(val),\n 'size-change': (val: number) => isNumber(val),\n 'current-change': (val: number) => isNumber(val),\n 'prev-click': (val: number) => isNumber(val),\n 'next-click': (val: number) => isNumber(val),\n}\nexport type PaginationEmits = typeof paginationEmits\n\nconst componentName = 'ElPagination'\nexport default defineComponent({\n name: componentName,\n\n props: paginationProps,\n emits: paginationEmits,\n\n setup(props, { emit, slots }) {\n const { t } = useLocale()\n const ns = useNamespace('pagination')\n const vnodeProps = getCurrentInstance()!.vnode.props || {}\n // we can find @xxx=\"xxx\" props on `vnodeProps` to check if user bind corresponding events\n const hasCurrentPageListener =\n 'onUpdate:currentPage' in vnodeProps ||\n 'onUpdate:current-page' in vnodeProps ||\n 'onCurrentChange' in vnodeProps\n const hasPageSizeListener =\n 'onUpdate:pageSize' in vnodeProps ||\n 'onUpdate:page-size' in vnodeProps ||\n 'onSizeChange' in vnodeProps\n const assertValidUsage = computed(() => {\n // Users have to set either one, otherwise count of pages cannot be determined\n if (isAbsent(props.total) && isAbsent(props.pageCount)) return false\n // without corresponding listener is forbidden now\n // Users have to use two way binding of `currentPage`\n // If users just want to provide a default value, `defaultCurrentPage` is here for you\n if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false\n // When you want to change sizes, things get more complex, detailed below\n // Basically the most important value we need is page count\n // either directly from props.pageCount\n // or calculated from props.total\n // we will take props.pageCount precedence over props.total\n if (props.layout.includes('sizes')) {\n if (!isAbsent(props.pageCount)) {\n // if props.pageCount is assign by user, then user have to watch pageSize change\n // and recalculate pageCount\n if (!hasPageSizeListener) return false\n } else if (!isAbsent(props.total)) {\n // Otherwise, we will see if user have props.pageSize defined\n // If so, meaning user want to have pageSize controlled himself/herself from component\n // Thus page size listener is required\n // users are account for page size change\n if (!isAbsent(props.pageSize)) {\n if (!hasPageSizeListener) {\n return false\n }\n } else {\n // (else block just for explaination)\n // else page size is controlled by el-pagination internally\n }\n }\n }\n return true\n })\n\n const innerPageSize = ref(\n isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize\n )\n const innerCurrentPage = ref(\n isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage\n )\n\n const pageSizeBridge = computed({\n get() {\n return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize\n },\n set(v: number) {\n if (isAbsent(props.pageSize)) {\n innerPageSize.value = v\n }\n if (hasPageSizeListener) {\n emit('update:page-size', v)\n emit('size-change', v)\n }\n },\n })\n\n const pageCountBridge = computed(() => {\n let pageCount = 0\n if (!isAbsent(props.pageCount)) {\n pageCount = props.pageCount\n } else if (!isAbsent(props.total)) {\n pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value))\n }\n return pageCount\n })\n\n const currentPageBridge = computed({\n get() {\n return isAbsent(props.currentPage)\n ? innerCurrentPage.value\n : props.currentPage\n },\n set(v) {\n let newCurrentPage = v\n if (v < 1) {\n newCurrentPage = 1\n } else if (v > pageCountBridge.value) {\n newCurrentPage = pageCountBridge.value\n }\n if (isAbsent(props.currentPage)) {\n innerCurrentPage.value = newCurrentPage\n }\n if (hasCurrentPageListener) {\n emit('update:current-page', newCurrentPage)\n emit('current-change', newCurrentPage)\n }\n },\n })\n\n watch(pageCountBridge, (val) => {\n if (currentPageBridge.value > val) currentPageBridge.value = val\n })\n\n function handleCurrentChange(val: number) {\n currentPageBridge.value = val\n }\n\n function handleSizeChange(val: number) {\n pageSizeBridge.value = val\n const newPageCount = pageCountBridge.value\n if (currentPageBridge.value > newPageCount) {\n currentPageBridge.value = newPageCount\n }\n }\n\n function prev() {\n if (props.disabled) return\n currentPageBridge.value -= 1\n emit('prev-click', currentPageBridge.value)\n }\n\n function next() {\n if (props.disabled) return\n currentPageBridge.value += 1\n emit('next-click', currentPageBridge.value)\n }\n\n function addClass(element: any, cls: string) {\n if (element) {\n if (!element.props) {\n element.props = {}\n }\n element.props.class = [element.props.class, cls].join(' ')\n }\n }\n\n provide(elPaginationKey, {\n pageCount: pageCountBridge,\n disabled: computed(() => props.disabled),\n currentPage: currentPageBridge,\n changeEvent: handleCurrentChange,\n handleSizeChange,\n })\n\n return () => {\n if (!assertValidUsage.value) {\n debugWarn(componentName, t('el.pagination.deprecationWarning'))\n return null\n }\n if (!props.layout) return null\n if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null\n const rootChildren: Array = []\n const rightWrapperChildren: Array = []\n const rightWrapperRoot = h(\n 'div',\n { class: ns.e('rightwrapper') },\n rightWrapperChildren\n )\n const TEMPLATE_MAP: Record<\n Exclude'>,\n VNode | VNode[] | null\n > = {\n prev: h(Prev, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n prevText: props.prevText,\n prevIcon: props.prevIcon,\n onClick: prev,\n }),\n jumper: h(Jumper, {\n size: props.small ? 'small' : 'default',\n }),\n pager: h(Pager, {\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n pagerCount: props.pagerCount,\n onChange: handleCurrentChange,\n disabled: props.disabled,\n }),\n next: h(Next, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n nextText: props.nextText,\n nextIcon: props.nextIcon,\n onClick: next,\n }),\n sizes: h(Sizes, {\n pageSize: pageSizeBridge.value,\n pageSizes: props.pageSizes,\n popperClass: props.popperClass,\n disabled: props.disabled,\n teleported: props.teleported,\n size: props.small ? 'small' : 'default',\n }),\n slot: slots?.default?.() ?? null,\n total: h(Total, { total: isAbsent(props.total) ? 0 : props.total }),\n }\n\n const components = props.layout\n .split(',')\n .map((item: string) => item.trim()) as LayoutKey[]\n\n let haveRightWrapper = false\n\n components.forEach((c) => {\n if (c === '->') {\n haveRightWrapper = true\n return\n }\n if (!haveRightWrapper) {\n rootChildren.push(TEMPLATE_MAP[c])\n } else {\n rightWrapperChildren.push(TEMPLATE_MAP[c])\n }\n })\n\n addClass(rootChildren[0], ns.is('first'))\n addClass(rootChildren[rootChildren.length - 1], ns.is('last'))\n\n if (haveRightWrapper && rightWrapperChildren.length > 0) {\n addClass(rightWrapperChildren[0], ns.is('first'))\n addClass(\n rightWrapperChildren[rightWrapperChildren.length - 1],\n ns.is('last')\n )\n rootChildren.push(rightWrapperRoot)\n }\n return h(\n 'div',\n {\n class: [\n ns.b(),\n ns.is('background', props.background),\n {\n [ns.m('small')]: props.small,\n },\n ],\n },\n rootChildren\n )\n }\n },\n})\n", "import { withInstall } from '@element-plus/utils'\n\nimport Pagination from './src/pagination'\n\nexport const ElPagination = withInstall(Pagination)\nexport default ElPagination\n\nexport * from './src/pagination'\nexport * from './src/constants'\n", "import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport type { ExtractPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes\n\nexport type PopconfirmInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Popconfirm from './src/popconfirm.vue'\n\nexport const ElPopconfirm = withInstall(Popconfirm)\nexport default ElPopconfirm\n\nexport * from './src/popconfirm'\n", "import { buildProps, isBoolean } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\nimport { dropdownProps } from '@element-plus/components/dropdown'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type Popover from './popover.vue'\n\nexport const popoverProps = buildProps({\n trigger: useTooltipTriggerProps.trigger,\n placement: dropdownProps.placement,\n disabled: useTooltipTriggerProps.disabled,\n visible: useTooltipContentProps.visible,\n transition: useTooltipContentProps.transition,\n popperOptions: dropdownProps.popperOptions,\n tabindex: dropdownProps.tabindex,\n content: useTooltipContentProps.content,\n popperStyle: useTooltipContentProps.popperStyle,\n popperClass: useTooltipContentProps.popperClass,\n enterable: {\n ...useTooltipContentProps.enterable,\n default: true,\n },\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n teleported: useTooltipContentProps.teleported,\n title: String,\n\n width: {\n type: [String, Number],\n default: 150,\n },\n offset: {\n type: Number,\n default: undefined,\n },\n showAfter: {\n type: Number,\n default: 0,\n },\n hideAfter: {\n type: Number,\n default: 200,\n },\n autoClose: {\n type: Number,\n default: 0,\n },\n showArrow: {\n type: Boolean,\n default: true,\n },\n persistent: {\n type: Boolean,\n default: true,\n },\n 'onUpdate:visible': {\n type: Function as PropType<(visible: boolean) => void>,\n },\n} as const)\nexport type PopoverProps = ExtractPropTypes\n\nexport const popoverEmits = {\n 'update:visible': (value: boolean) => isBoolean(value),\n 'before-enter': () => true,\n 'before-leave': () => true,\n 'after-enter': () => true,\n 'after-leave': () => true,\n}\nexport type PopoverEmits = typeof popoverEmits\n\nexport type PopoverInstance = InstanceType\n", "\n\n", "import type { DirectiveBinding, ObjectDirective } from 'vue'\nimport type { PopoverInstance } from './popover'\n\nconst attachEvents = (el: HTMLElement, binding: DirectiveBinding) => {\n const popperComponent: PopoverInstance = binding.arg || binding.value\n const popover = popperComponent?.popperRef\n if (popover) {\n popover.triggerRef = el\n }\n}\n\nexport default {\n mounted(el, binding) {\n attachEvents(el, binding)\n },\n updated(el, binding) {\n attachEvents(el, binding)\n },\n} as ObjectDirective\n\nexport const VPopover = 'popover'\n", "import { withInstall, withInstallDirective } from '@element-plus/utils'\n\nimport Popover from './src/popover.vue'\nimport PopoverDirective, { VPopover } from './src/directive'\n\nexport const ElPopoverDirective = withInstallDirective(\n PopoverDirective,\n VPopover\n)\n\nexport const ElPopover = withInstall(Popover, {\n directive: ElPopoverDirective,\n})\nexport default ElPopover\n\nexport * from './src/popover'\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, SVGAttributes } from 'vue'\nimport type Progress from './progress.vue'\n\nexport type ProgressColor = { color: string; percentage: number }\nexport type ProgressFn = (percentage: number) => string\n\nexport const progressProps = buildProps({\n /**\n * @description type of progress bar\n */\n type: {\n type: String,\n default: 'line',\n values: ['line', 'circle', 'dashboard'],\n },\n /**\n * @description percentage, required\n */\n percentage: {\n type: Number,\n default: 0,\n validator: (val: number): boolean => val >= 0 && val <= 100,\n },\n /**\n * @description the current status of progress bar\n */\n status: {\n type: String,\n default: '',\n values: ['', 'success', 'exception', 'warning'],\n },\n /**\n * @description set indeterminate progress\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * @description control the animation duration of indeterminate progress or striped flow progress\n */\n duration: {\n type: Number,\n default: 3,\n },\n /**\n * @description the width of progress bar\n */\n strokeWidth: {\n type: Number,\n default: 6,\n },\n /**\n * @description butt/circle/dashboard type shape at the end path\n */\n strokeLinecap: {\n type: definePropType>(String),\n default: 'round',\n },\n /**\n * @description whether to place the percentage inside progress bar, only works when `type` is 'line'\n */\n textInside: {\n type: Boolean,\n default: false,\n },\n /**\n * @description the canvas width of circle progress bar\n */\n width: {\n type: Number,\n default: 126,\n },\n /**\n * @description whether to show percentage\n */\n showText: {\n type: Boolean,\n default: true,\n },\n /**\n * @description background color of progress bar. Overrides `status` prop\n */\n color: {\n type: definePropType([\n String,\n Array,\n Function,\n ]),\n default: '',\n },\n /**\n * @description stripe over the progress bar's color\n */\n striped: Boolean,\n /**\n * @description get the stripes to flow\n */\n stripedFlow: Boolean,\n /**\n * @description custom text format\n */\n format: {\n type: definePropType(Function),\n default: (percentage: number): string => `${percentage}%`,\n },\n} as const)\n\nexport type ProgressProps = ExtractPropTypes\nexport type ProgressInstance = InstanceType\n", "\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Progress from './src/progress.vue'\n\nexport const ElProgress = withInstall(Progress)\nexport default ElProgress\n\nexport * from './src/progress'\n", "import { Star, StarFilled } from '@element-plus/icons-vue'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Rate from './rate.vue'\n\nexport const rateProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: Number,\n default: 0,\n },\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description threshold value between low and medium level. The value itself will be included in low level\n */\n lowThreshold: {\n type: Number,\n default: 2,\n },\n /**\n * @description threshold value between medium and high level. The value itself will be included in high level\n */\n highThreshold: {\n type: Number,\n default: 4,\n },\n /**\n * @description max rating score\n */\n max: {\n type: Number,\n default: 5,\n },\n /**\n * @description colors for icons. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding color\n */\n colors: {\n type: definePropType>([Array, Object]),\n default: () => mutable(['', '', ''] as const),\n },\n /**\n * @description color of unselected icons\n */\n voidColor: {\n type: String,\n default: '',\n },\n /**\n * @description color of unselected read-only icons\n */\n disabledVoidColor: {\n type: String,\n default: '',\n },\n /**\n * @description icon components. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding icon component\n */\n icons: {\n type: definePropType<\n Array | Record\n >([Array, Object]),\n default: () => [StarFilled, StarFilled, StarFilled],\n },\n /**\n * @description component of unselected icons\n */\n voidIcon: {\n type: iconPropType,\n default: () => Star,\n },\n /**\n * @description component of unselected read-only icons\n */\n disabledVoidIcon: {\n type: iconPropType,\n default: () => StarFilled,\n },\n /**\n * @description whether Rate is read-only\n */\n disabled: Boolean,\n /**\n * @description whether picking half start is allowed\n */\n allowHalf: Boolean,\n /**\n * @description whether to display texts\n */\n showText: Boolean,\n /**\n * @description whether to display current score. show-score and show-text cannot be true at the same time\n */\n showScore: Boolean,\n /**\n * @description color of texts\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description text array\n */\n texts: {\n type: definePropType(Array),\n default: () =>\n mutable([\n 'Extremely bad',\n 'Disappointed',\n 'Fair',\n 'Satisfied',\n 'Surprise',\n ] as const),\n },\n /**\n * @description score template\n */\n scoreTemplate: {\n type: String,\n default: '{value}',\n },\n /**\n * @description size of Rate\n */\n size: useSizeProp,\n /**\n * @description same as `aria-label` in Rate\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether value can be reset to `0`\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type RateProps = ExtractPropTypes\n\nexport const rateEmits = {\n [CHANGE_EVENT]: (value: number) => isNumber(value),\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type RateEmits = typeof rateEmits\n\nexport type RateInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\n\nimport Rate from './src/rate.vue'\n\nexport const ElRate = withInstall(Rate)\nexport default ElRate\n\nexport * from './src/rate'\n", "import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes\n\nexport type ResultInstance = InstanceType\n", "\n\n", "import { withInstall } from '@element-plus/utils'\nimport Result from './src/result.vue'\n\nexport const ElResult = withInstall(Result)\n\nexport default ElResult\n\nexport * from './src/result'\n", "var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var cache = null;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {\n return cache.lastResult;\n }\n var lastResult = resultFn.apply(this, newArgs);\n cache = {\n lastResult: lastResult,\n lastArgs: newArgs,\n lastThis: this,\n };\n return lastResult;\n }\n memoized.clear = function clear() {\n cache = null;\n };\n return memoized;\n}\n\nexport { memoizeOne as default };\n", "import { computed, getCurrentInstance } from 'vue'\nimport { memoize } from 'lodash-unified'\nimport memoOne from 'memoize-one'\n\nimport type { VirtualizedProps } from '../props'\n\nexport const useCache = () => {\n const vm = getCurrentInstance()!\n\n const props = vm.proxy!.$props as VirtualizedProps\n\n return computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _getItemStyleCache = (_: any, __: any, ___: any) => ({})\n return props.perfMode\n ? memoize(_getItemStyleCache)\n : memoOne(_getItemStyleCache)\n })\n}\n", "export const DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50\n\nexport const ITEM_RENDER_EVT = 'itemRendered'\nexport const SCROLL_EVT = 'scroll'\n\nexport const FORWARD = 'forward'\nexport const BACKWARD = 'backward'\n\nexport const AUTO_ALIGNMENT = 'auto'\nexport const SMART_ALIGNMENT = 'smart'\nexport const START_ALIGNMENT = 'start'\nexport const CENTERED_ALIGNMENT = 'center'\nexport const END_ALIGNMENT = 'end'\n\nexport const HORIZONTAL = 'horizontal'\nexport const VERTICAL = 'vertical'\n\nexport const LTR = 'ltr'\nexport const RTL = 'rtl'\n\nexport const RTL_OFFSET_NAG = 'negative'\nexport const RTL_OFFSET_POS_ASC = 'positive-ascending'\nexport const RTL_OFFSET_POS_DESC = 'positive-descending'\n\nexport const PageKey = {\n [HORIZONTAL]: 'pageX',\n [VERTICAL]: 'pageY',\n}\n\nexport const ScrollbarSizeKey = {\n [HORIZONTAL]: 'height',\n [VERTICAL]: 'width',\n}\n\nexport const ScrollbarDirKey = {\n [HORIZONTAL]: 'left',\n [VERTICAL]: 'top',\n}\n\nexport const SCROLLBAR_MIN_SIZE = 20\n", "// @ts-nocheck\nimport { cAF, isFirefox, rAF } from '@element-plus/utils'\nimport { HORIZONTAL, VERTICAL } from '../defaults'\n\nimport type { ComputedRef } from 'vue'\nimport type { LayoutDirection } from '../types'\n\nconst LayoutKeys = {\n [HORIZONTAL]: 'deltaX',\n [VERTICAL]: 'deltaY',\n}\n\ninterface ListWheelState {\n atStartEdge: ComputedRef // exclusive to reachEnd\n atEndEdge: ComputedRef\n layout: ComputedRef\n}\n\ntype ListWheelHandler = (offset: number) => void\n\nconst useWheel = (\n { atEndEdge, atStartEdge, layout }: ListWheelState,\n onWheelDelta: ListWheelHandler\n) => {\n let frameHandle: number\n let offset = 0\n\n // let scrollLock = false\n // let lockHandle = null\n\n // const lockScroll = () => {\n // clearTimeout(lockHandle)\n // scrollLock = true\n // lockHandle = setTimeout(() => scrollLock = false, 50)\n // }\n\n const hasReachedEdge = (offset: number) => {\n const edgeReached =\n (offset < 0 && atStartEdge.value) || (offset > 0 && atEndEdge.value)\n\n return edgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle)\n\n const newOffset = e[LayoutKeys[layout.value]]\n\n if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset)) return\n\n offset += newOffset\n\n if (!isFirefox()) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(offset)\n offset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n\nexport default useWheel\n", "import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n style: {\n type: definePropType([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType(Function),\n default: ({\n columnIndex,\n rowIndex,\n }: {\n columnIndex: number\n rowIndex: number\n }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes\nexport type VirtualizedListProps = ExtractPropTypes\nexport type VirtualizedGridProps = ExtractPropTypes\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n", "// @ts-nocheck\nimport {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\ntype RenderThumbStyleParams = {\n bar: {\n size: 'height' | 'width'\n axis: 'X' | 'Y'\n }\n size: string\n move: number\n}\n\nexport function renderThumbStyle(\n { move, size, bar }: RenderThumbStyleParams,\n layout: string\n) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n reactive,\n ref,\n unref,\n watch,\n withModifiers,\n} from 'vue'\nimport { BAR_MAP } from '@element-plus/components/scrollbar'\nimport { cAF, rAF } from '@element-plus/utils'\n\nimport { useNamespace } from '@element-plus/hooks'\nimport { HORIZONTAL, SCROLLBAR_MIN_SIZE, ScrollbarDirKey } from '../defaults'\nimport { virtualizedScrollbarProps } from '../props'\nimport { renderThumbStyle } from '../utils'\n\nimport type { CSSProperties } from 'vue'\n\nconst ScrollBar = defineComponent({\n name: 'ElVirtualScrollBar',\n props: virtualizedScrollbarProps,\n emits: ['scroll', 'start-move', 'stop-move'],\n setup(props, { emit }) {\n const GAP = computed(() => props.startGap + props.endGap) // top 2 + bottom 2 | left 2 + right 2\n\n const nsVirtualScrollbar = useNamespace('virtual-scrollbar')\n const nsScrollbar = useNamespace('scrollbar')\n // DOM refs\n const trackRef = ref()\n const thumbRef = ref()\n\n // local variables\n let frameHandle: null | number = null\n let onselectstartStore: null | typeof document.onselectstart = null\n\n // data\n const state = reactive({\n isDragging: false,\n traveled: 0,\n })\n\n const bar = computed(() => BAR_MAP[props.layout])\n\n const trackSize = computed(() => props.clientSize! - unref(GAP))\n\n const trackStyle = computed(() => ({\n position: 'absolute',\n width: `${\n HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize\n }px`,\n height: `${\n HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value\n }px`,\n [ScrollbarDirKey[props.layout]]: '2px',\n right: '2px',\n bottom: '2px',\n borderRadius: '4px',\n }))\n\n const thumbSize = computed(() => {\n const ratio = props.ratio!\n const clientSize = props.clientSize!\n if (ratio >= 100) {\n return Number.POSITIVE_INFINITY\n }\n\n if (ratio >= 50) {\n return (ratio * clientSize) / 100\n }\n\n const SCROLLBAR_MAX_SIZE = clientSize / 3\n return Math.floor(\n Math.min(\n Math.max(ratio * clientSize, SCROLLBAR_MIN_SIZE),\n SCROLLBAR_MAX_SIZE\n )\n )\n })\n\n // const sizeRange = computed(() => props.size - thumbSize.value)\n\n const thumbStyle = computed(() => {\n if (!Number.isFinite(thumbSize.value)) {\n return {\n display: 'none',\n }\n }\n\n const thumb = `${thumbSize.value}px`\n\n const style: CSSProperties = renderThumbStyle(\n {\n bar: bar.value,\n size: thumb,\n move: state.traveled,\n },\n props.layout\n )\n\n return style\n })\n\n const totalSteps = computed(() =>\n Math.floor(props.clientSize! - thumbSize.value - unref(GAP))\n )\n\n const attachEvents = () => {\n window.addEventListener('mousemove', onMouseMove)\n window.addEventListener('mouseup', onMouseUp)\n\n const thumbEl = unref(thumbRef)\n\n if (!thumbEl) return\n\n onselectstartStore = document.onselectstart\n document.onselectstart = () => false\n\n thumbEl.addEventListener('touchmove', onMouseMove)\n thumbEl.addEventListener('touchend', onMouseUp)\n }\n\n const detachEvents = () => {\n window.removeEventListener('mousemove', onMouseMove)\n window.removeEventListener('mouseup', onMouseUp)\n\n document.onselectstart = onselectstartStore\n onselectstartStore = null\n\n const thumbEl = unref(thumbRef)\n if (!thumbEl) return\n\n thumbEl.removeEventListener('touchmove', onMouseMove)\n thumbEl.removeEventListener('touchend', onMouseUp)\n }\n\n const onThumbMouseDown = (e: Event) => {\n e.stopImmediatePropagation()\n if (\n (e as KeyboardEvent).ctrlKey ||\n [1, 2].includes((e as MouseEvent).button)\n ) {\n return\n }\n\n state.isDragging = true\n state[bar.value.axis] =\n e.currentTarget![bar.value.offset] -\n (e[bar.value.client] -\n (e.currentTarget as HTMLElement).getBoundingClientRect()[\n bar.value.direction\n ])\n\n emit('start-move')\n attachEvents()\n }\n\n const onMouseUp = () => {\n state.isDragging = false\n state[bar.value.axis] = 0\n emit('stop-move')\n detachEvents()\n }\n\n const onMouseMove = (e: Event) => {\n const { isDragging } = state\n if (!isDragging) return\n if (!thumbRef.value || !trackRef.value) return\n\n const prevPage = state[bar.value.axis]\n if (!prevPage) return\n\n cAF(frameHandle!)\n // using the current track's offset top/left - the current pointer's clientY/clientX\n // to get the relative position of the pointer to the track.\n const offset =\n (trackRef.value.getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]) *\n -1\n\n // find where the thumb was clicked on.\n const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage\n /**\n * +--------------+ +--------------+\n * | - <--------- thumb.offsetTop | |\n * | |+| <--+ | |\n * | - | | |\n * | Content | | | |\n * | | | | |\n * | | | | |\n * | | | | -\n * | | +--> | |+|\n * | | | -\n * +--------------+ +--------------+\n */\n\n // using the current position - prev position to\n\n const distance = offset - thumbClickPosition\n // get how many steps in total.\n // gap of 2 on top, 2 on bottom, in total 4.\n // using totalSteps ÷ totalSize getting each step's size * distance to get the new\n // scroll offset to scrollTo\n frameHandle = rAF(() => {\n state.traveled = Math.max(\n props.startGap,\n Math.min(\n distance,\n totalSteps.value // 2 is the top value\n )\n )\n emit('scroll', distance, totalSteps.value)\n })\n }\n\n const clickTrackHandler = (e: MouseEvent) => {\n const offset = Math.abs(\n (e.target as HTMLElement).getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]\n )\n const thumbHalf = thumbRef.value![bar.value.offset] / 2\n const distance = offset - thumbHalf\n\n state.traveled = Math.max(0, Math.min(distance, totalSteps.value))\n emit('scroll', distance, totalSteps.value)\n }\n\n watch(\n () => props.scrollFrom,\n (v) => {\n if (state.isDragging) return\n /**\n * this is simply mapping the current scrollbar offset\n *\n * formula 1:\n * v = scrollOffset / (estimatedTotalSize - clientSize)\n * traveled = v * (clientSize - thumbSize - GAP) --> v * totalSteps\n *\n * formula 2:\n * traveled = (v * clientSize) / (clientSize / totalSteps) --> (v * clientSize) * (totalSteps / clientSize) --> v * totalSteps\n */\n state.traveled = Math.ceil(v! * totalSteps.value)\n }\n )\n\n onBeforeUnmount(() => {\n detachEvents()\n })\n\n return () => {\n return h(\n 'div',\n {\n role: 'presentation',\n ref: trackRef,\n class: [\n nsVirtualScrollbar.b(),\n props.class,\n (props.alwaysOn || state.isDragging) && 'always-on',\n ],\n style: trackStyle.value,\n onMousedown: withModifiers(clickTrackHandler, ['stop', 'prevent']),\n onTouchstartPrevent: onThumbMouseDown,\n },\n h(\n 'div',\n {\n ref: thumbRef,\n class: nsScrollbar.e('thumb'),\n style: thumbStyle.value,\n onMousedown: onThumbMouseDown,\n },\n []\n )\n )\n }\n },\n})\n\nexport default ScrollBar\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n onUpdated,\n ref,\n resolveDynamicComponent,\n unref,\n} from 'vue'\nimport { hasOwn, isClient, isNumber, isString } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useCache } from '../hooks/use-cache'\nimport useWheel from '../hooks/use-wheel'\nimport Scrollbar from '../components/scrollbar'\nimport { getRTLOffsetType, getScrollDir, isHorizontal } from '../utils'\nimport { virtualizedListProps } from '../props'\nimport {\n AUTO_ALIGNMENT,\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n ITEM_RENDER_EVT,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n SCROLL_EVT,\n} from '../defaults'\n\nimport type { CSSProperties, Slot, VNode, VNodeChild } from 'vue'\nimport type { Alignment, ListConstructorProps } from '../types'\nimport type { VirtualizedListProps } from '../props'\n\nconst createList = ({\n name,\n getOffset,\n getItemSize,\n getItemOffset,\n getEstimatedTotalSize,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initCache,\n clearCache,\n validateProps,\n}: ListConstructorProps) => {\n return defineComponent({\n name: name ?? 'ElVirtualList',\n props: virtualizedListProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose }) {\n validateProps(props)\n const instance = getCurrentInstance()!\n\n const ns = useNamespace('vl')\n\n const dynamicSizeCache = ref(initCache(props, instance))\n\n const getItemStyleCache = useCache()\n // refs\n // here windowRef and innerRef can be type of HTMLElement\n // or user defined component type, depends on the type passed\n // by user\n const windowRef = ref()\n const innerRef = ref()\n const scrollbarRef = ref()\n const states = ref({\n isScrolling: false,\n scrollDir: 'forward',\n scrollOffset: isNumber(props.initScrollOffset)\n ? props.initScrollOffset\n : 0,\n updateRequested: false,\n isScrollbarDragging: false,\n scrollbarAlwaysOn: props.scrollbarAlwaysOn,\n })\n\n // computed\n const itemsToRender = computed(() => {\n const { total, cache } = props\n const { isScrolling, scrollDir, scrollOffset } = unref(states)\n\n if (total === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getStartIndexForOffset(\n props,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n const stopIndex = getStopIndexForStartIndex(\n props,\n startIndex,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n\n const cacheBackward =\n !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache) : 1\n const cacheForward =\n !isScrolling || scrollDir === FORWARD ? Math.max(1, cache) : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(total! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const estimatedTotalSize = computed(() =>\n getEstimatedTotalSize(props, unref(dynamicSizeCache))\n )\n\n const _isHorizontal = computed(() => isHorizontal(props.layout))\n\n const windowStyle = computed(() => [\n {\n position: 'relative',\n [`overflow-${_isHorizontal.value ? 'x' : 'y'}`]: 'scroll',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n },\n {\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width,\n },\n props.style,\n ])\n\n const innerStyle = computed(() => {\n const size = unref(estimatedTotalSize)\n const horizontal = unref(_isHorizontal)\n return {\n height: horizontal ? '100%' : `${size}px`,\n pointerEvents: unref(states).isScrolling ? 'none' : undefined,\n width: horizontal ? `${size}px` : '100%',\n }\n })\n\n const clientSize = computed(() =>\n _isHorizontal.value ? props.width : props.height\n )\n\n // methods\n const { onWheel } = useWheel(\n {\n atStartEdge: computed(() => states.value.scrollOffset <= 0),\n atEndEdge: computed(\n () => states.value.scrollOffset >= estimatedTotalSize.value\n ),\n layout: computed(() => props.layout),\n },\n (offset) => {\n ;(\n scrollbarRef.value as any as {\n onMouseUp: () => void\n }\n ).onMouseUp?.()\n scrollTo(\n Math.min(\n states.value.scrollOffset + offset,\n estimatedTotalSize.value - (clientSize.value as number)\n )\n )\n }\n )\n\n const emitEvents = () => {\n const { total } = props\n\n if (total! > 0) {\n const [cacheStart, cacheEnd, visibleStart, visibleEnd] =\n unref(itemsToRender)\n emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd)\n }\n\n const { scrollDir, scrollOffset, updateRequested } = unref(states)\n emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested)\n }\n\n const scrollVertically = (e: Event) => {\n const { clientHeight, scrollHeight, scrollTop } =\n e.currentTarget as HTMLElement\n const _states = unref(states)\n if (_states.scrollOffset === scrollTop) {\n return\n }\n\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n )\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const scrollHorizontally = (e: Event) => {\n const { clientWidth, scrollLeft, scrollWidth } =\n e.currentTarget as HTMLElement\n const _states = unref(states)\n\n if (_states.scrollOffset === scrollLeft) {\n return\n }\n\n const { direction } = props\n\n let scrollOffset = scrollLeft\n\n if (direction === RTL) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n scrollOffset = -scrollLeft\n break\n }\n case RTL_OFFSET_POS_DESC: {\n scrollOffset = scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n }\n\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n )\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),\n scrollOffset,\n updateRequested: false,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const onScroll = (e: Event) => {\n unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e)\n emitEvents()\n }\n\n const onScrollbarScroll = (distanceToGo: number, totalSteps: number) => {\n const offset =\n ((estimatedTotalSize.value - (clientSize.value as number)) /\n totalSteps) *\n distanceToGo\n scrollTo(\n Math.min(\n estimatedTotalSize.value - (clientSize.value as number),\n offset\n )\n )\n }\n\n const scrollTo = (offset: number) => {\n offset = Math.max(offset, 0)\n\n if (offset === unref(states).scrollOffset) {\n return\n }\n\n states.value = {\n ...unref(states),\n scrollOffset: offset,\n scrollDir: getScrollDir(unref(states).scrollOffset, offset),\n updateRequested: true,\n }\n\n nextTick(resetIsScrolling)\n }\n\n const scrollToItem = (\n idx: number,\n alignment: Alignment = AUTO_ALIGNMENT\n ) => {\n const { scrollOffset } = unref(states)\n\n idx = Math.max(0, Math.min(idx, props.total! - 1))\n scrollTo(\n getOffset(\n props,\n idx,\n alignment,\n scrollOffset,\n unref(dynamicSizeCache)\n )\n )\n }\n\n const getItemStyle = (idx: number) => {\n const { direction, itemSize, layout } = props\n\n const itemStyleCache = getItemStyleCache.value(\n clearCache && itemSize,\n clearCache && layout,\n clearCache && direction\n )\n\n let style: CSSProperties\n if (hasOwn(itemStyleCache, String(idx))) {\n style = itemStyleCache[idx]\n } else {\n const offset = getItemOffset(props, idx, unref(dynamicSizeCache))\n const size = getItemSize(props, idx, unref(dynamicSizeCache))\n const horizontal = unref(_isHorizontal)\n\n const isRtl = direction === RTL\n const offsetHorizontal = horizontal ? offset : 0\n itemStyleCache[idx] = style = {\n position: 'absolute',\n left: isRtl ? undefined : `${offsetHorizontal}px`,\n right: isRtl ? `${offsetHorizontal}px` : undefined,\n top: !horizontal ? `${offset}px` : 0,\n height: !horizontal ? `${size}px` : '100%',\n width: horizontal ? `${size}px` : '100%',\n }\n }\n\n return style\n }\n\n // TODO:\n // perf optimization here, reset isScrolling with debounce.\n\n const resetIsScrolling = () => {\n // timer = null\n\n states.value.isScrolling = false\n nextTick(() => {\n getItemStyleCache.value(-1, null, null)\n })\n }\n\n const resetScrollTop = () => {\n const window = windowRef.value\n if (window) {\n window.scrollTop = 0\n }\n }\n\n // life cycles\n onMounted(() => {\n if (!isClient) return\n const { initScrollOffset } = props\n const windowElement = unref(windowRef)\n if (isNumber(initScrollOffset) && windowElement) {\n if (unref(_isHorizontal)) {\n windowElement.scrollLeft = initScrollOffset\n } else {\n windowElement.scrollTop = initScrollOffset\n }\n }\n\n emitEvents()\n })\n\n onUpdated(() => {\n const { direction, layout } = props\n const { scrollOffset, updateRequested } = unref(states)\n const windowElement = unref(windowRef)\n\n if (updateRequested && windowElement) {\n if (layout === HORIZONTAL) {\n if (direction === RTL) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n windowElement.scrollLeft = -scrollOffset\n break\n }\n case RTL_OFFSET_POS_ASC: {\n windowElement.scrollLeft = scrollOffset\n break\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement\n windowElement.scrollLeft =\n scrollWidth - clientWidth - scrollOffset\n break\n }\n }\n } else {\n windowElement.scrollLeft = scrollOffset\n }\n } else {\n windowElement.scrollTop = scrollOffset\n }\n }\n })\n\n const api = {\n ns,\n clientSize,\n estimatedTotalSize,\n windowStyle,\n windowRef,\n innerRef,\n innerStyle,\n itemsToRender,\n scrollbarRef,\n states,\n getItemStyle,\n onScroll,\n onScrollbarScroll,\n onWheel,\n scrollTo,\n scrollToItem,\n resetScrollTop,\n }\n\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n resetScrollTop,\n states,\n })\n\n return api\n },\n\n render(ctx: any) {\n const {\n $slots,\n className,\n clientSize,\n containerElement,\n data,\n getItemStyle,\n innerElement,\n itemsToRender,\n innerStyle,\n layout,\n total,\n onScroll,\n onScrollbarScroll,\n onWheel,\n states,\n useIsScrolling,\n windowStyle,\n ns,\n } = ctx\n\n const [start, end] = itemsToRender\n\n const Container = resolveDynamicComponent(containerElement)\n const Inner = resolveDynamicComponent(innerElement)\n\n const children = [] as VNodeChild[]\n\n if (total > 0) {\n for (let i = start; i <= end; i++) {\n children.push(\n ($slots.default as Slot)?.({\n data,\n key: i,\n index: i,\n isScrolling: useIsScrolling ? states.isScrolling : undefined,\n style: getItemStyle(i),\n })\n )\n }\n }\n\n const InnerNode = [\n h(\n Inner as VNode,\n {\n style: innerStyle,\n ref: 'innerRef',\n },\n !isString(Inner)\n ? {\n default: () => children,\n }\n : children\n ),\n ]\n\n const scrollbar = h(Scrollbar, {\n ref: 'scrollbarRef',\n clientSize,\n layout,\n onScroll: onScrollbarScroll,\n ratio: (clientSize * 100) / this.estimatedTotalSize,\n scrollFrom:\n states.scrollOffset / (this.estimatedTotalSize - clientSize),\n total,\n })\n\n const listContainer = h(\n Container as VNode,\n {\n class: [ns.e('window'), className],\n style: windowStyle,\n onScroll,\n onWheel,\n ref: 'windowRef',\n key: 0,\n },\n !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]\n )\n\n return h(\n 'div',\n {\n key: 0,\n class: [ns.e('wrapper'), states.scrollbarAlwaysOn ? 'always-on' : ''],\n },\n [listContainer, scrollbar]\n )\n },\n })\n}\n\nexport default createList\n", "import { isString, throwError } from '@element-plus/utils'\nimport buildList from '../builders/build-list'\nimport { isHorizontal } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\n\nimport type { VirtualizedListProps } from '../props'\n\ntype Props = VirtualizedListProps\n\nconst FixedSizeList = buildList({\n name: 'ElFixedSizeList',\n getItemOffset: ({ itemSize }, index) => index * (itemSize as number),\n\n getItemSize: ({ itemSize }) => itemSize as number,\n\n getEstimatedTotalSize: ({ total, itemSize }) => (itemSize as number) * total,\n\n getOffset: (\n { height, total, itemSize, layout, width },\n index,\n alignment,\n scrollOffset\n ) => {\n const size = (isHorizontal(layout) ? width : height) as number\n if (process.env.NODE_ENV !== 'production' && isString(size)) {\n throwError(\n '[ElVirtualList]',\n `\n You should set\n width/height\n to number when your layout is\n horizontal/vertical\n `\n )\n }\n const lastItemOffset = Math.max(0, total * (itemSize as number) - size)\n const maxOffset = Math.min(lastItemOffset, index * (itemSize as number))\n const minOffset = Math.max(0, (index + 1) * (itemSize as number) - size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(size / 2)) {\n return 0 // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset // near the end\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n },\n\n getStartIndexForOffset: ({ total, itemSize }, offset) =>\n Math.max(0, Math.min(total - 1, Math.floor(offset / (itemSize as number)))),\n\n getStopIndexForStartIndex: (\n { height, total, itemSize, layout, width }: Props,\n startIndex: number,\n scrollOffset: number\n ) => {\n const offset = startIndex * (itemSize as number)\n const size = isHorizontal(layout) ? width : height\n const numVisibleItems = Math.ceil(\n ((size as number) + scrollOffset - offset) / (itemSize as number)\n )\n return Math.max(\n 0,\n Math.min(\n total - 1,\n // because startIndex is inclusive, so in order to prevent array outbound indexing\n // we need to - 1 to prevent outbound behavior\n startIndex + numVisibleItems - 1\n )\n )\n },\n\n /**\n * Fixed size list does not need this cache\n * Using any to bypass it, TODO: Using type inference to fix this.\n */\n initCache() {\n return undefined as any\n },\n\n clearCache: true,\n\n validateProps() {\n //\n },\n})\n\nexport default FixedSizeList\n", "import { throwError } from '@element-plus/utils'\n\nimport createList from '../builders/build-list'\n\nimport { isHorizontal } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\nimport type { VirtualizedListProps } from '../props'\n\nimport type { ItemSize, ListCache, ListItem } from '../types'\n\ntype Props = VirtualizedListProps\n\nconst SCOPE = 'ElDynamicSizeList'\nconst getItemFromCache = (\n props: Props,\n index: number,\n listCache: ListCache\n): ListItem => {\n const { itemSize } = props\n const { items, lastVisitedIndex } = listCache\n\n if (index > lastVisitedIndex) {\n let offset = 0\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex]\n offset = item.offset + item.size\n }\n\n for (let i = lastVisitedIndex + 1; i <= index; i++) {\n const size = (itemSize as ItemSize)(i)\n\n items[i] = {\n offset,\n size,\n }\n\n offset += size\n }\n\n listCache.lastVisitedIndex = index\n }\n\n return items[index]\n}\n\nconst findItem = (props: Props, listCache: ListCache, offset: number) => {\n const { items, lastVisitedIndex } = listCache\n\n const lastVisitedOffset =\n lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0\n\n if (lastVisitedOffset >= offset) {\n return bs(props, listCache, 0, lastVisitedIndex, offset)\n }\n return es(props, listCache, Math.max(0, lastVisitedIndex), offset)\n}\n\n// bs stands for binary search which has approximately time complexity of O(Log n)\n// space complexity of O(1)\n// in this case we use it for search the offset of each item, since\n// the cached items' offset is monotonically increasing\nconst bs = (\n props: Props,\n listCache: ListCache,\n low: number,\n high: number,\n offset: number\n) => {\n while (low <= high) {\n const mid = low + Math.floor((high - low) / 2)\n const currentOffset = getItemFromCache(props, mid, listCache).offset\n\n if (currentOffset === offset) {\n return mid\n } else if (currentOffset < offset) {\n low = mid + 1\n } else if (currentOffset > offset) {\n high = mid - 1\n }\n }\n\n return Math.max(0, low - 1)\n}\n\n// es stands for exponential search which has time complexity of O(Log n) and\n// space complexity of O(1) in the case of finding the boundary element.\n// the exponential indicator in this case is 2.\n// for more detail about exponential search click this link\n// https://www.freecodecamp.org/news/search-algorithms-exponential-search-explained/\n\nconst es = (\n props: Props,\n listCache: ListCache,\n index: number,\n offset: number\n) => {\n const { total } = props\n let exponent = 1\n\n while (\n index < total &&\n getItemFromCache(props, index, listCache).offset < offset\n ) {\n index += exponent\n exponent *= 2\n }\n\n return bs(\n props,\n listCache,\n Math.floor(index / 2),\n Math.min(index, total - 1),\n offset\n )\n}\n\nconst getEstimatedTotalSize = (\n { total }: Props,\n { items, estimatedItemSize, lastVisitedIndex }: ListCache\n) => {\n let totalSizeOfMeasuredItems = 0\n\n if (lastVisitedIndex >= total) {\n lastVisitedIndex = total - 1\n }\n\n if (lastVisitedIndex >= 0) {\n const item = items[lastVisitedIndex]\n totalSizeOfMeasuredItems = item.offset + item.size\n }\n\n const numUnmeasuredItems = total - lastVisitedIndex - 1\n const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems\n}\n\nconst DynamicSizeList = createList({\n name: 'ElDynamicSizeList',\n getItemOffset: (props, index, listCache) =>\n getItemFromCache(props, index, listCache).offset,\n\n getItemSize: (_, index, { items }) => items[index].size,\n\n getEstimatedTotalSize,\n\n getOffset: (props, index, alignment, scrollOffset, listCache) => {\n const { height, layout, width } = props\n\n const size = (isHorizontal(layout) ? width : height) as number\n const item = getItemFromCache(props, index, listCache)\n\n const estimatedTotalSize = getEstimatedTotalSize(props, listCache)\n\n const maxOffset = Math.max(\n 0,\n Math.min(estimatedTotalSize - size, item.offset)\n )\n const minOffset = Math.max(0, item.offset - size + item.size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2)\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n },\n\n getStartIndexForOffset: (props, offset, listCache) =>\n findItem(props, listCache, offset),\n\n getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {\n const { height, total, layout, width } = props\n\n const size = (isHorizontal(layout) ? width : height) as number\n const item = getItemFromCache(props, startIndex, listCache)\n const maxOffset = scrollOffset + size\n\n let offset = item.offset + item.size\n let stopIndex = startIndex\n\n while (stopIndex < total - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, stopIndex, listCache).size\n }\n\n return stopIndex\n },\n\n initCache({ estimatedItemSize = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {\n const cache = {\n items: {},\n estimatedItemSize,\n lastVisitedIndex: -1,\n } as ListCache\n\n cache.clearCacheAfterIndex = (index: number, forceUpdate = true) => {\n cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1)\n instance.exposed?.getItemStyleCache(-1)\n\n if (forceUpdate) {\n instance.proxy?.$forceUpdate()\n }\n }\n\n return cache\n },\n\n clearCache: false,\n\n validateProps: ({ itemSize }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'function') {\n throwError(\n SCOPE,\n `\n itemSize is required as function, but the given value was ${typeof itemSize}\n `\n )\n }\n }\n },\n})\n\nexport default DynamicSizeList\n", "import { cAF, rAF } from '@element-plus/utils'\n\nimport type { ComputedRef } from 'vue'\n\ninterface GridWheelState {\n atXStartEdge: ComputedRef\n atXEndEdge: ComputedRef\n atYStartEdge: ComputedRef\n atYEndEdge: ComputedRef\n}\n\ntype GridWheelHandler = (x: number, y: number) => void\n\nexport const useGridWheel = (\n { atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }: GridWheelState,\n onWheelDelta: GridWheelHandler\n) => {\n let frameHandle: number | null = null\n let xOffset = 0\n let yOffset = 0\n\n const hasReachedEdge = (x: number, y: number) => {\n const xEdgeReached =\n (x <= 0 && atXStartEdge.value) || (x >= 0 && atXEndEdge.value)\n const yEdgeReached =\n (y <= 0 && atYStartEdge.value) || (y >= 0 && atYEndEdge.value)\n return xEdgeReached && yEdgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle!)\n\n let x = e.deltaX\n let y = e.deltaY\n // Simulate native behavior when using touch pad/track pad for wheeling.\n if (Math.abs(x) > Math.abs(y)) {\n y = 0\n } else {\n x = 0\n }\n\n // Special case for windows machine with shift key + wheel scrolling\n if (e.shiftKey && y !== 0) {\n x = y\n y = 0\n }\n\n if (\n hasReachedEdge(xOffset, yOffset) &&\n hasReachedEdge(xOffset + x, yOffset + y)\n )\n return\n\n xOffset += x\n yOffset += y\n\n e.preventDefault()\n\n frameHandle = rAF(() => {\n onWheelDelta(xOffset, yOffset)\n xOffset = 0\n yOffset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n", "// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n ref,\n resolveDynamicComponent,\n unref,\n} from 'vue'\nimport {\n getScrollBarWidth,\n hasOwn,\n isClient,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport Scrollbar from '../components/scrollbar'\nimport { useGridWheel } from '../hooks/use-grid-wheel'\nimport { useCache } from '../hooks/use-cache'\nimport { virtualizedGridProps } from '../props'\nimport { getRTLOffsetType, getScrollDir, isRTL } from '../utils'\nimport {\n AUTO_ALIGNMENT,\n BACKWARD,\n FORWARD,\n ITEM_RENDER_EVT,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n SCROLL_EVT,\n} from '../defaults'\nimport type {\n CSSProperties,\n Ref,\n StyleValue,\n UnwrapRef,\n VNode,\n VNodeChild,\n} from 'vue'\nimport type {\n Alignment,\n GridConstructorProps,\n GridScrollOptions,\n ScrollbarExpose,\n} from '../types'\nimport type { VirtualizedGridProps } from '../props'\n\nconst createGrid = ({\n name,\n clearCache,\n getColumnPosition,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getColumnOffset,\n getRowOffset,\n getRowPosition,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n\n initCache,\n injectToInstance,\n validateProps,\n}: GridConstructorProps) => {\n return defineComponent({\n name: name ?? 'ElVirtualList',\n props: virtualizedGridProps,\n emits: [ITEM_RENDER_EVT, SCROLL_EVT],\n setup(props, { emit, expose, slots }) {\n const ns = useNamespace('vl')\n\n validateProps(props)\n const instance = getCurrentInstance()!\n const cache = ref(initCache(props, instance))\n injectToInstance?.(instance, cache)\n // refs\n // here windowRef and innerRef can be type of HTMLElement\n // or user defined component type, depends on the type passed\n // by user\n const windowRef = ref()\n const hScrollbar = ref()\n const vScrollbar = ref()\n // innerRef is the actual container element which contains all the elements\n const innerRef = ref(null)\n const states = ref({\n isScrolling: false,\n scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,\n scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,\n updateRequested: false,\n xAxisScrollDir: FORWARD,\n yAxisScrollDir: FORWARD,\n })\n\n const getItemStyleCache = useCache()\n\n // computed\n const parsedHeight = computed(() =>\n Number.parseInt(`${props.height}`, 10)\n )\n const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10))\n const columnsToRender = computed(() => {\n const { totalColumn, totalRow, columnCache } = props\n const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states)\n\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getColumnStartIndexForOffset(\n props,\n scrollLeft,\n unref(cache)\n )\n const stopIndex = getColumnStopIndexForStartIndex(\n props,\n startIndex,\n scrollLeft,\n unref(cache)\n )\n\n const cacheBackward =\n !isScrolling || xAxisScrollDir === BACKWARD\n ? Math.max(1, columnCache)\n : 1\n const cacheForward =\n !isScrolling || xAxisScrollDir === FORWARD\n ? Math.max(1, columnCache)\n : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalColumn! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const rowsToRender = computed(() => {\n const { totalColumn, totalRow, rowCache } = props\n const { isScrolling, yAxisScrollDir, scrollTop } = unref(states)\n\n if (totalColumn === 0 || totalRow === 0) {\n return [0, 0, 0, 0]\n }\n\n const startIndex = getRowStartIndexForOffset(\n props,\n scrollTop,\n unref(cache)\n )\n const stopIndex = getRowStopIndexForStartIndex(\n props,\n startIndex,\n scrollTop,\n unref(cache)\n )\n\n const cacheBackward =\n !isScrolling || yAxisScrollDir === BACKWARD\n ? Math.max(1, rowCache)\n : 1\n const cacheForward =\n !isScrolling || yAxisScrollDir === FORWARD ? Math.max(1, rowCache) : 1\n\n return [\n Math.max(0, startIndex - cacheBackward),\n Math.max(0, Math.min(totalRow! - 1, stopIndex + cacheForward)),\n startIndex,\n stopIndex,\n ]\n })\n\n const estimatedTotalHeight = computed(() =>\n getEstimatedTotalHeight(props, unref(cache))\n )\n const estimatedTotalWidth = computed(() =>\n getEstimatedTotalWidth(props, unref(cache))\n )\n\n const windowStyle = computed(() => [\n {\n position: 'relative',\n overflow: 'hidden',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n },\n {\n direction: props.direction,\n height: isNumber(props.height) ? `${props.height}px` : props.height,\n width: isNumber(props.width) ? `${props.width}px` : props.width,\n },\n props.style ?? {},\n ])\n\n const innerStyle = computed(() => {\n const width = `${unref(estimatedTotalWidth)}px`\n const height = `${unref(estimatedTotalHeight)}px`\n\n return {\n height,\n pointerEvents: unref(states).isScrolling ? 'none' : undefined,\n width,\n }\n })\n\n // methods\n const emitEvents = () => {\n const { totalColumn, totalRow } = props\n\n if (totalColumn! > 0 && totalRow! > 0) {\n const [\n columnCacheStart,\n columnCacheEnd,\n columnVisibleStart,\n columnVisibleEnd,\n ] = unref(columnsToRender)\n const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] =\n unref(rowsToRender)\n // emit the render item event with\n // [xAxisInvisibleStart, xAxisInvisibleEnd, xAxisVisibleStart, xAxisVisibleEnd]\n // [yAxisInvisibleStart, yAxisInvisibleEnd, yAxisVisibleStart, yAxisVisibleEnd]\n emit(ITEM_RENDER_EVT, {\n columnCacheStart,\n columnCacheEnd,\n rowCacheStart,\n rowCacheEnd,\n columnVisibleStart,\n columnVisibleEnd,\n rowVisibleStart,\n rowVisibleEnd,\n })\n }\n\n const {\n scrollLeft,\n scrollTop,\n updateRequested,\n xAxisScrollDir,\n yAxisScrollDir,\n } = unref(states)\n emit(SCROLL_EVT, {\n xAxisScrollDir,\n scrollLeft,\n yAxisScrollDir,\n scrollTop,\n updateRequested,\n })\n }\n\n const onScroll = (e: Event) => {\n const {\n clientHeight,\n clientWidth,\n scrollHeight,\n scrollLeft,\n scrollTop,\n scrollWidth,\n } = e.currentTarget as HTMLElement\n\n const _states = unref(states)\n\n if (\n _states.scrollTop === scrollTop &&\n _states.scrollLeft === scrollLeft\n ) {\n return\n }\n\n let _scrollLeft = scrollLeft\n\n if (isRTL(props.direction)) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG:\n _scrollLeft = -scrollLeft\n break\n case RTL_OFFSET_POS_DESC:\n _scrollLeft = scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n\n states.value = {\n ..._states,\n isScrolling: true,\n scrollLeft: _scrollLeft,\n scrollTop: Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n ),\n updateRequested: true,\n xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),\n }\n\n nextTick(() => resetIsScrolling())\n\n onUpdated()\n emitEvents()\n }\n\n const onVerticalScroll = (distance: number, totalSteps: number) => {\n const height = unref(parsedHeight)\n const offset =\n ((estimatedTotalHeight.value - height) / totalSteps) * distance\n scrollTo({\n scrollTop: Math.min(estimatedTotalHeight.value - height, offset),\n })\n }\n\n const onHorizontalScroll = (distance: number, totalSteps: number) => {\n const width = unref(parsedWidth)\n const offset =\n ((estimatedTotalWidth.value - width) / totalSteps) * distance\n scrollTo({\n scrollLeft: Math.min(estimatedTotalWidth.value - width, offset),\n })\n }\n\n const { onWheel } = useGridWheel(\n {\n atXStartEdge: computed(() => states.value.scrollLeft <= 0),\n atXEndEdge: computed(\n () =>\n states.value.scrollLeft >=\n estimatedTotalWidth.value - unref(parsedWidth)\n ),\n atYStartEdge: computed(() => states.value.scrollTop <= 0),\n atYEndEdge: computed(\n () =>\n states.value.scrollTop >=\n estimatedTotalHeight.value - unref(parsedHeight)\n ),\n },\n (x: number, y: number) => {\n hScrollbar.value?.onMouseUp?.()\n vScrollbar.value?.onMouseUp?.()\n const width = unref(parsedWidth)\n const height = unref(parsedHeight)\n scrollTo({\n scrollLeft: Math.min(\n states.value.scrollLeft + x,\n estimatedTotalWidth.value - width\n ),\n scrollTop: Math.min(\n states.value.scrollTop + y,\n estimatedTotalHeight.value - height\n ),\n })\n }\n )\n\n const scrollTo = ({\n scrollLeft = states.value.scrollLeft,\n scrollTop = states.value.scrollTop,\n }: GridScrollOptions) => {\n scrollLeft = Math.max(scrollLeft, 0)\n scrollTop = Math.max(scrollTop, 0)\n const _states = unref(states)\n if (\n scrollTop === _states.scrollTop &&\n scrollLeft === _states.scrollLeft\n ) {\n return\n }\n\n states.value = {\n ..._states,\n xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),\n yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),\n scrollLeft,\n scrollTop,\n updateRequested: true,\n }\n\n nextTick(() => resetIsScrolling())\n\n onUpdated()\n emitEvents()\n }\n\n const scrollToItem = (\n rowIndex = 0,\n columnIdx = 0,\n alignment: Alignment = AUTO_ALIGNMENT\n ) => {\n const _states = unref(states)\n columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn! - 1))\n rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow! - 1))\n const scrollBarWidth = getScrollBarWidth(ns.namespace.value)\n\n const _cache = unref(cache)\n const estimatedHeight = getEstimatedTotalHeight(props, _cache)\n const estimatedWidth = getEstimatedTotalWidth(props, _cache)\n\n scrollTo({\n scrollLeft: getColumnOffset(\n props,\n columnIdx,\n alignment,\n _states.scrollLeft,\n _cache,\n estimatedWidth > props.width! ? scrollBarWidth : 0\n ),\n scrollTop: getRowOffset(\n props,\n rowIndex,\n alignment,\n _states.scrollTop,\n _cache,\n estimatedHeight > props.height! ? scrollBarWidth : 0\n ),\n })\n }\n\n const getItemStyle = (\n rowIndex: number,\n columnIndex: number\n ): CSSProperties => {\n const { columnWidth, direction, rowHeight } = props\n const itemStyleCache = getItemStyleCache.value(\n clearCache && columnWidth,\n clearCache && rowHeight,\n clearCache && direction\n )\n // since there was no need to introduce an nested array into cache object\n // we use row,column to construct the key for indexing the map.\n const key = `${rowIndex},${columnIndex}`\n\n if (hasOwn(itemStyleCache, key)) {\n return itemStyleCache[key]\n } else {\n const [, left] = getColumnPosition(props, columnIndex, unref(cache))\n const _cache = unref(cache)\n\n const rtl = isRTL(direction)\n const [height, top] = getRowPosition(props, rowIndex, _cache)\n const [width] = getColumnPosition(props, columnIndex, _cache)\n\n itemStyleCache[key] = {\n position: 'absolute',\n left: rtl ? undefined : `${left}px`,\n right: rtl ? `${left}px` : undefined,\n top: `${top}px`,\n height: `${height}px`,\n width: `${width}px`,\n }\n\n return itemStyleCache[key]\n }\n }\n\n // TODO: debounce setting is scrolling.\n\n const resetIsScrolling = () => {\n // timer = null\n\n states.value.isScrolling = false\n nextTick(() => {\n getItemStyleCache.value(-1, null, null)\n })\n }\n\n // life cycles\n onMounted(() => {\n // for SSR\n if (!isClient) return\n const { initScrollLeft, initScrollTop } = props\n const windowElement = unref(windowRef)\n if (windowElement) {\n if (isNumber(initScrollLeft)) {\n windowElement.scrollLeft = initScrollLeft\n }\n if (isNumber(initScrollTop)) {\n windowElement.scrollTop = initScrollTop\n }\n }\n emitEvents()\n })\n\n const onUpdated = () => {\n const { direction } = props\n const { scrollLeft, scrollTop, updateRequested } = unref(states)\n\n const windowElement = unref(windowRef)\n if (updateRequested && windowElement) {\n if (direction === RTL) {\n switch (getRTLOffsetType()) {\n case RTL_OFFSET_NAG: {\n windowElement.scrollLeft = -scrollLeft\n break\n }\n case RTL_OFFSET_POS_ASC: {\n windowElement.scrollLeft = scrollLeft\n break\n }\n default: {\n const { clientWidth, scrollWidth } = windowElement\n windowElement.scrollLeft =\n scrollWidth - clientWidth - scrollLeft\n break\n }\n }\n } else {\n windowElement.scrollLeft = Math.max(0, scrollLeft)\n }\n\n windowElement.scrollTop = Math.max(0, scrollTop)\n }\n }\n\n const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } =\n instance.proxy as any\n\n expose({\n windowRef,\n innerRef,\n getItemStyleCache,\n scrollTo,\n scrollToItem,\n states,\n resetAfterColumnIndex,\n resetAfterRowIndex,\n resetAfter,\n })\n\n // rendering part\n\n const renderScrollbars = () => {\n const {\n scrollbarAlwaysOn,\n scrollbarStartGap,\n scrollbarEndGap,\n totalColumn,\n totalRow,\n } = props\n\n const width = unref(parsedWidth)\n const height = unref(parsedHeight)\n const estimatedWidth = unref(estimatedTotalWidth)\n const estimatedHeight = unref(estimatedTotalHeight)\n const { scrollLeft, scrollTop } = unref(states)\n const horizontalScrollbar = h(Scrollbar, {\n ref: hScrollbar,\n alwaysOn: scrollbarAlwaysOn,\n startGap: scrollbarStartGap,\n endGap: scrollbarEndGap,\n class: ns.e('horizontal'),\n clientSize: width,\n layout: 'horizontal',\n onScroll: onHorizontalScroll,\n ratio: (width * 100) / estimatedWidth,\n scrollFrom: scrollLeft / (estimatedWidth - width),\n total: totalRow,\n visible: true,\n })\n\n const verticalScrollbar = h(Scrollbar, {\n ref: vScrollbar,\n alwaysOn: scrollbarAlwaysOn,\n startGap: scrollbarStartGap,\n endGap: scrollbarEndGap,\n class: ns.e('vertical'),\n clientSize: height,\n layout: 'vertical',\n onScroll: onVerticalScroll,\n ratio: (height * 100) / estimatedHeight,\n scrollFrom: scrollTop / (estimatedHeight - height),\n\n total: totalColumn,\n visible: true,\n })\n\n return {\n horizontalScrollbar,\n verticalScrollbar,\n }\n }\n\n const renderItems = () => {\n const [columnStart, columnEnd] = unref(columnsToRender)\n const [rowStart, rowEnd] = unref(rowsToRender)\n const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props\n const children: VNodeChild[] = []\n if (totalRow > 0 && totalColumn > 0) {\n for (let row = rowStart; row <= rowEnd; row++) {\n for (let column = columnStart; column <= columnEnd; column++) {\n children.push(\n slots.default?.({\n columnIndex: column,\n data,\n key: itemKey({ columnIndex: column, data, rowIndex: row }),\n isScrolling: useIsScrolling\n ? unref(states).isScrolling\n : undefined,\n style: getItemStyle(row, column),\n rowIndex: row,\n })\n )\n }\n }\n }\n return children\n }\n\n const renderInner = () => {\n const Inner = resolveDynamicComponent(props.innerElement) as VNode\n const children = renderItems()\n return [\n h(\n Inner,\n {\n style: unref(innerStyle),\n ref: innerRef,\n },\n !isString(Inner)\n ? {\n default: () => children,\n }\n : children\n ),\n ]\n }\n\n const renderWindow = () => {\n const Container = resolveDynamicComponent(\n props.containerElement\n ) as VNode\n const { horizontalScrollbar, verticalScrollbar } = renderScrollbars()\n const Inner = renderInner()\n\n return h(\n 'div',\n {\n key: 0,\n class: ns.e('wrapper'),\n role: props.role,\n },\n [\n h(\n Container,\n {\n class: props.className,\n style: unref(windowStyle),\n onScroll,\n onWheel,\n ref: windowRef,\n },\n !isString(Container) ? { default: () => Inner } : Inner\n ),\n horizontalScrollbar,\n verticalScrollbar,\n ]\n )\n }\n\n return renderWindow\n },\n })\n}\n\nexport default createGrid\n\ntype Dir = typeof FORWARD | typeof BACKWARD\n\nexport type GridInstance = InstanceType> &\n UnwrapRef<{\n windowRef: Ref\n innerRef: Ref\n getItemStyleCache: ReturnType\n scrollTo: (scrollOptions: GridScrollOptions) => void\n scrollToItem: (\n rowIndex: number,\n columnIndex: number,\n alignment: Alignment\n ) => void\n states: Ref<{\n isScrolling: boolean\n scrollLeft: number\n scrollTop: number\n updateRequested: boolean\n xAxisScrollDir: Dir\n yAxisScrollDir: Dir\n }>\n }>\n", "import { isNumber, throwError } from '@element-plus/utils'\nimport createGrid from '../builders/build-grid'\n\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\n\nconst SCOPE = 'ElFixedSizeGrid'\n\nconst FixedSizeGrid = createGrid({\n name: 'ElFixedSizeGrid',\n getColumnPosition: ({ columnWidth }, index) => [\n columnWidth as number,\n index * (columnWidth as number),\n ],\n\n getRowPosition: ({ rowHeight }, index) => [\n rowHeight as number,\n index * (rowHeight as number),\n ],\n\n getEstimatedTotalHeight: ({ totalRow, rowHeight }) =>\n (rowHeight as number) * totalRow,\n\n getEstimatedTotalWidth: ({ totalColumn, columnWidth }) =>\n (columnWidth as number) * totalColumn,\n\n getColumnOffset: (\n { totalColumn, columnWidth, width },\n columnIndex,\n alignment,\n scrollLeft,\n _,\n scrollBarWidth\n ) => {\n width = Number(width)\n const lastColumnOffset = Math.max(\n 0,\n totalColumn * (columnWidth as number) - width\n )\n const maxOffset = Math.min(\n lastColumnOffset,\n columnIndex * (columnWidth as number)\n )\n const minOffset = Math.max(\n 0,\n columnIndex * (columnWidth as number) -\n width +\n scrollBarWidth +\n (columnWidth as number)\n )\n\n if (alignment === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT:\n return maxOffset\n case END_ALIGNMENT:\n return minOffset\n case CENTERED_ALIGNMENT: {\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(width / 2)) {\n return 0\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollLeft < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n },\n\n getRowOffset: (\n { rowHeight, height, totalRow },\n rowIndex,\n align,\n scrollTop,\n _,\n scrollBarWidth\n ): number => {\n height = Number(height)\n const lastRowOffset = Math.max(0, totalRow * (rowHeight as number) - height)\n const maxOffset = Math.min(lastRowOffset, rowIndex * (rowHeight as number))\n const minOffset = Math.max(\n 0,\n rowIndex * (rowHeight as number) -\n height +\n scrollBarWidth +\n (rowHeight as number)\n )\n\n if (align === SMART_ALIGNMENT) {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = AUTO_ALIGNMENT\n } else {\n align = CENTERED_ALIGNMENT\n }\n }\n\n switch (align) {\n case START_ALIGNMENT:\n return maxOffset\n case END_ALIGNMENT:\n return minOffset\n case CENTERED_ALIGNMENT: {\n const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2)\n if (middleOffset < Math.ceil(height / 2)) {\n return 0\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset\n } else {\n return middleOffset\n }\n }\n case AUTO_ALIGNMENT:\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollTop < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n },\n\n getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) =>\n Math.max(\n 0,\n Math.min(\n totalColumn - 1,\n Math.floor(scrollLeft / (columnWidth as number))\n )\n ),\n\n getColumnStopIndexForStartIndex: (\n { columnWidth, totalColumn, width },\n startIndex: number,\n scrollLeft: number\n ): number => {\n const left = startIndex * (columnWidth as number)\n const visibleColumnsCount = Math.ceil(\n ((width as number) + scrollLeft - left) / (columnWidth as number)\n )\n return Math.max(\n 0,\n Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1)\n )\n },\n\n getRowStartIndexForOffset: (\n { rowHeight, totalRow },\n scrollTop: number\n ): number =>\n Math.max(\n 0,\n Math.min(totalRow - 1, Math.floor(scrollTop / (rowHeight as number)))\n ),\n\n getRowStopIndexForStartIndex: (\n { rowHeight, totalRow, height },\n startIndex: number,\n scrollTop: number\n ): number => {\n const top = startIndex * (rowHeight as number)\n const numVisibleRows = Math.ceil(\n ((height as number) + scrollTop - top) / (rowHeight as number)\n )\n return Math.max(\n 0,\n Math.min(\n totalRow - 1,\n startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n )\n )\n },\n /**\n * Fixed size grid does not need this cache\n * Using any to bypass it, TODO: Using type inference to fix this.\n */\n initCache: () => undefined as any,\n\n clearCache: true,\n\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!isNumber(columnWidth)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as number,\n instead ${typeof columnWidth} was given.\n `\n )\n }\n\n if (!isNumber(rowHeight)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as number,\n instead ${typeof rowHeight} was given.\n `\n )\n }\n }\n },\n})\n\nexport default FixedSizeGrid\n", "// @ts-nocheck\nimport { isFunction } from '@vue/shared'\nimport { isNumber, isUndefined, throwError } from '@element-plus/utils'\nimport createGrid from '../builders/build-grid'\n\nimport {\n AUTO_ALIGNMENT,\n CENTERED_ALIGNMENT,\n DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n END_ALIGNMENT,\n SMART_ALIGNMENT,\n START_ALIGNMENT,\n} from '../defaults'\nimport type { GridInstance } from '../builders/build-grid'\nimport type { VirtualizedGridProps } from '../props'\n\nimport type { Alignment, GridCache, ItemSize, ListItem } from '../types'\n\nconst { max, min, floor } = Math\nconst SCOPE = 'ElDynamicSizeGrid'\n\ntype Props = VirtualizedGridProps\ntype CacheItemType = 'column' | 'row'\ntype Indices = {\n columnIndex?: number\n rowIndex?: number\n}\n\n// generates props access key via type\nconst ACCESS_SIZER_KEY_MAP = {\n column: 'columnWidth',\n row: 'rowHeight',\n}\n\n// generates cache access key via type\nconst ACCESS_LAST_VISITED_KEY_MAP = {\n column: 'lastVisitedColumnIndex',\n row: 'lastVisitedRowIndex',\n}\n\nconst getItemFromCache = (\n props: Props,\n index: number,\n gridCache: GridCache,\n type: CacheItemType\n) => {\n const [cachedItems, sizer, lastVisited] = [\n gridCache[type],\n props[ACCESS_SIZER_KEY_MAP[type]],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]],\n ] as [Record, ItemSize, number]\n\n if (index > lastVisited) {\n let offset = 0\n if (lastVisited >= 0) {\n const item = cachedItems[lastVisited]\n offset = item.offset + item.size\n }\n\n for (let i = lastVisited + 1; i <= index; i++) {\n // console.log(i, sizer(i))\n const size = sizer(i)\n\n cachedItems[i] = {\n offset,\n size,\n }\n\n offset += size\n }\n\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index\n }\n\n return cachedItems[index]\n}\n\nconst bs = (\n props: Props,\n gridCache: GridCache,\n low: number,\n high: number,\n offset: number,\n type: CacheItemType\n) => {\n while (low <= high) {\n const mid = low + floor((high - low) / 2)\n const currentOffset = getItemFromCache(props, mid, gridCache, type).offset\n\n if (currentOffset === offset) {\n return mid\n } else if (currentOffset < offset) {\n low = mid + 1\n } else {\n high = mid - 1\n }\n }\n\n return max(0, low - 1)\n}\n\nconst es = (\n props: Props,\n gridCache: GridCache,\n idx: number,\n offset: number,\n type: CacheItemType\n) => {\n const total = type === 'column' ? props.totalColumn : props.totalRow\n let exponent = 1\n\n while (\n idx < total &&\n getItemFromCache(props, idx, gridCache, type).offset < offset\n ) {\n idx += exponent\n exponent *= 2\n }\n\n return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type)\n}\n\nconst findItem = (\n props: Props,\n gridCache: GridCache,\n offset: number,\n type: CacheItemType\n) => {\n const [cache, lastVisitedIndex] = [\n gridCache[type],\n gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]],\n ] as [Record, number]\n\n const lastVisitedItemOffset =\n lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0\n\n if (lastVisitedItemOffset >= offset) {\n return bs(props, gridCache, 0, lastVisitedIndex, offset, type)\n }\n\n return es(props, gridCache, max(0, lastVisitedIndex), offset, type)\n}\n\nconst getEstimatedTotalHeight = (\n { totalRow }: Props,\n { estimatedRowHeight, lastVisitedRowIndex, row }: GridCache\n) => {\n let sizeOfVisitedRows = 0\n\n if (lastVisitedRowIndex >= totalRow) {\n lastVisitedRowIndex = totalRow - 1\n }\n\n if (lastVisitedRowIndex >= 0) {\n const item = row[lastVisitedRowIndex]\n sizeOfVisitedRows = item.offset + item.size\n }\n\n const unvisitedItems = totalRow - lastVisitedRowIndex - 1\n const sizeOfUnvisitedItems = unvisitedItems * estimatedRowHeight\n\n return sizeOfVisitedRows + sizeOfUnvisitedItems\n}\nconst getEstimatedTotalWidth = (\n { totalColumn }: Props,\n { column, estimatedColumnWidth, lastVisitedColumnIndex }: GridCache\n) => {\n let sizeOfVisitedColumns = 0\n\n if (lastVisitedColumnIndex > totalColumn) {\n lastVisitedColumnIndex = totalColumn - 1\n }\n\n if (lastVisitedColumnIndex >= 0) {\n const item = column[lastVisitedColumnIndex]\n sizeOfVisitedColumns = item.offset + item.size\n }\n\n const unvisitedItems = totalColumn - lastVisitedColumnIndex - 1\n const sizeOfUnvisitedItems = unvisitedItems * estimatedColumnWidth\n\n return sizeOfVisitedColumns + sizeOfUnvisitedItems\n}\n\nconst ACCESS_ESTIMATED_SIZE_KEY_MAP = {\n column: getEstimatedTotalWidth,\n row: getEstimatedTotalHeight,\n}\n\nconst getOffset = (\n props: Props,\n index: number,\n alignment: Alignment,\n scrollOffset: number,\n cache: GridCache,\n type: CacheItemType,\n scrollBarWidth: number\n) => {\n const [size, estimatedSizeAssociates] = [\n type === 'row' ? props.height : props.width,\n ACCESS_ESTIMATED_SIZE_KEY_MAP[type],\n ] as [number, (props: Props, cache: GridCache) => number]\n const item = getItemFromCache(props, index, cache, type)\n\n const estimatedSize = estimatedSizeAssociates(props, cache)\n\n const maxOffset = max(0, min(estimatedSize - size, item.offset))\n const minOffset = max(0, item.offset - size + scrollBarWidth + item.size)\n\n if (alignment === SMART_ALIGNMENT) {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n alignment = AUTO_ALIGNMENT\n } else {\n alignment = CENTERED_ALIGNMENT\n }\n }\n\n switch (alignment) {\n case START_ALIGNMENT: {\n return maxOffset\n }\n case END_ALIGNMENT: {\n return minOffset\n }\n case CENTERED_ALIGNMENT: {\n return Math.round(minOffset + (maxOffset - minOffset) / 2)\n }\n case AUTO_ALIGNMENT:\n default: {\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset\n } else if (minOffset > maxOffset) {\n return minOffset\n } else if (scrollOffset < minOffset) {\n return minOffset\n } else {\n return maxOffset\n }\n }\n }\n}\n\nconst DynamicSizeGrid = createGrid({\n name: 'ElDynamicSizeGrid',\n getColumnPosition: (props, idx, cache) => {\n const item = getItemFromCache(props, idx, cache, 'column')\n return [item.size, item.offset]\n },\n\n getRowPosition: (props, idx, cache) => {\n const item = getItemFromCache(props, idx, cache, 'row')\n return [item.size, item.offset]\n },\n\n getColumnOffset: (\n props,\n columnIndex,\n alignment,\n scrollLeft,\n cache,\n scrollBarWidth\n ) =>\n getOffset(\n props,\n columnIndex,\n alignment,\n scrollLeft,\n cache,\n 'column',\n scrollBarWidth\n ),\n\n getRowOffset: (\n props,\n rowIndex,\n alignment,\n scrollTop,\n cache,\n scrollBarWidth: number\n ) =>\n getOffset(\n props,\n rowIndex,\n alignment,\n scrollTop,\n cache,\n 'row',\n scrollBarWidth\n ),\n\n getColumnStartIndexForOffset: (props, scrollLeft, cache) =>\n findItem(props, cache, scrollLeft, 'column'),\n\n getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {\n const item = getItemFromCache(props, startIndex, cache, 'column')\n\n const maxOffset = scrollLeft + (props.width as number)\n\n let offset = item.offset + item.size\n let stopIndex = startIndex\n while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, startIndex, cache, 'column').size\n }\n return stopIndex\n },\n\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n\n getRowStartIndexForOffset: (props, scrollTop, cache) =>\n findItem(props, cache, scrollTop, 'row'),\n\n getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {\n const { totalRow, height } = props\n const item = getItemFromCache(props, startIndex, cache, 'row')\n const maxOffset = scrollTop + (height as number)\n\n let offset = item.size + item.offset\n let stopIndex = startIndex\n\n while (stopIndex < totalRow - 1 && offset < maxOffset) {\n stopIndex++\n offset += getItemFromCache(props, stopIndex, cache, 'row').size\n }\n\n return stopIndex\n },\n injectToInstance: (instance, cache) => {\n const resetAfter = (\n { columnIndex, rowIndex }: Indices,\n forceUpdate?: boolean\n ) => {\n forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate\n\n if (isNumber(columnIndex)) {\n cache.value.lastVisitedColumnIndex = Math.min(\n cache.value.lastVisitedColumnIndex,\n columnIndex - 1\n )\n }\n\n if (isNumber(rowIndex)) {\n // console.log(rowIndex)\n cache.value.lastVisitedRowIndex = Math.min(\n cache.value.lastVisitedRowIndex,\n rowIndex - 1\n )\n }\n\n instance.exposed?.getItemStyleCache.value(-1, null, null)\n\n if (forceUpdate) instance.proxy?.$forceUpdate()\n }\n\n const resetAfterColumnIndex = (\n columnIndex: number,\n forceUpdate: boolean\n ) => {\n resetAfter(\n {\n columnIndex,\n },\n forceUpdate\n )\n }\n\n const resetAfterRowIndex = (rowIndex: number, forceUpdate: boolean) => {\n resetAfter(\n {\n rowIndex,\n },\n forceUpdate\n )\n }\n\n Object.assign(instance.proxy, {\n resetAfterColumnIndex,\n resetAfterRowIndex,\n resetAfter,\n })\n },\n initCache: ({\n estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,\n }) => {\n const cache = {\n column: {},\n estimatedColumnWidth,\n estimatedRowHeight,\n lastVisitedColumnIndex: -1,\n lastVisitedRowIndex: -1,\n row: {},\n } as GridCache\n\n // TODO: expose methods.\n return cache\n },\n\n clearCache: false,\n\n validateProps: ({ columnWidth, rowHeight }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!isFunction(columnWidth)) {\n throwError(\n SCOPE,\n `\n \"columnWidth\" must be passed as function,\n instead ${typeof columnWidth} was given.\n `\n )\n }\n\n if (!isFunction(rowHeight)) {\n throwError(\n SCOPE,\n `\n \"rowHeight\" must be passed as function,\n instead ${typeof rowHeight} was given.\n `\n )\n }\n }\n },\n})\n\nexport default DynamicSizeGrid\n\nexport type ResetAfterIndex = (idx: number, forceUpdate: boolean) => void\nexport type ResetAfterIndices = (indices: Indices, forceUpdate: boolean) => void\n\nexport type DynamicSizeGridInstance = GridInstance & {\n resetAfterColumnIndex: ResetAfterIndex\n resetAfterRowIndex: ResetAfterIndex\n resetAfter: ResetAfterIndices\n}\n", "\n\n\n", "// @ts-nocheck\nimport type { IOptionProps } from './token'\n\nexport function useOption(props: IOptionProps, { emit }) {\n return {\n hoverItem: () => {\n if (!props.disabled) {\n emit('hover', props.index)\n }\n },\n selectOptionClick: () => {\n if (!props.disabled) {\n emit('select', props.item, props.index)\n }\n },\n }\n}\n", "import { placements } from '@popperjs/core'\nimport { definePropType, isValidComponentSize } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { CircleClose } from '@element-plus/icons-vue'\nimport type { Component, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { OptionType } from './select.types'\nimport type { Options, Placement } from '@element-plus/components/popper'\n\nexport const SelectProps = {\n allowCreate: Boolean,\n autocomplete: {\n type: String as PropType<'none' | 'both' | 'list' | 'inline'>,\n default: 'none',\n },\n automaticDropdown: Boolean,\n clearable: Boolean,\n clearIcon: {\n type: [String, Object] as PropType,\n default: CircleClose,\n },\n effect: {\n type: String as PropType<'light' | 'dark' | string>,\n default: 'light',\n },\n collapseTags: Boolean,\n collapseTagsTooltip: {\n type: Boolean,\n default: false,\n },\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n defaultFirstOption: Boolean,\n disabled: Boolean,\n estimatedOptionHeight: {\n type: Number,\n default: undefined,\n },\n filterable: Boolean,\n filterMethod: Function,\n height: {\n type: Number,\n default: 170, // 5 items by default\n },\n itemHeight: {\n type: Number,\n default: 34,\n },\n id: String,\n loading: Boolean,\n loadingText: String,\n label: String,\n modelValue: [Array, String, Number, Boolean, Object] as PropType<\n any[] | string | number | boolean | Record | any\n >,\n multiple: Boolean,\n multipleLimit: {\n type: Number,\n default: 0,\n },\n name: String,\n noDataText: String,\n noMatchText: String,\n remoteMethod: Function,\n reserveKeyword: {\n type: Boolean,\n default: true,\n },\n options: {\n type: Array as PropType,\n required: true,\n },\n placeholder: {\n type: String,\n },\n teleported: useTooltipContentProps.teleported,\n persistent: {\n type: Boolean,\n default: true,\n },\n popperClass: {\n type: String,\n default: '',\n },\n popperOptions: {\n type: Object as PropType>,\n default: () => ({} as Partial),\n },\n remote: Boolean,\n size: {\n type: String as PropType,\n validator: isValidComponentSize,\n },\n valueKey: {\n type: String,\n default: 'value',\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n validateEvent: {\n type: Boolean,\n default: true,\n },\n placement: {\n type: definePropType(String),\n values: placements,\n default: 'bottom-start',\n },\n}\n\nexport const OptionProps = {\n data: Array,\n disabled: Boolean,\n hovering: Boolean,\n item: Object,\n index: Number,\n style: Object,\n selected: Boolean,\n created: Boolean,\n}\n", "\n\n\n", "import type { OptionProps, SelectProps } from './defaults'\nimport type { ExtractPropTypes, InjectionKey, Ref } from 'vue'\nimport type { Option } from './select.types'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\nexport interface SelectV2Context {\n props: ExtractPropTypes\n expanded: boolean\n popper: Ref\n onSelect: (option: Option, index: number, byClick?: boolean) => void\n onHover: (idx: number) => void\n onKeyboardNavigate: (direction: 'forward' | 'backward') => void\n onKeyboardSelect: () => void\n}\n\nexport const selectV2InjectionKey: InjectionKey = Symbol(\n 'ElSelectV2Injection'\n)\nexport type IOptionProps = ExtractPropTypes\nexport type ISelectProps = ExtractPropTypes\n", "import { computed, defineComponent, inject, ref, unref, watch } from 'vue'\nimport { get } from 'lodash-unified'\nimport { isObject, isUndefined } from '@element-plus/utils'\nimport {\n DynamicSizeList,\n FixedSizeList,\n} from '@element-plus/components/virtual-list'\nimport { useNamespace } from '@element-plus/hooks'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport GroupItem from './group-item.vue'\nimport OptionItem from './option-item.vue'\n\nimport { selectV2InjectionKey } from './token'\n\nimport type { ItemProps } from '@element-plus/components/virtual-list'\nimport type { Option, OptionItemProps } from './select.types'\n\nexport default defineComponent({\n name: 'ElSelectDropdown',\n\n props: {\n data: {\n type: Array,\n required: true,\n },\n hoveringIndex: Number,\n width: Number,\n },\n setup(props, { slots, expose }) {\n const select = inject(selectV2InjectionKey)!\n const ns = useNamespace('select')\n const cachedHeights = ref>([])\n\n const listRef = ref()\n\n const size = computed(() => props.data.length)\n watch(\n () => size.value,\n () => {\n select.popper.value.updatePopper?.()\n }\n )\n\n const isSized = computed(() =>\n isUndefined(select.props.estimatedOptionHeight)\n )\n const listProps = computed(() => {\n if (isSized.value) {\n return {\n itemSize: select.props.itemHeight,\n }\n }\n\n return {\n estimatedSize: select.props.estimatedOptionHeight,\n itemSize: (idx: number) => cachedHeights.value[idx],\n }\n })\n\n const contains = (arr: Array = [], target: any) => {\n const {\n props: { valueKey },\n } = select\n\n if (!isObject(target)) {\n return arr.includes(target)\n }\n\n return (\n arr &&\n arr.some((item) => {\n return get(item, valueKey) === get(target, valueKey)\n })\n )\n }\n const isEqual = (selected: unknown, target: unknown) => {\n if (!isObject(target)) {\n return selected === target\n } else {\n const { valueKey } = select.props\n return get(selected, valueKey) === get(target, valueKey)\n }\n }\n\n const isItemSelected = (modelValue: any[] | any, target: Option) => {\n const { valueKey } = select.props\n if (select.props.multiple) {\n return contains(modelValue, get(target, valueKey))\n }\n return isEqual(modelValue, get(target, valueKey))\n }\n\n const isItemDisabled = (modelValue: any[] | any, selected: boolean) => {\n const { disabled, multiple, multipleLimit } = select.props\n return (\n disabled ||\n (!selected &&\n (multiple\n ? multipleLimit > 0 && modelValue.length >= multipleLimit\n : false))\n )\n }\n\n const isItemHovering = (target: number) => props.hoveringIndex === target\n\n const scrollToItem = (index: number) => {\n const list = listRef.value as any\n if (list) {\n list.scrollToItem(index)\n }\n }\n\n const resetScrollTop = () => {\n const list = listRef.value as any\n if (list) {\n list.resetScrollTop()\n }\n }\n\n expose({\n listRef,\n isSized,\n\n isItemDisabled,\n isItemHovering,\n isItemSelected,\n scrollToItem,\n resetScrollTop,\n })\n\n const Item = (itemProps: ItemProps) => {\n const { index, data, style } = itemProps\n const sized = unref(isSized)\n const { itemSize, estimatedSize } = unref(listProps)\n const { modelValue } = select.props\n const { onSelect, onHover } = select\n const item = data[index]\n if (item.type === 'Group') {\n return (\n \n )\n }\n\n const isSelected = isItemSelected(modelValue, item)\n const isDisabled = isItemDisabled(modelValue, isSelected)\n const isHovering = isItemHovering(index)\n return (\n \n {{\n default: (props: OptionItemProps) =>\n slots.default?.(props) || {item.label},\n }}\n \n )\n }\n\n // computed\n const { onKeyboardNavigate, onKeyboardSelect } = select\n\n const onForward = () => {\n onKeyboardNavigate('forward')\n }\n\n const onBackward = () => {\n onKeyboardNavigate('backward')\n }\n\n const onEscOrTab = () => {\n select.expanded = false\n }\n\n const onKeydown = (e: KeyboardEvent) => {\n const { code } = e\n const { tab, esc, down, up, enter } = EVENT_CODE\n if (code !== tab) {\n e.preventDefault()\n e.stopPropagation()\n }\n\n switch (code) {\n case tab:\n case esc: {\n onEscOrTab()\n break\n }\n case down: {\n onForward()\n break\n }\n case up: {\n onBackward()\n break\n }\n case enter: {\n onKeyboardSelect()\n break\n }\n }\n }\n\n return () => {\n const { data, width } = props\n const { height, multiple, scrollbarAlwaysOn } = select.props\n\n if (data.length === 0) {\n return (\n \n {slots.empty?.()}\n \n )\n }\n\n const List = unref(isSized) ? FixedSizeList : DynamicSizeList\n\n return (\n
\n \n {{\n default: (props: ItemProps) => ,\n }}\n \n
\n )\n }\n },\n})\n", "// @ts-nocheck\nimport { computed, ref } from 'vue'\nimport type { ISelectProps } from './token'\nimport type { Option } from './select.types'\n\nexport function useAllowCreate(props: ISelectProps, states) {\n const createOptionCount = ref(0)\n const cachedSelectedOption = ref