diff --git a/main.js b/main.js new file mode 100644 index 0000000..9f33ff2 --- /dev/null +++ b/main.js @@ -0,0 +1,17850 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key2 of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key2) && key2 !== except) + __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "node_modules/dayjs/dayjs.min.js"(exports, module2) { + !function(t4, e5) { + typeof exports == "object" && typeof module2 != "undefined" ? module2.exports = e5() : typeof define == "function" && define.amd ? define(e5) : (t4 = typeof globalThis != "undefined" ? globalThis : t4 || self).dayjs = e5(); + }(exports, function() { + "use strict"; + var t4 = 1e3, e5 = 6e4, n4 = 36e5, r6 = "millisecond", i5 = "second", s10 = "minute", u6 = "hour", a6 = "day", o6 = "week", f5 = "month", h5 = "quarter", c3 = "year", d5 = "date", l4 = "Invalid Date", $4 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y4 = /\[([^\]]+)]|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, M4 = { 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(t5) { + var e6 = ["th", "st", "nd", "rd"], n5 = t5 % 100; + return "[" + t5 + (e6[(n5 - 20) % 10] || e6[n5] || e6[0]) + "]"; + } }, m6 = function(t5, e6, n5) { + var r7 = String(t5); + return !r7 || r7.length >= e6 ? t5 : "" + Array(e6 + 1 - r7.length).join(n5) + t5; + }, v3 = { s: m6, z: function(t5) { + var e6 = -t5.utcOffset(), n5 = Math.abs(e6), r7 = Math.floor(n5 / 60), i6 = n5 % 60; + return (e6 <= 0 ? "+" : "-") + m6(r7, 2, "0") + ":" + m6(i6, 2, "0"); + }, m: function t5(e6, n5) { + if (e6.date() < n5.date()) + return -t5(n5, e6); + var r7 = 12 * (n5.year() - e6.year()) + (n5.month() - e6.month()), i6 = e6.clone().add(r7, f5), s11 = n5 - i6 < 0, u7 = e6.clone().add(r7 + (s11 ? -1 : 1), f5); + return +(-(r7 + (n5 - i6) / (s11 ? i6 - u7 : u7 - i6)) || 0); + }, a: function(t5) { + return t5 < 0 ? Math.ceil(t5) || 0 : Math.floor(t5); + }, p: function(t5) { + return { M: f5, y: c3, w: o6, d: a6, D: d5, h: u6, m: s10, s: i5, ms: r6, Q: h5 }[t5] || String(t5 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t5) { + return t5 === void 0; + } }, g4 = "en", D4 = {}; + D4[g4] = M4; + var p6 = function(t5) { + return t5 instanceof _3; + }, S4 = function t5(e6, n5, r7) { + var i6; + if (!e6) + return g4; + if (typeof e6 == "string") { + var s11 = e6.toLowerCase(); + D4[s11] && (i6 = s11), n5 && (D4[s11] = n5, i6 = s11); + var u7 = e6.split("-"); + if (!i6 && u7.length > 1) + return t5(u7[0]); + } else { + var a7 = e6.name; + D4[a7] = e6, i6 = a7; + } + return !r7 && i6 && (g4 = i6), i6 || !r7 && g4; + }, w7 = function(t5, e6) { + if (p6(t5)) + return t5.clone(); + var n5 = typeof e6 == "object" ? e6 : {}; + return n5.date = t5, n5.args = arguments, new _3(n5); + }, O4 = v3; + O4.l = S4, O4.i = p6, O4.w = function(t5, e6) { + return w7(t5, { locale: e6.$L, utc: e6.$u, x: e6.$x, $offset: e6.$offset }); + }; + var _3 = function() { + function M5(t5) { + this.$L = S4(t5.locale, null, true), this.parse(t5); + } + var m7 = M5.prototype; + return m7.parse = function(t5) { + this.$d = function(t6) { + var e6 = t6.date, n5 = t6.utc; + if (e6 === null) + return new Date(NaN); + if (O4.u(e6)) + return new Date(); + if (e6 instanceof Date) + return new Date(e6); + if (typeof e6 == "string" && !/Z$/i.test(e6)) { + var r7 = e6.match($4); + if (r7) { + var i6 = r7[2] - 1 || 0, s11 = (r7[7] || "0").substring(0, 3); + return n5 ? new Date(Date.UTC(r7[1], i6, r7[3] || 1, r7[4] || 0, r7[5] || 0, r7[6] || 0, s11)) : new Date(r7[1], i6, r7[3] || 1, r7[4] || 0, r7[5] || 0, r7[6] || 0, s11); + } + } + return new Date(e6); + }(t5), this.$x = t5.x || {}, this.init(); + }, m7.init = function() { + var t5 = this.$d; + this.$y = t5.getFullYear(), this.$M = t5.getMonth(), this.$D = t5.getDate(), this.$W = t5.getDay(), this.$H = t5.getHours(), this.$m = t5.getMinutes(), this.$s = t5.getSeconds(), this.$ms = t5.getMilliseconds(); + }, m7.$utils = function() { + return O4; + }, m7.isValid = function() { + return !(this.$d.toString() === l4); + }, m7.isSame = function(t5, e6) { + var n5 = w7(t5); + return this.startOf(e6) <= n5 && n5 <= this.endOf(e6); + }, m7.isAfter = function(t5, e6) { + return w7(t5) < this.startOf(e6); + }, m7.isBefore = function(t5, e6) { + return this.endOf(e6) < w7(t5); + }, m7.$g = function(t5, e6, n5) { + return O4.u(t5) ? this[e6] : this.set(n5, t5); + }, m7.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m7.valueOf = function() { + return this.$d.getTime(); + }, m7.startOf = function(t5, e6) { + var n5 = this, r7 = !!O4.u(e6) || e6, h6 = O4.p(t5), l5 = function(t6, e7) { + var i6 = O4.w(n5.$u ? Date.UTC(n5.$y, e7, t6) : new Date(n5.$y, e7, t6), n5); + return r7 ? i6 : i6.endOf(a6); + }, $5 = function(t6, e7) { + return O4.w(n5.toDate()[t6].apply(n5.toDate("s"), (r7 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e7)), n5); + }, y5 = this.$W, M6 = this.$M, m8 = this.$D, v4 = "set" + (this.$u ? "UTC" : ""); + switch (h6) { + case c3: + return r7 ? l5(1, 0) : l5(31, 11); + case f5: + return r7 ? l5(1, M6) : l5(0, M6 + 1); + case o6: + var g5 = this.$locale().weekStart || 0, D5 = (y5 < g5 ? y5 + 7 : y5) - g5; + return l5(r7 ? m8 - D5 : m8 + (6 - D5), M6); + case a6: + case d5: + return $5(v4 + "Hours", 0); + case u6: + return $5(v4 + "Minutes", 1); + case s10: + return $5(v4 + "Seconds", 2); + case i5: + return $5(v4 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m7.endOf = function(t5) { + return this.startOf(t5, false); + }, m7.$set = function(t5, e6) { + var n5, o7 = O4.p(t5), h6 = "set" + (this.$u ? "UTC" : ""), l5 = (n5 = {}, n5[a6] = h6 + "Date", n5[d5] = h6 + "Date", n5[f5] = h6 + "Month", n5[c3] = h6 + "FullYear", n5[u6] = h6 + "Hours", n5[s10] = h6 + "Minutes", n5[i5] = h6 + "Seconds", n5[r6] = h6 + "Milliseconds", n5)[o7], $5 = o7 === a6 ? this.$D + (e6 - this.$W) : e6; + if (o7 === f5 || o7 === c3) { + var y5 = this.clone().set(d5, 1); + y5.$d[l5]($5), y5.init(), this.$d = y5.set(d5, Math.min(this.$D, y5.daysInMonth())).$d; + } else + l5 && this.$d[l5]($5); + return this.init(), this; + }, m7.set = function(t5, e6) { + return this.clone().$set(t5, e6); + }, m7.get = function(t5) { + return this[O4.p(t5)](); + }, m7.add = function(r7, h6) { + var d6, l5 = this; + r7 = Number(r7); + var $5 = O4.p(h6), y5 = function(t5) { + var e6 = w7(l5); + return O4.w(e6.date(e6.date() + Math.round(t5 * r7)), l5); + }; + if ($5 === f5) + return this.set(f5, this.$M + r7); + if ($5 === c3) + return this.set(c3, this.$y + r7); + if ($5 === a6) + return y5(1); + if ($5 === o6) + return y5(7); + var M6 = (d6 = {}, d6[s10] = e5, d6[u6] = n4, d6[i5] = t4, d6)[$5] || 1, m8 = this.$d.getTime() + r7 * M6; + return O4.w(m8, this); + }, m7.subtract = function(t5, e6) { + return this.add(-1 * t5, e6); + }, m7.format = function(t5) { + var e6 = this, n5 = this.$locale(); + if (!this.isValid()) + return n5.invalidDate || l4; + var r7 = t5 || "YYYY-MM-DDTHH:mm:ssZ", i6 = O4.z(this), s11 = this.$H, u7 = this.$m, a7 = this.$M, o7 = n5.weekdays, f6 = n5.months, h6 = function(t6, n6, i7, s12) { + return t6 && (t6[n6] || t6(e6, r7)) || i7[n6].slice(0, s12); + }, c4 = function(t6) { + return O4.s(s11 % 12 || 12, t6, "0"); + }, d6 = n5.meridiem || function(t6, e7, n6) { + var r8 = t6 < 12 ? "AM" : "PM"; + return n6 ? r8.toLowerCase() : r8; + }, $5 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a7 + 1, MM: O4.s(a7 + 1, 2, "0"), MMM: h6(n5.monthsShort, a7, f6, 3), MMMM: h6(f6, a7), D: this.$D, DD: O4.s(this.$D, 2, "0"), d: String(this.$W), dd: h6(n5.weekdaysMin, this.$W, o7, 2), ddd: h6(n5.weekdaysShort, this.$W, o7, 3), dddd: o7[this.$W], H: String(s11), HH: O4.s(s11, 2, "0"), h: c4(1), hh: c4(2), a: d6(s11, u7, true), A: d6(s11, u7, false), m: String(u7), mm: O4.s(u7, 2, "0"), s: String(this.$s), ss: O4.s(this.$s, 2, "0"), SSS: O4.s(this.$ms, 3, "0"), Z: i6 }; + return r7.replace(y4, function(t6, e7) { + return e7 || $5[t6] || i6.replace(":", ""); + }); + }, m7.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m7.diff = function(r7, d6, l5) { + var $5, y5 = O4.p(d6), M6 = w7(r7), m8 = (M6.utcOffset() - this.utcOffset()) * e5, v4 = this - M6, g5 = O4.m(this, M6); + return g5 = ($5 = {}, $5[c3] = g5 / 12, $5[f5] = g5, $5[h5] = g5 / 3, $5[o6] = (v4 - m8) / 6048e5, $5[a6] = (v4 - m8) / 864e5, $5[u6] = v4 / n4, $5[s10] = v4 / e5, $5[i5] = v4 / t4, $5)[y5] || v4, l5 ? g5 : O4.a(g5); + }, m7.daysInMonth = function() { + return this.endOf(f5).$D; + }, m7.$locale = function() { + return D4[this.$L]; + }, m7.locale = function(t5, e6) { + if (!t5) + return this.$L; + var n5 = this.clone(), r7 = S4(t5, e6, true); + return r7 && (n5.$L = r7), n5; + }, m7.clone = function() { + return O4.w(this.$d, this); + }, m7.toDate = function() { + return new Date(this.valueOf()); + }, m7.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m7.toISOString = function() { + return this.$d.toISOString(); + }, m7.toString = function() { + return this.$d.toUTCString(); + }, M5; + }(), T8 = _3.prototype; + return w7.prototype = T8, [["$ms", r6], ["$s", i5], ["$m", s10], ["$H", u6], ["$W", a6], ["$M", f5], ["$y", c3], ["$D", d5]].forEach(function(t5) { + T8[t5[1]] = function(e6) { + return this.$g(e6, t5[0], t5[1]); + }; + }), w7.extend = function(t5, e6) { + return t5.$i || (t5(e6, _3, w7), t5.$i = true), w7; + }, w7.locale = S4, w7.isDayjs = p6, w7.unix = function(t5) { + return w7(1e3 * t5); + }, w7.en = D4[g4], w7.Ls = D4, w7.p = {}, w7; + }); + } +}); + +// node_modules/tslib/tslib.js +var require_tslib = __commonJS({ + "node_modules/tslib/tslib.js"(exports, module2) { + var __extends2; + var __assign2; + var __rest2; + var __decorate2; + var __param2; + var __metadata2; + var __awaiter2; + var __generator2; + var __exportStar2; + var __values2; + var __read2; + var __spread2; + var __spreadArrays2; + var __spreadArray2; + var __await2; + var __asyncGenerator2; + var __asyncDelegator2; + var __asyncValues2; + var __makeTemplateObject2; + var __importStar2; + var __importDefault2; + var __classPrivateFieldGet2; + var __classPrivateFieldSet2; + var __classPrivateFieldIn2; + var __createBinding2; + (function(factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function(exports2) { + factory(createExporter(root, createExporter(exports2))); + }); + } else if (typeof module2 === "object" && typeof module2.exports === "object") { + factory(createExporter(root, createExporter(module2.exports))); + } else { + factory(createExporter(root)); + } + function createExporter(exports2, previous) { + if (exports2 !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports2, "__esModule", { value: true }); + } else { + exports2.__esModule = true; + } + } + return function(id, v3) { + return exports2[id] = previous ? previous(id, v3) : v3; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d5, b4) { + d5.__proto__ = b4; + } || function(d5, b4) { + for (var p6 in b4) + if (Object.prototype.hasOwnProperty.call(b4, p6)) + d5[p6] = b4[p6]; + }; + __extends2 = function(d5, b4) { + if (typeof b4 !== "function" && b4 !== null) + throw new TypeError("Class extends value " + String(b4) + " is not a constructor or null"); + extendStatics(d5, b4); + function __() { + this.constructor = d5; + } + d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __()); + }; + __assign2 = Object.assign || function(t4) { + for (var s10, i5 = 1, n4 = arguments.length; i5 < n4; i5++) { + s10 = arguments[i5]; + for (var p6 in s10) + if (Object.prototype.hasOwnProperty.call(s10, p6)) + t4[p6] = s10[p6]; + } + return t4; + }; + __rest2 = function(s10, e5) { + var t4 = {}; + for (var p6 in s10) + if (Object.prototype.hasOwnProperty.call(s10, p6) && e5.indexOf(p6) < 0) + t4[p6] = s10[p6]; + if (s10 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i5 = 0, p6 = Object.getOwnPropertySymbols(s10); i5 < p6.length; i5++) { + if (e5.indexOf(p6[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s10, p6[i5])) + t4[p6[i5]] = s10[p6[i5]]; + } + return t4; + }; + __decorate2 = function(decorators, target, key2, desc) { + var c3 = arguments.length, r6 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key2) : desc, d5; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r6 = Reflect.decorate(decorators, target, key2, desc); + else + for (var i5 = decorators.length - 1; i5 >= 0; i5--) + if (d5 = decorators[i5]) + r6 = (c3 < 3 ? d5(r6) : c3 > 3 ? d5(target, key2, r6) : d5(target, key2)) || r6; + return c3 > 3 && r6 && Object.defineProperty(target, key2, r6), r6; + }; + __param2 = function(paramIndex, decorator) { + return function(target, key2) { + decorator(target, key2, paramIndex); + }; + }; + __metadata2 = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter2 = function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve) { + resolve(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator2 = function(thisArg, body) { + var _3 = { label: 0, sent: function() { + if (t4[0] & 1) + throw t4[1]; + return t4[1]; + }, trys: [], ops: [] }, f5, y4, t4, g4; + return g4 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g4[Symbol.iterator] = function() { + return this; + }), g4; + function verb(n4) { + return function(v3) { + return step([n4, v3]); + }; + } + function step(op) { + if (f5) + throw new TypeError("Generator is already executing."); + while (g4 && (g4 = 0, op[0] && (_3 = 0)), _3) + try { + if (f5 = 1, y4 && (t4 = op[0] & 2 ? y4["return"] : op[0] ? y4["throw"] || ((t4 = y4["return"]) && t4.call(y4), 0) : y4.next) && !(t4 = t4.call(y4, op[1])).done) + return t4; + if (y4 = 0, t4) + op = [op[0] & 2, t4.value]; + switch (op[0]) { + case 0: + case 1: + t4 = op; + break; + case 4: + _3.label++; + return { value: op[1], done: false }; + case 5: + _3.label++; + y4 = op[1]; + op = [0]; + continue; + case 7: + op = _3.ops.pop(); + _3.trys.pop(); + continue; + default: + if (!(t4 = _3.trys, t4 = t4.length > 0 && t4[t4.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _3 = 0; + continue; + } + if (op[0] === 3 && (!t4 || op[1] > t4[0] && op[1] < t4[3])) { + _3.label = op[1]; + break; + } + if (op[0] === 6 && _3.label < t4[1]) { + _3.label = t4[1]; + t4 = op; + break; + } + if (t4 && _3.label < t4[2]) { + _3.label = t4[2]; + _3.ops.push(op); + break; + } + if (t4[2]) + _3.ops.pop(); + _3.trys.pop(); + continue; + } + op = body.call(thisArg, _3); + } catch (e5) { + op = [6, e5]; + y4 = 0; + } finally { + f5 = t4 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + __exportStar2 = function(m6, o6) { + for (var p6 in m6) + if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(o6, p6)) + __createBinding2(o6, m6, p6); + }; + __createBinding2 = Object.create ? function(o6, m6, k5, k22) { + if (k22 === void 0) + k22 = k5; + var desc = Object.getOwnPropertyDescriptor(m6, k5); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m6[k5]; + } }; + } + Object.defineProperty(o6, k22, desc); + } : function(o6, m6, k5, k22) { + if (k22 === void 0) + k22 = k5; + o6[k22] = m6[k5]; + }; + __values2 = function(o6) { + var s10 = typeof Symbol === "function" && Symbol.iterator, m6 = s10 && o6[s10], i5 = 0; + if (m6) + return m6.call(o6); + if (o6 && typeof o6.length === "number") + return { + next: function() { + if (o6 && i5 >= o6.length) + o6 = void 0; + return { value: o6 && o6[i5++], done: !o6 }; + } + }; + throw new TypeError(s10 ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read2 = function(o6, n4) { + var m6 = typeof Symbol === "function" && o6[Symbol.iterator]; + if (!m6) + return o6; + var i5 = m6.call(o6), r6, ar = [], e5; + try { + while ((n4 === void 0 || n4-- > 0) && !(r6 = i5.next()).done) + ar.push(r6.value); + } catch (error) { + e5 = { error }; + } finally { + try { + if (r6 && !r6.done && (m6 = i5["return"])) + m6.call(i5); + } finally { + if (e5) + throw e5.error; + } + } + return ar; + }; + __spread2 = function() { + for (var ar = [], i5 = 0; i5 < arguments.length; i5++) + ar = ar.concat(__read2(arguments[i5])); + return ar; + }; + __spreadArrays2 = function() { + for (var s10 = 0, i5 = 0, il = arguments.length; i5 < il; i5++) + s10 += arguments[i5].length; + for (var r6 = Array(s10), k5 = 0, i5 = 0; i5 < il; i5++) + for (var a6 = arguments[i5], j5 = 0, jl = a6.length; j5 < jl; j5++, k5++) + r6[k5] = a6[j5]; + return r6; + }; + __spreadArray2 = function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i5 = 0, l4 = from.length, ar; i5 < l4; i5++) { + if (ar || !(i5 in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i5); + ar[i5] = from[i5]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + __await2 = function(v3) { + return this instanceof __await2 ? (this.v = v3, this) : new __await2(v3); + }; + __asyncGenerator2 = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g4 = generator.apply(thisArg, _arguments || []), i5, q4 = []; + return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5; + function verb(n4) { + if (g4[n4]) + i5[n4] = function(v3) { + return new Promise(function(a6, b4) { + q4.push([n4, v3, a6, b4]) > 1 || resume(n4, v3); + }); + }; + } + function resume(n4, v3) { + try { + step(g4[n4](v3)); + } catch (e5) { + settle(q4[0][3], e5); + } + } + function step(r6) { + r6.value instanceof __await2 ? Promise.resolve(r6.value.v).then(fulfill, reject) : settle(q4[0][2], r6); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f5, v3) { + if (f5(v3), q4.shift(), q4.length) + resume(q4[0][0], q4[0][1]); + } + }; + __asyncDelegator2 = function(o6) { + var i5, p6; + return i5 = {}, verb("next"), verb("throw", function(e5) { + throw e5; + }), verb("return"), i5[Symbol.iterator] = function() { + return this; + }, i5; + function verb(n4, f5) { + i5[n4] = o6[n4] ? function(v3) { + return (p6 = !p6) ? { value: __await2(o6[n4](v3)), done: n4 === "return" } : f5 ? f5(v3) : v3; + } : f5; + } + }; + __asyncValues2 = function(o6) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m6 = o6[Symbol.asyncIterator], i5; + return m6 ? m6.call(o6) : (o6 = typeof __values2 === "function" ? __values2(o6) : o6[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5); + function verb(n4) { + i5[n4] = o6[n4] && function(v3) { + return new Promise(function(resolve, reject) { + v3 = o6[n4](v3), settle(resolve, reject, v3.done, v3.value); + }); + }; + } + function settle(resolve, reject, d5, v3) { + Promise.resolve(v3).then(function(v4) { + resolve({ value: v4, done: d5 }); + }, reject); + } + }; + __makeTemplateObject2 = function(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + }; + var __setModuleDefault = Object.create ? function(o6, v3) { + Object.defineProperty(o6, "default", { enumerable: true, value: v3 }); + } : function(o6, v3) { + o6["default"] = v3; + }; + __importStar2 = function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k5 in mod) + if (k5 !== "default" && Object.prototype.hasOwnProperty.call(mod, k5)) + __createBinding2(result, mod, k5); + } + __setModuleDefault(result, mod); + return result; + }; + __importDefault2 = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet2 = function(receiver, state, kind, f5) { + if (kind === "a" && !f5) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state.get(receiver); + }; + __classPrivateFieldSet2 = function(receiver, state, value, kind, f5) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f5) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f5 : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state.set(receiver, value), value; + }; + __classPrivateFieldIn2 = function(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") + throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + exporter("__extends", __extends2); + exporter("__assign", __assign2); + exporter("__rest", __rest2); + exporter("__decorate", __decorate2); + exporter("__param", __param2); + exporter("__metadata", __metadata2); + exporter("__awaiter", __awaiter2); + exporter("__generator", __generator2); + exporter("__exportStar", __exportStar2); + exporter("__createBinding", __createBinding2); + exporter("__values", __values2); + exporter("__read", __read2); + exporter("__spread", __spread2); + exporter("__spreadArrays", __spreadArrays2); + exporter("__spreadArray", __spreadArray2); + exporter("__await", __await2); + exporter("__asyncGenerator", __asyncGenerator2); + exporter("__asyncDelegator", __asyncDelegator2); + exporter("__asyncValues", __asyncValues2); + exporter("__makeTemplateObject", __makeTemplateObject2); + exporter("__importStar", __importStar2); + exporter("__importDefault", __importDefault2); + exporter("__classPrivateFieldGet", __classPrivateFieldGet2); + exporter("__classPrivateFieldSet", __classPrivateFieldSet2); + exporter("__classPrivateFieldIn", __classPrivateFieldIn2); + }); + } +}); + +// node_modules/dayjs/plugin/relativeTime.js +var require_relativeTime = __commonJS({ + "node_modules/dayjs/plugin/relativeTime.js"(exports, module2) { + !function(r6, e5) { + typeof exports == "object" && typeof module2 != "undefined" ? module2.exports = e5() : typeof define == "function" && define.amd ? define(e5) : (r6 = typeof globalThis != "undefined" ? globalThis : r6 || self).dayjs_plugin_relativeTime = e5(); + }(exports, function() { + "use strict"; + return function(r6, e5, t4) { + r6 = r6 || {}; + var n4 = e5.prototype, o6 = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" }; + function i5(r7, e6, t5, o7) { + return n4.fromToBase(r7, e6, t5, o7); + } + t4.en.relativeTime = o6, n4.fromToBase = function(e6, n5, i6, d6, u6) { + for (var f5, a6, s10, l4 = i6.$locale().relativeTime || o6, h5 = r6.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m6 = h5.length, c3 = 0; c3 < m6; c3 += 1) { + var y4 = h5[c3]; + y4.d && (f5 = d6 ? t4(e6).diff(i6, y4.d, true) : i6.diff(e6, y4.d, true)); + var p6 = (r6.rounding || Math.round)(Math.abs(f5)); + if (s10 = f5 > 0, p6 <= y4.r || !y4.r) { + p6 <= 1 && c3 > 0 && (y4 = h5[c3 - 1]); + var v3 = l4[y4.l]; + u6 && (p6 = u6("" + p6)), a6 = typeof v3 == "string" ? v3.replace("%d", p6) : v3(p6, n5, y4.l, s10); + break; + } + } + if (n5) + return a6; + var M4 = s10 ? l4.future : l4.past; + return typeof M4 == "function" ? M4(a6) : M4.replace("%s", a6); + }, n4.to = function(r7, e6) { + return i5(r7, e6, this, true); + }, n4.from = function(r7, e6) { + return i5(r7, e6, this); + }; + var d5 = function(r7) { + return r7.$u ? t4.utc() : t4(); + }; + n4.toNow = function(r7) { + return this.to(d5(this), r7); + }, n4.fromNow = function(r7) { + return this.from(d5(this), r7); + }; + }; + }); + } +}); + +// node_modules/classnames/index.js +var require_classnames = __commonJS({ + "node_modules/classnames/index.js"(exports, module2) { + (function() { + "use strict"; + var hasOwn = {}.hasOwnProperty; + var nativeCodeString = "[native code]"; + function classNames3() { + var classes = []; + for (var i5 = 0; i5 < arguments.length; i5++) { + var arg = arguments[i5]; + if (!arg) + continue; + var argType = typeof arg; + if (argType === "string" || argType === "number") { + classes.push(arg); + } else if (Array.isArray(arg)) { + if (arg.length) { + var inner = classNames3.apply(null, arg); + if (inner) { + classes.push(inner); + } + } + } else if (argType === "object") { + if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) { + classes.push(arg.toString()); + continue; + } + for (var key2 in arg) { + if (hasOwn.call(arg, key2) && arg[key2]) { + classes.push(key2); + } + } + } + } + return classes.join(" "); + } + if (typeof module2 !== "undefined" && module2.exports) { + classNames3.default = classNames3; + module2.exports = classNames3; + } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) { + define("classnames", [], function() { + return classNames3; + }); + } else { + window.classNames = classNames3; + } + })(); + } +}); + +// node_modules/react-fast-compare/index.js +var require_react_fast_compare = __commonJS({ + "node_modules/react-fast-compare/index.js"(exports, module2) { + var hasElementType = typeof Element !== "undefined"; + var hasMap = typeof Map === "function"; + var hasSet = typeof Set === "function"; + var hasArrayBuffer = typeof ArrayBuffer === "function" && !!ArrayBuffer.isView; + function equal(a6, b4) { + if (a6 === b4) + return true; + if (a6 && b4 && typeof a6 == "object" && typeof b4 == "object") { + if (a6.constructor !== b4.constructor) + return false; + var length, i5, keys; + if (Array.isArray(a6)) { + length = a6.length; + if (length != b4.length) + return false; + for (i5 = length; i5-- !== 0; ) + if (!equal(a6[i5], b4[i5])) + return false; + return true; + } + var it; + if (hasMap && a6 instanceof Map && b4 instanceof Map) { + if (a6.size !== b4.size) + return false; + it = a6.entries(); + while (!(i5 = it.next()).done) + if (!b4.has(i5.value[0])) + return false; + it = a6.entries(); + while (!(i5 = it.next()).done) + if (!equal(i5.value[1], b4.get(i5.value[0]))) + return false; + return true; + } + if (hasSet && a6 instanceof Set && b4 instanceof Set) { + if (a6.size !== b4.size) + return false; + it = a6.entries(); + while (!(i5 = it.next()).done) + if (!b4.has(i5.value[0])) + return false; + return true; + } + if (hasArrayBuffer && ArrayBuffer.isView(a6) && ArrayBuffer.isView(b4)) { + length = a6.length; + if (length != b4.length) + return false; + for (i5 = length; i5-- !== 0; ) + if (a6[i5] !== b4[i5]) + return false; + return true; + } + if (a6.constructor === RegExp) + return a6.source === b4.source && a6.flags === b4.flags; + if (a6.valueOf !== Object.prototype.valueOf) + return a6.valueOf() === b4.valueOf(); + if (a6.toString !== Object.prototype.toString) + return a6.toString() === b4.toString(); + keys = Object.keys(a6); + length = keys.length; + if (length !== Object.keys(b4).length) + return false; + for (i5 = length; i5-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b4, keys[i5])) + return false; + if (hasElementType && a6 instanceof Element) + return false; + for (i5 = length; i5-- !== 0; ) { + if ((keys[i5] === "_owner" || keys[i5] === "__v" || keys[i5] === "__o") && a6.$$typeof) { + continue; + } + if (!equal(a6[keys[i5]], b4[keys[i5]])) + return false; + } + return true; + } + return a6 !== a6 && b4 !== b4; + } + module2.exports = function isEqual2(a6, b4) { + try { + return equal(a6, b4); + } catch (error) { + if ((error.message || "").match(/stack|recursion/i)) { + console.warn("react-fast-compare cannot handle circular refs"); + return false; + } + throw error; + } + }; + } +}); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + default: () => MakeMDPlugin +}); +module.exports = __toCommonJS(main_exports); +var import_obsidian12 = require("obsidian"); + +// src/components/Sidebar/FileTreeView.tsx +var import_obsidian8 = require("obsidian"); + +// node_modules/preact/dist/preact.module.js +var n; +var l; +var u; +var i; +var t; +var o; +var r; +var f = {}; +var e = []; +var c = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; +function s(n4, l4) { + for (var u6 in l4) + n4[u6] = l4[u6]; + return n4; +} +function a(n4) { + var l4 = n4.parentNode; + l4 && l4.removeChild(n4); +} +function h(l4, u6, i5) { + var t4, o6, r6, f5 = {}; + for (r6 in u6) + r6 == "key" ? t4 = u6[r6] : r6 == "ref" ? o6 = u6[r6] : f5[r6] = u6[r6]; + if (arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : i5), typeof l4 == "function" && l4.defaultProps != null) + for (r6 in l4.defaultProps) + f5[r6] === void 0 && (f5[r6] = l4.defaultProps[r6]); + return v(l4, f5, t4, o6, null); +} +function v(n4, i5, t4, o6, r6) { + var f5 = { type: n4, props: i5, key: t4, ref: o6, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: r6 == null ? ++u : r6 }; + return r6 == null && l.vnode != null && l.vnode(f5), f5; +} +function y() { + return { current: null }; +} +function p(n4) { + return n4.children; +} +function d(n4, l4) { + this.props = n4, this.context = l4; +} +function _(n4, l4) { + if (l4 == null) + return n4.__ ? _(n4.__, n4.__.__k.indexOf(n4) + 1) : null; + for (var u6; l4 < n4.__k.length; l4++) + if ((u6 = n4.__k[l4]) != null && u6.__e != null) + return u6.__e; + return typeof n4.type == "function" ? _(n4) : null; +} +function k(n4) { + var l4, u6; + if ((n4 = n4.__) != null && n4.__c != null) { + for (n4.__e = n4.__c.base = null, l4 = 0; l4 < n4.__k.length; l4++) + if ((u6 = n4.__k[l4]) != null && u6.__e != null) { + n4.__e = n4.__c.base = u6.__e; + break; + } + return k(n4); + } +} +function b(n4) { + (!n4.__d && (n4.__d = true) && t.push(n4) && !g.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || setTimeout)(g); +} +function g() { + for (var n4; g.__r = t.length; ) + n4 = t.sort(function(n5, l4) { + return n5.__v.__b - l4.__v.__b; + }), t = [], n4.some(function(n5) { + var l4, u6, i5, t4, o6, r6; + n5.__d && (o6 = (t4 = (l4 = n5).__v).__e, (r6 = l4.__P) && (u6 = [], (i5 = s({}, t4)).__v = t4.__v + 1, j(r6, t4, i5, l4.__n, r6.ownerSVGElement !== void 0, t4.__h != null ? [o6] : null, u6, o6 == null ? _(t4) : o6, t4.__h), z(u6, t4), t4.__e != o6 && k(t4))); + }); +} +function w(n4, l4, u6, i5, t4, o6, r6, c3, s10, a6) { + var h5, y4, d5, k5, b4, g4, w7, x5 = i5 && i5.__k || e, C5 = x5.length; + for (u6.__k = [], h5 = 0; h5 < l4.length; h5++) + if ((k5 = u6.__k[h5] = (k5 = l4[h5]) == null || typeof k5 == "boolean" ? null : typeof k5 == "string" || typeof k5 == "number" || typeof k5 == "bigint" ? v(null, k5, null, null, k5) : Array.isArray(k5) ? v(p, { children: k5 }, null, null, null) : k5.__b > 0 ? v(k5.type, k5.props, k5.key, k5.ref ? k5.ref : null, k5.__v) : k5) != null) { + if (k5.__ = u6, k5.__b = u6.__b + 1, (d5 = x5[h5]) === null || d5 && k5.key == d5.key && k5.type === d5.type) + x5[h5] = void 0; + else + for (y4 = 0; y4 < C5; y4++) { + if ((d5 = x5[y4]) && k5.key == d5.key && k5.type === d5.type) { + x5[y4] = void 0; + break; + } + d5 = null; + } + j(n4, k5, d5 = d5 || f, t4, o6, r6, c3, s10, a6), b4 = k5.__e, (y4 = k5.ref) && d5.ref != y4 && (w7 || (w7 = []), d5.ref && w7.push(d5.ref, null, k5), w7.push(y4, k5.__c || b4, k5)), b4 != null ? (g4 == null && (g4 = b4), typeof k5.type == "function" && k5.__k === d5.__k ? k5.__d = s10 = m(k5, s10, n4) : s10 = A(n4, k5, d5, x5, b4, s10), typeof u6.type == "function" && (u6.__d = s10)) : s10 && d5.__e == s10 && s10.parentNode != n4 && (s10 = _(d5)); + } + for (u6.__e = g4, h5 = C5; h5--; ) + x5[h5] != null && N(x5[h5], x5[h5]); + if (w7) + for (h5 = 0; h5 < w7.length; h5++) + M(w7[h5], w7[++h5], w7[++h5]); +} +function m(n4, l4, u6) { + for (var i5, t4 = n4.__k, o6 = 0; t4 && o6 < t4.length; o6++) + (i5 = t4[o6]) && (i5.__ = n4, l4 = typeof i5.type == "function" ? m(i5, l4, u6) : A(u6, i5, i5, t4, i5.__e, l4)); + return l4; +} +function x(n4, l4) { + return l4 = l4 || [], n4 == null || typeof n4 == "boolean" || (Array.isArray(n4) ? n4.some(function(n5) { + x(n5, l4); + }) : l4.push(n4)), l4; +} +function A(n4, l4, u6, i5, t4, o6) { + var r6, f5, e5; + if (l4.__d !== void 0) + r6 = l4.__d, l4.__d = void 0; + else if (u6 == null || t4 != o6 || t4.parentNode == null) + n: + if (o6 == null || o6.parentNode !== n4) + n4.appendChild(t4), r6 = null; + else { + for (f5 = o6, e5 = 0; (f5 = f5.nextSibling) && e5 < i5.length; e5 += 2) + if (f5 == t4) + break n; + n4.insertBefore(t4, o6), r6 = o6; + } + return r6 !== void 0 ? r6 : t4.nextSibling; +} +function C(n4, l4, u6, i5, t4) { + var o6; + for (o6 in u6) + o6 === "children" || o6 === "key" || o6 in l4 || H(n4, o6, null, u6[o6], i5); + for (o6 in l4) + t4 && typeof l4[o6] != "function" || o6 === "children" || o6 === "key" || o6 === "value" || o6 === "checked" || u6[o6] === l4[o6] || H(n4, o6, l4[o6], u6[o6], i5); +} +function $(n4, l4, u6) { + l4[0] === "-" ? n4.setProperty(l4, u6) : n4[l4] = u6 == null ? "" : typeof u6 != "number" || c.test(l4) ? u6 : u6 + "px"; +} +function H(n4, l4, u6, i5, t4) { + var o6; + n: + if (l4 === "style") + if (typeof u6 == "string") + n4.style.cssText = u6; + else { + if (typeof i5 == "string" && (n4.style.cssText = i5 = ""), i5) + for (l4 in i5) + u6 && l4 in u6 || $(n4.style, l4, ""); + if (u6) + for (l4 in u6) + i5 && u6[l4] === i5[l4] || $(n4.style, l4, u6[l4]); + } + else if (l4[0] === "o" && l4[1] === "n") + o6 = l4 !== (l4 = l4.replace(/Capture$/, "")), l4 = l4.toLowerCase() in n4 ? l4.toLowerCase().slice(2) : l4.slice(2), n4.l || (n4.l = {}), n4.l[l4 + o6] = u6, u6 ? i5 || n4.addEventListener(l4, o6 ? T : I, o6) : n4.removeEventListener(l4, o6 ? T : I, o6); + else if (l4 !== "dangerouslySetInnerHTML") { + if (t4) + l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); + else if (l4 !== "href" && l4 !== "list" && l4 !== "form" && l4 !== "tabIndex" && l4 !== "download" && l4 in n4) + try { + n4[l4] = u6 == null ? "" : u6; + break n; + } catch (n5) { + } + typeof u6 == "function" || (u6 == null || u6 === false && l4.indexOf("-") == -1 ? n4.removeAttribute(l4) : n4.setAttribute(l4, u6)); + } +} +function I(n4) { + this.l[n4.type + false](l.event ? l.event(n4) : n4); +} +function T(n4) { + this.l[n4.type + true](l.event ? l.event(n4) : n4); +} +function j(n4, u6, i5, t4, o6, r6, f5, e5, c3) { + var a6, h5, v3, y4, _3, k5, b4, g4, m6, x5, A4, C5, $4, H4, I5, T8 = u6.type; + if (u6.constructor !== void 0) + return null; + i5.__h != null && (c3 = i5.__h, e5 = u6.__e = i5.__e, u6.__h = null, r6 = [e5]), (a6 = l.__b) && a6(u6); + try { + n: + if (typeof T8 == "function") { + if (g4 = u6.props, m6 = (a6 = T8.contextType) && t4[a6.__c], x5 = a6 ? m6 ? m6.props.value : a6.__ : t4, i5.__c ? b4 = (h5 = u6.__c = i5.__c).__ = h5.__E : ("prototype" in T8 && T8.prototype.render ? u6.__c = h5 = new T8(g4, x5) : (u6.__c = h5 = new d(g4, x5), h5.constructor = T8, h5.render = O), m6 && m6.sub(h5), h5.props = g4, h5.state || (h5.state = {}), h5.context = x5, h5.__n = t4, v3 = h5.__d = true, h5.__h = [], h5._sb = []), h5.__s == null && (h5.__s = h5.state), T8.getDerivedStateFromProps != null && (h5.__s == h5.state && (h5.__s = s({}, h5.__s)), s(h5.__s, T8.getDerivedStateFromProps(g4, h5.__s))), y4 = h5.props, _3 = h5.state, v3) + T8.getDerivedStateFromProps == null && h5.componentWillMount != null && h5.componentWillMount(), h5.componentDidMount != null && h5.__h.push(h5.componentDidMount); + else { + if (T8.getDerivedStateFromProps == null && g4 !== y4 && h5.componentWillReceiveProps != null && h5.componentWillReceiveProps(g4, x5), !h5.__e && h5.shouldComponentUpdate != null && h5.shouldComponentUpdate(g4, h5.__s, x5) === false || u6.__v === i5.__v) { + for (h5.props = g4, h5.state = h5.__s, u6.__v !== i5.__v && (h5.__d = false), h5.__v = u6, u6.__e = i5.__e, u6.__k = i5.__k, u6.__k.forEach(function(n5) { + n5 && (n5.__ = u6); + }), A4 = 0; A4 < h5._sb.length; A4++) + h5.__h.push(h5._sb[A4]); + h5._sb = [], h5.__h.length && f5.push(h5); + break n; + } + h5.componentWillUpdate != null && h5.componentWillUpdate(g4, h5.__s, x5), h5.componentDidUpdate != null && h5.__h.push(function() { + h5.componentDidUpdate(y4, _3, k5); + }); + } + if (h5.context = x5, h5.props = g4, h5.__v = u6, h5.__P = n4, C5 = l.__r, $4 = 0, "prototype" in T8 && T8.prototype.render) { + for (h5.state = h5.__s, h5.__d = false, C5 && C5(u6), a6 = h5.render(h5.props, h5.state, h5.context), H4 = 0; H4 < h5._sb.length; H4++) + h5.__h.push(h5._sb[H4]); + h5._sb = []; + } else + do { + h5.__d = false, C5 && C5(u6), a6 = h5.render(h5.props, h5.state, h5.context), h5.state = h5.__s; + } while (h5.__d && ++$4 < 25); + h5.state = h5.__s, h5.getChildContext != null && (t4 = s(s({}, t4), h5.getChildContext())), v3 || h5.getSnapshotBeforeUpdate == null || (k5 = h5.getSnapshotBeforeUpdate(y4, _3)), I5 = a6 != null && a6.type === p && a6.key == null ? a6.props.children : a6, w(n4, Array.isArray(I5) ? I5 : [I5], u6, i5, t4, o6, r6, f5, e5, c3), h5.base = u6.__e, u6.__h = null, h5.__h.length && f5.push(h5), b4 && (h5.__E = h5.__ = null), h5.__e = false; + } else + r6 == null && u6.__v === i5.__v ? (u6.__k = i5.__k, u6.__e = i5.__e) : u6.__e = L(i5.__e, u6, i5, t4, o6, r6, f5, c3); + (a6 = l.diffed) && a6(u6); + } catch (n5) { + u6.__v = null, (c3 || r6 != null) && (u6.__e = e5, u6.__h = !!c3, r6[r6.indexOf(e5)] = null), l.__e(n5, u6, i5); + } +} +function z(n4, u6) { + l.__c && l.__c(u6, n4), n4.some(function(u7) { + try { + n4 = u7.__h, u7.__h = [], n4.some(function(n5) { + n5.call(u7); + }); + } catch (n5) { + l.__e(n5, u7.__v); + } + }); +} +function L(l4, u6, i5, t4, o6, r6, e5, c3) { + var s10, h5, v3, y4 = i5.props, p6 = u6.props, d5 = u6.type, k5 = 0; + if (d5 === "svg" && (o6 = true), r6 != null) { + for (; k5 < r6.length; k5++) + if ((s10 = r6[k5]) && "setAttribute" in s10 == !!d5 && (d5 ? s10.localName === d5 : s10.nodeType === 3)) { + l4 = s10, r6[k5] = null; + break; + } + } + if (l4 == null) { + if (d5 === null) + return document.createTextNode(p6); + l4 = o6 ? document.createElementNS("http://www.w3.org/2000/svg", d5) : document.createElement(d5, p6.is && p6), r6 = null, c3 = false; + } + if (d5 === null) + y4 === p6 || c3 && l4.data === p6 || (l4.data = p6); + else { + if (r6 = r6 && n.call(l4.childNodes), h5 = (y4 = i5.props || f).dangerouslySetInnerHTML, v3 = p6.dangerouslySetInnerHTML, !c3) { + if (r6 != null) + for (y4 = {}, k5 = 0; k5 < l4.attributes.length; k5++) + y4[l4.attributes[k5].name] = l4.attributes[k5].value; + (v3 || h5) && (v3 && (h5 && v3.__html == h5.__html || v3.__html === l4.innerHTML) || (l4.innerHTML = v3 && v3.__html || "")); + } + if (C(l4, p6, y4, o6, c3), v3) + u6.__k = []; + else if (k5 = u6.props.children, w(l4, Array.isArray(k5) ? k5 : [k5], u6, i5, t4, o6 && d5 !== "foreignObject", r6, e5, r6 ? r6[0] : i5.__k && _(i5, 0), c3), r6 != null) + for (k5 = r6.length; k5--; ) + r6[k5] != null && a(r6[k5]); + c3 || ("value" in p6 && (k5 = p6.value) !== void 0 && (k5 !== l4.value || d5 === "progress" && !k5 || d5 === "option" && k5 !== y4.value) && H(l4, "value", k5, y4.value, false), "checked" in p6 && (k5 = p6.checked) !== void 0 && k5 !== l4.checked && H(l4, "checked", k5, y4.checked, false)); + } + return l4; +} +function M(n4, u6, i5) { + try { + typeof n4 == "function" ? n4(u6) : n4.current = u6; + } catch (n5) { + l.__e(n5, i5); + } +} +function N(n4, u6, i5) { + var t4, o6; + if (l.unmount && l.unmount(n4), (t4 = n4.ref) && (t4.current && t4.current !== n4.__e || M(t4, null, u6)), (t4 = n4.__c) != null) { + if (t4.componentWillUnmount) + try { + t4.componentWillUnmount(); + } catch (n5) { + l.__e(n5, u6); + } + t4.base = t4.__P = null, n4.__c = void 0; + } + if (t4 = n4.__k) + for (o6 = 0; o6 < t4.length; o6++) + t4[o6] && N(t4[o6], u6, i5 || typeof n4.type != "function"); + i5 || n4.__e == null || a(n4.__e), n4.__ = n4.__e = n4.__d = void 0; +} +function O(n4, l4, u6) { + return this.constructor(n4, u6); +} +function P(u6, i5, t4) { + var o6, r6, e5; + l.__ && l.__(u6, i5), r6 = (o6 = typeof t4 == "function") ? null : t4 && t4.__k || i5.__k, e5 = [], j(i5, u6 = (!o6 && t4 || i5).__k = h(p, null, [u6]), r6 || f, f, i5.ownerSVGElement !== void 0, !o6 && t4 ? [t4] : r6 ? null : i5.firstChild ? n.call(i5.childNodes) : null, e5, !o6 && t4 ? t4 : r6 ? r6.__e : i5.firstChild, o6), z(e5, u6); +} +function S(n4, l4) { + P(n4, l4, S); +} +function q(l4, u6, i5) { + var t4, o6, r6, f5 = s({}, l4.props); + for (r6 in u6) + r6 == "key" ? t4 = u6[r6] : r6 == "ref" ? o6 = u6[r6] : f5[r6] = u6[r6]; + return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : i5), v(l4.type, f5, t4 || l4.key, o6 || l4.ref, null); +} +function B(n4, l4) { + var u6 = { __c: l4 = "__cC" + r++, __: n4, Consumer: function(n5, l5) { + return n5.children(l5); + }, Provider: function(n5) { + var u7, i5; + return this.getChildContext || (u7 = [], (i5 = {})[l4] = this, this.getChildContext = function() { + return i5; + }, this.shouldComponentUpdate = function(n6) { + this.props.value !== n6.value && u7.some(b); + }, this.sub = function(n6) { + u7.push(n6); + var l5 = n6.componentWillUnmount; + n6.componentWillUnmount = function() { + u7.splice(u7.indexOf(n6), 1), l5 && l5.call(n6); + }; + }), n5.children; + } }; + return u6.Provider.__ = u6.Consumer.contextType = u6; +} +n = e.slice, l = { __e: function(n4, l4, u6, i5) { + for (var t4, o6, r6; l4 = l4.__; ) + if ((t4 = l4.__c) && !t4.__) + try { + if ((o6 = t4.constructor) && o6.getDerivedStateFromError != null && (t4.setState(o6.getDerivedStateFromError(n4)), r6 = t4.__d), t4.componentDidCatch != null && (t4.componentDidCatch(n4, i5 || {}), r6 = t4.__d), r6) + return t4.__E = t4; + } catch (l5) { + n4 = l5; + } + throw n4; +} }, u = 0, i = function(n4) { + return n4 != null && n4.constructor === void 0; +}, d.prototype.setState = function(n4, l4) { + var u6; + u6 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = s({}, this.state), typeof n4 == "function" && (n4 = n4(s({}, u6), this.props)), n4 && s(u6, n4), n4 != null && this.__v && (l4 && this._sb.push(l4), b(this)); +}, d.prototype.forceUpdate = function(n4) { + this.__v && (this.__e = true, n4 && this.__h.push(n4), b(this)); +}, d.prototype.render = p, t = [], g.__r = 0, r = 0; + +// node_modules/preact/hooks/dist/hooks.module.js +var t2; +var r2; +var u2; +var i2; +var o2 = 0; +var f2 = []; +var c2 = []; +var e2 = l.__b; +var a2 = l.__r; +var v2 = l.diffed; +var l2 = l.__c; +var m2 = l.unmount; +function d2(t4, u6) { + l.__h && l.__h(r2, t4, o2 || u6), o2 = 0; + var i5 = r2.__H || (r2.__H = { __: [], __h: [] }); + return t4 >= i5.__.length && i5.__.push({ __V: c2 }), i5.__[t4]; +} +function p2(n4) { + return o2 = 1, y2(B2, n4); +} +function y2(n4, u6, i5) { + var o6 = d2(t2++, 2); + if (o6.t = n4, !o6.__c && (o6.__ = [i5 ? i5(u6) : B2(void 0, u6), function(n5) { + var t4 = o6.__N ? o6.__N[0] : o6.__[0], r6 = o6.t(t4, n5); + t4 !== r6 && (o6.__N = [r6, o6.__[1]], o6.__c.setState({})); + }], o6.__c = r2, !r2.u)) { + r2.u = true; + var f5 = r2.shouldComponentUpdate; + r2.shouldComponentUpdate = function(n5, t4, r6) { + if (!o6.__c.__H) + return true; + var u7 = o6.__c.__H.__.filter(function(n6) { + return n6.__c; + }); + if (u7.every(function(n6) { + return !n6.__N; + })) + return !f5 || f5.call(this, n5, t4, r6); + var i6 = false; + return u7.forEach(function(n6) { + if (n6.__N) { + var t5 = n6.__[0]; + n6.__ = n6.__N, n6.__N = void 0, t5 !== n6.__[0] && (i6 = true); + } + }), !(!i6 && o6.__c.props === n5) && (!f5 || f5.call(this, n5, t4, r6)); + }; + } + return o6.__N || o6.__; +} +function h2(u6, i5) { + var o6 = d2(t2++, 3); + !l.__s && z2(o6.__H, i5) && (o6.__ = u6, o6.i = i5, r2.__H.__h.push(o6)); +} +function s2(u6, i5) { + var o6 = d2(t2++, 4); + !l.__s && z2(o6.__H, i5) && (o6.__ = u6, o6.i = i5, r2.__h.push(o6)); +} +function _2(n4) { + return o2 = 5, F(function() { + return { current: n4 }; + }, []); +} +function A2(n4, t4, r6) { + o2 = 6, s2(function() { + return typeof n4 == "function" ? (n4(t4()), function() { + return n4(null); + }) : n4 ? (n4.current = t4(), function() { + return n4.current = null; + }) : void 0; + }, r6 == null ? r6 : r6.concat(n4)); +} +function F(n4, r6) { + var u6 = d2(t2++, 7); + return z2(u6.__H, r6) ? (u6.__V = n4(), u6.i = r6, u6.__h = n4, u6.__V) : u6.__; +} +function T2(n4, t4) { + return o2 = 8, F(function() { + return n4; + }, t4); +} +function q2(n4) { + var u6 = r2.context[n4.__c], i5 = d2(t2++, 9); + return i5.c = n4, u6 ? (i5.__ == null && (i5.__ = true, u6.sub(r2)), u6.props.value) : n4.__; +} +function x2(t4, r6) { + l.useDebugValue && l.useDebugValue(r6 ? r6(t4) : t4); +} +function V() { + var n4 = d2(t2++, 11); + return n4.__ || (n4.__ = "P" + function(n5) { + for (var t4 = 0, r6 = n5.length; r6 > 0; ) + t4 = (t4 << 5) - t4 + n5.charCodeAt(--r6) | 0; + return t4; + }(r2.__v.__m) + t2), n4.__; +} +function b2() { + for (var t4; t4 = f2.shift(); ) + if (t4.__P && t4.__H) + try { + t4.__H.__h.forEach(k2), t4.__H.__h.forEach(w2), t4.__H.__h = []; + } catch (r6) { + t4.__H.__h = [], l.__e(r6, t4.__v); + } +} +l.__b = function(n4) { + typeof n4.type != "function" || n4.__m || n4.__ === null ? n4.__m || (n4.__m = n4.__ && n4.__.__m ? n4.__.__m : "") : n4.__m = (n4.__ && n4.__.__m ? n4.__.__m : "") + (n4.__ && n4.__.__k ? n4.__.__k.indexOf(n4) : 0), r2 = null, e2 && e2(n4); +}, l.__r = function(n4) { + a2 && a2(n4), t2 = 0; + var i5 = (r2 = n4.__c).__H; + i5 && (u2 === r2 ? (i5.__h = [], r2.__h = [], i5.__.forEach(function(n5) { + n5.__N && (n5.__ = n5.__N), n5.__V = c2, n5.__N = n5.i = void 0; + })) : (i5.__h.forEach(k2), i5.__h.forEach(w2), i5.__h = [])), u2 = r2; +}, l.diffed = function(t4) { + v2 && v2(t4); + var o6 = t4.__c; + o6 && o6.__H && (o6.__H.__h.length && (f2.push(o6) !== 1 && i2 === l.requestAnimationFrame || ((i2 = l.requestAnimationFrame) || j2)(b2)), o6.__H.__.forEach(function(n4) { + n4.i && (n4.__H = n4.i), n4.__V !== c2 && (n4.__ = n4.__V), n4.i = void 0, n4.__V = c2; + })), u2 = r2 = null; +}, l.__c = function(t4, r6) { + r6.some(function(t5) { + try { + t5.__h.forEach(k2), t5.__h = t5.__h.filter(function(n4) { + return !n4.__ || w2(n4); + }); + } catch (u6) { + r6.some(function(n4) { + n4.__h && (n4.__h = []); + }), r6 = [], l.__e(u6, t5.__v); + } + }), l2 && l2(t4, r6); +}, l.unmount = function(t4) { + m2 && m2(t4); + var r6, u6 = t4.__c; + u6 && u6.__H && (u6.__H.__.forEach(function(n4) { + try { + k2(n4); + } catch (n5) { + r6 = n5; + } + }), u6.__H = void 0, r6 && l.__e(r6, u6.__v)); +}; +var g2 = typeof requestAnimationFrame == "function"; +function j2(n4) { + var t4, r6 = function() { + clearTimeout(u6), g2 && cancelAnimationFrame(t4), setTimeout(n4); + }, u6 = setTimeout(r6, 100); + g2 && (t4 = requestAnimationFrame(r6)); +} +function k2(n4) { + var t4 = r2, u6 = n4.__c; + typeof u6 == "function" && (n4.__c = void 0, u6()), r2 = t4; +} +function w2(n4) { + var t4 = r2; + n4.__c = n4.__(), r2 = t4; +} +function z2(n4, t4) { + return !n4 || n4.length !== t4.length || t4.some(function(t5, r6) { + return t5 !== n4[r6]; + }); +} +function B2(n4, t4) { + return typeof t4 == "function" ? t4(n4) : t4; +} + +// node_modules/preact/compat/dist/compat.module.js +function g3(n4, t4) { + for (var e5 in t4) + n4[e5] = t4[e5]; + return n4; +} +function C2(n4, t4) { + for (var e5 in n4) + if (e5 !== "__source" && !(e5 in t4)) + return true; + for (var r6 in t4) + if (r6 !== "__source" && n4[r6] !== t4[r6]) + return true; + return false; +} +function E(n4) { + this.props = n4; +} +function w3(n4, e5) { + function r6(n5) { + var t4 = this.props.ref, r7 = t4 == n5.ref; + return !r7 && t4 && (t4.call ? t4(null) : t4.current = null), e5 ? !e5(this.props, n5) || !r7 : C2(this.props, n5); + } + function u6(e6) { + return this.shouldComponentUpdate = r6, h(n4, e6); + } + return u6.displayName = "Memo(" + (n4.displayName || n4.name) + ")", u6.prototype.isReactComponent = true, u6.__f = true, u6; +} +(E.prototype = new d()).isPureReactComponent = true, E.prototype.shouldComponentUpdate = function(n4, t4) { + return C2(this.props, n4) || C2(this.state, t4); +}; +var R = l.__b; +l.__b = function(n4) { + n4.type && n4.type.__f && n4.ref && (n4.props.ref = n4.ref, n4.ref = null), R && R(n4); +}; +var x3 = typeof Symbol != "undefined" && Symbol.for && Symbol.for("react.forward_ref") || 3911; +function N2(n4) { + function t4(t5) { + var e5 = g3({}, t5); + return delete e5.ref, n4(e5, t5.ref || null); + } + return t4.$$typeof = x3, t4.render = t4, t4.prototype.isReactComponent = t4.__f = true, t4.displayName = "ForwardRef(" + (n4.displayName || n4.name) + ")", t4; +} +var k3 = function(n4, t4) { + return n4 == null ? null : x(x(n4).map(t4)); +}; +var A3 = { map: k3, forEach: k3, count: function(n4) { + return n4 ? x(n4).length : 0; +}, only: function(n4) { + var t4 = x(n4); + if (t4.length !== 1) + throw "Children.only"; + return t4[0]; +}, toArray: x }; +var O2 = l.__e; +l.__e = function(n4, t4, e5, r6) { + if (n4.then) { + for (var u6, o6 = t4; o6 = o6.__; ) + if ((u6 = o6.__c) && u6.__c) + return t4.__e == null && (t4.__e = e5.__e, t4.__k = e5.__k), u6.__c(n4, t4); + } + O2(n4, t4, e5, r6); +}; +var T3 = l.unmount; +function I2(n4, t4, e5) { + return n4 && (n4.__c && n4.__c.__H && (n4.__c.__H.__.forEach(function(n5) { + typeof n5.__c == "function" && n5.__c(); + }), n4.__c.__H = null), (n4 = g3({}, n4)).__c != null && (n4.__c.__P === e5 && (n4.__c.__P = t4), n4.__c = null), n4.__k = n4.__k && n4.__k.map(function(n5) { + return I2(n5, t4, e5); + })), n4; +} +function L2(n4, t4, e5) { + return n4 && (n4.__v = null, n4.__k = n4.__k && n4.__k.map(function(n5) { + return L2(n5, t4, e5); + }), n4.__c && n4.__c.__P === t4 && (n4.__e && e5.insertBefore(n4.__e, n4.__d), n4.__c.__e = true, n4.__c.__P = e5)), n4; +} +function U() { + this.__u = 0, this.t = null, this.__b = null; +} +function D(n4) { + var t4 = n4.__.__c; + return t4 && t4.__a && t4.__a(n4); +} +function F2(n4) { + var e5, r6, u6; + function o6(o7) { + if (e5 || (e5 = n4()).then(function(n5) { + r6 = n5.default || n5; + }, function(n5) { + u6 = n5; + }), u6) + throw u6; + if (!r6) + throw e5; + return h(r6, o7); + } + return o6.displayName = "Lazy", o6.__f = true, o6; +} +function M2() { + this.u = null, this.o = null; +} +l.unmount = function(n4) { + var t4 = n4.__c; + t4 && t4.__R && t4.__R(), t4 && n4.__h === true && (n4.type = null), T3 && T3(n4); +}, (U.prototype = new d()).__c = function(n4, t4) { + var e5 = t4.__c, r6 = this; + r6.t == null && (r6.t = []), r6.t.push(e5); + var u6 = D(r6.__v), o6 = false, i5 = function() { + o6 || (o6 = true, e5.__R = null, u6 ? u6(l4) : l4()); + }; + e5.__R = i5; + var l4 = function() { + if (!--r6.__u) { + if (r6.state.__a) { + var n5 = r6.state.__a; + r6.__v.__k[0] = L2(n5, n5.__c.__P, n5.__c.__O); + } + var t5; + for (r6.setState({ __a: r6.__b = null }); t5 = r6.t.pop(); ) + t5.forceUpdate(); + } + }, c3 = t4.__h === true; + r6.__u++ || c3 || r6.setState({ __a: r6.__b = r6.__v.__k[0] }), n4.then(i5, i5); +}, U.prototype.componentWillUnmount = function() { + this.t = []; +}, U.prototype.render = function(n4, e5) { + if (this.__b) { + if (this.__v.__k) { + var r6 = document.createElement("div"), o6 = this.__v.__k[0].__c; + this.__v.__k[0] = I2(this.__b, r6, o6.__O = o6.__P); + } + this.__b = null; + } + var i5 = e5.__a && h(p, null, n4.fallback); + return i5 && (i5.__h = null), [h(p, null, e5.__a ? null : n4.children), i5]; +}; +var V2 = function(n4, t4, e5) { + if (++e5[1] === e5[0] && n4.o.delete(t4), n4.props.revealOrder && (n4.props.revealOrder[0] !== "t" || !n4.o.size)) + for (e5 = n4.u; e5; ) { + for (; e5.length > 3; ) + e5.pop()(); + if (e5[1] < e5[0]) + break; + n4.u = e5 = e5[2]; + } +}; +function W(n4) { + return this.getChildContext = function() { + return n4.context; + }, n4.children; +} +function P2(n4) { + var e5 = this, r6 = n4.i; + e5.componentWillUnmount = function() { + P(null, e5.l), e5.l = null, e5.i = null; + }, e5.i && e5.i !== r6 && e5.componentWillUnmount(), n4.__v ? (e5.l || (e5.i = r6, e5.l = { nodeType: 1, parentNode: r6, childNodes: [], appendChild: function(n5) { + this.childNodes.push(n5), e5.i.appendChild(n5); + }, insertBefore: function(n5, t4) { + this.childNodes.push(n5), e5.i.appendChild(n5); + }, removeChild: function(n5) { + this.childNodes.splice(this.childNodes.indexOf(n5) >>> 1, 1), e5.i.removeChild(n5); + } }), P(h(W, { context: e5.context }, n4.__v), e5.l)) : e5.l && e5.componentWillUnmount(); +} +function $2(n4, e5) { + var r6 = h(P2, { __v: n4, i: e5 }); + return r6.containerInfo = e5, r6; +} +(M2.prototype = new d()).__a = function(n4) { + var t4 = this, e5 = D(t4.__v), r6 = t4.o.get(n4); + return r6[0]++, function(u6) { + var o6 = function() { + t4.props.revealOrder ? (r6.push(u6), V2(t4, n4, r6)) : u6(); + }; + e5 ? e5(o6) : o6(); + }; +}, M2.prototype.render = function(n4) { + this.u = null, this.o = /* @__PURE__ */ new Map(); + var t4 = x(n4.children); + n4.revealOrder && n4.revealOrder[0] === "b" && t4.reverse(); + for (var e5 = t4.length; e5--; ) + this.o.set(t4[e5], this.u = [1, 0, this.u]); + return n4.children; +}, M2.prototype.componentDidUpdate = M2.prototype.componentDidMount = function() { + var n4 = this; + this.o.forEach(function(t4, e5) { + V2(n4, e5, t4); + }); +}; +var j3 = typeof Symbol != "undefined" && Symbol.for && Symbol.for("react.element") || 60103; +var z3 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/; +var B3 = typeof document != "undefined"; +var H2 = function(n4) { + return (typeof Symbol != "undefined" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(n4); +}; +function Z(n4, t4, e5) { + return t4.__k == null && (t4.textContent = ""), P(n4, t4), typeof e5 == "function" && e5(), n4 ? n4.__c : null; +} +function Y(n4, t4, e5) { + return S(n4, t4), typeof e5 == "function" && e5(), n4 ? n4.__c : null; +} +d.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t4) { + Object.defineProperty(d.prototype, t4, { configurable: true, get: function() { + return this["UNSAFE_" + t4]; + }, set: function(n4) { + Object.defineProperty(this, t4, { configurable: true, writable: true, value: n4 }); + } }); +}); +var q3 = l.event; +function G() { +} +function J() { + return this.cancelBubble; +} +function K() { + return this.defaultPrevented; +} +l.event = function(n4) { + return q3 && (n4 = q3(n4)), n4.persist = G, n4.isPropagationStopped = J, n4.isDefaultPrevented = K, n4.nativeEvent = n4; +}; +var Q; +var X = { configurable: true, get: function() { + return this.class; +} }; +var nn = l.vnode; +l.vnode = function(n4) { + var t4 = n4.type, e5 = n4.props, u6 = e5; + if (typeof t4 == "string") { + var o6 = t4.indexOf("-") === -1; + for (var i5 in u6 = {}, e5) { + var l4 = e5[i5]; + B3 && i5 === "children" && t4 === "noscript" || i5 === "value" && "defaultValue" in e5 && l4 == null || (i5 === "defaultValue" && "value" in e5 && e5.value == null ? i5 = "value" : i5 === "download" && l4 === true ? l4 = "" : /ondoubleclick/i.test(i5) ? i5 = "ondblclick" : /^onchange(textarea|input)/i.test(i5 + t4) && !H2(e5.type) ? i5 = "oninput" : /^onfocus$/i.test(i5) ? i5 = "onfocusin" : /^onblur$/i.test(i5) ? i5 = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i5) ? i5 = i5.toLowerCase() : o6 && z3.test(i5) ? i5 = i5.replace(/[A-Z0-9]/g, "-$&").toLowerCase() : l4 === null && (l4 = void 0), /^oninput$/i.test(i5) && (i5 = i5.toLowerCase(), u6[i5] && (i5 = "oninputCapture")), u6[i5] = l4); + } + t4 == "select" && u6.multiple && Array.isArray(u6.value) && (u6.value = x(e5.children).forEach(function(n5) { + n5.props.selected = u6.value.indexOf(n5.props.value) != -1; + })), t4 == "select" && u6.defaultValue != null && (u6.value = x(e5.children).forEach(function(n5) { + n5.props.selected = u6.multiple ? u6.defaultValue.indexOf(n5.props.value) != -1 : u6.defaultValue == n5.props.value; + })), n4.props = u6, e5.class != e5.className && (X.enumerable = "className" in e5, e5.className != null && (u6.class = e5.className), Object.defineProperty(u6, "className", X)); + } + n4.$$typeof = j3, nn && nn(n4); +}; +var tn = l.__r; +l.__r = function(n4) { + tn && tn(n4), Q = n4.__c; +}; +var en = { ReactCurrentDispatcher: { current: { readContext: function(n4) { + return Q.__n[n4.__c].props.value; +} } } }; +function un(n4) { + return h.bind(null, n4); +} +function on(n4) { + return !!n4 && n4.$$typeof === j3; +} +function ln(n4) { + return on(n4) ? q.apply(null, arguments) : n4; +} +function cn(n4) { + return !!n4.__k && (P(null, n4), true); +} +function fn(n4) { + return n4 && (n4.base || n4.nodeType === 1 && n4) || null; +} +var an = function(n4, t4) { + return n4(t4); +}; +var sn = function(n4, t4) { + return n4(t4); +}; +var hn = p; +function vn(n4) { + n4(); +} +function dn(n4) { + return n4; +} +function pn() { + return [false, vn]; +} +var mn = s2; +function yn(n4, t4) { + var e5 = t4(), r6 = p2({ h: { __: e5, v: t4 } }), u6 = r6[0].h, o6 = r6[1]; + return s2(function() { + u6.__ = e5, u6.v = t4, u6.__ !== t4() && o6({ h: u6 }); + }, [n4, e5, t4]), h2(function() { + return u6.__ !== u6.v() && o6({ h: u6 }), n4(function() { + u6.__ !== u6.v() && o6({ h: u6 }); + }); + }, [n4]), e5; +} +var _n = { useState: p2, useId: V, useReducer: y2, useEffect: h2, useLayoutEffect: s2, useInsertionEffect: mn, useTransition: pn, useDeferredValue: dn, useSyncExternalStore: yn, startTransition: vn, useRef: _2, useImperativeHandle: A2, useMemo: F, useCallback: T2, useContext: q2, useDebugValue: x2, version: "17.0.2", Children: A3, render: Z, hydrate: Y, unmountComponentAtNode: cn, createPortal: $2, createElement: h, createContext: B, createFactory: un, cloneElement: ln, createRef: y, Fragment: p, isValidElement: on, findDOMNode: fn, Component: d, PureComponent: E, memo: w3, forwardRef: N2, flushSync: sn, unstable_batchedUpdates: an, StrictMode: hn, Suspense: U, SuspenseList: M2, lazy: F2, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: en }; + +// node_modules/recoil/es/recoil.js +function isPromise(p6) { + return !!p6 && typeof p6.then === "function"; +} +var Recoil_isPromise = isPromise; +function nullthrows(x5, message) { + if (x5 != null) { + return x5; + } + throw new Error(message !== null && message !== void 0 ? message : "Got unexpected null or undefined"); +} +var Recoil_nullthrows = nullthrows; +var Canceled = class { +}; +var CANCELED = new Canceled(); +var loadableAccessors = { + valueMaybe() { + return void 0; + }, + valueOrThrow() { + const error = new Error(`Loadable expected value, but in "${this.state}" state`); + throw error; + }, + errorMaybe() { + return void 0; + }, + errorOrThrow() { + const error = new Error(`Loadable expected error, but in "${this.state}" state`); + throw error; + }, + promiseMaybe() { + return void 0; + }, + promiseOrThrow() { + const error = new Error(`Loadable expected promise, but in "${this.state}" state`); + throw error; + }, + is(other) { + return other.state === this.state && other.contents === this.contents; + }, + map(map) { + if (this.state === "hasError") { + return this; + } + if (this.state === "hasValue") { + try { + const next = map(this.contents); + return Recoil_isPromise(next) ? loadableWithPromise(next.then((value) => ({ + __value: value + }))) : loadableWithValue(next); + } catch (e5) { + return Recoil_isPromise(e5) ? loadableWithPromise(e5.next(() => map(this.contents))) : loadableWithError(e5); + } + } + if (this.state === "loading") { + return loadableWithPromise(this.contents.then((value) => ({ + __value: map(value.__value) + })).catch((e5) => { + if (Recoil_isPromise(e5)) { + return e5.then(() => map(this.contents)); + } + throw e5; + })); + } + const error = new Error("Invalid Loadable state"); + throw error; + } +}; +function loadableWithValue(value) { + return Object.freeze({ + state: "hasValue", + contents: value, + ...loadableAccessors, + getValue() { + return this.contents; + }, + toPromise() { + return Promise.resolve(this.contents); + }, + valueMaybe() { + return this.contents; + }, + valueOrThrow() { + return this.contents; + } + }); +} +function loadableWithError(error) { + return Object.freeze({ + state: "hasError", + contents: error, + ...loadableAccessors, + getValue() { + throw this.contents; + }, + toPromise() { + return Promise.reject(this.contents); + }, + errorMaybe() { + return this.contents; + }, + errorOrThrow() { + return this.contents; + } + }); +} +function loadableWithPromise(promise) { + return Object.freeze({ + state: "loading", + contents: promise, + ...loadableAccessors, + getValue() { + throw this.contents.then(({ + __value + }) => __value); + }, + toPromise() { + return this.contents.then(({ + __value + }) => __value); + }, + promiseMaybe() { + return this.contents.then(({ + __value + }) => __value); + }, + promiseOrThrow() { + return this.contents.then(({ + __value + }) => __value); + } + }); +} +function loadableLoading() { + return loadableWithPromise(new Promise(() => { + })); +} +function loadableAll(inputs) { + return inputs.every((i5) => i5.state === "hasValue") ? loadableWithValue(inputs.map((i5) => i5.contents)) : inputs.some((i5) => i5.state === "hasError") ? loadableWithError(Recoil_nullthrows(inputs.find((i5) => i5.state === "hasError"), "Invalid loadable passed to loadableAll").contents) : loadableWithPromise(Promise.all(inputs.map((i5) => i5.contents)).then((value) => ({ + __value: value + }))); +} +var Recoil_Loadable = { + loadableWithValue, + loadableWithError, + loadableWithPromise, + loadableLoading, + loadableAll, + Canceled, + CANCELED +}; +var _useMutableSource; +var useMutableSource = (_useMutableSource = _n.useMutableSource) !== null && _useMutableSource !== void 0 ? _useMutableSource : _n.unstable_useMutableSource; +function mutableSourceExists() { + return useMutableSource && !(typeof window !== "undefined" && window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE); +} +var Recoil_mutableSource = { + mutableSourceExists, + useMutableSource +}; +var { + mutableSourceExists: mutableSourceExists$1 +} = Recoil_mutableSource; +var gks = (/* @__PURE__ */ new Map()).set("recoil_hamt_2020", true).set("recoil_memory_managament_2020", true).set("recoil_suppress_rerender_in_callback", true); +function Recoil_gkx(gk) { + var _gks$get; + if (gk === "recoil_early_rendering_2021" && !mutableSourceExists$1()) { + return false; + } + return (_gks$get = gks.get(gk)) !== null && _gks$get !== void 0 ? _gks$get : false; +} +Recoil_gkx.setPass = (gk) => { + gks.set(gk, true); +}; +Recoil_gkx.setFail = (gk) => { + gks.set(gk, false); +}; +var Recoil_gkx_1 = Recoil_gkx; +function recoverableViolation(message, projectName, { + error +} = {}) { + if (true) { + console.error(message, error); + } + return null; +} +var recoverableViolation_1 = recoverableViolation; +var Recoil_recoverableViolation = recoverableViolation_1; +function setByAddingToSet(set, v3) { + const next = new Set(set); + next.add(v3); + return next; +} +function setByDeletingFromSet(set, v3) { + const next = new Set(set); + next.delete(v3); + return next; +} +function mapBySettingInMap(map, k5, v3) { + const next = new Map(map); + next.set(k5, v3); + return next; +} +function mapByUpdatingInMap(map, k5, updater) { + const next = new Map(map); + next.set(k5, updater(next.get(k5))); + return next; +} +function mapByDeletingFromMap(map, k5) { + const next = new Map(map); + next.delete(k5); + return next; +} +function mapByDeletingMultipleFromMap(map, ks) { + const next = new Map(map); + ks.forEach((k5) => next.delete(k5)); + return next; +} +var Recoil_CopyOnWrite = { + setByAddingToSet, + setByDeletingFromSet, + mapBySettingInMap, + mapByUpdatingInMap, + mapByDeletingFromMap, + mapByDeletingMultipleFromMap +}; +function* filterIterable(iterable, predicate) { + let index = 0; + for (const value of iterable) { + if (predicate(value, index++)) { + yield value; + } + } +} +var Recoil_filterIterable = filterIterable; +function mapIterable(iterable, callback) { + return function* () { + let index = 0; + for (const value of iterable) { + yield callback(value, index++); + } + }(); +} +var Recoil_mapIterable = mapIterable; +function sprintf(format2, ...args) { + let index = 0; + return format2.replace(/%s/g, () => String(args[index++])); +} +var sprintf_1 = sprintf; +function expectationViolation(format2, ...args) { + if (true) { + const message = sprintf_1.call(null, format2, ...args); + const error = new Error(message); + error.name = "Expectation Violation"; + console.error(error); + } +} +var expectationViolation_1 = expectationViolation; +var Recoil_expectationViolation = expectationViolation_1; +function _defineProperty(obj, key2, value) { + if (key2 in obj) { + Object.defineProperty(obj, key2, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key2] = value; + } + return obj; +} +var AbstractRecoilValue = class { + constructor(newKey) { + _defineProperty(this, "key", void 0); + this.key = newKey; + } +}; +var RecoilState = class extends AbstractRecoilValue { +}; +var RecoilValueReadOnly = class extends AbstractRecoilValue { +}; +function isRecoilValue(x5) { + return x5 instanceof RecoilState || x5 instanceof RecoilValueReadOnly; +} +var Recoil_RecoilValue = { + AbstractRecoilValue, + RecoilState, + RecoilValueReadOnly, + isRecoilValue +}; +var Recoil_RecoilValue_1 = Recoil_RecoilValue.AbstractRecoilValue; +var Recoil_RecoilValue_2 = Recoil_RecoilValue.RecoilState; +var Recoil_RecoilValue_3 = Recoil_RecoilValue.RecoilValueReadOnly; +var Recoil_RecoilValue_4 = Recoil_RecoilValue.isRecoilValue; +var Recoil_RecoilValue$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + AbstractRecoilValue: Recoil_RecoilValue_1, + RecoilState: Recoil_RecoilValue_2, + RecoilValueReadOnly: Recoil_RecoilValue_3, + isRecoilValue: Recoil_RecoilValue_4 +}); +var DefaultValue = class { +}; +var DEFAULT_VALUE = new DefaultValue(); +var RecoilValueNotReady = class extends Error { + constructor(key2) { + super(`Tried to set the value of Recoil selector ${key2} using an updater function, but it is an async selector in a pending or error state; this is not supported.`); + } +}; +var nodes = /* @__PURE__ */ new Map(); +var recoilValues = /* @__PURE__ */ new Map(); +function recoilValuesForKeys(keys) { + return Recoil_mapIterable(keys, (key2) => Recoil_nullthrows(recoilValues.get(key2))); +} +function registerNode(node) { + if (nodes.has(node.key)) { + const message = `Duplicate atom key "${node.key}". This is a FATAL ERROR in + production. But it is safe to ignore this warning if it occurred because of + hot module replacement.`; + console.warn(message); + } + nodes.set(node.key, node); + const recoilValue = node.set == null ? new Recoil_RecoilValue$1.RecoilValueReadOnly(node.key) : new Recoil_RecoilValue$1.RecoilState(node.key); + recoilValues.set(node.key, recoilValue); + return recoilValue; +} +var NodeMissingError = class extends Error { +}; +function getNode(key2) { + const node = nodes.get(key2); + if (node == null) { + throw new NodeMissingError(`Missing definition for RecoilValue: "${key2}""`); + } + return node; +} +function getNodeMaybe(key2) { + return nodes.get(key2); +} +var configDeletionHandlers = /* @__PURE__ */ new Map(); +function deleteNodeConfigIfPossible(key2) { + var _node$shouldDeleteCon; + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const node = nodes.get(key2); + if (node === null || node === void 0 ? void 0 : (_node$shouldDeleteCon = node.shouldDeleteConfigOnRelease) === null || _node$shouldDeleteCon === void 0 ? void 0 : _node$shouldDeleteCon.call(node)) { + var _getConfigDeletionHan; + nodes.delete(key2); + (_getConfigDeletionHan = getConfigDeletionHandler(key2)) === null || _getConfigDeletionHan === void 0 ? void 0 : _getConfigDeletionHan(); + configDeletionHandlers.delete(key2); + } +} +function setConfigDeletionHandler(key2, fn3) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + if (fn3 === void 0) { + configDeletionHandlers.delete(key2); + } else { + configDeletionHandlers.set(key2, fn3); + } +} +function getConfigDeletionHandler(key2) { + return configDeletionHandlers.get(key2); +} +var Recoil_Node = { + nodes, + recoilValues, + registerNode, + getNode, + getNodeMaybe, + deleteNodeConfigIfPossible, + setConfigDeletionHandler, + getConfigDeletionHandler, + recoilValuesForKeys, + NodeMissingError, + DefaultValue, + DEFAULT_VALUE, + RecoilValueNotReady +}; +var RetentionZone = class { +}; +function retentionZone() { + return new RetentionZone(); +} +var Recoil_RetentionZone = { + RetentionZone, + retentionZone +}; +var { + setByAddingToSet: setByAddingToSet$1 +} = Recoil_CopyOnWrite; +var { + getNode: getNode$1, + getNodeMaybe: getNodeMaybe$1, + recoilValuesForKeys: recoilValuesForKeys$1 +} = Recoil_Node; +var { + RetentionZone: RetentionZone$1 +} = Recoil_RetentionZone; +var emptySet = Object.freeze(/* @__PURE__ */ new Set()); +var ReadOnlyRecoilValueError = class extends Error { +}; +function initializeRetentionForNode(store, nodeKey, retainedBy) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return () => void 0; + } + const { + nodesRetainedByZone: nodesRetainedByZone2 + } = store.getState().retention; + function addToZone(zone) { + let set = nodesRetainedByZone2.get(zone); + if (!set) { + nodesRetainedByZone2.set(zone, set = /* @__PURE__ */ new Set()); + } + set.add(nodeKey); + } + if (retainedBy instanceof RetentionZone$1) { + addToZone(retainedBy); + } else if (Array.isArray(retainedBy)) { + for (const zone of retainedBy) { + addToZone(zone); + } + } + return () => { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const nodesRetainedByZone3 = store.getState().retention.nodesRetainedByZone; + function deleteFromZone(zone) { + const set = nodesRetainedByZone3.get(zone); + if (set) { + set.delete(nodeKey); + } + if (set && set.size === 0) { + nodesRetainedByZone3.delete(zone); + } + } + if (retainedBy instanceof RetentionZone$1) { + deleteFromZone(retainedBy); + } else if (Array.isArray(retainedBy)) { + for (const zone of retainedBy) { + deleteFromZone(zone); + } + } + }; +} +function initializeNodeIfNewToStore(store, treeState, key2, trigger) { + const storeState = store.getState(); + if (storeState.nodeCleanupFunctions.has(key2)) { + return; + } + const config = getNode$1(key2); + const retentionCleanup = initializeRetentionForNode(store, key2, config.retainedBy); + const nodeCleanup = config.init(store, treeState, trigger); + storeState.nodeCleanupFunctions.set(key2, () => { + nodeCleanup(); + retentionCleanup(); + }); +} +function cleanUpNode(store, key2) { + var _state$nodeCleanupFun; + const state = store.getState(); + (_state$nodeCleanupFun = state.nodeCleanupFunctions.get(key2)) === null || _state$nodeCleanupFun === void 0 ? void 0 : _state$nodeCleanupFun(); + state.nodeCleanupFunctions.delete(key2); +} +function getNodeLoadable(store, state, key2) { + initializeNodeIfNewToStore(store, state, key2, "get"); + return getNode$1(key2).get(store, state); +} +function peekNodeLoadable(store, state, key2) { + return getNode$1(key2).peek(store, state); +} +function setUnvalidatedAtomValue_DEPRECATED(state, key2, newValue) { + var _node$invalidate; + const node = getNodeMaybe$1(key2); + node === null || node === void 0 ? void 0 : (_node$invalidate = node.invalidate) === null || _node$invalidate === void 0 ? void 0 : _node$invalidate.call(node, state); + return { + ...state, + atomValues: state.atomValues.clone().delete(key2), + nonvalidatedAtoms: state.nonvalidatedAtoms.clone().set(key2, newValue), + dirtyAtoms: setByAddingToSet$1(state.dirtyAtoms, key2) + }; +} +function setNodeValue(store, state, key2, newValue) { + const node = getNode$1(key2); + if (node.set == null) { + throw new ReadOnlyRecoilValueError(`Attempt to set read-only RecoilValue: ${key2}`); + } + const set = node.set; + initializeNodeIfNewToStore(store, state, key2, "set"); + return set(store, state, newValue); +} +function peekNodeInfo(store, state, key2) { + var _graph$nodeDeps$get, _storeState$nodeToCom, _storeState$nodeToCom2; + const storeState = store.getState(); + const graph2 = store.getGraph(state.version); + const type = storeState.knownAtoms.has(key2) ? "atom" : storeState.knownSelectors.has(key2) ? "selector" : void 0; + const downstreamNodes = Recoil_filterIterable(getDownstreamNodes(store, state, /* @__PURE__ */ new Set([key2])), (nodeKey) => nodeKey !== key2); + return { + loadable: peekNodeLoadable(store, state, key2), + isActive: storeState.knownAtoms.has(key2) || storeState.knownSelectors.has(key2), + isSet: type === "selector" ? false : state.atomValues.has(key2), + isModified: state.dirtyAtoms.has(key2), + type, + deps: recoilValuesForKeys$1((_graph$nodeDeps$get = graph2.nodeDeps.get(key2)) !== null && _graph$nodeDeps$get !== void 0 ? _graph$nodeDeps$get : []), + subscribers: { + nodes: recoilValuesForKeys$1(downstreamNodes), + components: Recoil_mapIterable((_storeState$nodeToCom = (_storeState$nodeToCom2 = storeState.nodeToComponentSubscriptions.get(key2)) === null || _storeState$nodeToCom2 === void 0 ? void 0 : _storeState$nodeToCom2.values()) !== null && _storeState$nodeToCom !== void 0 ? _storeState$nodeToCom : [], ([name]) => ({ + name + })) + } + }; +} +function getDownstreamNodes(store, state, keys) { + const visitedNodes = /* @__PURE__ */ new Set(); + const visitingNodes = Array.from(keys); + const graph2 = store.getGraph(state.version); + for (let key2 = visitingNodes.pop(); key2; key2 = visitingNodes.pop()) { + var _graph$nodeToNodeSubs; + visitedNodes.add(key2); + const subscribedNodes = (_graph$nodeToNodeSubs = graph2.nodeToNodeSubscriptions.get(key2)) !== null && _graph$nodeToNodeSubs !== void 0 ? _graph$nodeToNodeSubs : emptySet; + for (const downstreamNode of subscribedNodes) { + if (!visitedNodes.has(downstreamNode)) { + visitingNodes.push(downstreamNode); + } + } + } + return visitedNodes; +} +var Recoil_FunctionalCore = { + getNodeLoadable, + peekNodeLoadable, + setNodeValue, + cleanUpNode, + setUnvalidatedAtomValue_DEPRECATED, + peekNodeInfo, + getDownstreamNodes, + initializeNodeIfNewToStore +}; +var { + CANCELED: CANCELED$1 +} = Recoil_Loadable; +var { + getDownstreamNodes: getDownstreamNodes$1, + getNodeLoadable: getNodeLoadable$1, + setNodeValue: setNodeValue$1 +} = Recoil_FunctionalCore; +var { + getNodeMaybe: getNodeMaybe$2 +} = Recoil_Node; +var { + DefaultValue: DefaultValue$1, + RecoilValueNotReady: RecoilValueNotReady$1 +} = Recoil_Node; +var { + AbstractRecoilValue: AbstractRecoilValue$1, + RecoilState: RecoilState$1, + RecoilValueReadOnly: RecoilValueReadOnly$1, + isRecoilValue: isRecoilValue$1 +} = Recoil_RecoilValue$1; +function getRecoilValueAsLoadable(store, { + key: key2 +}, treeState = store.getState().currentTree) { + var _storeState$nextTree, _storeState$previousT; + const storeState = store.getState(); + if (!(treeState.version === storeState.currentTree.version || treeState.version === ((_storeState$nextTree = storeState.nextTree) === null || _storeState$nextTree === void 0 ? void 0 : _storeState$nextTree.version) || treeState.version === ((_storeState$previousT = storeState.previousTree) === null || _storeState$previousT === void 0 ? void 0 : _storeState$previousT.version))) { + Recoil_recoverableViolation("Tried to read from a discarded tree"); + } + const loadable = getNodeLoadable$1(store, treeState, key2); + if (loadable.state === "loading") { + loadable.contents.catch(() => { + return CANCELED$1; + }); + } + return loadable; +} +function applyAtomValueWrites(atomValues, writes) { + const result = atomValues.clone(); + writes.forEach((v3, k5) => { + if (v3.state === "hasValue" && v3.contents instanceof DefaultValue$1) { + result.delete(k5); + } else { + result.set(k5, v3); + } + }); + return result; +} +function valueFromValueOrUpdater(store, state, { + key: key2 +}, valueOrUpdater) { + if (typeof valueOrUpdater === "function") { + const current = getNodeLoadable$1(store, state, key2); + if (current.state === "loading") { + throw new RecoilValueNotReady$1(key2); + } else if (current.state === "hasError") { + throw current.contents; + } + return valueOrUpdater(current.contents); + } else { + return valueOrUpdater; + } +} +function applyAction(store, state, action) { + if (action.type === "set") { + const { + recoilValue, + valueOrUpdater + } = action; + const newValue = valueFromValueOrUpdater(store, state, recoilValue, valueOrUpdater); + const writes = setNodeValue$1(store, state, recoilValue.key, newValue); + for (const [key2, loadable] of writes.entries()) { + writeLoadableToTreeState(state, key2, loadable); + } + } else if (action.type === "setLoadable") { + const { + recoilValue: { + key: key2 + }, + loadable + } = action; + writeLoadableToTreeState(state, key2, loadable); + } else if (action.type === "markModified") { + const { + recoilValue: { + key: key2 + } + } = action; + state.dirtyAtoms.add(key2); + } else if (action.type === "setUnvalidated") { + var _node$invalidate; + const { + recoilValue: { + key: key2 + }, + unvalidatedValue + } = action; + const node = getNodeMaybe$2(key2); + node === null || node === void 0 ? void 0 : (_node$invalidate = node.invalidate) === null || _node$invalidate === void 0 ? void 0 : _node$invalidate.call(node, state); + state.atomValues.delete(key2); + state.nonvalidatedAtoms.set(key2, unvalidatedValue); + state.dirtyAtoms.add(key2); + } else { + Recoil_recoverableViolation(`Unknown action ${action.type}`); + } +} +function writeLoadableToTreeState(state, key2, loadable) { + if (loadable.state === "hasValue" && loadable.contents instanceof DefaultValue$1) { + state.atomValues.delete(key2); + } else { + state.atomValues.set(key2, loadable); + } + state.dirtyAtoms.add(key2); + state.nonvalidatedAtoms.delete(key2); +} +function applyActionsToStore(store, actions) { + store.replaceState((state) => { + const newState = copyTreeState(state); + for (const action of actions) { + applyAction(store, newState, action); + } + invalidateDownstreams(store, newState); + return newState; + }); +} +function queueOrPerformStateUpdate(store, action) { + if (batchStack.length) { + const actionsByStore = batchStack[batchStack.length - 1]; + let actions = actionsByStore.get(store); + if (!actions) { + actionsByStore.set(store, actions = []); + } + actions.push(action); + } else { + applyActionsToStore(store, [action]); + } +} +var batchStack = []; +function batchStart() { + const actionsByStore = /* @__PURE__ */ new Map(); + batchStack.push(actionsByStore); + return () => { + for (const [store, actions] of actionsByStore) { + applyActionsToStore(store, actions); + } + const popped = batchStack.pop(); + if (popped !== actionsByStore) { + Recoil_recoverableViolation("Incorrect order of batch popping"); + } + }; +} +function copyTreeState(state) { + return { + ...state, + atomValues: state.atomValues.clone(), + nonvalidatedAtoms: state.nonvalidatedAtoms.clone(), + dirtyAtoms: new Set(state.dirtyAtoms) + }; +} +function invalidateDownstreams(store, state) { + const downstreams = getDownstreamNodes$1(store, state, state.dirtyAtoms); + for (const key2 of downstreams) { + var _getNodeMaybe, _getNodeMaybe$invalid; + (_getNodeMaybe = getNodeMaybe$2(key2)) === null || _getNodeMaybe === void 0 ? void 0 : (_getNodeMaybe$invalid = _getNodeMaybe.invalidate) === null || _getNodeMaybe$invalid === void 0 ? void 0 : _getNodeMaybe$invalid.call(_getNodeMaybe, state); + } +} +function setRecoilValue(store, recoilValue, valueOrUpdater) { + queueOrPerformStateUpdate(store, { + type: "set", + recoilValue, + valueOrUpdater + }); +} +function setRecoilValueLoadable(store, recoilValue, loadable) { + if (loadable instanceof DefaultValue$1) { + return setRecoilValue(store, recoilValue, loadable); + } + queueOrPerformStateUpdate(store, { + type: "setLoadable", + recoilValue, + loadable + }); +} +function markRecoilValueModified(store, recoilValue) { + queueOrPerformStateUpdate(store, { + type: "markModified", + recoilValue + }); +} +function setUnvalidatedRecoilValue(store, recoilValue, unvalidatedValue) { + queueOrPerformStateUpdate(store, { + type: "setUnvalidated", + recoilValue, + unvalidatedValue + }); +} +var subscriptionID = 0; +function subscribeToRecoilValue(store, { + key: key2 +}, callback, componentDebugName = null) { + const subID = subscriptionID++; + const storeState = store.getState(); + if (!storeState.nodeToComponentSubscriptions.has(key2)) { + storeState.nodeToComponentSubscriptions.set(key2, /* @__PURE__ */ new Map()); + } + Recoil_nullthrows(storeState.nodeToComponentSubscriptions.get(key2)).set(subID, [componentDebugName !== null && componentDebugName !== void 0 ? componentDebugName : "", callback]); + if (Recoil_gkx_1("recoil_early_rendering_2021")) { + const nextTree = store.getState().nextTree; + if (nextTree && nextTree.dirtyAtoms.has(key2)) { + callback(nextTree); + } + } + return { + release: () => { + const storeState2 = store.getState(); + const subs = storeState2.nodeToComponentSubscriptions.get(key2); + if (subs === void 0 || !subs.has(subID)) { + Recoil_recoverableViolation(`Subscription missing at release time for atom ${key2}. This is a bug in Recoil.`); + return; + } + subs.delete(subID); + if (subs.size === 0) { + storeState2.nodeToComponentSubscriptions.delete(key2); + } + } + }; +} +var Recoil_RecoilValueInterface = { + RecoilValueReadOnly: RecoilValueReadOnly$1, + AbstractRecoilValue: AbstractRecoilValue$1, + RecoilState: RecoilState$1, + getRecoilValueAsLoadable, + setRecoilValue, + setRecoilValueLoadable, + markRecoilValueModified, + setUnvalidatedRecoilValue, + subscribeToRecoilValue, + isRecoilValue: isRecoilValue$1, + applyAtomValueWrites, + batchStart, + writeLoadableToTreeState, + invalidateDownstreams, + copyTreeState, + invalidateDownstreams_FOR_TESTING: invalidateDownstreams +}; +var { + unstable_batchedUpdates +} = _n; +var ReactBatchedUpdates = { + unstable_batchedUpdates +}; +var { + unstable_batchedUpdates: unstable_batchedUpdates$1 +} = ReactBatchedUpdates; +var Recoil_ReactBatchedUpdates = { + unstable_batchedUpdates: unstable_batchedUpdates$1 +}; +var { + batchStart: batchStart$1 +} = Recoil_RecoilValueInterface; +var { + unstable_batchedUpdates: unstable_batchedUpdates$2 +} = Recoil_ReactBatchedUpdates; +var batcher = unstable_batchedUpdates$2; +var setBatcher = (newBatcher) => { + batcher = newBatcher; +}; +var getBatcher = () => batcher; +var batchUpdates = (callback) => { + batcher(() => { + let batchEnd = () => void 0; + try { + batchEnd = batchStart$1(); + callback(); + } finally { + batchEnd(); + } + }); +}; +var Recoil_Batching = { + getBatcher, + setBatcher, + batchUpdates +}; +function enqueueExecution(s10, f5) { + f5(); +} +var Recoil_Queue = { + enqueueExecution +}; +function differenceSets(set, ...setsWithValuesToRemove) { + const ret = /* @__PURE__ */ new Set(); + FIRST: + for (const value of set) { + for (const otherSet of setsWithValuesToRemove) { + if (otherSet.has(value)) { + continue FIRST; + } + } + ret.add(value); + } + return ret; +} +var Recoil_differenceSets = differenceSets; +function mapMap(map, callback) { + const result = /* @__PURE__ */ new Map(); + map.forEach((value, key2) => { + result.set(key2, callback(value, key2)); + }); + return result; +} +var Recoil_mapMap = mapMap; +function graph() { + return { + nodeDeps: /* @__PURE__ */ new Map(), + nodeToNodeSubscriptions: /* @__PURE__ */ new Map() + }; +} +function cloneGraph(graph2) { + return { + nodeDeps: Recoil_mapMap(graph2.nodeDeps, (s10) => new Set(s10)), + nodeToNodeSubscriptions: Recoil_mapMap(graph2.nodeToNodeSubscriptions, (s10) => new Set(s10)) + }; +} +function mergeDependencyMapIntoGraph(deps, graph2, olderGraph) { + const { + nodeDeps, + nodeToNodeSubscriptions + } = graph2; + deps.forEach((upstreams, downstream) => { + const existingUpstreams = nodeDeps.get(downstream); + if (existingUpstreams && olderGraph && existingUpstreams !== olderGraph.nodeDeps.get(downstream)) { + return; + } + nodeDeps.set(downstream, new Set(upstreams)); + const addedUpstreams = existingUpstreams == null ? upstreams : Recoil_differenceSets(upstreams, existingUpstreams); + addedUpstreams.forEach((upstream) => { + if (!nodeToNodeSubscriptions.has(upstream)) { + nodeToNodeSubscriptions.set(upstream, /* @__PURE__ */ new Set()); + } + const existing = Recoil_nullthrows(nodeToNodeSubscriptions.get(upstream)); + existing.add(downstream); + }); + if (existingUpstreams) { + const removedUpstreams = Recoil_differenceSets(existingUpstreams, upstreams); + removedUpstreams.forEach((upstream) => { + if (!nodeToNodeSubscriptions.has(upstream)) { + return; + } + const existing = Recoil_nullthrows(nodeToNodeSubscriptions.get(upstream)); + existing.delete(downstream); + if (existing.size === 0) { + nodeToNodeSubscriptions.delete(upstream); + } + }); + } + }); +} +function saveDependencyMapToStore(dependencyMap, store, version) { + var _storeState$nextTree, _storeState$previousT, _storeState$previousT2, _storeState$previousT3; + const storeState = store.getState(); + if (!(version === storeState.currentTree.version || version === ((_storeState$nextTree = storeState.nextTree) === null || _storeState$nextTree === void 0 ? void 0 : _storeState$nextTree.version) || version === ((_storeState$previousT = storeState.previousTree) === null || _storeState$previousT === void 0 ? void 0 : _storeState$previousT.version))) { + Recoil_recoverableViolation("Tried to save dependencies to a discarded tree"); + } + const graph2 = store.getGraph(version); + mergeDependencyMapIntoGraph(dependencyMap, graph2); + if (version === ((_storeState$previousT2 = storeState.previousTree) === null || _storeState$previousT2 === void 0 ? void 0 : _storeState$previousT2.version)) { + const currentGraph = store.getGraph(storeState.currentTree.version); + mergeDependencyMapIntoGraph(dependencyMap, currentGraph, graph2); + } + if (version === ((_storeState$previousT3 = storeState.previousTree) === null || _storeState$previousT3 === void 0 ? void 0 : _storeState$previousT3.version) || version === storeState.currentTree.version) { + var _storeState$nextTree2; + const nextVersion = (_storeState$nextTree2 = storeState.nextTree) === null || _storeState$nextTree2 === void 0 ? void 0 : _storeState$nextTree2.version; + if (nextVersion !== void 0) { + const nextGraph = store.getGraph(nextVersion); + mergeDependencyMapIntoGraph(dependencyMap, nextGraph, graph2); + } + } +} +function mergeDepsIntoDependencyMap(from, into) { + from.forEach((upstreamDeps, downstreamNode) => { + if (!into.has(downstreamNode)) { + into.set(downstreamNode, /* @__PURE__ */ new Set()); + } + const deps = Recoil_nullthrows(into.get(downstreamNode)); + upstreamDeps.forEach((dep) => deps.add(dep)); + }); +} +function addToDependencyMap(downstream, upstream, dependencyMap) { + if (!dependencyMap.has(downstream)) { + dependencyMap.set(downstream, /* @__PURE__ */ new Set()); + } + Recoil_nullthrows(dependencyMap.get(downstream)).add(upstream); +} +var Recoil_Graph = { + addToDependencyMap, + cloneGraph, + graph, + mergeDepsIntoDependencyMap, + saveDependencyMapToStore +}; +function createCommonjsModule(fn3, module2) { + return module2 = { exports: {} }, fn3(module2, module2.exports), module2.exports; +} +var hamt_1 = createCommonjsModule(function(module2) { + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + var hamt = {}; + var SIZE = 5; + var BUCKET_SIZE = Math.pow(2, SIZE); + var MASK = BUCKET_SIZE - 1; + var MAX_INDEX_NODE = BUCKET_SIZE / 2; + var MIN_ARRAY_NODE = BUCKET_SIZE / 4; + var nothing = {}; + var constant = function constant2(x5) { + return function() { + return x5; + }; + }; + var hash3 = hamt.hash = function(str) { + var type = typeof str === "undefined" ? "undefined" : _typeof(str); + if (type === "number") + return str; + if (type !== "string") + str += ""; + var hash4 = 0; + for (var i5 = 0, len = str.length; i5 < len; ++i5) { + var c3 = str.charCodeAt(i5); + hash4 = (hash4 << 5) - hash4 + c3 | 0; + } + return hash4; + }; + var popcount = function popcount2(x5) { + x5 -= x5 >> 1 & 1431655765; + x5 = (x5 & 858993459) + (x5 >> 2 & 858993459); + x5 = x5 + (x5 >> 4) & 252645135; + x5 += x5 >> 8; + x5 += x5 >> 16; + return x5 & 127; + }; + var hashFragment = function hashFragment2(shift, h5) { + return h5 >>> shift & MASK; + }; + var toBitmap = function toBitmap2(x5) { + return 1 << x5; + }; + var fromBitmap = function fromBitmap2(bitmap, bit) { + return popcount(bitmap & bit - 1); + }; + var arrayUpdate = function arrayUpdate2(mutate2, at, v3, arr) { + var out = arr; + if (!mutate2) { + var len = arr.length; + out = new Array(len); + for (var i5 = 0; i5 < len; ++i5) { + out[i5] = arr[i5]; + } + } + out[at] = v3; + return out; + }; + var arraySpliceOut = function arraySpliceOut2(mutate2, at, arr) { + var newLen = arr.length - 1; + var i5 = 0; + var g4 = 0; + var out = arr; + if (mutate2) { + i5 = g4 = at; + } else { + out = new Array(newLen); + while (i5 < at) { + out[g4++] = arr[i5++]; + } + } + ++i5; + while (i5 <= newLen) { + out[g4++] = arr[i5++]; + } + if (mutate2) { + out.length = newLen; + } + return out; + }; + var arraySpliceIn = function arraySpliceIn2(mutate2, at, v3, arr) { + var len = arr.length; + if (mutate2) { + var _i = len; + while (_i >= at) { + arr[_i--] = arr[_i]; + } + arr[at] = v3; + return arr; + } + var i5 = 0, g4 = 0; + var out = new Array(len + 1); + while (i5 < at) { + out[g4++] = arr[i5++]; + } + out[at] = v3; + while (i5 < len) { + out[++g4] = arr[i5++]; + } + return out; + }; + var LEAF = 1; + var COLLISION = 2; + var INDEX = 3; + var ARRAY = 4; + var empty = { + __hamt_isEmpty: true + }; + var isEmptyNode = function isEmptyNode2(x5) { + return x5 === empty || x5 && x5.__hamt_isEmpty; + }; + var Leaf = function Leaf2(edit, hash4, key2, value) { + return { + type: LEAF, + edit, + hash: hash4, + key: key2, + value, + _modify: Leaf__modify + }; + }; + var Collision = function Collision2(edit, hash4, children) { + return { + type: COLLISION, + edit, + hash: hash4, + children, + _modify: Collision__modify + }; + }; + var IndexedNode = function IndexedNode2(edit, mask, children) { + return { + type: INDEX, + edit, + mask, + children, + _modify: IndexedNode__modify + }; + }; + var ArrayNode = function ArrayNode2(edit, size, children) { + return { + type: ARRAY, + edit, + size, + children, + _modify: ArrayNode__modify + }; + }; + var isLeaf = function isLeaf2(node) { + return node === empty || node.type === LEAF || node.type === COLLISION; + }; + var expand = function expand2(edit, frag, child, bitmap, subNodes) { + var arr = []; + var bit = bitmap; + var count2 = 0; + for (var i5 = 0; bit; ++i5) { + if (bit & 1) + arr[i5] = subNodes[count2++]; + bit >>>= 1; + } + arr[frag] = child; + return ArrayNode(edit, count2 + 1, arr); + }; + var pack = function pack2(edit, count2, removed, elements) { + var children = new Array(count2 - 1); + var g4 = 0; + var bitmap = 0; + for (var i5 = 0, len = elements.length; i5 < len; ++i5) { + if (i5 !== removed) { + var elem = elements[i5]; + if (elem && !isEmptyNode(elem)) { + children[g4++] = elem; + bitmap |= 1 << i5; + } + } + } + return IndexedNode(edit, bitmap, children); + }; + var mergeLeaves = function mergeLeaves2(edit, shift, h1, n1, h22, n22) { + if (h1 === h22) + return Collision(edit, h1, [n22, n1]); + var subH1 = hashFragment(shift, h1); + var subH2 = hashFragment(shift, h22); + return IndexedNode(edit, toBitmap(subH1) | toBitmap(subH2), subH1 === subH2 ? [mergeLeaves2(edit, shift + SIZE, h1, n1, h22, n22)] : subH1 < subH2 ? [n1, n22] : [n22, n1]); + }; + var updateCollisionList = function updateCollisionList2(mutate2, edit, keyEq, h5, list, f5, k5, size) { + var len = list.length; + for (var i5 = 0; i5 < len; ++i5) { + var child = list[i5]; + if (keyEq(k5, child.key)) { + var value = child.value; + var _newValue = f5(value); + if (_newValue === value) + return list; + if (_newValue === nothing) { + --size.value; + return arraySpliceOut(mutate2, i5, list); + } + return arrayUpdate(mutate2, i5, Leaf(edit, h5, k5, _newValue), list); + } + } + var newValue = f5(); + if (newValue === nothing) + return list; + ++size.value; + return arrayUpdate(mutate2, len, Leaf(edit, h5, k5, newValue), list); + }; + var canEditNode = function canEditNode2(edit, node) { + return edit === node.edit; + }; + var Leaf__modify = function Leaf__modify2(edit, keyEq, shift, f5, h5, k5, size) { + if (keyEq(k5, this.key)) { + var _v = f5(this.value); + if (_v === this.value) + return this; + else if (_v === nothing) { + --size.value; + return empty; + } + if (canEditNode(edit, this)) { + this.value = _v; + return this; + } + return Leaf(edit, h5, k5, _v); + } + var v3 = f5(); + if (v3 === nothing) + return this; + ++size.value; + return mergeLeaves(edit, shift, this.hash, this, h5, Leaf(edit, h5, k5, v3)); + }; + var Collision__modify = function Collision__modify2(edit, keyEq, shift, f5, h5, k5, size) { + if (h5 === this.hash) { + var canEdit = canEditNode(edit, this); + var list = updateCollisionList(canEdit, edit, keyEq, this.hash, this.children, f5, k5, size); + if (list === this.children) + return this; + return list.length > 1 ? Collision(edit, this.hash, list) : list[0]; + } + var v3 = f5(); + if (v3 === nothing) + return this; + ++size.value; + return mergeLeaves(edit, shift, this.hash, this, h5, Leaf(edit, h5, k5, v3)); + }; + var IndexedNode__modify = function IndexedNode__modify2(edit, keyEq, shift, f5, h5, k5, size) { + var mask = this.mask; + var children = this.children; + var frag = hashFragment(shift, h5); + var bit = toBitmap(frag); + var indx = fromBitmap(mask, bit); + var exists = mask & bit; + var current = exists ? children[indx] : empty; + var child = current._modify(edit, keyEq, shift + SIZE, f5, h5, k5, size); + if (current === child) + return this; + var canEdit = canEditNode(edit, this); + var bitmap = mask; + var newChildren = void 0; + if (exists && isEmptyNode(child)) { + bitmap &= ~bit; + if (!bitmap) + return empty; + if (children.length <= 2 && isLeaf(children[indx ^ 1])) + return children[indx ^ 1]; + newChildren = arraySpliceOut(canEdit, indx, children); + } else if (!exists && !isEmptyNode(child)) { + if (children.length >= MAX_INDEX_NODE) + return expand(edit, frag, child, mask, children); + bitmap |= bit; + newChildren = arraySpliceIn(canEdit, indx, child, children); + } else { + newChildren = arrayUpdate(canEdit, indx, child, children); + } + if (canEdit) { + this.mask = bitmap; + this.children = newChildren; + return this; + } + return IndexedNode(edit, bitmap, newChildren); + }; + var ArrayNode__modify = function ArrayNode__modify2(edit, keyEq, shift, f5, h5, k5, size) { + var count2 = this.size; + var children = this.children; + var frag = hashFragment(shift, h5); + var child = children[frag]; + var newChild = (child || empty)._modify(edit, keyEq, shift + SIZE, f5, h5, k5, size); + if (child === newChild) + return this; + var canEdit = canEditNode(edit, this); + var newChildren = void 0; + if (isEmptyNode(child) && !isEmptyNode(newChild)) { + ++count2; + newChildren = arrayUpdate(canEdit, frag, newChild, children); + } else if (!isEmptyNode(child) && isEmptyNode(newChild)) { + --count2; + if (count2 <= MIN_ARRAY_NODE) + return pack(edit, count2, frag, children); + newChildren = arrayUpdate(canEdit, frag, empty, children); + } else { + newChildren = arrayUpdate(canEdit, frag, newChild, children); + } + if (canEdit) { + this.size = count2; + this.children = newChildren; + return this; + } + return ArrayNode(edit, count2, newChildren); + }; + empty._modify = function(edit, keyEq, shift, f5, h5, k5, size) { + var v3 = f5(); + if (v3 === nothing) + return empty; + ++size.value; + return Leaf(edit, h5, k5, v3); + }; + function Map2(editable, edit, config, root, size) { + this._editable = editable; + this._edit = edit; + this._config = config; + this._root = root; + this._size = size; + } + Map2.prototype.setTree = function(newRoot, newSize) { + if (this._editable) { + this._root = newRoot; + this._size = newSize; + return this; + } + return newRoot === this._root ? this : new Map2(this._editable, this._edit, this._config, newRoot, newSize); + }; + var tryGetHash = hamt.tryGetHash = function(alt, hash4, key2, map) { + var node = map._root; + var shift = 0; + var keyEq = map._config.keyEq; + while (true) { + switch (node.type) { + case LEAF: { + return keyEq(key2, node.key) ? node.value : alt; + } + case COLLISION: { + if (hash4 === node.hash) { + var children = node.children; + for (var i5 = 0, len = children.length; i5 < len; ++i5) { + var child = children[i5]; + if (keyEq(key2, child.key)) + return child.value; + } + } + return alt; + } + case INDEX: { + var frag = hashFragment(shift, hash4); + var bit = toBitmap(frag); + if (node.mask & bit) { + node = node.children[fromBitmap(node.mask, bit)]; + shift += SIZE; + break; + } + return alt; + } + case ARRAY: { + node = node.children[hashFragment(shift, hash4)]; + if (node) { + shift += SIZE; + break; + } + return alt; + } + default: + return alt; + } + } + }; + Map2.prototype.tryGetHash = function(alt, hash4, key2) { + return tryGetHash(alt, hash4, key2, this); + }; + var tryGet = hamt.tryGet = function(alt, key2, map) { + return tryGetHash(alt, map._config.hash(key2), key2, map); + }; + Map2.prototype.tryGet = function(alt, key2) { + return tryGet(alt, key2, this); + }; + var getHash = hamt.getHash = function(hash4, key2, map) { + return tryGetHash(void 0, hash4, key2, map); + }; + Map2.prototype.getHash = function(hash4, key2) { + return getHash(hash4, key2, this); + }; + var get = hamt.get = function(key2, map) { + return tryGetHash(void 0, map._config.hash(key2), key2, map); + }; + Map2.prototype.get = function(key2, alt) { + return tryGet(alt, key2, this); + }; + var hasHash = hamt.has = function(hash4, key2, map) { + return tryGetHash(nothing, hash4, key2, map) !== nothing; + }; + Map2.prototype.hasHash = function(hash4, key2) { + return hasHash(hash4, key2, this); + }; + var has = hamt.has = function(key2, map) { + return hasHash(map._config.hash(key2), key2, map); + }; + Map2.prototype.has = function(key2) { + return has(key2, this); + }; + var defKeyCompare = function defKeyCompare2(x5, y4) { + return x5 === y4; + }; + hamt.make = function(config) { + return new Map2(0, 0, { + keyEq: config && config.keyEq || defKeyCompare, + hash: config && config.hash || hash3 + }, empty, 0); + }; + hamt.empty = hamt.make(); + var isEmpty = hamt.isEmpty = function(map) { + return map && !!isEmptyNode(map._root); + }; + Map2.prototype.isEmpty = function() { + return isEmpty(this); + }; + var modifyHash = hamt.modifyHash = function(f5, hash4, key2, map) { + var size = { + value: map._size + }; + var newRoot = map._root._modify(map._editable ? map._edit : NaN, map._config.keyEq, 0, f5, hash4, key2, size); + return map.setTree(newRoot, size.value); + }; + Map2.prototype.modifyHash = function(hash4, key2, f5) { + return modifyHash(f5, hash4, key2, this); + }; + var modify = hamt.modify = function(f5, key2, map) { + return modifyHash(f5, map._config.hash(key2), key2, map); + }; + Map2.prototype.modify = function(key2, f5) { + return modify(f5, key2, this); + }; + var setHash = hamt.setHash = function(hash4, key2, value, map) { + return modifyHash(constant(value), hash4, key2, map); + }; + Map2.prototype.setHash = function(hash4, key2, value) { + return setHash(hash4, key2, value, this); + }; + var set = hamt.set = function(key2, value, map) { + return setHash(map._config.hash(key2), key2, value, map); + }; + Map2.prototype.set = function(key2, value) { + return set(key2, value, this); + }; + var del = constant(nothing); + var removeHash = hamt.removeHash = function(hash4, key2, map) { + return modifyHash(del, hash4, key2, map); + }; + Map2.prototype.removeHash = Map2.prototype.deleteHash = function(hash4, key2) { + return removeHash(hash4, key2, this); + }; + var remove = hamt.remove = function(key2, map) { + return removeHash(map._config.hash(key2), key2, map); + }; + Map2.prototype.remove = Map2.prototype.delete = function(key2) { + return remove(key2, this); + }; + var beginMutation = hamt.beginMutation = function(map) { + return new Map2(map._editable + 1, map._edit + 1, map._config, map._root, map._size); + }; + Map2.prototype.beginMutation = function() { + return beginMutation(this); + }; + var endMutation = hamt.endMutation = function(map) { + map._editable = map._editable && map._editable - 1; + return map; + }; + Map2.prototype.endMutation = function() { + return endMutation(this); + }; + var mutate = hamt.mutate = function(f5, map) { + var transient = beginMutation(map); + f5(transient); + return endMutation(transient); + }; + Map2.prototype.mutate = function(f5) { + return mutate(f5, this); + }; + var appk = function appk2(k5) { + return k5 && lazyVisitChildren(k5[0], k5[1], k5[2], k5[3], k5[4]); + }; + var lazyVisitChildren = function lazyVisitChildren2(len, children, i5, f5, k5) { + while (i5 < len) { + var child = children[i5++]; + if (child && !isEmptyNode(child)) + return lazyVisit(child, f5, [len, children, i5, f5, k5]); + } + return appk(k5); + }; + var lazyVisit = function lazyVisit2(node, f5, k5) { + switch (node.type) { + case LEAF: + return { + value: f5(node), + rest: k5 + }; + case COLLISION: + case ARRAY: + case INDEX: + var children = node.children; + return lazyVisitChildren(children.length, children, 0, f5, k5); + default: + return appk(k5); + } + }; + var DONE = { + done: true + }; + function MapIterator(v3) { + this.v = v3; + } + MapIterator.prototype.next = function() { + if (!this.v) + return DONE; + var v0 = this.v; + this.v = appk(v0.rest); + return v0; + }; + MapIterator.prototype[Symbol.iterator] = function() { + return this; + }; + var visit = function visit2(map, f5) { + return new MapIterator(lazyVisit(map._root, f5)); + }; + var buildPairs = function buildPairs2(x5) { + return [x5.key, x5.value]; + }; + var entries = hamt.entries = function(map) { + return visit(map, buildPairs); + }; + Map2.prototype.entries = Map2.prototype[Symbol.iterator] = function() { + return entries(this); + }; + var buildKeys = function buildKeys2(x5) { + return x5.key; + }; + var keys = hamt.keys = function(map) { + return visit(map, buildKeys); + }; + Map2.prototype.keys = function() { + return keys(this); + }; + var buildValues = function buildValues2(x5) { + return x5.value; + }; + var values = hamt.values = Map2.prototype.values = function(map) { + return visit(map, buildValues); + }; + Map2.prototype.values = function() { + return values(this); + }; + var fold = hamt.fold = function(f5, z4, m6) { + var root = m6._root; + if (root.type === LEAF) + return f5(z4, root.value, root.key); + var toVisit = [root.children]; + var children = void 0; + while (children = toVisit.pop()) { + for (var i5 = 0, len = children.length; i5 < len; ) { + var child = children[i5++]; + if (child && child.type) { + if (child.type === LEAF) + z4 = f5(z4, child.value, child.key); + else + toVisit.push(child.children); + } + } + } + return z4; + }; + Map2.prototype.fold = function(f5, z4) { + return fold(f5, z4, this); + }; + var forEach = hamt.forEach = function(f5, map) { + return fold(function(_3, value, key2) { + return f5(value, key2, map); + }, null, map); + }; + Map2.prototype.forEach = function(f5) { + return forEach(f5, this); + }; + var count = hamt.count = function(map) { + return map._size; + }; + Map2.prototype.count = function() { + return count(this); + }; + Object.defineProperty(Map2.prototype, "size", { + get: Map2.prototype.count + }); + if (module2.exports) { + module2.exports = hamt; + } else { + (void 0).hamt = hamt; + } +}); +var BuiltInMap = class { + constructor(existing) { + _defineProperty(this, "_map", void 0); + this._map = new Map(existing === null || existing === void 0 ? void 0 : existing.entries()); + } + keys() { + return this._map.keys(); + } + entries() { + return this._map.entries(); + } + get(k5) { + return this._map.get(k5); + } + has(k5) { + return this._map.has(k5); + } + set(k5, v3) { + this._map.set(k5, v3); + return this; + } + delete(k5) { + this._map.delete(k5); + return this; + } + clone() { + return persistentMap(this); + } + toMap() { + return new Map(this._map); + } +}; +var HashArrayMappedTrieMap = class { + constructor(existing) { + _defineProperty(this, "_hamt", hamt_1.empty.beginMutation()); + if (existing instanceof HashArrayMappedTrieMap) { + const h5 = existing._hamt.endMutation(); + existing._hamt = h5.beginMutation(); + this._hamt = h5.beginMutation(); + } else if (existing) { + for (const [k5, v3] of existing.entries()) { + this._hamt.set(k5, v3); + } + } + } + keys() { + return this._hamt.keys(); + } + entries() { + return this._hamt.entries(); + } + get(k5) { + return this._hamt.get(k5); + } + has(k5) { + return this._hamt.has(k5); + } + set(k5, v3) { + this._hamt.set(k5, v3); + return this; + } + delete(k5) { + this._hamt.delete(k5); + return this; + } + clone() { + return persistentMap(this); + } + toMap() { + return new Map(this._hamt); + } +}; +function persistentMap(existing) { + if (Recoil_gkx_1("recoil_hamt_2020")) { + return new HashArrayMappedTrieMap(existing); + } else { + return new BuiltInMap(existing); + } +} +var Recoil_PersistentMap = { + persistentMap +}; +var Recoil_PersistentMap_1 = Recoil_PersistentMap.persistentMap; +var Recoil_PersistentMap$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + persistentMap: Recoil_PersistentMap_1 +}); +var { + graph: graph$1 +} = Recoil_Graph; +var { + persistentMap: persistentMap$1 +} = Recoil_PersistentMap$1; +var nextTreeStateVersion = 0; +var getNextTreeStateVersion = () => nextTreeStateVersion++; +function makeEmptyTreeState() { + const version = getNextTreeStateVersion(); + return { + version, + stateID: version, + transactionMetadata: {}, + dirtyAtoms: /* @__PURE__ */ new Set(), + atomValues: persistentMap$1(), + nonvalidatedAtoms: persistentMap$1() + }; +} +function makeEmptyStoreState() { + const currentTree = makeEmptyTreeState(); + return { + currentTree, + nextTree: null, + previousTree: null, + commitDepth: 0, + knownAtoms: /* @__PURE__ */ new Set(), + knownSelectors: /* @__PURE__ */ new Set(), + transactionSubscriptions: /* @__PURE__ */ new Map(), + nodeTransactionSubscriptions: /* @__PURE__ */ new Map(), + nodeToComponentSubscriptions: /* @__PURE__ */ new Map(), + queuedComponentCallbacks_DEPRECATED: [], + suspendedComponentResolvers: /* @__PURE__ */ new Set(), + graphsByVersion: (/* @__PURE__ */ new Map()).set(currentTree.version, graph$1()), + versionsUsedByComponent: /* @__PURE__ */ new Map(), + retention: { + referenceCounts: /* @__PURE__ */ new Map(), + nodesRetainedByZone: /* @__PURE__ */ new Map(), + retainablesToCheckForRelease: /* @__PURE__ */ new Set() + }, + nodeCleanupFunctions: /* @__PURE__ */ new Map() + }; +} +var Recoil_State = { + makeEmptyTreeState, + makeEmptyStoreState, + getNextTreeStateVersion +}; +function unionSets(...sets) { + const result = /* @__PURE__ */ new Set(); + for (const set of sets) { + for (const value of set) { + result.add(value); + } + } + return result; +} +var Recoil_unionSets = unionSets; +function someSet(set, callback, context) { + const iterator = set.entries(); + let current = iterator.next(); + while (!current.done) { + const entry = current.value; + if (callback.call(context, entry[1], entry[0], set)) { + return true; + } + current = iterator.next(); + } + return false; +} +var Recoil_someSet = someSet; +var { + cleanUpNode: cleanUpNode$1 +} = Recoil_FunctionalCore; +var { + deleteNodeConfigIfPossible: deleteNodeConfigIfPossible$1, + getNode: getNode$2 +} = Recoil_Node; +var { + RetentionZone: RetentionZone$2 +} = Recoil_RetentionZone; +var emptySet$1 = /* @__PURE__ */ new Set(); +function releaseRetainablesNowOnCurrentTree(store, retainables) { + const storeState = store.getState(); + const treeState = storeState.currentTree; + if (storeState.nextTree) { + Recoil_recoverableViolation("releaseNodesNowOnCurrentTree should only be called at the end of a batch"); + return; + } + const nodes2 = /* @__PURE__ */ new Set(); + for (const r6 of retainables) { + if (r6 instanceof RetentionZone$2) { + for (const n4 of nodesRetainedByZone(storeState, r6)) { + nodes2.add(n4); + } + } else { + nodes2.add(r6); + } + } + const releasableNodes = findReleasableNodes(store, nodes2); + for (const node of releasableNodes) { + releaseNode(store, treeState, node); + } +} +function findReleasableNodes(store, searchFromNodes) { + const storeState = store.getState(); + const treeState = storeState.currentTree; + const graph2 = store.getGraph(treeState.version); + const releasableNodes = /* @__PURE__ */ new Set(); + const nonReleasableNodes = /* @__PURE__ */ new Set(); + findReleasableNodesInner(searchFromNodes); + return releasableNodes; + function findReleasableNodesInner(searchFromNodes2) { + const releasableNodesFoundThisIteration = /* @__PURE__ */ new Set(); + const downstreams = getDownstreamNodesInTopologicalOrder(store, treeState, searchFromNodes2, releasableNodes, nonReleasableNodes); + for (const node of downstreams) { + var _storeState$retention; + if (getNode$2(node).retainedBy === "recoilRoot") { + nonReleasableNodes.add(node); + continue; + } + if (((_storeState$retention = storeState.retention.referenceCounts.get(node)) !== null && _storeState$retention !== void 0 ? _storeState$retention : 0) > 0) { + nonReleasableNodes.add(node); + continue; + } + if (zonesThatCouldRetainNode(node).some((z4) => storeState.retention.referenceCounts.get(z4))) { + nonReleasableNodes.add(node); + continue; + } + const nodeChildren = graph2.nodeToNodeSubscriptions.get(node); + if (nodeChildren && Recoil_someSet(nodeChildren, (child) => nonReleasableNodes.has(child))) { + nonReleasableNodes.add(node); + continue; + } + releasableNodes.add(node); + releasableNodesFoundThisIteration.add(node); + } + const parents = /* @__PURE__ */ new Set(); + for (const node of releasableNodesFoundThisIteration) { + for (const parent of (_graph$nodeDeps$get = graph2.nodeDeps.get(node)) !== null && _graph$nodeDeps$get !== void 0 ? _graph$nodeDeps$get : emptySet$1) { + var _graph$nodeDeps$get; + if (!releasableNodes.has(parent)) { + parents.add(parent); + } + } + } + if (parents.size) { + findReleasableNodesInner(parents); + } + } +} +function getDownstreamNodesInTopologicalOrder(store, treeState, nodes2, doNotDescendInto1, doNotDescendInto2) { + const graph2 = store.getGraph(treeState.version); + const answer = []; + const visited = /* @__PURE__ */ new Set(); + while (nodes2.size > 0) { + visit(Recoil_nullthrows(nodes2.values().next().value)); + } + return answer; + function visit(node) { + if (doNotDescendInto1.has(node) || doNotDescendInto2.has(node)) { + nodes2.delete(node); + return; + } + if (visited.has(node)) { + return; + } + const children = graph2.nodeToNodeSubscriptions.get(node); + if (children) { + for (const child of children) { + visit(child); + } + } + visited.add(node); + nodes2.delete(node); + answer.push(node); + } +} +function releaseNode(store, treeState, node) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + cleanUpNode$1(store, node); + const storeState = store.getState(); + storeState.knownAtoms.delete(node); + storeState.knownSelectors.delete(node); + storeState.nodeTransactionSubscriptions.delete(node); + storeState.retention.referenceCounts.delete(node); + const zones = zonesThatCouldRetainNode(node); + for (const zone of zones) { + var _storeState$retention2; + (_storeState$retention2 = storeState.retention.nodesRetainedByZone.get(zone)) === null || _storeState$retention2 === void 0 ? void 0 : _storeState$retention2.delete(node); + } + treeState.atomValues.delete(node); + treeState.dirtyAtoms.delete(node); + treeState.nonvalidatedAtoms.delete(node); + const graph2 = storeState.graphsByVersion.get(treeState.version); + if (graph2) { + const deps = graph2.nodeDeps.get(node); + if (deps !== void 0) { + graph2.nodeDeps.delete(node); + for (const dep of deps) { + var _graph$nodeToNodeSubs; + (_graph$nodeToNodeSubs = graph2.nodeToNodeSubscriptions.get(dep)) === null || _graph$nodeToNodeSubs === void 0 ? void 0 : _graph$nodeToNodeSubs.delete(node); + } + } + graph2.nodeToNodeSubscriptions.delete(node); + } + deleteNodeConfigIfPossible$1(node); +} +function nodesRetainedByZone(storeState, zone) { + var _storeState$retention3; + return (_storeState$retention3 = storeState.retention.nodesRetainedByZone.get(zone)) !== null && _storeState$retention3 !== void 0 ? _storeState$retention3 : emptySet$1; +} +function zonesThatCouldRetainNode(node) { + const retainedBy = getNode$2(node).retainedBy; + if (retainedBy === void 0 || retainedBy === "components" || retainedBy === "recoilRoot") { + return []; + } else if (retainedBy instanceof RetentionZone$2) { + return [retainedBy]; + } else { + return retainedBy; + } +} +function scheduleOrPerformPossibleReleaseOfRetainable(store, retainable) { + const state = store.getState(); + if (state.nextTree) { + state.retention.retainablesToCheckForRelease.add(retainable); + } else { + releaseRetainablesNowOnCurrentTree(store, /* @__PURE__ */ new Set([retainable])); + } +} +function updateRetainCount(store, retainable, delta) { + var _map$get; + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const map = store.getState().retention.referenceCounts; + const newCount = ((_map$get = map.get(retainable)) !== null && _map$get !== void 0 ? _map$get : 0) + delta; + if (newCount === 0) { + updateRetainCountToZero(store, retainable); + } else { + map.set(retainable, newCount); + } +} +function updateRetainCountToZero(store, retainable) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const map = store.getState().retention.referenceCounts; + map.delete(retainable); + scheduleOrPerformPossibleReleaseOfRetainable(store, retainable); +} +function releaseScheduledRetainablesNow(store) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const state = store.getState(); + releaseRetainablesNowOnCurrentTree(store, state.retention.retainablesToCheckForRelease); + state.retention.retainablesToCheckForRelease.clear(); +} +function retainedByOptionWithDefault(r6) { + return r6 === void 0 ? "recoilRoot" : r6; +} +var Recoil_Retention = { + updateRetainCount, + updateRetainCountToZero, + releaseScheduledRetainablesNow, + retainedByOptionWithDefault +}; +function* concatIterables(iters) { + for (const iter of iters) { + for (const val of iter) { + yield val; + } + } +} +var Recoil_concatIterables = concatIterables; +var isSSR = typeof window === "undefined"; +var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative"; +var Recoil_Environment = { + isSSR, + isReactNative +}; +var { + isSSR: isSSR$1 +} = Recoil_Environment; +var { + batchUpdates: batchUpdates$1 +} = Recoil_Batching; +var { + initializeNodeIfNewToStore: initializeNodeIfNewToStore$1, + peekNodeInfo: peekNodeInfo$1 +} = Recoil_FunctionalCore; +var { + graph: graph$2 +} = Recoil_Graph; +var { + DEFAULT_VALUE: DEFAULT_VALUE$1, + recoilValues: recoilValues$1, + recoilValuesForKeys: recoilValuesForKeys$2 +} = Recoil_Node; +var { + AbstractRecoilValue: AbstractRecoilValue$2, + getRecoilValueAsLoadable: getRecoilValueAsLoadable$1, + setRecoilValue: setRecoilValue$1, + setUnvalidatedRecoilValue: setUnvalidatedRecoilValue$1 +} = Recoil_RecoilValueInterface; +var { + updateRetainCount: updateRetainCount$1 +} = Recoil_Retention; +var { + getNextTreeStateVersion: getNextTreeStateVersion$1, + makeEmptyStoreState: makeEmptyStoreState$1 +} = Recoil_State; +var retainWarning = ` +Recoil Snapshots only last for the duration of the callback they are provided to. To keep a Snapshot longer, do this: + + const release = snapshot.retain(); + try { + await useTheSnapshotAsynchronously(snapshot); + } finally { + release(); + } + +This is currently a DEV-only warning but will become a thrown exception in the next release of Recoil. +`; +var Snapshot = class { + constructor(storeState) { + _defineProperty(this, "_store", void 0); + _defineProperty(this, "_refCount", 0); + _defineProperty(this, "getLoadable", (recoilValue) => { + this.checkRefCount_INTERNAL(); + return getRecoilValueAsLoadable$1(this._store, recoilValue); + }); + _defineProperty(this, "getPromise", (recoilValue) => { + this.checkRefCount_INTERNAL(); + return this.getLoadable(recoilValue).toPromise(); + }); + _defineProperty(this, "getNodes_UNSTABLE", (opt) => { + this.checkRefCount_INTERNAL(); + if ((opt === null || opt === void 0 ? void 0 : opt.isModified) === true) { + if ((opt === null || opt === void 0 ? void 0 : opt.isInitialized) === false) { + return []; + } + const state = this._store.getState().currentTree; + return recoilValuesForKeys$2(state.dirtyAtoms); + } + const knownAtoms = this._store.getState().knownAtoms; + const knownSelectors = this._store.getState().knownSelectors; + return (opt === null || opt === void 0 ? void 0 : opt.isInitialized) == null ? recoilValues$1.values() : opt.isInitialized === true ? recoilValuesForKeys$2(Recoil_concatIterables([this._store.getState().knownAtoms, this._store.getState().knownSelectors])) : Recoil_filterIterable(recoilValues$1.values(), ({ + key: key2 + }) => !knownAtoms.has(key2) && !knownSelectors.has(key2)); + }); + _defineProperty(this, "getInfo_UNSTABLE", ({ + key: key2 + }) => { + this.checkRefCount_INTERNAL(); + return peekNodeInfo$1(this._store, this._store.getState().currentTree, key2); + }); + _defineProperty(this, "map", (mapper) => { + this.checkRefCount_INTERNAL(); + const mutableSnapshot = new MutableSnapshot(this, batchUpdates$1); + mapper(mutableSnapshot); + return cloneSnapshot(mutableSnapshot.getStore_INTERNAL()); + }); + _defineProperty(this, "asyncMap", async (mapper) => { + this.checkRefCount_INTERNAL(); + const mutableSnapshot = new MutableSnapshot(this, batchUpdates$1); + await mapper(mutableSnapshot); + return cloneSnapshot(mutableSnapshot.getStore_INTERNAL()); + }); + this._store = { + getState: () => storeState, + replaceState: (replacer) => { + storeState.currentTree = replacer(storeState.currentTree); + }, + getGraph: (version) => { + const graphs = storeState.graphsByVersion; + if (graphs.has(version)) { + return Recoil_nullthrows(graphs.get(version)); + } + const newGraph = graph$2(); + graphs.set(version, newGraph); + return newGraph; + }, + subscribeToTransactions: () => ({ + release: () => { + } + }), + addTransactionMetadata: () => { + throw new Error("Cannot subscribe to Snapshots"); + } + }; + for (const nodeKey of this._store.getState().nodeCleanupFunctions.keys()) { + initializeNodeIfNewToStore$1(this._store, storeState.currentTree, nodeKey, "get"); + updateRetainCount$1(this._store, nodeKey, 1); + } + this.retain(); + this.autorelease_INTERNAL(); + } + retain() { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return () => void 0; + } + this._refCount++; + let released = false; + return () => { + if (!released) { + released = true; + this.release_INTERNAL(); + } + }; + } + autorelease_INTERNAL() { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + if (!isSSR$1) { + window.setTimeout(() => this.release_INTERNAL(), 0); + } + } + release_INTERNAL() { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + this._refCount--; + if (this._refCount === 0) + ; + } + checkRefCount_INTERNAL() { + if (Recoil_gkx_1("recoil_memory_managament_2020") && this._refCount <= 0) { + if (true) { + Recoil_recoverableViolation(retainWarning); + } + } + } + getStore_INTERNAL() { + this.checkRefCount_INTERNAL(); + return this._store; + } + getID() { + this.checkRefCount_INTERNAL(); + return this.getID_INTERNAL(); + } + getID_INTERNAL() { + this.checkRefCount_INTERNAL(); + return this._store.getState().currentTree.stateID; + } +}; +function cloneStoreState(store, treeState, bumpVersion = false) { + const storeState = store.getState(); + const version = bumpVersion ? getNextTreeStateVersion$1() : treeState.version; + return { + currentTree: bumpVersion ? { + version, + stateID: version, + transactionMetadata: { + ...treeState.transactionMetadata + }, + dirtyAtoms: new Set(treeState.dirtyAtoms), + atomValues: treeState.atomValues.clone(), + nonvalidatedAtoms: treeState.nonvalidatedAtoms.clone() + } : treeState, + commitDepth: 0, + nextTree: null, + previousTree: null, + knownAtoms: new Set(storeState.knownAtoms), + knownSelectors: new Set(storeState.knownSelectors), + transactionSubscriptions: /* @__PURE__ */ new Map(), + nodeTransactionSubscriptions: /* @__PURE__ */ new Map(), + nodeToComponentSubscriptions: /* @__PURE__ */ new Map(), + queuedComponentCallbacks_DEPRECATED: [], + suspendedComponentResolvers: /* @__PURE__ */ new Set(), + graphsByVersion: (/* @__PURE__ */ new Map()).set(version, store.getGraph(treeState.version)), + versionsUsedByComponent: /* @__PURE__ */ new Map(), + retention: { + referenceCounts: /* @__PURE__ */ new Map(), + nodesRetainedByZone: /* @__PURE__ */ new Map(), + retainablesToCheckForRelease: /* @__PURE__ */ new Set() + }, + nodeCleanupFunctions: /* @__PURE__ */ new Map() + }; +} +function freshSnapshot(initializeState) { + const snapshot = new Snapshot(makeEmptyStoreState$1()); + return initializeState != null ? snapshot.map(initializeState) : snapshot; +} +function cloneSnapshot(store, version = "current") { + const storeState = store.getState(); + const treeState = version === "current" ? storeState.currentTree : Recoil_nullthrows(storeState.previousTree); + return new Snapshot(cloneStoreState(store, treeState)); +} +var MutableSnapshot = class extends Snapshot { + constructor(snapshot, batch) { + super(cloneStoreState(snapshot.getStore_INTERNAL(), snapshot.getStore_INTERNAL().getState().currentTree, true)); + _defineProperty(this, "_batch", void 0); + _defineProperty(this, "set", (recoilState, newValueOrUpdater) => { + this.checkRefCount_INTERNAL(); + const store = this.getStore_INTERNAL(); + this._batch(() => { + updateRetainCount$1(store, recoilState.key, 1); + setRecoilValue$1(this.getStore_INTERNAL(), recoilState, newValueOrUpdater); + }); + }); + _defineProperty(this, "reset", (recoilState) => { + this.checkRefCount_INTERNAL(); + const store = this.getStore_INTERNAL(); + this._batch(() => { + updateRetainCount$1(store, recoilState.key, 1); + setRecoilValue$1(this.getStore_INTERNAL(), recoilState, DEFAULT_VALUE$1); + }); + }); + _defineProperty(this, "setUnvalidatedAtomValues_DEPRECATED", (values) => { + this.checkRefCount_INTERNAL(); + const store = this.getStore_INTERNAL(); + batchUpdates$1(() => { + for (const [k5, v3] of values.entries()) { + updateRetainCount$1(store, k5, 1); + setUnvalidatedRecoilValue$1(store, new AbstractRecoilValue$2(k5), v3); + } + }); + }); + this._batch = batch; + } +}; +var Recoil_Snapshot = { + Snapshot, + MutableSnapshot, + freshSnapshot, + cloneSnapshot +}; +var Recoil_Snapshot_1 = Recoil_Snapshot.Snapshot; +var Recoil_Snapshot_2 = Recoil_Snapshot.MutableSnapshot; +var Recoil_Snapshot_3 = Recoil_Snapshot.freshSnapshot; +var Recoil_Snapshot_4 = Recoil_Snapshot.cloneSnapshot; +var Recoil_Snapshot$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + Snapshot: Recoil_Snapshot_1, + MutableSnapshot: Recoil_Snapshot_2, + freshSnapshot: Recoil_Snapshot_3, + cloneSnapshot: Recoil_Snapshot_4 +}); +var { + getNextTreeStateVersion: getNextTreeStateVersion$2, + makeEmptyStoreState: makeEmptyStoreState$2 +} = Recoil_State; +var { + cleanUpNode: cleanUpNode$2, + getDownstreamNodes: getDownstreamNodes$2, + setNodeValue: setNodeValue$2, + setUnvalidatedAtomValue_DEPRECATED: setUnvalidatedAtomValue_DEPRECATED$1 +} = Recoil_FunctionalCore; +var { + graph: graph$3 +} = Recoil_Graph; +var { + cloneGraph: cloneGraph$1 +} = Recoil_Graph; +var { + applyAtomValueWrites: applyAtomValueWrites$1 +} = Recoil_RecoilValueInterface; +var { + releaseScheduledRetainablesNow: releaseScheduledRetainablesNow$1 +} = Recoil_Retention; +var { + freshSnapshot: freshSnapshot$1 +} = Recoil_Snapshot$1; +var { + useCallback, + useContext, + useEffect, + useMemo, + useRef, + useState +} = _n; +function notInAContext() { + throw new Error("This component must be used inside a component."); +} +var defaultStore = Object.freeze({ + getState: notInAContext, + replaceState: notInAContext, + getGraph: notInAContext, + subscribeToTransactions: notInAContext, + addTransactionMetadata: notInAContext +}); +var stateReplacerIsBeingExecuted = false; +function startNextTreeIfNeeded(store) { + if (stateReplacerIsBeingExecuted) { + throw new Error("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions."); + } + const storeState = store.getState(); + if (storeState.nextTree === null) { + if (Recoil_gkx_1("recoil_memory_managament_2020") && Recoil_gkx_1("recoil_release_on_cascading_update_killswitch_2021")) { + if (storeState.commitDepth > 0) { + releaseScheduledRetainablesNow$1(store); + } + } + const version = storeState.currentTree.version; + const nextVersion = getNextTreeStateVersion$2(); + storeState.nextTree = { + ...storeState.currentTree, + version: nextVersion, + stateID: nextVersion, + dirtyAtoms: /* @__PURE__ */ new Set(), + transactionMetadata: {} + }; + storeState.graphsByVersion.set(nextVersion, cloneGraph$1(Recoil_nullthrows(storeState.graphsByVersion.get(version)))); + } +} +var AppContext = _n.createContext({ + current: defaultStore +}); +var useStoreRef = () => useContext(AppContext); +var MutableSourceContext = _n.createContext(null); +function useRecoilMutableSource() { + const mutableSource = useContext(MutableSourceContext); + if (mutableSource == null) { + Recoil_expectationViolation("Attempted to use a Recoil hook outside of a . must be an ancestor of any component that uses Recoil hooks."); + } + return mutableSource; +} +function notifyComponents(store, storeState, treeState) { + const dependentNodes = getDownstreamNodes$2(store, treeState, treeState.dirtyAtoms); + for (const key2 of dependentNodes) { + const comps = storeState.nodeToComponentSubscriptions.get(key2); + if (comps) { + for (const [_subID, [_debugName, callback]] of comps) { + callback(treeState); + } + } + } +} +function sendEndOfBatchNotifications(store) { + const storeState = store.getState(); + const treeState = storeState.currentTree; + const dirtyAtoms = treeState.dirtyAtoms; + if (dirtyAtoms.size) { + for (const [key2, subscriptions] of storeState.nodeTransactionSubscriptions) { + if (dirtyAtoms.has(key2)) { + for (const [_3, subscription] of subscriptions) { + subscription(store); + } + } + } + for (const [_3, subscription] of storeState.transactionSubscriptions) { + subscription(store); + } + if (!Recoil_gkx_1("recoil_early_rendering_2021") || storeState.suspendedComponentResolvers.size) { + notifyComponents(store, storeState, treeState); + storeState.suspendedComponentResolvers.forEach((cb) => cb()); + storeState.suspendedComponentResolvers.clear(); + } + } + storeState.queuedComponentCallbacks_DEPRECATED.forEach((cb) => cb(treeState)); + storeState.queuedComponentCallbacks_DEPRECATED.splice(0, storeState.queuedComponentCallbacks_DEPRECATED.length); +} +function endBatch(storeRef) { + const storeState = storeRef.current.getState(); + storeState.commitDepth++; + try { + const { + nextTree + } = storeState; + if (nextTree === null) { + return; + } + storeState.previousTree = storeState.currentTree; + storeState.currentTree = nextTree; + storeState.nextTree = null; + sendEndOfBatchNotifications(storeRef.current); + if (storeState.previousTree != null) { + storeState.graphsByVersion.delete(storeState.previousTree.version); + } else { + Recoil_recoverableViolation("Ended batch with no previous state, which is unexpected", "recoil"); + } + storeState.previousTree = null; + if (Recoil_gkx_1("recoil_memory_managament_2020")) { + releaseScheduledRetainablesNow$1(storeRef.current); + } + } finally { + storeState.commitDepth--; + } +} +function Batcher({ + setNotifyBatcherOfChange +}) { + const storeRef = useStoreRef(); + const [_3, setState] = useState([]); + setNotifyBatcherOfChange(() => setState({})); + useEffect(() => { + Recoil_Queue.enqueueExecution("Batcher", () => { + endBatch(storeRef); + }); + }); + useEffect(() => { + return () => { + setNotifyBatcherOfChange(() => { + }); + }; + }, [setNotifyBatcherOfChange]); + return null; +} +if (true) { + if (typeof window !== "undefined" && !window.$recoilDebugStates) { + window.$recoilDebugStates = []; + } +} +function initialStoreState_DEPRECATED(store, initializeState) { + const initial = makeEmptyStoreState$2(); + initializeState({ + set: (atom2, value) => { + const state = initial.currentTree; + const writes = setNodeValue$2(store, state, atom2.key, value); + const writtenNodes = new Set(writes.keys()); + const nonvalidatedAtoms = state.nonvalidatedAtoms.clone(); + for (const n4 of writtenNodes) { + nonvalidatedAtoms.delete(n4); + } + initial.currentTree = { + ...state, + dirtyAtoms: Recoil_unionSets(state.dirtyAtoms, writtenNodes), + atomValues: applyAtomValueWrites$1(state.atomValues, writes), + nonvalidatedAtoms + }; + }, + setUnvalidatedAtomValues: (atomValues) => { + atomValues.forEach((v3, k5) => { + initial.currentTree = setUnvalidatedAtomValue_DEPRECATED$1(initial.currentTree, k5, v3); + }); + } + }); + return initial; +} +function initialStoreState(initializeState) { + const snapshot = freshSnapshot$1().map(initializeState); + return snapshot.getStore_INTERNAL().getState(); +} +var nextID = 0; +function RecoilRoot_INTERNAL({ + initializeState_DEPRECATED, + initializeState, + store_INTERNAL: storeProp, + children +}) { + var _createMutableSource; + let storeState; + const getGraph = (version) => { + const graphs = storeState.current.graphsByVersion; + if (graphs.has(version)) { + return Recoil_nullthrows(graphs.get(version)); + } + const newGraph = graph$3(); + graphs.set(version, newGraph); + return newGraph; + }; + const subscribeToTransactions = (callback, key2) => { + if (key2 == null) { + const { + transactionSubscriptions + } = storeRef.current.getState(); + const id = nextID++; + transactionSubscriptions.set(id, callback); + return { + release: () => { + transactionSubscriptions.delete(id); + } + }; + } else { + const { + nodeTransactionSubscriptions + } = storeRef.current.getState(); + if (!nodeTransactionSubscriptions.has(key2)) { + nodeTransactionSubscriptions.set(key2, /* @__PURE__ */ new Map()); + } + const id = nextID++; + Recoil_nullthrows(nodeTransactionSubscriptions.get(key2)).set(id, callback); + return { + release: () => { + const subs = nodeTransactionSubscriptions.get(key2); + if (subs) { + subs.delete(id); + if (subs.size === 0) { + nodeTransactionSubscriptions.delete(key2); + } + } + } + }; + } + }; + const addTransactionMetadata = (metadata) => { + startNextTreeIfNeeded(storeRef.current); + for (const k5 of Object.keys(metadata)) { + Recoil_nullthrows(storeRef.current.getState().nextTree).transactionMetadata[k5] = metadata[k5]; + } + }; + const replaceState = (replacer) => { + const storeState2 = storeRef.current.getState(); + startNextTreeIfNeeded(storeRef.current); + const nextTree = Recoil_nullthrows(storeState2.nextTree); + let replaced; + try { + stateReplacerIsBeingExecuted = true; + replaced = replacer(nextTree); + } finally { + stateReplacerIsBeingExecuted = false; + } + if (replaced === nextTree) { + return; + } + if (true) { + if (typeof window !== "undefined") { + window.$recoilDebugStates.push(replaced); + } + } + storeState2.nextTree = replaced; + if (Recoil_gkx_1("recoil_early_rendering_2021")) { + notifyComponents(store, storeState2, replaced); + } + Recoil_nullthrows(notifyBatcherOfChange.current)(); + }; + const notifyBatcherOfChange = useRef(null); + const setNotifyBatcherOfChange = useCallback((x5) => { + notifyBatcherOfChange.current = x5; + }, [notifyBatcherOfChange]); + const createMutableSource = (_createMutableSource = _n.createMutableSource) !== null && _createMutableSource !== void 0 ? _createMutableSource : _n.unstable_createMutableSource; + const store = storeProp !== null && storeProp !== void 0 ? storeProp : { + getState: () => storeState.current, + replaceState, + getGraph, + subscribeToTransactions, + addTransactionMetadata + }; + const storeRef = useRef(store); + storeState = useRef(initializeState_DEPRECATED != null ? initialStoreState_DEPRECATED(store, initializeState_DEPRECATED) : initializeState != null ? initialStoreState(initializeState) : makeEmptyStoreState$2()); + const mutableSource = useMemo(() => createMutableSource ? createMutableSource(storeState, () => storeState.current.currentTree.version) : null, [createMutableSource, storeState]); + useEffect(() => () => { + for (const atomKey of storeRef.current.getState().knownAtoms) { + cleanUpNode$2(storeRef.current, atomKey); + } + }, []); + return /* @__PURE__ */ _n.createElement(AppContext.Provider, { + value: storeRef + }, /* @__PURE__ */ _n.createElement(MutableSourceContext.Provider, { + value: mutableSource + }, /* @__PURE__ */ _n.createElement(Batcher, { + setNotifyBatcherOfChange + }), children)); +} +function RecoilRoot(props) { + const { + override, + ...propsExceptOverride + } = props; + const ancestorStoreRef = useStoreRef(); + if (override === false && ancestorStoreRef.current !== defaultStore) { + return props.children; + } + return /* @__PURE__ */ _n.createElement(RecoilRoot_INTERNAL, propsExceptOverride); +} +var Recoil_RecoilRoot_react = { + useStoreRef, + useRecoilMutableSource, + RecoilRoot, + notifyComponents_FOR_TESTING: notifyComponents, + sendEndOfBatchNotifications_FOR_TESTING: sendEndOfBatchNotifications +}; +var { + loadableWithValue: loadableWithValue$1 +} = Recoil_Loadable; +var { + DEFAULT_VALUE: DEFAULT_VALUE$2, + getNode: getNode$3 +} = Recoil_Node; +var { + copyTreeState: copyTreeState$1, + getRecoilValueAsLoadable: getRecoilValueAsLoadable$2, + invalidateDownstreams: invalidateDownstreams$1, + writeLoadableToTreeState: writeLoadableToTreeState$1 +} = Recoil_RecoilValueInterface; +function isAtom(recoilValue) { + return getNode$3(recoilValue.key).nodeType === "atom"; +} +var TransactionInterfaceImpl = class { + constructor(store, treeState) { + _defineProperty(this, "_store", void 0); + _defineProperty(this, "_treeState", void 0); + _defineProperty(this, "_changes", void 0); + _defineProperty(this, "get", (recoilValue) => { + if (this._changes.has(recoilValue.key)) { + return this._changes.get(recoilValue.key); + } + if (!isAtom(recoilValue)) { + throw new Error("Reading selectors within atomicUpdate is not supported"); + } + const loadable = getRecoilValueAsLoadable$2(this._store, recoilValue, this._treeState); + if (loadable.state === "hasValue") { + return loadable.contents; + } else if (loadable.state === "hasError") { + throw loadable.contents; + } else { + throw new Error(`Expected Recoil atom ${recoilValue.key} to have a value, but it is in a loading state.`); + } + }); + _defineProperty(this, "set", (recoilState, valueOrUpdater) => { + if (!isAtom(recoilState)) { + throw new Error("Setting selectors within atomicUpdate is not supported"); + } + if (typeof valueOrUpdater === "function") { + const current = this.get(recoilState); + this._changes.set(recoilState.key, valueOrUpdater(current)); + } else { + this._changes.set(recoilState.key, valueOrUpdater); + } + }); + _defineProperty(this, "reset", (recoilState) => { + this.set(recoilState, DEFAULT_VALUE$2); + }); + this._store = store; + this._treeState = treeState; + this._changes = /* @__PURE__ */ new Map(); + } + newTreeState_INTERNAL() { + if (this._changes.size === 0) { + return this._treeState; + } + const newState = copyTreeState$1(this._treeState); + for (const [k5, v3] of this._changes) { + writeLoadableToTreeState$1(newState, k5, loadableWithValue$1(v3)); + } + invalidateDownstreams$1(this._store, newState); + return newState; + } +}; +function atomicUpdater(store) { + return (fn3) => { + store.replaceState((treeState) => { + const changeset = new TransactionInterfaceImpl(store, treeState); + fn3(changeset); + return changeset.newTreeState_INTERNAL(); + }); + }; +} +var Recoil_AtomicUpdates = { + atomicUpdater +}; +var Recoil_AtomicUpdates_1 = Recoil_AtomicUpdates.atomicUpdater; +var Recoil_AtomicUpdates$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + atomicUpdater: Recoil_AtomicUpdates_1 +}); +function filterMap(map, callback) { + const result = /* @__PURE__ */ new Map(); + for (const [key2, value] of map) { + if (callback(value, key2)) { + result.set(key2, value); + } + } + return result; +} +var Recoil_filterMap = filterMap; +function filterSet(set, callback) { + const result = /* @__PURE__ */ new Set(); + for (const value of set) { + if (callback(value)) { + result.add(value); + } + } + return result; +} +var Recoil_filterSet = filterSet; +function invariant(condition, message) { + if (!condition) { + throw new Error(message); + } +} +var invariant_1 = invariant; +var Recoil_invariant = invariant_1; +function mergeMaps(...maps) { + const result = /* @__PURE__ */ new Map(); + for (let i5 = 0; i5 < maps.length; i5++) { + const iterator = maps[i5].keys(); + let nextKey; + while (!(nextKey = iterator.next()).done) { + result.set(nextKey.value, maps[i5].get(nextKey.value)); + } + } + return result; +} +var Recoil_mergeMaps = mergeMaps; +function shallowArrayEqual(a6, b4) { + if (a6 === b4) { + return true; + } + if (a6.length !== b4.length) { + return false; + } + for (let i5 = 0, l4 = a6.length; i5 < l4; i5++) { + if (a6[i5] !== b4[i5]) { + return false; + } + } + return true; +} +var Recoil_shallowArrayEqual = shallowArrayEqual; +var UNKNOWN_FUNCTION = ""; +function stackTraceParser(stackString) { + const lines = stackString.split("\n"); + return lines.reduce((stack, line) => { + const parseResult = parseChrome(line) || parseWinjs(line) || parseGecko(line) || parseNode(line) || parseJSC(line); + if (parseResult) { + stack.push(parseResult); + } + return stack; + }, []); +} +var chromeRe = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; +var chromeEvalRe = /\((\S*)(?::(\d+))(?::(\d+))\)/; +function parseChrome(line) { + const parts = chromeRe.exec(line); + if (!parts) { + return null; + } + const isNative = parts[2] && parts[2].indexOf("native") === 0; + const isEval = parts[2] && parts[2].indexOf("eval") === 0; + const submatch = chromeEvalRe.exec(parts[2]); + if (isEval && submatch != null) { + parts[2] = submatch[1]; + parts[3] = submatch[2]; + parts[4] = submatch[3]; + } + return { + file: !isNative ? parts[2] : null, + methodName: parts[1] || UNKNOWN_FUNCTION, + arguments: isNative ? [parts[2]] : [], + lineNumber: parts[3] ? +parts[3] : null, + column: parts[4] ? +parts[4] : null + }; +} +var winjsRe = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseWinjs(line) { + const parts = winjsRe.exec(line); + if (!parts) { + return null; + } + return { + file: parts[2], + methodName: parts[1] || UNKNOWN_FUNCTION, + arguments: [], + lineNumber: +parts[3], + column: parts[4] ? +parts[4] : null + }; +} +var geckoRe = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i; +var geckoEvalRe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; +function parseGecko(line) { + const parts = geckoRe.exec(line); + if (!parts) { + return null; + } + const isEval = parts[3] && parts[3].indexOf(" > eval") > -1; + const submatch = geckoEvalRe.exec(parts[3]); + if (isEval && submatch != null) { + parts[3] = submatch[1]; + parts[4] = submatch[2]; + parts[5] = null; + } + return { + file: parts[3], + methodName: parts[1] || UNKNOWN_FUNCTION, + arguments: parts[2] ? parts[2].split(",") : [], + lineNumber: parts[4] ? +parts[4] : null, + column: parts[5] ? +parts[5] : null + }; +} +var javaScriptCoreRe = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; +function parseJSC(line) { + const parts = javaScriptCoreRe.exec(line); + if (!parts) { + return null; + } + return { + file: parts[3], + methodName: parts[1] || UNKNOWN_FUNCTION, + arguments: [], + lineNumber: +parts[4], + column: parts[5] ? +parts[5] : null + }; +} +var nodeRe = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; +function parseNode(line) { + const parts = nodeRe.exec(line); + if (!parts) { + return null; + } + return { + file: parts[2], + methodName: parts[1] || UNKNOWN_FUNCTION, + arguments: [], + lineNumber: +parts[3], + column: parts[4] ? +parts[4] : null + }; +} +var Recoil_stackTraceParser = stackTraceParser; +var { + useRef: useRef$1 +} = _n; +function useComponentName() { + const nameRef = useRef$1(); + if (true) { + if (Recoil_gkx_1("recoil_infer_component_names")) { + var _nameRef$current; + if (nameRef.current === void 0) { + const frames = Recoil_stackTraceParser(new Error().stack); + for (const { + methodName + } of frames) { + if (!methodName.match(/\buse[^\b]+$/)) { + return nameRef.current = methodName; + } + } + nameRef.current = null; + } + return (_nameRef$current = nameRef.current) !== null && _nameRef$current !== void 0 ? _nameRef$current : ""; + } + } + return ""; +} +var Recoil_useComponentName = useComponentName; +var { + atomicUpdater: atomicUpdater$1 +} = Recoil_AtomicUpdates$1; +var { + batchUpdates: batchUpdates$2 +} = Recoil_Batching; +var { + DEFAULT_VALUE: DEFAULT_VALUE$3, + getNode: getNode$4, + nodes: nodes$1 +} = Recoil_Node; +var { + useRecoilMutableSource: useRecoilMutableSource$1, + useStoreRef: useStoreRef$1 +} = Recoil_RecoilRoot_react; +var { + isRecoilValue: isRecoilValue$2 +} = Recoil_RecoilValue$1; +var { + AbstractRecoilValue: AbstractRecoilValue$3, + getRecoilValueAsLoadable: getRecoilValueAsLoadable$3, + setRecoilValue: setRecoilValue$2, + setRecoilValueLoadable: setRecoilValueLoadable$1, + setUnvalidatedRecoilValue: setUnvalidatedRecoilValue$2, + subscribeToRecoilValue: subscribeToRecoilValue$1 +} = Recoil_RecoilValueInterface; +var { + updateRetainCount: updateRetainCount$2 +} = Recoil_Retention; +var { + RetentionZone: RetentionZone$3 +} = Recoil_RetentionZone; +var { + Snapshot: Snapshot$1, + cloneSnapshot: cloneSnapshot$1 +} = Recoil_Snapshot$1; +var { + setByAddingToSet: setByAddingToSet$2 +} = Recoil_CopyOnWrite; +var { + isSSR: isSSR$2 +} = Recoil_Environment; +var { + mutableSourceExists: mutableSourceExists$2, + useMutableSource: useMutableSource$1 +} = Recoil_mutableSource; +var { + useCallback: useCallback$1, + useEffect: useEffect$1, + useMemo: useMemo$1, + useRef: useRef$2, + useState: useState$1 +} = _n; +var SUSPENSE_TIMEOUT_MS = 12e4; +function handleLoadable(loadable, recoilValue, storeRef) { + if (loadable.state === "hasValue") { + return loadable.contents; + } else if (loadable.state === "loading") { + const promise = new Promise((resolve) => { + storeRef.current.getState().suspendedComponentResolvers.add(resolve); + }); + throw promise; + } else if (loadable.state === "hasError") { + throw loadable.contents; + } else { + const err = new Error(`Invalid value of loadable atom "${recoilValue.key}"`); + throw err; + } +} +function validateRecoilValue(recoilValue, hookName) { + if (!isRecoilValue$2(recoilValue)) { + throw new Error(`Invalid argument to ${hookName}: expected an atom or selector but got ${String(recoilValue)}`); + } +} +function useRecoilInterface_DEPRECATED() { + const storeRef = useStoreRef$1(); + const [_3, forceUpdate] = useState$1([]); + const recoilValuesUsed = useRef$2(/* @__PURE__ */ new Set()); + recoilValuesUsed.current = /* @__PURE__ */ new Set(); + const previousSubscriptions = useRef$2(/* @__PURE__ */ new Set()); + const subscriptions = useRef$2(/* @__PURE__ */ new Map()); + const unsubscribeFrom = useCallback$1((key2) => { + const sub = subscriptions.current.get(key2); + if (sub) { + sub.release(); + subscriptions.current.delete(key2); + } + }, [subscriptions]); + const componentName = Recoil_useComponentName(); + useEffect$1(() => { + const store = storeRef.current; + function updateState(_state, key2) { + if (!subscriptions.current.has(key2)) { + return; + } + forceUpdate([]); + } + Recoil_differenceSets(recoilValuesUsed.current, previousSubscriptions.current).forEach((key2) => { + if (subscriptions.current.has(key2)) { + Recoil_expectationViolation(`Double subscription to RecoilValue "${key2}"`); + return; + } + const sub = subscribeToRecoilValue$1(store, new AbstractRecoilValue$3(key2), (state2) => { + updateState(state2, key2); + }, componentName); + subscriptions.current.set(key2, sub); + const state = store.getState(); + if (state.nextTree) { + store.getState().queuedComponentCallbacks_DEPRECATED.push(() => { + updateState(store.getState(), key2); + }); + } else { + updateState(store.getState(), key2); + } + }); + Recoil_differenceSets(previousSubscriptions.current, recoilValuesUsed.current).forEach((key2) => { + unsubscribeFrom(key2); + }); + previousSubscriptions.current = recoilValuesUsed.current; + }); + useEffect$1(() => { + const subs = subscriptions.current; + return () => subs.forEach((_4, key2) => unsubscribeFrom(key2)); + }, [unsubscribeFrom]); + return useMemo$1(() => { + function useSetRecoilState2(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useSetRecoilState"); + } + return (newValueOrUpdater) => { + setRecoilValue$2(storeRef.current, recoilState, newValueOrUpdater); + }; + } + function useResetRecoilState2(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useResetRecoilState"); + } + return () => setRecoilValue$2(storeRef.current, recoilState, DEFAULT_VALUE$3); + } + function useRecoilValueLoadable2(recoilValue) { + var _storeState$nextTree; + if (true) { + validateRecoilValue(recoilValue, "useRecoilValueLoadable"); + } + if (!recoilValuesUsed.current.has(recoilValue.key)) { + recoilValuesUsed.current = setByAddingToSet$2(recoilValuesUsed.current, recoilValue.key); + } + const storeState = storeRef.current.getState(); + return getRecoilValueAsLoadable$3(storeRef.current, recoilValue, Recoil_gkx_1("recoil_early_rendering_2021") ? (_storeState$nextTree = storeState.nextTree) !== null && _storeState$nextTree !== void 0 ? _storeState$nextTree : storeState.currentTree : storeState.currentTree); + } + function useRecoilValue2(recoilValue) { + if (true) { + validateRecoilValue(recoilValue, "useRecoilValue"); + } + const loadable = useRecoilValueLoadable2(recoilValue); + return handleLoadable(loadable, recoilValue, storeRef); + } + function useRecoilState2(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useRecoilState"); + } + return [useRecoilValue2(recoilState), useSetRecoilState2(recoilState)]; + } + function useRecoilStateLoadable2(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useRecoilStateLoadable"); + } + return [useRecoilValueLoadable2(recoilState), useSetRecoilState2(recoilState)]; + } + return { + getRecoilValue: useRecoilValue2, + getRecoilValueLoadable: useRecoilValueLoadable2, + getRecoilState: useRecoilState2, + getRecoilStateLoadable: useRecoilStateLoadable2, + getSetRecoilState: useSetRecoilState2, + getResetRecoilState: useResetRecoilState2 + }; + }, [recoilValuesUsed, storeRef]); +} +var recoilComponentGetRecoilValueCount_FOR_TESTING = { + current: 0 +}; +function useRecoilValueLoadable_MUTABLESOURCE(recoilValue) { + if (true) { + validateRecoilValue(recoilValue, "useRecoilValueLoadable"); + } + const storeRef = useStoreRef$1(); + const getLoadable = useCallback$1(() => { + var _storeState$nextTree2; + const store = storeRef.current; + const storeState = store.getState(); + const treeState = Recoil_gkx_1("recoil_early_rendering_2021") ? (_storeState$nextTree2 = storeState.nextTree) !== null && _storeState$nextTree2 !== void 0 ? _storeState$nextTree2 : storeState.currentTree : storeState.currentTree; + return getRecoilValueAsLoadable$3(store, recoilValue, treeState); + }, [storeRef, recoilValue]); + const getLoadableWithTesting = useCallback$1(() => { + if (true) { + recoilComponentGetRecoilValueCount_FOR_TESTING.current++; + } + return getLoadable(); + }, [getLoadable]); + const componentName = Recoil_useComponentName(); + const subscribe = useCallback$1((_storeState, callback) => { + const store = storeRef.current; + const subscription = subscribeToRecoilValue$1(store, recoilValue, () => { + if (!Recoil_gkx_1("recoil_suppress_rerender_in_callback")) { + return callback(); + } + const newLoadable = getLoadable(); + if (!prevLoadableRef.current.is(newLoadable)) { + callback(); + } + prevLoadableRef.current = newLoadable; + }, componentName); + return subscription.release; + }, [storeRef, recoilValue, componentName, getLoadable]); + const source = useRecoilMutableSource$1(); + const loadable = useMutableSource$1(source, getLoadableWithTesting, subscribe); + const prevLoadableRef = useRef$2(loadable); + useEffect$1(() => { + prevLoadableRef.current = loadable; + }); + return loadable; +} +function useRecoilValueLoadable_LEGACY(recoilValue) { + if (true) { + validateRecoilValue(recoilValue, "useRecoilValueLoadable"); + } + const storeRef = useStoreRef$1(); + const [_3, forceUpdate] = useState$1([]); + const componentName = Recoil_useComponentName(); + useEffect$1(() => { + const store = storeRef.current; + const storeState = store.getState(); + const subscription = subscribeToRecoilValue$1(store, recoilValue, (_state) => { + var _prevLoadableRef$curr; + if (!Recoil_gkx_1("recoil_suppress_rerender_in_callback")) { + return forceUpdate([]); + } + const newLoadable = getRecoilValueAsLoadable$3(store, recoilValue, store.getState().currentTree); + if (!((_prevLoadableRef$curr = prevLoadableRef.current) === null || _prevLoadableRef$curr === void 0 ? void 0 : _prevLoadableRef$curr.is(newLoadable))) { + forceUpdate(newLoadable); + } + prevLoadableRef.current = newLoadable; + }, componentName); + if (storeState.nextTree) { + store.getState().queuedComponentCallbacks_DEPRECATED.push(() => { + prevLoadableRef.current = null; + forceUpdate([]); + }); + } else { + var _prevLoadableRef$curr2; + if (!Recoil_gkx_1("recoil_suppress_rerender_in_callback")) { + return forceUpdate([]); + } + const newLoadable = getRecoilValueAsLoadable$3(store, recoilValue, store.getState().currentTree); + if (!((_prevLoadableRef$curr2 = prevLoadableRef.current) === null || _prevLoadableRef$curr2 === void 0 ? void 0 : _prevLoadableRef$curr2.is(newLoadable))) { + forceUpdate(newLoadable); + } + prevLoadableRef.current = newLoadable; + } + return subscription.release; + }, [componentName, recoilValue, storeRef]); + const loadable = getRecoilValueAsLoadable$3(storeRef.current, recoilValue); + const prevLoadableRef = useRef$2(loadable); + useEffect$1(() => { + prevLoadableRef.current = loadable; + }); + return loadable; +} +function useRecoilValueLoadable(recoilValue) { + if (Recoil_gkx_1("recoil_memory_managament_2020")) { + useRetain(recoilValue); + } + if (mutableSourceExists$2()) { + return useRecoilValueLoadable_MUTABLESOURCE(recoilValue); + } else { + return useRecoilValueLoadable_LEGACY(recoilValue); + } +} +function useRecoilValue(recoilValue) { + if (true) { + validateRecoilValue(recoilValue, "useRecoilValue"); + } + const storeRef = useStoreRef$1(); + const loadable = useRecoilValueLoadable(recoilValue); + return handleLoadable(loadable, recoilValue, storeRef); +} +function useSetRecoilState(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useSetRecoilState"); + } + const storeRef = useStoreRef$1(); + return useCallback$1((newValueOrUpdater) => { + setRecoilValue$2(storeRef.current, recoilState, newValueOrUpdater); + }, [storeRef, recoilState]); +} +function useResetRecoilState(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useResetRecoilState"); + } + const storeRef = useStoreRef$1(); + return useCallback$1(() => { + setRecoilValue$2(storeRef.current, recoilState, DEFAULT_VALUE$3); + }, [storeRef, recoilState]); +} +function useRecoilState(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useRecoilState"); + } + return [useRecoilValue(recoilState), useSetRecoilState(recoilState)]; +} +function useRecoilStateLoadable(recoilState) { + if (true) { + validateRecoilValue(recoilState, "useRecoilStateLoadable"); + } + return [useRecoilValueLoadable(recoilState), useSetRecoilState(recoilState)]; +} +function useTransactionSubscription(callback) { + const storeRef = useStoreRef$1(); + useEffect$1(() => { + const sub = storeRef.current.subscribeToTransactions(callback); + return sub.release; + }, [callback, storeRef]); +} +function externallyVisibleAtomValuesInState(state) { + const atomValues = state.atomValues.toMap(); + const persistedAtomContentsValues = Recoil_mapMap(Recoil_filterMap(atomValues, (v3, k5) => { + const node = getNode$4(k5); + const persistence = node.persistence_UNSTABLE; + return persistence != null && persistence.type !== "none" && v3.state === "hasValue"; + }), (v3) => v3.contents); + return Recoil_mergeMaps(state.nonvalidatedAtoms.toMap(), persistedAtomContentsValues); +} +function useTransactionObservation_DEPRECATED(callback) { + useTransactionSubscription(useCallback$1((store) => { + let previousTree = store.getState().previousTree; + const currentTree = store.getState().currentTree; + if (!previousTree) { + Recoil_recoverableViolation("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"); + previousTree = store.getState().currentTree; + } + const atomValues = externallyVisibleAtomValuesInState(currentTree); + const previousAtomValues = externallyVisibleAtomValuesInState(previousTree); + const atomInfo = Recoil_mapMap(nodes$1, (node) => { + var _node$persistence_UNS, _node$persistence_UNS2, _node$persistence_UNS3, _node$persistence_UNS4; + return { + persistence_UNSTABLE: { + type: (_node$persistence_UNS = (_node$persistence_UNS2 = node.persistence_UNSTABLE) === null || _node$persistence_UNS2 === void 0 ? void 0 : _node$persistence_UNS2.type) !== null && _node$persistence_UNS !== void 0 ? _node$persistence_UNS : "none", + backButton: (_node$persistence_UNS3 = (_node$persistence_UNS4 = node.persistence_UNSTABLE) === null || _node$persistence_UNS4 === void 0 ? void 0 : _node$persistence_UNS4.backButton) !== null && _node$persistence_UNS3 !== void 0 ? _node$persistence_UNS3 : false + } + }; + }); + const modifiedAtoms = Recoil_filterSet(currentTree.dirtyAtoms, (k5) => atomValues.has(k5) || previousAtomValues.has(k5)); + callback({ + atomValues, + previousAtomValues, + atomInfo, + modifiedAtoms, + transactionMetadata: { + ...currentTree.transactionMetadata + } + }); + }, [callback])); +} +function useRecoilTransactionObserver(callback) { + useTransactionSubscription(useCallback$1((store) => { + const snapshot = cloneSnapshot$1(store, "current"); + const previousSnapshot = cloneSnapshot$1(store, "previous"); + callback({ + snapshot, + previousSnapshot + }); + }, [callback])); +} +function usePrevious(value) { + const ref = useRef$2(); + useEffect$1(() => { + ref.current = value; + }); + return ref.current; +} +function useRecoilSnapshot() { + const storeRef = useStoreRef$1(); + const [snapshot, setSnapshot] = useState$1(() => cloneSnapshot$1(storeRef.current)); + const previousSnapshot = usePrevious(snapshot); + const timeoutID = useRef$2(); + useEffect$1(() => { + if (timeoutID.current && !isSSR$2) { + window.clearTimeout(timeoutID.current); + } + return snapshot.retain(); + }, [snapshot]); + useTransactionSubscription(useCallback$1((store) => setSnapshot(cloneSnapshot$1(store)), [])); + if (previousSnapshot !== snapshot && !isSSR$2) { + if (timeoutID.current) { + previousSnapshot === null || previousSnapshot === void 0 ? void 0 : previousSnapshot.release_INTERNAL(); + window.clearTimeout(timeoutID.current); + } + snapshot.retain(); + timeoutID.current = window.setTimeout(() => { + snapshot.release_INTERNAL(); + timeoutID.current = null; + }, SUSPENSE_TIMEOUT_MS); + } + return snapshot; +} +function useGotoRecoilSnapshot() { + const storeRef = useStoreRef$1(); + return useCallback$1((snapshot) => { + var _storeState$nextTree3; + const storeState = storeRef.current.getState(); + const prev = (_storeState$nextTree3 = storeState.nextTree) !== null && _storeState$nextTree3 !== void 0 ? _storeState$nextTree3 : storeState.currentTree; + const next = snapshot.getStore_INTERNAL().getState().currentTree; + batchUpdates$2(() => { + const keysToUpdate = /* @__PURE__ */ new Set(); + for (const keys of [prev.atomValues.keys(), next.atomValues.keys()]) { + for (const key2 of keys) { + var _prev$atomValues$get, _next$atomValues$get; + if (((_prev$atomValues$get = prev.atomValues.get(key2)) === null || _prev$atomValues$get === void 0 ? void 0 : _prev$atomValues$get.contents) !== ((_next$atomValues$get = next.atomValues.get(key2)) === null || _next$atomValues$get === void 0 ? void 0 : _next$atomValues$get.contents) && getNode$4(key2).shouldRestoreFromSnapshots) { + keysToUpdate.add(key2); + } + } + } + keysToUpdate.forEach((key2) => { + setRecoilValueLoadable$1(storeRef.current, new AbstractRecoilValue$3(key2), next.atomValues.has(key2) ? Recoil_nullthrows(next.atomValues.get(key2)) : DEFAULT_VALUE$3); + }); + storeRef.current.replaceState((state) => { + return { + ...state, + stateID: snapshot.getID_INTERNAL() + }; + }); + }); + }, [storeRef]); +} +function useSetUnvalidatedAtomValues() { + const storeRef = useStoreRef$1(); + return (values, transactionMetadata = {}) => { + batchUpdates$2(() => { + storeRef.current.addTransactionMetadata(transactionMetadata); + values.forEach((value, key2) => setUnvalidatedRecoilValue$2(storeRef.current, new AbstractRecoilValue$3(key2), value)); + }); + }; +} +var Sentinel = class { +}; +var SENTINEL = new Sentinel(); +function useRecoilCallback(fn3, deps) { + const storeRef = useStoreRef$1(); + const gotoSnapshot = useGotoRecoilSnapshot(); + return useCallback$1((...args) => { + function set(recoilState, newValueOrUpdater) { + setRecoilValue$2(storeRef.current, recoilState, newValueOrUpdater); + } + function reset(recoilState) { + setRecoilValue$2(storeRef.current, recoilState, DEFAULT_VALUE$3); + } + const snapshot = cloneSnapshot$1(storeRef.current); + const atomicUpdate = atomicUpdater$1(storeRef.current); + let ret = SENTINEL; + batchUpdates$2(() => { + const errMsg = "useRecoilCallback expects a function that returns a function: it accepts a function of the type (RecoilInterface) => T = R and returns a callback function T => R, where RecoilInterface is an object {snapshot, set, ...} and T and R are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details."; + if (typeof fn3 !== "function") { + throw new Error(errMsg); + } + const cb = fn3({ + set, + reset, + snapshot, + gotoSnapshot, + transact_UNSTABLE: atomicUpdate + }); + if (typeof cb !== "function") { + throw new Error(errMsg); + } + ret = cb(...args); + }); + !!(ret instanceof Sentinel) ? true ? Recoil_invariant(false, "batchUpdates should return immediately") : Recoil_invariant(false) : void 0; + return ret; + }, deps != null ? [...deps, storeRef] : void 0); +} +function useRetain(toRetain) { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + return useRetain_ACTUAL(toRetain); +} +function useRetain_ACTUAL(toRetain) { + const array = Array.isArray(toRetain) ? toRetain : [toRetain]; + const retainables = array.map((a6) => a6 instanceof RetentionZone$3 ? a6 : a6.key); + const storeRef = useStoreRef$1(); + useEffect$1(() => { + if (!Recoil_gkx_1("recoil_memory_managament_2020")) { + return; + } + const store = storeRef.current; + if (timeoutID.current && !isSSR$2) { + window.clearTimeout(timeoutID.current); + timeoutID.current = null; + } else { + for (const r6 of retainables) { + updateRetainCount$2(store, r6, 1); + } + } + return () => { + for (const r6 of retainables) { + updateRetainCount$2(store, r6, -1); + } + }; + }, [storeRef, ...retainables]); + const timeoutID = useRef$2(); + const previousRetainables = usePrevious(retainables); + if (!isSSR$2 && (previousRetainables === void 0 || !Recoil_shallowArrayEqual(previousRetainables, retainables))) { + const store = storeRef.current; + for (const r6 of retainables) { + updateRetainCount$2(store, r6, 1); + } + if (previousRetainables) { + for (const r6 of previousRetainables) { + updateRetainCount$2(store, r6, -1); + } + } + if (timeoutID.current) { + window.clearTimeout(timeoutID.current); + } + timeoutID.current = window.setTimeout(() => { + timeoutID.current = null; + for (const r6 of retainables) { + updateRetainCount$2(store, r6, -1); + } + }, SUSPENSE_TIMEOUT_MS); + } +} +function useRecoilTransaction(fn3, deps) { + const storeRef = useStoreRef$1(); + return useMemo$1(() => (...args) => { + const atomicUpdate = atomicUpdater$1(storeRef.current); + atomicUpdate((transactionInterface) => { + fn3(transactionInterface)(...args); + }); + }, deps != null ? [...deps, storeRef] : void 0); +} +var Recoil_Hooks = { + recoilComponentGetRecoilValueCount_FOR_TESTING, + useGotoRecoilSnapshot, + useRecoilCallback, + useRecoilInterface: useRecoilInterface_DEPRECATED, + useRecoilSnapshot, + useRecoilState, + useRecoilStateLoadable, + useRecoilTransaction, + useRecoilTransactionObserver, + useRecoilValue, + useRecoilValueLoadable, + useRetain, + useResetRecoilState, + useSetRecoilState, + useSetUnvalidatedAtomValues, + useTransactionObservation_DEPRECATED, + useTransactionSubscription_DEPRECATED: useTransactionSubscription +}; +var { + peekNodeInfo: peekNodeInfo$2 +} = Recoil_FunctionalCore; +var { + useStoreRef: useStoreRef$2 +} = Recoil_RecoilRoot_react; +function useGetRecoilValueInfo() { + const storeRef = useStoreRef$2(); + return ({ + key: key2 + }) => peekNodeInfo$2(storeRef.current, storeRef.current.getState().currentTree, key2); +} +var Recoil_useGetRecoilValueInfo = useGetRecoilValueInfo; +var { + RecoilRoot: RecoilRoot$1, + useStoreRef: useStoreRef$3 +} = Recoil_RecoilRoot_react; +var { + useMemo: useMemo$2 +} = _n; +function useRecoilBridgeAcrossReactRoots() { + const store = useStoreRef$3().current; + return useMemo$2(() => { + function RecoilBridge({ + children + }) { + return /* @__PURE__ */ _n.createElement(RecoilRoot$1, { + store_INTERNAL: store + }, children); + } + return RecoilBridge; + }, [store]); +} +var Recoil_useRecoilBridgeAcrossReactRoots = useRecoilBridgeAcrossReactRoots; +function isNode(object) { + var _ownerDocument, _doc$defaultView; + if (typeof window === "undefined") { + return false; + } + const doc = object != null ? (_ownerDocument = object.ownerDocument) !== null && _ownerDocument !== void 0 ? _ownerDocument : object : document; + const defaultView = (_doc$defaultView = doc.defaultView) !== null && _doc$defaultView !== void 0 ? _doc$defaultView : window; + return !!(object != null && (typeof defaultView.Node === "function" ? object instanceof defaultView.Node : typeof object === "object" && typeof object.nodeType === "number" && typeof object.nodeName === "string")); +} +var Recoil_isNode = isNode; +var { + isReactNative: isReactNative$1, + isSSR: isSSR$3 +} = Recoil_Environment; +function shouldNotBeFrozen(value) { + if (value === null || typeof value !== "object") { + return true; + } + switch (typeof value.$$typeof) { + case "symbol": + return true; + case "number": + return true; + } + if (value["@@__IMMUTABLE_ITERABLE__@@"] != null || value["@@__IMMUTABLE_KEYED__@@"] != null || value["@@__IMMUTABLE_INDEXED__@@"] != null || value["@@__IMMUTABLE_ORDERED__@@"] != null || value["@@__IMMUTABLE_RECORD__@@"] != null) { + return true; + } + if (Recoil_isNode(value)) { + return true; + } + if (Recoil_isPromise(value)) { + return true; + } + if (value instanceof Error) { + return true; + } + if (ArrayBuffer.isView(value)) { + return true; + } + if (!isSSR$3 && !isReactNative$1 && (value === window || value instanceof Window)) { + return true; + } + return false; +} +function deepFreezeValue(value) { + if (typeof value !== "object" || shouldNotBeFrozen(value)) { + return; + } + Object.freeze(value); + for (const key2 in value) { + if (Object.prototype.hasOwnProperty.call(value, key2)) { + const prop = value[key2]; + if (typeof prop === "object" && prop != null && !Object.isFrozen(prop)) { + deepFreezeValue(prop); + } + } + } + Object.seal(value); +} +var Recoil_deepFreezeValue = deepFreezeValue; +var TIME_WARNING_THRESHOLD_MS = 15; +function stringify(x5, opt, key2) { + if (typeof x5 === "string" && !x5.includes('"') && !x5.includes("\\")) { + return `"${x5}"`; + } + switch (typeof x5) { + case "undefined": + return ""; + case "boolean": + return x5 ? "true" : "false"; + case "number": + case "symbol": + return String(x5); + case "string": + return JSON.stringify(x5); + case "function": + if ((opt === null || opt === void 0 ? void 0 : opt.allowFunctions) !== true) { + throw new Error("Attempt to serialize function in a Recoil cache key"); + } + return `__FUNCTION(${x5.name})__`; + } + if (x5 === null) { + return "null"; + } + if (typeof x5 !== "object") { + var _JSON$stringify; + return (_JSON$stringify = JSON.stringify(x5)) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : ""; + } + if (Recoil_isPromise(x5)) { + return "__PROMISE__"; + } + if (Array.isArray(x5)) { + return `[${x5.map((v3, i5) => stringify(v3, opt, i5.toString()))}]`; + } + if (typeof x5.toJSON === "function") { + return stringify(x5.toJSON(key2), opt, key2); + } + if (x5 instanceof Map) { + const obj = {}; + for (const [k5, v3] of x5) { + obj[typeof k5 === "string" ? k5 : stringify(k5, opt)] = v3; + } + return stringify(obj, opt, key2); + } + if (x5 instanceof Set) { + return stringify(Array.from(x5).sort((a6, b4) => stringify(a6, opt).localeCompare(stringify(b4, opt))), opt, key2); + } + if (Symbol !== void 0 && x5[Symbol.iterator] != null && typeof x5[Symbol.iterator] === "function") { + return stringify(Array.from(x5), opt, key2); + } + return `{${Object.keys(x5).filter((key3) => x5[key3] !== void 0).sort().map((key3) => `${stringify(key3, opt)}:${stringify(x5[key3], opt, key3)}`).join(",")}}`; +} +function stableStringify(x5, opt = { + allowFunctions: false +}) { + if (true) { + if (typeof window !== "undefined") { + const startTime = window.performance ? window.performance.now() : 0; + const str = stringify(x5, opt); + const endTime = window.performance ? window.performance.now() : 0; + if (endTime - startTime > TIME_WARNING_THRESHOLD_MS) { + console.groupCollapsed(`Recoil: Spent ${endTime - startTime}ms computing a cache key`); + console.warn(x5, str); + console.groupEnd(); + } + return str; + } + } + return stringify(x5, opt); +} +var Recoil_stableStringify = stableStringify; +var TreeCache = class { + constructor(options) { + var _options$onHit, _options$onSet, _options$mapNodeValue; + _defineProperty(this, "_numLeafs", void 0); + _defineProperty(this, "_root", void 0); + _defineProperty(this, "_onHit", void 0); + _defineProperty(this, "_onSet", void 0); + _defineProperty(this, "_mapNodeValue", void 0); + this._numLeafs = 0; + this._root = null; + this._onHit = (_options$onHit = options === null || options === void 0 ? void 0 : options.onHit) !== null && _options$onHit !== void 0 ? _options$onHit : () => { + }; + this._onSet = (_options$onSet = options === null || options === void 0 ? void 0 : options.onSet) !== null && _options$onSet !== void 0 ? _options$onSet : () => { + }; + this._mapNodeValue = (_options$mapNodeValue = options === null || options === void 0 ? void 0 : options.mapNodeValue) !== null && _options$mapNodeValue !== void 0 ? _options$mapNodeValue : (val) => val; + } + size() { + return this._numLeafs; + } + root() { + return this._root; + } + get(getNodeValue, handlers) { + var _this$getLeafNode; + return (_this$getLeafNode = this.getLeafNode(getNodeValue, handlers)) === null || _this$getLeafNode === void 0 ? void 0 : _this$getLeafNode.value; + } + getLeafNode(getNodeValue, handlers) { + return findLeaf(this.root(), (nodeKey) => this._mapNodeValue(getNodeValue(nodeKey)), { + onNodeVisit: (node) => { + handlers === null || handlers === void 0 ? void 0 : handlers.onNodeVisit(node); + if (node.type === "leaf") { + this._onHit(node); + } + } + }); + } + set(route, value, handlers) { + let leafNode; + const newRoot = addLeaf(this.root(), route.map(([nodeKey, nodeValue]) => [nodeKey, this._mapNodeValue(nodeValue)]), null, value, null, { + onNodeVisit: (node) => { + handlers === null || handlers === void 0 ? void 0 : handlers.onNodeVisit(node); + if (node.type === "leaf") { + leafNode = node; + } + } + }); + if (!this.root()) { + this._root = newRoot; + } + this._numLeafs++; + this._onSet(Recoil_nullthrows(leafNode)); + } + delete(node) { + if (!this.root()) { + return false; + } + const root = Recoil_nullthrows(this.root()); + const existsInTree = pruneNodeFromTree(root, node, node.parent); + if (!existsInTree) { + return false; + } + if (node === root || root.type === "branch" && !root.branches.size) { + this._root = null; + this._numLeafs = 0; + return true; + } + this._numLeafs -= countDownstreamLeaves(node); + return true; + } + clear() { + this._numLeafs = 0; + this._root = null; + } +}; +var findLeaf = (root, getNodeValue, handlers) => { + var _handlers$onNodeVisit; + if (root == null) { + return void 0; + } + handlers === null || handlers === void 0 ? void 0 : (_handlers$onNodeVisit = handlers.onNodeVisit) === null || _handlers$onNodeVisit === void 0 ? void 0 : _handlers$onNodeVisit.call(handlers, root); + if (root.type === "leaf") { + return root; + } + const nodeValue = getNodeValue(root.nodeKey); + return findLeaf(root.branches.get(nodeValue), getNodeValue, handlers); +}; +var addLeaf = (root, route, parent, value, branchKey, handlers) => { + var _handlers$onNodeVisit2; + let node; + if (root == null) { + if (route.length === 0) { + node = { + type: "leaf", + value, + parent, + branchKey + }; + } else { + const [path, ...rest] = route; + const [nodeKey, nodeValue] = path; + node = { + type: "branch", + nodeKey, + parent, + branches: /* @__PURE__ */ new Map(), + branchKey + }; + node.branches.set(nodeValue, addLeaf(null, rest, node, value, nodeValue, handlers)); + } + } else { + node = root; + if (route.length) { + const [path, ...rest] = route; + const [nodeKey, nodeValue] = path; + !(root.type === "branch" && root.nodeKey === nodeKey) ? true ? Recoil_invariant(false, "Existing cache must have a branch midway through the route with matching node key") : Recoil_invariant(false) : void 0; + root.branches.set(nodeValue, addLeaf(root.branches.get(nodeValue), rest, root, value, nodeValue, handlers)); + } + } + handlers === null || handlers === void 0 ? void 0 : (_handlers$onNodeVisit2 = handlers.onNodeVisit) === null || _handlers$onNodeVisit2 === void 0 ? void 0 : _handlers$onNodeVisit2.call(handlers, node); + return node; +}; +var pruneNodeFromTree = (root, node, parent) => { + if (!parent) { + return root === node; + } + parent.branches.delete(node.branchKey); + return pruneUpstreamBranches(root, parent, parent.parent); +}; +var pruneUpstreamBranches = (root, branchNode, parent) => { + if (!parent) { + return root === branchNode; + } + if (branchNode.branches.size === 0) { + parent.branches.delete(branchNode.branchKey); + } + return pruneUpstreamBranches(root, parent, parent.parent); +}; +var countDownstreamLeaves = (node) => node.type === "leaf" ? 1 : Array.from(node.branches.values()).reduce((sum, currNode) => sum + countDownstreamLeaves(currNode), 0); +var Recoil_TreeCache = { + TreeCache +}; +var Recoil_TreeCache_1 = Recoil_TreeCache.TreeCache; +var Recoil_TreeCache$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + TreeCache: Recoil_TreeCache_1 +}); +var LRUCache = class { + constructor(options) { + var _options$mapKey; + _defineProperty(this, "_maxSize", void 0); + _defineProperty(this, "_size", void 0); + _defineProperty(this, "_head", void 0); + _defineProperty(this, "_tail", void 0); + _defineProperty(this, "_map", void 0); + _defineProperty(this, "_keyMapper", void 0); + this._maxSize = options.maxSize; + this._size = 0; + this._head = null; + this._tail = null; + this._map = /* @__PURE__ */ new Map(); + this._keyMapper = (_options$mapKey = options.mapKey) !== null && _options$mapKey !== void 0 ? _options$mapKey : (v3) => v3; + } + head() { + return this._head; + } + tail() { + return this._tail; + } + size() { + return this._size; + } + maxSize() { + return this._maxSize; + } + has(key2) { + return this._map.has(this._keyMapper(key2)); + } + get(key2) { + const mappedKey = this._keyMapper(key2); + const node = this._map.get(mappedKey); + if (!node) { + return void 0; + } + this.set(key2, node.value); + return node.value; + } + set(key2, val) { + const mappedKey = this._keyMapper(key2); + const existingNode = this._map.get(mappedKey); + if (existingNode) { + this.delete(key2); + } + const head = this.head(); + const node = { + key: key2, + right: head, + left: null, + value: val + }; + if (head) { + head.left = node; + } else { + this._tail = node; + } + this._map.set(mappedKey, node); + this._head = node; + this._size++; + this._maybeDeleteLRU(); + } + _maybeDeleteLRU() { + if (this.size() > this.maxSize()) { + this.deleteLru(); + } + } + deleteLru() { + const tail = this.tail(); + if (tail) { + this.delete(tail.key); + } + } + delete(key2) { + const mappedKey = this._keyMapper(key2); + if (!this._size || !this._map.has(mappedKey)) { + return; + } + const node = Recoil_nullthrows(this._map.get(mappedKey)); + const right2 = node.right; + const left2 = node.left; + if (right2) { + right2.left = node.left; + } + if (left2) { + left2.right = node.right; + } + if (node === this.head()) { + this._head = right2; + } + if (node === this.tail()) { + this._tail = left2; + } + this._map.delete(mappedKey); + this._size--; + } + clear() { + this._size = 0; + this._head = null; + this._tail = null; + this._map = /* @__PURE__ */ new Map(); + } +}; +var Recoil_LRUCache = { + LRUCache +}; +var Recoil_LRUCache_1 = Recoil_LRUCache.LRUCache; +var Recoil_LRUCache$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + LRUCache: Recoil_LRUCache_1 +}); +var { + LRUCache: LRUCache$1 +} = Recoil_LRUCache$1; +var { + TreeCache: TreeCache$1 +} = Recoil_TreeCache$1; +function treeCacheLRU(maxSize, mapNodeValue = (v3) => v3) { + const lruCache = new LRUCache$1({ + maxSize + }); + const cache = new TreeCache$1({ + mapNodeValue, + onHit: (node) => { + lruCache.set(node, true); + }, + onSet: (node) => { + const lruNode = lruCache.tail(); + lruCache.set(node, true); + if (lruNode && cache.size() > maxSize) { + cache.delete(lruNode.key); + } + } + }); + return cache; +} +var Recoil_treeCacheLRU = treeCacheLRU; +var { + TreeCache: TreeCache$2 +} = Recoil_TreeCache$1; +var defaultPolicy = { + equality: "reference", + eviction: "keep-all", + maxSize: Infinity +}; +function treeCacheFromPolicy({ + equality = defaultPolicy.equality, + eviction = defaultPolicy.eviction, + maxSize = defaultPolicy.maxSize +} = defaultPolicy) { + const valueMapper = getValueMapper(equality); + const treeCache = getTreeCache(eviction, maxSize, valueMapper); + return treeCache; +} +function getValueMapper(equality) { + switch (equality) { + case "reference": + return (val) => val; + case "value": + return (val) => Recoil_stableStringify(val); + } + throw new Error(`Unrecognized equality policy ${equality}`); +} +function getTreeCache(eviction, maxSize, mapNodeValue) { + switch (eviction) { + case "keep-all": + return new TreeCache$2({ + mapNodeValue + }); + case "lru": + return Recoil_treeCacheLRU(Recoil_nullthrows(maxSize), mapNodeValue); + case "most-recent": + return Recoil_treeCacheLRU(1, mapNodeValue); + } + throw new Error(`Unrecognized eviction policy ${eviction}`); +} +var Recoil_treeCacheFromPolicy = treeCacheFromPolicy; +function startPerfBlock(_id) { + return () => null; +} +var Recoil_PerformanceTimings = { + startPerfBlock +}; +var { + CANCELED: CANCELED$2, + Canceled: Canceled$1, + loadableWithError: loadableWithError$1, + loadableWithPromise: loadableWithPromise$1, + loadableWithValue: loadableWithValue$2 +} = Recoil_Loadable; +var { + getNodeLoadable: getNodeLoadable$2, + peekNodeLoadable: peekNodeLoadable$1, + setNodeValue: setNodeValue$3 +} = Recoil_FunctionalCore; +var { + saveDependencyMapToStore: saveDependencyMapToStore$1 +} = Recoil_Graph; +var { + DEFAULT_VALUE: DEFAULT_VALUE$4, + RecoilValueNotReady: RecoilValueNotReady$2, + getConfigDeletionHandler: getConfigDeletionHandler$1, + registerNode: registerNode$1 +} = Recoil_Node; +var { + isRecoilValue: isRecoilValue$3 +} = Recoil_RecoilValue$1; +var { + AbstractRecoilValue: AbstractRecoilValue$4 +} = Recoil_RecoilValue$1; +var { + setRecoilValueLoadable: setRecoilValueLoadable$2 +} = Recoil_RecoilValueInterface; +var { + retainedByOptionWithDefault: retainedByOptionWithDefault$1 +} = Recoil_Retention; +var { + cloneSnapshot: cloneSnapshot$2 +} = Recoil_Snapshot$1; +var { + startPerfBlock: startPerfBlock$1 +} = Recoil_PerformanceTimings; +var dependencyStack = []; +var waitingStores = /* @__PURE__ */ new Map(); +var getNewExecutionId = (() => { + let executionId = 0; + return () => executionId++; +})(); +function getInitialExecutionInfo() { + return { + depValuesDiscoveredSoFarDuringAsyncWork: null, + latestLoadable: null, + latestExecutionId: null, + stateVersion: null + }; +} +function selector(options) { + const { + key: key2, + get, + cachePolicy_UNSTABLE: cachePolicy + } = options; + const set = options.set != null ? options.set : void 0; + const cache = Recoil_treeCacheFromPolicy(cachePolicy !== null && cachePolicy !== void 0 ? cachePolicy : { + equality: "reference", + eviction: "keep-all" + }); + const retainedBy = retainedByOptionWithDefault$1(options.retainedBy_UNSTABLE); + const executionInfoMap = /* @__PURE__ */ new Map(); + let liveStoresCount = 0; + function selectorIsLive() { + return !Recoil_gkx_1("recoil_memory_managament_2020") || liveStoresCount > 0; + } + function getExecutionInfo(store) { + if (!executionInfoMap.has(store)) { + executionInfoMap.set(store, getInitialExecutionInfo()); + } + return Recoil_nullthrows(executionInfoMap.get(store)); + } + function selectorInit(store) { + liveStoresCount++; + store.getState().knownSelectors.add(key2); + return () => { + liveStoresCount--; + store.getState().knownSelectors.delete(key2); + executionInfoMap.delete(store); + }; + } + function selectorShouldDeleteConfigOnRelease() { + return getConfigDeletionHandler$1(key2) !== void 0 && !selectorIsLive(); + } + function notifyStoreWhenAsyncSettles(store, loadable, executionId) { + if (loadable.state === "loading") { + let stores = waitingStores.get(executionId); + if (stores == null) { + waitingStores.set(executionId, stores = /* @__PURE__ */ new Set()); + } + stores.add(store); + } + } + function notifyStoresOfSettledAsync(newLoadable, executionId) { + const stores = waitingStores.get(executionId); + if (stores !== void 0) { + for (const store of stores) { + setRecoilValueLoadable$2(store, new AbstractRecoilValue$4(key2), newLoadable); + } + waitingStores.delete(executionId); + } + } + function getCachedNodeLoadable(store, state, key3) { + const isKeyPointingToSelector = store.getState().knownSelectors.has(key3); + if (isKeyPointingToSelector && state.atomValues.has(key3)) { + return Recoil_nullthrows(state.atomValues.get(key3)); + } + const loadable = getNodeLoadable$2(store, state, key3); + if (loadable.state !== "loading" && isKeyPointingToSelector) { + state.atomValues.set(key3, loadable); + } + return loadable; + } + function wrapPendingPromise(store, promise, state, depValues, executionId) { + return promise.then((value) => { + if (!selectorIsLive()) { + clearExecutionInfo(store, executionId); + return CANCELED$2; + } + const loadable = loadableWithValue$2(value); + maybeFreezeValue(value); + setCache(state, depValuesToDepRoute(depValues), loadable); + setDepsInStore(store, state, new Set(depValues.keys()), executionId); + setLoadableInStoreToNotifyDeps(store, loadable, executionId); + return { + __value: value, + __key: key2 + }; + }).catch((errorOrPromise) => { + if (!selectorIsLive()) { + clearExecutionInfo(store, executionId); + return CANCELED$2; + } + if (isLatestExecution(store, executionId)) { + updateExecutionInfoDepValues(depValues, store, executionId); + } + if (Recoil_isPromise(errorOrPromise)) { + return wrapPendingDependencyPromise(store, errorOrPromise, state, depValues, executionId); + } + const loadable = loadableWithError$1(errorOrPromise); + maybeFreezeValue(errorOrPromise); + setCache(state, depValuesToDepRoute(depValues), loadable); + setDepsInStore(store, state, new Set(depValues.keys()), executionId); + setLoadableInStoreToNotifyDeps(store, loadable, executionId); + throw errorOrPromise; + }); + } + function wrapPendingDependencyPromise(store, promise, state, existingDeps, executionId) { + return promise.then((resolvedDep) => { + if (!selectorIsLive()) { + clearExecutionInfo(store, executionId); + return CANCELED$2; + } + if (resolvedDep instanceof Canceled$1) { + Recoil_recoverableViolation("Selector was released while it had dependencies"); + return CANCELED$2; + } + const { + __key: resolvedDepKey, + __value: depValue + } = resolvedDep !== null && resolvedDep !== void 0 ? resolvedDep : {}; + let bypassSelectorDepCacheOnReevaluation = true; + if (resolvedDepKey != null) { + state.atomValues.set(resolvedDepKey, loadableWithValue$2(depValue)); + bypassSelectorDepCacheOnReevaluation = false; + } + const cachedLoadable = getValFromCacheAndUpdatedDownstreamDeps(store, state); + if (cachedLoadable && cachedLoadable.state === "hasValue") { + setExecutionInfo(cachedLoadable, store); + return { + __value: cachedLoadable.contents, + __key: key2 + }; + } + if (!isLatestExecution(store, executionId)) { + var _executionInfo$latest; + const executionInfo = getExecutionInfoOfInProgressExecution(state); + if ((executionInfo === null || executionInfo === void 0 ? void 0 : (_executionInfo$latest = executionInfo.latestLoadable) === null || _executionInfo$latest === void 0 ? void 0 : _executionInfo$latest.state) === "loading") { + return executionInfo.latestLoadable.contents; + } + } + const [loadable, depValues] = evaluateSelectorGetter(store, state, executionId, bypassSelectorDepCacheOnReevaluation); + if (isLatestExecution(store, executionId)) { + updateExecutionInfoDepValues(depValues, store, executionId); + } + maybeFreezeLoadableContents(loadable); + if (loadable.state !== "loading") { + setCache(state, depValuesToDepRoute(depValues), loadable); + setDepsInStore(store, state, new Set(depValues.keys()), executionId); + setLoadableInStoreToNotifyDeps(store, loadable, executionId); + } + if (loadable.state === "hasError") { + throw loadable.contents; + } + if (loadable.state === "hasValue") { + return { + __value: loadable.contents, + __key: key2 + }; + } + return loadable.contents; + }).catch((error) => { + if (!selectorIsLive()) { + clearExecutionInfo(store, executionId); + return CANCELED$2; + } + const loadable = loadableWithError$1(error); + maybeFreezeValue(error); + setCache(state, depValuesToDepRoute(existingDeps), loadableWithError$1(error)); + setDepsInStore(store, state, new Set(existingDeps.keys()), executionId); + setLoadableInStoreToNotifyDeps(store, loadable, executionId); + throw error; + }); + } + function setLoadableInStoreToNotifyDeps(store, loadable, executionId) { + if (isLatestExecution(store, executionId)) { + setExecutionInfo(loadable, store); + notifyStoresOfSettledAsync(loadable, executionId); + } + } + function setDepsInStore(store, state, deps, executionId) { + var _store$getState, _store$getState$curre, _store$getState2, _store$getState2$next; + if (isLatestExecution(store, executionId) || state.version === ((_store$getState = store.getState()) === null || _store$getState === void 0 ? void 0 : (_store$getState$curre = _store$getState.currentTree) === null || _store$getState$curre === void 0 ? void 0 : _store$getState$curre.version) || state.version === ((_store$getState2 = store.getState()) === null || _store$getState2 === void 0 ? void 0 : (_store$getState2$next = _store$getState2.nextTree) === null || _store$getState2$next === void 0 ? void 0 : _store$getState2$next.version)) { + var _store$getState$nextT, _store$getState3, _store$getState3$next; + saveDependencyMapToStore$1(/* @__PURE__ */ new Map([[key2, deps]]), store, (_store$getState$nextT = (_store$getState3 = store.getState()) === null || _store$getState3 === void 0 ? void 0 : (_store$getState3$next = _store$getState3.nextTree) === null || _store$getState3$next === void 0 ? void 0 : _store$getState3$next.version) !== null && _store$getState$nextT !== void 0 ? _store$getState$nextT : store.getState().currentTree.version); + } + } + function setNewDepInStore(store, state, deps, newDepKey, executionId) { + deps.add(newDepKey); + setDepsInStore(store, state, deps, executionId); + } + function evaluateSelectorGetter(store, state, executionId, bypassSelectorDepCache = false) { + const endPerfBlock = startPerfBlock$1(key2); + let result; + let resultIsError = false; + let loadable; + const depValues = /* @__PURE__ */ new Map(); + const deps = /* @__PURE__ */ new Set(); + setDepsInStore(store, state, deps, executionId); + function getRecoilValue(recoilValue) { + const { + key: depKey + } = recoilValue; + setNewDepInStore(store, state, deps, depKey, executionId); + const depLoadable = bypassSelectorDepCache ? getNodeLoadable$2(store, state, depKey) : getCachedNodeLoadable(store, state, depKey); + maybeFreezeLoadableContents(depLoadable); + depValues.set(depKey, depLoadable); + if (depLoadable.state === "hasValue") { + return depLoadable.contents; + } + throw depLoadable.contents; + } + let gateCallback = false; + const getCallback = (fn3) => { + return (...args) => { + if (!gateCallback) { + throw new Error("getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can obtain the current Recoil state without a subscription."); + } + const snapshot = cloneSnapshot$2(store); + const cb = fn3({ + snapshot + }); + if (typeof cb !== "function") { + throw new Error("getCallback() expects a function that returns a function."); + } + return cb(...args); + }; + }; + try { + result = get({ + get: getRecoilValue, + getCallback + }); + result = isRecoilValue$3(result) ? getRecoilValue(result) : result; + gateCallback = true; + if (Recoil_isPromise(result)) { + result = wrapPendingPromise(store, result, state, depValues, executionId).finally(endPerfBlock); + } else { + endPerfBlock(); + } + } catch (errorOrDepPromise) { + result = errorOrDepPromise; + if (Recoil_isPromise(result)) { + result = wrapPendingDependencyPromise(store, result, state, depValues, executionId).finally(endPerfBlock); + } else { + resultIsError = true; + endPerfBlock(); + } + } + if (resultIsError) { + loadable = loadableWithError$1(result); + } else if (Recoil_isPromise(result)) { + loadable = loadableWithPromise$1(result); + } else { + loadable = loadableWithValue$2(result); + } + maybeFreezeLoadableContents(loadable); + return [loadable, depValues]; + } + function getValFromCacheAndUpdatedDownstreamDeps(store, state) { + const depsAfterCacheDone = /* @__PURE__ */ new Set(); + const executionInfo = getExecutionInfo(store); + const cachedVal = cache.get((nodeKey) => { + !(typeof nodeKey === "string") ? true ? Recoil_invariant(false, "Cache nodeKey is type string") : Recoil_invariant(false) : void 0; + const loadable = getCachedNodeLoadable(store, state, nodeKey); + return loadable.contents; + }, { + onNodeVisit: (node) => { + if (node.type === "branch" && node.nodeKey !== key2 && typeof node.nodeKey === "string") { + depsAfterCacheDone.add(node.nodeKey); + } + } + }); + if (cachedVal) { + setDepsInStore(store, state, depsAfterCacheDone, executionInfo.latestExecutionId); + } + return cachedVal; + } + function depValuesToDepRoute(depValues) { + return Array.from(depValues.entries()).map(([key3, valLoadable]) => [key3, valLoadable.contents]); + } + function getValFromRunningNewExecutionAndUpdatedDeps(store, state) { + const newExecutionId = getNewExecutionId(); + const [loadable, newDepValues] = evaluateSelectorGetter(store, state, newExecutionId); + setExecutionInfo(loadable, store, newDepValues, newExecutionId, state); + maybeSetCacheWithLoadable(state, depValuesToDepRoute(newDepValues), loadable); + notifyStoreWhenAsyncSettles(store, loadable, newExecutionId); + return loadable; + } + function getSelectorValAndUpdatedDeps(store, state) { + const cachedVal = getValFromCacheAndUpdatedDownstreamDeps(store, state); + if (cachedVal != null) { + setExecutionInfo(cachedVal, store); + return cachedVal; + } + const inProgressExecutionInfo = getExecutionInfoOfInProgressExecution(state); + if (inProgressExecutionInfo) { + const executionInfo = inProgressExecutionInfo; + notifyStoreWhenAsyncSettles(store, Recoil_nullthrows(executionInfo.latestLoadable), Recoil_nullthrows(executionInfo.latestExecutionId)); + return Recoil_nullthrows(executionInfo.latestLoadable); + } + return getValFromRunningNewExecutionAndUpdatedDeps(store, state); + } + function getExecutionInfoOfInProgressExecution(state) { + var _Array$from$find; + const [, executionInfo] = (_Array$from$find = Array.from(executionInfoMap.entries()).find(([store, executionInfo2]) => { + return executionInfo2.latestLoadable != null && executionInfo2.latestExecutionId != null && !haveAsyncDepsChanged(store, state); + })) !== null && _Array$from$find !== void 0 ? _Array$from$find : []; + return executionInfo; + } + const mapOfCheckedVersions = /* @__PURE__ */ new Map(); + function haveAsyncDepsChanged(store, state) { + var _executionInfo$depVal, _mapOfCheckedVersions; + const executionInfo = getExecutionInfo(store); + const oldDepValues = (_executionInfo$depVal = executionInfo.depValuesDiscoveredSoFarDuringAsyncWork) !== null && _executionInfo$depVal !== void 0 ? _executionInfo$depVal : /* @__PURE__ */ new Map(); + const cachedDepValuesCheckedForThisVersion = Array(((_mapOfCheckedVersions = mapOfCheckedVersions.get(state.version)) !== null && _mapOfCheckedVersions !== void 0 ? _mapOfCheckedVersions : /* @__PURE__ */ new Map()).entries()); + const isCachedVersionSame = mapOfCheckedVersions.has(state.version) && cachedDepValuesCheckedForThisVersion.length === oldDepValues.size && cachedDepValuesCheckedForThisVersion.every(([nodeKey, nodeVal]) => { + return oldDepValues.get(nodeKey) === nodeVal; + }); + if (oldDepValues == null || state.version === executionInfo.stateVersion || isCachedVersionSame) { + return false; + } + mapOfCheckedVersions.set(state.version, new Map(oldDepValues)); + return Array.from(oldDepValues).some(([nodeKey, oldVal]) => { + const loadable = getCachedNodeLoadable(store, state, nodeKey); + return loadable.contents !== oldVal.contents; + }); + } + function setExecutionInfo(loadable, store, depValues, newExecutionId, state) { + const executionInfo = getExecutionInfo(store); + if (loadable.state === "loading") { + executionInfo.depValuesDiscoveredSoFarDuringAsyncWork = depValues; + executionInfo.latestExecutionId = newExecutionId; + executionInfo.latestLoadable = loadable; + executionInfo.stateVersion = state === null || state === void 0 ? void 0 : state.version; + } else { + executionInfo.depValuesDiscoveredSoFarDuringAsyncWork = null; + executionInfo.latestExecutionId = null; + executionInfo.latestLoadable = null; + executionInfo.stateVersion = null; + } + } + function maybeSetCacheWithLoadable(state, depRoute, loadable) { + if (loadable.state !== "loading") { + setCache(state, depRoute, loadable); + } + } + function updateExecutionInfoDepValues(depValues, store, executionId) { + const executionInfo = getExecutionInfo(store); + if (isLatestExecution(store, executionId)) { + executionInfo.depValuesDiscoveredSoFarDuringAsyncWork = depValues; + } + } + function clearExecutionInfo(store, executionId) { + if (isLatestExecution(store, executionId)) { + executionInfoMap.delete(store); + } + } + function isLatestExecution(store, executionId) { + const executionInfo = getExecutionInfo(store); + return executionId === executionInfo.latestExecutionId; + } + function maybeFreezeLoadableContents(loadable) { + if (loadable.state !== "loading") { + maybeFreezeValue(loadable.contents); + } + } + function maybeFreezeValue(val) { + if (true) { + if (Boolean(options.dangerouslyAllowMutability) === false) { + Recoil_deepFreezeValue(val); + } + } + } + function setCache(state, cacheRoute, loadable) { + state.atomValues.set(key2, loadable); + cache.set(cacheRoute, loadable); + } + function detectCircularDependencies(fn3) { + if (dependencyStack.includes(key2)) { + const message = `Recoil selector has circular dependencies: ${dependencyStack.slice(dependencyStack.indexOf(key2)).join(" \u2192 ")}`; + return loadableWithError$1(new Error(message)); + } + dependencyStack.push(key2); + try { + return fn3(); + } finally { + dependencyStack.pop(); + } + } + function selectorPeek(store, state) { + const cacheVal = cache.get((nodeKey) => { + !(typeof nodeKey === "string") ? true ? Recoil_invariant(false, "Cache nodeKey is type string") : Recoil_invariant(false) : void 0; + const peek = peekNodeLoadable$1(store, state, nodeKey); + return peek === null || peek === void 0 ? void 0 : peek.contents; + }); + return cacheVal; + } + function selectorGet(store, state) { + return detectCircularDependencies(() => getSelectorValAndUpdatedDeps(store, state)); + } + function invalidateSelector(state) { + state.atomValues.delete(key2); + } + if (set != null) { + const selectorSet = (store, state, newValue) => { + let syncSelectorSetFinished = false; + const writes = /* @__PURE__ */ new Map(); + function getRecoilValue({ + key: key3 + }) { + if (syncSelectorSetFinished) { + throw new Error("Recoil: Async selector sets are not currently supported."); + } + const loadable = getCachedNodeLoadable(store, state, key3); + maybeFreezeLoadableContents(loadable); + if (loadable.state === "hasValue") { + return loadable.contents; + } else if (loadable.state === "loading") { + throw new RecoilValueNotReady$2(key3); + } else { + throw loadable.contents; + } + } + function setRecoilState(recoilState, valueOrUpdater) { + if (syncSelectorSetFinished) { + throw new Error("Recoil: Async selector sets are not currently supported."); + } + const newValue2 = typeof valueOrUpdater === "function" ? valueOrUpdater(getRecoilValue(recoilState)) : valueOrUpdater; + const upstreamWrites = setNodeValue$3(store, state, recoilState.key, newValue2); + upstreamWrites.forEach((v3, k5) => writes.set(k5, v3)); + } + function resetRecoilState(recoilState) { + setRecoilState(recoilState, DEFAULT_VALUE$4); + } + const ret = set({ + set: setRecoilState, + get: getRecoilValue, + reset: resetRecoilState + }, newValue); + if (ret !== void 0) { + throw Recoil_isPromise(ret) ? new Error("Recoil: Async selector sets are not currently supported.") : new Error("Recoil: selector set should be a void function."); + } + syncSelectorSetFinished = true; + return writes; + }; + return registerNode$1({ + key: key2, + nodeType: "selector", + peek: selectorPeek, + get: selectorGet, + set: selectorSet, + init: selectorInit, + invalidate: invalidateSelector, + shouldDeleteConfigOnRelease: selectorShouldDeleteConfigOnRelease, + dangerouslyAllowMutability: options.dangerouslyAllowMutability, + shouldRestoreFromSnapshots: false, + retainedBy + }); + } else { + return registerNode$1({ + key: key2, + nodeType: "selector", + peek: selectorPeek, + get: selectorGet, + init: selectorInit, + invalidate: invalidateSelector, + shouldDeleteConfigOnRelease: selectorShouldDeleteConfigOnRelease, + dangerouslyAllowMutability: options.dangerouslyAllowMutability, + shouldRestoreFromSnapshots: false, + retainedBy + }); + } +} +var Recoil_selector = selector; +var { + loadableWithError: loadableWithError$2, + loadableWithPromise: loadableWithPromise$2, + loadableWithValue: loadableWithValue$3 +} = Recoil_Loadable; +var { + DEFAULT_VALUE: DEFAULT_VALUE$5, + DefaultValue: DefaultValue$2, + getConfigDeletionHandler: getConfigDeletionHandler$2, + registerNode: registerNode$2, + setConfigDeletionHandler: setConfigDeletionHandler$1 +} = Recoil_Node; +var { + isRecoilValue: isRecoilValue$4 +} = Recoil_RecoilValue$1; +var { + markRecoilValueModified: markRecoilValueModified$1, + setRecoilValue: setRecoilValue$3, + setRecoilValueLoadable: setRecoilValueLoadable$3 +} = Recoil_RecoilValueInterface; +var { + retainedByOptionWithDefault: retainedByOptionWithDefault$2 +} = Recoil_Retention; +function baseAtom(options) { + const { + key: key2, + persistence_UNSTABLE: persistence + } = options; + const retainedBy = retainedByOptionWithDefault$2(options.retainedBy_UNSTABLE); + let liveStoresCount = 0; + let defaultLoadable = Recoil_isPromise(options.default) ? loadableWithPromise$2(options.default.then((value) => { + defaultLoadable = loadableWithValue$3(value); + const promiseInfo = { + __key: key2, + __value: value + }; + return promiseInfo; + }).catch((error) => { + defaultLoadable = loadableWithError$2(error); + throw error; + })) : loadableWithValue$3(options.default); + let cachedAnswerForUnvalidatedValue = void 0; + const cleanupEffectsByStore = /* @__PURE__ */ new Map(); + function wrapPendingPromise(store, promise) { + const wrappedPromise = promise.then((value) => { + var _store$getState$nextT, _state$atomValues$get; + const state = (_store$getState$nextT = store.getState().nextTree) !== null && _store$getState$nextT !== void 0 ? _store$getState$nextT : store.getState().currentTree; + if (((_state$atomValues$get = state.atomValues.get(key2)) === null || _state$atomValues$get === void 0 ? void 0 : _state$atomValues$get.contents) === wrappedPromise) { + setRecoilValue$3(store, node, value); + } + return { + __key: key2, + __value: value + }; + }).catch((error) => { + var _store$getState$nextT2, _state$atomValues$get2; + const state = (_store$getState$nextT2 = store.getState().nextTree) !== null && _store$getState$nextT2 !== void 0 ? _store$getState$nextT2 : store.getState().currentTree; + if (((_state$atomValues$get2 = state.atomValues.get(key2)) === null || _state$atomValues$get2 === void 0 ? void 0 : _state$atomValues$get2.contents) === wrappedPromise) { + setRecoilValueLoadable$3(store, node, loadableWithError$2(error)); + } + throw error; + }); + return wrappedPromise; + } + function initAtom(store, initState, trigger) { + liveStoresCount++; + const alreadyKnown = store.getState().knownAtoms.has(key2); + store.getState().knownAtoms.add(key2); + if (defaultLoadable.state === "loading") { + const notifyDefaultSubscribers = () => { + var _store$getState$nextT3; + const state = (_store$getState$nextT3 = store.getState().nextTree) !== null && _store$getState$nextT3 !== void 0 ? _store$getState$nextT3 : store.getState().currentTree; + if (!state.atomValues.has(key2)) { + markRecoilValueModified$1(store, node); + } + }; + defaultLoadable.contents.then(notifyDefaultSubscribers).catch(notifyDefaultSubscribers); + } + let initValue = DEFAULT_VALUE$5; + let pendingSetSelf = null; + if (options.effects_UNSTABLE != null && !alreadyKnown) { + let duringInit = true; + const setSelf = (effect4) => (valueOrUpdater) => { + if (duringInit) { + const currentValue = initValue instanceof DefaultValue$2 || Recoil_isPromise(initValue) ? defaultLoadable.state === "hasValue" ? defaultLoadable.contents : DEFAULT_VALUE$5 : initValue; + initValue = typeof valueOrUpdater === "function" ? valueOrUpdater(currentValue) : valueOrUpdater; + if (Recoil_isPromise(initValue)) { + initValue = initValue.then((value) => { + pendingSetSelf = { + effect: effect4, + value + }; + return value; + }); + } + } else { + if (Recoil_isPromise(valueOrUpdater)) { + throw new Error("Setting atoms to async values is not implemented."); + } + if (typeof valueOrUpdater !== "function") { + pendingSetSelf = { + effect: effect4, + value: valueOrUpdater + }; + } + setRecoilValue$3(store, node, typeof valueOrUpdater === "function" ? (currentValue) => { + const newValue = valueOrUpdater(currentValue); + pendingSetSelf = { + effect: effect4, + value: newValue + }; + return newValue; + } : valueOrUpdater); + } + }; + const resetSelf = (effect4) => () => setSelf(effect4)(DEFAULT_VALUE$5); + const onSet = (effect4) => (handler) => { + store.subscribeToTransactions((currentStore) => { + var _currentTree$atomValu; + let { + currentTree, + previousTree + } = currentStore.getState(); + if (!previousTree) { + Recoil_recoverableViolation("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"); + previousTree = currentTree; + } + const newLoadable = (_currentTree$atomValu = currentTree.atomValues.get(key2)) !== null && _currentTree$atomValu !== void 0 ? _currentTree$atomValu : defaultLoadable; + if (newLoadable.state === "hasValue") { + var _previousTree$atomVal, _pendingSetSelf, _pendingSetSelf2, _pendingSetSelf3; + const newValue = newLoadable.contents; + const oldLoadable = (_previousTree$atomVal = previousTree.atomValues.get(key2)) !== null && _previousTree$atomVal !== void 0 ? _previousTree$atomVal : defaultLoadable; + const oldValue = oldLoadable.state === "hasValue" ? oldLoadable.contents : DEFAULT_VALUE$5; + if (((_pendingSetSelf = pendingSetSelf) === null || _pendingSetSelf === void 0 ? void 0 : _pendingSetSelf.effect) !== effect4 || ((_pendingSetSelf2 = pendingSetSelf) === null || _pendingSetSelf2 === void 0 ? void 0 : _pendingSetSelf2.value) !== newValue) { + handler(newValue, oldValue); + } else if (((_pendingSetSelf3 = pendingSetSelf) === null || _pendingSetSelf3 === void 0 ? void 0 : _pendingSetSelf3.effect) === effect4) { + pendingSetSelf = null; + } + } + }, key2); + }; + for (const effect4 of (_options$effects_UNST = options.effects_UNSTABLE) !== null && _options$effects_UNST !== void 0 ? _options$effects_UNST : []) { + var _options$effects_UNST; + const cleanup = effect4({ + node, + trigger, + setSelf: setSelf(effect4), + resetSelf: resetSelf(effect4), + onSet: onSet(effect4) + }); + if (cleanup != null) { + var _cleanupEffectsByStor; + cleanupEffectsByStore.set(store, [...(_cleanupEffectsByStor = cleanupEffectsByStore.get(store)) !== null && _cleanupEffectsByStor !== void 0 ? _cleanupEffectsByStor : [], cleanup]); + } + } + duringInit = false; + } + if (!(initValue instanceof DefaultValue$2)) { + var _store$getState$nextT4; + const initLoadable = Recoil_isPromise(initValue) ? loadableWithPromise$2(wrapPendingPromise(store, initValue)) : loadableWithValue$3(initValue); + initState.atomValues.set(key2, initLoadable); + (_store$getState$nextT4 = store.getState().nextTree) === null || _store$getState$nextT4 === void 0 ? void 0 : _store$getState$nextT4.atomValues.set(key2, initLoadable); + } + return () => { + var _cleanupEffectsByStor2; + liveStoresCount--; + (_cleanupEffectsByStor2 = cleanupEffectsByStore.get(store)) === null || _cleanupEffectsByStor2 === void 0 ? void 0 : _cleanupEffectsByStor2.forEach((cleanup) => cleanup()); + cleanupEffectsByStore.delete(store); + store.getState().knownAtoms.delete(key2); + }; + } + function peekAtom(_store, state) { + var _ref, _state$atomValues$get3, _cachedAnswerForUnval; + return (_ref = (_state$atomValues$get3 = state.atomValues.get(key2)) !== null && _state$atomValues$get3 !== void 0 ? _state$atomValues$get3 : (_cachedAnswerForUnval = cachedAnswerForUnvalidatedValue) === null || _cachedAnswerForUnval === void 0 ? void 0 : _cachedAnswerForUnval[1]) !== null && _ref !== void 0 ? _ref : defaultLoadable; + } + function getAtom(_store, state) { + if (state.atomValues.has(key2)) { + return Recoil_nullthrows(state.atomValues.get(key2)); + } else if (state.nonvalidatedAtoms.has(key2)) { + if (cachedAnswerForUnvalidatedValue != null) { + return cachedAnswerForUnvalidatedValue; + } + if (persistence == null) { + Recoil_expectationViolation(`Tried to restore a persisted value for atom ${key2} but it has no persistence settings.`); + return defaultLoadable; + } + const nonvalidatedValue = state.nonvalidatedAtoms.get(key2); + const validatorResult = persistence.validator(nonvalidatedValue, DEFAULT_VALUE$5); + const validatedValueLoadable = validatorResult instanceof DefaultValue$2 ? defaultLoadable : loadableWithValue$3(validatorResult); + cachedAnswerForUnvalidatedValue = validatedValueLoadable; + return cachedAnswerForUnvalidatedValue; + } else { + return defaultLoadable; + } + } + function invalidateAtom() { + cachedAnswerForUnvalidatedValue = void 0; + } + function setAtom(_store, state, newValue) { + if (state.atomValues.has(key2)) { + const existing = Recoil_nullthrows(state.atomValues.get(key2)); + if (existing.state === "hasValue" && newValue === existing.contents) { + return /* @__PURE__ */ new Map(); + } + } else if (!state.nonvalidatedAtoms.has(key2) && newValue instanceof DefaultValue$2) { + return /* @__PURE__ */ new Map(); + } + if (true) { + if (options.dangerouslyAllowMutability !== true) { + Recoil_deepFreezeValue(newValue); + } + } + cachedAnswerForUnvalidatedValue = void 0; + return (/* @__PURE__ */ new Map()).set(key2, loadableWithValue$3(newValue)); + } + function shouldDeleteConfigOnReleaseAtom() { + return getConfigDeletionHandler$2(key2) !== void 0 && liveStoresCount <= 0; + } + const node = registerNode$2({ + key: key2, + nodeType: "atom", + peek: peekAtom, + get: getAtom, + set: setAtom, + init: initAtom, + invalidate: invalidateAtom, + shouldDeleteConfigOnRelease: shouldDeleteConfigOnReleaseAtom, + dangerouslyAllowMutability: options.dangerouslyAllowMutability, + persistence_UNSTABLE: options.persistence_UNSTABLE ? { + type: options.persistence_UNSTABLE.type, + backButton: options.persistence_UNSTABLE.backButton + } : void 0, + shouldRestoreFromSnapshots: true, + retainedBy + }); + return node; +} +function atom(options) { + const { + default: optionsDefault, + ...restOptions + } = options; + if (isRecoilValue$4(optionsDefault)) { + return atomWithFallback({ + ...restOptions, + default: optionsDefault + }); + } else { + return baseAtom({ + ...restOptions, + default: optionsDefault + }); + } +} +function atomWithFallback(options) { + const base = atom({ + ...options, + default: DEFAULT_VALUE$5, + persistence_UNSTABLE: options.persistence_UNSTABLE === void 0 ? void 0 : { + ...options.persistence_UNSTABLE, + validator: (storedValue) => storedValue instanceof DefaultValue$2 ? storedValue : Recoil_nullthrows(options.persistence_UNSTABLE).validator(storedValue, DEFAULT_VALUE$5) + }, + effects_UNSTABLE: options.effects_UNSTABLE + }); + const sel = Recoil_selector({ + key: `${options.key}__withFallback`, + get: ({ + get + }) => { + const baseValue = get(base); + return baseValue instanceof DefaultValue$2 ? options.default : baseValue; + }, + set: ({ + set + }, newValue) => set(base, newValue), + dangerouslyAllowMutability: options.dangerouslyAllowMutability + }); + setConfigDeletionHandler$1(sel.key, getConfigDeletionHandler$2(options.key)); + return sel; +} +var Recoil_atom = atom; +var MapCache = class { + constructor(options) { + var _options$mapKey; + _defineProperty(this, "_map", void 0); + _defineProperty(this, "_keyMapper", void 0); + this._map = /* @__PURE__ */ new Map(); + this._keyMapper = (_options$mapKey = options === null || options === void 0 ? void 0 : options.mapKey) !== null && _options$mapKey !== void 0 ? _options$mapKey : (v3) => v3; + } + size() { + return this._map.size; + } + has(key2) { + return this._map.has(this._keyMapper(key2)); + } + get(key2) { + return this._map.get(this._keyMapper(key2)); + } + set(key2, val) { + this._map.set(this._keyMapper(key2), val); + } + delete(key2) { + this._map.delete(this._keyMapper(key2)); + } + clear() { + this._map.clear(); + } +}; +var Recoil_MapCache = { + MapCache +}; +var Recoil_MapCache_1 = Recoil_MapCache.MapCache; +var Recoil_MapCache$1 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + MapCache: Recoil_MapCache_1 +}); +var { + LRUCache: LRUCache$2 +} = Recoil_LRUCache$1; +var { + MapCache: MapCache$1 +} = Recoil_MapCache$1; +var defaultPolicy$1 = { + equality: "reference", + eviction: "none", + maxSize: Infinity +}; +function cacheFromPolicy({ + equality = defaultPolicy$1.equality, + eviction = defaultPolicy$1.eviction, + maxSize = defaultPolicy$1.maxSize +} = defaultPolicy$1) { + const valueMapper = getValueMapper$1(equality); + const cache = getCache(eviction, maxSize, valueMapper); + return cache; +} +function getValueMapper$1(equality) { + switch (equality) { + case "reference": + return (val) => val; + case "value": + return (val) => Recoil_stableStringify(val); + } + throw new Error(`Unrecognized equality policy ${equality}`); +} +function getCache(eviction, maxSize, mapKey) { + switch (eviction) { + case "keep-all": + return new MapCache$1({ + mapKey + }); + case "lru": + return new LRUCache$2({ + mapKey, + maxSize: Recoil_nullthrows(maxSize) + }); + case "most-recent": + return new LRUCache$2({ + mapKey, + maxSize: 1 + }); + } + throw new Error(`Unrecognized eviction policy ${eviction}`); +} +var Recoil_cacheFromPolicy = cacheFromPolicy; +var { + setConfigDeletionHandler: setConfigDeletionHandler$2 +} = Recoil_Node; +function atomFamily(options) { + var _options$cachePolicyF, _options$cachePolicyF2; + const atomCache = Recoil_cacheFromPolicy({ + equality: (_options$cachePolicyF = (_options$cachePolicyF2 = options.cachePolicyForParams_UNSTABLE) === null || _options$cachePolicyF2 === void 0 ? void 0 : _options$cachePolicyF2.equality) !== null && _options$cachePolicyF !== void 0 ? _options$cachePolicyF : "value", + eviction: "keep-all" + }); + return (params) => { + var _stableStringify; + const cachedAtom = atomCache.get(params); + if (cachedAtom != null) { + return cachedAtom; + } + const { + cachePolicyForParams_UNSTABLE, + ...atomOptions + } = options; + const newAtom = Recoil_atom({ + ...atomOptions, + key: `${options.key}__${(_stableStringify = Recoil_stableStringify(params)) !== null && _stableStringify !== void 0 ? _stableStringify : "void"}`, + default: typeof options.default === "function" ? options.default(params) : options.default, + retainedBy_UNSTABLE: typeof options.retainedBy_UNSTABLE === "function" ? options.retainedBy_UNSTABLE(params) : options.retainedBy_UNSTABLE, + effects_UNSTABLE: typeof options.effects_UNSTABLE === "function" ? options.effects_UNSTABLE(params) : options.effects_UNSTABLE + }); + atomCache.set(params, newAtom); + setConfigDeletionHandler$2(newAtom.key, () => { + atomCache.delete(params); + }); + return newAtom; + }; +} +var Recoil_atomFamily = atomFamily; +var { + setConfigDeletionHandler: setConfigDeletionHandler$3 +} = Recoil_Node; +var nextIndex = 0; +function selectorFamily(options) { + var _options$cachePolicyF, _options$cachePolicyF2; + const selectorCache = Recoil_cacheFromPolicy({ + equality: (_options$cachePolicyF = (_options$cachePolicyF2 = options.cachePolicyForParams_UNSTABLE) === null || _options$cachePolicyF2 === void 0 ? void 0 : _options$cachePolicyF2.equality) !== null && _options$cachePolicyF !== void 0 ? _options$cachePolicyF : "value", + eviction: "keep-all" + }); + return (params) => { + var _stableStringify; + const cachedSelector = selectorCache.get(params); + if (cachedSelector != null) { + return cachedSelector; + } + const myKey = `${options.key}__selectorFamily/${(_stableStringify = Recoil_stableStringify(params, { + allowFunctions: true + })) !== null && _stableStringify !== void 0 ? _stableStringify : "void"}/${nextIndex++}`; + const myGet = (callbacks) => options.get(params)(callbacks); + const myCachePolicy = options.cachePolicy_UNSTABLE; + const retainedBy = typeof options.retainedBy_UNSTABLE === "function" ? options.retainedBy_UNSTABLE(params) : options.retainedBy_UNSTABLE; + let newSelector; + if (options.set != null) { + const set = options.set; + const mySet = (callbacks, newValue) => set(params)(callbacks, newValue); + newSelector = Recoil_selector({ + key: myKey, + get: myGet, + set: mySet, + cachePolicy_UNSTABLE: myCachePolicy, + dangerouslyAllowMutability: options.dangerouslyAllowMutability, + retainedBy_UNSTABLE: retainedBy + }); + } else { + newSelector = Recoil_selector({ + key: myKey, + get: myGet, + cachePolicy_UNSTABLE: myCachePolicy, + dangerouslyAllowMutability: options.dangerouslyAllowMutability, + retainedBy_UNSTABLE: retainedBy + }); + } + selectorCache.set(params, newSelector); + setConfigDeletionHandler$3(newSelector.key, () => { + selectorCache.delete(params); + }); + return newSelector; + }; +} +var Recoil_selectorFamily = selectorFamily; +var constantSelector = Recoil_selectorFamily({ + key: "__constant", + get: (constant) => () => constant, + cachePolicyForParams_UNSTABLE: { + equality: "reference" + } +}); +function constSelector(constant) { + return constantSelector(constant); +} +var Recoil_constSelector = constSelector; +var throwingSelector = Recoil_selectorFamily({ + key: "__error", + get: (message) => () => { + throw new Error(message); + }, + cachePolicyForParams_UNSTABLE: { + equality: "reference" + } +}); +function errorSelector(message) { + return throwingSelector(message); +} +var Recoil_errorSelector = errorSelector; +function readOnlySelector(atom2) { + return atom2; +} +var Recoil_readOnlySelector = readOnlySelector; +var { + loadableWithError: loadableWithError$3, + loadableWithPromise: loadableWithPromise$3, + loadableWithValue: loadableWithValue$4 +} = Recoil_Loadable; +function concurrentRequests(getRecoilValue, deps) { + const results = Array(deps.length).fill(void 0); + const exceptions = Array(deps.length).fill(void 0); + for (const [i5, dep] of deps.entries()) { + try { + results[i5] = getRecoilValue(dep); + } catch (e5) { + exceptions[i5] = e5; + } + } + return [results, exceptions]; +} +function isError(exp) { + return exp != null && !Recoil_isPromise(exp); +} +function unwrapDependencies(dependencies) { + return Array.isArray(dependencies) ? dependencies : Object.getOwnPropertyNames(dependencies).map((key2) => dependencies[key2]); +} +function getValueFromLoadablePromiseResult(result) { + if (result != null && typeof result === "object" && result.hasOwnProperty("__value")) { + return result.__value; + } + return result; +} +function wrapResults(dependencies, results) { + return Array.isArray(dependencies) ? results : Object.getOwnPropertyNames(dependencies).reduce((out, key2, idx) => ({ + ...out, + [key2]: results[idx] + }), {}); +} +function wrapLoadables(dependencies, results, exceptions) { + const output = exceptions.map((exception, idx) => exception == null ? loadableWithValue$4(results[idx]) : Recoil_isPromise(exception) ? loadableWithPromise$3(exception) : loadableWithError$3(exception)); + return wrapResults(dependencies, output); +} +function combineAsyncResultsWithSyncResults(syncResults, asyncResults) { + return asyncResults.map((result, idx) => result === void 0 ? syncResults[idx] : result); +} +var waitForNone = Recoil_selectorFamily({ + key: "__waitForNone", + get: (dependencies) => ({ + get + }) => { + const deps = unwrapDependencies(dependencies); + const [results, exceptions] = concurrentRequests(get, deps); + return wrapLoadables(dependencies, results, exceptions); + }, + dangerouslyAllowMutability: true +}); +var waitForAny = Recoil_selectorFamily({ + key: "__waitForAny", + get: (dependencies) => ({ + get + }) => { + const deps = unwrapDependencies(dependencies); + const [results, exceptions] = concurrentRequests(get, deps); + if (exceptions.some((exp) => !Recoil_isPromise(exp))) { + return wrapLoadables(dependencies, results, exceptions); + } + return new Promise((resolve) => { + for (const [i5, exp] of exceptions.entries()) { + if (Recoil_isPromise(exp)) { + exp.then((result) => { + results[i5] = getValueFromLoadablePromiseResult(result); + exceptions[i5] = void 0; + resolve(wrapLoadables(dependencies, results, exceptions)); + }).catch((error) => { + exceptions[i5] = error; + resolve(wrapLoadables(dependencies, results, exceptions)); + }); + } + } + }); + }, + dangerouslyAllowMutability: true +}); +var waitForAll = Recoil_selectorFamily({ + key: "__waitForAll", + get: (dependencies) => ({ + get + }) => { + const deps = unwrapDependencies(dependencies); + const [results, exceptions] = concurrentRequests(get, deps); + if (exceptions.every((exp) => exp == null)) { + return wrapResults(dependencies, results); + } + const error = exceptions.find(isError); + if (error != null) { + throw error; + } + return Promise.all(exceptions).then((exceptionResults) => wrapResults(dependencies, combineAsyncResultsWithSyncResults(results, exceptionResults).map(getValueFromLoadablePromiseResult))); + }, + dangerouslyAllowMutability: true +}); +var waitForAllSettled = Recoil_selectorFamily({ + key: "__waitForAllSettled", + get: (dependencies) => ({ + get + }) => { + const deps = unwrapDependencies(dependencies); + const [results, exceptions] = concurrentRequests(get, deps); + if (exceptions.every((exp) => !Recoil_isPromise(exp))) { + return wrapLoadables(dependencies, results, exceptions); + } + return Promise.all(exceptions.map((exp, i5) => Recoil_isPromise(exp) ? exp.then((result) => { + results[i5] = getValueFromLoadablePromiseResult(result); + exceptions[i5] = void 0; + }).catch((error) => { + results[i5] = void 0; + exceptions[i5] = error; + }) : null)).then(() => wrapLoadables(dependencies, results, exceptions)); + }, + dangerouslyAllowMutability: true +}); +var noWait = Recoil_selectorFamily({ + key: "__noWait", + get: (dependency) => ({ + get + }) => { + try { + return loadableWithValue$4(get(dependency)); + } catch (exception) { + return Recoil_isPromise(exception) ? loadableWithPromise$3(exception) : loadableWithError$3(exception); + } + }, + dangerouslyAllowMutability: true +}); +var Recoil_WaitFor = { + waitForNone, + waitForAny, + waitForAll, + waitForAllSettled, + noWait +}; +var { + batchUpdates: batchUpdates$3, + setBatcher: setBatcher$1 +} = Recoil_Batching; +var { + DefaultValue: DefaultValue$3 +} = Recoil_Node; +var { + RecoilRoot: RecoilRoot$2 +} = Recoil_RecoilRoot_react; +var { + isRecoilValue: isRecoilValue$5 +} = Recoil_RecoilValue$1; +var { + retentionZone: retentionZone$1 +} = Recoil_RetentionZone; +var { + freshSnapshot: freshSnapshot$2 +} = Recoil_Snapshot$1; +var { + useGotoRecoilSnapshot: useGotoRecoilSnapshot$1, + useRecoilCallback: useRecoilCallback$1, + useRecoilSnapshot: useRecoilSnapshot$1, + useRecoilState: useRecoilState$1, + useRecoilStateLoadable: useRecoilStateLoadable$1, + useRecoilTransaction: useRecoilTransaction$1, + useRecoilTransactionObserver: useRecoilTransactionObserver$1, + useRecoilValue: useRecoilValue$1, + useRecoilValueLoadable: useRecoilValueLoadable$1, + useResetRecoilState: useResetRecoilState$1, + useRetain: useRetain$1, + useSetRecoilState: useSetRecoilState$1, + useSetUnvalidatedAtomValues: useSetUnvalidatedAtomValues$1, + useTransactionObservation_DEPRECATED: useTransactionObservation_DEPRECATED$1 +} = Recoil_Hooks; +var { + noWait: noWait$1, + waitForAll: waitForAll$1, + waitForAllSettled: waitForAllSettled$1, + waitForAny: waitForAny$1, + waitForNone: waitForNone$1 +} = Recoil_WaitFor; +var Recoil_index = { + DefaultValue: DefaultValue$3, + RecoilRoot: RecoilRoot$2, + useRecoilBridgeAcrossReactRoots_UNSTABLE: Recoil_useRecoilBridgeAcrossReactRoots, + atom: Recoil_atom, + selector: Recoil_selector, + retentionZone: retentionZone$1, + atomFamily: Recoil_atomFamily, + selectorFamily: Recoil_selectorFamily, + constSelector: Recoil_constSelector, + errorSelector: Recoil_errorSelector, + readOnlySelector: Recoil_readOnlySelector, + useRecoilValue: useRecoilValue$1, + useRecoilValueLoadable: useRecoilValueLoadable$1, + useRecoilState: useRecoilState$1, + useRecoilStateLoadable: useRecoilStateLoadable$1, + useSetRecoilState: useSetRecoilState$1, + useResetRecoilState: useResetRecoilState$1, + useGetRecoilValueInfo_UNSTABLE: Recoil_useGetRecoilValueInfo, + useRetain: useRetain$1, + useRecoilCallback: useRecoilCallback$1, + useRecoilTransaction_UNSTABLE: useRecoilTransaction$1, + useGotoRecoilSnapshot: useGotoRecoilSnapshot$1, + useRecoilSnapshot: useRecoilSnapshot$1, + useRecoilTransactionObserver_UNSTABLE: useRecoilTransactionObserver$1, + useTransactionObservation_UNSTABLE: useTransactionObservation_DEPRECATED$1, + useSetUnvalidatedAtomValues_UNSTABLE: useSetUnvalidatedAtomValues$1, + noWait: noWait$1, + waitForNone: waitForNone$1, + waitForAny: waitForAny$1, + waitForAll: waitForAll$1, + waitForAllSettled: waitForAllSettled$1, + isRecoilValue: isRecoilValue$5, + batchUpdates: batchUpdates$3, + setBatcher: setBatcher$1, + snapshot_UNSTABLE: freshSnapshot$2 +}; +var Recoil_index_1 = Recoil_index.DefaultValue; +var Recoil_index_2 = Recoil_index.RecoilRoot; +var Recoil_index_3 = Recoil_index.useRecoilBridgeAcrossReactRoots_UNSTABLE; +var Recoil_index_4 = Recoil_index.atom; +var Recoil_index_5 = Recoil_index.selector; +var Recoil_index_6 = Recoil_index.retentionZone; +var Recoil_index_7 = Recoil_index.atomFamily; +var Recoil_index_8 = Recoil_index.selectorFamily; +var Recoil_index_9 = Recoil_index.constSelector; +var Recoil_index_10 = Recoil_index.errorSelector; +var Recoil_index_11 = Recoil_index.readOnlySelector; +var Recoil_index_12 = Recoil_index.useRecoilValue; +var Recoil_index_13 = Recoil_index.useRecoilValueLoadable; +var Recoil_index_14 = Recoil_index.useRecoilState; +var Recoil_index_15 = Recoil_index.useRecoilStateLoadable; +var Recoil_index_16 = Recoil_index.useSetRecoilState; +var Recoil_index_17 = Recoil_index.useResetRecoilState; +var Recoil_index_18 = Recoil_index.useGetRecoilValueInfo_UNSTABLE; +var Recoil_index_19 = Recoil_index.useRetain; +var Recoil_index_20 = Recoil_index.useRecoilCallback; +var Recoil_index_21 = Recoil_index.useRecoilTransaction_UNSTABLE; +var Recoil_index_22 = Recoil_index.useGotoRecoilSnapshot; +var Recoil_index_23 = Recoil_index.useRecoilSnapshot; +var Recoil_index_24 = Recoil_index.useRecoilTransactionObserver_UNSTABLE; +var Recoil_index_25 = Recoil_index.useTransactionObservation_UNSTABLE; +var Recoil_index_26 = Recoil_index.useSetUnvalidatedAtomValues_UNSTABLE; +var Recoil_index_27 = Recoil_index.noWait; +var Recoil_index_28 = Recoil_index.waitForNone; +var Recoil_index_29 = Recoil_index.waitForAny; +var Recoil_index_30 = Recoil_index.waitForAll; +var Recoil_index_31 = Recoil_index.waitForAllSettled; +var Recoil_index_32 = Recoil_index.isRecoilValue; +var Recoil_index_33 = Recoil_index.batchUpdates; +var Recoil_index_34 = Recoil_index.setBatcher; +var Recoil_index_35 = Recoil_index.snapshot_UNSTABLE; + +// src/types/types.ts +var eventTypes = { + activeFileChange: "mkmd-active-file-change", + refreshView: "mkmd-refresh-view", + revealFile: "mkmd-reveal-file", + vaultChange: "mkmd-vault-change", + updateSections: "mkmd-update-sections", + settingsChanged: "mkmd-settings-changed", + spawnPortal: "mkmd-spawn-portal", + focusPortal: "mkmd-focus-portal" +}; + +// src/hooks/ForceUpdate.tsx +function useForceUpdate() { + const [value, setValue] = p2(0); + return () => setValue((value2) => value2 + 1); +} + +// src/components/Sidebar/FileExplorer.tsx +var import_obsidian7 = require("obsidian"); + +// src/recoil/pluginState.ts +var view = Recoil_index_4({ + key: "fileTreeViewState", + default: "folder" +}); +var activeFolderPath = Recoil_index_4({ + key: "fileTreeActiveFolderPathState", + default: "" +}); +var activeFile = Recoil_index_4({ + key: "fileTreeActiveFile", + default: null, + dangerouslyAllowMutability: true +}); +var excludedFolders = Recoil_index_4({ + key: "fileTreeExcludedFoldersState", + default: [] +}); +var excludedExtensions = Recoil_index_4({ + key: "fileTreeExcludedExtensions", + default: [] +}); +var folderFileCountMap = Recoil_index_4({ + key: "fileTreeFolderFileCountMapState", + default: {} +}); +var folderTree = Recoil_index_4({ + key: "fileTreeFolderTreeState", + default: null, + dangerouslyAllowMutability: true +}); +var fileList = Recoil_index_4({ + key: "fileTreeFileListState", + default: [], + dangerouslyAllowMutability: true +}); +var sections = Recoil_index_4({ + key: "fileTreePinnedFilesState", + default: [], + dangerouslyAllowMutability: true +}); +var fileIcons = Recoil_index_4({ + key: "fileTreeFileIcons", + default: [] +}); +var openFolders = Recoil_index_4({ + key: "fileTreeOpenFoldersState", + default: [] +}); +var showSubFolders = Recoil_index_4({ + key: "showSubFoldersInVault", + default: false +}); +var focusedFolder = Recoil_index_4({ + key: "fileTreeFocusedFolder", + default: null, + dangerouslyAllowMutability: true +}); + +// src/utils/Utils.ts +var import_obsidian4 = require("obsidian"); + +// src/modals.ts +var import_obsidian = require("obsidian"); + +// src/i18n.ts +var T4 = class { + constructor() { + this.all = { + en: { + commands: { + h1: "Heading 1", + h2: "Heading 2", + h3: "Heading 3", + list: "Bullet List", + "ordered-list": "Numbered List", + todo: "To-do List", + quote: "Quote", + divider: "Divider", + note: "Link to Note", + link: "Web Link", + callout: "Callout", + codeblock: "Code Block", + emoji: "Emoji", + image: "Image", + flow: "Flow Note", + tag: "Tag" + }, + styles: { + bold: "Bold", + italics: "Italics", + strikethrough: "Strikethrough", + code: "Code", + link: "Web Link", + blocklink: "Link to Note" + }, + commandsSuggest: { + noResult: "No result" + }, + commandPalette: { + enable: "Enable", + disabled: "Disable" + }, + menu: { + openFilePane: "Open in a new pane", + rename: "Rename", + moveFile: "Move file to...", + duplicate: "Make a copy", + edit: "Edit", + delete: "Delete", + getHelp: "Make.md Community", + openVault: "Open Another Workspace", + obSettings: "Obsidian Settings", + commandPalette: "Command Palette", + newSection: "New Space", + spaceTitle: "Add/Remove in Space" + }, + buttons: { + moreOptions: "More Options", + newNote: "New Note", + changeIcon: "Change Sticker", + rename: "Change Name", + createFolder: "New Folder", + createNote: "New Note", + createSection: "New Space", + cancel: "Cancel", + search: "Search" + }, + labels: { + createFolder: "New Folder Name", + rename: "Rename Note", + renameSection: "Rename Space", + createSection: "New Space", + createNote: "New Note Name", + collapse: "Collapse", + expand: "Expand", + findStickers: "Find Sticker", + placeholder: "Type '/' for commands" + }, + flowView: { + emptyDoc: "Empty Document", + itemsCount: " Items", + emptyFolder: "This Folder is Empty" + }, + notice: { + duplicateFile: "Folder already contains note with same name.", + addedToSection: "Added to Space" + }, + settings: { + sectionSidebar: "Sidebar", + sectionEditor: "Editor", + sidebar: { + name: "Use Sidebar and Flow View", + desc: `The sidebar gives you control over how you organize your files and access to flow view` + }, + sidebarStickers: { + name: "File Stickers", + desc: `Use Emojis to make it easier to find your notes` + }, + sidebarRibbon: { + name: "Show Ribbon Bar", + desc: `Show/hide Obsidian ribbon bar` + }, + sidebarTabs: { + name: "Show Sidebar Tabs", + desc: `Show/hide other sidebar tabs` + }, + editorMakermode: { + name: "Maker Mode", + desc: `Make the editing experience with reduced Markdown distractions.` + }, + editorMakeMenu: { + name: "Make Menu Shortcut", + desc: `Open the Make menu to quickly add content` + }, + editorFlowReplace: { + name: "Flow Editor", + desc: `Hover internal links to open flow editor or use ! infront of embeds. (!![[NOTE]])` + } + } + } + }; + this.lang = localStorage.getItem("language"); + } + get texts() { + return this.all["en"]; + } +}; +var i18n_default = new T4().texts; + +// src/modals.ts +var VaultChangeModal = class extends import_obsidian.Modal { + constructor(plugin, file, action, section) { + super(plugin.app); + this.file = file; + this.action = action; + this.plugin = plugin; + this.section = section; + } + onOpen() { + let { contentEl } = this; + let myModal = this; + let headerText; + if (this.action === "rename") { + headerText = i18n_default.labels.rename; + } else if (this.action === "create folder") { + headerText = i18n_default.labels.createFolder; + } else if (this.action === "create note") { + headerText = i18n_default.labels.createNote; + } + const headerEl = contentEl.createEl("div", { text: headerText }); + headerEl.addClass("modal-title"); + const inputEl = contentEl.createEl("input"); + inputEl.style.cssText = "width: 100%; height: 2.5em; margin-bottom: 15px;"; + if (this.action === "rename") { + if (this.file.name.endsWith(".md")) { + inputEl.value = this.file.name.substring(0, this.file.name.lastIndexOf(".")); + } else { + inputEl.value = this.file.name; + } + } + inputEl.focus(); + let changeButtonText; + if (this.action === "rename") { + changeButtonText = i18n_default.buttons.rename; + } else if (this.action === "create folder") { + changeButtonText = i18n_default.buttons.createFolder; + } else if (this.action === "create note") { + changeButtonText = i18n_default.buttons.createNote; + } + const changeButton = contentEl.createEl("button", { text: changeButtonText }); + const cancelButton = contentEl.createEl("button", { text: "Cancel" }); + cancelButton.style.cssText = "float: right;"; + cancelButton.addEventListener("click", () => { + myModal.close(); + }); + const updateSections = (sections2) => { + this.plugin.settings.spaces = sections2; + this.plugin.saveSettings(); + }; + const onClickAction = async () => { + let newName = inputEl.value; + if (this.action === "rename") { + if (this.file.name.endsWith(".md")) + newName = newName + ".md"; + this.app.fileManager.renameFile(this.file, this.file.parent.path + "/" + newName); + } else if (this.action === "create folder") { + const path = this.file.path + "/" + newName; + this.app.vault.createFolder(path); + if (this.section >= 0) + updateSections(this.plugin.settings.spaces.map((s10, k5) => { + return k5 == this.section ? { + ...s10, + children: [newName, ...s10.children] + } : s10; + })); + } else if (this.action === "create note") { + await createNewMarkdownFile(this.plugin.app, this.file, newName, ""); + } + myModal.close(); + }; + changeButton.addEventListener("click", onClickAction); + inputEl.addEventListener("keydown", (e5) => { + if (e5.key === "Enter") + onClickAction(); + }); + } + onClose() { + let { contentEl } = this; + contentEl.empty(); + } +}; +var MoveSuggestionModal = class extends import_obsidian.FuzzySuggestModal { + constructor(app2, fileOrFolderToMove) { + super(app2); + this.fileOrFolderToMove = fileOrFolderToMove; + } + getItemText(item) { + return item.path; + } + getItems() { + return getAllFoldersInVault(this.app); + } + onChooseItem(item, evt) { + this.app.vault.rename(this.fileOrFolderToMove, item.path + "/" + this.fileOrFolderToMove.name); + } +}; +function getAllFoldersInVault(app2) { + let folders = []; + let rootFolder = app2.vault.getRoot(); + folders.push(rootFolder); + function recursiveFx(folder) { + for (let child of folder.children) { + if (child instanceof import_obsidian.TFolder) { + let childFolder = child; + folders.push(childFolder); + if (childFolder.children) + recursiveFx(childFolder); + } + } + } + recursiveFx(rootFolder); + return folders; +} +var SectionChangeModal = class extends import_obsidian.Modal { + constructor(plugin, section, sectionIndex, action) { + super(plugin.app); + this.section = section; + this.sectionIndex = sectionIndex; + this.action = action; + this.plugin = plugin; + } + onOpen() { + let { contentEl } = this; + let myModal = this; + let headerText; + if (this.action === "rename") { + headerText = i18n_default.labels.renameSection; + } else if (this.action === "create") { + headerText = i18n_default.labels.createSection; + } + const headerEl = contentEl.createEl("div", { text: headerText }); + headerEl.addClass("modal-title"); + const inputEl = contentEl.createEl("input"); + inputEl.style.cssText = "width: 100%; height: 2.5em; margin-bottom: 15px;"; + if (this.action === "rename") { + inputEl.value = this.section; + } + inputEl.focus(); + let changeButtonText; + if (this.action === "rename") { + changeButtonText = i18n_default.buttons.rename; + } else if (this.action === "create") { + changeButtonText = i18n_default.buttons.createSection; + } + const changeButton = contentEl.createEl("button", { text: changeButtonText }); + const cancelButton = contentEl.createEl("button", { text: i18n_default.buttons.cancel }); + cancelButton.style.cssText = "float: right;"; + cancelButton.addEventListener("click", () => { + myModal.close(); + }); + const updateSections = (sections2) => { + this.plugin.settings.spaces = sections2; + this.plugin.saveSettings(); + }; + const onClickAction = async () => { + let newName = inputEl.value; + if (this.action === "rename") { + updateSections(this.plugin.settings.spaces.map((s10, i5) => { + return i5 == this.sectionIndex ? { + ...s10, + section: newName + } : s10; + })); + } else if (this.action === "create") { + updateSections([{ section: newName, children: [], collapsed: false }, ...this.plugin.settings.spaces]); + } + myModal.close(); + }; + changeButton.addEventListener("click", onClickAction); + inputEl.addEventListener("keydown", (e5) => { + if (e5.key === "Enter") + onClickAction(); + }); + } + onClose() { + let { contentEl } = this; + contentEl.empty(); + } +}; + +// src/components/FlowView/FlowView.tsx +var import_obsidian3 = require("obsidian"); + +// src/components/FlowView/FlowRow.tsx +var import_dayjs = __toESM(require_dayjs_min()); + +// src/cm-extensions/makerMode/callout.tsx +var import_view = require("@codemirror/view"); +var import_language = require("@codemirror/language"); +var import_state = require("@codemirror/state"); + +// src/flow-editor/FlowEditor.tsx +var import_obsidian2 = require("obsidian"); +function genId(size) { + const chars = []; + for (let n4 = 0; n4 < size; n4++) + chars.push((16 * Math.random() | 0).toString(16)); + return chars.join(""); +} +var popovers = /* @__PURE__ */ new WeakMap(); +var mouseCoords = { x: 0, y: 0 }; +function nosuper(base) { + const derived = function() { + return Object.setPrototypeOf(new import_obsidian2.Component(), new.target.prototype); + }; + derived.prototype = base.prototype; + return Object.setPrototypeOf(derived, base); +} +var _a, _b, _c, _d, _e; +var FlowEditor = class extends nosuper(import_obsidian2.HoverPopover) { + constructor(parent, targetEl, plugin, waitTime, onShowCallback) { + super(); + this.targetEl = targetEl; + this.plugin = plugin; + this.onShowCallback = onShowCallback; + this.abortController = this.addChild(new import_obsidian2.Component()); + this.detaching = false; + this.opening = false; + this.rootSplit = new import_obsidian2.WorkspaceSplit(window.app.workspace, "vertical"); + this.targetRect = (_a = this.targetEl) == null ? void 0 : _a.getBoundingClientRect(); + this.oldPopover = (_b = this.parent) == null ? void 0 : _b.flowEditor; + this.document = (_e = (_d = (_c = this.targetEl) == null ? void 0 : _c.ownerDocument) != null ? _d : window.activeDocument) != null ? _e : window.document; + this.id = genId(8); + this.hoverEl = this.document.defaultView.createDiv({ + cls: "mk-floweditor mk-hover-popover", + attr: { id: "he" + this.id } + }); + if (waitTime === void 0) { + waitTime = 300; + } + this.onTarget = true; + this.parent = parent; + this.waitTime = waitTime; + this.state = import_obsidian2.PopoverState.Showing; + const { hoverEl } = this; + this.abortController.load(); + this.timer = window.setTimeout(this.show.bind(this), waitTime); + this.setActive = this._setActive.bind(this); + if (hoverEl) { + hoverEl.addEventListener("mousedown", this.setActive); + } + popovers.set(this.hoverEl, this); + this.hoverEl.addClass("hover-editor"); + this.containerEl = this.hoverEl.createDiv("popover-content"); + this.buildWindowControls(); + this.setInitialDimensions(); + } + static activeWindows() { + const windows = [window]; + const { floatingSplit } = app.workspace; + if (floatingSplit) { + for (const split of floatingSplit.children) { + if (split.win) + windows.push(split.win); + } + } + return windows; + } + static containerForDocument(doc) { + if (doc !== document && app.workspace.floatingSplit) + for (const container of app.workspace.floatingSplit.children) { + if (container.doc === doc) + return container; + } + return app.workspace.rootSplit; + } + static activePopovers() { + return this.activeWindows().flatMap(this.popoversForWindow); + } + static popoversForWindow(win) { + var _a2, _b2; + return Array.prototype.slice.call((_b2 = (_a2 = win == null ? void 0 : win.document) == null ? void 0 : _a2.body.querySelectorAll(".mk-hover-popover")) != null ? _b2 : []).map((el) => popovers.get(el)).filter((he2) => he2); + } + static forLeaf(leaf) { + const el = leaf && document.body.matchParent.call(leaf.containerEl, ".mk-hover-popover"); + return el ? popovers.get(el) : void 0; + } + static iteratePopoverLeaves(ws, cb) { + for (const popover of this.activePopovers()) { + if (popover.rootSplit && ws.iterateLeaves(cb, popover.rootSplit)) + return true; + } + return false; + } + _setActive() { + this.plugin.app.workspace.setActiveLeaf(this.leaves()[0], { focus: true }); + } + getDefaultMode() { + var _a2, _b2; + return ((_b2 = (_a2 = this.parent) == null ? void 0 : _a2.view) == null ? void 0 : _b2.getMode) ? this.parent.view.getMode() : "preview"; + } + updateLeaves() { + if (this.onTarget && this.targetEl && !this.document.contains(this.targetEl)) { + this.onTarget = false; + this.transition(); + } + let leafCount = 0; + this.plugin.app.workspace.iterateLeaves((leaf) => { + leafCount++; + }, this.rootSplit); + if (leafCount === 0) { + this.hide(); + } else if (leafCount > 1) { + } + this.hoverEl.setAttribute("data-leaf-count", leafCount.toString()); + } + buildWindowControls() { + this.titleEl = this.document.defaultView.createDiv("popover-titlebar"); + this.titleEl.createDiv("popover-title"); + this.containerEl.prepend(this.titleEl); + } + attachLeaf() { + this.rootSplit.getRoot = () => this.plugin.app.workspace[this.document === document ? "rootSplit" : "floatingSplit"]; + this.rootSplit.getContainer = () => FlowEditor.containerForDocument(this.document); + this.titleEl.insertAdjacentElement("afterend", this.rootSplit.containerEl); + const leaf = this.plugin.app.workspace.createLeafInParent(this.rootSplit, 0); + this.updateLeaves(); + return leaf; + } + onload() { + super.onload(); + this.registerEvent(this.plugin.app.workspace.on("layout-change", this.updateLeaves, this)); + this.registerEvent(app.workspace.on("layout-change", () => { + this.rootSplit.children.forEach((item, index) => { + if (item instanceof import_obsidian2.WorkspaceTabs) { + this.rootSplit.replaceChild(index, item.children[0]); + } + }); + })); + } + leaves() { + const leaves = []; + this.plugin.app.workspace.iterateLeaves((leaf) => { + leaves.push(leaf); + }, this.rootSplit); + return leaves; + } + setInitialDimensions() { + this.hoverEl.style.height = "auto"; + this.hoverEl.style.width = "100%"; + } + onShow() { + var _a2, _b2; + const closeDelay = 600; + setTimeout(() => this.waitTime = closeDelay, closeDelay); + (_a2 = this.oldPopover) == null ? void 0 : _a2.hide(); + this.oldPopover = null; + this.hoverEl.toggleClass("is-new", true); + this.document.body.addEventListener("click", () => { + this.hoverEl.toggleClass("is-new", false); + }, { once: true, capture: true }); + if (this.parent) { + this.parent.flowEditor = this; + } + const viewHeaderEl = this.hoverEl.querySelector(".view-header"); + viewHeaderEl == null ? void 0 : viewHeaderEl.remove(); + const sizer = this.hoverEl.querySelector(".workspace-leaf"); + this.hoverEl.appendChild(sizer); + const inlineTitle = this.hoverEl.querySelector(".inline-title"); + inlineTitle.remove(); + (_b2 = this.onShowCallback) == null ? void 0 : _b2.call(this); + this.onShowCallback = void 0; + } + transition() { + if (this.shouldShow()) { + if (this.state === import_obsidian2.PopoverState.Hiding) { + this.state = import_obsidian2.PopoverState.Shown; + clearTimeout(this.timer); + } + } else { + if (this.state === import_obsidian2.PopoverState.Showing) { + this.hide(); + } else { + if (this.state === import_obsidian2.PopoverState.Shown) { + this.state = import_obsidian2.PopoverState.Hiding; + this.timer = window.setTimeout(() => { + if (this.shouldShow()) { + this.transition(); + } else { + this.hide(); + } + }, this.waitTime); + } + } + } + } + detect(el) { + const { targetEl, hoverEl } = this; + if (targetEl) { + this.onTarget = el === targetEl || targetEl.contains(el); + } + } + shouldShow() { + return this.shouldShowSelf() || this.shouldShowChild(); + } + shouldShowChild() { + return FlowEditor.activePopovers().some((popover) => { + if (popover !== this && popover.targetEl && this.hoverEl.contains(popover.targetEl)) { + return popover.shouldShow(); + } + return false; + }); + } + shouldShowSelf() { + return !this.detaching && !!(this.onTarget || this.state == import_obsidian2.PopoverState.Shown || this.document.querySelector(`body>.modal-container, body > #he${this.id} ~ .menu, body > #he${this.id} ~ .suggestion-container`)); + } + show() { + if (!this.targetEl || this.document.body.contains(this.targetEl)) { + this.state = import_obsidian2.PopoverState.Shown; + this.timer = 0; + this.shownPos = mouseCoords; + this.targetEl.replaceChildren(this.hoverEl); + this.onShow(); + app.workspace.onLayoutChange(); + this.load(); + } else { + this.hide(); + } + if (this.hoverEl.dataset.imgHeight && this.hoverEl.dataset.imgWidth) { + this.hoverEl.style.height = parseFloat(this.hoverEl.dataset.imgHeight) + this.titleEl.offsetHeight + "px"; + this.hoverEl.style.width = parseFloat(this.hoverEl.dataset.imgWidth) + "px"; + } + } + onHide() { + var _a2; + this.oldPopover = null; + if (((_a2 = this.parent) == null ? void 0 : _a2.flowEditor) === this) { + this.parent.flowEditor = null; + } + } + hide() { + var _a2; + this.onTarget = false; + this.detaching = true; + if (this.timer) { + clearTimeout(this.timer); + this.timer = 0; + } + this.hoverEl.hide(); + if (this.opening) + return; + const leaves = this.leaves(); + if (leaves.length) { + leaves.forEach((leaf) => leaf.detach()); + } else { + this.parent = null; + (_a2 = this.abortController) == null ? void 0 : _a2.unload(); + this.abortController = void 0; + return this.nativeHide(); + } + } + nativeHide() { + var _a2; + const { hoverEl, targetEl } = this; + this.state = import_obsidian2.PopoverState.Hidden; + hoverEl.detach(); + if (targetEl) { + const parent = targetEl.matchParent(".mk-hover-popover"); + if (parent) + (_a2 = popovers.get(parent)) == null ? void 0 : _a2.transition(); + } + this.onHide(); + this.unload(); + } + resolveLink(linkText, sourcePath) { + const link = (0, import_obsidian2.parseLinktext)(linkText); + const tFile = link ? this.plugin.app.metadataCache.getFirstLinkpathDest(link.path, sourcePath) : null; + return tFile; + } + async openFile(file, openState, useLeaf) { + if (this.detaching) + return; + const leaf = useLeaf != null ? useLeaf : this.attachLeaf(); + this.opening = true; + try { + await leaf.openFile(file, openState); + } catch (e5) { + console.error(e5); + } finally { + this.opening = false; + if (this.detaching) + this.hide(); + } + this.plugin.app.workspace.setActiveLeaf(leaf); + return leaf; + } + buildState(parentMode, eState) { + return { + active: false, + state: {}, + eState + }; + } + buildEphemeralState(file, link) { + const cache = this.plugin.app.metadataCache.getFileCache(file); + const subpath = cache ? (0, import_obsidian2.resolveSubpath)(cache, (link == null ? void 0 : link.subpath) || "") : void 0; + const eState = { subpath: link == null ? void 0 : link.subpath }; + if (subpath) { + eState.line = subpath.start.line; + eState.startLoc = subpath.start; + eState.endLoc = subpath.end || void 0; + } + return eState; + } +}; + +// src/cm-extensions/makerMode/callout.tsx +var portalTypeAnnotation = import_state.Annotation.define(); +var flowIDAnnotation = import_state.Annotation.define(); +var flowIDStateField = import_state.StateField.define({ + create: () => void 0, + update(value, tr) { + if (tr.annotation(flowIDAnnotation)) + return tr.annotation(flowIDAnnotation); + return value; + } +}); +var flowTypeStateField = import_state.StateField.define({ + create: () => "none", + update(value, tr) { + if (tr.annotation(portalTypeAnnotation)) + return tr.annotation(portalTypeAnnotation); + return value; + } +}); +var calloutField = import_state.StateField.define({ + create() { + return import_view.Decoration.none; + }, + update(value, tr) { + if (tr.state.field(flowTypeStateField) != "doc") { + return value; + } + let builder = new import_state.RangeSetBuilder(); + let nodes2 = []; + (0, import_language.syntaxTree)(tr.state).iterate({ + enter: ({ name, from, to }) => { + nodes2.push({ name, from, to }); + } + }); + const nextQuote = (ns, to) => { + const nq = ns.find((f5) => f5.from == to + 1 && f5.name.contains("HyperMD-quote")); + if (nq) { + return nextQuote(ns, nq.to); + } + return to; + }; + const previous = value.iter(); + const previousSpecs = []; + while (previous.value !== null) { + previousSpecs.push(previous.value.spec.widget.info); + previous.next(); + } + let index = 0; + nodes2.map(({ name, from, to }) => { + if (name.contains("HyperMD-callout")) { + const existingCallout = previousSpecs[index]; + const endQuote = nextQuote(nodes2, to); + const lineStart = tr.state.doc.lineAt(from).number; + const lineEnd = tr.state.doc.lineAt(endQuote).number; + if (existingCallout) { + builder.add(from, endQuote + 1, calloutBlock({ from: lineStart, to: lineEnd }, tr.state.sliceDoc(from, endQuote), existingCallout.id)); + } else { + builder.add(from, endQuote + 1, calloutBlock({ from: lineStart, to: lineEnd }, tr.state.sliceDoc(from, endQuote), genId(8))); + } + index++; + } + }); + const dec = builder.finish(); + return dec; + }, + provide: (f5) => import_view.EditorView.decorations.from(f5) +}); +var CalloutWidget = class extends import_view.WidgetType { + constructor(info) { + super(); + this.info = info; + } + eq(other) { + return other.info.id === this.info.id; + } + toDOM() { + const parseTextToCallout = (text) => { + if (!this.info.text) { + return { icon: "", title: "" }; + } + const stringArray = text.split("\n"); + const titleRegex = RegExp(/.*\[!(\w*)\]\s(.*)/); + const title = titleRegex.exec(stringArray[0]); + if (!title || title.length < 3) { + return { icon: "", title: "" }; + } + return { + icon: title[1], + title: title[2] + }; + }; + const callOutData = parseTextToCallout(this.info.text); + const div = document.createElement("div"); + div.toggleClass("callout", true); + const divTitle = div.createDiv("div"); + divTitle.toggleClass("callout-title", true); + const div2 = div.createDiv("div"); + div2.toggleClass("callout-content", true); + div2.setAttribute("id", "mk-callout-" + this.info.id); + return div; + } +}; +var calloutBlock = (range, text, id) => import_view.Decoration.widget({ + widget: new CalloutWidget({ range, text, id }), + block: true +}); + +// src/cm-extensions/makerMode/flowEditor.tsx +var import_view3 = require("@codemirror/view"); +var import_state3 = require("@codemirror/state"); + +// src/utils/cm-utils.ts +var import_language2 = require("@codemirror/language"); +function iterateTreeInSelection(selection, state, iterateFns) { + (0, import_language2.syntaxTree)(state).iterate({ ...iterateFns, from: selection.from, to: selection.to }); +} +function iterateTreeInDocument(state, iterateFns) { + (0, import_language2.syntaxTree)(state).iterate({ ...iterateFns }); +} + +// src/cm-extensions/tooltip.ts +var import_view2 = require("@codemirror/view"); +var import_state2 = require("@codemirror/state"); +var ios = typeof navigator != "undefined" && !/Edge\/(\d+)/.exec(navigator.userAgent) && /Apple Computer/.test(navigator.vendor) && (/Mobile\/\w+/.test(navigator.userAgent) || navigator.maxTouchPoints > 2); +var Outside = "-10000px"; +var TooltipViewManager = class { + constructor(view2, facet, createTooltipView) { + this.facet = facet; + this.createTooltipView = createTooltipView; + this.input = view2.state.facet(facet); + this.tooltips = this.input.filter((t4) => t4); + this.tooltipViews = this.tooltips.map(createTooltipView); + } + update(update) { + let input = update.state.facet(this.facet); + let tooltips2 = input.filter((x5) => x5); + if (input === this.input) { + for (let t4 of this.tooltipViews) + if (t4.update) + t4.update(update); + return false; + } + let tooltipViews = []; + for (let i5 = 0; i5 < tooltips2.length; i5++) { + let tip = tooltips2[i5], known = -1; + if (!tip) + continue; + for (let i6 = 0; i6 < this.tooltips.length; i6++) { + let other = this.tooltips[i6]; + if (other && other.create == tip.create) + known = i6; + } + if (known < 0) { + tooltipViews[i5] = this.createTooltipView(tip); + } else { + let tooltipView = tooltipViews[i5] = this.tooltipViews[known]; + if (tooltipView.update) + tooltipView.update(update); + } + } + for (let t4 of this.tooltipViews) + if (tooltipViews.indexOf(t4) < 0) + t4.dom.remove(); + this.input = input; + this.tooltips = tooltips2; + this.tooltipViews = tooltipViews; + return true; + } +}; +function tooltips(config = {}) { + return tooltipConfig.of(config); +} +function windowSpace() { + return { top: 0, left: 0, bottom: innerHeight, right: innerWidth }; +} +var tooltipConfig = import_state2.Facet.define({ + combine: (values) => { + var _a2, _b2, _c2; + return { + position: ios ? "absolute" : ((_a2 = values.find((conf) => conf.position)) == null ? void 0 : _a2.position) || "fixed", + parent: ((_b2 = values.find((conf) => conf.parent)) == null ? void 0 : _b2.parent) || null, + tooltipSpace: ((_c2 = values.find((conf) => conf.tooltipSpace)) == null ? void 0 : _c2.tooltipSpace) || windowSpace + }; + } +}); +var tooltipPlugin = import_view2.ViewPlugin.fromClass(class { + constructor(view2) { + this.view = view2; + this.inView = true; + this.lastTransaction = 0; + this.measureTimeout = -1; + var _a2; + let config = view2.state.facet(tooltipConfig); + this.position = config.position; + this.parent = config.parent; + this.classes = view2.themeClasses; + this.createContainer(); + this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }; + this.manager = new TooltipViewManager(view2, showTooltip, (t4) => this.createTooltip(t4)); + this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((entries) => { + if (Date.now() > this.lastTransaction - 50 && entries.length > 0 && entries[entries.length - 1].intersectionRatio < 1) + this.measureSoon(); + }, { threshold: [1] }) : null; + this.observeIntersection(); + (_a2 = view2.dom.ownerDocument.defaultView) == null ? void 0 : _a2.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)); + this.maybeMeasure(); + } + createContainer() { + if (this.parent) { + this.container = document.createElement("div"); + this.container.style.position = "relative"; + this.container.className = this.view.themeClasses; + this.parent.appendChild(this.container); + } else { + this.container = this.view.dom; + } + } + observeIntersection() { + if (this.intersectionObserver) { + this.intersectionObserver.disconnect(); + for (let tooltip of this.manager.tooltipViews) + this.intersectionObserver.observe(tooltip.dom); + } + } + measureSoon() { + if (this.measureTimeout < 0) + this.measureTimeout = setTimeout(() => { + this.measureTimeout = -1; + this.maybeMeasure(); + }, 50); + } + update(update) { + if (update.transactions.length) + this.lastTransaction = Date.now(); + let updated = this.manager.update(update); + if (updated) + this.observeIntersection(); + let shouldMeasure = updated || update.geometryChanged; + let newConfig = update.state.facet(tooltipConfig); + if (newConfig.position != this.position) { + this.position = newConfig.position; + for (let t4 of this.manager.tooltipViews) + t4.dom.style.position = this.position; + shouldMeasure = true; + } + if (newConfig.parent != this.parent) { + if (this.parent) + this.container.remove(); + this.parent = newConfig.parent; + this.createContainer(); + for (let t4 of this.manager.tooltipViews) + this.container.appendChild(t4.dom); + shouldMeasure = true; + } else if (this.parent && this.view.themeClasses != this.classes) { + this.classes = this.container.className = this.view.themeClasses; + } + if (shouldMeasure) + this.maybeMeasure(); + } + createTooltip(tooltip) { + let tooltipView = tooltip.create(this.view); + tooltipView.dom.classList.add("cm-tooltip"); + if (tooltip.arrow && !tooltipView.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) { + let arrow2 = document.createElement("div"); + arrow2.className = "cm-tooltip-arrow"; + tooltipView.dom.appendChild(arrow2); + } + tooltipView.dom.style.position = this.position; + tooltipView.dom.style.top = Outside; + this.container.appendChild(tooltipView.dom); + if (tooltipView.mount) + tooltipView.mount(this.view); + return tooltipView; + } + destroy() { + var _a2, _b2; + (_a2 = this.view.dom.ownerDocument.defaultView) == null ? void 0 : _a2.removeEventListener("resize", this.measureSoon); + for (let { dom } of this.manager.tooltipViews) + dom.remove(); + (_b2 = this.intersectionObserver) == null ? void 0 : _b2.disconnect(); + clearTimeout(this.measureTimeout); + } + readMeasure() { + let editor = this.view.dom.getBoundingClientRect(); + return { + editor, + parent: this.parent ? this.container.getBoundingClientRect() : editor, + pos: this.manager.tooltips.map((t4, i5) => { + let tv = this.manager.tooltipViews[i5]; + return tv.getCoords ? tv.getCoords(t4.pos) : this.view.coordsAtPos(t4.pos); + }), + size: this.manager.tooltipViews.map(({ dom }) => dom.getBoundingClientRect()), + space: this.view.state.facet(tooltipConfig).tooltipSpace(this.view) + }; + } + writeMeasure(measured) { + let { editor, space } = measured; + let others = []; + for (let i5 = 0; i5 < this.manager.tooltips.length; i5++) { + let tooltip = this.manager.tooltips[i5], tView = this.manager.tooltipViews[i5], { dom } = tView; + let pos = measured.pos[i5], size = measured.size[i5]; + if (!pos || pos.bottom <= Math.max(editor.top, space.top) || pos.top >= Math.min(editor.bottom, space.bottom) || pos.right < Math.max(editor.left, space.left) - 0.1 || pos.left > Math.min(editor.right, space.right) + 0.1) { + dom.style.top = Outside; + continue; + } + let arrow2 = tooltip.arrow ? tView.dom.querySelector(".cm-tooltip-arrow") : null; + let arrowHeight = arrow2 ? 7 /* Size */ : 0; + let width = size.right - size.left, height = size.bottom - size.top; + let offset2 = tView.offset || noOffset, ltr = this.view.textDirection == import_view2.Direction.LTR; + let left2 = size.width > space.right - space.left ? ltr ? space.left : space.right - size.width : ltr ? Math.min(pos.left - (arrow2 ? 14 /* Offset */ : 0) + offset2.x, space.right - width) : Math.max(space.left, pos.left - width + (arrow2 ? 14 /* Offset */ : 0) - offset2.x); + let above = !!tooltip.above; + if (!tooltip.strictSide && (above ? pos.top - (size.bottom - size.top) - offset2.y < space.top : pos.bottom + (size.bottom - size.top) + offset2.y > space.bottom) && above == space.bottom - pos.bottom > pos.top - space.top) + above = !above; + let top2 = above ? pos.top - height - arrowHeight - offset2.y : pos.bottom + arrowHeight + offset2.y; + let right2 = left2 + width; + if (tView.overlap !== true) { + for (let r6 of others) + if (r6.left < right2 && r6.right > left2 && r6.top < top2 + height && r6.bottom > top2) + top2 = above ? r6.top - height - 2 - arrowHeight : r6.bottom + arrowHeight + 2; + } + if (this.position == "absolute") { + dom.style.top = top2 - measured.parent.top + "px"; + dom.style.left = left2 - measured.parent.left + "px"; + } else { + dom.style.top = top2 + "px"; + dom.style.left = left2 + "px"; + } + if (arrow2) + arrow2.style.left = `${pos.left + (ltr ? offset2.x : -offset2.x) - (left2 + 14 /* Offset */ - 7 /* Size */)}px`; + if (tView.overlap !== true) + others.push({ left: left2, top: top2, right: right2, bottom: top2 + height }); + dom.classList.toggle("cm-tooltip-above", above); + dom.classList.toggle("cm-tooltip-below", !above); + if (tView.positioned) + tView.positioned(); + } + } + maybeMeasure() { + if (this.manager.tooltips.length) { + if (this.view.inView) + this.view.requestMeasure(this.measureReq); + if (this.inView != this.view.inView) { + this.inView = this.view.inView; + if (!this.inView) + for (let tv of this.manager.tooltipViews) + tv.dom.style.top = Outside; + } + } + } +}, { + eventHandlers: { + scroll() { + this.maybeMeasure(); + } + } +}); +var baseTheme = import_view2.EditorView.baseTheme({ + ".cm-tooltip": { + zIndex: 100 + }, + "&light .cm-tooltip": { + border: "1px solid #bbb", + backgroundColor: "#f5f5f5" + }, + "&light .cm-tooltip-section:not(:first-child)": { + borderTop: "1px solid #bbb" + }, + "&dark .cm-tooltip": { + backgroundColor: "#333338", + color: "white" + }, + ".cm-tooltip-arrow": { + height: `${7 /* Size */}px`, + width: `${7 /* Size */ * 2}px`, + position: "absolute", + zIndex: -1, + overflow: "hidden", + "&:before, &:after": { + content: "''", + position: "absolute", + width: 0, + height: 0, + borderLeft: `${7 /* Size */}px solid transparent`, + borderRight: `${7 /* Size */}px solid transparent` + }, + ".cm-tooltip-above &": { + bottom: `-${7 /* Size */}px`, + "&:before": { + borderTop: `${7 /* Size */}px solid #bbb` + }, + "&:after": { + borderTop: `${7 /* Size */}px solid #f5f5f5`, + bottom: "1px" + } + }, + ".cm-tooltip-below &": { + top: `-${7 /* Size */}px`, + "&:before": { + borderBottom: `${7 /* Size */}px solid #bbb` + }, + "&:after": { + borderBottom: `${7 /* Size */}px solid #f5f5f5`, + top: "1px" + } + } + }, + "&dark .cm-tooltip .cm-tooltip-arrow": { + "&:before": { + borderTopColor: "#333338", + borderBottomColor: "#333338" + }, + "&:after": { + borderTopColor: "transparent", + borderBottomColor: "transparent" + } + } +}); +var noOffset = { x: 0, y: 0 }; +var showTooltip = import_state2.Facet.define({ + enables: [tooltipPlugin, baseTheme] +}); +var showHoverTooltip = import_state2.Facet.define(); +var HoverTooltipHost = class { + constructor(view2) { + this.view = view2; + this.mounted = false; + this.dom = document.createElement("div"); + this.dom.classList.add("cm-tooltip-hover"); + this.manager = new TooltipViewManager(view2, showHoverTooltip, (t4) => this.createHostedView(t4)); + } + static create(view2) { + return new HoverTooltipHost(view2); + } + createHostedView(tooltip) { + let hostedView = tooltip.create(this.view); + hostedView.dom.classList.add("cm-tooltip-section"); + this.dom.appendChild(hostedView.dom); + if (this.mounted && hostedView.mount) + hostedView.mount(this.view); + return hostedView; + } + mount(view2) { + for (let hostedView of this.manager.tooltipViews) { + if (hostedView.mount) + hostedView.mount(view2); + } + this.mounted = true; + } + positioned() { + for (let hostedView of this.manager.tooltipViews) { + if (hostedView.positioned) + hostedView.positioned(); + } + } + update(update) { + this.manager.update(update); + } +}; +var showHoverTooltipHost = showTooltip.compute([showHoverTooltip], (state) => { + let tooltips2 = state.facet(showHoverTooltip).filter((t4) => t4); + if (tooltips2.length === 0) + return null; + return { + pos: Math.min(...tooltips2.map((t4) => t4.pos)), + end: Math.max(...tooltips2.filter((t4) => t4.end != null).map((t4) => t4.end)), + create: HoverTooltipHost.create, + above: tooltips2[0].above, + arrow: tooltips2.some((t4) => t4.arrow) + }; +}); +var HoverPlugin = class { + constructor(view2, source, field, setHover, hoverTime) { + this.view = view2; + this.source = source; + this.field = field; + this.setHover = setHover; + this.hoverTime = hoverTime; + this.hoverTimeout = -1; + this.restartTimeout = -1; + this.pending = null; + this.lastMove = { x: 0, y: 0, target: view2.dom, time: 0 }; + this.checkHover = this.checkHover.bind(this); + view2.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)); + view2.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this)); + } + update() { + if (this.pending) { + this.pending = null; + clearTimeout(this.restartTimeout); + this.restartTimeout = setTimeout(() => this.startHover(), 20); + } + } + get active() { + return this.view.state.field(this.field); + } + checkHover() { + this.hoverTimeout = -1; + if (this.active) + return; + let hovered = Date.now() - this.lastMove.time; + if (hovered < this.hoverTime) + this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - hovered); + else + this.startHover(); + } + startHover() { + clearTimeout(this.restartTimeout); + let { lastMove } = this; + let pos = this.view.contentDOM.contains(lastMove.target) ? this.view.posAtCoords(lastMove) : null; + if (pos == null) + return; + let posCoords = this.view.coordsAtPos(pos); + if (posCoords == null || lastMove.y < posCoords.top || lastMove.y > posCoords.bottom || lastMove.x < posCoords.left - this.view.defaultCharacterWidth || lastMove.x > posCoords.right + this.view.defaultCharacterWidth) + return; + let bidi = this.view.bidiSpans(this.view.state.doc.lineAt(pos)).find((s10) => s10.from <= pos && s10.to >= pos); + let rtl = bidi && bidi.dir == import_view2.Direction.RTL ? -1 : 1; + let open = this.source(this.view, pos, lastMove.x < posCoords.left ? -rtl : rtl); + if (open == null ? void 0 : open.then) { + let pending = this.pending = { pos }; + open.then((result) => { + if (this.pending == pending) { + this.pending = null; + if (result) + this.view.dispatch({ effects: this.setHover.of(result) }); + } + }, (e5) => (0, import_view2.logException)(this.view.state, e5, "hover tooltip")); + } else if (open) { + this.view.dispatch({ effects: this.setHover.of(open) }); + } + } + mousemove(event) { + var _a2; + this.lastMove = { x: event.clientX, y: event.clientY, target: event.target, time: Date.now() }; + if (this.hoverTimeout < 0) + this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime); + let tooltip = this.active; + if (tooltip && !isInTooltip(this.lastMove.target) || this.pending) { + let { pos } = tooltip || this.pending, end2 = (_a2 = tooltip == null ? void 0 : tooltip.end) != null ? _a2 : pos; + if (pos == end2 ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end2, event.clientX, event.clientY, 6 /* MaxDist */)) { + this.view.dispatch({ effects: this.setHover.of(null) }); + this.pending = null; + } + } + } + mouseleave(e5) { + clearTimeout(this.hoverTimeout); + this.hoverTimeout = -1; + if (this.active && !isInTooltip(e5.relatedTarget)) + this.view.dispatch({ effects: this.setHover.of(null) }); + } + destroy() { + clearTimeout(this.hoverTimeout); + this.view.dom.removeEventListener("mouseleave", this.mouseleave); + this.view.dom.removeEventListener("mousemove", this.mousemove); + } +}; +function isInTooltip(elt) { + for (let cur = elt; cur; cur = cur.parentNode) + if (cur.nodeType == 1 && cur.classList.contains("cm-tooltip")) + return true; + return false; +} +function isOverRange(view2, from, to, x5, y4, margin) { + let range = document.createRange(); + let fromDOM = view2.domAtPos(from), toDOM = view2.domAtPos(to); + range.setEnd(toDOM.node, toDOM.offset); + range.setStart(fromDOM.node, fromDOM.offset); + let rects = range.getClientRects(); + range.detach(); + for (let i5 = 0; i5 < rects.length; i5++) { + let rect = rects[i5]; + let dist = Math.max(rect.top - y4, y4 - rect.bottom, rect.left - x5, x5 - rect.right); + if (dist <= margin) + return true; + } + return false; +} +function hoverTooltip(source, options = {}) { + let setHover = import_state2.StateEffect.define(); + let hoverState = import_state2.StateField.define({ + create() { + return null; + }, + update(value, tr) { + if (value && (options.hideOnChange && (tr.docChanged || tr.selection))) + return null; + for (let effect4 of tr.effects) { + if (effect4.is(setHover)) { + return effect4.value; + } + if (effect4.is(closeHoverTooltipEffect)) + return null; + } + if (value && tr.docChanged) { + let newPos = tr.changes.mapPos(value.pos, -1, import_state2.MapMode.TrackDel); + if (newPos == null) + return null; + let copy = Object.assign(/* @__PURE__ */ Object.create(null), value); + copy.pos = newPos; + if (value.end != null) + copy.end = tr.changes.mapPos(value.end); + return copy; + } + return value; + }, + provide: (f5) => showHoverTooltip.from(f5) + }); + return [ + hoverState, + import_view2.ViewPlugin.define((view2) => new HoverPlugin(view2, source, hoverState, setHover, options.hoverTime || 300 /* Time */)), + showHoverTooltipHost + ]; +} +var closeHoverTooltipEffect = import_state2.StateEffect.define(); +var closeHoverTooltips = closeHoverTooltipEffect.of(null); + +// src/cm-extensions/makerMode/flowEditor.tsx +var toggleFlowEditor = import_state3.Annotation.define(); +var cacheFlowEditorHeight = import_state3.Annotation.define(); +var preloadFlowEditor = import_state3.EditorState.transactionFilter.of((tr) => { + let newTrans = []; + const value = tr.state.field(flowEditorInfo, false); + if (value && !tr.annotation(toggleFlowEditor)) { + newTrans.push(...value.filter((f5) => f5.expandedState == 1).map((f5) => { + if (tr.state.field(flowTypeStateField) == "doc") { + return { + annotations: toggleFlowEditor.of([f5.id, 2]) + }; + } else { + return { + annotations: toggleFlowEditor.of([f5.id, 0]) + }; + } + })); + } + return [tr, ...newTrans]; +}); +var internalLinkHover = hoverTooltip((view2, pos, side) => { + let { from: lineFrom, to: lineTo, text } = view2.state.doc.lineAt(pos); + let hovObject = null; + iterateTreeInSelection({ from: lineFrom, to: lineTo }, view2.state, { + enter: ({ name, from, to }) => { + if (name.contains("hmd-internal-link") && pos <= to && pos >= from) { + const stateField = view2.state.field(flowEditorInfo, false); + const info = stateField.find((f5) => f5.from == from); + if (info) { + hovObject = { + pos: pos - 5, + end: to, + above: true, + create(view3) { + let dom = document.createElement("div"); + dom.toggleClass("mk-flow-hover", true); + dom.toggleClass("menu", true); + const reactEl = /* @__PURE__ */ _n.createElement("div", { + "aria-label": info.expandedState == 0 ? "Open Flow" : "Hide Flow", + onClick: () => { + view3.dispatch({ + annotations: toggleFlowEditor.of([info.id, 2]) + }); + } + }, /* @__PURE__ */ _n.createElement("svg", { + width: "16", + height: "16", + viewBox: "0 0 16 16", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, /* @__PURE__ */ _n.createElement("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M10.7941 11.6917C11.4281 11.809 12.0857 11.7486 12.6856 11.5163C13.2858 11.2838 13.8068 10.8873 14.1773 10.3692C14.5483 9.85038 14.75 9.23465 14.75 8.6C14.75 7.96535 14.5483 7.34962 14.1773 6.83081C13.8068 6.31273 13.2858 5.91619 12.6856 5.68372C12.0857 5.45136 11.4281 5.39096 10.7941 5.50834C10.1599 5.62575 9.57072 5.91716 9.10335 6.35289C9.09233 6.36317 9.08162 6.37378 9.07124 6.3847L5.85862 9.76393C5.60897 9.99123 5.28818 10.1509 4.93287 10.2167C4.5702 10.2839 4.19486 10.2487 3.85619 10.1175C3.51778 9.98646 3.23669 9.76777 3.04283 9.49668C2.84949 9.22631 2.75 8.91434 2.75 8.6C2.75 8.28566 2.84949 7.97369 3.04283 7.70332C3.23669 7.43223 3.51778 7.21354 3.85619 7.08246C4.19486 6.95128 4.5702 6.91614 4.93287 6.98328C5.29024 7.04944 5.61268 7.21063 5.86295 7.44003L6.559 8.14747L7.62823 7.09545L6.91982 6.37545C6.91226 6.36777 6.90453 6.36025 6.89665 6.35289C6.42928 5.91716 5.8401 5.62575 5.20593 5.50834C4.57189 5.39096 3.91432 5.45136 3.31441 5.68372C2.71423 5.91619 2.19318 6.31273 1.8227 6.83081C1.4517 7.34962 1.25 7.96535 1.25 8.6C1.25 9.23465 1.4517 9.85038 1.8227 10.3692C2.19318 10.8873 2.71423 11.2838 3.31441 11.5163C3.91432 11.7486 4.57189 11.809 5.20593 11.6917C5.8401 11.5742 6.42928 11.2828 6.89665 10.8471C6.90767 10.8368 6.91838 10.8262 6.92876 10.8153L10.1414 7.43607C10.391 7.20877 10.7118 7.04906 11.0671 6.98328C11.4298 6.91614 11.8051 6.95128 12.1438 7.08246C12.4822 7.21354 12.7633 7.43223 12.9572 7.70332C13.1505 7.97369 13.25 8.28566 13.25 8.6C13.25 8.91434 13.1505 9.22631 12.9572 9.49668C12.7633 9.76777 12.4822 9.98646 12.1438 10.1175C11.8051 10.2487 11.4298 10.2839 11.0671 10.2167C10.7098 10.1506 10.3873 9.98938 10.1371 9.75998L9.441 9.05253L8.37177 10.1045L9.08018 10.8245C9.08774 10.8322 9.09547 10.8398 9.10335 10.8471C9.57072 11.2828 10.1599 11.5742 10.7941 11.6917Z", + fill: "currentColor" + })), " ", info.expandedState == 0 ? "Open Flow" : "Hide Flow"); + _n.render(reactEl, dom); + return { dom }; + } + }; + } + } + } + }); + return hovObject; +}); +var flowEditorInfo = import_state3.StateField.define({ + create() { + return []; + }, + update(value, tr) { + let newValues = []; + const previous = value; + let usedContainers = []; + let nameContainers = []; + iterateTreeInDocument(tr.state, { + enter: ({ name, from, to }) => { + var _a2, _b2, _c2, _d2; + if (name.contains("hmd-internal-link")) { + nameContainers.push(name); + const link = tr.state.sliceDoc(from, to); + const existingLinks = previous.filter((f5) => f5.link == link); + const offset2 = usedContainers.filter((f5) => f5 == link).length; + const existingInfo = existingLinks[offset2]; + const id = existingInfo ? existingInfo.id : genId(8); + const embedExpanded = name.contains("hmd-embed"); + let listEmbed = false; + const embedOverride = tr.state.sliceDoc(from - 4, from - 3) == "!"; + if (embedExpanded) { + iterateTreeInSelection({ from: from - 5, to: from - 5 }, tr.state, { + enter: (node) => { + if (node.name.contains("formatting-task") || node.name.contains("formatting-list")) { + listEmbed = true; + } + } + }); + } + const reverseExpandedState = (state) => { + const news = state != 2 ? 2 : 0; + return news; + }; + if (!embedExpanded || embedOverride) { + usedContainers.push(link); + const info = { + id, + link: tr.state.sliceDoc(from, to), + startOfLineFix: listEmbed, + from, + to, + embed: embedExpanded, + height: existingInfo ? ((_a2 = tr.annotation(cacheFlowEditorHeight)) == null ? void 0 : _a2[0]) == id && ((_b2 = tr.annotation(cacheFlowEditorHeight)) == null ? void 0 : _b2[1]) != 0 ? (_c2 = tr.annotation(cacheFlowEditorHeight)) == null ? void 0 : _c2[1] : existingInfo.height : -1, + expandedState: existingInfo ? ((_d2 = tr.annotation(toggleFlowEditor)) == null ? void 0 : _d2[0]) == id ? reverseExpandedState(existingInfo.expandedState) : existingInfo.expandedState : embedExpanded ? 1 : 0 + }; + newValues.push(info); + } + } + } + }); + return newValues; + } +}); +var flowEditorField = import_state3.StateField.define({ + create() { + return import_view3.Decoration.none; + }, + update(value, tr) { + let builder = new import_state3.RangeSetBuilder(); + const infoFields = tr.state.field(flowEditorInfo); + for (let info of infoFields) { + const { from, to, embed: embedExpanded, expandedState } = info; + const lineFix = from - 3 == tr.state.doc.lineAt(from).from && to + 2 == tr.state.doc.lineAt(from).to; + if (expandedState == 2) { + if (embedExpanded) { + if (!(tr.newSelection.main.from == from - 4 && tr.newSelection.main.to == to + 2 || tr.newSelection.main.from >= from - 3 && tr.newSelection.main.to <= to + 1)) { + builder.add(from - 4, from - 3, flowEditorSelector(info)); + if (lineFix) { + builder.add(from - 3, to + 2, flowEditorWidgetDecoration(info)); + } else { + builder.add(from - 3, to + 2, flowEditorDecoration(info)); + } + } + } else { + builder.add(to + 2, to + 2, flowEditorDecoration(info)); + } + } + } + const dec = builder.finish(); + return dec; + }, + provide: (f5) => import_view3.EditorView.decorations.from(f5) +}); +var FlowEditorWidget = class extends import_view3.WidgetType { + constructor(info) { + super(); + this.info = info; + } + eq(other) { + return other.info.id === this.info.id; + } + toDOM() { + const div = document.createElement("div"); + div.toggleClass("mk-floweditor-container", true); + div.toggleClass("mk-floweditor-fix", this.info.startOfLineFix); + div.setAttribute("id", "mk-flow-" + this.info.id); + const placeholder = div.createDiv("mk-floweditor-placeholder"); + placeholder.style.setProperty("height", this.info.height + "px"); + loadFlowEditorByDOM(div, this.info.id); + return div; + } + get estimatedHeight() { + return this.info.height; + } +}; +var FlowEditorSelector = class extends import_view3.WidgetType { + constructor(info) { + super(); + this.info = info; + } + eq(other) { + return false; + } + toDOM(view2) { + const div = document.createElement("div"); + div.toggleClass("mk-floweditor-selector", true); + const reactEl = /* @__PURE__ */ _n.createElement("div", { + "aria-label": "Edit Flow", + onClick: () => { + view2.dispatch({ + selection: import_state3.EditorSelection.single(this.info.from - 4, this.info.to + 2) + }); + } + }, /* @__PURE__ */ _n.createElement("svg", { + width: "16", + height: "16", + viewBox: "0 0 16 16", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, /* @__PURE__ */ _n.createElement("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M10.7941 11.6917C11.4281 11.809 12.0857 11.7486 12.6856 11.5163C13.2858 11.2838 13.8068 10.8873 14.1773 10.3692C14.5483 9.85038 14.75 9.23465 14.75 8.6C14.75 7.96535 14.5483 7.34962 14.1773 6.83081C13.8068 6.31273 13.2858 5.91619 12.6856 5.68372C12.0857 5.45136 11.4281 5.39096 10.7941 5.50834C10.1599 5.62575 9.57072 5.91716 9.10335 6.35289C9.09233 6.36317 9.08162 6.37378 9.07124 6.3847L5.85862 9.76393C5.60897 9.99123 5.28818 10.1509 4.93287 10.2167C4.5702 10.2839 4.19486 10.2487 3.85619 10.1175C3.51778 9.98646 3.23669 9.76777 3.04283 9.49668C2.84949 9.22631 2.75 8.91434 2.75 8.6C2.75 8.28566 2.84949 7.97369 3.04283 7.70332C3.23669 7.43223 3.51778 7.21354 3.85619 7.08246C4.19486 6.95128 4.5702 6.91614 4.93287 6.98328C5.29024 7.04944 5.61268 7.21063 5.86295 7.44003L6.559 8.14747L7.62823 7.09545L6.91982 6.37545C6.91226 6.36777 6.90453 6.36025 6.89665 6.35289C6.42928 5.91716 5.8401 5.62575 5.20593 5.50834C4.57189 5.39096 3.91432 5.45136 3.31441 5.68372C2.71423 5.91619 2.19318 6.31273 1.8227 6.83081C1.4517 7.34962 1.25 7.96535 1.25 8.6C1.25 9.23465 1.4517 9.85038 1.8227 10.3692C2.19318 10.8873 2.71423 11.2838 3.31441 11.5163C3.91432 11.7486 4.57189 11.809 5.20593 11.6917C5.8401 11.5742 6.42928 11.2828 6.89665 10.8471C6.90767 10.8368 6.91838 10.8262 6.92876 10.8153L10.1414 7.43607C10.391 7.20877 10.7118 7.04906 11.0671 6.98328C11.4298 6.91614 11.8051 6.95128 12.1438 7.08246C12.4822 7.21354 12.7633 7.43223 12.9572 7.70332C13.1505 7.97369 13.25 8.28566 13.25 8.6C13.25 8.91434 13.1505 9.22631 12.9572 9.49668C12.7633 9.76777 12.4822 9.98646 12.1438 10.1175C11.8051 10.2487 11.4298 10.2839 11.0671 10.2167C10.7098 10.1506 10.3873 9.98938 10.1371 9.75998L9.441 9.05253L8.37177 10.1045L9.08018 10.8245C9.08774 10.8322 9.09547 10.8398 9.10335 10.8471C9.57072 11.2828 10.1599 11.5742 10.7941 11.6917Z", + fill: "currentColor" + }))); + _n.render(reactEl, div); + return div; + } +}; +var flowEditorSelector = (info) => import_view3.Decoration.replace({ + widget: new FlowEditorSelector(info), + inclusive: true, + block: false +}); +var flowEditorDecoration = (info) => import_view3.Decoration.replace({ + widget: new FlowEditorWidget(info), + inclusive: true, + block: false +}); +var flowEditorWidgetDecoration = (info) => import_view3.Decoration.widget({ + widget: new FlowEditorWidget(info), + block: true +}); + +// src/dispatch/flowDispatch.ts +var createFlowEditorInElement = (id, el, type, file, from, to) => { + let evt = new CustomEvent(eventTypes.spawnPortal, { detail: { id, el, file, from, to, type } }); + window.dispatchEvent(evt); +}; +var focusFlowEditor = (id, top2) => { + let evt = new CustomEvent(eventTypes.focusPortal, { detail: { id, parent: false, top: top2 } }); + window.dispatchEvent(evt); +}; +var focusFlowEditorParent = (id, top2) => { + let evt = new CustomEvent(eventTypes.focusPortal, { detail: { id, parent: true, top: top2 } }); + window.dispatchEvent(evt); +}; + +// src/utils/flow-editor.ts +var import_state6 = require("@codemirror/state"); + +// src/cm-extensions/makerMode/selectiveEditor.ts +var import_state4 = require("@codemirror/state"); +var import_view4 = require("@codemirror/view"); + +// node_modules/tslib/modules/index.js +var import_tslib = __toESM(require_tslib(), 1); +var { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __createBinding, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn +} = import_tslib.default; + +// src/cm-extensions/makerMode/selectiveEditor.ts +var editableRange = import_state4.Annotation.define(); +var hiddenLine = import_view4.Decoration.replace({ inclusive: true }); +var hideLine = import_state4.StateField.define({ + create() { + return import_view4.Decoration.none; + }, + update(value, tr) { + var _a2; + let builder = new import_state4.RangeSetBuilder(); + if (((_a2 = tr.state.field(selectiveLinesFacet)) == null ? void 0 : _a2[0]) != void 0) { + builder.add(tr.state.doc.line(1).from, tr.state.doc.line(tr.state.field(selectiveLinesFacet)[0]).from, hiddenLine); + builder.add(tr.state.doc.line(tr.state.field(selectiveLinesFacet)[1]).to, tr.state.doc.line(tr.newDoc.lines).to, hiddenLine); + } + const dec = builder.finish(); + return dec; + }, + provide: (f5) => import_view4.EditorView.decorations.from(f5) +}); +var selectiveLinesFacet = import_state4.StateField.define({ + create: () => [void 0, void 0], + update(value, tr) { + if (tr.annotation(editableRange)) { + if (tr.annotation(editableRange)[0]) { + return [tr.annotation(editableRange)[0], Math.min(tr.state.doc.lines, tr.annotation(editableRange)[1])]; + } + return tr.annotation(editableRange); + } + return value; + } +}); +var lineRangeToPosRange = (state, range) => { + return { + from: state.doc.line(range[0]).from, + to: state.doc.line(range[1] + 1).from + }; +}; +var smartDelete = import_state4.EditorState.transactionFilter.of((tr) => { + var _a2; + if (tr.isUserEvent("delete") && !tr.isUserEvent("delete.smart")) { + const initialSelections = tr.startState.selection.ranges.map((range) => ({ + from: range.from, + to: range.to + })); + if (initialSelections.length > 0 && ((_a2 = tr.startState.field(selectiveLinesFacet)) == null ? void 0 : _a2[0])) { + const posRange = lineRangeToPosRange(tr.startState, tr.startState.field(selectiveLinesFacet)); + tr.startState.update({ + changes: { + from: Math.max(posRange.from, initialSelections[0].from), + to: Math.min(posRange.to, initialSelections[0].to) + }, + annotations: import_state4.Transaction.userEvent.of(`${tr.annotation(import_state4.Transaction.userEvent)}.smart`) + }); + } + } + return tr; +}); +var preventModifyTargetRanges = import_state4.EditorState.transactionFilter.of((tr) => { + let newTrans = []; + try { + const selectiveLines = tr.startState.field(selectiveLinesFacet); + if (tr.isUserEvent("input") || tr.isUserEvent("delete") || tr.isUserEvent("move")) { + if (selectiveLines == null ? void 0 : selectiveLines[0]) { + const posRange = lineRangeToPosRange(tr.startState, tr.startState.field(selectiveLinesFacet)); + if (tr.changes.touchesRange(0, posRange.from - 1) || !tr.changes.touchesRange(posRange.from, posRange.to)) { + return []; + } + } + } + if (tr.state.doc.lines != tr.startState.doc.lines) { + const numberNewLines = tr.state.doc.lines - tr.startState.doc.lines; + if (selectiveLines == null ? void 0 : selectiveLines[0]) { + const posRange = lineRangeToPosRange(tr.startState, tr.startState.field(selectiveLinesFacet)); + if (tr.changes.touchesRange(0, posRange.from - 1)) { + newTrans.push({ + annotations: [editableRange.of([selectiveLines[0] + numberNewLines, selectiveLines[1] + numberNewLines])] + }); + } else if (tr.changes.touchesRange(posRange.from - 1, posRange.to)) { + newTrans.push({ + annotations: [editableRange.of([selectiveLines[0], selectiveLines[1] + numberNewLines])] + }); + } + } + } + } catch (e5) { + return []; + } + return [tr, ...newTrans]; +}); +var readOnlyRangesExtension = [smartDelete, preventModifyTargetRanges]; +var editBlockExtensions = () => [readOnlyRangesExtension, hideLine, selectiveLinesFacet]; + +// src/cm-extensions/makerMode/atomic.ts +var import_state5 = require("@codemirror/state"); +var arrowKeyAnnotation = import_state5.Annotation.define(); +var atomicSelect = import_state5.EditorState.transactionFilter.of((tr) => { + if (tr.isUserEvent("delete")) { + return tr; + } + const flowID = tr.startState.field(flowIDStateField, false); + if (tr.annotation(arrowKeyAnnotation) && flowID) { + const oldSel = tr.startState.selection.main; + const lineRange = tr.state.field(selectiveLinesFacet, false); + const posRange = lineRange && lineRange[0] != void 0 ? lineRangeToPosRange(tr.startState, lineRange) : { from: 0, to: tr.startState.doc.length - 1 }; + if (oldSel.from <= posRange.from && tr.annotation(arrowKeyAnnotation) == 1) { + focusFlowEditorParent(flowID, true); + } + if (oldSel.to >= posRange.to && tr.annotation(arrowKeyAnnotation) == 2) { + focusFlowEditorParent(flowID, false); + } + return tr; + } + const selection = tr.newSelection.main; + if (selection.from == 0 && selection.to == 0 || selection.from != selection.to) + return tr; + const flowEditors = tr.state.field(flowEditorInfo, false); + if (flowEditors) { + for (let info of flowEditors) { + if (info.embed) { + if (info.from - 4 <= selection.from && info.to + 2 >= selection.to && info.expandedState == 2) { + focusFlowEditor(info.id, true); + return { + selection: import_state5.EditorSelection.single(info.from - 4) + }; + break; + } + } + } + } + return tr; +}); + +// src/utils/flow-editor.ts +var parseOutReferences = (str) => { + const refIndex = str.lastIndexOf("#"); + return refIndex != -1 ? [str.substring(0, refIndex), str.substring(refIndex + 1)] : [str, void 0]; +}; +var getFileFromString = (url, source) => { + return app.metadataCache.getFirstLinkpathDest(url, source); +}; +var getLineRangeFromRef = (file, ref, app2) => { + var _a2; + if (!ref) { + return [void 0, void 0]; + } + const cache = app2.metadataCache.getFileCache(file); + const headings = cache.headings; + const blocks = cache.blocks; + const sections2 = cache.sections; + if (blocks && ref.charAt(0) == "^" && blocks[ref.substring(1)]) { + return [blocks[ref.substring(1)].position.start.line + 1, blocks[ref.substring(1)].position.end.line + 1]; + } + const heading = headings == null ? void 0 : headings.find((f5) => f5.heading.replace("#", " ") == ref); + if (heading) { + const index = headings.findIndex((f5) => f5.heading == heading.heading); + const level = (_a2 = headings[index]) == null ? void 0 : _a2.level; + const nextIndex2 = headings.findIndex((f5, i5) => i5 > index && f5.level <= level); + if (index < headings.length - 1 && nextIndex2 != -1) { + return [heading.position.start.line + 2, headings[nextIndex2].position.end.line]; + } + return [heading.position.start.line + 2, sections2[sections2.length - 1].position.end.line + 1]; + } + return [void 0, void 0]; +}; +var loadFlowEditorByDOM = (el, id) => { + setTimeout(async () => { + let counter = 0; + while (!el.parentElement && counter++ <= 50) + await sleep(50); + if (!el.parentElement) + return; + let dom = el; + while (!dom.hasClass("cm-editor") && dom.parentElement) { + dom = dom.parentElement; + } + if (!dom.hasClass("cm-editor")) { + return; + } + app.workspace.iterateLeaves((leaf) => { + var _a2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm && dom == cm.dom) { + loadFlowEditorsForLeafForID(cm, leaf, app, id); + } + }, app.workspace["rootSplit"]); + }); +}; +var loadFlowEditorsForLeafForID = (cm, leaf, app2, id) => { + const stateField = cm.state.field(flowEditorInfo, false); + if (!stateField) + return; + const flowInfo = stateField.find((f5) => f5.id == id); + if (flowInfo && flowInfo.expandedState == 2) { + loadFlowEditor(cm, flowInfo, leaf, app2); + } +}; +var loadFlowEditorsForLeaf = (cm, leaf, app2) => { + const stateField = cm.state.field(flowEditorInfo, false); + if (!stateField) + return; + for (let flowInfo of stateField) { + if (flowInfo.expandedState == 2) { + loadFlowEditor(cm, flowInfo, leaf, app2); + } + } +}; +var loadFlowEditor = (cm, flowEditorInfo2, leaf, app2) => { + var _a2; + const dom = cm.dom.querySelector("#mk-flow-" + flowEditorInfo2.id); + const [link, ref] = parseOutReferences(flowEditorInfo2.link); + const source = (_a2 = leaf.view.file) == null ? void 0 : _a2.path; + const file = getFileFromString(link, source); + if (dom) { + if (file) { + const selectiveRange = getLineRangeFromRef(file, ref, app2); + if (!dom.hasAttribute("ready")) { + dom.empty(); + dom.setAttribute("ready", ""); + createFlowEditorInElement(flowEditorInfo2.id, dom, ref ? "block" : "flow", file.path, selectiveRange[0], selectiveRange[1]); + } + } else { + dom.empty(); + const createDiv = dom.createDiv("mk-new-file"); + const createFile = async (e5) => { + e5.stopPropagation(); + e5.stopImmediatePropagation(); + await app2.fileManager.createNewMarkdownFile(app2.vault.getRoot(), link); + loadFlowEditor(cm, flowEditorInfo2, leaf, app2); + }; + createDiv.setText(`Create ${link}`); + createDiv.addEventListener("click", createFile); + } + } +}; +var focusPortal = async (plugin, evt) => { + const { id, parent, top: top2 } = evt.detail; + if (parent) { + app.workspace.iterateLeaves((leaf) => { + var _a2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm) { + const stateField = cm.state.field(flowEditorInfo, false); + if (stateField) { + const foundInfo = stateField.find((f5) => f5.id == id); + if (foundInfo) { + cm.focus(); + if (top2) { + cm.dispatch({ + selection: import_state6.EditorSelection.single(foundInfo.from - 5), + annotations: arrowKeyAnnotation.of(1) + }); + } else { + if (foundInfo.to + 2 == cm.state.doc.length) { + cm.dispatch({ + changes: [{ from: foundInfo.to + 2, to: foundInfo.to + 2, insert: cm.state.lineBreak }], + selection: import_state6.EditorSelection.single(foundInfo.to + 3), + annotations: arrowKeyAnnotation.of(2) + }); + } else { + cm.dispatch({ + selection: import_state6.EditorSelection.single(foundInfo.to + 3), + annotations: arrowKeyAnnotation.of(2) + }); + } + } + } + } + } + }, app.workspace["rootSplit"]); + } else { + app.workspace.iterateLeaves((leaf) => { + var _a2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm) { + const stateField = cm.state.field(flowIDStateField, false); + if (stateField && stateField == id) { + cm.focus(); + const lineRange = cm.state.field(selectiveLinesFacet, false); + const posRange = lineRange && lineRange[0] != void 0 ? lineRangeToPosRange(cm.state, lineRange) : { from: 0, to: cm.state.doc.length - 1 }; + if (top2) { + cm.dispatch({ + selection: import_state6.EditorSelection.single(posRange.from) + }); + } else { + cm.dispatch({ + selection: import_state6.EditorSelection.single(posRange.to) + }); + } + } + } + }, app.workspace["rootSplit"]); + } +}; +var spawnNewPortal = async (plugin, evt) => { + var _a2, _b2; + const { file, el, from, to } = evt.detail; + let portalFile = file; + const newLeaf = spawnPortal(plugin, el); + await newLeaf.openFile(plugin.app.vault.getAbstractFileByPath(portalFile)); + const view2 = (_a2 = newLeaf.view.editor) == null ? void 0 : _a2.cm; + view2.dispatch({ + annotations: [portalTypeAnnotation.of(evt.detail.type), flowIDAnnotation.of(evt.detail.id)] + }); + view2.dom.addEventListener("keydown", (e5) => { + if (e5.key == "ArrowUp") { + view2.dispatch({ + annotations: arrowKeyAnnotation.of(1) + }); + } + if (e5.key == "ArrowDown") { + view2.dispatch({ + annotations: arrowKeyAnnotation.of(2) + }); + } + }); + if (from && to) { + (_b2 = newLeaf.view.editor) == null ? void 0 : _b2.cm.dispatch({ + annotations: [editableRange.of([from, to])] + }); + } +}; +var spawnPortal = (plugin, initiatingEl, onShowCallback) => { + const parent = plugin.app.workspace.activeLeaf; + if (!initiatingEl) + initiatingEl = parent.containerEl; + const hoverPopover = new FlowEditor(parent, initiatingEl, plugin, void 0, onShowCallback); + return hoverPopover.attachLeaf(); +}; + +// src/components/FlowView/FlowRow.tsx +import_dayjs.default.extend(require_relativeTime()); +var FlowRow = (props) => { + const ref = _2(null); + const [flowOpen, setFlowOpen] = p2(false); + const loadFile = () => { + const file = props.item.file; + const div = ref.current; + const newLeaf = spawnPortal(props.plugin, div); + newLeaf.openFile(file); + }; + const toggleFlow = (event) => { + event.stopPropagation(); + const newState = !flowOpen; + if (newState) { + loadFile(); + } else { + ref.current.empty(); + } + setFlowOpen(newState); + }; + const { item } = props; + return /* @__PURE__ */ _n.createElement("div", { + className: "mk-flowspace-container" + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-flowspace-title", + onClick: (e5) => openFile({ ...props.item.file, isFolder: item.type == "folder" }, props.plugin.app, false) + }, item.icon ? unifiedToNative(item.icon[1]) : item.type == "folder" ? /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 2, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" + })) : /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 2, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" + })), /* @__PURE__ */ _n.createElement("p", null, item.name), " ", /* @__PURE__ */ _n.createElement("span", null), /* @__PURE__ */ _n.createElement("p", null, item.created && (0, import_dayjs.default)(item.created).fromNow()), /* @__PURE__ */ _n.createElement("button", { + onClick: toggleFlow, + className: flowOpen ? "mk-open" : "" + }, /* @__PURE__ */ _n.createElement("svg", { + width: "16", + height: "16", + viewBox: "0 0 16 16", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, /* @__PURE__ */ _n.createElement("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M10.7941 11.6917C11.4281 11.809 12.0857 11.7486 12.6856 11.5163C13.2858 11.2838 13.8068 10.8873 14.1773 10.3692C14.5483 9.85038 14.75 9.23465 14.75 8.6C14.75 7.96535 14.5483 7.34962 14.1773 6.83081C13.8068 6.31273 13.2858 5.91619 12.6856 5.68372C12.0857 5.45136 11.4281 5.39096 10.7941 5.50834C10.1599 5.62575 9.57072 5.91716 9.10335 6.35289C9.09233 6.36317 9.08162 6.37378 9.07124 6.3847L5.85862 9.76393C5.60897 9.99123 5.28818 10.1509 4.93287 10.2167C4.5702 10.2839 4.19486 10.2487 3.85619 10.1175C3.51778 9.98646 3.23669 9.76777 3.04283 9.49668C2.84949 9.22631 2.75 8.91434 2.75 8.6C2.75 8.28566 2.84949 7.97369 3.04283 7.70332C3.23669 7.43223 3.51778 7.21354 3.85619 7.08246C4.19486 6.95128 4.5702 6.91614 4.93287 6.98328C5.29024 7.04944 5.61268 7.21063 5.86295 7.44003L6.559 8.14747L7.62823 7.09545L6.91982 6.37545C6.91226 6.36777 6.90453 6.36025 6.89665 6.35289C6.42928 5.91716 5.8401 5.62575 5.20593 5.50834C4.57189 5.39096 3.91432 5.45136 3.31441 5.68372C2.71423 5.91619 2.19318 6.31273 1.8227 6.83081C1.4517 7.34962 1.25 7.96535 1.25 8.6C1.25 9.23465 1.4517 9.85038 1.8227 10.3692C2.19318 10.8873 2.71423 11.2838 3.31441 11.5163C3.91432 11.7486 4.57189 11.809 5.20593 11.6917C5.8401 11.5742 6.42928 11.2828 6.89665 10.8471C6.90767 10.8368 6.91838 10.8262 6.92876 10.8153L10.1414 7.43607C10.391 7.20877 10.7118 7.04906 11.0671 6.98328C11.4298 6.91614 11.8051 6.95128 12.1438 7.08246C12.4822 7.21354 12.7633 7.43223 12.9572 7.70332C13.1505 7.97369 13.25 8.28566 13.25 8.6C13.25 8.91434 13.1505 9.22631 12.9572 9.49668C12.7633 9.76777 12.4822 9.98646 12.1438 10.1175C11.8051 10.2487 11.4298 10.2839 11.0671 10.2167C10.7098 10.1506 10.3873 9.98938 10.1371 9.75998L9.441 9.05253L8.37177 10.1045L9.08018 10.8245C9.08774 10.8322 9.09547 10.8398 9.10335 10.8471C9.57072 11.2828 10.1599 11.5742 10.7941 11.6917Z", + fill: "currentColor" + })))), /* @__PURE__ */ _n.createElement("div", { + className: "mk-flowspace-editor", + ref + })); +}; + +// src/components/FlowView/FlowComponent.tsx +var FolderComponent = (props) => { + const filteredNotes = props.folder.children.map((f5) => { + return { + type: f5.children ? "folder" : f5.extension, + file: f5, + name: f5.name, + path: f5.path, + icon: props.plugin.settings.fileIcons.find(([path, icon]) => path == f5.path), + children: f5.children, + created: f5.stat ? f5.stat.ctime : void 0 + }; + }); + return /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-scroller" + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-sizer" + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-header" + }, /* @__PURE__ */ _n.createElement("div", { + className: "inline-title" + }, props.folder.name)), filteredNotes.length > 0 ? /* @__PURE__ */ _n.createElement("div", null, filteredNotes.map((f5) => /* @__PURE__ */ _n.createElement(FlowRow, { + item: f5, + plugin: props.plugin + }))) : /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-empty" + }, i18n_default.flowView.emptyFolder))); +}; + +// src/components/FlowView/FlowView.tsx +var FOLDER_VIEW_TYPE = "make-folder-view"; +var FlowView = class extends import_obsidian3.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.navigation = true; + this.plugin = plugin; + } + getViewType() { + return FOLDER_VIEW_TYPE; + } + getDisplayText() { + var _a2; + return (_a2 = this.folder) == null ? void 0 : _a2.name; + } + async onClose() { + this.destroy(); + } + destroy() { + _n.unmountComponentAtNode(this.contentEl); + } + async onOpen() { + this.destroy(); + } + async setState(state, result) { + const folder = this.plugin.app.vault.getAbstractFileByPath(state.folder); + this.folder = folder; + this.constructFileTree(folder); + await super.setState(state, result); + this.leaf.tabHeaderInnerTitleEl.innerText = folder.name; + this.leaf.view.titleEl = folder.name; + const headerEl = this.leaf.view.headerEl; + if (headerEl) { + headerEl.querySelector(".view-header-title").innerText = folder.name; + } + return; + } + getState() { + var _a2; + let state = super.getState(); + state.folder = (_a2 = this.folder) == null ? void 0 : _a2.path; + return state; + } + constructFileTree(folder) { + this.destroy(); + _n.render(/* @__PURE__ */ _n.createElement("div", { + className: "folder-view" + }, /* @__PURE__ */ _n.createElement(FolderComponent, { + folder, + plugin: this.plugin + })), this.contentEl); + } +}; + +// src/utils/Utils.ts +function buildTree(flattenedItems) { + var _a2, _b2; + const root = { ...flattenedItems.find((f5) => f5.id == "/"), children: [], isRoot: () => true }; + const items = flattenedItems.map((item) => ({ ...item, children: [] })); + for (const item of items) { + const { id, children, vault, path, name, parent } = item; + const parentId = (_a2 = item.parentId) != null ? _a2 : "/"; + const _parent = (_b2 = items.find((f5) => f5.id == parentId)) != null ? _b2 : items.find((f5) => f5.id == "/"); + if (_parent) { + if (item.isFolder) { + _parent.children.push({ children, vault, parent, path, name }); + } else { + _parent.children.push({ vault, parent, path, name }); + } + } + } + return { + ...root, + children: items.filter((f5) => f5.parentId == "/").map((item) => { + const { children, vault, path, name, parent } = item; + if (item.isFolder) { + return { children, vault, parent, path, name }; + } else { + return { vault, parent, path, name }; + } + }) + }; +} +var nodeIsAncestorOfTarget = (node, target) => { + const recursive = (_node, _target) => { + if (!_target.path) { + return false; + } + if (_target.path == "/") + return false; + if (_target.parent.path == _node.path) + return true; + return recursive(_node, _target.parent); + }; + return recursive(node, target); +}; +function getMaxDepth({ previousItem }) { + if (previousItem) { + if (previousItem.isFolder) + return previousItem.depth + 1; + return previousItem.depth; + } + return 0; +} +function getMinDepth({ nextItem }) { + if (nextItem) { + return nextItem.depth; + } + return 0; +} +function getDragDepth(offset2, indentationWidth) { + return Math.round(offset2 / indentationWidth) + 1; +} +function getProjection(items, activeId, overId, dragOffset, indentationWidth) { + const overItemIndex = items.findIndex(({ id }) => id === overId); + const activeItemIndex = items.findIndex(({ id }) => id === activeId); + const activeItem = items[activeItemIndex]; + const previousItem = items[overItemIndex]; + const nextItem = items[overItemIndex + 1]; + const activeIsSection = activeItem.parentId == null; + const overIsSection = previousItem.parentId == null; + if (nodeIsAncestorOfTarget(activeItem, items.find((f5) => f5.id == overId))) { + return null; + } + if (activeIsSection) { + if (overIsSection) { + return { depth: 0, maxDepth: 0, minDepth: 0, overId, parentId: null }; + } + return null; + } + if (activeItem.section != previousItem.section) { + if (previousItem.section == -1) { + return null; + } + } + const dragDepth = getDragDepth(dragOffset, indentationWidth); + const projectedDepth = dragDepth; + const maxDepth = getMaxDepth({ + previousItem + }); + const minDepth = getMinDepth({ nextItem }); + let depth = projectedDepth; + if (projectedDepth >= maxDepth) { + depth = maxDepth; + } else if (projectedDepth < minDepth) { + depth = minDepth; + } + if (previousItem.section != -1 && depth > 1) { + return null; + } + return { depth, maxDepth, minDepth, overId, parentId: getParentId() }; + function getParentId() { + var _a2; + if (depth === 0 || !previousItem) { + return "/"; + } + if (depth === previousItem.depth || depth > previousItem.depth && !previousItem.isFolder) { + return previousItem.parentId; + } + if (depth > previousItem.depth) { + return previousItem.id; + } + const newParent = (_a2 = items.slice(0, overItemIndex).reverse().find((item) => item.depth === depth)) == null ? void 0 : _a2.parentId; + return newParent != null ? newParent : null; + } +} +var flattenTrees = (items, section, sectionIndex, parentId = null, depth = 0) => { + return items.filter((f5) => f5).reduce((acc, item, index) => { + const id = parentId + "/" + item.path; + if (item.children) { + return [ + ...acc, + { ...item, parentId, depth, section: sectionIndex, index, id, isFolder: true }, + ...flattenTrees(item.children, section, sectionIndex, id, depth + 1) + ]; + } else { + return [ + ...acc, + { ...item, parentId, depth, section: sectionIndex, index, id, isFolder: false } + ]; + } + }, []); +}; +var flattenTree = (folder, path, sectionIndex, collapsed) => { + return [{ + ...folder, + id: folder.path, + parentId: null, + depth: 0, + index: 0, + section: -1, + isFolder: true + }, ...!collapsed ? flattenTrees(folder.children, path, sectionIndex, path, 1) : []]; +}; +function includeChildrenOf(items, ids3) { + const excludeParentIds = items.filter((f5) => { + var _a2; + return ((_a2 = f5.children) == null ? void 0 : _a2.length) > 0 && !ids3.find((i5) => i5 == f5.id) && f5.id != "/"; + }).map((f5) => f5.id); + return items.filter((item) => { + var _a2; + if (item.parentId && excludeParentIds.includes(item.parentId)) { + if ((_a2 = item.children) == null ? void 0 : _a2.length) { + excludeParentIds.push(item.id); + } + return false; + } + return true; + }); +} +var sortFolderTree = async (folderTree2, plugin) => { + const stringTree = plugin.settings.folderRank; + const rawStringTree = folderTreeToStringTree(folderTree2); + const newStringTree = mergeStringTree(stringTree, rawStringTree); + plugin.settings.folderRank = newStringTree; + plugin.saveSettings(false); + const sortedFolderTree = sortFolderTreeUsingStringTree(folderTree2, newStringTree); + return sortedFolderTree; +}; +var renamePathInStringTree = (oldPath, newFile, plugin) => { + const stringTree = plugin.settings.folderRank; + const newName = newFile.name; + const newPath = newFile.path; + const recursive = (tree, path, oldS, newS) => { + if (path == oldS) { + return { + ...tree, + node: newS + }; + } else if (!tree.isFolder) { + return tree; + } + return { + ...tree, + children: tree.children.map((f5) => recursive(f5, path + "/" + f5.node, oldS, newS)) + }; + }; + plugin.settings.fileIcons = plugin.settings.fileIcons.map((f5) => f5[0] == oldPath ? [newPath, f5[1]] : f5); + plugin.settings.spaces = plugin.settings.spaces.map((f5) => { + return { ...f5, children: f5.children.map((g4) => g4 == oldPath ? newPath : g4) }; + }); + plugin.settings.folderRank = recursive(stringTree, "", "/" + oldPath, newName); + plugin.saveSettings(); +}; +var folderTreeToStringTree = (tree) => { + const recursive = (subtree) => { + if (subtree.children) { + return { + node: subtree.name, + children: subtree.children.map((f5) => recursive(f5)), + isFolder: true + }; + } else { + return { + node: subtree.name, + children: [], + isFolder: false + }; + } + }; + return recursive(tree); +}; +var reorderStringTree = (savedTrees, rawTrees) => { + const missingTrees = rawTrees.filter((f5) => !savedTrees.find((g4) => f5.node == g4.node)); + const allTrees = [...savedTrees, ...missingTrees]; + const filteredTrees = allTrees.filter((f5) => rawTrees.find((g4) => f5.node == g4.node)); + return filteredTrees; +}; +var mergeStringTree = (savedTree, rawTree) => { + const flattenSavedTree = (tree) => { + const treeReduce = (t4, currPath) => { + return t4.reduce((p6, c3) => { + return [...p6, { + ...c3, + path: currPath + "/" + c3.node + }, ...treeReduce(c3.children, currPath + "/" + c3.node)]; + }, []); + }; + return [ + { ...tree, path: "/" }, + ...treeReduce(tree.children, "/") + ]; + }; + const rankReferences = flattenSavedTree(savedTree); + const recursive = (subtree, treePaths, currPath) => { + const existingTree = treePaths.find((f5) => currPath == f5.path); + if (existingTree) { + return { + ...subtree, + children: reorderStringTree(existingTree.children, subtree.children).map((t4) => recursive(t4, treePaths, currPath + "/" + t4.node)) + }; + } else { + return { + ...subtree, + children: subtree.children.map((t4) => recursive(t4, treePaths, currPath + "/" + t4.node)) + }; + } + }; + return recursive(rawTree, rankReferences, "/"); +}; +var sortFolderTreeUsingStringTree = (folderTree2, stringTree) => { + const recursiveSort = (file, strings) => { + if (file instanceof import_obsidian4.TFolder) { + return { + ...file, + children: file.children.map((f5) => { + const currStringTree = strings.children.find((g4) => g4.node == f5.name); + if (currStringTree) + return recursiveSort(f5, currStringTree); + return f5; + }).sort((a6, b4) => strings.children.findIndex((x5) => x5.node == a6.name) - strings.children.findIndex((x5) => x5.node == b4.name)) + }; + } else { + return file; + } + }; + return recursiveSort(folderTree2, stringTree); +}; +var internalPluginLoaded = (pluginName, app2) => { + var _a2; + return (_a2 = app2.internalPlugins.plugins[pluginName]) == null ? void 0 : _a2._loaded; +}; +var openFile = async (file, app2, newLeaf) => { + if (file.isFolder) { + let leaf = app2.workspace.getLeaf(newLeaf); + app2.workspace.setActiveLeaf(leaf, { focus: true }); + await leaf.setViewState({ type: FOLDER_VIEW_TYPE, state: { folder: file.path } }); + await app2.workspace.requestSaveLayout(); + } else { + let leaf = app2.workspace.getLeaf(newLeaf); + app2.workspace.setActiveLeaf(leaf, { focus: true }); + await leaf.openFile(app2.vault.getAbstractFileByPath(file.path), { eState: { focus: true } }); + } +}; +var openFileInNewPane = (plugin, file) => { + openFile(file, plugin.app, true); +}; +function selectElementContents(el) { + var range = document.createRange(); + range.selectNodeContents(el); + var sel = window.getSelection(); + sel.removeAllRanges(); + sel.addRange(range); +} +var createNewMarkdownFile = async (app2, folder, newFileName, content) => { + const newFile = await app2.fileManager.createNewMarkdownFile(folder, newFileName); + if (content && content !== "") + await app2.vault.modify(newFile, content); + await openFile(newFile, app2, false); + const titleEl = app2.workspace.activeLeaf.view.containerEl.querySelector(".inline-title"); + if (titleEl) { + titleEl.focus(); + selectElementContents(titleEl); + } + let evt = new CustomEvent(eventTypes.activeFileChange, { detail: { filePath: newFile.path } }); + window.dispatchEvent(evt); + return newFile; +}; +var unifiedToNative = (unified) => { + let unicodes = unified.split("-"); + let codePoints = unicodes.map((u6) => `0x${u6}`); + return String.fromCodePoint(...codePoints); +}; + +// src/components/Sidebar/TreeView/FolderTreeView.tsx +var import_obsidian6 = require("obsidian"); + +// node_modules/@dnd-kit/core/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"; +function isWindow(element) { + const elementString = Object.prototype.toString.call(element); + return elementString === "[object Window]" || elementString === "[object global]"; +} +function isNode2(node) { + return "nodeType" in node; +} +function getWindow(target) { + var _target$ownerDocument, _target$ownerDocument2; + if (!target) { + return window; + } + if (isWindow(target)) { + return target; + } + if (!isNode2(target)) { + return window; + } + return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window; +} +function isDocument(node) { + const { + Document + } = getWindow(node); + return node instanceof Document; +} +function isHTMLElement(node) { + if (isWindow(node)) { + return false; + } + return node instanceof getWindow(node).HTMLElement; +} +function isSVGElement(node) { + return node instanceof getWindow(node).SVGElement; +} +function getOwnerDocument(target) { + if (!target) { + return document; + } + if (isWindow(target)) { + return target.document; + } + if (!isNode2(target)) { + return document; + } + if (isDocument(target)) { + return target; + } + if (isHTMLElement(target)) { + return target.ownerDocument; + } + return document; +} +var useIsomorphicLayoutEffect = canUseDOM ? s2 : h2; +function useEvent(handler) { + const handlerRef = _2(handler); + useIsomorphicLayoutEffect(() => { + handlerRef.current = handler; + }); + return T2(function(...args) { + return handlerRef.current == null ? void 0 : handlerRef.current(...args); + }, []); +} +function useInterval() { + const intervalRef = _2(null); + const set = T2((listener, duration) => { + intervalRef.current = setInterval(listener, duration); + }, []); + const clear = T2(() => { + if (intervalRef.current !== null) { + clearInterval(intervalRef.current); + intervalRef.current = null; + } + }, []); + return [set, clear]; +} +function useLatestValue(value, dependencies = [value]) { + const valueRef = _2(value); + useIsomorphicLayoutEffect(() => { + if (valueRef.current !== value) { + valueRef.current = value; + } + }, dependencies); + return valueRef; +} +function useLazyMemo(callback, dependencies) { + const valueRef = _2(); + return F(() => { + const newValue = callback(valueRef.current); + valueRef.current = newValue; + return newValue; + }, [...dependencies]); +} +function useNodeRef(onChange) { + const onChangeHandler = useEvent(onChange); + const node = _2(null); + const setNodeRef = T2((element) => { + if (element !== node.current) { + onChangeHandler == null ? void 0 : onChangeHandler(element, node.current); + } + node.current = element; + }, []); + return [node, setNodeRef]; +} +function usePrevious2(value) { + const ref = _2(); + h2(() => { + ref.current = value; + }, [value]); + return ref.current; +} +var ids = {}; +function useUniqueId(prefix, value) { + return F(() => { + if (value) { + return value; + } + const id = ids[prefix] == null ? 0 : ids[prefix] + 1; + ids[prefix] = id; + return `${prefix}-${id}`; + }, [prefix, value]); +} +function createAdjustmentFn(modifier) { + return (object, ...adjustments) => { + return adjustments.reduce((accumulator, adjustment) => { + const entries = Object.entries(adjustment); + for (const [key2, valueAdjustment] of entries) { + const value = accumulator[key2]; + if (value != null) { + accumulator[key2] = value + modifier * valueAdjustment; + } + } + return accumulator; + }, { + ...object + }); + }; +} +var add = /* @__PURE__ */ createAdjustmentFn(1); +var subtract = /* @__PURE__ */ createAdjustmentFn(-1); +function hasViewportRelativeCoordinates(event) { + return "clientX" in event && "clientY" in event; +} +function isKeyboardEvent(event) { + if (!event) { + return false; + } + const { + KeyboardEvent + } = getWindow(event.target); + return KeyboardEvent && event instanceof KeyboardEvent; +} +function isTouchEvent(event) { + if (!event) { + return false; + } + const { + TouchEvent + } = getWindow(event.target); + return TouchEvent && event instanceof TouchEvent; +} +function getEventCoordinates(event) { + if (isTouchEvent(event)) { + if (event.touches && event.touches.length) { + const { + clientX: x5, + clientY: y4 + } = event.touches[0]; + return { + x: x5, + y: y4 + }; + } else if (event.changedTouches && event.changedTouches.length) { + const { + clientX: x5, + clientY: y4 + } = event.changedTouches[0]; + return { + x: x5, + y: y4 + }; + } + } + if (hasViewportRelativeCoordinates(event)) { + return { + x: event.clientX, + y: event.clientY + }; + } + return null; +} +var CSS = /* @__PURE__ */ Object.freeze({ + Translate: { + toString(transform) { + if (!transform) { + return; + } + const { + x: x5, + y: y4 + } = transform; + return `translate3d(${x5 ? Math.round(x5) : 0}px, ${y4 ? Math.round(y4) : 0}px, 0)`; + } + }, + Scale: { + toString(transform) { + if (!transform) { + return; + } + const { + scaleX, + scaleY + } = transform; + return `scaleX(${scaleX}) scaleY(${scaleY})`; + } + }, + Transform: { + toString(transform) { + if (!transform) { + return; + } + return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" "); + } + }, + Transition: { + toString({ + property, + duration, + easing + }) { + return `${property} ${duration}ms ${easing}`; + } + } +}); +var SELECTOR = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]"; +function findFirstFocusableNode(element) { + if (element.matches(SELECTOR)) { + return element; + } + return element.querySelector(SELECTOR); +} + +// node_modules/@dnd-kit/core/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +var hiddenStyles = { + display: "none" +}; +function HiddenText(_ref) { + let { + id, + value + } = _ref; + return _n.createElement("div", { + id, + style: hiddenStyles + }, value); +} +var visuallyHidden = { + position: "fixed", + width: 1, + height: 1, + margin: -1, + border: 0, + padding: 0, + overflow: "hidden", + clip: "rect(0 0 0 0)", + clipPath: "inset(100%)", + whiteSpace: "nowrap" +}; +function LiveRegion(_ref) { + let { + id, + announcement + } = _ref; + return _n.createElement("div", { + id, + style: visuallyHidden, + role: "status", + "aria-live": "assertive", + "aria-atomic": true + }, announcement); +} +function useAnnouncement() { + const [announcement, setAnnouncement] = p2(""); + const announce = T2((value) => { + if (value != null) { + setAnnouncement(value); + } + }, []); + return { + announce, + announcement + }; +} + +// node_modules/@dnd-kit/core/dist/core.esm.js +var DndMonitorContext = /* @__PURE__ */ B(null); +function useDndMonitor(listener) { + const registerListener = q2(DndMonitorContext); + h2(() => { + if (!registerListener) { + throw new Error("useDndMonitor must be used within a children of "); + } + const unsubscribe = registerListener(listener); + return unsubscribe; + }, [listener, registerListener]); +} +function useDndMonitorProvider() { + const [listeners] = p2(() => /* @__PURE__ */ new Set()); + const registerListener = T2((listener) => { + listeners.add(listener); + return () => listeners.delete(listener); + }, [listeners]); + const dispatch = T2((_ref) => { + let { + type, + event + } = _ref; + listeners.forEach((listener) => { + var _listener$type; + return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event); + }); + }, [listeners]); + return [dispatch, registerListener]; +} +var defaultScreenReaderInstructions = { + draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " +}; +var defaultAnnouncements = { + onDragStart(_ref) { + let { + active + } = _ref; + return "Picked up draggable item " + active.id + "."; + }, + onDragOver(_ref2) { + let { + active, + over + } = _ref2; + if (over) { + return "Draggable item " + active.id + " was moved over droppable area " + over.id + "."; + } + return "Draggable item " + active.id + " is no longer over a droppable area."; + }, + onDragEnd(_ref3) { + let { + active, + over + } = _ref3; + if (over) { + return "Draggable item " + active.id + " was dropped over droppable area " + over.id; + } + return "Draggable item " + active.id + " was dropped."; + }, + onDragCancel(_ref4) { + let { + active + } = _ref4; + return "Dragging was cancelled. Draggable item " + active.id + " was dropped."; + } +}; +function Accessibility(_ref) { + let { + announcements = defaultAnnouncements, + container, + hiddenTextDescribedById, + screenReaderInstructions = defaultScreenReaderInstructions + } = _ref; + const { + announce, + announcement + } = useAnnouncement(); + const liveRegionId = useUniqueId("DndLiveRegion"); + const [mounted, setMounted] = p2(false); + h2(() => { + setMounted(true); + }, []); + useDndMonitor(F(() => ({ + onDragStart(_ref2) { + let { + active + } = _ref2; + announce(announcements.onDragStart({ + active + })); + }, + onDragMove(_ref3) { + let { + active, + over + } = _ref3; + if (announcements.onDragMove) { + announce(announcements.onDragMove({ + active, + over + })); + } + }, + onDragOver(_ref4) { + let { + active, + over + } = _ref4; + announce(announcements.onDragOver({ + active, + over + })); + }, + onDragEnd(_ref5) { + let { + active, + over + } = _ref5; + announce(announcements.onDragEnd({ + active, + over + })); + }, + onDragCancel(_ref6) { + let { + active, + over + } = _ref6; + announce(announcements.onDragCancel({ + active, + over + })); + } + }), [announce, announcements])); + if (!mounted) { + return null; + } + const markup = _n.createElement(_n.Fragment, null, _n.createElement(HiddenText, { + id: hiddenTextDescribedById, + value: screenReaderInstructions.draggable + }), _n.createElement(LiveRegion, { + id: liveRegionId, + announcement + })); + return container ? $2(markup, container) : markup; +} +var Action; +(function(Action2) { + Action2["DragStart"] = "dragStart"; + Action2["DragMove"] = "dragMove"; + Action2["DragEnd"] = "dragEnd"; + Action2["DragCancel"] = "dragCancel"; + Action2["DragOver"] = "dragOver"; + Action2["RegisterDroppable"] = "registerDroppable"; + Action2["SetDroppableDisabled"] = "setDroppableDisabled"; + Action2["UnregisterDroppable"] = "unregisterDroppable"; +})(Action || (Action = {})); +function noop() { +} +function useSensor(sensor, options) { + return F(() => ({ + sensor, + options: options != null ? options : {} + }), [sensor, options]); +} +function useSensors() { + for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) { + sensors[_key] = arguments[_key]; + } + return F(() => [...sensors].filter((sensor) => sensor != null), [...sensors]); +} +var defaultCoordinates = /* @__PURE__ */ Object.freeze({ + x: 0, + y: 0 +}); +function distanceBetween(p1, p22) { + return Math.sqrt(Math.pow(p1.x - p22.x, 2) + Math.pow(p1.y - p22.y, 2)); +} +function getRelativeTransformOrigin(event, rect) { + const eventCoordinates = getEventCoordinates(event); + if (!eventCoordinates) { + return "0 0"; + } + const transformOrigin = { + x: (eventCoordinates.x - rect.left) / rect.width * 100, + y: (eventCoordinates.y - rect.top) / rect.height * 100 + }; + return transformOrigin.x + "% " + transformOrigin.y + "%"; +} +function sortCollisionsAsc(_ref, _ref2) { + let { + data: { + value: a6 + } + } = _ref; + let { + data: { + value: b4 + } + } = _ref2; + return a6 - b4; +} +function sortCollisionsDesc(_ref3, _ref4) { + let { + data: { + value: a6 + } + } = _ref3; + let { + data: { + value: b4 + } + } = _ref4; + return b4 - a6; +} +function getFirstCollision(collisions, property) { + if (!collisions || collisions.length === 0) { + return null; + } + const [firstCollision] = collisions; + return property ? firstCollision[property] : firstCollision; +} +function centerOfRectangle(rect, left2, top2) { + if (left2 === void 0) { + left2 = rect.left; + } + if (top2 === void 0) { + top2 = rect.top; + } + return { + x: left2 + rect.width * 0.5, + y: top2 + rect.height * 0.5 + }; +} +var closestCenter = (_ref) => { + let { + collisionRect, + droppableRects, + droppableContainers + } = _ref; + const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top); + const collisions = []; + for (const droppableContainer of droppableContainers) { + const { + id + } = droppableContainer; + const rect = droppableRects.get(id); + if (rect) { + const distBetween = distanceBetween(centerOfRectangle(rect), centerRect); + collisions.push({ + id, + data: { + droppableContainer, + value: distBetween + } + }); + } + } + return collisions.sort(sortCollisionsAsc); +}; +function getIntersectionRatio(entry, target) { + const top2 = Math.max(target.top, entry.top); + const left2 = Math.max(target.left, entry.left); + const right2 = Math.min(target.left + target.width, entry.left + entry.width); + const bottom2 = Math.min(target.top + target.height, entry.top + entry.height); + const width = right2 - left2; + const height = bottom2 - top2; + if (left2 < right2 && top2 < bottom2) { + const targetArea = target.width * target.height; + const entryArea = entry.width * entry.height; + const intersectionArea = width * height; + const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea); + return Number(intersectionRatio.toFixed(4)); + } + return 0; +} +var rectIntersection = (_ref) => { + let { + collisionRect, + droppableRects, + droppableContainers + } = _ref; + const collisions = []; + for (const droppableContainer of droppableContainers) { + const { + id + } = droppableContainer; + const rect = droppableRects.get(id); + if (rect) { + const intersectionRatio = getIntersectionRatio(rect, collisionRect); + if (intersectionRatio > 0) { + collisions.push({ + id, + data: { + droppableContainer, + value: intersectionRatio + } + }); + } + } + } + return collisions.sort(sortCollisionsDesc); +}; +function adjustScale(transform, rect1, rect2) { + return { + ...transform, + scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1, + scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1 + }; +} +function getRectDelta(rect1, rect2) { + return rect1 && rect2 ? { + x: rect1.left - rect2.left, + y: rect1.top - rect2.top + } : defaultCoordinates; +} +function createRectAdjustmentFn(modifier) { + return function adjustClientRect(rect) { + for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + adjustments[_key - 1] = arguments[_key]; + } + return adjustments.reduce((acc, adjustment) => ({ + ...acc, + top: acc.top + modifier * adjustment.y, + bottom: acc.bottom + modifier * adjustment.y, + left: acc.left + modifier * adjustment.x, + right: acc.right + modifier * adjustment.x + }), { + ...rect + }); + }; +} +var getAdjustedRect = /* @__PURE__ */ createRectAdjustmentFn(1); +function parseTransform(transform) { + if (transform.startsWith("matrix3d(")) { + const transformArray = transform.slice(9, -1).split(/, /); + return { + x: +transformArray[12], + y: +transformArray[13], + scaleX: +transformArray[0], + scaleY: +transformArray[5] + }; + } else if (transform.startsWith("matrix(")) { + const transformArray = transform.slice(7, -1).split(/, /); + return { + x: +transformArray[4], + y: +transformArray[5], + scaleX: +transformArray[0], + scaleY: +transformArray[3] + }; + } + return null; +} +function inverseTransform(rect, transform, transformOrigin) { + const parsedTransform = parseTransform(transform); + if (!parsedTransform) { + return rect; + } + const { + scaleX, + scaleY, + x: translateX, + y: translateY + } = parsedTransform; + const x5 = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin); + const y4 = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(" ") + 1)); + const w7 = scaleX ? rect.width / scaleX : rect.width; + const h5 = scaleY ? rect.height / scaleY : rect.height; + return { + width: w7, + height: h5, + top: y4, + right: x5 + w7, + bottom: y4 + h5, + left: x5 + }; +} +var defaultOptions = { + ignoreTransform: false +}; +function getClientRect(element, options) { + if (options === void 0) { + options = defaultOptions; + } + let rect = element.getBoundingClientRect(); + if (options.ignoreTransform) { + const { + getComputedStyle: getComputedStyle2 + } = getWindow(element); + const { + transform, + transformOrigin + } = getComputedStyle2(element); + if (transform) { + rect = inverseTransform(rect, transform, transformOrigin); + } + } + const { + top: top2, + left: left2, + width, + height, + bottom: bottom2, + right: right2 + } = rect; + return { + top: top2, + left: left2, + width, + height, + bottom: bottom2, + right: right2 + }; +} +function getTransformAgnosticClientRect(element) { + return getClientRect(element, { + ignoreTransform: true + }); +} +function getWindowClientRect(element) { + const width = element.innerWidth; + const height = element.innerHeight; + return { + top: 0, + left: 0, + right: width, + bottom: height, + width, + height + }; +} +function isFixed(node, computedStyle) { + if (computedStyle === void 0) { + computedStyle = getWindow(node).getComputedStyle(node); + } + return computedStyle.position === "fixed"; +} +function isScrollable(element, computedStyle) { + if (computedStyle === void 0) { + computedStyle = getWindow(element).getComputedStyle(element); + } + const overflowRegex = /(auto|scroll|overlay)/; + const properties2 = ["overflow", "overflowX", "overflowY"]; + return properties2.some((property) => { + const value = computedStyle[property]; + return typeof value === "string" ? overflowRegex.test(value) : false; + }); +} +function getScrollableAncestors(element, limit) { + const scrollParents = []; + function findScrollableAncestors(node) { + if (limit != null && scrollParents.length >= limit) { + return scrollParents; + } + if (!node) { + return scrollParents; + } + if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) { + scrollParents.push(node.scrollingElement); + return scrollParents; + } + if (!isHTMLElement(node) || isSVGElement(node)) { + return scrollParents; + } + if (scrollParents.includes(node)) { + return scrollParents; + } + const { + getComputedStyle: getComputedStyle2 + } = getWindow(node); + const computedStyle = getComputedStyle2(node); + if (node !== element) { + if (isScrollable(node, computedStyle)) { + scrollParents.push(node); + } + } + if (isFixed(node, computedStyle)) { + return scrollParents; + } + return findScrollableAncestors(node.parentNode); + } + if (!element) { + return scrollParents; + } + return findScrollableAncestors(element); +} +function getFirstScrollableAncestor(node) { + const [firstScrollableAncestor] = getScrollableAncestors(node, 1); + return firstScrollableAncestor != null ? firstScrollableAncestor : null; +} +function getScrollableElement(element) { + if (!canUseDOM || !element) { + return null; + } + if (isWindow(element)) { + return element; + } + if (!isNode2(element)) { + return null; + } + if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) { + return window; + } + if (isHTMLElement(element)) { + return element; + } + return null; +} +function getScrollXCoordinate(element) { + if (isWindow(element)) { + return element.scrollX; + } + return element.scrollLeft; +} +function getScrollYCoordinate(element) { + if (isWindow(element)) { + return element.scrollY; + } + return element.scrollTop; +} +function getScrollCoordinates(element) { + return { + x: getScrollXCoordinate(element), + y: getScrollYCoordinate(element) + }; +} +var Direction2; +(function(Direction3) { + Direction3[Direction3["Forward"] = 1] = "Forward"; + Direction3[Direction3["Backward"] = -1] = "Backward"; +})(Direction2 || (Direction2 = {})); +function isDocumentScrollingElement(element) { + if (!canUseDOM || !element) { + return false; + } + return element === document.scrollingElement; +} +function getScrollPosition(scrollingContainer) { + const minScroll = { + x: 0, + y: 0 + }; + const dimensions = isDocumentScrollingElement(scrollingContainer) ? { + height: window.innerHeight, + width: window.innerWidth + } : { + height: scrollingContainer.clientHeight, + width: scrollingContainer.clientWidth + }; + const maxScroll = { + x: scrollingContainer.scrollWidth - dimensions.width, + y: scrollingContainer.scrollHeight - dimensions.height + }; + const isTop = scrollingContainer.scrollTop <= minScroll.y; + const isLeft = scrollingContainer.scrollLeft <= minScroll.x; + const isBottom = scrollingContainer.scrollTop >= maxScroll.y; + const isRight = scrollingContainer.scrollLeft >= maxScroll.x; + return { + isTop, + isLeft, + isBottom, + isRight, + maxScroll, + minScroll + }; +} +var defaultThreshold = { + x: 0.2, + y: 0.2 +}; +function getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) { + let { + top: top2, + left: left2, + right: right2, + bottom: bottom2 + } = _ref; + if (acceleration === void 0) { + acceleration = 10; + } + if (thresholdPercentage === void 0) { + thresholdPercentage = defaultThreshold; + } + const { + isTop, + isBottom, + isLeft, + isRight + } = getScrollPosition(scrollContainer); + const direction = { + x: 0, + y: 0 + }; + const speed = { + x: 0, + y: 0 + }; + const threshold = { + height: scrollContainerRect.height * thresholdPercentage.y, + width: scrollContainerRect.width * thresholdPercentage.x + }; + if (!isTop && top2 <= scrollContainerRect.top + threshold.height) { + direction.y = Direction2.Backward; + speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top2) / threshold.height); + } else if (!isBottom && bottom2 >= scrollContainerRect.bottom - threshold.height) { + direction.y = Direction2.Forward; + speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom2) / threshold.height); + } + if (!isRight && right2 >= scrollContainerRect.right - threshold.width) { + direction.x = Direction2.Forward; + speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right2) / threshold.width); + } else if (!isLeft && left2 <= scrollContainerRect.left + threshold.width) { + direction.x = Direction2.Backward; + speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left2) / threshold.width); + } + return { + direction, + speed + }; +} +function getScrollElementRect(element) { + if (element === document.scrollingElement) { + const { + innerWidth: innerWidth2, + innerHeight: innerHeight2 + } = window; + return { + top: 0, + left: 0, + right: innerWidth2, + bottom: innerHeight2, + width: innerWidth2, + height: innerHeight2 + }; + } + const { + top: top2, + left: left2, + right: right2, + bottom: bottom2 + } = element.getBoundingClientRect(); + return { + top: top2, + left: left2, + right: right2, + bottom: bottom2, + width: element.clientWidth, + height: element.clientHeight + }; +} +function getScrollOffsets(scrollableAncestors) { + return scrollableAncestors.reduce((acc, node) => { + return add(acc, getScrollCoordinates(node)); + }, defaultCoordinates); +} +function getScrollXOffset(scrollableAncestors) { + return scrollableAncestors.reduce((acc, node) => { + return acc + getScrollXCoordinate(node); + }, 0); +} +function getScrollYOffset(scrollableAncestors) { + return scrollableAncestors.reduce((acc, node) => { + return acc + getScrollYCoordinate(node); + }, 0); +} +function scrollIntoViewIfNeeded(element, measure) { + if (measure === void 0) { + measure = getClientRect; + } + if (!element) { + return; + } + const { + top: top2, + left: left2, + bottom: bottom2, + right: right2 + } = measure(element); + const firstScrollableAncestor = getFirstScrollableAncestor(element); + if (!firstScrollableAncestor) { + return; + } + if (bottom2 <= 0 || right2 <= 0 || top2 >= window.innerHeight || left2 >= window.innerWidth) { + element.scrollIntoView({ + block: "center", + inline: "center" + }); + } +} +var properties = [["x", ["left", "right"], getScrollXOffset], ["y", ["top", "bottom"], getScrollYOffset]]; +var Rect = class { + constructor(rect, element) { + this.rect = void 0; + this.width = void 0; + this.height = void 0; + this.top = void 0; + this.bottom = void 0; + this.right = void 0; + this.left = void 0; + const scrollableAncestors = getScrollableAncestors(element); + const scrollOffsets = getScrollOffsets(scrollableAncestors); + this.rect = { + ...rect + }; + this.width = rect.width; + this.height = rect.height; + for (const [axis, keys, getScrollOffset] of properties) { + for (const key2 of keys) { + Object.defineProperty(this, key2, { + get: () => { + const currentOffsets = getScrollOffset(scrollableAncestors); + const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets; + return this.rect[key2] + scrollOffsetsDeltla; + }, + enumerable: true + }); + } + } + Object.defineProperty(this, "rect", { + enumerable: false + }); + } +}; +var Listeners = class { + constructor(target) { + this.target = void 0; + this.listeners = []; + this.removeAll = () => { + this.listeners.forEach((listener) => { + var _this$target; + return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener); + }); + }; + this.target = target; + } + add(eventName, handler, options) { + var _this$target2; + (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options); + this.listeners.push([eventName, handler, options]); + } +}; +function getEventListenerTarget(target) { + const { + EventTarget + } = getWindow(target); + return target instanceof EventTarget ? target : getOwnerDocument(target); +} +function hasExceededDistance(delta, measurement) { + const dx = Math.abs(delta.x); + const dy = Math.abs(delta.y); + if (typeof measurement === "number") { + return Math.sqrt(dx ** 2 + dy ** 2) > measurement; + } + if ("x" in measurement && "y" in measurement) { + return dx > measurement.x && dy > measurement.y; + } + if ("x" in measurement) { + return dx > measurement.x; + } + if ("y" in measurement) { + return dy > measurement.y; + } + return false; +} +var EventName; +(function(EventName2) { + EventName2["Click"] = "click"; + EventName2["DragStart"] = "dragstart"; + EventName2["Keydown"] = "keydown"; + EventName2["ContextMenu"] = "contextmenu"; + EventName2["Resize"] = "resize"; + EventName2["SelectionChange"] = "selectionchange"; + EventName2["VisibilityChange"] = "visibilitychange"; +})(EventName || (EventName = {})); +function preventDefault(event) { + event.preventDefault(); +} +function stopPropagation(event) { + event.stopPropagation(); +} +var KeyboardCode; +(function(KeyboardCode2) { + KeyboardCode2["Space"] = "Space"; + KeyboardCode2["Down"] = "ArrowDown"; + KeyboardCode2["Right"] = "ArrowRight"; + KeyboardCode2["Left"] = "ArrowLeft"; + KeyboardCode2["Up"] = "ArrowUp"; + KeyboardCode2["Esc"] = "Escape"; + KeyboardCode2["Enter"] = "Enter"; +})(KeyboardCode || (KeyboardCode = {})); +var defaultKeyboardCodes = { + start: [KeyboardCode.Space, KeyboardCode.Enter], + cancel: [KeyboardCode.Esc], + end: [KeyboardCode.Space, KeyboardCode.Enter] +}; +var defaultKeyboardCoordinateGetter = (event, _ref) => { + let { + currentCoordinates + } = _ref; + switch (event.code) { + case KeyboardCode.Right: + return { + ...currentCoordinates, + x: currentCoordinates.x + 25 + }; + case KeyboardCode.Left: + return { + ...currentCoordinates, + x: currentCoordinates.x - 25 + }; + case KeyboardCode.Down: + return { + ...currentCoordinates, + y: currentCoordinates.y + 25 + }; + case KeyboardCode.Up: + return { + ...currentCoordinates, + y: currentCoordinates.y - 25 + }; + } + return void 0; +}; +var KeyboardSensor = class { + constructor(props) { + this.props = void 0; + this.autoScrollEnabled = false; + this.referenceCoordinates = void 0; + this.listeners = void 0; + this.windowListeners = void 0; + this.props = props; + const { + event: { + target + } + } = props; + this.props = props; + this.listeners = new Listeners(getOwnerDocument(target)); + this.windowListeners = new Listeners(getWindow(target)); + this.handleKeyDown = this.handleKeyDown.bind(this); + this.handleCancel = this.handleCancel.bind(this); + this.attach(); + } + attach() { + this.handleStart(); + this.windowListeners.add(EventName.Resize, this.handleCancel); + this.windowListeners.add(EventName.VisibilityChange, this.handleCancel); + setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown)); + } + handleStart() { + const { + activeNode, + onStart + } = this.props; + const node = activeNode.node.current; + if (node) { + scrollIntoViewIfNeeded(node); + } + onStart(defaultCoordinates); + } + handleKeyDown(event) { + if (isKeyboardEvent(event)) { + const { + active, + context, + options + } = this.props; + const { + keyboardCodes = defaultKeyboardCodes, + coordinateGetter = defaultKeyboardCoordinateGetter, + scrollBehavior = "smooth" + } = options; + const { + code + } = event; + if (keyboardCodes.end.includes(code)) { + this.handleEnd(event); + return; + } + if (keyboardCodes.cancel.includes(code)) { + this.handleCancel(event); + return; + } + const { + collisionRect + } = context.current; + const currentCoordinates = collisionRect ? { + x: collisionRect.left, + y: collisionRect.top + } : defaultCoordinates; + if (!this.referenceCoordinates) { + this.referenceCoordinates = currentCoordinates; + } + const newCoordinates = coordinateGetter(event, { + active, + context: context.current, + currentCoordinates + }); + if (newCoordinates) { + const coordinatesDelta = subtract(newCoordinates, currentCoordinates); + const scrollDelta = { + x: 0, + y: 0 + }; + const { + scrollableAncestors + } = context.current; + for (const scrollContainer of scrollableAncestors) { + const direction = event.code; + const { + isTop, + isRight, + isLeft, + isBottom, + maxScroll, + minScroll + } = getScrollPosition(scrollContainer); + const scrollElementRect = getScrollElementRect(scrollContainer); + const clampedCoordinates = { + x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)), + y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y)) + }; + const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft; + const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop; + if (canScrollX && clampedCoordinates.x !== newCoordinates.x) { + const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x; + const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x; + if (canScrollToNewCoordinates && !coordinatesDelta.y) { + scrollContainer.scrollTo({ + left: newScrollCoordinates, + behavior: scrollBehavior + }); + return; + } + if (canScrollToNewCoordinates) { + scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates; + } else { + scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x; + } + if (scrollDelta.x) { + scrollContainer.scrollBy({ + left: -scrollDelta.x, + behavior: scrollBehavior + }); + } + break; + } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) { + const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y; + const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y; + if (canScrollToNewCoordinates && !coordinatesDelta.x) { + scrollContainer.scrollTo({ + top: newScrollCoordinates, + behavior: scrollBehavior + }); + return; + } + if (canScrollToNewCoordinates) { + scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates; + } else { + scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y; + } + if (scrollDelta.y) { + scrollContainer.scrollBy({ + top: -scrollDelta.y, + behavior: scrollBehavior + }); + } + break; + } + } + this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta)); + } + } + } + handleMove(event, coordinates) { + const { + onMove + } = this.props; + event.preventDefault(); + onMove(coordinates); + } + handleEnd(event) { + const { + onEnd + } = this.props; + event.preventDefault(); + this.detach(); + onEnd(); + } + handleCancel(event) { + const { + onCancel + } = this.props; + event.preventDefault(); + this.detach(); + onCancel(); + } + detach() { + this.listeners.removeAll(); + this.windowListeners.removeAll(); + } +}; +KeyboardSensor.activators = [{ + eventName: "onKeyDown", + handler: (event, _ref, _ref2) => { + let { + keyboardCodes = defaultKeyboardCodes, + onActivation + } = _ref; + let { + active + } = _ref2; + const { + code + } = event.nativeEvent; + if (keyboardCodes.start.includes(code)) { + const activator = active.activatorNode.current; + if (activator && event.target !== activator) { + return false; + } + event.preventDefault(); + onActivation == null ? void 0 : onActivation({ + event: event.nativeEvent + }); + return true; + } + return false; + } +}]; +function isDistanceConstraint(constraint) { + return Boolean(constraint && "distance" in constraint); +} +function isDelayConstraint(constraint) { + return Boolean(constraint && "delay" in constraint); +} +var AbstractPointerSensor = class { + constructor(props, events2, listenerTarget) { + var _getEventCoordinates; + if (listenerTarget === void 0) { + listenerTarget = getEventListenerTarget(props.event.target); + } + this.props = void 0; + this.events = void 0; + this.autoScrollEnabled = true; + this.document = void 0; + this.activated = false; + this.initialCoordinates = void 0; + this.timeoutId = null; + this.listeners = void 0; + this.documentListeners = void 0; + this.windowListeners = void 0; + this.props = props; + this.events = events2; + const { + event + } = props; + const { + target + } = event; + this.props = props; + this.events = events2; + this.document = getOwnerDocument(target); + this.documentListeners = new Listeners(this.document); + this.listeners = new Listeners(listenerTarget); + this.windowListeners = new Listeners(getWindow(target)); + this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates; + this.handleStart = this.handleStart.bind(this); + this.handleMove = this.handleMove.bind(this); + this.handleEnd = this.handleEnd.bind(this); + this.handleCancel = this.handleCancel.bind(this); + this.handleKeydown = this.handleKeydown.bind(this); + this.removeTextSelection = this.removeTextSelection.bind(this); + this.attach(); + } + attach() { + const { + events: events2, + props: { + options: { + activationConstraint + } + } + } = this; + this.listeners.add(events2.move.name, this.handleMove, { + passive: false + }); + this.listeners.add(events2.end.name, this.handleEnd); + this.windowListeners.add(EventName.Resize, this.handleCancel); + this.windowListeners.add(EventName.DragStart, preventDefault); + this.windowListeners.add(EventName.VisibilityChange, this.handleCancel); + this.windowListeners.add(EventName.ContextMenu, preventDefault); + this.documentListeners.add(EventName.Keydown, this.handleKeydown); + if (activationConstraint) { + if (isDistanceConstraint(activationConstraint)) { + return; + } + if (isDelayConstraint(activationConstraint)) { + this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay); + return; + } + } + this.handleStart(); + } + detach() { + this.listeners.removeAll(); + this.windowListeners.removeAll(); + setTimeout(this.documentListeners.removeAll, 50); + if (this.timeoutId !== null) { + clearTimeout(this.timeoutId); + this.timeoutId = null; + } + } + handleStart() { + const { + initialCoordinates + } = this; + const { + onStart + } = this.props; + if (initialCoordinates) { + this.activated = true; + this.documentListeners.add(EventName.Click, stopPropagation, { + capture: true + }); + this.removeTextSelection(); + this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection); + onStart(initialCoordinates); + } + } + handleMove(event) { + var _getEventCoordinates2; + const { + activated, + initialCoordinates, + props + } = this; + const { + onMove, + options: { + activationConstraint + } + } = props; + if (!initialCoordinates) { + return; + } + const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates; + const delta = subtract(initialCoordinates, coordinates); + if (!activated && activationConstraint) { + if (isDelayConstraint(activationConstraint)) { + if (hasExceededDistance(delta, activationConstraint.tolerance)) { + return this.handleCancel(); + } + return; + } + if (isDistanceConstraint(activationConstraint)) { + if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) { + return this.handleCancel(); + } + if (hasExceededDistance(delta, activationConstraint.distance)) { + return this.handleStart(); + } + return; + } + } + if (event.cancelable) { + event.preventDefault(); + } + onMove(coordinates); + } + handleEnd() { + const { + onEnd + } = this.props; + this.detach(); + onEnd(); + } + handleCancel() { + const { + onCancel + } = this.props; + this.detach(); + onCancel(); + } + handleKeydown(event) { + if (event.code === KeyboardCode.Esc) { + this.handleCancel(); + } + } + removeTextSelection() { + var _this$document$getSel; + (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges(); + } +}; +var events = { + move: { + name: "pointermove" + }, + end: { + name: "pointerup" + } +}; +var PointerSensor = class extends AbstractPointerSensor { + constructor(props) { + const { + event + } = props; + const listenerTarget = getOwnerDocument(event.target); + super(props, events, listenerTarget); + } +}; +PointerSensor.activators = [{ + eventName: "onPointerDown", + handler: (_ref, _ref2) => { + let { + nativeEvent: event + } = _ref; + let { + onActivation + } = _ref2; + if (!event.isPrimary || event.button !== 0) { + return false; + } + onActivation == null ? void 0 : onActivation({ + event + }); + return true; + } +}]; +var events$1 = { + move: { + name: "mousemove" + }, + end: { + name: "mouseup" + } +}; +var MouseButton; +(function(MouseButton2) { + MouseButton2[MouseButton2["RightClick"] = 2] = "RightClick"; +})(MouseButton || (MouseButton = {})); +var MouseSensor = class extends AbstractPointerSensor { + constructor(props) { + super(props, events$1, getOwnerDocument(props.event.target)); + } +}; +MouseSensor.activators = [{ + eventName: "onMouseDown", + handler: (_ref, _ref2) => { + let { + nativeEvent: event + } = _ref; + let { + onActivation + } = _ref2; + if (event.button === MouseButton.RightClick) { + return false; + } + onActivation == null ? void 0 : onActivation({ + event + }); + return true; + } +}]; +var events$2 = { + move: { + name: "touchmove" + }, + end: { + name: "touchend" + } +}; +var TouchSensor = class extends AbstractPointerSensor { + constructor(props) { + super(props, events$2); + } + static setup() { + window.addEventListener(events$2.move.name, noop2, { + capture: false, + passive: false + }); + return function teardown() { + window.removeEventListener(events$2.move.name, noop2); + }; + function noop2() { + } + } +}; +TouchSensor.activators = [{ + eventName: "onTouchStart", + handler: (_ref, _ref2) => { + let { + nativeEvent: event + } = _ref; + let { + onActivation + } = _ref2; + const { + touches + } = event; + if (touches.length > 1) { + return false; + } + onActivation == null ? void 0 : onActivation({ + event + }); + return true; + } +}]; +var AutoScrollActivator; +(function(AutoScrollActivator2) { + AutoScrollActivator2[AutoScrollActivator2["Pointer"] = 0] = "Pointer"; + AutoScrollActivator2[AutoScrollActivator2["DraggableRect"] = 1] = "DraggableRect"; +})(AutoScrollActivator || (AutoScrollActivator = {})); +var TraversalOrder; +(function(TraversalOrder2) { + TraversalOrder2[TraversalOrder2["TreeOrder"] = 0] = "TreeOrder"; + TraversalOrder2[TraversalOrder2["ReversedTreeOrder"] = 1] = "ReversedTreeOrder"; +})(TraversalOrder || (TraversalOrder = {})); +function useAutoScroller(_ref) { + let { + acceleration, + activator = AutoScrollActivator.Pointer, + canScroll, + draggingRect, + enabled, + interval = 5, + order: order2 = TraversalOrder.TreeOrder, + pointerCoordinates, + scrollableAncestors, + scrollableAncestorRects, + delta, + threshold + } = _ref; + const scrollIntent = useScrollIntent({ + delta, + disabled: !enabled + }); + const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval(); + const scrollSpeed = _2({ + x: 0, + y: 0 + }); + const scrollDirection = _2({ + x: 0, + y: 0 + }); + const rect = F(() => { + switch (activator) { + case AutoScrollActivator.Pointer: + return pointerCoordinates ? { + top: pointerCoordinates.y, + bottom: pointerCoordinates.y, + left: pointerCoordinates.x, + right: pointerCoordinates.x + } : null; + case AutoScrollActivator.DraggableRect: + return draggingRect; + } + }, [activator, draggingRect, pointerCoordinates]); + const scrollContainerRef = _2(null); + const autoScroll = T2(() => { + const scrollContainer = scrollContainerRef.current; + if (!scrollContainer) { + return; + } + const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x; + const scrollTop = scrollSpeed.current.y * scrollDirection.current.y; + scrollContainer.scrollBy(scrollLeft, scrollTop); + }, []); + const sortedScrollableAncestors = F(() => order2 === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order2, scrollableAncestors]); + h2(() => { + if (!enabled || !scrollableAncestors.length || !rect) { + clearAutoScrollInterval(); + return; + } + for (const scrollContainer of sortedScrollableAncestors) { + if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) { + continue; + } + const index = scrollableAncestors.indexOf(scrollContainer); + const scrollContainerRect = scrollableAncestorRects[index]; + if (!scrollContainerRect) { + continue; + } + const { + direction, + speed + } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold); + for (const axis of ["x", "y"]) { + if (!scrollIntent[axis][direction[axis]]) { + speed[axis] = 0; + direction[axis] = 0; + } + } + if (speed.x > 0 || speed.y > 0) { + clearAutoScrollInterval(); + scrollContainerRef.current = scrollContainer; + setAutoScrollInterval(autoScroll, interval); + scrollSpeed.current = speed; + scrollDirection.current = direction; + return; + } + } + scrollSpeed.current = { + x: 0, + y: 0 + }; + scrollDirection.current = { + x: 0, + y: 0 + }; + clearAutoScrollInterval(); + }, [ + acceleration, + autoScroll, + canScroll, + clearAutoScrollInterval, + enabled, + interval, + JSON.stringify(rect), + JSON.stringify(scrollIntent), + setAutoScrollInterval, + scrollableAncestors, + sortedScrollableAncestors, + scrollableAncestorRects, + JSON.stringify(threshold) + ]); +} +var defaultScrollIntent = { + x: { + [Direction2.Backward]: false, + [Direction2.Forward]: false + }, + y: { + [Direction2.Backward]: false, + [Direction2.Forward]: false + } +}; +function useScrollIntent(_ref2) { + let { + delta, + disabled + } = _ref2; + const previousDelta = usePrevious2(delta); + return useLazyMemo((previousIntent) => { + if (disabled || !previousDelta || !previousIntent) { + return defaultScrollIntent; + } + const direction = { + x: Math.sign(delta.x - previousDelta.x), + y: Math.sign(delta.y - previousDelta.y) + }; + return { + x: { + [Direction2.Backward]: previousIntent.x[Direction2.Backward] || direction.x === -1, + [Direction2.Forward]: previousIntent.x[Direction2.Forward] || direction.x === 1 + }, + y: { + [Direction2.Backward]: previousIntent.y[Direction2.Backward] || direction.y === -1, + [Direction2.Forward]: previousIntent.y[Direction2.Forward] || direction.y === 1 + } + }; + }, [disabled, delta, previousDelta]); +} +function useCachedNode(draggableNodes, id) { + const draggableNode = id !== null ? draggableNodes.get(id) : void 0; + const node = draggableNode ? draggableNode.node.current : null; + return useLazyMemo((cachedNode) => { + var _ref; + if (id === null) { + return null; + } + return (_ref = node != null ? node : cachedNode) != null ? _ref : null; + }, [node, id]); +} +function useCombineActivators(sensors, getSyntheticHandler) { + return F(() => sensors.reduce((accumulator, sensor) => { + const { + sensor: Sensor + } = sensor; + const sensorActivators = Sensor.activators.map((activator) => ({ + eventName: activator.eventName, + handler: getSyntheticHandler(activator.handler, sensor) + })); + return [...accumulator, ...sensorActivators]; + }, []), [sensors, getSyntheticHandler]); +} +var MeasuringStrategy; +(function(MeasuringStrategy2) { + MeasuringStrategy2[MeasuringStrategy2["Always"] = 0] = "Always"; + MeasuringStrategy2[MeasuringStrategy2["BeforeDragging"] = 1] = "BeforeDragging"; + MeasuringStrategy2[MeasuringStrategy2["WhileDragging"] = 2] = "WhileDragging"; +})(MeasuringStrategy || (MeasuringStrategy = {})); +var MeasuringFrequency; +(function(MeasuringFrequency2) { + MeasuringFrequency2["Optimized"] = "optimized"; +})(MeasuringFrequency || (MeasuringFrequency = {})); +var defaultValue = /* @__PURE__ */ new Map(); +function useDroppableMeasuring(containers, _ref) { + let { + dragging, + dependencies, + config + } = _ref; + const [containerIdsScheduledForMeasurement, setContainerIdsScheduledForMeasurement] = p2(null); + const measuringScheduled = containerIdsScheduledForMeasurement != null; + const { + frequency, + measure, + strategy + } = config; + const containersRef = _2(containers); + const disabled = isDisabled(); + const disabledRef = useLatestValue(disabled); + const measureDroppableContainers = T2(function(ids3) { + if (ids3 === void 0) { + ids3 = []; + } + if (disabledRef.current) { + return; + } + setContainerIdsScheduledForMeasurement((value) => value ? value.concat(ids3) : ids3); + }, [disabledRef]); + const timeoutId = _2(null); + const droppableRects = useLazyMemo((previousValue) => { + if (disabled && !dragging) { + return defaultValue; + } + const ids3 = containerIdsScheduledForMeasurement; + if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || ids3 != null) { + const map = /* @__PURE__ */ new Map(); + for (let container of containers) { + if (!container) { + continue; + } + if (ids3 && ids3.length > 0 && !ids3.includes(container.id) && container.rect.current) { + map.set(container.id, container.rect.current); + continue; + } + const node = container.node.current; + const rect = node ? new Rect(measure(node), node) : null; + container.rect.current = rect; + if (rect) { + map.set(container.id, rect); + } + } + return map; + } + return previousValue; + }, [containers, containerIdsScheduledForMeasurement, dragging, disabled, measure]); + h2(() => { + containersRef.current = containers; + }, [containers]); + h2(() => { + if (disabled) { + return; + } + requestAnimationFrame(() => measureDroppableContainers()); + }, [dragging, disabled]); + h2(() => { + if (measuringScheduled) { + setContainerIdsScheduledForMeasurement(null); + } + }, [measuringScheduled]); + h2(() => { + if (disabled || typeof frequency !== "number" || timeoutId.current !== null) { + return; + } + timeoutId.current = setTimeout(() => { + measureDroppableContainers(); + timeoutId.current = null; + }, frequency); + }, [frequency, disabled, measureDroppableContainers, ...dependencies]); + return { + droppableRects, + measureDroppableContainers, + measuringScheduled + }; + function isDisabled() { + switch (strategy) { + case MeasuringStrategy.Always: + return false; + case MeasuringStrategy.BeforeDragging: + return dragging; + default: + return !dragging; + } + } +} +function useInitialValue(value, computeFn) { + return useLazyMemo((previousValue) => { + if (!value) { + return null; + } + if (previousValue) { + return previousValue; + } + return typeof computeFn === "function" ? computeFn(value) : value; + }, [computeFn, value]); +} +function useInitialRect(node, measure) { + return useInitialValue(node, measure); +} +function useMutationObserver(_ref) { + let { + callback, + disabled + } = _ref; + const handleMutations = useEvent(callback); + const mutationObserver = F(() => { + if (disabled || typeof window === "undefined" || typeof window.MutationObserver === "undefined") { + return void 0; + } + const { + MutationObserver + } = window; + return new MutationObserver(handleMutations); + }, [handleMutations, disabled]); + h2(() => { + return () => mutationObserver == null ? void 0 : mutationObserver.disconnect(); + }, [mutationObserver]); + return mutationObserver; +} +function useResizeObserver(_ref) { + let { + callback, + disabled + } = _ref; + const handleResize = useEvent(callback); + const resizeObserver = F(() => { + if (disabled || typeof window === "undefined" || typeof window.ResizeObserver === "undefined") { + return void 0; + } + const { + ResizeObserver + } = window; + return new ResizeObserver(handleResize); + }, [disabled]); + h2(() => { + return () => resizeObserver == null ? void 0 : resizeObserver.disconnect(); + }, [resizeObserver]); + return resizeObserver; +} +function defaultMeasure(element) { + return new Rect(getClientRect(element), element); +} +function useRect(element, measure, fallbackRect) { + if (measure === void 0) { + measure = defaultMeasure; + } + const [rect, measureRect] = y2(reducer2, null); + const mutationObserver = useMutationObserver({ + callback(records) { + if (!element) { + return; + } + for (const record of records) { + const { + type, + target + } = record; + if (type === "childList" && target instanceof HTMLElement && target.contains(element)) { + measureRect(); + break; + } + } + } + }); + const resizeObserver = useResizeObserver({ + callback: measureRect + }); + useIsomorphicLayoutEffect(() => { + measureRect(); + if (element) { + resizeObserver == null ? void 0 : resizeObserver.observe(element); + mutationObserver == null ? void 0 : mutationObserver.observe(document.body, { + childList: true, + subtree: true + }); + } else { + resizeObserver == null ? void 0 : resizeObserver.disconnect(); + mutationObserver == null ? void 0 : mutationObserver.disconnect(); + } + }, [element]); + return rect; + function reducer2(currentRect) { + if (!element) { + return null; + } + if (element.isConnected === false) { + var _ref; + return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null; + } + const newRect = measure(element); + if (JSON.stringify(currentRect) === JSON.stringify(newRect)) { + return currentRect; + } + return newRect; + } +} +function useRectDelta(rect) { + const initialRect = useInitialValue(rect); + return getRectDelta(rect, initialRect); +} +var defaultValue$1 = []; +function useScrollableAncestors(node) { + const previousNode = _2(node); + const ancestors = useLazyMemo((previousValue) => { + if (!node) { + return defaultValue$1; + } + if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) { + return previousValue; + } + return getScrollableAncestors(node); + }, [node]); + h2(() => { + previousNode.current = node; + }, [node]); + return ancestors; +} +function useScrollOffsets(elements) { + const [scrollCoordinates, setScrollCoordinates] = p2(null); + const prevElements = _2(elements); + const handleScroll = T2((event) => { + const scrollingElement = getScrollableElement(event.target); + if (!scrollingElement) { + return; + } + setScrollCoordinates((scrollCoordinates2) => { + if (!scrollCoordinates2) { + return null; + } + scrollCoordinates2.set(scrollingElement, getScrollCoordinates(scrollingElement)); + return new Map(scrollCoordinates2); + }); + }, []); + h2(() => { + const previousElements = prevElements.current; + if (elements !== previousElements) { + cleanup(previousElements); + const entries = elements.map((element) => { + const scrollableElement = getScrollableElement(element); + if (scrollableElement) { + scrollableElement.addEventListener("scroll", handleScroll, { + passive: true + }); + return [scrollableElement, getScrollCoordinates(scrollableElement)]; + } + return null; + }).filter((entry) => entry != null); + setScrollCoordinates(entries.length ? new Map(entries) : null); + prevElements.current = elements; + } + return () => { + cleanup(elements); + cleanup(previousElements); + }; + function cleanup(elements2) { + elements2.forEach((element) => { + const scrollableElement = getScrollableElement(element); + scrollableElement == null ? void 0 : scrollableElement.removeEventListener("scroll", handleScroll); + }); + } + }, [handleScroll, elements]); + return F(() => { + if (elements.length) { + return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements); + } + return defaultCoordinates; + }, [elements, scrollCoordinates]); +} +function useScrollOffsetsDelta(scrollOffsets, dependencies) { + if (dependencies === void 0) { + dependencies = []; + } + const initialScrollOffsets = _2(null); + h2(() => { + initialScrollOffsets.current = null; + }, dependencies); + h2(() => { + const hasScrollOffsets = scrollOffsets !== defaultCoordinates; + if (hasScrollOffsets && !initialScrollOffsets.current) { + initialScrollOffsets.current = scrollOffsets; + } + if (!hasScrollOffsets && initialScrollOffsets.current) { + initialScrollOffsets.current = null; + } + }, [scrollOffsets]); + return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates; +} +function useSensorSetup(sensors) { + h2(() => { + if (!canUseDOM) { + return; + } + const teardownFns = sensors.map((_ref) => { + let { + sensor + } = _ref; + return sensor.setup == null ? void 0 : sensor.setup(); + }); + return () => { + for (const teardown of teardownFns) { + teardown == null ? void 0 : teardown(); + } + }; + }, sensors.map((_ref2) => { + let { + sensor + } = _ref2; + return sensor; + })); +} +function useSyntheticListeners(listeners, id) { + return F(() => { + return listeners.reduce((acc, _ref) => { + let { + eventName, + handler + } = _ref; + acc[eventName] = (event) => { + handler(event, id); + }; + return acc; + }, {}); + }, [listeners, id]); +} +function useWindowRect(element) { + return F(() => element ? getWindowClientRect(element) : null, [element]); +} +var defaultValue$2 = []; +function useRects(elements, measure) { + if (measure === void 0) { + measure = getClientRect; + } + const [firstElement] = elements; + const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null); + const [rects, measureRects] = y2(reducer2, defaultValue$2); + const resizeObserver = useResizeObserver({ + callback: measureRects + }); + if (elements.length > 0 && rects === defaultValue$2) { + measureRects(); + } + useIsomorphicLayoutEffect(() => { + if (elements.length) { + elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element)); + } else { + resizeObserver == null ? void 0 : resizeObserver.disconnect(); + measureRects(); + } + }, [elements]); + return rects; + function reducer2() { + if (!elements.length) { + return defaultValue$2; + } + return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element)); + } +} +function getMeasurableNode(node) { + if (!node) { + return null; + } + if (node.children.length > 1) { + return node; + } + const firstChild = node.children[0]; + return isHTMLElement(firstChild) ? firstChild : node; +} +function useDragOverlayMeasuring(_ref) { + let { + measure + } = _ref; + const [rect, setRect] = p2(null); + const handleResize = T2((entries) => { + for (const { + target + } of entries) { + if (isHTMLElement(target)) { + setRect((rect2) => { + const newRect = measure(target); + return rect2 ? { + ...rect2, + width: newRect.width, + height: newRect.height + } : newRect; + }); + break; + } + } + }, [measure]); + const resizeObserver = useResizeObserver({ + callback: handleResize + }); + const handleNodeChange = T2((element) => { + const node = getMeasurableNode(element); + resizeObserver == null ? void 0 : resizeObserver.disconnect(); + if (node) { + resizeObserver == null ? void 0 : resizeObserver.observe(node); + } + setRect(node ? measure(node) : null); + }, [measure, resizeObserver]); + const [nodeRef, setRef] = useNodeRef(handleNodeChange); + return F(() => ({ + nodeRef, + rect, + setRef + }), [rect, nodeRef, setRef]); +} +var defaultSensors = [{ + sensor: PointerSensor, + options: {} +}, { + sensor: KeyboardSensor, + options: {} +}]; +var defaultData = { + current: {} +}; +var defaultMeasuringConfiguration = { + draggable: { + measure: getTransformAgnosticClientRect + }, + droppable: { + measure: getTransformAgnosticClientRect, + strategy: MeasuringStrategy.WhileDragging, + frequency: MeasuringFrequency.Optimized + }, + dragOverlay: { + measure: getClientRect + } +}; +var DroppableContainersMap = class extends Map { + get(id) { + var _super$get; + return id != null ? (_super$get = super.get(id)) != null ? _super$get : void 0 : void 0; + } + toArray() { + return Array.from(this.values()); + } + getEnabled() { + return this.toArray().filter((_ref) => { + let { + disabled + } = _ref; + return !disabled; + }); + } + getNodeFor(id) { + var _this$get$node$curren, _this$get; + return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : void 0; + } +}; +var defaultPublicContext = { + activatorEvent: null, + active: null, + activeNode: null, + activeNodeRect: null, + collisions: null, + containerNodeRect: null, + draggableNodes: /* @__PURE__ */ new Map(), + droppableRects: /* @__PURE__ */ new Map(), + droppableContainers: /* @__PURE__ */ new DroppableContainersMap(), + over: null, + dragOverlay: { + nodeRef: { + current: null + }, + rect: null, + setRef: noop + }, + scrollableAncestors: [], + scrollableAncestorRects: [], + measuringConfiguration: defaultMeasuringConfiguration, + measureDroppableContainers: noop, + windowRect: null, + measuringScheduled: false +}; +var defaultInternalContext = { + activatorEvent: null, + activators: [], + active: null, + activeNodeRect: null, + ariaDescribedById: { + draggable: "" + }, + dispatch: noop, + draggableNodes: /* @__PURE__ */ new Map(), + over: null, + measureDroppableContainers: noop +}; +var InternalContext = /* @__PURE__ */ B(defaultInternalContext); +var PublicContext = /* @__PURE__ */ B(defaultPublicContext); +function getInitialState() { + return { + draggable: { + active: null, + initialCoordinates: { + x: 0, + y: 0 + }, + nodes: /* @__PURE__ */ new Map(), + translate: { + x: 0, + y: 0 + } + }, + droppable: { + containers: new DroppableContainersMap() + } + }; +} +function reducer(state, action) { + switch (action.type) { + case Action.DragStart: + return { + ...state, + draggable: { + ...state.draggable, + initialCoordinates: action.initialCoordinates, + active: action.active + } + }; + case Action.DragMove: + if (!state.draggable.active) { + return state; + } + return { + ...state, + draggable: { + ...state.draggable, + translate: { + x: action.coordinates.x - state.draggable.initialCoordinates.x, + y: action.coordinates.y - state.draggable.initialCoordinates.y + } + } + }; + case Action.DragEnd: + case Action.DragCancel: + return { + ...state, + draggable: { + ...state.draggable, + active: null, + initialCoordinates: { + x: 0, + y: 0 + }, + translate: { + x: 0, + y: 0 + } + } + }; + case Action.RegisterDroppable: { + const { + element + } = action; + const { + id + } = element; + const containers = new DroppableContainersMap(state.droppable.containers); + containers.set(id, element); + return { + ...state, + droppable: { + ...state.droppable, + containers + } + }; + } + case Action.SetDroppableDisabled: { + const { + id, + key: key2, + disabled + } = action; + const element = state.droppable.containers.get(id); + if (!element || key2 !== element.key) { + return state; + } + const containers = new DroppableContainersMap(state.droppable.containers); + containers.set(id, { + ...element, + disabled + }); + return { + ...state, + droppable: { + ...state.droppable, + containers + } + }; + } + case Action.UnregisterDroppable: { + const { + id, + key: key2 + } = action; + const element = state.droppable.containers.get(id); + if (!element || key2 !== element.key) { + return state; + } + const containers = new DroppableContainersMap(state.droppable.containers); + containers.delete(id); + return { + ...state, + droppable: { + ...state.droppable, + containers + } + }; + } + default: { + return state; + } + } +} +function RestoreFocus(_ref) { + let { + disabled + } = _ref; + const { + active, + activatorEvent, + draggableNodes + } = q2(InternalContext); + const previousActivatorEvent = usePrevious2(activatorEvent); + const previousActiveId = usePrevious2(active == null ? void 0 : active.id); + h2(() => { + if (disabled) { + return; + } + if (!activatorEvent && previousActivatorEvent && previousActiveId != null) { + if (!isKeyboardEvent(previousActivatorEvent)) { + return; + } + if (document.activeElement === previousActivatorEvent.target) { + return; + } + const draggableNode = draggableNodes.get(previousActiveId); + if (!draggableNode) { + return; + } + const { + activatorNode, + node + } = draggableNode; + if (!activatorNode.current && !node.current) { + return; + } + requestAnimationFrame(() => { + for (const element of [activatorNode.current, node.current]) { + if (!element) { + continue; + } + const focusableNode = findFirstFocusableNode(element); + if (focusableNode) { + focusableNode.focus(); + break; + } + } + }); + } + }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]); + return null; +} +function applyModifiers(modifiers, _ref) { + let { + transform, + ...args + } = _ref; + return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => { + return modifier({ + transform: accumulator, + ...args + }); + }, transform) : transform; +} +function useMeasuringConfiguration(config) { + return F(() => ({ + draggable: { + ...defaultMeasuringConfiguration.draggable, + ...config == null ? void 0 : config.draggable + }, + droppable: { + ...defaultMeasuringConfiguration.droppable, + ...config == null ? void 0 : config.droppable + }, + dragOverlay: { + ...defaultMeasuringConfiguration.dragOverlay, + ...config == null ? void 0 : config.dragOverlay + } + }), [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]); +} +function useLayoutShiftScrollCompensation(_ref) { + let { + activeNode, + measure, + initialRect, + config = true + } = _ref; + const initialized = _2(false); + const { + x: x5, + y: y4 + } = typeof config === "boolean" ? { + x: config, + y: config + } : config; + useIsomorphicLayoutEffect(() => { + const disabled = !x5 && !y4; + if (disabled || !activeNode) { + initialized.current = false; + return; + } + if (initialized.current || !initialRect) { + return; + } + const node = activeNode == null ? void 0 : activeNode.node.current; + if (!node || node.isConnected === false) { + return; + } + const rect = measure(node); + const rectDelta = getRectDelta(rect, initialRect); + if (!x5) { + rectDelta.x = 0; + } + if (!y4) { + rectDelta.y = 0; + } + initialized.current = true; + if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) { + const firstScrollableAncestor = getFirstScrollableAncestor(node); + if (firstScrollableAncestor) { + firstScrollableAncestor.scrollBy({ + top: rectDelta.y, + left: rectDelta.x + }); + } + } + }, [activeNode, x5, y4, initialRect, measure]); +} +var ActiveDraggableContext = /* @__PURE__ */ B({ + ...defaultCoordinates, + scaleX: 1, + scaleY: 1 +}); +var Status; +(function(Status2) { + Status2[Status2["Uninitialized"] = 0] = "Uninitialized"; + Status2[Status2["Initializing"] = 1] = "Initializing"; + Status2[Status2["Initialized"] = 2] = "Initialized"; +})(Status || (Status = {})); +var DndContext = /* @__PURE__ */ w3(function DndContext2(_ref) { + var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect; + let { + id, + accessibility, + autoScroll = true, + children, + sensors = defaultSensors, + collisionDetection = rectIntersection, + measuring, + modifiers, + ...props + } = _ref; + const store = y2(reducer, void 0, getInitialState); + const [state, dispatch] = store; + const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider(); + const [status, setStatus] = p2(Status.Uninitialized); + const isInitialized = status === Status.Initialized; + const { + draggable: { + active: activeId, + nodes: draggableNodes, + translate + }, + droppable: { + containers: droppableContainers + } + } = state; + const node = activeId ? draggableNodes.get(activeId) : null; + const activeRects = _2({ + initial: null, + translated: null + }); + const active = F(() => { + var _node$data; + return activeId != null ? { + id: activeId, + data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData, + rect: activeRects + } : null; + }, [activeId, node]); + const activeRef = _2(null); + const [activeSensor, setActiveSensor] = p2(null); + const [activatorEvent, setActivatorEvent] = p2(null); + const latestProps = useLatestValue(props, Object.values(props)); + const draggableDescribedById = useUniqueId("DndDescribedBy", id); + const enabledDroppableContainers = F(() => droppableContainers.getEnabled(), [droppableContainers]); + const measuringConfiguration = useMeasuringConfiguration(measuring); + const { + droppableRects, + measureDroppableContainers, + measuringScheduled + } = useDroppableMeasuring(enabledDroppableContainers, { + dragging: isInitialized, + dependencies: [translate.x, translate.y], + config: measuringConfiguration.droppable + }); + const activeNode = useCachedNode(draggableNodes, activeId); + const activationCoordinates = F(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]); + const autoScrollOptions = getAutoScrollerOptions(); + const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure); + useLayoutShiftScrollCompensation({ + activeNode: activeId ? draggableNodes.get(activeId) : null, + config: autoScrollOptions.layoutShiftCompensation, + initialRect: initialActiveNodeRect, + measure: measuringConfiguration.draggable.measure + }); + const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect); + const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null); + const sensorContext = _2({ + activatorEvent: null, + active: null, + activeNode, + collisionRect: null, + collisions: null, + droppableRects, + draggableNodes, + draggingNode: null, + draggingNodeRect: null, + droppableContainers, + over: null, + scrollableAncestors: [], + scrollAdjustedTranslate: null + }); + const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id); + const dragOverlay = useDragOverlayMeasuring({ + measure: measuringConfiguration.dragOverlay.measure + }); + const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode; + const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null; + const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); + const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); + const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); + const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null); + const scrollableAncestorRects = useRects(scrollableAncestors); + const modifiedTranslate = applyModifiers(modifiers, { + transform: { + x: translate.x - nodeRectDelta.x, + y: translate.y - nodeRectDelta.y, + scaleX: 1, + scaleY: 1 + }, + activatorEvent, + active, + activeNodeRect, + containerNodeRect, + draggingNodeRect, + over: sensorContext.current.over, + overlayNodeRect: dragOverlay.rect, + scrollableAncestors, + scrollableAncestorRects, + windowRect + }); + const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null; + const scrollOffsets = useScrollOffsets(scrollableAncestors); + const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); + const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]); + const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment); + const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null; + const collisions = active && collisionRect ? collisionDetection({ + active, + collisionRect, + droppableRects, + droppableContainers: enabledDroppableContainers, + pointerCoordinates + }) : null; + const overId = getFirstCollision(collisions, "id"); + const [over, setOver] = p2(null); + const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta); + const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect); + const instantiateSensor = T2((event, _ref2) => { + let { + sensor: Sensor, + options + } = _ref2; + if (activeRef.current == null) { + return; + } + const activeNode2 = draggableNodes.get(activeRef.current); + if (!activeNode2) { + return; + } + const activatorEvent2 = event.nativeEvent; + const sensorInstance = new Sensor({ + active: activeRef.current, + activeNode: activeNode2, + event: activatorEvent2, + options, + context: sensorContext, + onStart(initialCoordinates) { + const id2 = activeRef.current; + if (id2 == null) { + return; + } + const draggableNode = draggableNodes.get(id2); + if (!draggableNode) { + return; + } + const { + onDragStart + } = latestProps.current; + const event2 = { + active: { + id: id2, + data: draggableNode.data, + rect: activeRects + } + }; + an(() => { + onDragStart == null ? void 0 : onDragStart(event2); + setStatus(Status.Initializing); + dispatch({ + type: Action.DragStart, + initialCoordinates, + active: id2 + }); + dispatchMonitorEvent({ + type: "onDragStart", + event: event2 + }); + }); + }, + onMove(coordinates) { + dispatch({ + type: Action.DragMove, + coordinates + }); + }, + onEnd: createHandler(Action.DragEnd), + onCancel: createHandler(Action.DragCancel) + }); + an(() => { + setActiveSensor(sensorInstance); + setActivatorEvent(event.nativeEvent); + }); + function createHandler(type) { + return async function handler() { + const { + active: active2, + collisions: collisions2, + over: over2, + scrollAdjustedTranslate: scrollAdjustedTranslate2 + } = sensorContext.current; + let event2 = null; + if (active2 && scrollAdjustedTranslate2) { + const { + cancelDrop + } = latestProps.current; + event2 = { + activatorEvent: activatorEvent2, + active: active2, + collisions: collisions2, + delta: scrollAdjustedTranslate2, + over: over2 + }; + if (type === Action.DragEnd && typeof cancelDrop === "function") { + const shouldCancel = await Promise.resolve(cancelDrop(event2)); + if (shouldCancel) { + type = Action.DragCancel; + } + } + } + activeRef.current = null; + an(() => { + dispatch({ + type + }); + setStatus(Status.Uninitialized); + setOver(null); + setActiveSensor(null); + setActivatorEvent(null); + const eventName = type === Action.DragEnd ? "onDragEnd" : "onDragCancel"; + if (event2) { + const handler2 = latestProps.current[eventName]; + handler2 == null ? void 0 : handler2(event2); + dispatchMonitorEvent({ + type: eventName, + event: event2 + }); + } + }); + }; + } + }, [draggableNodes]); + const bindActivatorToSensorInstantiator = T2((handler, sensor) => { + return (event, active2) => { + const nativeEvent = event.nativeEvent; + const activeDraggableNode = draggableNodes.get(active2); + if (activeRef.current !== null || !activeDraggableNode || nativeEvent.dndKit || nativeEvent.defaultPrevented) { + return; + } + const activationContext = { + active: activeDraggableNode + }; + const shouldActivate = handler(event, sensor.options, activationContext); + if (shouldActivate === true) { + nativeEvent.dndKit = { + capturedBy: sensor.sensor + }; + activeRef.current = active2; + instantiateSensor(event, sensor); + } + }; + }, [draggableNodes, instantiateSensor]); + const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator); + useSensorSetup(sensors); + useIsomorphicLayoutEffect(() => { + if (activeNodeRect && status === Status.Initializing) { + setStatus(Status.Initialized); + } + }, [activeNodeRect, status]); + h2(() => { + const { + onDragMove + } = latestProps.current; + const { + active: active2, + activatorEvent: activatorEvent2, + collisions: collisions2, + over: over2 + } = sensorContext.current; + if (!active2 || !activatorEvent2) { + return; + } + const event = { + active: active2, + activatorEvent: activatorEvent2, + collisions: collisions2, + delta: { + x: scrollAdjustedTranslate.x, + y: scrollAdjustedTranslate.y + }, + over: over2 + }; + an(() => { + onDragMove == null ? void 0 : onDragMove(event); + dispatchMonitorEvent({ + type: "onDragMove", + event + }); + }); + }, [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]); + h2(() => { + const { + active: active2, + activatorEvent: activatorEvent2, + collisions: collisions2, + droppableContainers: droppableContainers2, + scrollAdjustedTranslate: scrollAdjustedTranslate2 + } = sensorContext.current; + if (!active2 || activeRef.current == null || !activatorEvent2 || !scrollAdjustedTranslate2) { + return; + } + const { + onDragOver + } = latestProps.current; + const overContainer = droppableContainers2.get(overId); + const over2 = overContainer && overContainer.rect.current ? { + id: overContainer.id, + rect: overContainer.rect.current, + data: overContainer.data, + disabled: overContainer.disabled + } : null; + const event = { + active: active2, + activatorEvent: activatorEvent2, + collisions: collisions2, + delta: { + x: scrollAdjustedTranslate2.x, + y: scrollAdjustedTranslate2.y + }, + over: over2 + }; + an(() => { + setOver(over2); + onDragOver == null ? void 0 : onDragOver(event); + dispatchMonitorEvent({ + type: "onDragOver", + event + }); + }); + }, [overId]); + useIsomorphicLayoutEffect(() => { + sensorContext.current = { + activatorEvent, + active, + activeNode, + collisionRect, + collisions, + droppableRects, + draggableNodes, + draggingNode, + draggingNodeRect, + droppableContainers, + over, + scrollableAncestors, + scrollAdjustedTranslate + }; + activeRects.current = { + initial: draggingNodeRect, + translated: collisionRect + }; + }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]); + useAutoScroller({ + ...autoScrollOptions, + delta: translate, + draggingRect: collisionRect, + pointerCoordinates, + scrollableAncestors, + scrollableAncestorRects + }); + const publicContext = F(() => { + const context = { + active, + activeNode, + activeNodeRect, + activatorEvent, + collisions, + containerNodeRect, + dragOverlay, + draggableNodes, + droppableContainers, + droppableRects, + over, + measureDroppableContainers, + scrollableAncestors, + scrollableAncestorRects, + measuringConfiguration, + measuringScheduled, + windowRect + }; + return context; + }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]); + const internalContext = F(() => { + const context = { + activatorEvent, + activators, + active, + activeNodeRect, + ariaDescribedById: { + draggable: draggableDescribedById + }, + dispatch, + draggableNodes, + over, + measureDroppableContainers + }; + return context; + }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]); + return _n.createElement(DndMonitorContext.Provider, { + value: registerMonitorListener + }, _n.createElement(InternalContext.Provider, { + value: internalContext + }, _n.createElement(PublicContext.Provider, { + value: publicContext + }, _n.createElement(ActiveDraggableContext.Provider, { + value: transform + }, children)), _n.createElement(RestoreFocus, { + disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false + })), _n.createElement(Accessibility, { + ...accessibility, + hiddenTextDescribedById: draggableDescribedById + })); + function getAutoScrollerOptions() { + const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false; + const autoScrollGloballyDisabled = typeof autoScroll === "object" ? autoScroll.enabled === false : autoScroll === false; + const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled; + if (typeof autoScroll === "object") { + return { + ...autoScroll, + enabled + }; + } + return { + enabled + }; + } +}); +var NullContext = /* @__PURE__ */ B(null); +var defaultRole = "button"; +var ID_PREFIX = "Droppable"; +function useDraggable(_ref) { + let { + id, + data, + disabled = false, + attributes + } = _ref; + const key2 = useUniqueId(ID_PREFIX); + const { + activators, + activatorEvent, + active, + activeNodeRect, + ariaDescribedById, + draggableNodes, + over + } = q2(InternalContext); + const { + role = defaultRole, + roleDescription = "draggable", + tabIndex = 0 + } = attributes != null ? attributes : {}; + const isDragging = (active == null ? void 0 : active.id) === id; + const transform = q2(isDragging ? ActiveDraggableContext : NullContext); + const [node, setNodeRef] = useNodeRef(); + const [activatorNode, setActivatorNodeRef] = useNodeRef(); + const listeners = useSyntheticListeners(activators, id); + const dataRef = useLatestValue(data); + useIsomorphicLayoutEffect(() => { + draggableNodes.set(id, { + id, + key: key2, + node, + activatorNode, + data: dataRef + }); + return () => { + const node2 = draggableNodes.get(id); + if (node2 && node2.key === key2) { + draggableNodes.delete(id); + } + }; + }, [draggableNodes, id]); + const memoizedAttributes = F(() => ({ + role, + tabIndex, + "aria-disabled": disabled, + "aria-pressed": isDragging && role === defaultRole ? true : void 0, + "aria-roledescription": roleDescription, + "aria-describedby": ariaDescribedById.draggable + }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]); + return { + active, + activatorEvent, + activeNodeRect, + attributes: memoizedAttributes, + isDragging, + listeners: disabled ? void 0 : listeners, + node, + over, + setNodeRef, + setActivatorNodeRef, + transform + }; +} +function useDndContext() { + return q2(PublicContext); +} +var ID_PREFIX$1 = "Droppable"; +var defaultResizeObserverConfig = { + timeout: 25 +}; +function useDroppable(_ref) { + let { + data, + disabled = false, + id, + resizeObserverConfig + } = _ref; + const key2 = useUniqueId(ID_PREFIX$1); + const { + active, + dispatch, + over, + measureDroppableContainers + } = q2(InternalContext); + const previous = _2({ + disabled + }); + const resizeObserverConnected = _2(false); + const rect = _2(null); + const callbackId = _2(null); + const { + disabled: resizeObserverDisabled, + updateMeasurementsFor, + timeout: resizeObserverTimeout + } = { + ...defaultResizeObserverConfig, + ...resizeObserverConfig + }; + const ids3 = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id); + const handleResize = T2(() => { + if (!resizeObserverConnected.current) { + resizeObserverConnected.current = true; + return; + } + if (callbackId.current != null) { + clearTimeout(callbackId.current); + } + callbackId.current = setTimeout(() => { + measureDroppableContainers(Array.isArray(ids3.current) ? ids3.current : [ids3.current]); + callbackId.current = null; + }, resizeObserverTimeout); + }, [resizeObserverTimeout]); + const resizeObserver = useResizeObserver({ + callback: handleResize, + disabled: resizeObserverDisabled || !active + }); + const handleNodeChange = T2((newElement, previousElement) => { + if (!resizeObserver) { + return; + } + if (previousElement) { + resizeObserver.unobserve(previousElement); + resizeObserverConnected.current = false; + } + if (newElement) { + resizeObserver.observe(newElement); + } + }, [resizeObserver]); + const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange); + const dataRef = useLatestValue(data); + h2(() => { + if (!resizeObserver || !nodeRef.current) { + return; + } + resizeObserver.disconnect(); + resizeObserverConnected.current = false; + resizeObserver.observe(nodeRef.current); + }, [nodeRef, resizeObserver]); + useIsomorphicLayoutEffect(() => { + dispatch({ + type: Action.RegisterDroppable, + element: { + id, + key: key2, + disabled, + node: nodeRef, + rect, + data: dataRef + } + }); + return () => dispatch({ + type: Action.UnregisterDroppable, + key: key2, + id + }); + }, [id]); + h2(() => { + if (disabled !== previous.current.disabled) { + dispatch({ + type: Action.SetDroppableDisabled, + id, + key: key2, + disabled + }); + previous.current.disabled = disabled; + } + }, [id, key2, disabled, dispatch]); + return { + active, + rect, + isOver: (over == null ? void 0 : over.id) === id, + node: nodeRef, + over, + setNodeRef + }; +} +function AnimationManager(_ref) { + let { + animation, + children + } = _ref; + const [clonedChildren, setClonedChildren] = p2(null); + const [element, setElement] = p2(null); + const previousChildren = usePrevious2(children); + if (!children && !clonedChildren && previousChildren) { + setClonedChildren(previousChildren); + } + useIsomorphicLayoutEffect(() => { + if (!element) { + return; + } + const key2 = clonedChildren == null ? void 0 : clonedChildren.key; + const id = clonedChildren == null ? void 0 : clonedChildren.props.id; + if (key2 == null || id == null) { + setClonedChildren(null); + return; + } + Promise.resolve(animation(id, element)).then(() => { + setClonedChildren(null); + }); + }, [animation, clonedChildren, element]); + return _n.createElement(_n.Fragment, null, children, clonedChildren ? ln(clonedChildren, { + ref: setElement + }) : null); +} +var defaultTransform = { + x: 0, + y: 0, + scaleX: 1, + scaleY: 1 +}; +function NullifiedContextProvider(_ref) { + let { + children + } = _ref; + return _n.createElement(InternalContext.Provider, { + value: defaultInternalContext + }, _n.createElement(ActiveDraggableContext.Provider, { + value: defaultTransform + }, children)); +} +var baseStyles = { + position: "fixed", + touchAction: "none" +}; +var defaultTransition = (activatorEvent) => { + const isKeyboardActivator = isKeyboardEvent(activatorEvent); + return isKeyboardActivator ? "transform 250ms ease" : void 0; +}; +var PositionedOverlay = /* @__PURE__ */ N2((_ref, ref) => { + let { + as, + activatorEvent, + adjustScale: adjustScale2, + children, + className, + rect, + style, + transform, + transition = defaultTransition + } = _ref; + if (!rect) { + return null; + } + const scaleAdjustedTransform = adjustScale2 ? transform : { + ...transform, + scaleX: 1, + scaleY: 1 + }; + const styles = { + ...baseStyles, + width: rect.width, + height: rect.height, + top: rect.top, + left: rect.left, + transform: CSS.Transform.toString(scaleAdjustedTransform), + transformOrigin: adjustScale2 && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : void 0, + transition: typeof transition === "function" ? transition(activatorEvent) : transition, + ...style + }; + return _n.createElement(as, { + className, + style: styles, + ref + }, children); +}); +var defaultDropAnimationSideEffects = (options) => (_ref) => { + let { + active, + dragOverlay + } = _ref; + const originalStyles = {}; + const { + styles, + className + } = options; + if (styles != null && styles.active) { + for (const [key2, value] of Object.entries(styles.active)) { + if (value === void 0) { + continue; + } + originalStyles[key2] = active.node.style.getPropertyValue(key2); + active.node.style.setProperty(key2, value); + } + } + if (styles != null && styles.dragOverlay) { + for (const [key2, value] of Object.entries(styles.dragOverlay)) { + if (value === void 0) { + continue; + } + dragOverlay.node.style.setProperty(key2, value); + } + } + if (className != null && className.active) { + active.node.classList.add(className.active); + } + if (className != null && className.dragOverlay) { + dragOverlay.node.classList.add(className.dragOverlay); + } + return function cleanup() { + for (const [key2, value] of Object.entries(originalStyles)) { + active.node.style.setProperty(key2, value); + } + if (className != null && className.active) { + active.node.classList.remove(className.active); + } + }; +}; +var defaultKeyframeResolver = (_ref2) => { + let { + transform: { + initial, + final + } + } = _ref2; + return [{ + transform: CSS.Transform.toString(initial) + }, { + transform: CSS.Transform.toString(final) + }]; +}; +var defaultDropAnimationConfiguration = { + duration: 250, + easing: "ease", + keyframes: defaultKeyframeResolver, + sideEffects: /* @__PURE__ */ defaultDropAnimationSideEffects({ + styles: { + active: { + opacity: "0" + } + } + }) +}; +function useDropAnimation(_ref3) { + let { + config, + draggableNodes, + droppableContainers, + measuringConfiguration + } = _ref3; + return useEvent((id, node) => { + if (config === null) { + return; + } + const activeDraggable = draggableNodes.get(id); + if (!activeDraggable) { + return; + } + const activeNode = activeDraggable.node.current; + if (!activeNode) { + return; + } + const measurableNode = getMeasurableNode(node); + if (!measurableNode) { + return; + } + const { + transform + } = getWindow(node).getComputedStyle(node); + const parsedTransform = parseTransform(transform); + if (!parsedTransform) { + return; + } + const animation = typeof config === "function" ? config : createDefaultDropAnimation(config); + scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure); + return animation({ + active: { + id, + data: activeDraggable.data, + node: activeNode, + rect: measuringConfiguration.draggable.measure(activeNode) + }, + draggableNodes, + dragOverlay: { + node, + rect: measuringConfiguration.dragOverlay.measure(measurableNode) + }, + droppableContainers, + measuringConfiguration, + transform: parsedTransform + }); + }); +} +function createDefaultDropAnimation(options) { + const { + duration, + easing, + sideEffects, + keyframes + } = { + ...defaultDropAnimationConfiguration, + ...options + }; + return (_ref4) => { + let { + active, + dragOverlay, + transform, + ...rest + } = _ref4; + if (!duration) { + return; + } + const delta = { + x: dragOverlay.rect.left - active.rect.left, + y: dragOverlay.rect.top - active.rect.top + }; + const scale = { + scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1, + scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1 + }; + const finalTransform = { + x: transform.x - delta.x, + y: transform.y - delta.y, + ...scale + }; + const animationKeyframes = keyframes({ + ...rest, + active, + dragOverlay, + transform: { + initial: transform, + final: finalTransform + } + }); + const [firstKeyframe] = animationKeyframes; + const lastKeyframe = animationKeyframes[animationKeyframes.length - 1]; + if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) { + return; + } + const cleanup = sideEffects == null ? void 0 : sideEffects({ + active, + dragOverlay, + ...rest + }); + const animation = dragOverlay.node.animate(animationKeyframes, { + duration, + easing, + fill: "forwards" + }); + return new Promise((resolve) => { + animation.onfinish = () => { + cleanup == null ? void 0 : cleanup(); + resolve(); + }; + }); + }; +} +var key = 0; +function useKey(id) { + return F(() => { + if (id == null) { + return; + } + key++; + return key; + }, [id]); +} +var DragOverlay = /* @__PURE__ */ _n.memo((_ref) => { + let { + adjustScale: adjustScale2 = false, + children, + dropAnimation: dropAnimationConfig, + style, + transition, + modifiers, + wrapperElement = "div", + className, + zIndex = 999 + } = _ref; + const { + activatorEvent, + active, + activeNodeRect, + containerNodeRect, + draggableNodes, + droppableContainers, + dragOverlay, + over, + measuringConfiguration, + scrollableAncestors, + scrollableAncestorRects, + windowRect + } = useDndContext(); + const transform = q2(ActiveDraggableContext); + const key2 = useKey(active == null ? void 0 : active.id); + const modifiedTransform = applyModifiers(modifiers, { + activatorEvent, + active, + activeNodeRect, + containerNodeRect, + draggingNodeRect: dragOverlay.rect, + over, + overlayNodeRect: dragOverlay.rect, + scrollableAncestors, + scrollableAncestorRects, + transform, + windowRect + }); + const initialRect = useInitialValue(activeNodeRect); + const dropAnimation = useDropAnimation({ + config: dropAnimationConfig, + draggableNodes, + droppableContainers, + measuringConfiguration + }); + const ref = initialRect ? dragOverlay.setRef : void 0; + return _n.createElement(NullifiedContextProvider, null, _n.createElement(AnimationManager, { + animation: dropAnimation + }, active && key2 ? _n.createElement(PositionedOverlay, { + key: key2, + id: active.id, + ref, + as: wrapperElement, + activatorEvent, + adjustScale: adjustScale2, + className, + transition, + rect: initialRect, + style: { + zIndex, + ...style + }, + transform: modifiedTransform + }, children) : null)); +}); + +// node_modules/@dnd-kit/sortable/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +function useCombinedRefs(...refs) { + return F(() => (node) => { + refs.forEach((ref) => ref(node)); + }, refs); +} +var canUseDOM2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"; +function isWindow2(element) { + const elementString = Object.prototype.toString.call(element); + return elementString === "[object Window]" || elementString === "[object global]"; +} +function isNode3(node) { + return "nodeType" in node; +} +function getWindow2(target) { + var _target$ownerDocument, _target$ownerDocument2; + if (!target) { + return window; + } + if (isWindow2(target)) { + return target; + } + if (!isNode3(target)) { + return window; + } + return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window; +} +var useIsomorphicLayoutEffect2 = canUseDOM2 ? s2 : h2; +var ids2 = {}; +function useUniqueId2(prefix, value) { + return F(() => { + if (value) { + return value; + } + const id = ids2[prefix] == null ? 0 : ids2[prefix] + 1; + ids2[prefix] = id; + return `${prefix}-${id}`; + }, [prefix, value]); +} +function isKeyboardEvent2(event) { + if (!event) { + return false; + } + const { + KeyboardEvent + } = getWindow2(event.target); + return KeyboardEvent && event instanceof KeyboardEvent; +} +var CSS2 = /* @__PURE__ */ Object.freeze({ + Translate: { + toString(transform) { + if (!transform) { + return; + } + const { + x: x5, + y: y4 + } = transform; + return `translate3d(${x5 ? Math.round(x5) : 0}px, ${y4 ? Math.round(y4) : 0}px, 0)`; + } + }, + Scale: { + toString(transform) { + if (!transform) { + return; + } + const { + scaleX, + scaleY + } = transform; + return `scaleX(${scaleX}) scaleY(${scaleY})`; + } + }, + Transform: { + toString(transform) { + if (!transform) { + return; + } + return [CSS2.Translate.toString(transform), CSS2.Scale.toString(transform)].join(" "); + } + }, + Transition: { + toString({ + property, + duration, + easing + }) { + return `${property} ${duration}ms ${easing}`; + } + } +}); + +// node_modules/@dnd-kit/sortable/dist/sortable.esm.js +function arrayMove(array, from, to) { + const newArray = array.slice(); + newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]); + return newArray; +} +function getSortedRects(items, rects) { + return items.reduce((accumulator, id, index) => { + const rect = rects.get(id); + if (rect) { + accumulator[index] = rect; + } + return accumulator; + }, Array(items.length)); +} +function isValidIndex(index) { + return index !== null && index >= 0; +} +function itemsEqual(a6, b4) { + if (a6 === b4) { + return true; + } + if (a6.length !== b4.length) { + return false; + } + for (let i5 = 0; i5 < a6.length; i5++) { + if (a6[i5] !== b4[i5]) { + return false; + } + } + return true; +} +function normalizeDisabled(disabled) { + if (typeof disabled === "boolean") { + return { + draggable: disabled, + droppable: disabled + }; + } + return disabled; +} +var rectSortingStrategy = (_ref) => { + let { + rects, + activeIndex, + overIndex, + index + } = _ref; + const newRects = arrayMove(rects, overIndex, activeIndex); + const oldRect = rects[index]; + const newRect = newRects[index]; + if (!newRect || !oldRect) { + return null; + } + return { + x: newRect.left - oldRect.left, + y: newRect.top - oldRect.top, + scaleX: newRect.width / oldRect.width, + scaleY: newRect.height / oldRect.height + }; +}; +var defaultScale$1 = { + scaleX: 1, + scaleY: 1 +}; +var verticalListSortingStrategy = (_ref) => { + var _rects$activeIndex; + let { + activeIndex, + activeNodeRect: fallbackActiveRect, + index, + rects, + overIndex + } = _ref; + const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect; + if (!activeNodeRect) { + return null; + } + if (index === activeIndex) { + const overIndexRect = rects[overIndex]; + if (!overIndexRect) { + return null; + } + return { + x: 0, + y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top, + ...defaultScale$1 + }; + } + const itemGap = getItemGap$1(rects, index, activeIndex); + if (index > activeIndex && index <= overIndex) { + return { + x: 0, + y: -activeNodeRect.height - itemGap, + ...defaultScale$1 + }; + } + if (index < activeIndex && index >= overIndex) { + return { + x: 0, + y: activeNodeRect.height + itemGap, + ...defaultScale$1 + }; + } + return { + x: 0, + y: 0, + ...defaultScale$1 + }; +}; +function getItemGap$1(clientRects, index, activeIndex) { + const currentRect = clientRects[index]; + const previousRect = clientRects[index - 1]; + const nextRect = clientRects[index + 1]; + if (!currentRect) { + return 0; + } + if (activeIndex < index) { + return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0; + } + return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0; +} +var ID_PREFIX2 = "Sortable"; +var Context = /* @__PURE__ */ _n.createContext({ + activeIndex: -1, + containerId: ID_PREFIX2, + disableTransforms: false, + items: [], + overIndex: -1, + useDragOverlay: false, + sortedRects: [], + strategy: rectSortingStrategy, + disabled: { + draggable: false, + droppable: false + } +}); +function SortableContext(_ref) { + let { + children, + id, + items: userDefinedItems, + strategy = rectSortingStrategy, + disabled: disabledProp = false + } = _ref; + const { + active, + dragOverlay, + droppableRects, + over, + measureDroppableContainers, + measuringScheduled + } = useDndContext(); + const containerId = useUniqueId2(ID_PREFIX2, id); + const useDragOverlay = Boolean(dragOverlay.rect !== null); + const items = F(() => userDefinedItems.map((item) => typeof item === "object" && "id" in item ? item.id : item), [userDefinedItems]); + const isDragging = active != null; + const activeIndex = active ? items.indexOf(active.id) : -1; + const overIndex = over ? items.indexOf(over.id) : -1; + const previousItemsRef = _2(items); + const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current); + const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged; + const disabled = normalizeDisabled(disabledProp); + useIsomorphicLayoutEffect2(() => { + if (itemsHaveChanged && isDragging && !measuringScheduled) { + measureDroppableContainers(items); + } + }, [itemsHaveChanged, items, isDragging, measureDroppableContainers, measuringScheduled]); + h2(() => { + previousItemsRef.current = items; + }, [items]); + const contextValue = F(() => ({ + activeIndex, + containerId, + disabled, + disableTransforms, + items, + overIndex, + useDragOverlay, + sortedRects: getSortedRects(items, droppableRects), + strategy + }), [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]); + return _n.createElement(Context.Provider, { + value: contextValue + }, children); +} +var defaultNewIndexGetter = (_ref) => { + let { + id, + items, + activeIndex, + overIndex + } = _ref; + return arrayMove(items, activeIndex, overIndex).indexOf(id); +}; +var defaultAnimateLayoutChanges = (_ref2) => { + let { + containerId, + isSorting, + wasDragging, + index, + items, + newIndex, + previousItems, + previousContainerId, + transition + } = _ref2; + if (!transition || !wasDragging) { + return false; + } + if (previousItems !== items && index === newIndex) { + return false; + } + if (isSorting) { + return true; + } + return newIndex !== index && containerId === previousContainerId; +}; +var defaultTransition2 = { + duration: 200, + easing: "ease" +}; +var transitionProperty = "transform"; +var disabledTransition = /* @__PURE__ */ CSS2.Transition.toString({ + property: transitionProperty, + duration: 0, + easing: "linear" +}); +var defaultAttributes = { + roleDescription: "sortable" +}; +function useDerivedTransform(_ref) { + let { + disabled, + index, + node, + rect + } = _ref; + const [derivedTransform, setDerivedtransform] = p2(null); + const previousIndex = _2(index); + useIsomorphicLayoutEffect2(() => { + if (!disabled && index !== previousIndex.current && node.current) { + const initial = rect.current; + if (initial) { + const current = getClientRect(node.current, { + ignoreTransform: true + }); + const delta = { + x: initial.left - current.left, + y: initial.top - current.top, + scaleX: initial.width / current.width, + scaleY: initial.height / current.height + }; + if (delta.x || delta.y) { + setDerivedtransform(delta); + } + } + } + if (index !== previousIndex.current) { + previousIndex.current = index; + } + }, [disabled, index, node, rect]); + h2(() => { + if (derivedTransform) { + requestAnimationFrame(() => { + setDerivedtransform(null); + }); + } + }, [derivedTransform]); + return derivedTransform; +} +function useSortable(_ref) { + let { + animateLayoutChanges: animateLayoutChanges2 = defaultAnimateLayoutChanges, + attributes: userDefinedAttributes, + disabled: localDisabled, + data: customData, + getNewIndex = defaultNewIndexGetter, + id, + strategy: localStrategy, + resizeObserverConfig, + transition = defaultTransition2 + } = _ref; + const { + items, + containerId, + activeIndex, + disabled: globalDisabled, + disableTransforms, + sortedRects, + overIndex, + useDragOverlay, + strategy: globalStrategy + } = q2(Context); + const disabled = normalizeLocalDisabled(localDisabled, globalDisabled); + const index = items.indexOf(id); + const data = F(() => ({ + sortable: { + containerId, + index, + items + }, + ...customData + }), [containerId, customData, index, items]); + const itemsAfterCurrentSortable = F(() => items.slice(items.indexOf(id)), [items, id]); + const { + rect, + node, + isOver, + setNodeRef: setDroppableNodeRef + } = useDroppable({ + id, + data, + disabled: disabled.droppable, + resizeObserverConfig: { + updateMeasurementsFor: itemsAfterCurrentSortable, + ...resizeObserverConfig + } + }); + const { + active, + activatorEvent, + activeNodeRect, + attributes, + setNodeRef: setDraggableNodeRef, + listeners, + isDragging, + over, + setActivatorNodeRef, + transform + } = useDraggable({ + id, + data, + attributes: { + ...defaultAttributes, + ...userDefinedAttributes + }, + disabled: disabled.draggable + }); + const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef); + const isSorting = Boolean(active); + const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex); + const shouldDisplaceDragSource = !useDragOverlay && isDragging; + const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null; + const strategy = localStrategy != null ? localStrategy : globalStrategy; + const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({ + rects: sortedRects, + activeNodeRect, + activeIndex, + overIndex, + index + }) : null; + const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({ + id, + items, + activeIndex, + overIndex + }) : index; + const activeId = active == null ? void 0 : active.id; + const previous = _2({ + activeId, + items, + newIndex, + containerId + }); + const itemsHaveChanged = items !== previous.current.items; + const shouldAnimateLayoutChanges = animateLayoutChanges2({ + active, + containerId, + isDragging, + isSorting, + id, + index, + items, + newIndex: previous.current.newIndex, + previousItems: previous.current.items, + previousContainerId: previous.current.containerId, + transition, + wasDragging: previous.current.activeId != null + }); + const derivedTransform = useDerivedTransform({ + disabled: !shouldAnimateLayoutChanges, + index, + node, + rect + }); + h2(() => { + if (isSorting && previous.current.newIndex !== newIndex) { + previous.current.newIndex = newIndex; + } + if (containerId !== previous.current.containerId) { + previous.current.containerId = containerId; + } + if (items !== previous.current.items) { + previous.current.items = items; + } + }, [isSorting, newIndex, containerId, items]); + h2(() => { + if (activeId === previous.current.activeId) { + return; + } + if (activeId && !previous.current.activeId) { + previous.current.activeId = activeId; + return; + } + const timeoutId = setTimeout(() => { + previous.current.activeId = activeId; + }, 50); + return () => clearTimeout(timeoutId); + }, [activeId]); + return { + active, + activeIndex, + attributes, + data, + rect, + index, + newIndex, + items, + isOver, + isSorting, + isDragging, + listeners, + node, + overIndex, + over, + setNodeRef, + setActivatorNodeRef, + setDroppableNodeRef, + setDraggableNodeRef, + transform: derivedTransform != null ? derivedTransform : finalTransform, + transition: getTransition() + }; + function getTransition() { + if (derivedTransform || itemsHaveChanged && previous.current.newIndex === index) { + return disabledTransition; + } + if (shouldDisplaceDragSource && !isKeyboardEvent2(activatorEvent) || !transition) { + return void 0; + } + if (isSorting || shouldAnimateLayoutChanges) { + return CSS2.Transition.toString({ + ...transition, + property: transitionProperty + }); + } + return void 0; + } +} +function normalizeLocalDisabled(localDisabled, globalDisabled) { + var _localDisabled$dragga, _localDisabled$droppa; + if (typeof localDisabled === "boolean") { + return { + draggable: localDisabled, + droppable: false + }; + } + return { + draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable, + droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable + }; +} +var directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left]; + +// src/components/Sidebar/TreeView/FolderTreeView.tsx +var import_classnames2 = __toESM(require_classnames()); + +// src/hooks/useLongPress.tsx +function isMouseEvent(e5) { + return e5 && "screenX" in e5; +} + +// src/components/Sidebar/TreeView/SectionView.tsx +var import_obsidian5 = require("obsidian"); +var import_classnames = __toESM(require_classnames()); +var SectionItem = N2(({ + childCount, + clone, + data, + depth, + disableSelection, + disableInteraction, + ghost, + handleProps, + indentationWidth, + indicator, + collapsed, + onCollapse, + wrapperRef, + plugin, + disabled, + ...props +}, ref) => { + const [sections2, setSections] = Recoil_index_14(sections); + const [focusedFolder2, setFocusedFolder] = Recoil_index_14(focusedFolder); + const section = sections2.find((s10, i5) => { + return i5 == data.section; + }); + const newFolderInSection = () => { + let vaultChangeModal = new VaultChangeModal(plugin, focusedFolder2, "create folder", data.section); + vaultChangeModal.open(); + }; + const newFileInSection = async () => { + const newFile = await createNewMarkdownFile(plugin.app, focusedFolder2, ""); + if (data.section != -1) + updateSections(sections2.map((f5, i5) => { + return i5 == data.section ? { + ...f5, + children: [newFile.path, ...f5.children] + } : f5; + })); + }; + const updateSections = (sections3) => { + plugin.settings.spaces = sections3; + plugin.saveSettings(); + }; + const triggerSectionMenu = (section2, index, e5) => { + const fileMenu = new import_obsidian5.Menu(); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.edit); + menuItem.setIcon("pencil"); + menuItem.onClick((ev) => { + let vaultChangeModal = new SectionChangeModal(plugin, section2, index, "rename"); + vaultChangeModal.open(); + }); + }); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.delete); + menuItem.setIcon("trash"); + menuItem.onClick((ev) => { + updateSections(sections2.filter((s10, i5) => { + return i5 != index; + })); + }); + }); + if (isMouseEvent(e5)) { + fileMenu.showAtPosition({ x: e5.pageX, y: e5.pageY }); + } else { + fileMenu.showAtPosition({ x: e5.nativeEvent.locationX, y: e5.nativeEvent.locationY }); + } + return false; + }; + const triggerVaultMenu = (e5) => { + const fileMenu = new import_obsidian5.Menu(); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.newSection); + menuItem.setIcon("plus"); + menuItem.onClick((ev) => { + let vaultChangeModal = new SectionChangeModal(plugin, "", 0, "create"); + vaultChangeModal.open(); + }); + if (isMouseEvent(e5)) { + fileMenu.showAtPosition({ x: e5.pageX, y: e5.pageY }); + } else { + fileMenu.showAtPosition({ x: e5.nativeEvent.locationX, y: e5.nativeEvent.locationY }); + } + return false; + }); + }; + return /* @__PURE__ */ _n.createElement(_n.Fragment, null, /* @__PURE__ */ _n.createElement("div", { + className: (0, import_classnames.default)("mk-tree-wrapper", "mk-section-wrapper", clone && "mk-clone", ghost && "mk-ghost", disableSelection && "mk-disable-selection", disableInteraction && "mk-disable-interaction"), + ref: wrapperRef, + style: { + "--spacing": `${indentationWidth * depth}px` + }, + ...props + }, /* @__PURE__ */ _n.createElement("div", { + className: (0, import_classnames.default)("mk-section", indicator.state == 2 /* Bottom */ ? "mk-indicator-bottom" : indicator.state == 1 /* Top */ ? "mk-indicator-top" : indicator.state == 3 /* Row */ ? "mk-indicator-row" : "") + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-section-title", + onContextMenu: (e5) => data.section == -1 ? triggerVaultMenu(e5) : triggerSectionMenu(data.name, data.index, e5), + onClick: (e5) => onCollapse(data), + ref, + ...handleProps + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-tree-text" + }, data.id == "/" ? plugin.app.vault.getName() : data.name), /* @__PURE__ */ _n.createElement("div", { + className: `mk-collapse ${collapsed ? "mk-collapsed" : ""}` + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 20 20", + fill: "currentColor", + className: "w-5 h-5" + }, /* @__PURE__ */ _n.createElement("path", { + d: "M6.3 2.841A1.5 1.5 0 004 4.11V15.89a1.5 1.5 0 002.3 1.269l9.344-5.89a1.5 1.5 0 000-2.538L6.3 2.84z" + })))), /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-buttons" + }, /* @__PURE__ */ _n.createElement("button", { + "aria-label": i18n_default.buttons.createFolder, + onClick: () => { + newFolderInSection(); + } + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "24", + height: "24", + viewBox: "0 0 24 24", + fill: "none", + stroke: "currentColor", + "stroke-width": "2", + "stroke-linecap": "round", + "stroke-linejoin": "round" + }, /* @__PURE__ */ _n.createElement("path", { + d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" + }), /* @__PURE__ */ _n.createElement("line", { + x1: "12", + y1: "10", + x2: "12", + y2: "16" + }), /* @__PURE__ */ _n.createElement("line", { + x1: "9", + y1: "13", + x2: "15", + y2: "13" + }))), /* @__PURE__ */ _n.createElement("button", { + "aria-label": i18n_default.buttons.newNote, + onClick: () => { + newFileInSection(); + } + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "24", + height: "24", + viewBox: "0 0 24 24", + fill: "none", + stroke: "currentColor", + "stroke-width": "2", + "stroke-linecap": "round", + "stroke-linejoin": "round" + }, /* @__PURE__ */ _n.createElement("path", { + d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" + }), /* @__PURE__ */ _n.createElement("path", { + d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" + })))))), section && !collapsed && section.children.length == 0 && /* @__PURE__ */ _n.createElement("div", { + className: "mk-tree-empty", + style: { + "--spacing": `${indentationWidth}px` + } + }, "No Notes Inside")); +}); +SectionItem.displayName = "SectionItem"; + +// node_modules/@headlessui/react/dist/utils/ssr.js +var e3 = typeof window == "undefined" || typeof document == "undefined"; + +// node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +var s3 = e3 ? h2 : s2; + +// node_modules/@headlessui/react/dist/hooks/use-latest-value.js +function s4(e5) { + let r6 = _2(e5); + return s3(() => { + r6.current = e5; + }, [e5]), r6; +} + +// node_modules/@headlessui/react/dist/utils/micro-task.js +function t3(e5) { + typeof queueMicrotask == "function" ? queueMicrotask(e5) : Promise.resolve().then(e5).catch((o6) => setTimeout(() => { + throw o6; + })); +} + +// node_modules/@headlessui/react/dist/utils/disposables.js +function m3() { + let n4 = [], i5 = [], r6 = { enqueue(e5) { + i5.push(e5); + }, addEventListener(e5, t4, a6, o6) { + return e5.addEventListener(t4, a6, o6), r6.add(() => e5.removeEventListener(t4, a6, o6)); + }, requestAnimationFrame(...e5) { + let t4 = requestAnimationFrame(...e5); + return r6.add(() => cancelAnimationFrame(t4)); + }, nextFrame(...e5) { + return r6.requestAnimationFrame(() => r6.requestAnimationFrame(...e5)); + }, setTimeout(...e5) { + let t4 = setTimeout(...e5); + return r6.add(() => clearTimeout(t4)); + }, microTask(...e5) { + let t4 = { current: true }; + return t3(() => { + t4.current && e5[0](); + }), r6.add(() => { + t4.current = false; + }); + }, add(e5) { + return n4.push(e5), () => { + let t4 = n4.indexOf(e5); + if (t4 >= 0) { + let [a6] = n4.splice(t4, 1); + a6(); + } + }; + }, dispose() { + for (let e5 of n4.splice(0)) + e5(); + }, async workQueue() { + for (let e5 of i5.splice(0)) + await e5(); + } }; + return r6; +} + +// node_modules/@headlessui/react/dist/hooks/use-disposables.js +function p3() { + let [e5] = p2(m3); + return h2(() => () => e5.dispose(), [e5]), e5; +} + +// node_modules/@headlessui/react/dist/hooks/use-event.js +var o3 = function(t4) { + let e5 = s4(t4); + return _n.useCallback((...r6) => e5.current(...r6), [e5]); +}; + +// node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +var r3 = { serverHandoffComplete: false }; +function a3() { + let [e5, f5] = p2(r3.serverHandoffComplete); + return h2(() => { + e5 !== true && f5(true); + }, [e5]), h2(() => { + r3.serverHandoffComplete === false && (r3.serverHandoffComplete = true); + }, []), e5; +} + +// node_modules/@headlessui/react/dist/hooks/use-id.js +var u3; +var l3 = 0; +function r4() { + return ++l3; +} +var I3 = (u3 = _n.useId) != null ? u3 : function() { + let n4 = a3(), [e5, o6] = _n.useState(n4 ? r4 : null); + return s3(() => { + e5 === null && o6(r4()); + }, [e5]), e5 != null ? "" + e5 : void 0; +}; + +// node_modules/@headlessui/react/dist/utils/match.js +function u4(r6, n4, ...a6) { + if (r6 in n4) { + let e5 = n4[r6]; + return typeof e5 == "function" ? e5(...a6) : e5; + } + let t4 = new Error(`Tried to handle "${r6}" but there is no handler defined. Only defined handlers are: ${Object.keys(n4).map((e5) => `"${e5}"`).join(", ")}.`); + throw Error.captureStackTrace && Error.captureStackTrace(t4, u4), t4; +} + +// node_modules/@headlessui/react/dist/utils/owner.js +function e4(r6) { + return e3 ? null : r6 instanceof Node ? r6.ownerDocument : r6 != null && r6.hasOwnProperty("current") && r6.current instanceof Node ? r6.current.ownerDocument : document; +} + +// node_modules/@headlessui/react/dist/utils/focus-management.js +var m4 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e5) => `${e5}:not([tabindex='-1'])`).join(","); +var T5 = ((n4) => (n4[n4.First = 1] = "First", n4[n4.Previous = 2] = "Previous", n4[n4.Next = 4] = "Next", n4[n4.Last = 8] = "Last", n4[n4.WrapAround = 16] = "WrapAround", n4[n4.NoScroll = 32] = "NoScroll", n4))(T5 || {}); +var M3 = ((o6) => (o6[o6.Error = 0] = "Error", o6[o6.Overflow = 1] = "Overflow", o6[o6.Success = 2] = "Success", o6[o6.Underflow = 3] = "Underflow", o6))(M3 || {}); +var b3 = ((r6) => (r6[r6.Previous = -1] = "Previous", r6[r6.Next = 1] = "Next", r6))(b3 || {}); +function d3(e5 = document.body) { + return e5 == null ? [] : Array.from(e5.querySelectorAll(m4)); +} +var N3 = ((r6) => (r6[r6.Strict = 0] = "Strict", r6[r6.Loose = 1] = "Loose", r6))(N3 || {}); +function F3(e5, t4 = 0) { + var r6; + return e5 === ((r6 = e4(e5)) == null ? void 0 : r6.body) ? false : u4(t4, { [0]() { + return e5.matches(m4); + }, [1]() { + let l4 = e5; + for (; l4 !== null; ) { + if (l4.matches(m4)) + return true; + l4 = l4.parentElement; + } + return false; + } }); +} +function I4(e5) { + let t4 = e4(e5); + m3().nextFrame(() => { + t4 && !F3(t4.activeElement, 0) && h3(e5); + }); +} +function h3(e5) { + e5 == null || e5.focus({ preventScroll: true }); +} +var w4 = ["textarea", "input"].join(","); +function H3(e5) { + var t4, r6; + return (r6 = (t4 = e5 == null ? void 0 : e5.matches) == null ? void 0 : t4.call(e5, w4)) != null ? r6 : false; +} +function S2(e5, t4 = (r6) => r6) { + return e5.slice().sort((r6, l4) => { + let o6 = t4(r6), s10 = t4(l4); + if (o6 === null || s10 === null) + return 0; + let n4 = o6.compareDocumentPosition(s10); + return n4 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n4 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0; + }); +} +function D2(e5, t4) { + return O3(d3(), t4, true, e5); +} +function O3(e5, t4, r6 = true, l4 = null) { + let o6 = Array.isArray(e5) ? e5.length > 0 ? e5[0].ownerDocument : document : e5.ownerDocument, s10 = Array.isArray(e5) ? r6 ? S2(e5) : e5 : d3(e5); + l4 = l4 != null ? l4 : o6.activeElement; + let n4 = (() => { + if (t4 & 5) + return 1; + if (t4 & 10) + return -1; + throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); + })(), E3 = (() => { + if (t4 & 1) + return 0; + if (t4 & 2) + return Math.max(0, s10.indexOf(l4)) - 1; + if (t4 & 4) + return Math.max(0, s10.indexOf(l4)) + 1; + if (t4 & 8) + return s10.length - 1; + throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); + })(), x5 = t4 & 32 ? { preventScroll: true } : {}, f5 = 0, i5 = s10.length, u6; + do { + if (f5 >= i5 || f5 + i5 <= 0) + return 0; + let a6 = E3 + f5; + if (t4 & 16) + a6 = (a6 + i5) % i5; + else { + if (a6 < 0) + return 3; + if (a6 >= i5) + return 1; + } + u6 = s10[a6], u6 == null || u6.focus(x5), f5 += n4; + } while (u6 !== o6.activeElement); + return t4 & 6 && H3(u6) && u6.select(), u6.hasAttribute("tabindex") || u6.setAttribute("tabindex", "0"), 2; +} + +// node_modules/@headlessui/react/dist/hooks/use-document-event.js +function d4(e5, r6, n4) { + let o6 = s4(r6); + h2(() => { + function t4(u6) { + o6.current(u6); + } + return document.addEventListener(e5, t4, n4), () => document.removeEventListener(e5, t4, n4); + }, [e5, n4]); +} + +// node_modules/@headlessui/react/dist/hooks/use-outside-click.js +function L3(s10, E3, a6 = true) { + let i5 = _2(false); + h2(() => { + requestAnimationFrame(() => { + i5.current = a6; + }); + }, [a6]); + function f5(e5, l4) { + if (!i5.current || e5.defaultPrevented) + return; + let o6 = function r6(t4) { + return typeof t4 == "function" ? r6(t4()) : Array.isArray(t4) || t4 instanceof Set ? t4 : [t4]; + }(s10), n4 = l4(e5); + if (n4 !== null && !!n4.ownerDocument.documentElement.contains(n4)) { + for (let r6 of o6) { + if (r6 === null) + continue; + let t4 = r6 instanceof HTMLElement ? r6 : r6.current; + if (t4 != null && t4.contains(n4)) + return; + } + return !F3(n4, N3.Loose) && n4.tabIndex !== -1 && e5.preventDefault(), E3(e5, n4); + } + } + let u6 = _2(null); + d4("mousedown", (e5) => { + var l4, o6; + i5.current && (u6.current = ((o6 = (l4 = e5.composedPath) == null ? void 0 : l4.call(e5)) == null ? void 0 : o6[0]) || e5.target); + }, true), d4("click", (e5) => { + !u6.current || (f5(e5, () => u6.current), u6.current = null); + }, true), d4("blur", (e5) => f5(e5, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true); +} + +// node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +function i3(t4) { + var n4; + if (t4.type) + return t4.type; + let e5 = (n4 = t4.as) != null ? n4 : "button"; + if (typeof e5 == "string" && e5.toLowerCase() === "button") + return "button"; +} +function s5(t4, e5) { + let [n4, u6] = p2(() => i3(t4)); + return s3(() => { + u6(i3(t4)); + }, [t4.type, t4.as]), s3(() => { + n4 || !e5.current || e5.current instanceof HTMLButtonElement && !e5.current.hasAttribute("type") && u6("button"); + }, [n4, e5]), n4; +} + +// node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +var u5 = Symbol(); +function T6(t4, n4 = true) { + return Object.assign(t4, { [u5]: n4 }); +} +function y3(...t4) { + let n4 = _2(t4); + h2(() => { + n4.current = t4; + }, [t4]); + let c3 = o3((e5) => { + for (let o6 of n4.current) + o6 != null && (typeof o6 == "function" ? o6(e5) : o6.current = e5); + }); + return t4.every((e5) => e5 == null || (e5 == null ? void 0 : e5[u5])) ? void 0 : c3; +} + +// node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +function F4({ container: e5, accept: t4, walk: r6, enabled: c3 = true }) { + let o6 = _2(t4), l4 = _2(r6); + h2(() => { + o6.current = t4, l4.current = r6; + }, [t4, r6]), s3(() => { + if (!e5 || !c3) + return; + let n4 = e4(e5); + if (!n4) + return; + let f5 = o6.current, p6 = l4.current, d5 = Object.assign((i5) => f5(i5), { acceptNode: f5 }), u6 = n4.createTreeWalker(e5, NodeFilter.SHOW_ELEMENT, d5, false); + for (; u6.nextNode(); ) + p6(u6.currentNode); + }, [e5, c3, o6, l4]); +} + +// node_modules/@headlessui/react/dist/utils/calculate-active-index.js +function f4(r6) { + throw new Error("Unexpected object: " + r6); +} +var a4 = ((e5) => (e5[e5.First = 0] = "First", e5[e5.Previous = 1] = "Previous", e5[e5.Next = 2] = "Next", e5[e5.Last = 3] = "Last", e5[e5.Specific = 4] = "Specific", e5[e5.Nothing = 5] = "Nothing", e5))(a4 || {}); +function x4(r6, n4) { + let t4 = n4.resolveItems(); + if (t4.length <= 0) + return null; + let l4 = n4.resolveActiveIndex(), s10 = l4 != null ? l4 : -1, d5 = (() => { + switch (r6.focus) { + case 0: + return t4.findIndex((e5) => !n4.resolveDisabled(e5)); + case 1: { + let e5 = t4.slice().reverse().findIndex((i5, c3, u6) => s10 !== -1 && u6.length - c3 - 1 >= s10 ? false : !n4.resolveDisabled(i5)); + return e5 === -1 ? e5 : t4.length - 1 - e5; + } + case 2: + return t4.findIndex((e5, i5) => i5 <= s10 ? false : !n4.resolveDisabled(e5)); + case 3: { + let e5 = t4.slice().reverse().findIndex((i5) => !n4.resolveDisabled(i5)); + return e5 === -1 ? e5 : t4.length - 1 - e5; + } + case 4: + return t4.findIndex((e5) => n4.resolveId(e5) === r6.id); + case 5: + return null; + default: + f4(r6); + } + })(); + return d5 === -1 ? l4 : d5; +} + +// node_modules/@headlessui/react/dist/utils/render.js +var S3 = ((a6) => (a6[a6.None = 0] = "None", a6[a6.RenderStrategy = 1] = "RenderStrategy", a6[a6.Static = 2] = "Static", a6))(S3 || {}); +var j4 = ((e5) => (e5[e5.Unmount = 0] = "Unmount", e5[e5.Hidden = 1] = "Hidden", e5))(j4 || {}); +function $3({ ourProps: r6, theirProps: t4, slot: e5, defaultTag: a6, features: o6, visible: n4 = true, name: l4 }) { + let s10 = T7(t4, r6); + if (n4) + return p4(s10, e5, a6, l4); + let u6 = o6 != null ? o6 : 0; + if (u6 & 2) { + let { static: i5 = false, ...d5 } = s10; + if (i5) + return p4(d5, e5, a6, l4); + } + if (u6 & 1) { + let { unmount: i5 = true, ...d5 } = s10; + return u4(i5 ? 0 : 1, { [0]() { + return null; + }, [1]() { + return p4({ ...d5, hidden: true, style: { display: "none" } }, e5, a6, l4); + } }); + } + return p4(s10, e5, a6, l4); +} +function p4(r6, t4 = {}, e5, a6) { + let { as: o6 = e5, children: n4, refName: l4 = "ref", ...s10 } = m5(r6, ["unmount", "static"]), u6 = r6.ref !== void 0 ? { [l4]: r6.ref } : {}, i5 = typeof n4 == "function" ? n4(t4) : n4; + s10.className && typeof s10.className == "function" && (s10.className = s10.className(t4)); + let d5 = {}; + if (t4) { + let f5 = false, y4 = []; + for (let [h5, g4] of Object.entries(t4)) + typeof g4 == "boolean" && (f5 = true), g4 === true && y4.push(h5); + f5 && (d5["data-headlessui-state"] = y4.join(" ")); + } + if (o6 === p && Object.keys(F5(s10)).length > 0) { + if (!on(i5) || Array.isArray(i5) && i5.length > 1) + throw new Error(['Passing props on "Fragment"!', "", `The current component <${a6} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(s10).map((f5) => ` - ${f5}`).join(` +`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((f5) => ` - ${f5}`).join(` +`)].join(` +`)); + return ln(i5, Object.assign({}, T7(i5.props, F5(m5(s10, ["ref"]))), d5, u6, w5(i5.ref, u6.ref))); + } + return h(o6, Object.assign({}, m5(s10, ["ref"]), o6 !== p && u6, o6 !== p && d5), i5); +} +function w5(...r6) { + return { ref: r6.every((t4) => t4 == null) ? void 0 : (t4) => { + for (let e5 of r6) + e5 != null && (typeof e5 == "function" ? e5(t4) : e5.current = t4); + } }; +} +function T7(...r6) { + var a6; + if (r6.length === 0) + return {}; + if (r6.length === 1) + return r6[0]; + let t4 = {}, e5 = {}; + for (let o6 of r6) + for (let n4 in o6) + n4.startsWith("on") && typeof o6[n4] == "function" ? ((a6 = e5[n4]) != null || (e5[n4] = []), e5[n4].push(o6[n4])) : t4[n4] = o6[n4]; + if (t4.disabled || t4["aria-disabled"]) + return Object.assign(t4, Object.fromEntries(Object.keys(e5).map((o6) => [o6, void 0]))); + for (let o6 in e5) + Object.assign(t4, { [o6](n4, ...l4) { + let s10 = e5[o6]; + for (let u6 of s10) { + if ((n4 instanceof Event || (n4 == null ? void 0 : n4.nativeEvent) instanceof Event) && n4.defaultPrevented) + return; + u6(n4, ...l4); + } + } }); + return t4; +} +function C3(r6) { + var t4; + return Object.assign(N2(r6), { displayName: (t4 = r6.displayName) != null ? t4 : r6.name }); +} +function F5(r6) { + let t4 = Object.assign({}, r6); + for (let e5 in t4) + t4[e5] === void 0 && delete t4[e5]; + return t4; +} +function m5(r6, t4 = []) { + let e5 = Object.assign({}, r6); + for (let a6 of t4) + a6 in e5 && delete e5[a6]; + return e5; +} + +// node_modules/@headlessui/react/dist/utils/bugs.js +function r5(n4) { + let e5 = n4.parentElement, l4 = null; + for (; e5 && !(e5 instanceof HTMLFieldSetElement); ) + e5 instanceof HTMLLegendElement && (l4 = e5), e5 = e5.parentElement; + let t4 = (e5 == null ? void 0 : e5.getAttribute("disabled")) === ""; + return t4 && i4(l4) ? false : t4; +} +function i4(n4) { + if (!n4) + return false; + let e5 = n4.previousElementSibling; + for (; e5 !== null; ) { + if (e5 instanceof HTMLLegendElement) + return false; + e5 = e5.previousElementSibling; + } + return true; +} + +// node_modules/@headlessui/react/dist/internal/hidden.js +var a5 = "div"; +var s6 = ((e5) => (e5[e5.None = 1] = "None", e5[e5.Focusable = 2] = "Focusable", e5[e5.Hidden = 4] = "Hidden", e5))(s6 || {}); +var h4 = C3(function(t4, o6) { + let { features: e5 = 1, ...r6 } = t4, d5 = { ref: o6, "aria-hidden": (e5 & 2) === 2 ? true : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(e5 & 4) === 4 && (e5 & 2) !== 2 && { display: "none" } } }; + return $3({ ourProps: d5, theirProps: r6, slot: {}, defaultTag: a5, name: "Hidden" }); +}); + +// node_modules/@headlessui/react/dist/internal/open-closed.js +var o4 = B(null); +o4.displayName = "OpenClosedContext"; +var p5 = ((e5) => (e5[e5.Open = 0] = "Open", e5[e5.Closed = 1] = "Closed", e5))(p5 || {}); +function s7() { + return q2(o4); +} +function C4({ value: t4, children: n4 }) { + return _n.createElement(o4.Provider, { value: t4 }, n4); +} + +// node_modules/@headlessui/react/dist/components/keyboard.js +var o5 = ((r6) => (r6.Space = " ", r6.Enter = "Enter", r6.Escape = "Escape", r6.Backspace = "Backspace", r6.Delete = "Delete", r6.ArrowLeft = "ArrowLeft", r6.ArrowUp = "ArrowUp", r6.ArrowRight = "ArrowRight", r6.ArrowDown = "ArrowDown", r6.Home = "Home", r6.End = "End", r6.PageUp = "PageUp", r6.PageDown = "PageDown", r6.Tab = "Tab", r6))(o5 || {}); + +// node_modules/@headlessui/react/dist/hooks/use-window-event.js +function s8(e5, r6, n4) { + let o6 = s4(r6); + h2(() => { + function t4(i5) { + o6.current(i5); + } + return window.addEventListener(e5, t4, n4), () => window.removeEventListener(e5, t4, n4); + }, [e5, n4]); +} + +// node_modules/@headlessui/react/dist/hooks/use-tab-direction.js +var s9 = ((r6) => (r6[r6.Forwards = 0] = "Forwards", r6[r6.Backwards = 1] = "Backwards", r6))(s9 || {}); +function n2() { + let e5 = _2(0); + return s8("keydown", (o6) => { + o6.key === "Tab" && (e5.current = o6.shiftKey ? 1 : 0); + }, true), e5; +} + +// node_modules/@headlessui/react/dist/hooks/use-owner.js +function n3(...e5) { + return F(() => e4(...e5), [...e5]); +} + +// node_modules/@headlessui/react/dist/hooks/use-event-listener.js +function E2(n4, e5, a6, t4) { + let i5 = s4(a6); + h2(() => { + n4 = n4 != null ? n4 : window; + function r6(o6) { + i5.current(o6); + } + return n4.addEventListener(e5, r6, t4), () => n4.removeEventListener(e5, r6, t4); + }, [n4, e5, t4]); +} + +// node_modules/@headlessui/react/dist/components/menu/menu.js +var ue = ((o6) => (o6[o6.Open = 0] = "Open", o6[o6.Closed = 1] = "Closed", o6))(ue || {}); +var se = ((o6) => (o6[o6.Pointer = 0] = "Pointer", o6[o6.Other = 1] = "Other", o6))(se || {}); +var le = ((a6) => (a6[a6.OpenMenu = 0] = "OpenMenu", a6[a6.CloseMenu = 1] = "CloseMenu", a6[a6.GoToItem = 2] = "GoToItem", a6[a6.Search = 3] = "Search", a6[a6.ClearSearch = 4] = "ClearSearch", a6[a6.RegisterItem = 5] = "RegisterItem", a6[a6.UnregisterItem = 6] = "UnregisterItem", a6))(le || {}); +function k4(t4, i5 = (o6) => o6) { + let o6 = t4.activeItemIndex !== null ? t4.items[t4.activeItemIndex] : null, e5 = S2(i5(t4.items.slice()), (u6) => u6.dataRef.current.domRef.current), n4 = o6 ? e5.indexOf(o6) : null; + return n4 === -1 && (n4 = null), { items: e5, activeItemIndex: n4 }; +} +var ce = { [1](t4) { + return t4.menuState === 1 ? t4 : { ...t4, activeItemIndex: null, menuState: 1 }; +}, [0](t4) { + return t4.menuState === 0 ? t4 : { ...t4, menuState: 0 }; +}, [2]: (t4, i5) => { + var n4; + let o6 = k4(t4), e5 = x4(i5, { resolveItems: () => o6.items, resolveActiveIndex: () => o6.activeItemIndex, resolveId: (u6) => u6.id, resolveDisabled: (u6) => u6.dataRef.current.disabled }); + return { ...t4, ...o6, searchQuery: "", activeItemIndex: e5, activationTrigger: (n4 = i5.trigger) != null ? n4 : 1 }; +}, [3]: (t4, i5) => { + let e5 = t4.searchQuery !== "" ? 0 : 1, n4 = t4.searchQuery + i5.value.toLowerCase(), s10 = (t4.activeItemIndex !== null ? t4.items.slice(t4.activeItemIndex + e5).concat(t4.items.slice(0, t4.activeItemIndex + e5)) : t4.items).find((c3) => { + var p6; + return ((p6 = c3.dataRef.current.textValue) == null ? void 0 : p6.startsWith(n4)) && !c3.dataRef.current.disabled; + }), a6 = s10 ? t4.items.indexOf(s10) : -1; + return a6 === -1 || a6 === t4.activeItemIndex ? { ...t4, searchQuery: n4 } : { ...t4, searchQuery: n4, activeItemIndex: a6, activationTrigger: 1 }; +}, [4](t4) { + return t4.searchQuery === "" ? t4 : { ...t4, searchQuery: "", searchActiveItemIndex: null }; +}, [5]: (t4, i5) => { + let o6 = k4(t4, (e5) => [...e5, { id: i5.id, dataRef: i5.dataRef }]); + return { ...t4, ...o6 }; +}, [6]: (t4, i5) => { + let o6 = k4(t4, (e5) => { + let n4 = e5.findIndex((u6) => u6.id === i5.id); + return n4 !== -1 && e5.splice(n4, 1), e5; + }); + return { ...t4, ...o6, activationTrigger: 1 }; +} }; +var w6 = B(null); +w6.displayName = "MenuContext"; +function D3(t4) { + let i5 = q2(w6); + if (i5 === null) { + let o6 = new Error(`<${t4} /> is missing a parent component.`); + throw Error.captureStackTrace && Error.captureStackTrace(o6, D3), o6; + } + return i5; +} +function pe(t4, i5) { + return u4(i5.type, ce, t4, i5); +} +var me = p; +var de = C3(function(i5, o6) { + let e5 = y2(pe, { menuState: 1, buttonRef: y(), itemsRef: y(), items: [], searchQuery: "", activeItemIndex: null, activationTrigger: 1 }), [{ menuState: n4, itemsRef: u6, buttonRef: s10 }, a6] = e5, c3 = y3(o6); + L3([s10, u6], (M4, R2) => { + var f5; + a6({ type: 1 }), F3(R2, N3.Loose) || (M4.preventDefault(), (f5 = s10.current) == null || f5.focus()); + }, n4 === 0); + let p6 = F(() => ({ open: n4 === 0 }), [n4]), g4 = i5, d5 = { ref: c3 }; + return _n.createElement(w6.Provider, { value: e5 }, _n.createElement(C4, { value: u4(n4, { [0]: p5.Open, [1]: p5.Closed }) }, $3({ ourProps: d5, theirProps: g4, slot: p6, defaultTag: me, name: "Menu" }))); +}); +var fe = "button"; +var Te = C3(function(i5, o6) { + var f5; + let [e5, n4] = D3("Menu.Button"), u6 = y3(e5.buttonRef, o6), s10 = `headlessui-menu-button-${I3()}`, a6 = p3(), c3 = o3((l4) => { + switch (l4.key) { + case o5.Space: + case o5.Enter: + case o5.ArrowDown: + l4.preventDefault(), l4.stopPropagation(), n4({ type: 0 }), a6.nextFrame(() => n4({ type: 2, focus: a4.First })); + break; + case o5.ArrowUp: + l4.preventDefault(), l4.stopPropagation(), n4({ type: 0 }), a6.nextFrame(() => n4({ type: 2, focus: a4.Last })); + break; + } + }), p6 = o3((l4) => { + switch (l4.key) { + case o5.Space: + l4.preventDefault(); + break; + } + }), g4 = o3((l4) => { + if (r5(l4.currentTarget)) + return l4.preventDefault(); + i5.disabled || (e5.menuState === 0 ? (n4({ type: 1 }), a6.nextFrame(() => { + var b4; + return (b4 = e5.buttonRef.current) == null ? void 0 : b4.focus({ preventScroll: true }); + })) : (l4.preventDefault(), n4({ type: 0 }))); + }), d5 = F(() => ({ open: e5.menuState === 0 }), [e5]), M4 = i5, R2 = { ref: u6, id: s10, type: s5(i5, e5.buttonRef), "aria-haspopup": true, "aria-controls": (f5 = e5.itemsRef.current) == null ? void 0 : f5.id, "aria-expanded": i5.disabled ? void 0 : e5.menuState === 0, onKeyDown: c3, onKeyUp: p6, onClick: g4 }; + return $3({ ourProps: R2, theirProps: M4, slot: d5, defaultTag: fe, name: "Menu.Button" }); +}); +var ye = "div"; +var Ie = S3.RenderStrategy | S3.Static; +var ge = C3(function(i5, o6) { + var b4, C5; + let [e5, n4] = D3("Menu.Items"), u6 = y3(e5.itemsRef, o6), s10 = n3(e5.itemsRef), a6 = `headlessui-menu-items-${I3()}`, c3 = p3(), p6 = s7(), g4 = (() => p6 !== null ? p6 === p5.Open : e5.menuState === 0)(); + h2(() => { + let r6 = e5.itemsRef.current; + !r6 || e5.menuState === 0 && r6 !== (s10 == null ? void 0 : s10.activeElement) && r6.focus({ preventScroll: true }); + }, [e5.menuState, e5.itemsRef, s10]), F4({ container: e5.itemsRef.current, enabled: e5.menuState === 0, accept(r6) { + return r6.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : r6.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT; + }, walk(r6) { + r6.setAttribute("role", "none"); + } }); + let d5 = o3((r6) => { + var T8, A4; + switch (c3.dispose(), r6.key) { + case o5.Space: + if (e5.searchQuery !== "") + return r6.preventDefault(), r6.stopPropagation(), n4({ type: 3, value: r6.key }); + case o5.Enter: + if (r6.preventDefault(), r6.stopPropagation(), n4({ type: 1 }), e5.activeItemIndex !== null) { + let { dataRef: v3 } = e5.items[e5.activeItemIndex]; + (A4 = (T8 = v3.current) == null ? void 0 : T8.domRef.current) == null || A4.click(); + } + I4(e5.buttonRef.current); + break; + case o5.ArrowDown: + return r6.preventDefault(), r6.stopPropagation(), n4({ type: 2, focus: a4.Next }); + case o5.ArrowUp: + return r6.preventDefault(), r6.stopPropagation(), n4({ type: 2, focus: a4.Previous }); + case o5.Home: + case o5.PageUp: + return r6.preventDefault(), r6.stopPropagation(), n4({ type: 2, focus: a4.First }); + case o5.End: + case o5.PageDown: + return r6.preventDefault(), r6.stopPropagation(), n4({ type: 2, focus: a4.Last }); + case o5.Escape: + r6.preventDefault(), r6.stopPropagation(), n4({ type: 1 }), m3().nextFrame(() => { + var v3; + return (v3 = e5.buttonRef.current) == null ? void 0 : v3.focus({ preventScroll: true }); + }); + break; + case o5.Tab: + r6.preventDefault(), r6.stopPropagation(), n4({ type: 1 }), m3().nextFrame(() => { + D2(e5.buttonRef.current, r6.shiftKey ? T5.Previous : T5.Next); + }); + break; + default: + r6.key.length === 1 && (n4({ type: 3, value: r6.key }), c3.setTimeout(() => n4({ type: 4 }), 350)); + break; + } + }), M4 = o3((r6) => { + switch (r6.key) { + case o5.Space: + r6.preventDefault(); + break; + } + }), R2 = F(() => ({ open: e5.menuState === 0 }), [e5]), f5 = i5, l4 = { "aria-activedescendant": e5.activeItemIndex === null || (b4 = e5.items[e5.activeItemIndex]) == null ? void 0 : b4.id, "aria-labelledby": (C5 = e5.buttonRef.current) == null ? void 0 : C5.id, id: a6, onKeyDown: d5, onKeyUp: M4, role: "menu", tabIndex: 0, ref: u6 }; + return $3({ ourProps: l4, theirProps: f5, slot: R2, defaultTag: ye, features: Ie, visible: g4, name: "Menu.Items" }); +}); +var Me = p; +var Re = C3(function(i5, o6) { + let { disabled: e5 = false, ...n4 } = i5, [u6, s10] = D3("Menu.Item"), a6 = `headlessui-menu-item-${I3()}`, c3 = u6.activeItemIndex !== null ? u6.items[u6.activeItemIndex].id === a6 : false, p6 = _2(null), g4 = y3(o6, p6); + s3(() => { + if (u6.menuState !== 0 || !c3 || u6.activationTrigger === 0) + return; + let r6 = m3(); + return r6.requestAnimationFrame(() => { + var T8, A4; + (A4 = (T8 = p6.current) == null ? void 0 : T8.scrollIntoView) == null || A4.call(T8, { block: "nearest" }); + }), r6.dispose; + }, [p6, c3, u6.menuState, u6.activationTrigger, u6.activeItemIndex]); + let d5 = _2({ disabled: e5, domRef: p6 }); + s3(() => { + d5.current.disabled = e5; + }, [d5, e5]), s3(() => { + var r6, T8; + d5.current.textValue = (T8 = (r6 = p6.current) == null ? void 0 : r6.textContent) == null ? void 0 : T8.toLowerCase(); + }, [d5, p6]), s3(() => (s10({ type: 5, id: a6, dataRef: d5 }), () => s10({ type: 6, id: a6 })), [d5, a6]); + let M4 = o3((r6) => { + if (e5) + return r6.preventDefault(); + s10({ type: 1 }), I4(u6.buttonRef.current); + }), R2 = o3(() => { + if (e5) + return s10({ type: 2, focus: a4.Nothing }); + s10({ type: 2, focus: a4.Specific, id: a6 }); + }), f5 = o3(() => { + e5 || c3 || s10({ type: 2, focus: a4.Specific, id: a6, trigger: 0 }); + }), l4 = o3(() => { + e5 || !c3 || s10({ type: 2, focus: a4.Nothing }); + }), b4 = F(() => ({ active: c3, disabled: e5 }), [c3, e5]); + return $3({ ourProps: { id: a6, ref: g4, role: "menuitem", tabIndex: e5 === true ? void 0 : -1, "aria-disabled": e5 === true ? true : void 0, disabled: void 0, onClick: M4, onFocus: R2, onPointerMove: f5, onMouseMove: f5, onPointerLeave: l4, onMouseLeave: l4 }, theirProps: n4, slot: b4, defaultTag: Me, name: "Menu.Item" }); +}); +var qe = Object.assign(de, { Button: Te, Items: ge, Item: Re }); + +// node_modules/@headlessui/react/dist/components/popover/popover.js +var Ae = ((f5) => (f5[f5.Open = 0] = "Open", f5[f5.Closed = 1] = "Closed", f5))(Ae || {}); +var Ce = ((n4) => (n4[n4.TogglePopover = 0] = "TogglePopover", n4[n4.ClosePopover = 1] = "ClosePopover", n4[n4.SetButton = 2] = "SetButton", n4[n4.SetButtonId = 3] = "SetButtonId", n4[n4.SetPanel = 4] = "SetPanel", n4[n4.SetPanelId = 5] = "SetPanelId", n4))(Ce || {}); +var Re2 = { [0]: (r6) => ({ ...r6, popoverState: u4(r6.popoverState, { [0]: 1, [1]: 0 }) }), [1](r6) { + return r6.popoverState === 1 ? r6 : { ...r6, popoverState: 1 }; +}, [2](r6, t4) { + return r6.button === t4.button ? r6 : { ...r6, button: t4.button }; +}, [3](r6, t4) { + return r6.buttonId === t4.buttonId ? r6 : { ...r6, buttonId: t4.buttonId }; +}, [4](r6, t4) { + return r6.panel === t4.panel ? r6 : { ...r6, panel: t4.panel }; +}, [5](r6, t4) { + return r6.panelId === t4.panelId ? r6 : { ...r6, panelId: t4.panelId }; +} }; +var te = B(null); +te.displayName = "PopoverContext"; +function Q2(r6) { + let t4 = q2(te); + if (t4 === null) { + let f5 = new Error(`<${r6} /> is missing a parent component.`); + throw Error.captureStackTrace && Error.captureStackTrace(f5, Q2), f5; + } + return t4; +} +var oe = B(null); +oe.displayName = "PopoverAPIContext"; +function re(r6) { + let t4 = q2(oe); + if (t4 === null) { + let f5 = new Error(`<${r6} /> is missing a parent component.`); + throw Error.captureStackTrace && Error.captureStackTrace(f5, re), f5; + } + return t4; +} +var ne = B(null); +ne.displayName = "PopoverGroupContext"; +function ce2() { + return q2(ne); +} +var le2 = B(null); +le2.displayName = "PopoverPanelContext"; +function Oe() { + return q2(le2); +} +function Me2(r6, t4) { + return u4(t4.type, Re2, r6, t4); +} +var Le = "div"; +var Ie2 = C3(function(t4, f5) { + var O4; + let o6 = `headlessui-popover-button-${I3()}`, v3 = `headlessui-popover-panel-${I3()}`, a6 = _2(null), n4 = y3(f5, T6((e5) => { + a6.current = e5; + })), g4 = y2(Me2, { popoverState: 1, button: null, buttonId: o6, panel: null, panelId: v3, beforePanelSentinel: y(), afterPanelSentinel: y() }), [{ popoverState: y4, button: l4, panel: P3, beforePanelSentinel: s10, afterPanelSentinel: B4 }, i5] = g4, T8 = n3((O4 = a6.current) != null ? O4 : l4); + h2(() => i5({ type: 3, buttonId: o6 }), [o6, i5]), h2(() => i5({ type: 5, panelId: v3 }), [v3, i5]); + let c3 = F(() => { + if (!l4 || !P3) + return false; + for (let M4 of document.querySelectorAll("body > *")) + if (Number(M4 == null ? void 0 : M4.contains(l4)) ^ Number(M4 == null ? void 0 : M4.contains(P3))) + return true; + let e5 = d3(), p6 = e5.indexOf(l4), m6 = (p6 + e5.length - 1) % e5.length, C5 = (p6 + 1) % e5.length, D4 = e5[m6], V3 = e5[C5]; + return !P3.contains(D4) && !P3.contains(V3); + }, [l4, P3]), d5 = F(() => ({ buttonId: o6, panelId: v3, close: () => i5({ type: 1 }) }), [o6, v3, i5]), E3 = ce2(), A4 = E3 == null ? void 0 : E3.registerPopover, L4 = o3(() => { + var e5; + return (e5 = E3 == null ? void 0 : E3.isFocusWithinPopoverGroup()) != null ? e5 : (T8 == null ? void 0 : T8.activeElement) && ((l4 == null ? void 0 : l4.contains(T8.activeElement)) || (P3 == null ? void 0 : P3.contains(T8.activeElement))); + }); + h2(() => A4 == null ? void 0 : A4(d5), [A4, d5]), E2(T8 == null ? void 0 : T8.defaultView, "focus", (e5) => { + var p6, m6, C5, D4; + y4 === 0 && (L4() || !l4 || !P3 || (m6 = (p6 = s10.current) == null ? void 0 : p6.contains) != null && m6.call(p6, e5.target) || (D4 = (C5 = B4.current) == null ? void 0 : C5.contains) != null && D4.call(C5, e5.target) || i5({ type: 1 })); + }, true), L3([l4, P3], (e5, p6) => { + i5({ type: 1 }), F3(p6, N3.Loose) || (e5.preventDefault(), l4 == null || l4.focus()); + }, y4 === 0); + let I5 = o3((e5) => { + i5({ type: 1 }); + let p6 = (() => e5 ? e5 instanceof HTMLElement ? e5 : "current" in e5 && e5.current instanceof HTMLElement ? e5.current : l4 : l4)(); + p6 == null || p6.focus(); + }), H4 = F(() => ({ close: I5, isPortalled: c3 }), [I5, c3]), u6 = F(() => ({ open: y4 === 0, close: I5 }), [y4, I5]), S4 = t4, R2 = { ref: n4 }; + return _n.createElement(te.Provider, { value: g4 }, _n.createElement(oe.Provider, { value: H4 }, _n.createElement(C4, { value: u4(y4, { [0]: p5.Open, [1]: p5.Closed }) }, $3({ ourProps: R2, theirProps: S4, slot: u6, defaultTag: Le, name: "Popover" })))); +}); +var Fe = "button"; +var he = C3(function(t4, f5) { + let [o6, v3] = Q2("Popover.Button"), { isPortalled: a6 } = re("Popover.Button"), n4 = _2(null), g4 = `headlessui-focus-sentinel-${I3()}`, y4 = ce2(), l4 = y4 == null ? void 0 : y4.closeOthers, P3 = Oe(), s10 = P3 === null ? false : P3 === o6.panelId, B4 = y3(n4, f5, s10 ? null : (e5) => v3({ type: 2, button: e5 })), i5 = y3(n4, f5), T8 = n3(n4), c3 = o3((e5) => { + var p6, m6, C5; + if (s10) { + if (o6.popoverState === 1) + return; + switch (e5.key) { + case o5.Space: + case o5.Enter: + e5.preventDefault(), (m6 = (p6 = e5.target).click) == null || m6.call(p6), v3({ type: 1 }), (C5 = o6.button) == null || C5.focus(); + break; + } + } else + switch (e5.key) { + case o5.Space: + case o5.Enter: + e5.preventDefault(), e5.stopPropagation(), o6.popoverState === 1 && (l4 == null || l4(o6.buttonId)), v3({ type: 0 }); + break; + case o5.Escape: + if (o6.popoverState !== 0) + return l4 == null ? void 0 : l4(o6.buttonId); + if (!n4.current || (T8 == null ? void 0 : T8.activeElement) && !n4.current.contains(T8.activeElement)) + return; + e5.preventDefault(), e5.stopPropagation(), v3({ type: 1 }); + break; + } + }), d5 = o3((e5) => { + s10 || e5.key === o5.Space && e5.preventDefault(); + }), E3 = o3((e5) => { + var p6, m6; + r5(e5.currentTarget) || t4.disabled || (s10 ? (v3({ type: 1 }), (p6 = o6.button) == null || p6.focus()) : (e5.preventDefault(), e5.stopPropagation(), o6.popoverState === 1 && (l4 == null || l4(o6.buttonId)), v3({ type: 0 }), (m6 = o6.button) == null || m6.focus())); + }), A4 = o3((e5) => { + e5.preventDefault(), e5.stopPropagation(); + }), L4 = o6.popoverState === 0, I5 = F(() => ({ open: L4 }), [L4]), H4 = s5(t4, n4), u6 = t4, S4 = s10 ? { ref: i5, type: H4, onKeyDown: c3, onClick: E3 } : { ref: B4, id: o6.buttonId, type: H4, "aria-expanded": t4.disabled ? void 0 : o6.popoverState === 0, "aria-controls": o6.panel ? o6.panelId : void 0, onKeyDown: c3, onKeyUp: d5, onClick: E3, onMouseDown: A4 }, R2 = n2(), O4 = o3(() => { + let e5 = o6.panel; + if (!e5) + return; + function p6() { + u4(R2.current, { [s9.Forwards]: () => O3(e5, T5.First), [s9.Backwards]: () => O3(e5, T5.Last) }); + } + p6(); + }); + return _n.createElement(_n.Fragment, null, $3({ ourProps: S4, theirProps: u6, slot: I5, defaultTag: Fe, name: "Popover.Button" }), L4 && !s10 && a6 && _n.createElement(h4, { id: g4, features: s6.Focusable, as: "button", type: "button", onFocus: O4 })); +}); +var Be = "div"; +var De = S3.RenderStrategy | S3.Static; +var xe = C3(function(t4, f5) { + let [{ popoverState: o6 }, v3] = Q2("Popover.Overlay"), a6 = y3(f5), n4 = `headlessui-popover-overlay-${I3()}`, g4 = s7(), y4 = (() => g4 !== null ? g4 === p5.Open : o6 === 0)(), l4 = o3((i5) => { + if (r5(i5.currentTarget)) + return i5.preventDefault(); + v3({ type: 1 }); + }), P3 = F(() => ({ open: o6 === 0 }), [o6]); + return $3({ ourProps: { ref: a6, id: n4, "aria-hidden": true, onClick: l4 }, theirProps: t4, slot: P3, defaultTag: Be, features: De, visible: y4, name: "Popover.Overlay" }); +}); +var He = "div"; +var Ge = S3.RenderStrategy | S3.Static; +var ke = C3(function(t4, f5) { + let { focus: o6 = false, ...v3 } = t4, [a6, n4] = Q2("Popover.Panel"), { close: g4, isPortalled: y4 } = re("Popover.Panel"), l4 = `headlessui-focus-sentinel-before-${I3()}`, P3 = `headlessui-focus-sentinel-after-${I3()}`, s10 = _2(null), B4 = y3(s10, f5, (u6) => { + n4({ type: 4, panel: u6 }); + }), i5 = n3(s10), T8 = s7(), c3 = (() => T8 !== null ? T8 === p5.Open : a6.popoverState === 0)(), d5 = o3((u6) => { + var S4; + switch (u6.key) { + case o5.Escape: + if (a6.popoverState !== 0 || !s10.current || (i5 == null ? void 0 : i5.activeElement) && !s10.current.contains(i5.activeElement)) + return; + u6.preventDefault(), u6.stopPropagation(), n4({ type: 1 }), (S4 = a6.button) == null || S4.focus(); + break; + } + }); + h2(() => { + var u6; + t4.static || a6.popoverState === 1 && ((u6 = t4.unmount) != null ? u6 : true) && n4({ type: 4, panel: null }); + }, [a6.popoverState, t4.unmount, t4.static, n4]), h2(() => { + if (!o6 || a6.popoverState !== 0 || !s10.current) + return; + let u6 = i5 == null ? void 0 : i5.activeElement; + s10.current.contains(u6) || O3(s10.current, T5.First); + }, [o6, s10, a6.popoverState]); + let E3 = F(() => ({ open: a6.popoverState === 0, close: g4 }), [a6, g4]), A4 = { ref: B4, id: a6.panelId, onKeyDown: d5, onBlur: o6 && a6.popoverState === 0 ? (u6) => { + var R2, O4, e5, p6, m6; + let S4 = u6.relatedTarget; + !S4 || !s10.current || (R2 = s10.current) != null && R2.contains(S4) || (n4({ type: 1 }), (((e5 = (O4 = a6.beforePanelSentinel.current) == null ? void 0 : O4.contains) == null ? void 0 : e5.call(O4, S4)) || ((m6 = (p6 = a6.afterPanelSentinel.current) == null ? void 0 : p6.contains) == null ? void 0 : m6.call(p6, S4))) && S4.focus({ preventScroll: true })); + } : void 0, tabIndex: -1 }, L4 = n2(), I5 = o3(() => { + let u6 = s10.current; + if (!u6) + return; + function S4() { + u4(L4.current, { [s9.Forwards]: () => { + O3(u6, T5.First); + }, [s9.Backwards]: () => { + var R2; + (R2 = a6.button) == null || R2.focus({ preventScroll: true }); + } }); + } + S4(); + }), H4 = o3(() => { + let u6 = s10.current; + if (!u6) + return; + function S4() { + u4(L4.current, { [s9.Forwards]: () => { + var C5, D4, V3; + if (!a6.button) + return; + let R2 = d3(), O4 = R2.indexOf(a6.button), e5 = R2.slice(0, O4 + 1), m6 = [...R2.slice(O4 + 1), ...e5]; + for (let M4 of m6.slice()) + if (((D4 = (C5 = M4 == null ? void 0 : M4.id) == null ? void 0 : C5.startsWith) == null ? void 0 : D4.call(C5, "headlessui-focus-sentinel-")) || ((V3 = a6.panel) == null ? void 0 : V3.contains(M4))) { + let ae = m6.indexOf(M4); + ae !== -1 && m6.splice(ae, 1); + } + O3(m6, T5.First, false); + }, [s9.Backwards]: () => O3(u6, T5.Last) }); + } + S4(); + }); + return _n.createElement(le2.Provider, { value: a6.panelId }, c3 && y4 && _n.createElement(h4, { id: l4, ref: a6.beforePanelSentinel, features: s6.Focusable, as: "button", type: "button", onFocus: I5 }), $3({ ourProps: A4, theirProps: v3, slot: E3, defaultTag: He, features: Ge, visible: c3, name: "Popover.Panel" }), c3 && y4 && _n.createElement(h4, { id: P3, ref: a6.afterPanelSentinel, features: s6.Focusable, as: "button", type: "button", onFocus: H4 })); +}); +var _e2 = "div"; +var we = C3(function(t4, f5) { + let o6 = _2(null), v3 = y3(o6, f5), [a6, n4] = p2([]), g4 = o3((c3) => { + n4((d5) => { + let E3 = d5.indexOf(c3); + if (E3 !== -1) { + let A4 = d5.slice(); + return A4.splice(E3, 1), A4; + } + return d5; + }); + }), y4 = o3((c3) => (n4((d5) => [...d5, c3]), () => g4(c3))), l4 = o3(() => { + var E3; + let c3 = e4(o6); + if (!c3) + return false; + let d5 = c3.activeElement; + return (E3 = o6.current) != null && E3.contains(d5) ? true : a6.some((A4) => { + var L4, I5; + return ((L4 = c3.getElementById(A4.buttonId)) == null ? void 0 : L4.contains(d5)) || ((I5 = c3.getElementById(A4.panelId)) == null ? void 0 : I5.contains(d5)); + }); + }), P3 = o3((c3) => { + for (let d5 of a6) + d5.buttonId !== c3 && d5.close(); + }), s10 = F(() => ({ registerPopover: y4, unregisterPopover: g4, isFocusWithinPopoverGroup: l4, closeOthers: P3 }), [y4, g4, l4, P3]), B4 = F(() => ({}), []), i5 = t4, T8 = { ref: v3 }; + return _n.createElement(ne.Provider, { value: s10 }, $3({ ourProps: T8, theirProps: i5, slot: B4, defaultTag: _e2, name: "Popover.Group" })); +}); +var mt = Object.assign(Ie2, { Button: he, Overlay: xe, Panel: ke, Group: we }); + +// src/components/Editor/StickerMenu/emojis/default.ts +var emojis = { "smileys_people": [{ "n": ["grinning", "grinning face"], "u": "1f600" }, { "n": ["smiley", "smiling face with open mouth"], "u": "1f603" }, { "n": ["smile", "smiling face with open mouth and smiling eyes"], "u": "1f604" }, { "n": ["grin", "grinning face with smiling eyes"], "u": "1f601" }, { "n": ["laughing", "satisfied", "smiling face with open mouth and tightly-closed eyes"], "u": "1f606" }, { "n": ["sweat smile", "smiling face with open mouth and cold sweat"], "u": "1f605" }, { "n": ["rolling on the floor laughing"], "u": "1f923" }, { "n": ["joy", "face with tears of joy"], "u": "1f602" }, { "n": ["slightly smiling face"], "u": "1f642" }, { "n": ["upside-down face", "upside down face"], "u": "1f643" }, { "n": ["melting face"], "u": "1fae0" }, { "n": ["wink", "winking face"], "u": "1f609" }, { "n": ["blush", "smiling face with smiling eyes"], "u": "1f60a" }, { "n": ["innocent", "smiling face with halo"], "u": "1f607" }, { "n": ["smiling face with 3 hearts", "smiling face with smiling eyes and three hearts"], "u": "1f970" }, { "n": ["heart eyes", "smiling face with heart-shaped eyes"], "u": "1f60d" }, { "n": ["star-struck", "grinning face with star eyes"], "u": "1f929" }, { "n": ["kissing heart", "face throwing a kiss"], "u": "1f618" }, { "n": ["kissing", "kissing face"], "u": "1f617" }, { "n": ["relaxed", "white smiling face"], "u": "263a-fe0f" }, { "n": ["kissing closed eyes", "kissing face with closed eyes"], "u": "1f61a" }, { "n": ["kissing smiling eyes", "kissing face with smiling eyes"], "u": "1f619" }, { "n": ["smiling face with tear"], "u": "1f972" }, { "n": ["yum", "face savouring delicious food"], "u": "1f60b" }, { "n": ["stuck out tongue", "face with stuck-out tongue"], "u": "1f61b" }, { "n": ["stuck out tongue winking eye", "face with stuck-out tongue and winking eye"], "u": "1f61c" }, { "n": ["zany face", "grinning face with one large and one small eye"], "u": "1f92a" }, { "n": ["stuck out tongue closed eyes", "face with stuck-out tongue and tightly-closed eyes"], "u": "1f61d" }, { "n": ["money-mouth face", "money mouth face"], "u": "1f911" }, { "n": ["hugging face"], "u": "1f917" }, { "n": ["face with hand over mouth", "smiling face with smiling eyes and hand covering mouth"], "u": "1f92d" }, { "n": ["face with open eyes and hand over mouth"], "u": "1fae2" }, { "n": ["face with peeking eye"], "u": "1fae3" }, { "n": ["shushing face", "face with finger covering closed lips"], "u": "1f92b" }, { "n": ["thinking face"], "u": "1f914" }, { "n": ["saluting face"], "u": "1fae1" }, { "n": ["zipper-mouth face", "zipper mouth face"], "u": "1f910" }, { "n": ["face with raised eyebrow", "face with one eyebrow raised"], "u": "1f928" }, { "n": ["neutral face"], "u": "1f610" }, { "n": ["expressionless", "expressionless face"], "u": "1f611" }, { "n": ["no mouth", "face without mouth"], "u": "1f636" }, { "n": ["dotted line face"], "u": "1fae5" }, { "n": ["face in clouds"], "u": "1f636-200d-1f32b-fe0f" }, { "n": ["smirk", "smirking face"], "u": "1f60f" }, { "n": ["unamused", "unamused face"], "u": "1f612" }, { "n": ["face with rolling eyes"], "u": "1f644" }, { "n": ["grimacing", "grimacing face"], "u": "1f62c" }, { "n": ["face exhaling"], "u": "1f62e-200d-1f4a8" }, { "n": ["lying face"], "u": "1f925" }, { "n": ["relieved", "relieved face"], "u": "1f60c" }, { "n": ["pensive", "pensive face"], "u": "1f614" }, { "n": ["sleepy", "sleepy face"], "u": "1f62a" }, { "n": ["drooling face"], "u": "1f924" }, { "n": ["sleeping", "sleeping face"], "u": "1f634" }, { "n": ["mask", "face with medical mask"], "u": "1f637" }, { "n": ["face with thermometer"], "u": "1f912" }, { "n": ["face with head-bandage", "face with head bandage"], "u": "1f915" }, { "n": ["nauseated face"], "u": "1f922" }, { "n": ["face vomiting", "face with open mouth vomiting"], "u": "1f92e" }, { "n": ["sneezing face"], "u": "1f927" }, { "n": ["hot face", "overheated face"], "u": "1f975" }, { "n": ["cold face", "freezing face"], "u": "1f976" }, { "n": ["woozy face", "face with uneven eyes and wavy mouth"], "u": "1f974" }, { "n": ["dizzy face"], "u": "1f635" }, { "n": ["face with spiral eyes"], "u": "1f635-200d-1f4ab" }, { "n": ["exploding head", "shocked face with exploding head"], "u": "1f92f" }, { "n": ["face with cowboy hat"], "u": "1f920" }, { "n": ["partying face", "face with party horn and party hat"], "u": "1f973" }, { "n": ["disguised face"], "u": "1f978" }, { "n": ["sunglasses", "smiling face with sunglasses"], "u": "1f60e" }, { "n": ["nerd face"], "u": "1f913" }, { "n": ["face with monocle"], "u": "1f9d0" }, { "n": ["confused", "confused face"], "u": "1f615" }, { "n": ["face with diagonal mouth"], "u": "1fae4" }, { "n": ["worried", "worried face"], "u": "1f61f" }, { "n": ["slightly frowning face"], "u": "1f641" }, { "n": ["frowning face", "white frowning face"], "u": "2639-fe0f" }, { "n": ["open mouth", "face with open mouth"], "u": "1f62e" }, { "n": ["hushed", "hushed face"], "u": "1f62f" }, { "n": ["astonished", "astonished face"], "u": "1f632" }, { "n": ["flushed", "flushed face"], "u": "1f633" }, { "n": ["pleading face", "face with pleading eyes"], "u": "1f97a" }, { "n": ["face holding back tears"], "u": "1f979" }, { "n": ["frowning", "frowning face with open mouth"], "u": "1f626" }, { "n": ["anguished", "anguished face"], "u": "1f627" }, { "n": ["fearful", "fearful face"], "u": "1f628" }, { "n": ["cold sweat", "face with open mouth and cold sweat"], "u": "1f630" }, { "n": ["disappointed relieved", "disappointed but relieved face"], "u": "1f625" }, { "n": ["cry", "crying face"], "u": "1f622" }, { "n": ["sob", "loudly crying face"], "u": "1f62d" }, { "n": ["scream", "face screaming in fear"], "u": "1f631" }, { "n": ["confounded", "confounded face"], "u": "1f616" }, { "n": ["persevere", "persevering face"], "u": "1f623" }, { "n": ["disappointed", "disappointed face"], "u": "1f61e" }, { "n": ["sweat", "face with cold sweat"], "u": "1f613" }, { "n": ["weary", "weary face"], "u": "1f629" }, { "n": ["tired face"], "u": "1f62b" }, { "n": ["yawning face"], "u": "1f971" }, { "n": ["triumph", "face with look of triumph"], "u": "1f624" }, { "n": ["rage", "pouting face"], "u": "1f621" }, { "n": ["angry", "angry face"], "u": "1f620" }, { "n": ["face with symbols on mouth", "serious face with symbols covering mouth"], "u": "1f92c" }, { "n": ["smiling imp", "smiling face with horns"], "u": "1f608" }, { "n": ["imp"], "u": "1f47f" }, { "n": ["skull"], "u": "1f480" }, { "n": ["skull and crossbones"], "u": "2620-fe0f" }, { "n": ["poop", "shit", "hankey", "pile of poo"], "u": "1f4a9" }, { "n": ["clown face"], "u": "1f921" }, { "n": ["japanese ogre"], "u": "1f479" }, { "n": ["japanese goblin"], "u": "1f47a" }, { "n": ["ghost"], "u": "1f47b" }, { "n": ["alien", "extraterrestrial alien"], "u": "1f47d" }, { "n": ["alien monster", "space invader"], "u": "1f47e" }, { "n": ["robot face"], "u": "1f916" }, { "n": ["smiley cat", "smiling cat face with open mouth"], "u": "1f63a" }, { "n": ["smile cat", "grinning cat face with smiling eyes"], "u": "1f638" }, { "n": ["joy cat", "cat face with tears of joy"], "u": "1f639" }, { "n": ["heart eyes cat", "smiling cat face with heart-shaped eyes"], "u": "1f63b" }, { "n": ["smirk cat", "cat face with wry smile"], "u": "1f63c" }, { "n": ["kissing cat", "kissing cat face with closed eyes"], "u": "1f63d" }, { "n": ["scream cat", "weary cat face"], "u": "1f640" }, { "n": ["crying cat face"], "u": "1f63f" }, { "n": ["pouting cat", "pouting cat face"], "u": "1f63e" }, { "n": ["see no evil", "see-no-evil monkey"], "u": "1f648" }, { "n": ["hear no evil", "hear-no-evil monkey"], "u": "1f649" }, { "n": ["speak no evil", "speak-no-evil monkey"], "u": "1f64a" }, { "n": ["kiss", "kiss mark"], "u": "1f48b" }, { "n": ["love letter"], "u": "1f48c" }, { "n": ["cupid", "heart with arrow"], "u": "1f498" }, { "n": ["gift heart", "heart with ribbon"], "u": "1f49d" }, { "n": ["sparkling heart"], "u": "1f496" }, { "n": ["heartpulse", "growing heart"], "u": "1f497" }, { "n": ["heartbeat", "beating heart"], "u": "1f493" }, { "n": ["revolving hearts"], "u": "1f49e" }, { "n": ["two hearts"], "u": "1f495" }, { "n": ["heart decoration"], "u": "1f49f" }, { "n": ["heart exclamation", "heavy heart exclamation mark ornament"], "u": "2763-fe0f" }, { "n": ["broken heart"], "u": "1f494" }, { "n": ["heart on fire"], "u": "2764-fe0f-200d-1f525" }, { "n": ["mending heart"], "u": "2764-fe0f-200d-1fa79" }, { "n": ["heart", "heavy black heart"], "u": "2764-fe0f" }, { "n": ["orange heart"], "u": "1f9e1" }, { "n": ["yellow heart"], "u": "1f49b" }, { "n": ["green heart"], "u": "1f49a" }, { "n": ["blue heart"], "u": "1f499" }, { "n": ["purple heart"], "u": "1f49c" }, { "n": ["brown heart"], "u": "1f90e" }, { "n": ["black heart"], "u": "1f5a4" }, { "n": ["white heart"], "u": "1f90d" }, { "n": ["100", "hundred points symbol"], "u": "1f4af" }, { "n": ["anger", "anger symbol"], "u": "1f4a2" }, { "n": ["boom", "collision", "collision symbol"], "u": "1f4a5" }, { "n": ["dizzy", "dizzy symbol"], "u": "1f4ab" }, { "n": ["sweat drops", "splashing sweat symbol"], "u": "1f4a6" }, { "n": ["dash", "dash symbol"], "u": "1f4a8" }, { "n": ["hole"], "u": "1f573-fe0f" }, { "n": ["bomb"], "u": "1f4a3" }, { "n": ["speech balloon"], "u": "1f4ac" }, { "n": ["eye in speech bubble", "eye-in-speech-bubble"], "u": "1f441-fe0f-200d-1f5e8-fe0f" }, { "n": ["left speech bubble"], "u": "1f5e8-fe0f" }, { "n": ["right anger bubble"], "u": "1f5ef-fe0f" }, { "n": ["thought balloon"], "u": "1f4ad" }, { "n": ["zzz", "sleeping symbol"], "u": "1f4a4" }, { "n": ["wave", "waving hand sign"], "u": "1f44b", "v": ["1f44b-1f3fb", "1f44b-1f3fc", "1f44b-1f3fd", "1f44b-1f3fe", "1f44b-1f3ff"] }, { "n": ["raised back of hand"], "u": "1f91a", "v": ["1f91a-1f3fb", "1f91a-1f3fc", "1f91a-1f3fd", "1f91a-1f3fe", "1f91a-1f3ff"] }, { "n": ["hand with fingers splayed", "raised hand with fingers splayed"], "u": "1f590-fe0f", "v": ["1f590-1f3fb", "1f590-1f3fc", "1f590-1f3fd", "1f590-1f3fe", "1f590-1f3ff"] }, { "n": ["hand", "raised hand"], "u": "270b", "v": ["270b-1f3fb", "270b-1f3fc", "270b-1f3fd", "270b-1f3fe", "270b-1f3ff"] }, { "n": ["spock-hand", "raised hand with part between middle and ring fingers"], "u": "1f596", "v": ["1f596-1f3fb", "1f596-1f3fc", "1f596-1f3fd", "1f596-1f3fe", "1f596-1f3ff"] }, { "n": ["rightwards hand"], "u": "1faf1", "v": ["1faf1-1f3fb", "1faf1-1f3fc", "1faf1-1f3fd", "1faf1-1f3fe", "1faf1-1f3ff"] }, { "n": ["leftwards hand"], "u": "1faf2", "v": ["1faf2-1f3fb", "1faf2-1f3fc", "1faf2-1f3fd", "1faf2-1f3fe", "1faf2-1f3ff"] }, { "n": ["palm down hand"], "u": "1faf3", "v": ["1faf3-1f3fb", "1faf3-1f3fc", "1faf3-1f3fd", "1faf3-1f3fe", "1faf3-1f3ff"] }, { "n": ["palm up hand"], "u": "1faf4", "v": ["1faf4-1f3fb", "1faf4-1f3fc", "1faf4-1f3fd", "1faf4-1f3fe", "1faf4-1f3ff"] }, { "n": ["ok hand", "ok hand sign"], "u": "1f44c", "v": ["1f44c-1f3fb", "1f44c-1f3fc", "1f44c-1f3fd", "1f44c-1f3fe", "1f44c-1f3ff"] }, { "n": ["pinched fingers"], "u": "1f90c", "v": ["1f90c-1f3fb", "1f90c-1f3fc", "1f90c-1f3fd", "1f90c-1f3fe", "1f90c-1f3ff"] }, { "n": ["pinching hand"], "u": "1f90f", "v": ["1f90f-1f3fb", "1f90f-1f3fc", "1f90f-1f3fd", "1f90f-1f3fe", "1f90f-1f3ff"] }, { "n": ["v", "victory hand"], "u": "270c-fe0f", "v": ["270c-1f3fb", "270c-1f3fc", "270c-1f3fd", "270c-1f3fe", "270c-1f3ff"] }, { "n": ["crossed fingers", "hand with index and middle fingers crossed"], "u": "1f91e", "v": ["1f91e-1f3fb", "1f91e-1f3fc", "1f91e-1f3fd", "1f91e-1f3fe", "1f91e-1f3ff"] }, { "n": ["hand with index finger and thumb crossed"], "u": "1faf0", "v": ["1faf0-1f3fb", "1faf0-1f3fc", "1faf0-1f3fd", "1faf0-1f3fe", "1faf0-1f3ff"] }, { "n": ["i love you hand sign"], "u": "1f91f", "v": ["1f91f-1f3fb", "1f91f-1f3fc", "1f91f-1f3fd", "1f91f-1f3fe", "1f91f-1f3ff"] }, { "n": ["the horns", "sign of the horns"], "u": "1f918", "v": ["1f918-1f3fb", "1f918-1f3fc", "1f918-1f3fd", "1f918-1f3fe", "1f918-1f3ff"] }, { "n": ["call me hand"], "u": "1f919", "v": ["1f919-1f3fb", "1f919-1f3fc", "1f919-1f3fd", "1f919-1f3fe", "1f919-1f3ff"] }, { "n": ["point left", "white left pointing backhand index"], "u": "1f448", "v": ["1f448-1f3fb", "1f448-1f3fc", "1f448-1f3fd", "1f448-1f3fe", "1f448-1f3ff"] }, { "n": ["point right", "white right pointing backhand index"], "u": "1f449", "v": ["1f449-1f3fb", "1f449-1f3fc", "1f449-1f3fd", "1f449-1f3fe", "1f449-1f3ff"] }, { "n": ["point up 2", "white up pointing backhand index"], "u": "1f446", "v": ["1f446-1f3fb", "1f446-1f3fc", "1f446-1f3fd", "1f446-1f3fe", "1f446-1f3ff"] }, { "n": ["middle finger", "reversed hand with middle finger extended"], "u": "1f595", "v": ["1f595-1f3fb", "1f595-1f3fc", "1f595-1f3fd", "1f595-1f3fe", "1f595-1f3ff"] }, { "n": ["point down", "white down pointing backhand index"], "u": "1f447", "v": ["1f447-1f3fb", "1f447-1f3fc", "1f447-1f3fd", "1f447-1f3fe", "1f447-1f3ff"] }, { "n": ["point up", "white up pointing index"], "u": "261d-fe0f", "v": ["261d-1f3fb", "261d-1f3fc", "261d-1f3fd", "261d-1f3fe", "261d-1f3ff"] }, { "n": ["index pointing at the viewer"], "u": "1faf5", "v": ["1faf5-1f3fb", "1faf5-1f3fc", "1faf5-1f3fd", "1faf5-1f3fe", "1faf5-1f3ff"] }, { "n": ["+1", "thumbsup", "thumbs up sign"], "u": "1f44d", "v": ["1f44d-1f3fb", "1f44d-1f3fc", "1f44d-1f3fd", "1f44d-1f3fe", "1f44d-1f3ff"] }, { "n": ["-1", "thumbsdown", "thumbs down sign"], "u": "1f44e", "v": ["1f44e-1f3fb", "1f44e-1f3fc", "1f44e-1f3fd", "1f44e-1f3fe", "1f44e-1f3ff"] }, { "n": ["fist", "raised fist"], "u": "270a", "v": ["270a-1f3fb", "270a-1f3fc", "270a-1f3fd", "270a-1f3fe", "270a-1f3ff"] }, { "n": ["punch", "facepunch", "fisted hand sign"], "u": "1f44a", "v": ["1f44a-1f3fb", "1f44a-1f3fc", "1f44a-1f3fd", "1f44a-1f3fe", "1f44a-1f3ff"] }, { "n": ["left-facing fist"], "u": "1f91b", "v": ["1f91b-1f3fb", "1f91b-1f3fc", "1f91b-1f3fd", "1f91b-1f3fe", "1f91b-1f3ff"] }, { "n": ["right-facing fist"], "u": "1f91c", "v": ["1f91c-1f3fb", "1f91c-1f3fc", "1f91c-1f3fd", "1f91c-1f3fe", "1f91c-1f3ff"] }, { "n": ["clap", "clapping hands sign"], "u": "1f44f", "v": ["1f44f-1f3fb", "1f44f-1f3fc", "1f44f-1f3fd", "1f44f-1f3fe", "1f44f-1f3ff"] }, { "n": ["raised hands", "person raising both hands in celebration"], "u": "1f64c", "v": ["1f64c-1f3fb", "1f64c-1f3fc", "1f64c-1f3fd", "1f64c-1f3fe", "1f64c-1f3ff"] }, { "n": ["heart hands"], "u": "1faf6", "v": ["1faf6-1f3fb", "1faf6-1f3fc", "1faf6-1f3fd", "1faf6-1f3fe", "1faf6-1f3ff"] }, { "n": ["open hands", "open hands sign"], "u": "1f450", "v": ["1f450-1f3fb", "1f450-1f3fc", "1f450-1f3fd", "1f450-1f3fe", "1f450-1f3ff"] }, { "n": ["palms up together"], "u": "1f932", "v": ["1f932-1f3fb", "1f932-1f3fc", "1f932-1f3fd", "1f932-1f3fe", "1f932-1f3ff"] }, { "n": ["handshake"], "u": "1f91d", "v": ["1f91d-1f3fb", "1f91d-1f3fc", "1f91d-1f3fd", "1f91d-1f3fe", "1f91d-1f3ff", "1faf1-1f3fb-200d-1faf2-1f3fc", "1faf1-1f3fb-200d-1faf2-1f3fd", "1faf1-1f3fb-200d-1faf2-1f3fe", "1faf1-1f3fb-200d-1faf2-1f3ff", "1faf1-1f3fc-200d-1faf2-1f3fb", "1faf1-1f3fc-200d-1faf2-1f3fd", "1faf1-1f3fc-200d-1faf2-1f3fe", "1faf1-1f3fc-200d-1faf2-1f3ff", "1faf1-1f3fd-200d-1faf2-1f3fb", "1faf1-1f3fd-200d-1faf2-1f3fc", "1faf1-1f3fd-200d-1faf2-1f3fe", "1faf1-1f3fd-200d-1faf2-1f3ff", "1faf1-1f3fe-200d-1faf2-1f3fb", "1faf1-1f3fe-200d-1faf2-1f3fc", "1faf1-1f3fe-200d-1faf2-1f3fd", "1faf1-1f3fe-200d-1faf2-1f3ff", "1faf1-1f3ff-200d-1faf2-1f3fb", "1faf1-1f3ff-200d-1faf2-1f3fc", "1faf1-1f3ff-200d-1faf2-1f3fd", "1faf1-1f3ff-200d-1faf2-1f3fe"] }, { "n": ["pray", "person with folded hands"], "u": "1f64f", "v": ["1f64f-1f3fb", "1f64f-1f3fc", "1f64f-1f3fd", "1f64f-1f3fe", "1f64f-1f3ff"] }, { "n": ["writing hand"], "u": "270d-fe0f", "v": ["270d-1f3fb", "270d-1f3fc", "270d-1f3fd", "270d-1f3fe", "270d-1f3ff"] }, { "n": ["nail care", "nail polish"], "u": "1f485", "v": ["1f485-1f3fb", "1f485-1f3fc", "1f485-1f3fd", "1f485-1f3fe", "1f485-1f3ff"] }, { "n": ["selfie"], "u": "1f933", "v": ["1f933-1f3fb", "1f933-1f3fc", "1f933-1f3fd", "1f933-1f3fe", "1f933-1f3ff"] }, { "n": ["muscle", "flexed biceps"], "u": "1f4aa", "v": ["1f4aa-1f3fb", "1f4aa-1f3fc", "1f4aa-1f3fd", "1f4aa-1f3fe", "1f4aa-1f3ff"] }, { "n": ["mechanical arm"], "u": "1f9be" }, { "n": ["mechanical leg"], "u": "1f9bf" }, { "n": ["leg"], "u": "1f9b5", "v": ["1f9b5-1f3fb", "1f9b5-1f3fc", "1f9b5-1f3fd", "1f9b5-1f3fe", "1f9b5-1f3ff"] }, { "n": ["foot"], "u": "1f9b6", "v": ["1f9b6-1f3fb", "1f9b6-1f3fc", "1f9b6-1f3fd", "1f9b6-1f3fe", "1f9b6-1f3ff"] }, { "n": ["ear"], "u": "1f442", "v": ["1f442-1f3fb", "1f442-1f3fc", "1f442-1f3fd", "1f442-1f3fe", "1f442-1f3ff"] }, { "n": ["ear with hearing aid"], "u": "1f9bb", "v": ["1f9bb-1f3fb", "1f9bb-1f3fc", "1f9bb-1f3fd", "1f9bb-1f3fe", "1f9bb-1f3ff"] }, { "n": ["nose"], "u": "1f443", "v": ["1f443-1f3fb", "1f443-1f3fc", "1f443-1f3fd", "1f443-1f3fe", "1f443-1f3ff"] }, { "n": ["brain"], "u": "1f9e0" }, { "n": ["anatomical heart"], "u": "1fac0" }, { "n": ["lungs"], "u": "1fac1" }, { "n": ["tooth"], "u": "1f9b7" }, { "n": ["bone"], "u": "1f9b4" }, { "n": ["eyes"], "u": "1f440" }, { "n": ["eye"], "u": "1f441-fe0f" }, { "n": ["tongue"], "u": "1f445" }, { "n": ["lips", "mouth"], "u": "1f444" }, { "n": ["biting lip"], "u": "1fae6" }, { "n": ["baby"], "u": "1f476", "v": ["1f476-1f3fb", "1f476-1f3fc", "1f476-1f3fd", "1f476-1f3fe", "1f476-1f3ff"] }, { "n": ["child"], "u": "1f9d2", "v": ["1f9d2-1f3fb", "1f9d2-1f3fc", "1f9d2-1f3fd", "1f9d2-1f3fe", "1f9d2-1f3ff"] }, { "n": ["boy"], "u": "1f466", "v": ["1f466-1f3fb", "1f466-1f3fc", "1f466-1f3fd", "1f466-1f3fe", "1f466-1f3ff"] }, { "n": ["girl"], "u": "1f467", "v": ["1f467-1f3fb", "1f467-1f3fc", "1f467-1f3fd", "1f467-1f3fe", "1f467-1f3ff"] }, { "n": ["adult"], "u": "1f9d1", "v": ["1f9d1-1f3fb", "1f9d1-1f3fc", "1f9d1-1f3fd", "1f9d1-1f3fe", "1f9d1-1f3ff"] }, { "n": ["person with blond hair"], "u": "1f471", "v": ["1f471-1f3fb", "1f471-1f3fc", "1f471-1f3fd", "1f471-1f3fe", "1f471-1f3ff"] }, { "n": ["man"], "u": "1f468", "v": ["1f468-1f3fb", "1f468-1f3fc", "1f468-1f3fd", "1f468-1f3fe", "1f468-1f3ff"] }, { "n": ["bearded person"], "u": "1f9d4", "v": ["1f9d4-1f3fb", "1f9d4-1f3fc", "1f9d4-1f3fd", "1f9d4-1f3fe", "1f9d4-1f3ff"] }, { "n": ["man: beard", "man with beard"], "u": "1f9d4-200d-2642-fe0f", "v": ["1f9d4-1f3fb-200d-2642-fe0f", "1f9d4-1f3fc-200d-2642-fe0f", "1f9d4-1f3fd-200d-2642-fe0f", "1f9d4-1f3fe-200d-2642-fe0f", "1f9d4-1f3ff-200d-2642-fe0f"] }, { "n": ["woman: beard", "woman with beard"], "u": "1f9d4-200d-2640-fe0f", "v": ["1f9d4-1f3fb-200d-2640-fe0f", "1f9d4-1f3fc-200d-2640-fe0f", "1f9d4-1f3fd-200d-2640-fe0f", "1f9d4-1f3fe-200d-2640-fe0f", "1f9d4-1f3ff-200d-2640-fe0f"] }, { "n": ["man: red hair", "red haired man"], "u": "1f468-200d-1f9b0", "v": ["1f468-1f3fb-200d-1f9b0", "1f468-1f3fc-200d-1f9b0", "1f468-1f3fd-200d-1f9b0", "1f468-1f3fe-200d-1f9b0", "1f468-1f3ff-200d-1f9b0"] }, { "n": ["man: curly hair", "curly haired man"], "u": "1f468-200d-1f9b1", "v": ["1f468-1f3fb-200d-1f9b1", "1f468-1f3fc-200d-1f9b1", "1f468-1f3fd-200d-1f9b1", "1f468-1f3fe-200d-1f9b1", "1f468-1f3ff-200d-1f9b1"] }, { "n": ["man: white hair", "white haired man"], "u": "1f468-200d-1f9b3", "v": ["1f468-1f3fb-200d-1f9b3", "1f468-1f3fc-200d-1f9b3", "1f468-1f3fd-200d-1f9b3", "1f468-1f3fe-200d-1f9b3", "1f468-1f3ff-200d-1f9b3"] }, { "n": ["bald man", "man: bald"], "u": "1f468-200d-1f9b2", "v": ["1f468-1f3fb-200d-1f9b2", "1f468-1f3fc-200d-1f9b2", "1f468-1f3fd-200d-1f9b2", "1f468-1f3fe-200d-1f9b2", "1f468-1f3ff-200d-1f9b2"] }, { "n": ["woman"], "u": "1f469", "v": ["1f469-1f3fb", "1f469-1f3fc", "1f469-1f3fd", "1f469-1f3fe", "1f469-1f3ff"] }, { "n": ["woman: red hair", "red haired woman"], "u": "1f469-200d-1f9b0", "v": ["1f469-1f3fb-200d-1f9b0", "1f469-1f3fc-200d-1f9b0", "1f469-1f3fd-200d-1f9b0", "1f469-1f3fe-200d-1f9b0", "1f469-1f3ff-200d-1f9b0"] }, { "n": ["person: red hair", "red haired person"], "u": "1f9d1-200d-1f9b0", "v": ["1f9d1-1f3fb-200d-1f9b0", "1f9d1-1f3fc-200d-1f9b0", "1f9d1-1f3fd-200d-1f9b0", "1f9d1-1f3fe-200d-1f9b0", "1f9d1-1f3ff-200d-1f9b0"] }, { "n": ["woman: curly hair", "curly haired woman"], "u": "1f469-200d-1f9b1", "v": ["1f469-1f3fb-200d-1f9b1", "1f469-1f3fc-200d-1f9b1", "1f469-1f3fd-200d-1f9b1", "1f469-1f3fe-200d-1f9b1", "1f469-1f3ff-200d-1f9b1"] }, { "n": ["person: curly hair", "curly haired person"], "u": "1f9d1-200d-1f9b1", "v": ["1f9d1-1f3fb-200d-1f9b1", "1f9d1-1f3fc-200d-1f9b1", "1f9d1-1f3fd-200d-1f9b1", "1f9d1-1f3fe-200d-1f9b1", "1f9d1-1f3ff-200d-1f9b1"] }, { "n": ["woman: white hair", "white haired woman"], "u": "1f469-200d-1f9b3", "v": ["1f469-1f3fb-200d-1f9b3", "1f469-1f3fc-200d-1f9b3", "1f469-1f3fd-200d-1f9b3", "1f469-1f3fe-200d-1f9b3", "1f469-1f3ff-200d-1f9b3"] }, { "n": ["person: white hair", "white haired person"], "u": "1f9d1-200d-1f9b3", "v": ["1f9d1-1f3fb-200d-1f9b3", "1f9d1-1f3fc-200d-1f9b3", "1f9d1-1f3fd-200d-1f9b3", "1f9d1-1f3fe-200d-1f9b3", "1f9d1-1f3ff-200d-1f9b3"] }, { "n": ["bald woman", "woman: bald"], "u": "1f469-200d-1f9b2", "v": ["1f469-1f3fb-200d-1f9b2", "1f469-1f3fc-200d-1f9b2", "1f469-1f3fd-200d-1f9b2", "1f469-1f3fe-200d-1f9b2", "1f469-1f3ff-200d-1f9b2"] }, { "n": ["bald person", "person: bald"], "u": "1f9d1-200d-1f9b2", "v": ["1f9d1-1f3fb-200d-1f9b2", "1f9d1-1f3fc-200d-1f9b2", "1f9d1-1f3fd-200d-1f9b2", "1f9d1-1f3fe-200d-1f9b2", "1f9d1-1f3ff-200d-1f9b2"] }, { "n": ["woman: blond hair", "blond-haired-woman"], "u": "1f471-200d-2640-fe0f", "v": ["1f471-1f3fb-200d-2640-fe0f", "1f471-1f3fc-200d-2640-fe0f", "1f471-1f3fd-200d-2640-fe0f", "1f471-1f3fe-200d-2640-fe0f", "1f471-1f3ff-200d-2640-fe0f"] }, { "n": ["man: blond hair", "blond-haired-man"], "u": "1f471-200d-2642-fe0f", "v": ["1f471-1f3fb-200d-2642-fe0f", "1f471-1f3fc-200d-2642-fe0f", "1f471-1f3fd-200d-2642-fe0f", "1f471-1f3fe-200d-2642-fe0f", "1f471-1f3ff-200d-2642-fe0f"] }, { "n": ["older adult"], "u": "1f9d3", "v": ["1f9d3-1f3fb", "1f9d3-1f3fc", "1f9d3-1f3fd", "1f9d3-1f3fe", "1f9d3-1f3ff"] }, { "n": ["older man"], "u": "1f474", "v": ["1f474-1f3fb", "1f474-1f3fc", "1f474-1f3fd", "1f474-1f3fe", "1f474-1f3ff"] }, { "n": ["older woman"], "u": "1f475", "v": ["1f475-1f3fb", "1f475-1f3fc", "1f475-1f3fd", "1f475-1f3fe", "1f475-1f3ff"] }, { "n": ["person frowning"], "u": "1f64d", "v": ["1f64d-1f3fb", "1f64d-1f3fc", "1f64d-1f3fd", "1f64d-1f3fe", "1f64d-1f3ff"] }, { "n": ["man frowning", "man-frowning"], "u": "1f64d-200d-2642-fe0f", "v": ["1f64d-1f3fb-200d-2642-fe0f", "1f64d-1f3fc-200d-2642-fe0f", "1f64d-1f3fd-200d-2642-fe0f", "1f64d-1f3fe-200d-2642-fe0f", "1f64d-1f3ff-200d-2642-fe0f"] }, { "n": ["woman frowning", "woman-frowning"], "u": "1f64d-200d-2640-fe0f", "v": ["1f64d-1f3fb-200d-2640-fe0f", "1f64d-1f3fc-200d-2640-fe0f", "1f64d-1f3fd-200d-2640-fe0f", "1f64d-1f3fe-200d-2640-fe0f", "1f64d-1f3ff-200d-2640-fe0f"] }, { "n": ["person with pouting face"], "u": "1f64e", "v": ["1f64e-1f3fb", "1f64e-1f3fc", "1f64e-1f3fd", "1f64e-1f3fe", "1f64e-1f3ff"] }, { "n": ["man pouting", "man-pouting"], "u": "1f64e-200d-2642-fe0f", "v": ["1f64e-1f3fb-200d-2642-fe0f", "1f64e-1f3fc-200d-2642-fe0f", "1f64e-1f3fd-200d-2642-fe0f", "1f64e-1f3fe-200d-2642-fe0f", "1f64e-1f3ff-200d-2642-fe0f"] }, { "n": ["woman pouting", "woman-pouting"], "u": "1f64e-200d-2640-fe0f", "v": ["1f64e-1f3fb-200d-2640-fe0f", "1f64e-1f3fc-200d-2640-fe0f", "1f64e-1f3fd-200d-2640-fe0f", "1f64e-1f3fe-200d-2640-fe0f", "1f64e-1f3ff-200d-2640-fe0f"] }, { "n": ["no good", "face with no good gesture"], "u": "1f645", "v": ["1f645-1f3fb", "1f645-1f3fc", "1f645-1f3fd", "1f645-1f3fe", "1f645-1f3ff"] }, { "n": ["man gesturing no", "man-gesturing-no"], "u": "1f645-200d-2642-fe0f", "v": ["1f645-1f3fb-200d-2642-fe0f", "1f645-1f3fc-200d-2642-fe0f", "1f645-1f3fd-200d-2642-fe0f", "1f645-1f3fe-200d-2642-fe0f", "1f645-1f3ff-200d-2642-fe0f"] }, { "n": ["woman gesturing no", "woman-gesturing-no"], "u": "1f645-200d-2640-fe0f", "v": ["1f645-1f3fb-200d-2640-fe0f", "1f645-1f3fc-200d-2640-fe0f", "1f645-1f3fd-200d-2640-fe0f", "1f645-1f3fe-200d-2640-fe0f", "1f645-1f3ff-200d-2640-fe0f"] }, { "n": ["ok woman", "face with ok gesture"], "u": "1f646", "v": ["1f646-1f3fb", "1f646-1f3fc", "1f646-1f3fd", "1f646-1f3fe", "1f646-1f3ff"] }, { "n": ["man gesturing ok", "man-gesturing-ok"], "u": "1f646-200d-2642-fe0f", "v": ["1f646-1f3fb-200d-2642-fe0f", "1f646-1f3fc-200d-2642-fe0f", "1f646-1f3fd-200d-2642-fe0f", "1f646-1f3fe-200d-2642-fe0f", "1f646-1f3ff-200d-2642-fe0f"] }, { "n": ["woman gesturing ok", "woman-gesturing-ok"], "u": "1f646-200d-2640-fe0f", "v": ["1f646-1f3fb-200d-2640-fe0f", "1f646-1f3fc-200d-2640-fe0f", "1f646-1f3fd-200d-2640-fe0f", "1f646-1f3fe-200d-2640-fe0f", "1f646-1f3ff-200d-2640-fe0f"] }, { "n": ["information desk person"], "u": "1f481", "v": ["1f481-1f3fb", "1f481-1f3fc", "1f481-1f3fd", "1f481-1f3fe", "1f481-1f3ff"] }, { "n": ["man tipping hand", "man-tipping-hand"], "u": "1f481-200d-2642-fe0f", "v": ["1f481-1f3fb-200d-2642-fe0f", "1f481-1f3fc-200d-2642-fe0f", "1f481-1f3fd-200d-2642-fe0f", "1f481-1f3fe-200d-2642-fe0f", "1f481-1f3ff-200d-2642-fe0f"] }, { "n": ["woman tipping hand", "woman-tipping-hand"], "u": "1f481-200d-2640-fe0f", "v": ["1f481-1f3fb-200d-2640-fe0f", "1f481-1f3fc-200d-2640-fe0f", "1f481-1f3fd-200d-2640-fe0f", "1f481-1f3fe-200d-2640-fe0f", "1f481-1f3ff-200d-2640-fe0f"] }, { "n": ["raising hand", "happy person raising one hand"], "u": "1f64b", "v": ["1f64b-1f3fb", "1f64b-1f3fc", "1f64b-1f3fd", "1f64b-1f3fe", "1f64b-1f3ff"] }, { "n": ["man raising hand", "man-raising-hand"], "u": "1f64b-200d-2642-fe0f", "v": ["1f64b-1f3fb-200d-2642-fe0f", "1f64b-1f3fc-200d-2642-fe0f", "1f64b-1f3fd-200d-2642-fe0f", "1f64b-1f3fe-200d-2642-fe0f", "1f64b-1f3ff-200d-2642-fe0f"] }, { "n": ["woman raising hand", "woman-raising-hand"], "u": "1f64b-200d-2640-fe0f", "v": ["1f64b-1f3fb-200d-2640-fe0f", "1f64b-1f3fc-200d-2640-fe0f", "1f64b-1f3fd-200d-2640-fe0f", "1f64b-1f3fe-200d-2640-fe0f", "1f64b-1f3ff-200d-2640-fe0f"] }, { "n": ["deaf person"], "u": "1f9cf", "v": ["1f9cf-1f3fb", "1f9cf-1f3fc", "1f9cf-1f3fd", "1f9cf-1f3fe", "1f9cf-1f3ff"] }, { "n": ["deaf man"], "u": "1f9cf-200d-2642-fe0f", "v": ["1f9cf-1f3fb-200d-2642-fe0f", "1f9cf-1f3fc-200d-2642-fe0f", "1f9cf-1f3fd-200d-2642-fe0f", "1f9cf-1f3fe-200d-2642-fe0f", "1f9cf-1f3ff-200d-2642-fe0f"] }, { "n": ["deaf woman"], "u": "1f9cf-200d-2640-fe0f", "v": ["1f9cf-1f3fb-200d-2640-fe0f", "1f9cf-1f3fc-200d-2640-fe0f", "1f9cf-1f3fd-200d-2640-fe0f", "1f9cf-1f3fe-200d-2640-fe0f", "1f9cf-1f3ff-200d-2640-fe0f"] }, { "n": ["bow", "person bowing deeply"], "u": "1f647", "v": ["1f647-1f3fb", "1f647-1f3fc", "1f647-1f3fd", "1f647-1f3fe", "1f647-1f3ff"] }, { "n": ["man bowing", "man-bowing"], "u": "1f647-200d-2642-fe0f", "v": ["1f647-1f3fb-200d-2642-fe0f", "1f647-1f3fc-200d-2642-fe0f", "1f647-1f3fd-200d-2642-fe0f", "1f647-1f3fe-200d-2642-fe0f", "1f647-1f3ff-200d-2642-fe0f"] }, { "n": ["woman bowing", "woman-bowing"], "u": "1f647-200d-2640-fe0f", "v": ["1f647-1f3fb-200d-2640-fe0f", "1f647-1f3fc-200d-2640-fe0f", "1f647-1f3fd-200d-2640-fe0f", "1f647-1f3fe-200d-2640-fe0f", "1f647-1f3ff-200d-2640-fe0f"] }, { "n": ["face palm"], "u": "1f926", "v": ["1f926-1f3fb", "1f926-1f3fc", "1f926-1f3fd", "1f926-1f3fe", "1f926-1f3ff"] }, { "n": ["man facepalming", "man-facepalming"], "u": "1f926-200d-2642-fe0f", "v": ["1f926-1f3fb-200d-2642-fe0f", "1f926-1f3fc-200d-2642-fe0f", "1f926-1f3fd-200d-2642-fe0f", "1f926-1f3fe-200d-2642-fe0f", "1f926-1f3ff-200d-2642-fe0f"] }, { "n": ["woman facepalming", "woman-facepalming"], "u": "1f926-200d-2640-fe0f", "v": ["1f926-1f3fb-200d-2640-fe0f", "1f926-1f3fc-200d-2640-fe0f", "1f926-1f3fd-200d-2640-fe0f", "1f926-1f3fe-200d-2640-fe0f", "1f926-1f3ff-200d-2640-fe0f"] }, { "n": ["shrug"], "u": "1f937", "v": ["1f937-1f3fb", "1f937-1f3fc", "1f937-1f3fd", "1f937-1f3fe", "1f937-1f3ff"] }, { "n": ["man shrugging", "man-shrugging"], "u": "1f937-200d-2642-fe0f", "v": ["1f937-1f3fb-200d-2642-fe0f", "1f937-1f3fc-200d-2642-fe0f", "1f937-1f3fd-200d-2642-fe0f", "1f937-1f3fe-200d-2642-fe0f", "1f937-1f3ff-200d-2642-fe0f"] }, { "n": ["woman shrugging", "woman-shrugging"], "u": "1f937-200d-2640-fe0f", "v": ["1f937-1f3fb-200d-2640-fe0f", "1f937-1f3fc-200d-2640-fe0f", "1f937-1f3fd-200d-2640-fe0f", "1f937-1f3fe-200d-2640-fe0f", "1f937-1f3ff-200d-2640-fe0f"] }, { "n": ["health worker"], "u": "1f9d1-200d-2695-fe0f", "v": ["1f9d1-1f3fb-200d-2695-fe0f", "1f9d1-1f3fc-200d-2695-fe0f", "1f9d1-1f3fd-200d-2695-fe0f", "1f9d1-1f3fe-200d-2695-fe0f", "1f9d1-1f3ff-200d-2695-fe0f"] }, { "n": ["male-doctor", "man health worker"], "u": "1f468-200d-2695-fe0f", "v": ["1f468-1f3fb-200d-2695-fe0f", "1f468-1f3fc-200d-2695-fe0f", "1f468-1f3fd-200d-2695-fe0f", "1f468-1f3fe-200d-2695-fe0f", "1f468-1f3ff-200d-2695-fe0f"] }, { "n": ["female-doctor", "woman health worker"], "u": "1f469-200d-2695-fe0f", "v": ["1f469-1f3fb-200d-2695-fe0f", "1f469-1f3fc-200d-2695-fe0f", "1f469-1f3fd-200d-2695-fe0f", "1f469-1f3fe-200d-2695-fe0f", "1f469-1f3ff-200d-2695-fe0f"] }, { "n": ["student"], "u": "1f9d1-200d-1f393", "v": ["1f9d1-1f3fb-200d-1f393", "1f9d1-1f3fc-200d-1f393", "1f9d1-1f3fd-200d-1f393", "1f9d1-1f3fe-200d-1f393", "1f9d1-1f3ff-200d-1f393"] }, { "n": ["man student", "male-student"], "u": "1f468-200d-1f393", "v": ["1f468-1f3fb-200d-1f393", "1f468-1f3fc-200d-1f393", "1f468-1f3fd-200d-1f393", "1f468-1f3fe-200d-1f393", "1f468-1f3ff-200d-1f393"] }, { "n": ["woman student", "female-student"], "u": "1f469-200d-1f393", "v": ["1f469-1f3fb-200d-1f393", "1f469-1f3fc-200d-1f393", "1f469-1f3fd-200d-1f393", "1f469-1f3fe-200d-1f393", "1f469-1f3ff-200d-1f393"] }, { "n": ["teacher"], "u": "1f9d1-200d-1f3eb", "v": ["1f9d1-1f3fb-200d-1f3eb", "1f9d1-1f3fc-200d-1f3eb", "1f9d1-1f3fd-200d-1f3eb", "1f9d1-1f3fe-200d-1f3eb", "1f9d1-1f3ff-200d-1f3eb"] }, { "n": ["man teacher", "male-teacher"], "u": "1f468-200d-1f3eb", "v": ["1f468-1f3fb-200d-1f3eb", "1f468-1f3fc-200d-1f3eb", "1f468-1f3fd-200d-1f3eb", "1f468-1f3fe-200d-1f3eb", "1f468-1f3ff-200d-1f3eb"] }, { "n": ["woman teacher", "female-teacher"], "u": "1f469-200d-1f3eb", "v": ["1f469-1f3fb-200d-1f3eb", "1f469-1f3fc-200d-1f3eb", "1f469-1f3fd-200d-1f3eb", "1f469-1f3fe-200d-1f3eb", "1f469-1f3ff-200d-1f3eb"] }, { "n": ["judge"], "u": "1f9d1-200d-2696-fe0f", "v": ["1f9d1-1f3fb-200d-2696-fe0f", "1f9d1-1f3fc-200d-2696-fe0f", "1f9d1-1f3fd-200d-2696-fe0f", "1f9d1-1f3fe-200d-2696-fe0f", "1f9d1-1f3ff-200d-2696-fe0f"] }, { "n": ["man judge", "male-judge"], "u": "1f468-200d-2696-fe0f", "v": ["1f468-1f3fb-200d-2696-fe0f", "1f468-1f3fc-200d-2696-fe0f", "1f468-1f3fd-200d-2696-fe0f", "1f468-1f3fe-200d-2696-fe0f", "1f468-1f3ff-200d-2696-fe0f"] }, { "n": ["woman judge", "female-judge"], "u": "1f469-200d-2696-fe0f", "v": ["1f469-1f3fb-200d-2696-fe0f", "1f469-1f3fc-200d-2696-fe0f", "1f469-1f3fd-200d-2696-fe0f", "1f469-1f3fe-200d-2696-fe0f", "1f469-1f3ff-200d-2696-fe0f"] }, { "n": ["farmer"], "u": "1f9d1-200d-1f33e", "v": ["1f9d1-1f3fb-200d-1f33e", "1f9d1-1f3fc-200d-1f33e", "1f9d1-1f3fd-200d-1f33e", "1f9d1-1f3fe-200d-1f33e", "1f9d1-1f3ff-200d-1f33e"] }, { "n": ["man farmer", "male-farmer"], "u": "1f468-200d-1f33e", "v": ["1f468-1f3fb-200d-1f33e", "1f468-1f3fc-200d-1f33e", "1f468-1f3fd-200d-1f33e", "1f468-1f3fe-200d-1f33e", "1f468-1f3ff-200d-1f33e"] }, { "n": ["woman farmer", "female-farmer"], "u": "1f469-200d-1f33e", "v": ["1f469-1f3fb-200d-1f33e", "1f469-1f3fc-200d-1f33e", "1f469-1f3fd-200d-1f33e", "1f469-1f3fe-200d-1f33e", "1f469-1f3ff-200d-1f33e"] }, { "n": ["cook"], "u": "1f9d1-200d-1f373", "v": ["1f9d1-1f3fb-200d-1f373", "1f9d1-1f3fc-200d-1f373", "1f9d1-1f3fd-200d-1f373", "1f9d1-1f3fe-200d-1f373", "1f9d1-1f3ff-200d-1f373"] }, { "n": ["man cook", "male-cook"], "u": "1f468-200d-1f373", "v": ["1f468-1f3fb-200d-1f373", "1f468-1f3fc-200d-1f373", "1f468-1f3fd-200d-1f373", "1f468-1f3fe-200d-1f373", "1f468-1f3ff-200d-1f373"] }, { "n": ["woman cook", "female-cook"], "u": "1f469-200d-1f373", "v": ["1f469-1f3fb-200d-1f373", "1f469-1f3fc-200d-1f373", "1f469-1f3fd-200d-1f373", "1f469-1f3fe-200d-1f373", "1f469-1f3ff-200d-1f373"] }, { "n": ["mechanic"], "u": "1f9d1-200d-1f527", "v": ["1f9d1-1f3fb-200d-1f527", "1f9d1-1f3fc-200d-1f527", "1f9d1-1f3fd-200d-1f527", "1f9d1-1f3fe-200d-1f527", "1f9d1-1f3ff-200d-1f527"] }, { "n": ["man mechanic", "male-mechanic"], "u": "1f468-200d-1f527", "v": ["1f468-1f3fb-200d-1f527", "1f468-1f3fc-200d-1f527", "1f468-1f3fd-200d-1f527", "1f468-1f3fe-200d-1f527", "1f468-1f3ff-200d-1f527"] }, { "n": ["woman mechanic", "female-mechanic"], "u": "1f469-200d-1f527", "v": ["1f469-1f3fb-200d-1f527", "1f469-1f3fc-200d-1f527", "1f469-1f3fd-200d-1f527", "1f469-1f3fe-200d-1f527", "1f469-1f3ff-200d-1f527"] }, { "n": ["factory worker"], "u": "1f9d1-200d-1f3ed", "v": ["1f9d1-1f3fb-200d-1f3ed", "1f9d1-1f3fc-200d-1f3ed", "1f9d1-1f3fd-200d-1f3ed", "1f9d1-1f3fe-200d-1f3ed", "1f9d1-1f3ff-200d-1f3ed"] }, { "n": ["man factory worker", "male-factory-worker"], "u": "1f468-200d-1f3ed", "v": ["1f468-1f3fb-200d-1f3ed", "1f468-1f3fc-200d-1f3ed", "1f468-1f3fd-200d-1f3ed", "1f468-1f3fe-200d-1f3ed", "1f468-1f3ff-200d-1f3ed"] }, { "n": ["woman factory worker", "female-factory-worker"], "u": "1f469-200d-1f3ed", "v": ["1f469-1f3fb-200d-1f3ed", "1f469-1f3fc-200d-1f3ed", "1f469-1f3fd-200d-1f3ed", "1f469-1f3fe-200d-1f3ed", "1f469-1f3ff-200d-1f3ed"] }, { "n": ["office worker"], "u": "1f9d1-200d-1f4bc", "v": ["1f9d1-1f3fb-200d-1f4bc", "1f9d1-1f3fc-200d-1f4bc", "1f9d1-1f3fd-200d-1f4bc", "1f9d1-1f3fe-200d-1f4bc", "1f9d1-1f3ff-200d-1f4bc"] }, { "n": ["man office worker", "male-office-worker"], "u": "1f468-200d-1f4bc", "v": ["1f468-1f3fb-200d-1f4bc", "1f468-1f3fc-200d-1f4bc", "1f468-1f3fd-200d-1f4bc", "1f468-1f3fe-200d-1f4bc", "1f468-1f3ff-200d-1f4bc"] }, { "n": ["woman office worker", "female-office-worker"], "u": "1f469-200d-1f4bc", "v": ["1f469-1f3fb-200d-1f4bc", "1f469-1f3fc-200d-1f4bc", "1f469-1f3fd-200d-1f4bc", "1f469-1f3fe-200d-1f4bc", "1f469-1f3ff-200d-1f4bc"] }, { "n": ["scientist"], "u": "1f9d1-200d-1f52c", "v": ["1f9d1-1f3fb-200d-1f52c", "1f9d1-1f3fc-200d-1f52c", "1f9d1-1f3fd-200d-1f52c", "1f9d1-1f3fe-200d-1f52c", "1f9d1-1f3ff-200d-1f52c"] }, { "n": ["man scientist", "male-scientist"], "u": "1f468-200d-1f52c", "v": ["1f468-1f3fb-200d-1f52c", "1f468-1f3fc-200d-1f52c", "1f468-1f3fd-200d-1f52c", "1f468-1f3fe-200d-1f52c", "1f468-1f3ff-200d-1f52c"] }, { "n": ["woman scientist", "female-scientist"], "u": "1f469-200d-1f52c", "v": ["1f469-1f3fb-200d-1f52c", "1f469-1f3fc-200d-1f52c", "1f469-1f3fd-200d-1f52c", "1f469-1f3fe-200d-1f52c", "1f469-1f3ff-200d-1f52c"] }, { "n": ["technologist"], "u": "1f9d1-200d-1f4bb", "v": ["1f9d1-1f3fb-200d-1f4bb", "1f9d1-1f3fc-200d-1f4bb", "1f9d1-1f3fd-200d-1f4bb", "1f9d1-1f3fe-200d-1f4bb", "1f9d1-1f3ff-200d-1f4bb"] }, { "n": ["man technologist", "male-technologist"], "u": "1f468-200d-1f4bb", "v": ["1f468-1f3fb-200d-1f4bb", "1f468-1f3fc-200d-1f4bb", "1f468-1f3fd-200d-1f4bb", "1f468-1f3fe-200d-1f4bb", "1f468-1f3ff-200d-1f4bb"] }, { "n": ["woman technologist", "female-technologist"], "u": "1f469-200d-1f4bb", "v": ["1f469-1f3fb-200d-1f4bb", "1f469-1f3fc-200d-1f4bb", "1f469-1f3fd-200d-1f4bb", "1f469-1f3fe-200d-1f4bb", "1f469-1f3ff-200d-1f4bb"] }, { "n": ["singer"], "u": "1f9d1-200d-1f3a4", "v": ["1f9d1-1f3fb-200d-1f3a4", "1f9d1-1f3fc-200d-1f3a4", "1f9d1-1f3fd-200d-1f3a4", "1f9d1-1f3fe-200d-1f3a4", "1f9d1-1f3ff-200d-1f3a4"] }, { "n": ["man singer", "male-singer"], "u": "1f468-200d-1f3a4", "v": ["1f468-1f3fb-200d-1f3a4", "1f468-1f3fc-200d-1f3a4", "1f468-1f3fd-200d-1f3a4", "1f468-1f3fe-200d-1f3a4", "1f468-1f3ff-200d-1f3a4"] }, { "n": ["woman singer", "female-singer"], "u": "1f469-200d-1f3a4", "v": ["1f469-1f3fb-200d-1f3a4", "1f469-1f3fc-200d-1f3a4", "1f469-1f3fd-200d-1f3a4", "1f469-1f3fe-200d-1f3a4", "1f469-1f3ff-200d-1f3a4"] }, { "n": ["artist"], "u": "1f9d1-200d-1f3a8", "v": ["1f9d1-1f3fb-200d-1f3a8", "1f9d1-1f3fc-200d-1f3a8", "1f9d1-1f3fd-200d-1f3a8", "1f9d1-1f3fe-200d-1f3a8", "1f9d1-1f3ff-200d-1f3a8"] }, { "n": ["man artist", "male-artist"], "u": "1f468-200d-1f3a8", "v": ["1f468-1f3fb-200d-1f3a8", "1f468-1f3fc-200d-1f3a8", "1f468-1f3fd-200d-1f3a8", "1f468-1f3fe-200d-1f3a8", "1f468-1f3ff-200d-1f3a8"] }, { "n": ["woman artist", "female-artist"], "u": "1f469-200d-1f3a8", "v": ["1f469-1f3fb-200d-1f3a8", "1f469-1f3fc-200d-1f3a8", "1f469-1f3fd-200d-1f3a8", "1f469-1f3fe-200d-1f3a8", "1f469-1f3ff-200d-1f3a8"] }, { "n": ["pilot"], "u": "1f9d1-200d-2708-fe0f", "v": ["1f9d1-1f3fb-200d-2708-fe0f", "1f9d1-1f3fc-200d-2708-fe0f", "1f9d1-1f3fd-200d-2708-fe0f", "1f9d1-1f3fe-200d-2708-fe0f", "1f9d1-1f3ff-200d-2708-fe0f"] }, { "n": ["man pilot", "male-pilot"], "u": "1f468-200d-2708-fe0f", "v": ["1f468-1f3fb-200d-2708-fe0f", "1f468-1f3fc-200d-2708-fe0f", "1f468-1f3fd-200d-2708-fe0f", "1f468-1f3fe-200d-2708-fe0f", "1f468-1f3ff-200d-2708-fe0f"] }, { "n": ["woman pilot", "female-pilot"], "u": "1f469-200d-2708-fe0f", "v": ["1f469-1f3fb-200d-2708-fe0f", "1f469-1f3fc-200d-2708-fe0f", "1f469-1f3fd-200d-2708-fe0f", "1f469-1f3fe-200d-2708-fe0f", "1f469-1f3ff-200d-2708-fe0f"] }, { "n": ["astronaut"], "u": "1f9d1-200d-1f680", "v": ["1f9d1-1f3fb-200d-1f680", "1f9d1-1f3fc-200d-1f680", "1f9d1-1f3fd-200d-1f680", "1f9d1-1f3fe-200d-1f680", "1f9d1-1f3ff-200d-1f680"] }, { "n": ["man astronaut", "male-astronaut"], "u": "1f468-200d-1f680", "v": ["1f468-1f3fb-200d-1f680", "1f468-1f3fc-200d-1f680", "1f468-1f3fd-200d-1f680", "1f468-1f3fe-200d-1f680", "1f468-1f3ff-200d-1f680"] }, { "n": ["woman astronaut", "female-astronaut"], "u": "1f469-200d-1f680", "v": ["1f469-1f3fb-200d-1f680", "1f469-1f3fc-200d-1f680", "1f469-1f3fd-200d-1f680", "1f469-1f3fe-200d-1f680", "1f469-1f3ff-200d-1f680"] }, { "n": ["firefighter"], "u": "1f9d1-200d-1f692", "v": ["1f9d1-1f3fb-200d-1f692", "1f9d1-1f3fc-200d-1f692", "1f9d1-1f3fd-200d-1f692", "1f9d1-1f3fe-200d-1f692", "1f9d1-1f3ff-200d-1f692"] }, { "n": ["man firefighter", "male-firefighter"], "u": "1f468-200d-1f692", "v": ["1f468-1f3fb-200d-1f692", "1f468-1f3fc-200d-1f692", "1f468-1f3fd-200d-1f692", "1f468-1f3fe-200d-1f692", "1f468-1f3ff-200d-1f692"] }, { "n": ["woman firefighter", "female-firefighter"], "u": "1f469-200d-1f692", "v": ["1f469-1f3fb-200d-1f692", "1f469-1f3fc-200d-1f692", "1f469-1f3fd-200d-1f692", "1f469-1f3fe-200d-1f692", "1f469-1f3ff-200d-1f692"] }, { "n": ["cop", "police officer"], "u": "1f46e", "v": ["1f46e-1f3fb", "1f46e-1f3fc", "1f46e-1f3fd", "1f46e-1f3fe", "1f46e-1f3ff"] }, { "n": ["man police officer", "male-police-officer"], "u": "1f46e-200d-2642-fe0f", "v": ["1f46e-1f3fb-200d-2642-fe0f", "1f46e-1f3fc-200d-2642-fe0f", "1f46e-1f3fd-200d-2642-fe0f", "1f46e-1f3fe-200d-2642-fe0f", "1f46e-1f3ff-200d-2642-fe0f"] }, { "n": ["woman police officer", "female-police-officer"], "u": "1f46e-200d-2640-fe0f", "v": ["1f46e-1f3fb-200d-2640-fe0f", "1f46e-1f3fc-200d-2640-fe0f", "1f46e-1f3fd-200d-2640-fe0f", "1f46e-1f3fe-200d-2640-fe0f", "1f46e-1f3ff-200d-2640-fe0f"] }, { "n": ["detective", "sleuth or spy"], "u": "1f575-fe0f", "v": ["1f575-1f3fb", "1f575-1f3fc", "1f575-1f3fd", "1f575-1f3fe", "1f575-1f3ff"] }, { "n": ["man detective", "male-detective"], "u": "1f575-fe0f-200d-2642-fe0f", "v": ["1f575-1f3fb-200d-2642-fe0f", "1f575-1f3fc-200d-2642-fe0f", "1f575-1f3fd-200d-2642-fe0f", "1f575-1f3fe-200d-2642-fe0f", "1f575-1f3ff-200d-2642-fe0f"] }, { "n": ["woman detective", "female-detective"], "u": "1f575-fe0f-200d-2640-fe0f", "v": ["1f575-1f3fb-200d-2640-fe0f", "1f575-1f3fc-200d-2640-fe0f", "1f575-1f3fd-200d-2640-fe0f", "1f575-1f3fe-200d-2640-fe0f", "1f575-1f3ff-200d-2640-fe0f"] }, { "n": ["guardsman"], "u": "1f482", "v": ["1f482-1f3fb", "1f482-1f3fc", "1f482-1f3fd", "1f482-1f3fe", "1f482-1f3ff"] }, { "n": ["man guard", "male-guard"], "u": "1f482-200d-2642-fe0f", "v": ["1f482-1f3fb-200d-2642-fe0f", "1f482-1f3fc-200d-2642-fe0f", "1f482-1f3fd-200d-2642-fe0f", "1f482-1f3fe-200d-2642-fe0f", "1f482-1f3ff-200d-2642-fe0f"] }, { "n": ["woman guard", "female-guard"], "u": "1f482-200d-2640-fe0f", "v": ["1f482-1f3fb-200d-2640-fe0f", "1f482-1f3fc-200d-2640-fe0f", "1f482-1f3fd-200d-2640-fe0f", "1f482-1f3fe-200d-2640-fe0f", "1f482-1f3ff-200d-2640-fe0f"] }, { "n": ["ninja"], "u": "1f977", "v": ["1f977-1f3fb", "1f977-1f3fc", "1f977-1f3fd", "1f977-1f3fe", "1f977-1f3ff"] }, { "n": ["construction worker"], "u": "1f477", "v": ["1f477-1f3fb", "1f477-1f3fc", "1f477-1f3fd", "1f477-1f3fe", "1f477-1f3ff"] }, { "n": ["man construction worker", "male-construction-worker"], "u": "1f477-200d-2642-fe0f", "v": ["1f477-1f3fb-200d-2642-fe0f", "1f477-1f3fc-200d-2642-fe0f", "1f477-1f3fd-200d-2642-fe0f", "1f477-1f3fe-200d-2642-fe0f", "1f477-1f3ff-200d-2642-fe0f"] }, { "n": ["woman construction worker", "female-construction-worker"], "u": "1f477-200d-2640-fe0f", "v": ["1f477-1f3fb-200d-2640-fe0f", "1f477-1f3fc-200d-2640-fe0f", "1f477-1f3fd-200d-2640-fe0f", "1f477-1f3fe-200d-2640-fe0f", "1f477-1f3ff-200d-2640-fe0f"] }, { "n": ["person with crown"], "u": "1fac5", "v": ["1fac5-1f3fb", "1fac5-1f3fc", "1fac5-1f3fd", "1fac5-1f3fe", "1fac5-1f3ff"] }, { "n": ["prince"], "u": "1f934", "v": ["1f934-1f3fb", "1f934-1f3fc", "1f934-1f3fd", "1f934-1f3fe", "1f934-1f3ff"] }, { "n": ["princess"], "u": "1f478", "v": ["1f478-1f3fb", "1f478-1f3fc", "1f478-1f3fd", "1f478-1f3fe", "1f478-1f3ff"] }, { "n": ["man with turban"], "u": "1f473", "v": ["1f473-1f3fb", "1f473-1f3fc", "1f473-1f3fd", "1f473-1f3fe", "1f473-1f3ff"] }, { "n": ["man wearing turban", "man-wearing-turban"], "u": "1f473-200d-2642-fe0f", "v": ["1f473-1f3fb-200d-2642-fe0f", "1f473-1f3fc-200d-2642-fe0f", "1f473-1f3fd-200d-2642-fe0f", "1f473-1f3fe-200d-2642-fe0f", "1f473-1f3ff-200d-2642-fe0f"] }, { "n": ["woman wearing turban", "woman-wearing-turban"], "u": "1f473-200d-2640-fe0f", "v": ["1f473-1f3fb-200d-2640-fe0f", "1f473-1f3fc-200d-2640-fe0f", "1f473-1f3fd-200d-2640-fe0f", "1f473-1f3fe-200d-2640-fe0f", "1f473-1f3ff-200d-2640-fe0f"] }, { "n": ["man with gua pi mao"], "u": "1f472", "v": ["1f472-1f3fb", "1f472-1f3fc", "1f472-1f3fd", "1f472-1f3fe", "1f472-1f3ff"] }, { "n": ["person with headscarf"], "u": "1f9d5", "v": ["1f9d5-1f3fb", "1f9d5-1f3fc", "1f9d5-1f3fd", "1f9d5-1f3fe", "1f9d5-1f3ff"] }, { "n": ["man in tuxedo", "person in tuxedo"], "u": "1f935", "v": ["1f935-1f3fb", "1f935-1f3fc", "1f935-1f3fd", "1f935-1f3fe", "1f935-1f3ff"] }, { "n": ["man in tuxedo"], "u": "1f935-200d-2642-fe0f", "v": ["1f935-1f3fb-200d-2642-fe0f", "1f935-1f3fc-200d-2642-fe0f", "1f935-1f3fd-200d-2642-fe0f", "1f935-1f3fe-200d-2642-fe0f", "1f935-1f3ff-200d-2642-fe0f"] }, { "n": ["woman in tuxedo"], "u": "1f935-200d-2640-fe0f", "v": ["1f935-1f3fb-200d-2640-fe0f", "1f935-1f3fc-200d-2640-fe0f", "1f935-1f3fd-200d-2640-fe0f", "1f935-1f3fe-200d-2640-fe0f", "1f935-1f3ff-200d-2640-fe0f"] }, { "n": ["bride with veil"], "u": "1f470", "v": ["1f470-1f3fb", "1f470-1f3fc", "1f470-1f3fd", "1f470-1f3fe", "1f470-1f3ff"] }, { "n": ["man with veil"], "u": "1f470-200d-2642-fe0f", "v": ["1f470-1f3fb-200d-2642-fe0f", "1f470-1f3fc-200d-2642-fe0f", "1f470-1f3fd-200d-2642-fe0f", "1f470-1f3fe-200d-2642-fe0f", "1f470-1f3ff-200d-2642-fe0f"] }, { "n": ["woman with veil"], "u": "1f470-200d-2640-fe0f", "v": ["1f470-1f3fb-200d-2640-fe0f", "1f470-1f3fc-200d-2640-fe0f", "1f470-1f3fd-200d-2640-fe0f", "1f470-1f3fe-200d-2640-fe0f", "1f470-1f3ff-200d-2640-fe0f"] }, { "n": ["pregnant woman"], "u": "1f930", "v": ["1f930-1f3fb", "1f930-1f3fc", "1f930-1f3fd", "1f930-1f3fe", "1f930-1f3ff"] }, { "n": ["pregnant man"], "u": "1fac3", "v": ["1fac3-1f3fb", "1fac3-1f3fc", "1fac3-1f3fd", "1fac3-1f3fe", "1fac3-1f3ff"] }, { "n": ["pregnant person"], "u": "1fac4", "v": ["1fac4-1f3fb", "1fac4-1f3fc", "1fac4-1f3fd", "1fac4-1f3fe", "1fac4-1f3ff"] }, { "n": ["breast-feeding"], "u": "1f931", "v": ["1f931-1f3fb", "1f931-1f3fc", "1f931-1f3fd", "1f931-1f3fe", "1f931-1f3ff"] }, { "n": ["woman feeding baby"], "u": "1f469-200d-1f37c", "v": ["1f469-1f3fb-200d-1f37c", "1f469-1f3fc-200d-1f37c", "1f469-1f3fd-200d-1f37c", "1f469-1f3fe-200d-1f37c", "1f469-1f3ff-200d-1f37c"] }, { "n": ["man feeding baby"], "u": "1f468-200d-1f37c", "v": ["1f468-1f3fb-200d-1f37c", "1f468-1f3fc-200d-1f37c", "1f468-1f3fd-200d-1f37c", "1f468-1f3fe-200d-1f37c", "1f468-1f3ff-200d-1f37c"] }, { "n": ["person feeding baby"], "u": "1f9d1-200d-1f37c", "v": ["1f9d1-1f3fb-200d-1f37c", "1f9d1-1f3fc-200d-1f37c", "1f9d1-1f3fd-200d-1f37c", "1f9d1-1f3fe-200d-1f37c", "1f9d1-1f3ff-200d-1f37c"] }, { "n": ["angel", "baby angel"], "u": "1f47c", "v": ["1f47c-1f3fb", "1f47c-1f3fc", "1f47c-1f3fd", "1f47c-1f3fe", "1f47c-1f3ff"] }, { "n": ["santa", "father christmas"], "u": "1f385", "v": ["1f385-1f3fb", "1f385-1f3fc", "1f385-1f3fd", "1f385-1f3fe", "1f385-1f3ff"] }, { "n": ["mrs claus", "mother christmas"], "u": "1f936", "v": ["1f936-1f3fb", "1f936-1f3fc", "1f936-1f3fd", "1f936-1f3fe", "1f936-1f3ff"] }, { "n": ["mx claus"], "u": "1f9d1-200d-1f384", "v": ["1f9d1-1f3fb-200d-1f384", "1f9d1-1f3fc-200d-1f384", "1f9d1-1f3fd-200d-1f384", "1f9d1-1f3fe-200d-1f384", "1f9d1-1f3ff-200d-1f384"] }, { "n": ["superhero"], "u": "1f9b8", "v": ["1f9b8-1f3fb", "1f9b8-1f3fc", "1f9b8-1f3fd", "1f9b8-1f3fe", "1f9b8-1f3ff"] }, { "n": ["man superhero", "male superhero"], "u": "1f9b8-200d-2642-fe0f", "v": ["1f9b8-1f3fb-200d-2642-fe0f", "1f9b8-1f3fc-200d-2642-fe0f", "1f9b8-1f3fd-200d-2642-fe0f", "1f9b8-1f3fe-200d-2642-fe0f", "1f9b8-1f3ff-200d-2642-fe0f"] }, { "n": ["woman superhero", "female superhero"], "u": "1f9b8-200d-2640-fe0f", "v": ["1f9b8-1f3fb-200d-2640-fe0f", "1f9b8-1f3fc-200d-2640-fe0f", "1f9b8-1f3fd-200d-2640-fe0f", "1f9b8-1f3fe-200d-2640-fe0f", "1f9b8-1f3ff-200d-2640-fe0f"] }, { "n": ["supervillain"], "u": "1f9b9", "v": ["1f9b9-1f3fb", "1f9b9-1f3fc", "1f9b9-1f3fd", "1f9b9-1f3fe", "1f9b9-1f3ff"] }, { "n": ["man supervillain", "male supervillain"], "u": "1f9b9-200d-2642-fe0f", "v": ["1f9b9-1f3fb-200d-2642-fe0f", "1f9b9-1f3fc-200d-2642-fe0f", "1f9b9-1f3fd-200d-2642-fe0f", "1f9b9-1f3fe-200d-2642-fe0f", "1f9b9-1f3ff-200d-2642-fe0f"] }, { "n": ["woman supervillain", "female supervillain"], "u": "1f9b9-200d-2640-fe0f", "v": ["1f9b9-1f3fb-200d-2640-fe0f", "1f9b9-1f3fc-200d-2640-fe0f", "1f9b9-1f3fd-200d-2640-fe0f", "1f9b9-1f3fe-200d-2640-fe0f", "1f9b9-1f3ff-200d-2640-fe0f"] }, { "n": ["mage"], "u": "1f9d9", "v": ["1f9d9-1f3fb", "1f9d9-1f3fc", "1f9d9-1f3fd", "1f9d9-1f3fe", "1f9d9-1f3ff"] }, { "n": ["man mage", "male mage"], "u": "1f9d9-200d-2642-fe0f", "v": ["1f9d9-1f3fb-200d-2642-fe0f", "1f9d9-1f3fc-200d-2642-fe0f", "1f9d9-1f3fd-200d-2642-fe0f", "1f9d9-1f3fe-200d-2642-fe0f", "1f9d9-1f3ff-200d-2642-fe0f"] }, { "n": ["woman mage", "female mage"], "u": "1f9d9-200d-2640-fe0f", "v": ["1f9d9-1f3fb-200d-2640-fe0f", "1f9d9-1f3fc-200d-2640-fe0f", "1f9d9-1f3fd-200d-2640-fe0f", "1f9d9-1f3fe-200d-2640-fe0f", "1f9d9-1f3ff-200d-2640-fe0f"] }, { "n": ["fairy"], "u": "1f9da", "v": ["1f9da-1f3fb", "1f9da-1f3fc", "1f9da-1f3fd", "1f9da-1f3fe", "1f9da-1f3ff"] }, { "n": ["man fairy", "male fairy"], "u": "1f9da-200d-2642-fe0f", "v": ["1f9da-1f3fb-200d-2642-fe0f", "1f9da-1f3fc-200d-2642-fe0f", "1f9da-1f3fd-200d-2642-fe0f", "1f9da-1f3fe-200d-2642-fe0f", "1f9da-1f3ff-200d-2642-fe0f"] }, { "n": ["woman fairy", "female fairy"], "u": "1f9da-200d-2640-fe0f", "v": ["1f9da-1f3fb-200d-2640-fe0f", "1f9da-1f3fc-200d-2640-fe0f", "1f9da-1f3fd-200d-2640-fe0f", "1f9da-1f3fe-200d-2640-fe0f", "1f9da-1f3ff-200d-2640-fe0f"] }, { "n": ["vampire"], "u": "1f9db", "v": ["1f9db-1f3fb", "1f9db-1f3fc", "1f9db-1f3fd", "1f9db-1f3fe", "1f9db-1f3ff"] }, { "n": ["man vampire", "male vampire"], "u": "1f9db-200d-2642-fe0f", "v": ["1f9db-1f3fb-200d-2642-fe0f", "1f9db-1f3fc-200d-2642-fe0f", "1f9db-1f3fd-200d-2642-fe0f", "1f9db-1f3fe-200d-2642-fe0f", "1f9db-1f3ff-200d-2642-fe0f"] }, { "n": ["woman vampire", "female vampire"], "u": "1f9db-200d-2640-fe0f", "v": ["1f9db-1f3fb-200d-2640-fe0f", "1f9db-1f3fc-200d-2640-fe0f", "1f9db-1f3fd-200d-2640-fe0f", "1f9db-1f3fe-200d-2640-fe0f", "1f9db-1f3ff-200d-2640-fe0f"] }, { "n": ["merperson"], "u": "1f9dc", "v": ["1f9dc-1f3fb", "1f9dc-1f3fc", "1f9dc-1f3fd", "1f9dc-1f3fe", "1f9dc-1f3ff"] }, { "n": ["merman"], "u": "1f9dc-200d-2642-fe0f", "v": ["1f9dc-1f3fb-200d-2642-fe0f", "1f9dc-1f3fc-200d-2642-fe0f", "1f9dc-1f3fd-200d-2642-fe0f", "1f9dc-1f3fe-200d-2642-fe0f", "1f9dc-1f3ff-200d-2642-fe0f"] }, { "n": ["mermaid"], "u": "1f9dc-200d-2640-fe0f", "v": ["1f9dc-1f3fb-200d-2640-fe0f", "1f9dc-1f3fc-200d-2640-fe0f", "1f9dc-1f3fd-200d-2640-fe0f", "1f9dc-1f3fe-200d-2640-fe0f", "1f9dc-1f3ff-200d-2640-fe0f"] }, { "n": ["elf"], "u": "1f9dd", "v": ["1f9dd-1f3fb", "1f9dd-1f3fc", "1f9dd-1f3fd", "1f9dd-1f3fe", "1f9dd-1f3ff"] }, { "n": ["man elf", "male elf"], "u": "1f9dd-200d-2642-fe0f", "v": ["1f9dd-1f3fb-200d-2642-fe0f", "1f9dd-1f3fc-200d-2642-fe0f", "1f9dd-1f3fd-200d-2642-fe0f", "1f9dd-1f3fe-200d-2642-fe0f", "1f9dd-1f3ff-200d-2642-fe0f"] }, { "n": ["woman elf", "female elf"], "u": "1f9dd-200d-2640-fe0f", "v": ["1f9dd-1f3fb-200d-2640-fe0f", "1f9dd-1f3fc-200d-2640-fe0f", "1f9dd-1f3fd-200d-2640-fe0f", "1f9dd-1f3fe-200d-2640-fe0f", "1f9dd-1f3ff-200d-2640-fe0f"] }, { "n": ["genie"], "u": "1f9de" }, { "n": ["man genie", "male genie"], "u": "1f9de-200d-2642-fe0f" }, { "n": ["woman genie", "female genie"], "u": "1f9de-200d-2640-fe0f" }, { "n": ["zombie"], "u": "1f9df" }, { "n": ["man zombie", "male zombie"], "u": "1f9df-200d-2642-fe0f" }, { "n": ["woman zombie", "female zombie"], "u": "1f9df-200d-2640-fe0f" }, { "n": ["troll"], "u": "1f9cc" }, { "n": ["massage", "face massage"], "u": "1f486", "v": ["1f486-1f3fb", "1f486-1f3fc", "1f486-1f3fd", "1f486-1f3fe", "1f486-1f3ff"] }, { "n": ["man getting massage", "man-getting-massage"], "u": "1f486-200d-2642-fe0f", "v": ["1f486-1f3fb-200d-2642-fe0f", "1f486-1f3fc-200d-2642-fe0f", "1f486-1f3fd-200d-2642-fe0f", "1f486-1f3fe-200d-2642-fe0f", "1f486-1f3ff-200d-2642-fe0f"] }, { "n": ["woman getting massage", "woman-getting-massage"], "u": "1f486-200d-2640-fe0f", "v": ["1f486-1f3fb-200d-2640-fe0f", "1f486-1f3fc-200d-2640-fe0f", "1f486-1f3fd-200d-2640-fe0f", "1f486-1f3fe-200d-2640-fe0f", "1f486-1f3ff-200d-2640-fe0f"] }, { "n": ["haircut"], "u": "1f487", "v": ["1f487-1f3fb", "1f487-1f3fc", "1f487-1f3fd", "1f487-1f3fe", "1f487-1f3ff"] }, { "n": ["man getting haircut", "man-getting-haircut"], "u": "1f487-200d-2642-fe0f", "v": ["1f487-1f3fb-200d-2642-fe0f", "1f487-1f3fc-200d-2642-fe0f", "1f487-1f3fd-200d-2642-fe0f", "1f487-1f3fe-200d-2642-fe0f", "1f487-1f3ff-200d-2642-fe0f"] }, { "n": ["woman getting haircut", "woman-getting-haircut"], "u": "1f487-200d-2640-fe0f", "v": ["1f487-1f3fb-200d-2640-fe0f", "1f487-1f3fc-200d-2640-fe0f", "1f487-1f3fd-200d-2640-fe0f", "1f487-1f3fe-200d-2640-fe0f", "1f487-1f3ff-200d-2640-fe0f"] }, { "n": ["walking", "pedestrian"], "u": "1f6b6", "v": ["1f6b6-1f3fb", "1f6b6-1f3fc", "1f6b6-1f3fd", "1f6b6-1f3fe", "1f6b6-1f3ff"] }, { "n": ["man walking", "man-walking"], "u": "1f6b6-200d-2642-fe0f", "v": ["1f6b6-1f3fb-200d-2642-fe0f", "1f6b6-1f3fc-200d-2642-fe0f", "1f6b6-1f3fd-200d-2642-fe0f", "1f6b6-1f3fe-200d-2642-fe0f", "1f6b6-1f3ff-200d-2642-fe0f"] }, { "n": ["woman walking", "woman-walking"], "u": "1f6b6-200d-2640-fe0f", "v": ["1f6b6-1f3fb-200d-2640-fe0f", "1f6b6-1f3fc-200d-2640-fe0f", "1f6b6-1f3fd-200d-2640-fe0f", "1f6b6-1f3fe-200d-2640-fe0f", "1f6b6-1f3ff-200d-2640-fe0f"] }, { "n": ["standing person"], "u": "1f9cd", "v": ["1f9cd-1f3fb", "1f9cd-1f3fc", "1f9cd-1f3fd", "1f9cd-1f3fe", "1f9cd-1f3ff"] }, { "n": ["man standing"], "u": "1f9cd-200d-2642-fe0f", "v": ["1f9cd-1f3fb-200d-2642-fe0f", "1f9cd-1f3fc-200d-2642-fe0f", "1f9cd-1f3fd-200d-2642-fe0f", "1f9cd-1f3fe-200d-2642-fe0f", "1f9cd-1f3ff-200d-2642-fe0f"] }, { "n": ["woman standing"], "u": "1f9cd-200d-2640-fe0f", "v": ["1f9cd-1f3fb-200d-2640-fe0f", "1f9cd-1f3fc-200d-2640-fe0f", "1f9cd-1f3fd-200d-2640-fe0f", "1f9cd-1f3fe-200d-2640-fe0f", "1f9cd-1f3ff-200d-2640-fe0f"] }, { "n": ["kneeling person"], "u": "1f9ce", "v": ["1f9ce-1f3fb", "1f9ce-1f3fc", "1f9ce-1f3fd", "1f9ce-1f3fe", "1f9ce-1f3ff"] }, { "n": ["man kneeling"], "u": "1f9ce-200d-2642-fe0f", "v": ["1f9ce-1f3fb-200d-2642-fe0f", "1f9ce-1f3fc-200d-2642-fe0f", "1f9ce-1f3fd-200d-2642-fe0f", "1f9ce-1f3fe-200d-2642-fe0f", "1f9ce-1f3ff-200d-2642-fe0f"] }, { "n": ["woman kneeling"], "u": "1f9ce-200d-2640-fe0f", "v": ["1f9ce-1f3fb-200d-2640-fe0f", "1f9ce-1f3fc-200d-2640-fe0f", "1f9ce-1f3fd-200d-2640-fe0f", "1f9ce-1f3fe-200d-2640-fe0f", "1f9ce-1f3ff-200d-2640-fe0f"] }, { "n": ["person with white cane", "person with probing cane"], "u": "1f9d1-200d-1f9af", "v": ["1f9d1-1f3fb-200d-1f9af", "1f9d1-1f3fc-200d-1f9af", "1f9d1-1f3fd-200d-1f9af", "1f9d1-1f3fe-200d-1f9af", "1f9d1-1f3ff-200d-1f9af"] }, { "n": ["man with white cane", "man with probing cane"], "u": "1f468-200d-1f9af", "v": ["1f468-1f3fb-200d-1f9af", "1f468-1f3fc-200d-1f9af", "1f468-1f3fd-200d-1f9af", "1f468-1f3fe-200d-1f9af", "1f468-1f3ff-200d-1f9af"] }, { "n": ["woman with white cane", "woman with probing cane"], "u": "1f469-200d-1f9af", "v": ["1f469-1f3fb-200d-1f9af", "1f469-1f3fc-200d-1f9af", "1f469-1f3fd-200d-1f9af", "1f469-1f3fe-200d-1f9af", "1f469-1f3ff-200d-1f9af"] }, { "n": ["person in motorized wheelchair"], "u": "1f9d1-200d-1f9bc", "v": ["1f9d1-1f3fb-200d-1f9bc", "1f9d1-1f3fc-200d-1f9bc", "1f9d1-1f3fd-200d-1f9bc", "1f9d1-1f3fe-200d-1f9bc", "1f9d1-1f3ff-200d-1f9bc"] }, { "n": ["man in motorized wheelchair"], "u": "1f468-200d-1f9bc", "v": ["1f468-1f3fb-200d-1f9bc", "1f468-1f3fc-200d-1f9bc", "1f468-1f3fd-200d-1f9bc", "1f468-1f3fe-200d-1f9bc", "1f468-1f3ff-200d-1f9bc"] }, { "n": ["woman in motorized wheelchair"], "u": "1f469-200d-1f9bc", "v": ["1f469-1f3fb-200d-1f9bc", "1f469-1f3fc-200d-1f9bc", "1f469-1f3fd-200d-1f9bc", "1f469-1f3fe-200d-1f9bc", "1f469-1f3ff-200d-1f9bc"] }, { "n": ["person in manual wheelchair"], "u": "1f9d1-200d-1f9bd", "v": ["1f9d1-1f3fb-200d-1f9bd", "1f9d1-1f3fc-200d-1f9bd", "1f9d1-1f3fd-200d-1f9bd", "1f9d1-1f3fe-200d-1f9bd", "1f9d1-1f3ff-200d-1f9bd"] }, { "n": ["man in manual wheelchair"], "u": "1f468-200d-1f9bd", "v": ["1f468-1f3fb-200d-1f9bd", "1f468-1f3fc-200d-1f9bd", "1f468-1f3fd-200d-1f9bd", "1f468-1f3fe-200d-1f9bd", "1f468-1f3ff-200d-1f9bd"] }, { "n": ["woman in manual wheelchair"], "u": "1f469-200d-1f9bd", "v": ["1f469-1f3fb-200d-1f9bd", "1f469-1f3fc-200d-1f9bd", "1f469-1f3fd-200d-1f9bd", "1f469-1f3fe-200d-1f9bd", "1f469-1f3ff-200d-1f9bd"] }, { "n": ["runner", "running"], "u": "1f3c3", "v": ["1f3c3-1f3fb", "1f3c3-1f3fc", "1f3c3-1f3fd", "1f3c3-1f3fe", "1f3c3-1f3ff"] }, { "n": ["man running", "man-running"], "u": "1f3c3-200d-2642-fe0f", "v": ["1f3c3-1f3fb-200d-2642-fe0f", "1f3c3-1f3fc-200d-2642-fe0f", "1f3c3-1f3fd-200d-2642-fe0f", "1f3c3-1f3fe-200d-2642-fe0f", "1f3c3-1f3ff-200d-2642-fe0f"] }, { "n": ["woman running", "woman-running"], "u": "1f3c3-200d-2640-fe0f", "v": ["1f3c3-1f3fb-200d-2640-fe0f", "1f3c3-1f3fc-200d-2640-fe0f", "1f3c3-1f3fd-200d-2640-fe0f", "1f3c3-1f3fe-200d-2640-fe0f", "1f3c3-1f3ff-200d-2640-fe0f"] }, { "n": ["dancer"], "u": "1f483", "v": ["1f483-1f3fb", "1f483-1f3fc", "1f483-1f3fd", "1f483-1f3fe", "1f483-1f3ff"] }, { "n": ["man dancing"], "u": "1f57a", "v": ["1f57a-1f3fb", "1f57a-1f3fc", "1f57a-1f3fd", "1f57a-1f3fe", "1f57a-1f3ff"] }, { "n": ["person in suit levitating", "man in business suit levitating"], "u": "1f574-fe0f", "v": ["1f574-1f3fb", "1f574-1f3fc", "1f574-1f3fd", "1f574-1f3fe", "1f574-1f3ff"] }, { "n": ["dancers", "woman with bunny ears"], "u": "1f46f" }, { "n": ["men with bunny ears", "men-with-bunny-ears-partying", "man-with-bunny-ears-partying"], "u": "1f46f-200d-2642-fe0f" }, { "n": ["women with bunny ears", "women-with-bunny-ears-partying", "woman-with-bunny-ears-partying"], "u": "1f46f-200d-2640-fe0f" }, { "n": ["person in steamy room"], "u": "1f9d6", "v": ["1f9d6-1f3fb", "1f9d6-1f3fc", "1f9d6-1f3fd", "1f9d6-1f3fe", "1f9d6-1f3ff"] }, { "n": ["man in steamy room"], "u": "1f9d6-200d-2642-fe0f", "v": ["1f9d6-1f3fb-200d-2642-fe0f", "1f9d6-1f3fc-200d-2642-fe0f", "1f9d6-1f3fd-200d-2642-fe0f", "1f9d6-1f3fe-200d-2642-fe0f", "1f9d6-1f3ff-200d-2642-fe0f"] }, { "n": ["woman in steamy room"], "u": "1f9d6-200d-2640-fe0f", "v": ["1f9d6-1f3fb-200d-2640-fe0f", "1f9d6-1f3fc-200d-2640-fe0f", "1f9d6-1f3fd-200d-2640-fe0f", "1f9d6-1f3fe-200d-2640-fe0f", "1f9d6-1f3ff-200d-2640-fe0f"] }, { "n": ["person climbing"], "u": "1f9d7", "v": ["1f9d7-1f3fb", "1f9d7-1f3fc", "1f9d7-1f3fd", "1f9d7-1f3fe", "1f9d7-1f3ff"] }, { "n": ["man climbing"], "u": "1f9d7-200d-2642-fe0f", "v": ["1f9d7-1f3fb-200d-2642-fe0f", "1f9d7-1f3fc-200d-2642-fe0f", "1f9d7-1f3fd-200d-2642-fe0f", "1f9d7-1f3fe-200d-2642-fe0f", "1f9d7-1f3ff-200d-2642-fe0f"] }, { "n": ["woman climbing"], "u": "1f9d7-200d-2640-fe0f", "v": ["1f9d7-1f3fb-200d-2640-fe0f", "1f9d7-1f3fc-200d-2640-fe0f", "1f9d7-1f3fd-200d-2640-fe0f", "1f9d7-1f3fe-200d-2640-fe0f", "1f9d7-1f3ff-200d-2640-fe0f"] }, { "n": ["fencer"], "u": "1f93a" }, { "n": ["horse racing"], "u": "1f3c7", "v": ["1f3c7-1f3fb", "1f3c7-1f3fc", "1f3c7-1f3fd", "1f3c7-1f3fe", "1f3c7-1f3ff"] }, { "n": ["skier"], "u": "26f7-fe0f" }, { "n": ["snowboarder"], "u": "1f3c2", "v": ["1f3c2-1f3fb", "1f3c2-1f3fc", "1f3c2-1f3fd", "1f3c2-1f3fe", "1f3c2-1f3ff"] }, { "n": ["golfer", "person golfing"], "u": "1f3cc-fe0f", "v": ["1f3cc-1f3fb", "1f3cc-1f3fc", "1f3cc-1f3fd", "1f3cc-1f3fe", "1f3cc-1f3ff"] }, { "n": ["man golfing", "man-golfing"], "u": "1f3cc-fe0f-200d-2642-fe0f", "v": ["1f3cc-1f3fb-200d-2642-fe0f", "1f3cc-1f3fc-200d-2642-fe0f", "1f3cc-1f3fd-200d-2642-fe0f", "1f3cc-1f3fe-200d-2642-fe0f", "1f3cc-1f3ff-200d-2642-fe0f"] }, { "n": ["woman golfing", "woman-golfing"], "u": "1f3cc-fe0f-200d-2640-fe0f", "v": ["1f3cc-1f3fb-200d-2640-fe0f", "1f3cc-1f3fc-200d-2640-fe0f", "1f3cc-1f3fd-200d-2640-fe0f", "1f3cc-1f3fe-200d-2640-fe0f", "1f3cc-1f3ff-200d-2640-fe0f"] }, { "n": ["surfer"], "u": "1f3c4", "v": ["1f3c4-1f3fb", "1f3c4-1f3fc", "1f3c4-1f3fd", "1f3c4-1f3fe", "1f3c4-1f3ff"] }, { "n": ["man surfing", "man-surfing"], "u": "1f3c4-200d-2642-fe0f", "v": ["1f3c4-1f3fb-200d-2642-fe0f", "1f3c4-1f3fc-200d-2642-fe0f", "1f3c4-1f3fd-200d-2642-fe0f", "1f3c4-1f3fe-200d-2642-fe0f", "1f3c4-1f3ff-200d-2642-fe0f"] }, { "n": ["woman surfing", "woman-surfing"], "u": "1f3c4-200d-2640-fe0f", "v": ["1f3c4-1f3fb-200d-2640-fe0f", "1f3c4-1f3fc-200d-2640-fe0f", "1f3c4-1f3fd-200d-2640-fe0f", "1f3c4-1f3fe-200d-2640-fe0f", "1f3c4-1f3ff-200d-2640-fe0f"] }, { "n": ["rowboat"], "u": "1f6a3", "v": ["1f6a3-1f3fb", "1f6a3-1f3fc", "1f6a3-1f3fd", "1f6a3-1f3fe", "1f6a3-1f3ff"] }, { "n": ["man rowing boat", "man-rowing-boat"], "u": "1f6a3-200d-2642-fe0f", "v": ["1f6a3-1f3fb-200d-2642-fe0f", "1f6a3-1f3fc-200d-2642-fe0f", "1f6a3-1f3fd-200d-2642-fe0f", "1f6a3-1f3fe-200d-2642-fe0f", "1f6a3-1f3ff-200d-2642-fe0f"] }, { "n": ["woman rowing boat", "woman-rowing-boat"], "u": "1f6a3-200d-2640-fe0f", "v": ["1f6a3-1f3fb-200d-2640-fe0f", "1f6a3-1f3fc-200d-2640-fe0f", "1f6a3-1f3fd-200d-2640-fe0f", "1f6a3-1f3fe-200d-2640-fe0f", "1f6a3-1f3ff-200d-2640-fe0f"] }, { "n": ["swimmer"], "u": "1f3ca", "v": ["1f3ca-1f3fb", "1f3ca-1f3fc", "1f3ca-1f3fd", "1f3ca-1f3fe", "1f3ca-1f3ff"] }, { "n": ["man swimming", "man-swimming"], "u": "1f3ca-200d-2642-fe0f", "v": ["1f3ca-1f3fb-200d-2642-fe0f", "1f3ca-1f3fc-200d-2642-fe0f", "1f3ca-1f3fd-200d-2642-fe0f", "1f3ca-1f3fe-200d-2642-fe0f", "1f3ca-1f3ff-200d-2642-fe0f"] }, { "n": ["woman swimming", "woman-swimming"], "u": "1f3ca-200d-2640-fe0f", "v": ["1f3ca-1f3fb-200d-2640-fe0f", "1f3ca-1f3fc-200d-2640-fe0f", "1f3ca-1f3fd-200d-2640-fe0f", "1f3ca-1f3fe-200d-2640-fe0f", "1f3ca-1f3ff-200d-2640-fe0f"] }, { "n": ["person with ball", "person bouncing ball"], "u": "26f9-fe0f", "v": ["26f9-1f3fb", "26f9-1f3fc", "26f9-1f3fd", "26f9-1f3fe", "26f9-1f3ff"] }, { "n": ["man bouncing ball", "man-bouncing-ball"], "u": "26f9-fe0f-200d-2642-fe0f", "v": ["26f9-1f3fb-200d-2642-fe0f", "26f9-1f3fc-200d-2642-fe0f", "26f9-1f3fd-200d-2642-fe0f", "26f9-1f3fe-200d-2642-fe0f", "26f9-1f3ff-200d-2642-fe0f"] }, { "n": ["woman bouncing ball", "woman-bouncing-ball"], "u": "26f9-fe0f-200d-2640-fe0f", "v": ["26f9-1f3fb-200d-2640-fe0f", "26f9-1f3fc-200d-2640-fe0f", "26f9-1f3fd-200d-2640-fe0f", "26f9-1f3fe-200d-2640-fe0f", "26f9-1f3ff-200d-2640-fe0f"] }, { "n": ["weight lifter", "person lifting weights"], "u": "1f3cb-fe0f", "v": ["1f3cb-1f3fb", "1f3cb-1f3fc", "1f3cb-1f3fd", "1f3cb-1f3fe", "1f3cb-1f3ff"] }, { "n": ["man lifting weights", "man-lifting-weights"], "u": "1f3cb-fe0f-200d-2642-fe0f", "v": ["1f3cb-1f3fb-200d-2642-fe0f", "1f3cb-1f3fc-200d-2642-fe0f", "1f3cb-1f3fd-200d-2642-fe0f", "1f3cb-1f3fe-200d-2642-fe0f", "1f3cb-1f3ff-200d-2642-fe0f"] }, { "n": ["woman lifting weights", "woman-lifting-weights"], "u": "1f3cb-fe0f-200d-2640-fe0f", "v": ["1f3cb-1f3fb-200d-2640-fe0f", "1f3cb-1f3fc-200d-2640-fe0f", "1f3cb-1f3fd-200d-2640-fe0f", "1f3cb-1f3fe-200d-2640-fe0f", "1f3cb-1f3ff-200d-2640-fe0f"] }, { "n": ["bicyclist"], "u": "1f6b4", "v": ["1f6b4-1f3fb", "1f6b4-1f3fc", "1f6b4-1f3fd", "1f6b4-1f3fe", "1f6b4-1f3ff"] }, { "n": ["man biking", "man-biking"], "u": "1f6b4-200d-2642-fe0f", "v": ["1f6b4-1f3fb-200d-2642-fe0f", "1f6b4-1f3fc-200d-2642-fe0f", "1f6b4-1f3fd-200d-2642-fe0f", "1f6b4-1f3fe-200d-2642-fe0f", "1f6b4-1f3ff-200d-2642-fe0f"] }, { "n": ["woman biking", "woman-biking"], "u": "1f6b4-200d-2640-fe0f", "v": ["1f6b4-1f3fb-200d-2640-fe0f", "1f6b4-1f3fc-200d-2640-fe0f", "1f6b4-1f3fd-200d-2640-fe0f", "1f6b4-1f3fe-200d-2640-fe0f", "1f6b4-1f3ff-200d-2640-fe0f"] }, { "n": ["mountain bicyclist"], "u": "1f6b5", "v": ["1f6b5-1f3fb", "1f6b5-1f3fc", "1f6b5-1f3fd", "1f6b5-1f3fe", "1f6b5-1f3ff"] }, { "n": ["man mountain biking", "man-mountain-biking"], "u": "1f6b5-200d-2642-fe0f", "v": ["1f6b5-1f3fb-200d-2642-fe0f", "1f6b5-1f3fc-200d-2642-fe0f", "1f6b5-1f3fd-200d-2642-fe0f", "1f6b5-1f3fe-200d-2642-fe0f", "1f6b5-1f3ff-200d-2642-fe0f"] }, { "n": ["woman mountain biking", "woman-mountain-biking"], "u": "1f6b5-200d-2640-fe0f", "v": ["1f6b5-1f3fb-200d-2640-fe0f", "1f6b5-1f3fc-200d-2640-fe0f", "1f6b5-1f3fd-200d-2640-fe0f", "1f6b5-1f3fe-200d-2640-fe0f", "1f6b5-1f3ff-200d-2640-fe0f"] }, { "n": ["person doing cartwheel"], "u": "1f938", "v": ["1f938-1f3fb", "1f938-1f3fc", "1f938-1f3fd", "1f938-1f3fe", "1f938-1f3ff"] }, { "n": ["man cartwheeling", "man-cartwheeling"], "u": "1f938-200d-2642-fe0f", "v": ["1f938-1f3fb-200d-2642-fe0f", "1f938-1f3fc-200d-2642-fe0f", "1f938-1f3fd-200d-2642-fe0f", "1f938-1f3fe-200d-2642-fe0f", "1f938-1f3ff-200d-2642-fe0f"] }, { "n": ["woman cartwheeling", "woman-cartwheeling"], "u": "1f938-200d-2640-fe0f", "v": ["1f938-1f3fb-200d-2640-fe0f", "1f938-1f3fc-200d-2640-fe0f", "1f938-1f3fd-200d-2640-fe0f", "1f938-1f3fe-200d-2640-fe0f", "1f938-1f3ff-200d-2640-fe0f"] }, { "n": ["wrestlers"], "u": "1f93c" }, { "n": ["men wrestling", "man-wrestling"], "u": "1f93c-200d-2642-fe0f" }, { "n": ["women wrestling", "woman-wrestling"], "u": "1f93c-200d-2640-fe0f" }, { "n": ["water polo"], "u": "1f93d", "v": ["1f93d-1f3fb", "1f93d-1f3fc", "1f93d-1f3fd", "1f93d-1f3fe", "1f93d-1f3ff"] }, { "n": ["man playing water polo", "man-playing-water-polo"], "u": "1f93d-200d-2642-fe0f", "v": ["1f93d-1f3fb-200d-2642-fe0f", "1f93d-1f3fc-200d-2642-fe0f", "1f93d-1f3fd-200d-2642-fe0f", "1f93d-1f3fe-200d-2642-fe0f", "1f93d-1f3ff-200d-2642-fe0f"] }, { "n": ["woman playing water polo", "woman-playing-water-polo"], "u": "1f93d-200d-2640-fe0f", "v": ["1f93d-1f3fb-200d-2640-fe0f", "1f93d-1f3fc-200d-2640-fe0f", "1f93d-1f3fd-200d-2640-fe0f", "1f93d-1f3fe-200d-2640-fe0f", "1f93d-1f3ff-200d-2640-fe0f"] }, { "n": ["handball"], "u": "1f93e", "v": ["1f93e-1f3fb", "1f93e-1f3fc", "1f93e-1f3fd", "1f93e-1f3fe", "1f93e-1f3ff"] }, { "n": ["man playing handball", "man-playing-handball"], "u": "1f93e-200d-2642-fe0f", "v": ["1f93e-1f3fb-200d-2642-fe0f", "1f93e-1f3fc-200d-2642-fe0f", "1f93e-1f3fd-200d-2642-fe0f", "1f93e-1f3fe-200d-2642-fe0f", "1f93e-1f3ff-200d-2642-fe0f"] }, { "n": ["woman playing handball", "woman-playing-handball"], "u": "1f93e-200d-2640-fe0f", "v": ["1f93e-1f3fb-200d-2640-fe0f", "1f93e-1f3fc-200d-2640-fe0f", "1f93e-1f3fd-200d-2640-fe0f", "1f93e-1f3fe-200d-2640-fe0f", "1f93e-1f3ff-200d-2640-fe0f"] }, { "n": ["juggling"], "u": "1f939", "v": ["1f939-1f3fb", "1f939-1f3fc", "1f939-1f3fd", "1f939-1f3fe", "1f939-1f3ff"] }, { "n": ["man juggling", "man-juggling"], "u": "1f939-200d-2642-fe0f", "v": ["1f939-1f3fb-200d-2642-fe0f", "1f939-1f3fc-200d-2642-fe0f", "1f939-1f3fd-200d-2642-fe0f", "1f939-1f3fe-200d-2642-fe0f", "1f939-1f3ff-200d-2642-fe0f"] }, { "n": ["woman juggling", "woman-juggling"], "u": "1f939-200d-2640-fe0f", "v": ["1f939-1f3fb-200d-2640-fe0f", "1f939-1f3fc-200d-2640-fe0f", "1f939-1f3fd-200d-2640-fe0f", "1f939-1f3fe-200d-2640-fe0f", "1f939-1f3ff-200d-2640-fe0f"] }, { "n": ["person in lotus position"], "u": "1f9d8", "v": ["1f9d8-1f3fb", "1f9d8-1f3fc", "1f9d8-1f3fd", "1f9d8-1f3fe", "1f9d8-1f3ff"] }, { "n": ["man in lotus position"], "u": "1f9d8-200d-2642-fe0f", "v": ["1f9d8-1f3fb-200d-2642-fe0f", "1f9d8-1f3fc-200d-2642-fe0f", "1f9d8-1f3fd-200d-2642-fe0f", "1f9d8-1f3fe-200d-2642-fe0f", "1f9d8-1f3ff-200d-2642-fe0f"] }, { "n": ["woman in lotus position"], "u": "1f9d8-200d-2640-fe0f", "v": ["1f9d8-1f3fb-200d-2640-fe0f", "1f9d8-1f3fc-200d-2640-fe0f", "1f9d8-1f3fd-200d-2640-fe0f", "1f9d8-1f3fe-200d-2640-fe0f", "1f9d8-1f3ff-200d-2640-fe0f"] }, { "n": ["bath"], "u": "1f6c0", "v": ["1f6c0-1f3fb", "1f6c0-1f3fc", "1f6c0-1f3fd", "1f6c0-1f3fe", "1f6c0-1f3ff"] }, { "n": ["sleeping accommodation"], "u": "1f6cc", "v": ["1f6cc-1f3fb", "1f6cc-1f3fc", "1f6cc-1f3fd", "1f6cc-1f3fe", "1f6cc-1f3ff"] }, { "n": ["people holding hands"], "u": "1f9d1-200d-1f91d-200d-1f9d1", "v": ["1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb", "1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc", "1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd", "1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe", "1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff", "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb", "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc", "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd", "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe", "1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff", "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb", "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc", "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd", "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe", "1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff", "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb", "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc", "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd", "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe", "1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff", "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb", "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc", "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd", "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe", "1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff"] }, { "n": ["women holding hands", "two women holding hands"], "u": "1f46d", "v": ["1f46d-1f3fb", "1f46d-1f3fc", "1f46d-1f3fd", "1f46d-1f3fe", "1f46d-1f3ff", "1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc", "1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd", "1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe", "1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff", "1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb", "1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd", "1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe", "1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff", "1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb", "1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc", "1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe", "1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff", "1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb", "1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc", "1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd", "1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff", "1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb", "1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc", "1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd", "1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe"] }, { "n": ["couple", "man and woman holding hands", "woman and man holding hands"], "u": "1f46b", "v": ["1f46b-1f3fb", "1f46b-1f3fc", "1f46b-1f3fd", "1f46b-1f3fe", "1f46b-1f3ff", "1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc", "1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd", "1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe", "1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff", "1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb", "1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd", "1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe", "1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff", "1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb", "1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc", "1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe", "1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff", "1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb", "1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc", "1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd", "1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff", "1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb", "1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc", "1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd", "1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe"] }, { "n": ["men holding hands", "two men holding hands"], "u": "1f46c", "v": ["1f46c-1f3fb", "1f46c-1f3fc", "1f46c-1f3fd", "1f46c-1f3fe", "1f46c-1f3ff", "1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc", "1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd", "1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe", "1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff", "1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb", "1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd", "1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe", "1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff", "1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb", "1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc", "1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe", "1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff", "1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb", "1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc", "1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd", "1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff", "1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb", "1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc", "1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd", "1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe"] }, { "n": ["kiss", "couplekiss"], "u": "1f48f", "v": ["1f48f-1f3fb", "1f48f-1f3fc", "1f48f-1f3fd", "1f48f-1f3fe", "1f48f-1f3ff", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe"] }, { "n": ["woman-kiss-man", "kiss: woman, man"], "u": "1f469-200d-2764-fe0f-200d-1f48b-200d-1f468", "v": ["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"] }, { "n": ["man-kiss-man", "kiss: man, man"], "u": "1f468-200d-2764-fe0f-200d-1f48b-200d-1f468", "v": ["1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff", "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb", "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc", "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd", "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe", "1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"] }, { "n": ["woman-kiss-woman", "kiss: woman, woman"], "u": "1f469-200d-2764-fe0f-200d-1f48b-200d-1f469", "v": ["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe", "1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe", "1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe", "1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe", "1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe", "1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff"] }, { "n": ["couple with heart"], "u": "1f491", "v": ["1f491-1f3fb", "1f491-1f3fc", "1f491-1f3fd", "1f491-1f3fe", "1f491-1f3ff", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fc", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fd", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fe", "1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3ff", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fb", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fd", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fe", "1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3ff", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fb", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fc", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fe", "1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3ff", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fb", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fc", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fd", "1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3ff", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fb", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fc", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fd", "1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fe"] }, { "n": ["woman-heart-man", "couple with heart: woman, man"], "u": "1f469-200d-2764-fe0f-200d-1f468", "v": ["1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb", "1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc", "1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd", "1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe", "1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff", "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb", "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc", "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd", "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe", "1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff", "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb", "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc", "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd", "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe", "1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff", "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb", "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc", "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd", "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe", "1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff", "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb", "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc", "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd", "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe", "1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"] }, { "n": ["man-heart-man", "couple with heart: man, man"], "u": "1f468-200d-2764-fe0f-200d-1f468", "v": ["1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb", "1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc", "1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd", "1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe", "1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff", "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb", "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc", "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd", "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe", "1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff", "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb", "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc", "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd", "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe", "1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff", "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb", "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc", "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd", "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe", "1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff", "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb", "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc", "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd", "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe", "1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"] }, { "n": ["woman-heart-woman", "couple with heart: woman, woman"], "u": "1f469-200d-2764-fe0f-200d-1f469", "v": ["1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb", "1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fc", "1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fd", "1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fe", "1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3ff", "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fb", "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc", "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fd", "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fe", "1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3ff", "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fb", "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fc", "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd", "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fe", "1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3ff", "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fb", "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fc", "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fd", "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe", "1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3ff", "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fb", "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fc", "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fd", "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fe", "1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff"] }, { "n": ["family"], "u": "1f46a" }, { "n": ["man-woman-boy", "family: man, woman, boy"], "u": "1f468-200d-1f469-200d-1f466" }, { "n": ["man-woman-girl", "family: man, woman, girl"], "u": "1f468-200d-1f469-200d-1f467" }, { "n": ["man-woman-girl-boy", "family: man, woman, girl, boy"], "u": "1f468-200d-1f469-200d-1f467-200d-1f466" }, { "n": ["man-woman-boy-boy", "family: man, woman, boy, boy"], "u": "1f468-200d-1f469-200d-1f466-200d-1f466" }, { "n": ["man-woman-girl-girl", "family: man, woman, girl, girl"], "u": "1f468-200d-1f469-200d-1f467-200d-1f467" }, { "n": ["man-man-boy", "family: man, man, boy"], "u": "1f468-200d-1f468-200d-1f466" }, { "n": ["man-man-girl", "family: man, man, girl"], "u": "1f468-200d-1f468-200d-1f467" }, { "n": ["man-man-girl-boy", "family: man, man, girl, boy"], "u": "1f468-200d-1f468-200d-1f467-200d-1f466" }, { "n": ["man-man-boy-boy", "family: man, man, boy, boy"], "u": "1f468-200d-1f468-200d-1f466-200d-1f466" }, { "n": ["man-man-girl-girl", "family: man, man, girl, girl"], "u": "1f468-200d-1f468-200d-1f467-200d-1f467" }, { "n": ["woman-woman-boy", "family: woman, woman, boy"], "u": "1f469-200d-1f469-200d-1f466" }, { "n": ["woman-woman-girl", "family: woman, woman, girl"], "u": "1f469-200d-1f469-200d-1f467" }, { "n": ["woman-woman-girl-boy", "family: woman, woman, girl, boy"], "u": "1f469-200d-1f469-200d-1f467-200d-1f466" }, { "n": ["woman-woman-boy-boy", "family: woman, woman, boy, boy"], "u": "1f469-200d-1f469-200d-1f466-200d-1f466" }, { "n": ["woman-woman-girl-girl", "family: woman, woman, girl, girl"], "u": "1f469-200d-1f469-200d-1f467-200d-1f467" }, { "n": ["man-boy", "family: man, boy"], "u": "1f468-200d-1f466" }, { "n": ["man-boy-boy", "family: man, boy, boy"], "u": "1f468-200d-1f466-200d-1f466" }, { "n": ["man-girl", "family: man, girl"], "u": "1f468-200d-1f467" }, { "n": ["man-girl-boy", "family: man, girl, boy"], "u": "1f468-200d-1f467-200d-1f466" }, { "n": ["man-girl-girl", "family: man, girl, girl"], "u": "1f468-200d-1f467-200d-1f467" }, { "n": ["woman-boy", "family: woman, boy"], "u": "1f469-200d-1f466" }, { "n": ["woman-boy-boy", "family: woman, boy, boy"], "u": "1f469-200d-1f466-200d-1f466" }, { "n": ["woman-girl", "family: woman, girl"], "u": "1f469-200d-1f467" }, { "n": ["woman-girl-boy", "family: woman, girl, boy"], "u": "1f469-200d-1f467-200d-1f466" }, { "n": ["woman-girl-girl", "family: woman, girl, girl"], "u": "1f469-200d-1f467-200d-1f467" }, { "n": ["speaking head", "speaking head in silhouette"], "u": "1f5e3-fe0f" }, { "n": ["bust in silhouette"], "u": "1f464" }, { "n": ["busts in silhouette"], "u": "1f465" }, { "n": ["people hugging"], "u": "1fac2" }, { "n": ["footprints"], "u": "1f463" }], "animals_nature": [{ "n": ["monkey face"], "u": "1f435" }, { "n": ["monkey"], "u": "1f412" }, { "n": ["gorilla"], "u": "1f98d" }, { "n": ["orangutan"], "u": "1f9a7" }, { "n": ["dog", "dog face"], "u": "1f436" }, { "n": ["dog", "dog2"], "u": "1f415" }, { "n": ["guide dog"], "u": "1f9ae" }, { "n": ["service dog"], "u": "1f415-200d-1f9ba" }, { "n": ["poodle"], "u": "1f429" }, { "n": ["wolf", "wolf face"], "u": "1f43a" }, { "n": ["fox face"], "u": "1f98a" }, { "n": ["raccoon"], "u": "1f99d" }, { "n": ["cat", "cat face"], "u": "1f431" }, { "n": ["cat", "cat2"], "u": "1f408" }, { "n": ["black cat"], "u": "1f408-200d-2b1b" }, { "n": ["lion face"], "u": "1f981" }, { "n": ["tiger", "tiger face"], "u": "1f42f" }, { "n": ["tiger", "tiger2"], "u": "1f405" }, { "n": ["leopard"], "u": "1f406" }, { "n": ["horse", "horse face"], "u": "1f434" }, { "n": ["horse", "racehorse"], "u": "1f40e" }, { "n": ["unicorn face"], "u": "1f984" }, { "n": ["zebra face"], "u": "1f993" }, { "n": ["deer"], "u": "1f98c" }, { "n": ["bison"], "u": "1f9ac" }, { "n": ["cow", "cow face"], "u": "1f42e" }, { "n": ["ox"], "u": "1f402" }, { "n": ["water buffalo"], "u": "1f403" }, { "n": ["cow", "cow2"], "u": "1f404" }, { "n": ["pig", "pig face"], "u": "1f437" }, { "n": ["pig", "pig2"], "u": "1f416" }, { "n": ["boar"], "u": "1f417" }, { "n": ["pig nose"], "u": "1f43d" }, { "n": ["ram"], "u": "1f40f" }, { "n": ["sheep"], "u": "1f411" }, { "n": ["goat"], "u": "1f410" }, { "n": ["dromedary camel"], "u": "1f42a" }, { "n": ["camel", "bactrian camel"], "u": "1f42b" }, { "n": ["llama"], "u": "1f999" }, { "n": ["giraffe face"], "u": "1f992" }, { "n": ["elephant"], "u": "1f418" }, { "n": ["mammoth"], "u": "1f9a3" }, { "n": ["rhinoceros"], "u": "1f98f" }, { "n": ["hippopotamus"], "u": "1f99b" }, { "n": ["mouse", "mouse face"], "u": "1f42d" }, { "n": ["mouse", "mouse2"], "u": "1f401" }, { "n": ["rat"], "u": "1f400" }, { "n": ["hamster", "hamster face"], "u": "1f439" }, { "n": ["rabbit", "rabbit face"], "u": "1f430" }, { "n": ["rabbit", "rabbit2"], "u": "1f407" }, { "n": ["chipmunk"], "u": "1f43f-fe0f" }, { "n": ["beaver"], "u": "1f9ab" }, { "n": ["hedgehog"], "u": "1f994" }, { "n": ["bat"], "u": "1f987" }, { "n": ["bear", "bear face"], "u": "1f43b" }, { "n": ["polar bear"], "u": "1f43b-200d-2744-fe0f" }, { "n": ["koala"], "u": "1f428" }, { "n": ["panda face"], "u": "1f43c" }, { "n": ["sloth"], "u": "1f9a5" }, { "n": ["otter"], "u": "1f9a6" }, { "n": ["skunk"], "u": "1f9a8" }, { "n": ["kangaroo"], "u": "1f998" }, { "n": ["badger"], "u": "1f9a1" }, { "n": ["feet", "paw prints"], "u": "1f43e" }, { "n": ["turkey"], "u": "1f983" }, { "n": ["chicken"], "u": "1f414" }, { "n": ["rooster"], "u": "1f413" }, { "n": ["hatching chick"], "u": "1f423" }, { "n": ["baby chick"], "u": "1f424" }, { "n": ["hatched chick", "front-facing baby chick"], "u": "1f425" }, { "n": ["bird"], "u": "1f426" }, { "n": ["penguin"], "u": "1f427" }, { "n": ["dove", "dove of peace"], "u": "1f54a-fe0f" }, { "n": ["eagle"], "u": "1f985" }, { "n": ["duck"], "u": "1f986" }, { "n": ["swan"], "u": "1f9a2" }, { "n": ["owl"], "u": "1f989" }, { "n": ["dodo"], "u": "1f9a4" }, { "n": ["feather"], "u": "1fab6" }, { "n": ["flamingo"], "u": "1f9a9" }, { "n": ["peacock"], "u": "1f99a" }, { "n": ["parrot"], "u": "1f99c" }, { "n": ["frog", "frog face"], "u": "1f438" }, { "n": ["crocodile"], "u": "1f40a" }, { "n": ["turtle"], "u": "1f422" }, { "n": ["lizard"], "u": "1f98e" }, { "n": ["snake"], "u": "1f40d" }, { "n": ["dragon face"], "u": "1f432" }, { "n": ["dragon"], "u": "1f409" }, { "n": ["sauropod"], "u": "1f995" }, { "n": ["t-rex"], "u": "1f996" }, { "n": ["whale", "spouting whale"], "u": "1f433" }, { "n": ["whale", "whale2"], "u": "1f40b" }, { "n": ["dolphin", "flipper"], "u": "1f42c" }, { "n": ["seal"], "u": "1f9ad" }, { "n": ["fish"], "u": "1f41f" }, { "n": ["tropical fish"], "u": "1f420" }, { "n": ["blowfish"], "u": "1f421" }, { "n": ["shark"], "u": "1f988" }, { "n": ["octopus"], "u": "1f419" }, { "n": ["shell", "spiral shell"], "u": "1f41a" }, { "n": ["coral"], "u": "1fab8" }, { "n": ["snail"], "u": "1f40c" }, { "n": ["butterfly"], "u": "1f98b" }, { "n": ["bug"], "u": "1f41b" }, { "n": ["ant"], "u": "1f41c" }, { "n": ["bee", "honeybee"], "u": "1f41d" }, { "n": ["beetle"], "u": "1fab2" }, { "n": ["ladybug", "lady beetle"], "u": "1f41e" }, { "n": ["cricket"], "u": "1f997" }, { "n": ["cockroach"], "u": "1fab3" }, { "n": ["spider"], "u": "1f577-fe0f" }, { "n": ["spider web"], "u": "1f578-fe0f" }, { "n": ["scorpion"], "u": "1f982" }, { "n": ["mosquito"], "u": "1f99f" }, { "n": ["fly"], "u": "1fab0" }, { "n": ["worm"], "u": "1fab1" }, { "n": ["microbe"], "u": "1f9a0" }, { "n": ["bouquet"], "u": "1f490" }, { "n": ["cherry blossom"], "u": "1f338" }, { "n": ["white flower"], "u": "1f4ae" }, { "n": ["lotus"], "u": "1fab7" }, { "n": ["rosette"], "u": "1f3f5-fe0f" }, { "n": ["rose"], "u": "1f339" }, { "n": ["wilted flower"], "u": "1f940" }, { "n": ["hibiscus"], "u": "1f33a" }, { "n": ["sunflower"], "u": "1f33b" }, { "n": ["blossom"], "u": "1f33c" }, { "n": ["tulip"], "u": "1f337" }, { "n": ["seedling"], "u": "1f331" }, { "n": ["potted plant"], "u": "1fab4" }, { "n": ["evergreen tree"], "u": "1f332" }, { "n": ["deciduous tree"], "u": "1f333" }, { "n": ["palm tree"], "u": "1f334" }, { "n": ["cactus"], "u": "1f335" }, { "n": ["ear of rice"], "u": "1f33e" }, { "n": ["herb"], "u": "1f33f" }, { "n": ["shamrock"], "u": "2618-fe0f" }, { "n": ["four leaf clover"], "u": "1f340" }, { "n": ["maple leaf"], "u": "1f341" }, { "n": ["fallen leaf"], "u": "1f342" }, { "n": ["leaves", "leaf fluttering in wind"], "u": "1f343" }, { "n": ["empty nest"], "u": "1fab9" }, { "n": ["nest with eggs"], "u": "1faba" }], "food_drink": [{ "n": ["grapes"], "u": "1f347" }, { "n": ["melon"], "u": "1f348" }, { "n": ["watermelon"], "u": "1f349" }, { "n": ["tangerine"], "u": "1f34a" }, { "n": ["lemon"], "u": "1f34b" }, { "n": ["banana"], "u": "1f34c" }, { "n": ["pineapple"], "u": "1f34d" }, { "n": ["mango"], "u": "1f96d" }, { "n": ["apple", "red apple"], "u": "1f34e" }, { "n": ["green apple"], "u": "1f34f" }, { "n": ["pear"], "u": "1f350" }, { "n": ["peach"], "u": "1f351" }, { "n": ["cherries"], "u": "1f352" }, { "n": ["strawberry"], "u": "1f353" }, { "n": ["blueberries"], "u": "1fad0" }, { "n": ["kiwifruit"], "u": "1f95d" }, { "n": ["tomato"], "u": "1f345" }, { "n": ["olive"], "u": "1fad2" }, { "n": ["coconut"], "u": "1f965" }, { "n": ["avocado"], "u": "1f951" }, { "n": ["eggplant", "aubergine"], "u": "1f346" }, { "n": ["potato"], "u": "1f954" }, { "n": ["carrot"], "u": "1f955" }, { "n": ["corn", "ear of maize"], "u": "1f33d" }, { "n": ["hot pepper"], "u": "1f336-fe0f" }, { "n": ["bell pepper"], "u": "1fad1" }, { "n": ["cucumber"], "u": "1f952" }, { "n": ["leafy green"], "u": "1f96c" }, { "n": ["broccoli"], "u": "1f966" }, { "n": ["garlic"], "u": "1f9c4" }, { "n": ["onion"], "u": "1f9c5" }, { "n": ["mushroom"], "u": "1f344" }, { "n": ["peanuts"], "u": "1f95c" }, { "n": ["beans"], "u": "1fad8" }, { "n": ["chestnut"], "u": "1f330" }, { "n": ["bread"], "u": "1f35e" }, { "n": ["croissant"], "u": "1f950" }, { "n": ["baguette bread"], "u": "1f956" }, { "n": ["flatbread"], "u": "1fad3" }, { "n": ["pretzel"], "u": "1f968" }, { "n": ["bagel"], "u": "1f96f" }, { "n": ["pancakes"], "u": "1f95e" }, { "n": ["waffle"], "u": "1f9c7" }, { "n": ["cheese wedge"], "u": "1f9c0" }, { "n": ["meat on bone"], "u": "1f356" }, { "n": ["poultry leg"], "u": "1f357" }, { "n": ["cut of meat"], "u": "1f969" }, { "n": ["bacon"], "u": "1f953" }, { "n": ["hamburger"], "u": "1f354" }, { "n": ["fries", "french fries"], "u": "1f35f" }, { "n": ["pizza", "slice of pizza"], "u": "1f355" }, { "n": ["hotdog", "hot dog"], "u": "1f32d" }, { "n": ["sandwich"], "u": "1f96a" }, { "n": ["taco"], "u": "1f32e" }, { "n": ["burrito"], "u": "1f32f" }, { "n": ["tamale"], "u": "1fad4" }, { "n": ["stuffed flatbread"], "u": "1f959" }, { "n": ["falafel"], "u": "1f9c6" }, { "n": ["egg"], "u": "1f95a" }, { "n": ["cooking", "fried egg"], "u": "1f373" }, { "n": ["shallow pan of food"], "u": "1f958" }, { "n": ["stew", "pot of food"], "u": "1f372" }, { "n": ["fondue"], "u": "1fad5" }, { "n": ["bowl with spoon"], "u": "1f963" }, { "n": ["green salad"], "u": "1f957" }, { "n": ["popcorn"], "u": "1f37f" }, { "n": ["butter"], "u": "1f9c8" }, { "n": ["salt", "salt shaker"], "u": "1f9c2" }, { "n": ["canned food"], "u": "1f96b" }, { "n": ["bento", "bento box"], "u": "1f371" }, { "n": ["rice cracker"], "u": "1f358" }, { "n": ["rice ball"], "u": "1f359" }, { "n": ["rice", "cooked rice"], "u": "1f35a" }, { "n": ["curry", "curry and rice"], "u": "1f35b" }, { "n": ["ramen", "steaming bowl"], "u": "1f35c" }, { "n": ["spaghetti"], "u": "1f35d" }, { "n": ["sweet potato", "roasted sweet potato"], "u": "1f360" }, { "n": ["oden"], "u": "1f362" }, { "n": ["sushi"], "u": "1f363" }, { "n": ["fried shrimp"], "u": "1f364" }, { "n": ["fish cake", "fish cake with swirl design"], "u": "1f365" }, { "n": ["moon cake"], "u": "1f96e" }, { "n": ["dango"], "u": "1f361" }, { "n": ["dumpling"], "u": "1f95f" }, { "n": ["fortune cookie"], "u": "1f960" }, { "n": ["takeout box"], "u": "1f961" }, { "n": ["crab"], "u": "1f980" }, { "n": ["lobster"], "u": "1f99e" }, { "n": ["shrimp"], "u": "1f990" }, { "n": ["squid"], "u": "1f991" }, { "n": ["oyster"], "u": "1f9aa" }, { "n": ["icecream", "soft ice cream"], "u": "1f366" }, { "n": ["shaved ice"], "u": "1f367" }, { "n": ["ice cream"], "u": "1f368" }, { "n": ["doughnut"], "u": "1f369" }, { "n": ["cookie"], "u": "1f36a" }, { "n": ["birthday", "birthday cake"], "u": "1f382" }, { "n": ["cake", "shortcake"], "u": "1f370" }, { "n": ["cupcake"], "u": "1f9c1" }, { "n": ["pie"], "u": "1f967" }, { "n": ["chocolate bar"], "u": "1f36b" }, { "n": ["candy"], "u": "1f36c" }, { "n": ["lollipop"], "u": "1f36d" }, { "n": ["custard"], "u": "1f36e" }, { "n": ["honey pot"], "u": "1f36f" }, { "n": ["baby bottle"], "u": "1f37c" }, { "n": ["glass of milk"], "u": "1f95b" }, { "n": ["coffee", "hot beverage"], "u": "2615" }, { "n": ["teapot"], "u": "1fad6" }, { "n": ["tea", "teacup without handle"], "u": "1f375" }, { "n": ["sake", "sake bottle and cup"], "u": "1f376" }, { "n": ["champagne", "bottle with popping cork"], "u": "1f37e" }, { "n": ["wine glass"], "u": "1f377" }, { "n": ["cocktail", "cocktail glass"], "u": "1f378" }, { "n": ["tropical drink"], "u": "1f379" }, { "n": ["beer", "beer mug"], "u": "1f37a" }, { "n": ["beers", "clinking beer mugs"], "u": "1f37b" }, { "n": ["clinking glasses"], "u": "1f942" }, { "n": ["tumbler glass"], "u": "1f943" }, { "n": ["pouring liquid"], "u": "1fad7" }, { "n": ["cup with straw"], "u": "1f964" }, { "n": ["bubble tea"], "u": "1f9cb" }, { "n": ["beverage box"], "u": "1f9c3" }, { "n": ["mate drink"], "u": "1f9c9" }, { "n": ["ice cube"], "u": "1f9ca" }, { "n": ["chopsticks"], "u": "1f962" }, { "n": ["knife fork plate", "fork and knife with plate"], "u": "1f37d-fe0f" }, { "n": ["fork and knife"], "u": "1f374" }, { "n": ["spoon"], "u": "1f944" }, { "n": ["hocho", "knife"], "u": "1f52a" }, { "n": ["jar"], "u": "1fad9" }, { "n": ["amphora"], "u": "1f3fa" }], "travel_places": [{ "n": ["earth africa", "earth globe europe-africa"], "u": "1f30d" }, { "n": ["earth americas", "earth globe americas"], "u": "1f30e" }, { "n": ["earth asia", "earth globe asia-australia"], "u": "1f30f" }, { "n": ["globe with meridians"], "u": "1f310" }, { "n": ["world map"], "u": "1f5fa-fe0f" }, { "n": ["japan", "silhouette of japan"], "u": "1f5fe" }, { "n": ["compass"], "u": "1f9ed" }, { "n": ["snow-capped mountain", "snow capped mountain"], "u": "1f3d4-fe0f" }, { "n": ["mountain"], "u": "26f0-fe0f" }, { "n": ["volcano"], "u": "1f30b" }, { "n": ["mount fuji"], "u": "1f5fb" }, { "n": ["camping"], "u": "1f3d5-fe0f" }, { "n": ["beach with umbrella"], "u": "1f3d6-fe0f" }, { "n": ["desert"], "u": "1f3dc-fe0f" }, { "n": ["desert island"], "u": "1f3dd-fe0f" }, { "n": ["national park"], "u": "1f3de-fe0f" }, { "n": ["stadium"], "u": "1f3df-fe0f" }, { "n": ["classical building"], "u": "1f3db-fe0f" }, { "n": ["building construction"], "u": "1f3d7-fe0f" }, { "n": ["brick", "bricks"], "u": "1f9f1" }, { "n": ["rock"], "u": "1faa8" }, { "n": ["wood"], "u": "1fab5" }, { "n": ["hut"], "u": "1f6d6" }, { "n": ["houses", "house buildings"], "u": "1f3d8-fe0f" }, { "n": ["derelict house", "derelict house building"], "u": "1f3da-fe0f" }, { "n": ["house", "house building"], "u": "1f3e0" }, { "n": ["house with garden"], "u": "1f3e1" }, { "n": ["office", "office building"], "u": "1f3e2" }, { "n": ["post office", "japanese post office"], "u": "1f3e3" }, { "n": ["european post office"], "u": "1f3e4" }, { "n": ["hospital"], "u": "1f3e5" }, { "n": ["bank"], "u": "1f3e6" }, { "n": ["hotel"], "u": "1f3e8" }, { "n": ["love hotel"], "u": "1f3e9" }, { "n": ["convenience store"], "u": "1f3ea" }, { "n": ["school"], "u": "1f3eb" }, { "n": ["department store"], "u": "1f3ec" }, { "n": ["factory"], "u": "1f3ed" }, { "n": ["japanese castle"], "u": "1f3ef" }, { "n": ["european castle"], "u": "1f3f0" }, { "n": ["wedding"], "u": "1f492" }, { "n": ["tokyo tower"], "u": "1f5fc" }, { "n": ["statue of liberty"], "u": "1f5fd" }, { "n": ["church"], "u": "26ea" }, { "n": ["mosque"], "u": "1f54c" }, { "n": ["hindu temple"], "u": "1f6d5" }, { "n": ["synagogue"], "u": "1f54d" }, { "n": ["shinto shrine"], "u": "26e9-fe0f" }, { "n": ["kaaba"], "u": "1f54b" }, { "n": ["fountain"], "u": "26f2" }, { "n": ["tent"], "u": "26fa" }, { "n": ["foggy"], "u": "1f301" }, { "n": ["night with stars"], "u": "1f303" }, { "n": ["cityscape"], "u": "1f3d9-fe0f" }, { "n": ["sunrise over mountains"], "u": "1f304" }, { "n": ["sunrise"], "u": "1f305" }, { "n": ["city sunset", "cityscape at dusk"], "u": "1f306" }, { "n": ["city sunrise", "sunset over buildings"], "u": "1f307" }, { "n": ["bridge at night"], "u": "1f309" }, { "n": ["hotsprings", "hot springs"], "u": "2668-fe0f" }, { "n": ["carousel horse"], "u": "1f3a0" }, { "n": ["playground slide"], "u": "1f6dd" }, { "n": ["ferris wheel"], "u": "1f3a1" }, { "n": ["roller coaster"], "u": "1f3a2" }, { "n": ["barber", "barber pole"], "u": "1f488" }, { "n": ["circus tent"], "u": "1f3aa" }, { "n": ["steam locomotive"], "u": "1f682" }, { "n": ["railway car"], "u": "1f683" }, { "n": ["high-speed train", "bullettrain side"], "u": "1f684" }, { "n": ["bullettrain front", "high-speed train with bullet nose"], "u": "1f685" }, { "n": ["train", "train2"], "u": "1f686" }, { "n": ["metro"], "u": "1f687" }, { "n": ["light rail"], "u": "1f688" }, { "n": ["station"], "u": "1f689" }, { "n": ["tram"], "u": "1f68a" }, { "n": ["monorail"], "u": "1f69d" }, { "n": ["mountain railway"], "u": "1f69e" }, { "n": ["train", "tram car"], "u": "1f68b" }, { "n": ["bus"], "u": "1f68c" }, { "n": ["oncoming bus"], "u": "1f68d" }, { "n": ["trolleybus"], "u": "1f68e" }, { "n": ["minibus"], "u": "1f690" }, { "n": ["ambulance"], "u": "1f691" }, { "n": ["fire engine"], "u": "1f692" }, { "n": ["police car"], "u": "1f693" }, { "n": ["oncoming police car"], "u": "1f694" }, { "n": ["taxi"], "u": "1f695" }, { "n": ["oncoming taxi"], "u": "1f696" }, { "n": ["car", "red car", "automobile"], "u": "1f697" }, { "n": ["oncoming automobile"], "u": "1f698" }, { "n": ["blue car", "recreational vehicle"], "u": "1f699" }, { "n": ["pickup truck"], "u": "1f6fb" }, { "n": ["truck", "delivery truck"], "u": "1f69a" }, { "n": ["articulated lorry"], "u": "1f69b" }, { "n": ["tractor"], "u": "1f69c" }, { "n": ["racing car"], "u": "1f3ce-fe0f" }, { "n": ["motorcycle", "racing motorcycle"], "u": "1f3cd-fe0f" }, { "n": ["motor scooter"], "u": "1f6f5" }, { "n": ["manual wheelchair"], "u": "1f9bd" }, { "n": ["motorized wheelchair"], "u": "1f9bc" }, { "n": ["auto rickshaw"], "u": "1f6fa" }, { "n": ["bike", "bicycle"], "u": "1f6b2" }, { "n": ["scooter"], "u": "1f6f4" }, { "n": ["skateboard"], "u": "1f6f9" }, { "n": ["roller skate"], "u": "1f6fc" }, { "n": ["busstop", "bus stop"], "u": "1f68f" }, { "n": ["motorway"], "u": "1f6e3-fe0f" }, { "n": ["railway track"], "u": "1f6e4-fe0f" }, { "n": ["oil drum"], "u": "1f6e2-fe0f" }, { "n": ["fuelpump", "fuel pump"], "u": "26fd" }, { "n": ["wheel"], "u": "1f6de" }, { "n": ["rotating light", "police cars revolving light"], "u": "1f6a8" }, { "n": ["traffic light", "horizontal traffic light"], "u": "1f6a5" }, { "n": ["vertical traffic light"], "u": "1f6a6" }, { "n": ["octagonal sign"], "u": "1f6d1" }, { "n": ["construction", "construction sign"], "u": "1f6a7" }, { "n": ["anchor"], "u": "2693" }, { "n": ["ring buoy"], "u": "1f6df" }, { "n": ["boat", "sailboat"], "u": "26f5" }, { "n": ["canoe"], "u": "1f6f6" }, { "n": ["speedboat"], "u": "1f6a4" }, { "n": ["passenger ship"], "u": "1f6f3-fe0f" }, { "n": ["ferry"], "u": "26f4-fe0f" }, { "n": ["motor boat"], "u": "1f6e5-fe0f" }, { "n": ["ship"], "u": "1f6a2" }, { "n": ["airplane"], "u": "2708-fe0f" }, { "n": ["small airplane"], "u": "1f6e9-fe0f" }, { "n": ["airplane departure"], "u": "1f6eb" }, { "n": ["airplane arriving"], "u": "1f6ec" }, { "n": ["parachute"], "u": "1fa82" }, { "n": ["seat"], "u": "1f4ba" }, { "n": ["helicopter"], "u": "1f681" }, { "n": ["suspension railway"], "u": "1f69f" }, { "n": ["mountain cableway"], "u": "1f6a0" }, { "n": ["aerial tramway"], "u": "1f6a1" }, { "n": ["satellite"], "u": "1f6f0-fe0f" }, { "n": ["rocket"], "u": "1f680" }, { "n": ["flying saucer"], "u": "1f6f8" }, { "n": ["bellhop bell"], "u": "1f6ce-fe0f" }, { "n": ["luggage"], "u": "1f9f3" }, { "n": ["hourglass"], "u": "231b" }, { "n": ["hourglass flowing sand", "hourglass with flowing sand"], "u": "23f3" }, { "n": ["watch"], "u": "231a" }, { "n": ["alarm clock"], "u": "23f0" }, { "n": ["stopwatch"], "u": "23f1-fe0f" }, { "n": ["timer clock"], "u": "23f2-fe0f" }, { "n": ["mantelpiece clock"], "u": "1f570-fe0f" }, { "n": ["clock12", "clock face twelve oclock"], "u": "1f55b" }, { "n": ["clock1230", "clock face twelve-thirty"], "u": "1f567" }, { "n": ["clock1", "clock face one oclock"], "u": "1f550" }, { "n": ["clock130", "clock face one-thirty"], "u": "1f55c" }, { "n": ["clock2", "clock face two oclock"], "u": "1f551" }, { "n": ["clock230", "clock face two-thirty"], "u": "1f55d" }, { "n": ["clock3", "clock face three oclock"], "u": "1f552" }, { "n": ["clock330", "clock face three-thirty"], "u": "1f55e" }, { "n": ["clock4", "clock face four oclock"], "u": "1f553" }, { "n": ["clock430", "clock face four-thirty"], "u": "1f55f" }, { "n": ["clock5", "clock face five oclock"], "u": "1f554" }, { "n": ["clock530", "clock face five-thirty"], "u": "1f560" }, { "n": ["clock6", "clock face six oclock"], "u": "1f555" }, { "n": ["clock630", "clock face six-thirty"], "u": "1f561" }, { "n": ["clock7", "clock face seven oclock"], "u": "1f556" }, { "n": ["clock730", "clock face seven-thirty"], "u": "1f562" }, { "n": ["clock8", "clock face eight oclock"], "u": "1f557" }, { "n": ["clock830", "clock face eight-thirty"], "u": "1f563" }, { "n": ["clock9", "clock face nine oclock"], "u": "1f558" }, { "n": ["clock930", "clock face nine-thirty"], "u": "1f564" }, { "n": ["clock10", "clock face ten oclock"], "u": "1f559" }, { "n": ["clock1030", "clock face ten-thirty"], "u": "1f565" }, { "n": ["clock11", "clock face eleven oclock"], "u": "1f55a" }, { "n": ["clock1130", "clock face eleven-thirty"], "u": "1f566" }, { "n": ["new moon", "new moon symbol"], "u": "1f311" }, { "n": ["waxing crescent moon", "waxing crescent moon symbol"], "u": "1f312" }, { "n": ["first quarter moon", "first quarter moon symbol"], "u": "1f313" }, { "n": ["moon", "waxing gibbous moon", "waxing gibbous moon symbol"], "u": "1f314" }, { "n": ["full moon", "full moon symbol"], "u": "1f315" }, { "n": ["waning gibbous moon", "waning gibbous moon symbol"], "u": "1f316" }, { "n": ["last quarter moon", "last quarter moon symbol"], "u": "1f317" }, { "n": ["waning crescent moon", "waning crescent moon symbol"], "u": "1f318" }, { "n": ["crescent moon"], "u": "1f319" }, { "n": ["new moon with face"], "u": "1f31a" }, { "n": ["first quarter moon with face"], "u": "1f31b" }, { "n": ["last quarter moon with face"], "u": "1f31c" }, { "n": ["thermometer"], "u": "1f321-fe0f" }, { "n": ["sunny", "black sun with rays"], "u": "2600-fe0f" }, { "n": ["full moon with face"], "u": "1f31d" }, { "n": ["sun with face"], "u": "1f31e" }, { "n": ["ringed planet"], "u": "1fa90" }, { "n": ["star", "white medium star"], "u": "2b50" }, { "n": ["star2", "glowing star"], "u": "1f31f" }, { "n": ["stars", "shooting star"], "u": "1f320" }, { "n": ["milky way"], "u": "1f30c" }, { "n": ["cloud"], "u": "2601-fe0f" }, { "n": ["partly sunny", "sun behind cloud"], "u": "26c5" }, { "n": ["thunder cloud and rain", "cloud with lightning and rain"], "u": "26c8-fe0f" }, { "n": ["mostly sunny", "sun small cloud", "sun behind small cloud"], "u": "1f324-fe0f" }, { "n": ["barely sunny", "sun behind cloud", "sun behind large cloud"], "u": "1f325-fe0f" }, { "n": ["partly sunny rain", "sun behind rain cloud"], "u": "1f326-fe0f" }, { "n": ["rain cloud", "cloud with rain"], "u": "1f327-fe0f" }, { "n": ["snow cloud", "cloud with snow"], "u": "1f328-fe0f" }, { "n": ["lightning", "lightning cloud", "cloud with lightning"], "u": "1f329-fe0f" }, { "n": ["tornado", "tornado cloud"], "u": "1f32a-fe0f" }, { "n": ["fog"], "u": "1f32b-fe0f" }, { "n": ["wind face", "wind blowing face"], "u": "1f32c-fe0f" }, { "n": ["cyclone"], "u": "1f300" }, { "n": ["rainbow"], "u": "1f308" }, { "n": ["closed umbrella"], "u": "1f302" }, { "n": ["umbrella"], "u": "2602-fe0f" }, { "n": ["umbrella with rain drops"], "u": "2614" }, { "n": ["umbrella on ground"], "u": "26f1-fe0f" }, { "n": ["zap", "high voltage sign"], "u": "26a1" }, { "n": ["snowflake"], "u": "2744-fe0f" }, { "n": ["snowman"], "u": "2603-fe0f" }, { "n": ["snowman without snow"], "u": "26c4" }, { "n": ["comet"], "u": "2604-fe0f" }, { "n": ["fire"], "u": "1f525" }, { "n": ["droplet"], "u": "1f4a7" }, { "n": ["ocean", "water wave"], "u": "1f30a" }], "activities": [{ "n": ["jack-o-lantern", "jack o lantern"], "u": "1f383" }, { "n": ["christmas tree"], "u": "1f384" }, { "n": ["fireworks"], "u": "1f386" }, { "n": ["sparkler", "firework sparkler"], "u": "1f387" }, { "n": ["firecracker"], "u": "1f9e8" }, { "n": ["sparkles"], "u": "2728" }, { "n": ["balloon"], "u": "1f388" }, { "n": ["tada", "party popper"], "u": "1f389" }, { "n": ["confetti ball"], "u": "1f38a" }, { "n": ["tanabata tree"], "u": "1f38b" }, { "n": ["bamboo", "pine decoration"], "u": "1f38d" }, { "n": ["dolls", "japanese dolls"], "u": "1f38e" }, { "n": ["flags", "carp streamer"], "u": "1f38f" }, { "n": ["wind chime"], "u": "1f390" }, { "n": ["rice scene", "moon viewing ceremony"], "u": "1f391" }, { "n": ["red envelope", "red gift envelope"], "u": "1f9e7" }, { "n": ["ribbon"], "u": "1f380" }, { "n": ["gift", "wrapped present"], "u": "1f381" }, { "n": ["reminder ribbon"], "u": "1f397-fe0f" }, { "n": ["admission tickets"], "u": "1f39f-fe0f" }, { "n": ["ticket"], "u": "1f3ab" }, { "n": ["medal", "military medal"], "u": "1f396-fe0f" }, { "n": ["trophy"], "u": "1f3c6" }, { "n": ["sports medal"], "u": "1f3c5" }, { "n": ["first place medal"], "u": "1f947" }, { "n": ["second place medal"], "u": "1f948" }, { "n": ["third place medal"], "u": "1f949" }, { "n": ["soccer", "soccer ball"], "u": "26bd" }, { "n": ["baseball"], "u": "26be" }, { "n": ["softball"], "u": "1f94e" }, { "n": ["basketball", "basketball and hoop"], "u": "1f3c0" }, { "n": ["volleyball"], "u": "1f3d0" }, { "n": ["football", "american football"], "u": "1f3c8" }, { "n": ["rugby football"], "u": "1f3c9" }, { "n": ["tennis", "tennis racquet and ball"], "u": "1f3be" }, { "n": ["flying disc"], "u": "1f94f" }, { "n": ["bowling"], "u": "1f3b3" }, { "n": ["cricket bat and ball"], "u": "1f3cf" }, { "n": ["field hockey stick and ball"], "u": "1f3d1" }, { "n": ["ice hockey stick and puck"], "u": "1f3d2" }, { "n": ["lacrosse", "lacrosse stick and ball"], "u": "1f94d" }, { "n": ["table tennis paddle and ball"], "u": "1f3d3" }, { "n": ["badminton racquet and shuttlecock"], "u": "1f3f8" }, { "n": ["boxing glove"], "u": "1f94a" }, { "n": ["martial arts uniform"], "u": "1f94b" }, { "n": ["goal net"], "u": "1f945" }, { "n": ["golf", "flag in hole"], "u": "26f3" }, { "n": ["ice skate"], "u": "26f8-fe0f" }, { "n": ["fishing pole and fish"], "u": "1f3a3" }, { "n": ["diving mask"], "u": "1f93f" }, { "n": ["running shirt with sash"], "u": "1f3bd" }, { "n": ["ski", "ski and ski boot"], "u": "1f3bf" }, { "n": ["sled"], "u": "1f6f7" }, { "n": ["curling stone"], "u": "1f94c" }, { "n": ["dart", "direct hit"], "u": "1f3af" }, { "n": ["yo-yo"], "u": "1fa80" }, { "n": ["kite"], "u": "1fa81" }, { "n": ["8ball", "billiards"], "u": "1f3b1" }, { "n": ["crystal ball"], "u": "1f52e" }, { "n": ["magic wand"], "u": "1fa84" }, { "n": ["nazar amulet"], "u": "1f9ff" }, { "n": ["hamsa"], "u": "1faac" }, { "n": ["video game"], "u": "1f3ae" }, { "n": ["joystick"], "u": "1f579-fe0f" }, { "n": ["slot machine"], "u": "1f3b0" }, { "n": ["game die"], "u": "1f3b2" }, { "n": ["jigsaw", "jigsaw puzzle piece"], "u": "1f9e9" }, { "n": ["teddy bear"], "u": "1f9f8" }, { "n": ["pinata"], "u": "1fa85" }, { "n": ["mirror ball"], "u": "1faa9" }, { "n": ["nesting dolls"], "u": "1fa86" }, { "n": ["spades", "black spade suit"], "u": "2660-fe0f" }, { "n": ["hearts", "black heart suit"], "u": "2665-fe0f" }, { "n": ["diamonds", "black diamond suit"], "u": "2666-fe0f" }, { "n": ["clubs", "black club suit"], "u": "2663-fe0f" }, { "n": ["chess pawn"], "u": "265f-fe0f" }, { "n": ["black joker", "playing card black joker"], "u": "1f0cf" }, { "n": ["mahjong", "mahjong tile red dragon"], "u": "1f004" }, { "n": ["flower playing cards"], "u": "1f3b4" }, { "n": ["performing arts"], "u": "1f3ad" }, { "n": ["framed picture", "frame with picture"], "u": "1f5bc-fe0f" }, { "n": ["art", "artist palette"], "u": "1f3a8" }, { "n": ["thread", "spool of thread"], "u": "1f9f5" }, { "n": ["sewing needle"], "u": "1faa1" }, { "n": ["yarn", "ball of yarn"], "u": "1f9f6" }, { "n": ["knot"], "u": "1faa2" }], "objects": [{ "n": ["eyeglasses"], "u": "1f453" }, { "n": ["sunglasses", "dark sunglasses"], "u": "1f576-fe0f" }, { "n": ["goggles"], "u": "1f97d" }, { "n": ["lab coat"], "u": "1f97c" }, { "n": ["safety vest"], "u": "1f9ba" }, { "n": ["necktie"], "u": "1f454" }, { "n": ["shirt", "tshirt", "t-shirt"], "u": "1f455" }, { "n": ["jeans"], "u": "1f456" }, { "n": ["scarf"], "u": "1f9e3" }, { "n": ["gloves"], "u": "1f9e4" }, { "n": ["coat"], "u": "1f9e5" }, { "n": ["socks"], "u": "1f9e6" }, { "n": ["dress"], "u": "1f457" }, { "n": ["kimono"], "u": "1f458" }, { "n": ["sari"], "u": "1f97b" }, { "n": ["one-piece swimsuit"], "u": "1fa71" }, { "n": ["briefs"], "u": "1fa72" }, { "n": ["shorts"], "u": "1fa73" }, { "n": ["bikini"], "u": "1f459" }, { "n": ["womans clothes"], "u": "1f45a" }, { "n": ["purse"], "u": "1f45b" }, { "n": ["handbag"], "u": "1f45c" }, { "n": ["pouch"], "u": "1f45d" }, { "n": ["shopping bags"], "u": "1f6cd-fe0f" }, { "n": ["school satchel"], "u": "1f392" }, { "n": ["thong sandal"], "u": "1fa74" }, { "n": ["shoe", "mans shoe"], "u": "1f45e" }, { "n": ["athletic shoe"], "u": "1f45f" }, { "n": ["hiking boot"], "u": "1f97e" }, { "n": ["flat shoe", "womans flat shoe"], "u": "1f97f" }, { "n": ["high heel", "high-heeled shoe"], "u": "1f460" }, { "n": ["sandal", "womans sandal"], "u": "1f461" }, { "n": ["ballet shoes"], "u": "1fa70" }, { "n": ["boot", "womans boots"], "u": "1f462" }, { "n": ["crown"], "u": "1f451" }, { "n": ["womans hat"], "u": "1f452" }, { "n": ["tophat", "top hat"], "u": "1f3a9" }, { "n": ["mortar board", "graduation cap"], "u": "1f393" }, { "n": ["billed cap"], "u": "1f9e2" }, { "n": ["military helmet"], "u": "1fa96" }, { "n": ["rescue worker\u2019s helmet", "helmet with white cross"], "u": "26d1-fe0f" }, { "n": ["prayer beads"], "u": "1f4ff" }, { "n": ["lipstick"], "u": "1f484" }, { "n": ["ring"], "u": "1f48d" }, { "n": ["gem", "gem stone"], "u": "1f48e" }, { "n": ["mute", "speaker with cancellation stroke"], "u": "1f507" }, { "n": ["speaker"], "u": "1f508" }, { "n": ["sound", "speaker with one sound wave"], "u": "1f509" }, { "n": ["loud sound", "speaker with three sound waves"], "u": "1f50a" }, { "n": ["loudspeaker", "public address loudspeaker"], "u": "1f4e2" }, { "n": ["mega", "cheering megaphone"], "u": "1f4e3" }, { "n": ["postal horn"], "u": "1f4ef" }, { "n": ["bell"], "u": "1f514" }, { "n": ["no bell", "bell with cancellation stroke"], "u": "1f515" }, { "n": ["musical score"], "u": "1f3bc" }, { "n": ["musical note"], "u": "1f3b5" }, { "n": ["notes", "multiple musical notes"], "u": "1f3b6" }, { "n": ["studio microphone"], "u": "1f399-fe0f" }, { "n": ["level slider"], "u": "1f39a-fe0f" }, { "n": ["control knobs"], "u": "1f39b-fe0f" }, { "n": ["microphone"], "u": "1f3a4" }, { "n": ["headphone", "headphones"], "u": "1f3a7" }, { "n": ["radio"], "u": "1f4fb" }, { "n": ["saxophone"], "u": "1f3b7" }, { "n": ["accordion"], "u": "1fa97" }, { "n": ["guitar"], "u": "1f3b8" }, { "n": ["musical keyboard"], "u": "1f3b9" }, { "n": ["trumpet"], "u": "1f3ba" }, { "n": ["violin"], "u": "1f3bb" }, { "n": ["banjo"], "u": "1fa95" }, { "n": ["drum with drumsticks"], "u": "1f941" }, { "n": ["long drum"], "u": "1fa98" }, { "n": ["iphone", "mobile phone"], "u": "1f4f1" }, { "n": ["calling", "mobile phone with rightwards arrow at left"], "u": "1f4f2" }, { "n": ["phone", "telephone", "black telephone"], "u": "260e-fe0f" }, { "n": ["telephone receiver"], "u": "1f4de" }, { "n": ["pager"], "u": "1f4df" }, { "n": ["fax", "fax machine"], "u": "1f4e0" }, { "n": ["battery"], "u": "1f50b" }, { "n": ["low battery"], "u": "1faab" }, { "n": ["electric plug"], "u": "1f50c" }, { "n": ["computer", "personal computer"], "u": "1f4bb" }, { "n": ["desktop computer"], "u": "1f5a5-fe0f" }, { "n": ["printer"], "u": "1f5a8-fe0f" }, { "n": ["keyboard"], "u": "2328-fe0f" }, { "n": ["computer mouse", "three button mouse"], "u": "1f5b1-fe0f" }, { "n": ["trackball"], "u": "1f5b2-fe0f" }, { "n": ["minidisc"], "u": "1f4bd" }, { "n": ["floppy disk"], "u": "1f4be" }, { "n": ["cd", "optical disc"], "u": "1f4bf" }, { "n": ["dvd"], "u": "1f4c0" }, { "n": ["abacus"], "u": "1f9ee" }, { "n": ["movie camera"], "u": "1f3a5" }, { "n": ["film frames"], "u": "1f39e-fe0f" }, { "n": ["film projector"], "u": "1f4fd-fe0f" }, { "n": ["clapper", "clapper board"], "u": "1f3ac" }, { "n": ["tv", "television"], "u": "1f4fa" }, { "n": ["camera"], "u": "1f4f7" }, { "n": ["camera with flash"], "u": "1f4f8" }, { "n": ["video camera"], "u": "1f4f9" }, { "n": ["vhs", "videocassette"], "u": "1f4fc" }, { "n": ["mag", "left-pointing magnifying glass"], "u": "1f50d" }, { "n": ["mag right", "right-pointing magnifying glass"], "u": "1f50e" }, { "n": ["candle"], "u": "1f56f-fe0f" }, { "n": ["bulb", "electric light bulb"], "u": "1f4a1" }, { "n": ["flashlight", "electric torch"], "u": "1f526" }, { "n": ["lantern", "izakaya lantern"], "u": "1f3ee" }, { "n": ["diya lamp"], "u": "1fa94" }, { "n": ["notebook with decorative cover"], "u": "1f4d4" }, { "n": ["closed book"], "u": "1f4d5" }, { "n": ["book", "open book"], "u": "1f4d6" }, { "n": ["green book"], "u": "1f4d7" }, { "n": ["blue book"], "u": "1f4d8" }, { "n": ["orange book"], "u": "1f4d9" }, { "n": ["books"], "u": "1f4da" }, { "n": ["notebook"], "u": "1f4d3" }, { "n": ["ledger"], "u": "1f4d2" }, { "n": ["page with curl"], "u": "1f4c3" }, { "n": ["scroll"], "u": "1f4dc" }, { "n": ["page facing up"], "u": "1f4c4" }, { "n": ["newspaper"], "u": "1f4f0" }, { "n": ["rolled-up newspaper", "rolled up newspaper"], "u": "1f5de-fe0f" }, { "n": ["bookmark tabs"], "u": "1f4d1" }, { "n": ["bookmark"], "u": "1f516" }, { "n": ["label"], "u": "1f3f7-fe0f" }, { "n": ["moneybag", "money bag"], "u": "1f4b0" }, { "n": ["coin"], "u": "1fa99" }, { "n": ["yen", "banknote with yen sign"], "u": "1f4b4" }, { "n": ["dollar", "banknote with dollar sign"], "u": "1f4b5" }, { "n": ["euro", "banknote with euro sign"], "u": "1f4b6" }, { "n": ["pound", "banknote with pound sign"], "u": "1f4b7" }, { "n": ["money with wings"], "u": "1f4b8" }, { "n": ["credit card"], "u": "1f4b3" }, { "n": ["receipt"], "u": "1f9fe" }, { "n": ["chart", "chart with upwards trend and yen sign"], "u": "1f4b9" }, { "n": ["email", "envelope"], "u": "2709-fe0f" }, { "n": ["e-mail", "e-mail symbol"], "u": "1f4e7" }, { "n": ["incoming envelope"], "u": "1f4e8" }, { "n": ["envelope with arrow", "envelope with downwards arrow above"], "u": "1f4e9" }, { "n": ["outbox tray"], "u": "1f4e4" }, { "n": ["inbox tray"], "u": "1f4e5" }, { "n": ["package"], "u": "1f4e6" }, { "n": ["mailbox", "closed mailbox with raised flag"], "u": "1f4eb" }, { "n": ["mailbox closed", "closed mailbox with lowered flag"], "u": "1f4ea" }, { "n": ["mailbox with mail", "open mailbox with raised flag"], "u": "1f4ec" }, { "n": ["mailbox with no mail", "open mailbox with lowered flag"], "u": "1f4ed" }, { "n": ["postbox"], "u": "1f4ee" }, { "n": ["ballot box with ballot"], "u": "1f5f3-fe0f" }, { "n": ["pencil", "pencil2"], "u": "270f-fe0f" }, { "n": ["black nib"], "u": "2712-fe0f" }, { "n": ["fountain pen", "lower left fountain pen"], "u": "1f58b-fe0f" }, { "n": ["pen", "lower left ballpoint pen"], "u": "1f58a-fe0f" }, { "n": ["paintbrush", "lower left paintbrush"], "u": "1f58c-fe0f" }, { "n": ["crayon", "lower left crayon"], "u": "1f58d-fe0f" }, { "n": ["memo", "pencil"], "u": "1f4dd" }, { "n": ["briefcase"], "u": "1f4bc" }, { "n": ["file folder"], "u": "1f4c1" }, { "n": ["open file folder"], "u": "1f4c2" }, { "n": ["card index dividers"], "u": "1f5c2-fe0f" }, { "n": ["date", "calendar"], "u": "1f4c5" }, { "n": ["calendar", "tear-off calendar"], "u": "1f4c6" }, { "n": ["spiral notepad", "spiral note pad"], "u": "1f5d2-fe0f" }, { "n": ["spiral calendar", "spiral calendar pad"], "u": "1f5d3-fe0f" }, { "n": ["card index"], "u": "1f4c7" }, { "n": ["chart with upwards trend"], "u": "1f4c8" }, { "n": ["chart with downwards trend"], "u": "1f4c9" }, { "n": ["bar chart"], "u": "1f4ca" }, { "n": ["clipboard"], "u": "1f4cb" }, { "n": ["pushpin"], "u": "1f4cc" }, { "n": ["round pushpin"], "u": "1f4cd" }, { "n": ["paperclip"], "u": "1f4ce" }, { "n": ["linked paperclips"], "u": "1f587-fe0f" }, { "n": ["straight ruler"], "u": "1f4cf" }, { "n": ["triangular ruler"], "u": "1f4d0" }, { "n": ["scissors", "black scissors"], "u": "2702-fe0f" }, { "n": ["card file box"], "u": "1f5c3-fe0f" }, { "n": ["file cabinet"], "u": "1f5c4-fe0f" }, { "n": ["wastebasket"], "u": "1f5d1-fe0f" }, { "n": ["lock"], "u": "1f512" }, { "n": ["unlock", "open lock"], "u": "1f513" }, { "n": ["lock with ink pen"], "u": "1f50f" }, { "n": ["closed lock with key"], "u": "1f510" }, { "n": ["key"], "u": "1f511" }, { "n": ["old key"], "u": "1f5dd-fe0f" }, { "n": ["hammer"], "u": "1f528" }, { "n": ["axe"], "u": "1fa93" }, { "n": ["pick"], "u": "26cf-fe0f" }, { "n": ["hammer and pick"], "u": "2692-fe0f" }, { "n": ["hammer and wrench"], "u": "1f6e0-fe0f" }, { "n": ["dagger", "dagger knife"], "u": "1f5e1-fe0f" }, { "n": ["crossed swords"], "u": "2694-fe0f" }, { "n": ["gun", "pistol"], "u": "1f52b" }, { "n": ["boomerang"], "u": "1fa83" }, { "n": ["bow and arrow"], "u": "1f3f9" }, { "n": ["shield"], "u": "1f6e1-fe0f" }, { "n": ["carpentry saw"], "u": "1fa9a" }, { "n": ["wrench"], "u": "1f527" }, { "n": ["screwdriver"], "u": "1fa9b" }, { "n": ["nut and bolt"], "u": "1f529" }, { "n": ["gear"], "u": "2699-fe0f" }, { "n": ["clamp", "compression"], "u": "1f5dc-fe0f" }, { "n": ["scales", "balance scale"], "u": "2696-fe0f" }, { "n": ["probing cane"], "u": "1f9af" }, { "n": ["link", "link symbol"], "u": "1f517" }, { "n": ["chains"], "u": "26d3-fe0f" }, { "n": ["hook"], "u": "1fa9d" }, { "n": ["toolbox"], "u": "1f9f0" }, { "n": ["magnet"], "u": "1f9f2" }, { "n": ["ladder"], "u": "1fa9c" }, { "n": ["alembic"], "u": "2697-fe0f" }, { "n": ["test tube"], "u": "1f9ea" }, { "n": ["petri dish"], "u": "1f9eb" }, { "n": ["dna", "dna double helix"], "u": "1f9ec" }, { "n": ["microscope"], "u": "1f52c" }, { "n": ["telescope"], "u": "1f52d" }, { "n": ["satellite antenna"], "u": "1f4e1" }, { "n": ["syringe"], "u": "1f489" }, { "n": ["drop of blood"], "u": "1fa78" }, { "n": ["pill"], "u": "1f48a" }, { "n": ["adhesive bandage"], "u": "1fa79" }, { "n": ["crutch"], "u": "1fa7c" }, { "n": ["stethoscope"], "u": "1fa7a" }, { "n": ["x-ray"], "u": "1fa7b" }, { "n": ["door"], "u": "1f6aa" }, { "n": ["elevator"], "u": "1f6d7" }, { "n": ["mirror"], "u": "1fa9e" }, { "n": ["window"], "u": "1fa9f" }, { "n": ["bed"], "u": "1f6cf-fe0f" }, { "n": ["couch and lamp"], "u": "1f6cb-fe0f" }, { "n": ["chair"], "u": "1fa91" }, { "n": ["toilet"], "u": "1f6bd" }, { "n": ["plunger"], "u": "1faa0" }, { "n": ["shower"], "u": "1f6bf" }, { "n": ["bathtub"], "u": "1f6c1" }, { "n": ["mouse trap"], "u": "1faa4" }, { "n": ["razor"], "u": "1fa92" }, { "n": ["lotion bottle"], "u": "1f9f4" }, { "n": ["safety pin"], "u": "1f9f7" }, { "n": ["broom"], "u": "1f9f9" }, { "n": ["basket"], "u": "1f9fa" }, { "n": ["roll of paper"], "u": "1f9fb" }, { "n": ["bucket"], "u": "1faa3" }, { "n": ["soap", "bar of soap"], "u": "1f9fc" }, { "n": ["bubbles"], "u": "1fae7" }, { "n": ["toothbrush"], "u": "1faa5" }, { "n": ["sponge"], "u": "1f9fd" }, { "n": ["fire extinguisher"], "u": "1f9ef" }, { "n": ["shopping trolley"], "u": "1f6d2" }, { "n": ["smoking", "smoking symbol"], "u": "1f6ac" }, { "n": ["coffin"], "u": "26b0-fe0f" }, { "n": ["headstone"], "u": "1faa6" }, { "n": ["funeral urn"], "u": "26b1-fe0f" }, { "n": ["moyai"], "u": "1f5ff" }, { "n": ["placard"], "u": "1faa7" }, { "n": ["identification card"], "u": "1faaa" }], "symbols": [{ "n": ["atm", "automated teller machine"], "u": "1f3e7" }, { "n": ["put litter in its place", "put litter in its place symbol"], "u": "1f6ae" }, { "n": ["potable water", "potable water symbol"], "u": "1f6b0" }, { "n": ["wheelchair", "wheelchair symbol"], "u": "267f" }, { "n": ["mens", "mens symbol"], "u": "1f6b9" }, { "n": ["womens", "womens symbol"], "u": "1f6ba" }, { "n": ["restroom"], "u": "1f6bb" }, { "n": ["baby symbol"], "u": "1f6bc" }, { "n": ["wc", "water closet"], "u": "1f6be" }, { "n": ["passport control"], "u": "1f6c2" }, { "n": ["customs"], "u": "1f6c3" }, { "n": ["baggage claim"], "u": "1f6c4" }, { "n": ["left luggage"], "u": "1f6c5" }, { "n": ["warning", "warning sign"], "u": "26a0-fe0f" }, { "n": ["children crossing"], "u": "1f6b8" }, { "n": ["no entry"], "u": "26d4" }, { "n": ["no entry sign"], "u": "1f6ab" }, { "n": ["no bicycles"], "u": "1f6b3" }, { "n": ["no smoking", "no smoking symbol"], "u": "1f6ad" }, { "n": ["do not litter", "do not litter symbol"], "u": "1f6af" }, { "n": ["non-potable water", "non-potable water symbol"], "u": "1f6b1" }, { "n": ["no pedestrians"], "u": "1f6b7" }, { "n": ["no mobile phones"], "u": "1f4f5" }, { "n": ["underage", "no one under eighteen symbol"], "u": "1f51e" }, { "n": ["radioactive", "radioactive sign"], "u": "2622-fe0f" }, { "n": ["biohazard", "biohazard sign"], "u": "2623-fe0f" }, { "n": ["arrow up", "upwards black arrow"], "u": "2b06-fe0f" }, { "n": ["north east arrow", "arrow upper right"], "u": "2197-fe0f" }, { "n": ["arrow right", "black rightwards arrow"], "u": "27a1-fe0f" }, { "n": ["south east arrow", "arrow lower right"], "u": "2198-fe0f" }, { "n": ["arrow down", "downwards black arrow"], "u": "2b07-fe0f" }, { "n": ["south west arrow", "arrow lower left"], "u": "2199-fe0f" }, { "n": ["arrow left", "leftwards black arrow"], "u": "2b05-fe0f" }, { "n": ["north west arrow", "arrow upper left"], "u": "2196-fe0f" }, { "n": ["up down arrow", "arrow up down"], "u": "2195-fe0f" }, { "n": ["left right arrow"], "u": "2194-fe0f" }, { "n": ["leftwards arrow with hook"], "u": "21a9-fe0f" }, { "n": ["arrow right hook", "rightwards arrow with hook"], "u": "21aa-fe0f" }, { "n": ["arrow heading up", "arrow pointing rightwards then curving upwards"], "u": "2934-fe0f" }, { "n": ["arrow heading down", "arrow pointing rightwards then curving downwards"], "u": "2935-fe0f" }, { "n": ["arrows clockwise", "clockwise downwards and upwards open circle arrows"], "u": "1f503" }, { "n": ["arrows counterclockwise", "anticlockwise downwards and upwards open circle arrows"], "u": "1f504" }, { "n": ["back", "back with leftwards arrow above"], "u": "1f519" }, { "n": ["end", "end with leftwards arrow above"], "u": "1f51a" }, { "n": ["on", "on with exclamation mark with left right arrow above"], "u": "1f51b" }, { "n": ["soon", "soon with rightwards arrow above"], "u": "1f51c" }, { "n": ["top", "top with upwards arrow above"], "u": "1f51d" }, { "n": ["place of worship"], "u": "1f6d0" }, { "n": ["atom symbol"], "u": "269b-fe0f" }, { "n": ["om", "om symbol"], "u": "1f549-fe0f" }, { "n": ["star of david"], "u": "2721-fe0f" }, { "n": ["wheel of dharma"], "u": "2638-fe0f" }, { "n": ["yin yang"], "u": "262f-fe0f" }, { "n": ["latin cross"], "u": "271d-fe0f" }, { "n": ["orthodox cross"], "u": "2626-fe0f" }, { "n": ["star and crescent"], "u": "262a-fe0f" }, { "n": ["peace symbol"], "u": "262e-fe0f" }, { "n": ["menorah with nine branches"], "u": "1f54e" }, { "n": ["six pointed star", "six pointed star with middle dot"], "u": "1f52f" }, { "n": ["aries"], "u": "2648" }, { "n": ["taurus"], "u": "2649" }, { "n": ["gemini"], "u": "264a" }, { "n": ["cancer"], "u": "264b" }, { "n": ["leo"], "u": "264c" }, { "n": ["virgo"], "u": "264d" }, { "n": ["libra"], "u": "264e" }, { "n": ["scorpius"], "u": "264f" }, { "n": ["sagittarius"], "u": "2650" }, { "n": ["capricorn"], "u": "2651" }, { "n": ["aquarius"], "u": "2652" }, { "n": ["pisces"], "u": "2653" }, { "n": ["ophiuchus"], "u": "26ce" }, { "n": ["twisted rightwards arrows"], "u": "1f500" }, { "n": ["repeat", "clockwise rightwards and leftwards open circle arrows"], "u": "1f501" }, { "n": ["repeat one", "clockwise rightwards and leftwards open circle arrows with circled one overlay"], "u": "1f502" }, { "n": ["arrow forward", "black right-pointing triangle"], "u": "25b6-fe0f" }, { "n": ["fast forward", "black right-pointing double triangle"], "u": "23e9" }, { "n": ["next track button", "black right pointing double triangle with vertical bar"], "u": "23ed-fe0f" }, { "n": ["play or pause button", "black right pointing triangle with double vertical bar"], "u": "23ef-fe0f" }, { "n": ["arrow backward", "black left-pointing triangle"], "u": "25c0-fe0f" }, { "n": ["rewind", "black left-pointing double triangle"], "u": "23ea" }, { "n": ["last track button", "black left pointing double triangle with vertical bar"], "u": "23ee-fe0f" }, { "n": ["arrow up small", "up-pointing small red triangle"], "u": "1f53c" }, { "n": ["arrow double up", "black up-pointing double triangle"], "u": "23eb" }, { "n": ["arrow down small", "down-pointing small red triangle"], "u": "1f53d" }, { "n": ["arrow double down", "black down-pointing double triangle"], "u": "23ec" }, { "n": ["pause button", "double vertical bar"], "u": "23f8-fe0f" }, { "n": ["stop button", "black square for stop"], "u": "23f9-fe0f" }, { "n": ["record button", "black circle for record"], "u": "23fa-fe0f" }, { "n": ["eject", "eject button"], "u": "23cf-fe0f" }, { "n": ["cinema"], "u": "1f3a6" }, { "n": ["low brightness", "low brightness symbol"], "u": "1f505" }, { "n": ["high brightness", "high brightness symbol"], "u": "1f506" }, { "n": ["signal strength", "antenna with bars"], "u": "1f4f6" }, { "n": ["vibration mode"], "u": "1f4f3" }, { "n": ["mobile phone off"], "u": "1f4f4" }, { "n": ["female sign"], "u": "2640-fe0f" }, { "n": ["male sign"], "u": "2642-fe0f" }, { "n": ["transgender symbol"], "u": "26a7-fe0f" }, { "n": ["heavy multiplication x"], "u": "2716-fe0f" }, { "n": ["heavy plus sign"], "u": "2795" }, { "n": ["heavy minus sign"], "u": "2796" }, { "n": ["heavy division sign"], "u": "2797" }, { "n": ["heavy equals sign"], "u": "1f7f0" }, { "n": ["infinity"], "u": "267e-fe0f" }, { "n": ["bangbang", "double exclamation mark"], "u": "203c-fe0f" }, { "n": ["interrobang", "exclamation question mark"], "u": "2049-fe0f" }, { "n": ["question", "black question mark ornament"], "u": "2753" }, { "n": ["grey question", "white question mark ornament"], "u": "2754" }, { "n": ["grey exclamation", "white exclamation mark ornament"], "u": "2755" }, { "n": ["exclamation", "heavy exclamation mark", "heavy exclamation mark symbol"], "u": "2757" }, { "n": ["wavy dash"], "u": "3030-fe0f" }, { "n": ["currency exchange"], "u": "1f4b1" }, { "n": ["heavy dollar sign"], "u": "1f4b2" }, { "n": ["medical symbol", "staff of aesculapius"], "u": "2695-fe0f" }, { "n": ["recycle", "black universal recycling symbol"], "u": "267b-fe0f" }, { "n": ["fleur-de-lis", "fleur de lis"], "u": "269c-fe0f" }, { "n": ["trident", "trident emblem"], "u": "1f531" }, { "n": ["name badge"], "u": "1f4db" }, { "n": ["beginner", "japanese symbol for beginner"], "u": "1f530" }, { "n": ["o", "heavy large circle"], "u": "2b55" }, { "n": ["white check mark", "white heavy check mark"], "u": "2705" }, { "n": ["ballot box with check"], "u": "2611-fe0f" }, { "n": ["heavy check mark"], "u": "2714-fe0f" }, { "n": ["x", "cross mark"], "u": "274c" }, { "n": ["negative squared cross mark"], "u": "274e" }, { "n": ["curly loop"], "u": "27b0" }, { "n": ["loop", "double curly loop"], "u": "27bf" }, { "n": ["part alternation mark"], "u": "303d-fe0f" }, { "n": ["eight spoked asterisk"], "u": "2733-fe0f" }, { "n": ["eight pointed black star"], "u": "2734-fe0f" }, { "n": ["sparkle"], "u": "2747-fe0f" }, { "n": ["copyright", "copyright sign"], "u": "00a9-fe0f" }, { "n": ["registered", "registered sign"], "u": "00ae-fe0f" }, { "n": ["tm", "trade mark sign"], "u": "2122-fe0f" }, { "n": ["hash", "hash key"], "u": "0023-fe0f-20e3" }, { "n": ["keycap: *", "keycap star"], "u": "002a-fe0f-20e3" }, { "n": ["zero", "keycap 0"], "u": "0030-fe0f-20e3" }, { "n": ["one", "keycap 1"], "u": "0031-fe0f-20e3" }, { "n": ["two", "keycap 2"], "u": "0032-fe0f-20e3" }, { "n": ["three", "keycap 3"], "u": "0033-fe0f-20e3" }, { "n": ["four", "keycap 4"], "u": "0034-fe0f-20e3" }, { "n": ["five", "keycap 5"], "u": "0035-fe0f-20e3" }, { "n": ["six", "keycap 6"], "u": "0036-fe0f-20e3" }, { "n": ["seven", "keycap 7"], "u": "0037-fe0f-20e3" }, { "n": ["eight", "keycap 8"], "u": "0038-fe0f-20e3" }, { "n": ["nine", "keycap 9"], "u": "0039-fe0f-20e3" }, { "n": ["keycap ten"], "u": "1f51f" }, { "n": ["capital abcd", "input symbol for latin capital letters"], "u": "1f520" }, { "n": ["abcd", "input symbol for latin small letters"], "u": "1f521" }, { "n": ["1234", "input symbol for numbers"], "u": "1f522" }, { "n": ["symbols", "input symbol for symbols"], "u": "1f523" }, { "n": ["abc", "input symbol for latin letters"], "u": "1f524" }, { "n": ["a", "negative squared latin capital letter a"], "u": "1f170-fe0f" }, { "n": ["ab", "negative squared ab"], "u": "1f18e" }, { "n": ["b", "negative squared latin capital letter b"], "u": "1f171-fe0f" }, { "n": ["cl", "squared cl"], "u": "1f191" }, { "n": ["cool", "squared cool"], "u": "1f192" }, { "n": ["free", "squared free"], "u": "1f193" }, { "n": ["information source"], "u": "2139-fe0f" }, { "n": ["id", "squared id"], "u": "1f194" }, { "n": ["m", "circled latin capital letter m"], "u": "24c2-fe0f" }, { "n": ["new", "squared new"], "u": "1f195" }, { "n": ["ng", "squared ng"], "u": "1f196" }, { "n": ["o2", "negative squared latin capital letter o"], "u": "1f17e-fe0f" }, { "n": ["ok", "squared ok"], "u": "1f197" }, { "n": ["parking", "negative squared latin capital letter p"], "u": "1f17f-fe0f" }, { "n": ["sos", "squared sos"], "u": "1f198" }, { "n": ["up", "squared up with exclamation mark"], "u": "1f199" }, { "n": ["vs", "squared vs"], "u": "1f19a" }, { "n": ["koko", "squared katakana koko"], "u": "1f201" }, { "n": ["sa", "squared katakana sa"], "u": "1f202-fe0f" }, { "n": ["u6708", "squared cjk unified ideograph-6708"], "u": "1f237-fe0f" }, { "n": ["u6709", "squared cjk unified ideograph-6709"], "u": "1f236" }, { "n": ["u6307", "squared cjk unified ideograph-6307"], "u": "1f22f" }, { "n": ["ideograph advantage", "circled ideograph advantage"], "u": "1f250" }, { "n": ["u5272", "squared cjk unified ideograph-5272"], "u": "1f239" }, { "n": ["u7121", "squared cjk unified ideograph-7121"], "u": "1f21a" }, { "n": ["u7981", "squared cjk unified ideograph-7981"], "u": "1f232" }, { "n": ["accept", "circled ideograph accept"], "u": "1f251" }, { "n": ["u7533", "squared cjk unified ideograph-7533"], "u": "1f238" }, { "n": ["u5408", "squared cjk unified ideograph-5408"], "u": "1f234" }, { "n": ["u7a7a", "squared cjk unified ideograph-7a7a"], "u": "1f233" }, { "n": ["congratulations", "circled ideograph congratulation"], "u": "3297-fe0f" }, { "n": ["secret", "circled ideograph secret"], "u": "3299-fe0f" }, { "n": ["u55b6", "squared cjk unified ideograph-55b6"], "u": "1f23a" }, { "n": ["u6e80", "squared cjk unified ideograph-6e80"], "u": "1f235" }, { "n": ["red circle", "large red circle"], "u": "1f534" }, { "n": ["large orange circle"], "u": "1f7e0" }, { "n": ["large yellow circle"], "u": "1f7e1" }, { "n": ["large green circle"], "u": "1f7e2" }, { "n": ["large blue circle"], "u": "1f535" }, { "n": ["large purple circle"], "u": "1f7e3" }, { "n": ["large brown circle"], "u": "1f7e4" }, { "n": ["black circle", "medium black circle"], "u": "26ab" }, { "n": ["white circle", "medium white circle"], "u": "26aa" }, { "n": ["large red square"], "u": "1f7e5" }, { "n": ["large orange square"], "u": "1f7e7" }, { "n": ["large yellow square"], "u": "1f7e8" }, { "n": ["large green square"], "u": "1f7e9" }, { "n": ["large blue square"], "u": "1f7e6" }, { "n": ["large purple square"], "u": "1f7ea" }, { "n": ["large brown square"], "u": "1f7eb" }, { "n": ["black large square"], "u": "2b1b" }, { "n": ["white large square"], "u": "2b1c" }, { "n": ["black medium square"], "u": "25fc-fe0f" }, { "n": ["white medium square"], "u": "25fb-fe0f" }, { "n": ["black medium small square"], "u": "25fe" }, { "n": ["white medium small square"], "u": "25fd" }, { "n": ["black small square"], "u": "25aa-fe0f" }, { "n": ["white small square"], "u": "25ab-fe0f" }, { "n": ["large orange diamond"], "u": "1f536" }, { "n": ["large blue diamond"], "u": "1f537" }, { "n": ["small orange diamond"], "u": "1f538" }, { "n": ["small blue diamond"], "u": "1f539" }, { "n": ["small red triangle", "up-pointing red triangle"], "u": "1f53a" }, { "n": ["small red triangle down", "down-pointing red triangle"], "u": "1f53b" }, { "n": ["diamond shape with a dot inside"], "u": "1f4a0" }, { "n": ["radio button"], "u": "1f518" }, { "n": ["white square button"], "u": "1f533" }, { "n": ["black square button"], "u": "1f532" }], "flags": [{ "n": ["chequered flag", "checkered flag"], "u": "1f3c1" }, { "n": ["triangular flag on post"], "u": "1f6a9" }, { "n": ["crossed flags"], "u": "1f38c" }, { "n": ["waving black flag"], "u": "1f3f4" }, { "n": ["white flag", "waving white flag"], "u": "1f3f3-fe0f" }, { "n": ["rainbow flag", "rainbow-flag"], "u": "1f3f3-fe0f-200d-1f308" }, { "n": ["transgender flag"], "u": "1f3f3-fe0f-200d-26a7-fe0f" }, { "n": ["pirate flag"], "u": "1f3f4-200d-2620-fe0f" }, { "n": ["flag-ac", "ascension island flag"], "u": "1f1e6-1f1e8" }, { "n": ["flag-ad", "andorra flag"], "u": "1f1e6-1f1e9" }, { "n": ["flag-ae", "united arab emirates flag"], "u": "1f1e6-1f1ea" }, { "n": ["flag-af", "afghanistan flag"], "u": "1f1e6-1f1eb" }, { "n": ["flag-ag", "antigua & barbuda flag"], "u": "1f1e6-1f1ec" }, { "n": ["flag-ai", "anguilla flag"], "u": "1f1e6-1f1ee" }, { "n": ["flag-al", "albania flag"], "u": "1f1e6-1f1f1" }, { "n": ["flag-am", "armenia flag"], "u": "1f1e6-1f1f2" }, { "n": ["flag-ao", "angola flag"], "u": "1f1e6-1f1f4" }, { "n": ["flag-aq", "antarctica flag"], "u": "1f1e6-1f1f6" }, { "n": ["flag-ar", "argentina flag"], "u": "1f1e6-1f1f7" }, { "n": ["flag-as", "american samoa flag"], "u": "1f1e6-1f1f8" }, { "n": ["flag-at", "austria flag"], "u": "1f1e6-1f1f9" }, { "n": ["flag-au", "australia flag"], "u": "1f1e6-1f1fa" }, { "n": ["flag-aw", "aruba flag"], "u": "1f1e6-1f1fc" }, { "n": ["flag-ax", "\xE5land islands flag"], "u": "1f1e6-1f1fd" }, { "n": ["flag-az", "azerbaijan flag"], "u": "1f1e6-1f1ff" }, { "n": ["flag-ba", "bosnia & herzegovina flag"], "u": "1f1e7-1f1e6" }, { "n": ["flag-bb", "barbados flag"], "u": "1f1e7-1f1e7" }, { "n": ["flag-bd", "bangladesh flag"], "u": "1f1e7-1f1e9" }, { "n": ["flag-be", "belgium flag"], "u": "1f1e7-1f1ea" }, { "n": ["flag-bf", "burkina faso flag"], "u": "1f1e7-1f1eb" }, { "n": ["flag-bg", "bulgaria flag"], "u": "1f1e7-1f1ec" }, { "n": ["flag-bh", "bahrain flag"], "u": "1f1e7-1f1ed" }, { "n": ["flag-bi", "burundi flag"], "u": "1f1e7-1f1ee" }, { "n": ["flag-bj", "benin flag"], "u": "1f1e7-1f1ef" }, { "n": ["flag-bl", "st. barth\xE9lemy flag"], "u": "1f1e7-1f1f1" }, { "n": ["flag-bm", "bermuda flag"], "u": "1f1e7-1f1f2" }, { "n": ["flag-bn", "brunei flag"], "u": "1f1e7-1f1f3" }, { "n": ["flag-bo", "bolivia flag"], "u": "1f1e7-1f1f4" }, { "n": ["flag-bq", "caribbean netherlands flag"], "u": "1f1e7-1f1f6" }, { "n": ["flag-br", "brazil flag"], "u": "1f1e7-1f1f7" }, { "n": ["flag-bs", "bahamas flag"], "u": "1f1e7-1f1f8" }, { "n": ["flag-bt", "bhutan flag"], "u": "1f1e7-1f1f9" }, { "n": ["flag-bv", "bouvet island flag"], "u": "1f1e7-1f1fb" }, { "n": ["flag-bw", "botswana flag"], "u": "1f1e7-1f1fc" }, { "n": ["flag-by", "belarus flag"], "u": "1f1e7-1f1fe" }, { "n": ["flag-bz", "belize flag"], "u": "1f1e7-1f1ff" }, { "n": ["flag-ca", "canada flag"], "u": "1f1e8-1f1e6" }, { "n": ["flag-cc", "cocos (keeling) islands flag"], "u": "1f1e8-1f1e8" }, { "n": ["flag-cd", "congo - kinshasa flag"], "u": "1f1e8-1f1e9" }, { "n": ["flag-cf", "central african republic flag"], "u": "1f1e8-1f1eb" }, { "n": ["flag-cg", "congo - brazzaville flag"], "u": "1f1e8-1f1ec" }, { "n": ["flag-ch", "switzerland flag"], "u": "1f1e8-1f1ed" }, { "n": ["flag-ci", "c\xF4te d\u2019ivoire flag"], "u": "1f1e8-1f1ee" }, { "n": ["flag-ck", "cook islands flag"], "u": "1f1e8-1f1f0" }, { "n": ["flag-cl", "chile flag"], "u": "1f1e8-1f1f1" }, { "n": ["flag-cm", "cameroon flag"], "u": "1f1e8-1f1f2" }, { "n": ["cn", "flag-cn", "china flag"], "u": "1f1e8-1f1f3" }, { "n": ["flag-co", "colombia flag"], "u": "1f1e8-1f1f4" }, { "n": ["flag-cp", "clipperton island flag"], "u": "1f1e8-1f1f5" }, { "n": ["flag-cr", "costa rica flag"], "u": "1f1e8-1f1f7" }, { "n": ["flag-cu", "cuba flag"], "u": "1f1e8-1f1fa" }, { "n": ["flag-cv", "cape verde flag"], "u": "1f1e8-1f1fb" }, { "n": ["flag-cw", "cura\xE7ao flag"], "u": "1f1e8-1f1fc" }, { "n": ["flag-cx", "christmas island flag"], "u": "1f1e8-1f1fd" }, { "n": ["flag-cy", "cyprus flag"], "u": "1f1e8-1f1fe" }, { "n": ["flag-cz", "czechia flag"], "u": "1f1e8-1f1ff" }, { "n": ["de", "flag-de", "germany flag"], "u": "1f1e9-1f1ea" }, { "n": ["flag-dg", "diego garcia flag"], "u": "1f1e9-1f1ec" }, { "n": ["flag-dj", "djibouti flag"], "u": "1f1e9-1f1ef" }, { "n": ["flag-dk", "denmark flag"], "u": "1f1e9-1f1f0" }, { "n": ["flag-dm", "dominica flag"], "u": "1f1e9-1f1f2" }, { "n": ["flag-do", "dominican republic flag"], "u": "1f1e9-1f1f4" }, { "n": ["flag-dz", "algeria flag"], "u": "1f1e9-1f1ff" }, { "n": ["flag-ea", "ceuta & melilla flag"], "u": "1f1ea-1f1e6" }, { "n": ["flag-ec", "ecuador flag"], "u": "1f1ea-1f1e8" }, { "n": ["flag-ee", "estonia flag"], "u": "1f1ea-1f1ea" }, { "n": ["flag-eg", "egypt flag"], "u": "1f1ea-1f1ec" }, { "n": ["flag-eh", "western sahara flag"], "u": "1f1ea-1f1ed" }, { "n": ["flag-er", "eritrea flag"], "u": "1f1ea-1f1f7" }, { "n": ["es", "flag-es", "spain flag"], "u": "1f1ea-1f1f8" }, { "n": ["flag-et", "ethiopia flag"], "u": "1f1ea-1f1f9" }, { "n": ["flag-eu", "european union flag"], "u": "1f1ea-1f1fa" }, { "n": ["flag-fi", "finland flag"], "u": "1f1eb-1f1ee" }, { "n": ["flag-fj", "fiji flag"], "u": "1f1eb-1f1ef" }, { "n": ["flag-fk", "falkland islands flag"], "u": "1f1eb-1f1f0" }, { "n": ["flag-fm", "micronesia flag"], "u": "1f1eb-1f1f2" }, { "n": ["flag-fo", "faroe islands flag"], "u": "1f1eb-1f1f4" }, { "n": ["fr", "flag-fr", "france flag"], "u": "1f1eb-1f1f7" }, { "n": ["flag-ga", "gabon flag"], "u": "1f1ec-1f1e6" }, { "n": ["gb", "uk", "flag-gb", "united kingdom flag"], "u": "1f1ec-1f1e7" }, { "n": ["flag-gd", "grenada flag"], "u": "1f1ec-1f1e9" }, { "n": ["flag-ge", "georgia flag"], "u": "1f1ec-1f1ea" }, { "n": ["flag-gf", "french guiana flag"], "u": "1f1ec-1f1eb" }, { "n": ["flag-gg", "guernsey flag"], "u": "1f1ec-1f1ec" }, { "n": ["flag-gh", "ghana flag"], "u": "1f1ec-1f1ed" }, { "n": ["flag-gi", "gibraltar flag"], "u": "1f1ec-1f1ee" }, { "n": ["flag-gl", "greenland flag"], "u": "1f1ec-1f1f1" }, { "n": ["flag-gm", "gambia flag"], "u": "1f1ec-1f1f2" }, { "n": ["flag-gn", "guinea flag"], "u": "1f1ec-1f1f3" }, { "n": ["flag-gp", "guadeloupe flag"], "u": "1f1ec-1f1f5" }, { "n": ["flag-gq", "equatorial guinea flag"], "u": "1f1ec-1f1f6" }, { "n": ["flag-gr", "greece flag"], "u": "1f1ec-1f1f7" }, { "n": ["flag-gs", "south georgia & south sandwich islands flag"], "u": "1f1ec-1f1f8" }, { "n": ["flag-gt", "guatemala flag"], "u": "1f1ec-1f1f9" }, { "n": ["flag-gu", "guam flag"], "u": "1f1ec-1f1fa" }, { "n": ["flag-gw", "guinea-bissau flag"], "u": "1f1ec-1f1fc" }, { "n": ["flag-gy", "guyana flag"], "u": "1f1ec-1f1fe" }, { "n": ["flag-hk", "hong kong sar china flag"], "u": "1f1ed-1f1f0" }, { "n": ["flag-hm", "heard & mcdonald islands flag"], "u": "1f1ed-1f1f2" }, { "n": ["flag-hn", "honduras flag"], "u": "1f1ed-1f1f3" }, { "n": ["flag-hr", "croatia flag"], "u": "1f1ed-1f1f7" }, { "n": ["flag-ht", "haiti flag"], "u": "1f1ed-1f1f9" }, { "n": ["flag-hu", "hungary flag"], "u": "1f1ed-1f1fa" }, { "n": ["flag-ic", "canary islands flag"], "u": "1f1ee-1f1e8" }, { "n": ["flag-id", "indonesia flag"], "u": "1f1ee-1f1e9" }, { "n": ["flag-ie", "ireland flag"], "u": "1f1ee-1f1ea" }, { "n": ["flag-il", "israel flag"], "u": "1f1ee-1f1f1" }, { "n": ["flag-im", "isle of man flag"], "u": "1f1ee-1f1f2" }, { "n": ["flag-in", "india flag"], "u": "1f1ee-1f1f3" }, { "n": ["flag-io", "british indian ocean territory flag"], "u": "1f1ee-1f1f4" }, { "n": ["flag-iq", "iraq flag"], "u": "1f1ee-1f1f6" }, { "n": ["flag-ir", "iran flag"], "u": "1f1ee-1f1f7" }, { "n": ["flag-is", "iceland flag"], "u": "1f1ee-1f1f8" }, { "n": ["it", "flag-it", "italy flag"], "u": "1f1ee-1f1f9" }, { "n": ["flag-je", "jersey flag"], "u": "1f1ef-1f1ea" }, { "n": ["flag-jm", "jamaica flag"], "u": "1f1ef-1f1f2" }, { "n": ["flag-jo", "jordan flag"], "u": "1f1ef-1f1f4" }, { "n": ["jp", "flag-jp", "japan flag"], "u": "1f1ef-1f1f5" }, { "n": ["flag-ke", "kenya flag"], "u": "1f1f0-1f1ea" }, { "n": ["flag-kg", "kyrgyzstan flag"], "u": "1f1f0-1f1ec" }, { "n": ["flag-kh", "cambodia flag"], "u": "1f1f0-1f1ed" }, { "n": ["flag-ki", "kiribati flag"], "u": "1f1f0-1f1ee" }, { "n": ["flag-km", "comoros flag"], "u": "1f1f0-1f1f2" }, { "n": ["flag-kn", "st. kitts & nevis flag"], "u": "1f1f0-1f1f3" }, { "n": ["flag-kp", "north korea flag"], "u": "1f1f0-1f1f5" }, { "n": ["kr", "flag-kr", "south korea flag"], "u": "1f1f0-1f1f7" }, { "n": ["flag-kw", "kuwait flag"], "u": "1f1f0-1f1fc" }, { "n": ["flag-ky", "cayman islands flag"], "u": "1f1f0-1f1fe" }, { "n": ["flag-kz", "kazakhstan flag"], "u": "1f1f0-1f1ff" }, { "n": ["flag-la", "laos flag"], "u": "1f1f1-1f1e6" }, { "n": ["flag-lb", "lebanon flag"], "u": "1f1f1-1f1e7" }, { "n": ["flag-lc", "st. lucia flag"], "u": "1f1f1-1f1e8" }, { "n": ["flag-li", "liechtenstein flag"], "u": "1f1f1-1f1ee" }, { "n": ["flag-lk", "sri lanka flag"], "u": "1f1f1-1f1f0" }, { "n": ["flag-lr", "liberia flag"], "u": "1f1f1-1f1f7" }, { "n": ["flag-ls", "lesotho flag"], "u": "1f1f1-1f1f8" }, { "n": ["flag-lt", "lithuania flag"], "u": "1f1f1-1f1f9" }, { "n": ["flag-lu", "luxembourg flag"], "u": "1f1f1-1f1fa" }, { "n": ["flag-lv", "latvia flag"], "u": "1f1f1-1f1fb" }, { "n": ["flag-ly", "libya flag"], "u": "1f1f1-1f1fe" }, { "n": ["flag-ma", "morocco flag"], "u": "1f1f2-1f1e6" }, { "n": ["flag-mc", "monaco flag"], "u": "1f1f2-1f1e8" }, { "n": ["flag-md", "moldova flag"], "u": "1f1f2-1f1e9" }, { "n": ["flag-me", "montenegro flag"], "u": "1f1f2-1f1ea" }, { "n": ["flag-mf", "st. martin flag"], "u": "1f1f2-1f1eb" }, { "n": ["flag-mg", "madagascar flag"], "u": "1f1f2-1f1ec" }, { "n": ["flag-mh", "marshall islands flag"], "u": "1f1f2-1f1ed" }, { "n": ["flag-mk", "north macedonia flag"], "u": "1f1f2-1f1f0" }, { "n": ["flag-ml", "mali flag"], "u": "1f1f2-1f1f1" }, { "n": ["flag-mm", "myanmar (burma) flag"], "u": "1f1f2-1f1f2" }, { "n": ["flag-mn", "mongolia flag"], "u": "1f1f2-1f1f3" }, { "n": ["flag-mo", "macao sar china flag"], "u": "1f1f2-1f1f4" }, { "n": ["flag-mp", "northern mariana islands flag"], "u": "1f1f2-1f1f5" }, { "n": ["flag-mq", "martinique flag"], "u": "1f1f2-1f1f6" }, { "n": ["flag-mr", "mauritania flag"], "u": "1f1f2-1f1f7" }, { "n": ["flag-ms", "montserrat flag"], "u": "1f1f2-1f1f8" }, { "n": ["flag-mt", "malta flag"], "u": "1f1f2-1f1f9" }, { "n": ["flag-mu", "mauritius flag"], "u": "1f1f2-1f1fa" }, { "n": ["flag-mv", "maldives flag"], "u": "1f1f2-1f1fb" }, { "n": ["flag-mw", "malawi flag"], "u": "1f1f2-1f1fc" }, { "n": ["flag-mx", "mexico flag"], "u": "1f1f2-1f1fd" }, { "n": ["flag-my", "malaysia flag"], "u": "1f1f2-1f1fe" }, { "n": ["flag-mz", "mozambique flag"], "u": "1f1f2-1f1ff" }, { "n": ["flag-na", "namibia flag"], "u": "1f1f3-1f1e6" }, { "n": ["flag-nc", "new caledonia flag"], "u": "1f1f3-1f1e8" }, { "n": ["flag-ne", "niger flag"], "u": "1f1f3-1f1ea" }, { "n": ["flag-nf", "norfolk island flag"], "u": "1f1f3-1f1eb" }, { "n": ["flag-ng", "nigeria flag"], "u": "1f1f3-1f1ec" }, { "n": ["flag-ni", "nicaragua flag"], "u": "1f1f3-1f1ee" }, { "n": ["flag-nl", "netherlands flag"], "u": "1f1f3-1f1f1" }, { "n": ["flag-no", "norway flag"], "u": "1f1f3-1f1f4" }, { "n": ["flag-np", "nepal flag"], "u": "1f1f3-1f1f5" }, { "n": ["flag-nr", "nauru flag"], "u": "1f1f3-1f1f7" }, { "n": ["flag-nu", "niue flag"], "u": "1f1f3-1f1fa" }, { "n": ["flag-nz", "new zealand flag"], "u": "1f1f3-1f1ff" }, { "n": ["flag-om", "oman flag"], "u": "1f1f4-1f1f2" }, { "n": ["flag-pa", "panama flag"], "u": "1f1f5-1f1e6" }, { "n": ["flag-pe", "peru flag"], "u": "1f1f5-1f1ea" }, { "n": ["flag-pf", "french polynesia flag"], "u": "1f1f5-1f1eb" }, { "n": ["flag-pg", "papua new guinea flag"], "u": "1f1f5-1f1ec" }, { "n": ["flag-ph", "philippines flag"], "u": "1f1f5-1f1ed" }, { "n": ["flag-pk", "pakistan flag"], "u": "1f1f5-1f1f0" }, { "n": ["flag-pl", "poland flag"], "u": "1f1f5-1f1f1" }, { "n": ["flag-pm", "st. pierre & miquelon flag"], "u": "1f1f5-1f1f2" }, { "n": ["flag-pn", "pitcairn islands flag"], "u": "1f1f5-1f1f3" }, { "n": ["flag-pr", "puerto rico flag"], "u": "1f1f5-1f1f7" }, { "n": ["flag-ps", "palestinian territories flag"], "u": "1f1f5-1f1f8" }, { "n": ["flag-pt", "portugal flag"], "u": "1f1f5-1f1f9" }, { "n": ["flag-pw", "palau flag"], "u": "1f1f5-1f1fc" }, { "n": ["flag-py", "paraguay flag"], "u": "1f1f5-1f1fe" }, { "n": ["flag-qa", "qatar flag"], "u": "1f1f6-1f1e6" }, { "n": ["flag-re", "r\xE9union flag"], "u": "1f1f7-1f1ea" }, { "n": ["flag-ro", "romania flag"], "u": "1f1f7-1f1f4" }, { "n": ["flag-rs", "serbia flag"], "u": "1f1f7-1f1f8" }, { "n": ["ru", "flag-ru", "russia flag"], "u": "1f1f7-1f1fa" }, { "n": ["flag-rw", "rwanda flag"], "u": "1f1f7-1f1fc" }, { "n": ["flag-sa", "saudi arabia flag"], "u": "1f1f8-1f1e6" }, { "n": ["flag-sb", "solomon islands flag"], "u": "1f1f8-1f1e7" }, { "n": ["flag-sc", "seychelles flag"], "u": "1f1f8-1f1e8" }, { "n": ["flag-sd", "sudan flag"], "u": "1f1f8-1f1e9" }, { "n": ["flag-se", "sweden flag"], "u": "1f1f8-1f1ea" }, { "n": ["flag-sg", "singapore flag"], "u": "1f1f8-1f1ec" }, { "n": ["flag-sh", "st. helena flag"], "u": "1f1f8-1f1ed" }, { "n": ["flag-si", "slovenia flag"], "u": "1f1f8-1f1ee" }, { "n": ["flag-sj", "svalbard & jan mayen flag"], "u": "1f1f8-1f1ef" }, { "n": ["flag-sk", "slovakia flag"], "u": "1f1f8-1f1f0" }, { "n": ["flag-sl", "sierra leone flag"], "u": "1f1f8-1f1f1" }, { "n": ["flag-sm", "san marino flag"], "u": "1f1f8-1f1f2" }, { "n": ["flag-sn", "senegal flag"], "u": "1f1f8-1f1f3" }, { "n": ["flag-so", "somalia flag"], "u": "1f1f8-1f1f4" }, { "n": ["flag-sr", "suriname flag"], "u": "1f1f8-1f1f7" }, { "n": ["flag-ss", "south sudan flag"], "u": "1f1f8-1f1f8" }, { "n": ["flag-st", "s\xE3o tom\xE9 & pr\xEDncipe flag"], "u": "1f1f8-1f1f9" }, { "n": ["flag-sv", "el salvador flag"], "u": "1f1f8-1f1fb" }, { "n": ["flag-sx", "sint maarten flag"], "u": "1f1f8-1f1fd" }, { "n": ["flag-sy", "syria flag"], "u": "1f1f8-1f1fe" }, { "n": ["flag-sz", "eswatini flag"], "u": "1f1f8-1f1ff" }, { "n": ["flag-ta", "tristan da cunha flag"], "u": "1f1f9-1f1e6" }, { "n": ["flag-tc", "turks & caicos islands flag"], "u": "1f1f9-1f1e8" }, { "n": ["flag-td", "chad flag"], "u": "1f1f9-1f1e9" }, { "n": ["flag-tf", "french southern territories flag"], "u": "1f1f9-1f1eb" }, { "n": ["flag-tg", "togo flag"], "u": "1f1f9-1f1ec" }, { "n": ["flag-th", "thailand flag"], "u": "1f1f9-1f1ed" }, { "n": ["flag-tj", "tajikistan flag"], "u": "1f1f9-1f1ef" }, { "n": ["flag-tk", "tokelau flag"], "u": "1f1f9-1f1f0" }, { "n": ["flag-tl", "timor-leste flag"], "u": "1f1f9-1f1f1" }, { "n": ["flag-tm", "turkmenistan flag"], "u": "1f1f9-1f1f2" }, { "n": ["flag-tn", "tunisia flag"], "u": "1f1f9-1f1f3" }, { "n": ["flag-to", "tonga flag"], "u": "1f1f9-1f1f4" }, { "n": ["flag-tr", "turkey flag"], "u": "1f1f9-1f1f7" }, { "n": ["flag-tt", "trinidad & tobago flag"], "u": "1f1f9-1f1f9" }, { "n": ["flag-tv", "tuvalu flag"], "u": "1f1f9-1f1fb" }, { "n": ["flag-tw", "taiwan flag"], "u": "1f1f9-1f1fc" }, { "n": ["flag-tz", "tanzania flag"], "u": "1f1f9-1f1ff" }, { "n": ["flag-ua", "ukraine flag"], "u": "1f1fa-1f1e6" }, { "n": ["flag-ug", "uganda flag"], "u": "1f1fa-1f1ec" }, { "n": ["flag-um", "u.s. outlying islands flag"], "u": "1f1fa-1f1f2" }, { "n": ["flag-un", "united nations flag"], "u": "1f1fa-1f1f3" }, { "n": ["us", "flag-us", "united states flag"], "u": "1f1fa-1f1f8" }, { "n": ["flag-uy", "uruguay flag"], "u": "1f1fa-1f1fe" }, { "n": ["flag-uz", "uzbekistan flag"], "u": "1f1fa-1f1ff" }, { "n": ["flag-va", "vatican city flag"], "u": "1f1fb-1f1e6" }, { "n": ["flag-vc", "st. vincent & grenadines flag"], "u": "1f1fb-1f1e8" }, { "n": ["flag-ve", "venezuela flag"], "u": "1f1fb-1f1ea" }, { "n": ["flag-vg", "british virgin islands flag"], "u": "1f1fb-1f1ec" }, { "n": ["flag-vi", "u.s. virgin islands flag"], "u": "1f1fb-1f1ee" }, { "n": ["flag-vn", "vietnam flag"], "u": "1f1fb-1f1f3" }, { "n": ["flag-vu", "vanuatu flag"], "u": "1f1fb-1f1fa" }, { "n": ["flag-wf", "wallis & futuna flag"], "u": "1f1fc-1f1eb" }, { "n": ["flag-ws", "samoa flag"], "u": "1f1fc-1f1f8" }, { "n": ["flag-xk", "kosovo flag"], "u": "1f1fd-1f1f0" }, { "n": ["flag-ye", "yemen flag"], "u": "1f1fe-1f1ea" }, { "n": ["flag-yt", "mayotte flag"], "u": "1f1fe-1f1f9" }, { "n": ["flag-za", "south africa flag"], "u": "1f1ff-1f1e6" }, { "n": ["flag-zm", "zambia flag"], "u": "1f1ff-1f1f2" }, { "n": ["flag-zw", "zimbabwe flag"], "u": "1f1ff-1f1fc" }, { "n": ["england flag", "flag-england"], "u": "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f" }, { "n": ["scotland flag", "flag-scotland"], "u": "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f" }, { "n": ["wales flag", "flag-wales"], "u": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f" }] }; + +// src/components/Sidebar/FileStickerMenu/FileStickerMenu.tsx +var FileStickerMenu = (props) => { + const [searchString, setSearchString] = p2(""); + const emojiArray = Object.keys(emojis).reduce((p6, c3) => [...p6, ...emojis[c3].map((e5) => ({ label: e5.n[0], desc: e5.n[1], variants: e5.v, unicode: e5.u }))], []); + const filteredArray = emojiArray.filter(({ label }) => label.includes(searchString)); + const ref = _2(null); + h2(() => { + ref == null ? void 0 : ref.current.focus(); + }, []); + const selectEmoji = (emoji) => { + props.setIcon(emoji); + props.close(); + }; + return /* @__PURE__ */ _n.createElement("div", { + className: "mk-sticker-menu menu" + }, /* @__PURE__ */ _n.createElement("input", { + autoFocus: true, + className: "mk-sticker-filter", + ref, + onChange: () => setSearchString(ref.current.value), + placeholder: i18n_default.labels.findStickers + }), /* @__PURE__ */ _n.createElement("div", { + className: "suggestion" + }, (filteredArray.length == 0 ? emojiArray : filteredArray).map((value) => /* @__PURE__ */ _n.createElement("div", { + className: "suggestion-item", + onClick: () => selectEmoji(value.unicode) + }, value.unicode.length > 0 ? unifiedToNative(value.unicode) : i18n_default.commandsSuggest.noResult)))); +}; + +// node_modules/react-popper/lib/esm/utils.js +var fromEntries = function fromEntries2(entries) { + return entries.reduce(function(acc, _ref) { + var key2 = _ref[0], value = _ref[1]; + acc[key2] = value; + return acc; + }, {}); +}; +var useIsomorphicLayoutEffect3 = typeof window !== "undefined" && window.document && window.document.createElement ? s2 : h2; + +// node_modules/@popperjs/core/lib/enums.js +var top = "top"; +var bottom = "bottom"; +var right = "right"; +var left = "left"; +var auto = "auto"; +var basePlacements = [top, bottom, right, left]; +var start = "start"; +var end = "end"; +var clippingParents = "clippingParents"; +var viewport = "viewport"; +var popper = "popper"; +var reference = "reference"; +var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); +}, []); +var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); +}, []); +var beforeRead = "beforeRead"; +var read = "read"; +var afterRead = "afterRead"; +var beforeMain = "beforeMain"; +var main = "main"; +var afterMain = "afterMain"; +var beforeWrite = "beforeWrite"; +var write = "write"; +var afterWrite = "afterWrite"; +var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + +// node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; +} + +// node_modules/@popperjs/core/lib/dom-utils/getWindow.js +function getWindow3(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; +} + +// node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +function isElement(node) { + var OwnElement = getWindow3(node).Element; + return node instanceof OwnElement || node instanceof Element; +} +function isHTMLElement2(node) { + var OwnElement = getWindow3(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; +} +function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow3(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; +} + +// node_modules/@popperjs/core/lib/modifiers/applyStyles.js +function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement2(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); +} +function effect(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement2(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; +} +var applyStyles_default = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect, + requires: ["computeStyles"] +}; + +// node_modules/@popperjs/core/lib/utils/getBasePlacement.js +function getBasePlacement(placement) { + return placement.split("-")[0]; +} + +// node_modules/@popperjs/core/lib/utils/math.js +var max = Math.max; +var min = Math.min; +var round = Math.round; + +// node_modules/@popperjs/core/lib/utils/userAgent.js +function getUAString() { + var uaData = navigator.userAgentData; + if (uaData != null && uaData.brands) { + return uaData.brands.map(function(item) { + return item.brand + "/" + item.version; + }).join(" "); + } + return navigator.userAgent; +} + +// node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +function isLayoutViewport() { + return !/^((?!chrome|android).)*safari/i.test(getUAString()); +} + +// node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +function getBoundingClientRect(element, includeScale, isFixedStrategy) { + if (includeScale === void 0) { + includeScale = false; + } + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + var clientRect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (includeScale && isHTMLElement2(element)) { + scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1; + scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1; + } + var _ref = isElement(element) ? getWindow3(element) : window, visualViewport = _ref.visualViewport; + var addVisualOffsets = !isLayoutViewport() && isFixedStrategy; + var x5 = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX; + var y4 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY; + var width = clientRect.width / scaleX; + var height = clientRect.height / scaleY; + return { + width, + height, + top: y4, + right: x5 + width, + bottom: y4 + height, + left: x5, + x: x5, + y: y4 + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/contains.js +function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; +} + +// node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +function getComputedStyle(element) { + return getWindow3(element).getComputedStyle(element); +} + +// node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; +} + +// node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +function getDocumentElement(element) { + return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement; +} + +// node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element); +} + +// node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +function getTrueOffsetParent(element) { + if (!isHTMLElement2(element) || getComputedStyle(element).position === "fixed") { + return null; + } + return element.offsetParent; +} +function getContainingBlock(element) { + var isFirefox = /firefox/i.test(getUAString()); + var isIE = /Trident/i.test(getUAString()); + if (isIE && isHTMLElement2(element)) { + var elementCss = getComputedStyle(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + if (isShadowRoot(currentNode)) { + currentNode = currentNode.host; + } + while (isHTMLElement2(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; +} +function getOffsetParent(element) { + var window2 = getWindow3(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; +} + +// node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; +} + +// node_modules/@popperjs/core/lib/utils/within.js +function within(min2, value, max2) { + return max(min2, min(value, max2)); +} +function withinMaxClamp(min2, value, max2) { + var v3 = within(min2, value, max2); + return v3 > max2 ? max2 : v3; +} + +// node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} + +// node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); +} + +// node_modules/@popperjs/core/lib/utils/expandToHashMap.js +function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key2) { + hashMap[key2] = value; + return hashMap; + }, {}); +} + +// node_modules/@popperjs/core/lib/modifiers/arrow.js +var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); +}; +function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); +} +function effect2(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement2(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; +} +var arrow_default = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect: effect2, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] +}; + +// node_modules/@popperjs/core/lib/utils/getVariation.js +function getVariation(placement) { + return placement.split("-")[1]; +} + +// node_modules/@popperjs/core/lib/modifiers/computeStyles.js +var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" +}; +function roundOffsetsByDPR(_ref) { + var x5 = _ref.x, y4 = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x5 * dpr) / dpr || 0, + y: round(y4 * dpr) / dpr || 0 + }; +} +function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed2 = _ref2.isFixed; + var _offsets$x = offsets.x, x5 = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y4 = _offsets$y === void 0 ? 0 : _offsets$y; + var _ref3 = typeof roundOffsets === "function" ? roundOffsets({ + x: x5, + y: y4 + }) : { + x: x5, + y: y4 + }; + x5 = _ref3.x; + y4 = _ref3.y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow3(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed2 && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp]; + y4 -= offsetY - popperRect.height; + y4 *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed2 && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp]; + x5 -= offsetX - popperRect.width; + x5 *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ + x: x5, + y: y4 + }) : { + x: x5, + y: y4 + }; + x5 = _ref4.x; + y4 = _ref4.y; + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x5 + "px, " + y4 + "px)" : "translate3d(" + x5 + "px, " + y4 + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y4 + "px" : "", _Object$assign2[sideX] = hasX ? x5 + "px" : "", _Object$assign2.transform = "", _Object$assign2)); +} +function computeStyles(_ref5) { + var state = _ref5.state, options = _ref5.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty2 = getComputedStyle(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty2.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); +} +var computeStyles_default = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} +}; + +// node_modules/@popperjs/core/lib/modifiers/eventListeners.js +var passive = { + passive: true +}; +function effect3(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow3(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; +} +var eventListeners_default = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn2() { + }, + effect: effect3, + data: {} +}; + +// node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +var hash = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}; +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash[matched]; + }); +} + +// node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +var hash2 = { + start: "end", + end: "start" +}; +function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash2[matched]; + }); +} + +// node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +function getWindowScroll(node) { + var win = getWindow3(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; +} + +// node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +function getViewportRect(element, strategy) { + var win = getWindow3(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x5 = 0; + var y4 = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + var layoutViewport = isLayoutViewport(); + if (layoutViewport || !layoutViewport && strategy === "fixed") { + x5 = visualViewport.offsetLeft; + y4 = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x5 + getWindowScrollBarX(element), + y: y4 + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x5 = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y4 = -winScroll.scrollTop; + if (getComputedStyle(body || html).direction === "rtl") { + x5 += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x: x5, + y: y4 + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +function isScrollParent(element) { + var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); +} + +// node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement2(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); +} + +// node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow3(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target))); +} + +// node_modules/@popperjs/core/lib/utils/rectToClientRect.js +function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); +} + +// node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +function getInnerBoundingClientRect(element, strategy) { + var rect = getBoundingClientRect(element, false, strategy === "fixed"); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; +} +function getClientRectFromMixedType(element, clippingParent, strategy) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element))); +} +function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement2(element) ? getOffsetParent(element) : element; + if (!isElement(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; + }); +} +function getClippingRect(element, boundary, rootBoundary, strategy) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent, strategy); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent, strategy)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; +} + +// node_modules/@popperjs/core/lib/utils/computeOffsets.js +function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + default: + } + } + return offsets; +} + +// node_modules/@popperjs/core/lib/utils/detectOverflow.js +function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key2) { + var multiply = [right, bottom].indexOf(key2) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key2) >= 0 ? "y" : "x"; + overflowOffsets[key2] += offset2[axis] * multiply; + }); + } + return overflowOffsets; +} + +// node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements2.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements2; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a6, b4) { + return overflows[a6] - overflows[b4]; + }); +} + +// node_modules/@popperjs/core/lib/modifiers/flip.js +function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; +} +function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i5 = 0; i5 < placements2.length; i5++) { + var placement = placements2[i5]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") + break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } +} +var flip_default = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } +}; + +// node_modules/@popperjs/core/lib/modifiers/hide.js +function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; +} +function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); +} +function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); +} +var hide_default = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide +}; + +// node_modules/@popperjs/core/lib/modifiers/offset.js +function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; +} +function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x5 = _data$state$placement.x, y4 = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x5; + state.modifiersData.popperOffsets.y += y4; + } + state.modifiersData[name] = data; +} +var offset_default = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset +}; + +// node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); +} +var popperOffsets_default = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} +}; + +// node_modules/@popperjs/core/lib/utils/getAltAxis.js +function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; +} + +// node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min2 = offset2 + overflow[mainSide]; + var max2 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min2, tetherMin) : min2, offset2, tether ? max(max2, tetherMax) : max2); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; +} +var preventOverflow_default = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] +}; + +// node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; +} + +// node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +function getNodeScroll(node) { + if (node === getWindow3(node) || !isHTMLElement2(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } +} + +// node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; +} +function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed2) { + if (isFixed2 === void 0) { + isFixed2 = false; + } + var isOffsetParentAnElement = isHTMLElement2(offsetParent); + var offsetParentIsScaled = isHTMLElement2(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed2); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed2) { + if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement2(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.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 + }; +} + +// node_modules/@popperjs/core/lib/utils/orderModifiers.js +function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; +} +function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); +} + +// node_modules/@popperjs/core/lib/utils/debounce.js +function debounce(fn3) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn3()); + }); + }); + } + return pending; + }; +} + +// node_modules/@popperjs/core/lib/utils/format.js +function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p6, c3) { + return p6.replace(/%s/, c3); + }, str); +} + +// node_modules/@popperjs/core/lib/utils/validateModifiers.js +var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; +var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; +var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; +function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self2) { + return self2.indexOf(value) === index; + }).forEach(function(key2) { + switch (key2) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s10) { + return '"' + s10 + '"'; + }).join(", ") + '; but "' + key2 + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); +} + +// node_modules/@popperjs/core/lib/utils/uniqueBy.js +function uniqueBy(arr, fn3) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn3(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); +} + +// node_modules/@popperjs/core/lib/utils/mergeByName.js +function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key2) { + return merged[key2]; + }); +} + +// node_modules/@popperjs/core/lib/createPopper.js +var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; +var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; +var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" +}; +function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); +} +function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions2 = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper2(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions2; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions2), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions2, state.options, options2); + state.scrollParents = { + reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m6) { + return m6.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn3 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn3 === "function") { + state = fn3({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect4 = _ref3.effect; + if (typeof effect4 === "function") { + var cleanupFn = effect4({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn3) { + return fn3(); + }); + effectCleanupFns = []; + } + return instance; + }; +} + +// node_modules/@popperjs/core/lib/popper.js +var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default]; +var createPopper = /* @__PURE__ */ popperGenerator({ + defaultModifiers +}); + +// node_modules/react-popper/lib/esm/usePopper.js +var import_react_fast_compare = __toESM(require_react_fast_compare()); +var EMPTY_MODIFIERS = []; +var usePopper = function usePopper2(referenceElement, popperElement, options) { + if (options === void 0) { + options = {}; + } + var prevOptions = _2(null); + var optionsWithDefaults = { + onFirstUpdate: options.onFirstUpdate, + placement: options.placement || "bottom", + strategy: options.strategy || "absolute", + modifiers: options.modifiers || EMPTY_MODIFIERS + }; + var _React$useState = p2({ + styles: { + popper: { + position: optionsWithDefaults.strategy, + left: "0", + top: "0" + }, + arrow: { + position: "absolute" + } + }, + attributes: {} + }), state = _React$useState[0], setState = _React$useState[1]; + var updateStateModifier = F(function() { + return { + name: "updateState", + enabled: true, + phase: "write", + fn: function fn3(_ref) { + var state2 = _ref.state; + var elements = Object.keys(state2.elements); + sn(function() { + setState({ + styles: fromEntries(elements.map(function(element) { + return [element, state2.styles[element] || {}]; + })), + attributes: fromEntries(elements.map(function(element) { + return [element, state2.attributes[element]]; + })) + }); + }); + }, + requires: ["computeStyles"] + }; + }, []); + var popperOptions = F(function() { + var newOptions = { + onFirstUpdate: optionsWithDefaults.onFirstUpdate, + placement: optionsWithDefaults.placement, + strategy: optionsWithDefaults.strategy, + modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, { + name: "applyStyles", + enabled: false + }]) + }; + if ((0, import_react_fast_compare.default)(prevOptions.current, newOptions)) { + return prevOptions.current || newOptions; + } else { + prevOptions.current = newOptions; + return newOptions; + } + }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]); + var popperInstanceRef = _2(); + useIsomorphicLayoutEffect3(function() { + if (popperInstanceRef.current) { + popperInstanceRef.current.setOptions(popperOptions); + } + }, [popperOptions]); + useIsomorphicLayoutEffect3(function() { + if (referenceElement == null || popperElement == null) { + return; + } + var createPopper2 = options.createPopper || createPopper; + var popperInstance = createPopper2(referenceElement, popperElement, popperOptions); + popperInstanceRef.current = popperInstance; + return function() { + popperInstance.destroy(); + popperInstanceRef.current = null; + }; + }, [referenceElement, popperElement, options.createPopper]); + return { + state: popperInstanceRef.current ? popperInstanceRef.current.state : null, + styles: state.styles, + attributes: state.attributes, + update: popperInstanceRef.current ? popperInstanceRef.current.update : null, + forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null + }; +}; + +// src/components/Sidebar/TreeView/FolderTreeView.tsx +var animateLayoutChanges = ({ isSorting, wasDragging }) => isSorting || wasDragging ? false : true; +function SortableTreeItem({ id, data, depth, disabled, ...props }) { + const { + attributes, + isDragging, + isSorting, + listeners, + setDraggableNodeRef, + setDroppableNodeRef, + transform, + transition + } = useSortable({ + id, + animateLayoutChanges, + disabled, + data + }); + if (data.parentId == null) { + return /* @__PURE__ */ _n.createElement(SectionItem, { + ref: setDraggableNodeRef, + wrapperRef: setDroppableNodeRef, + data, + depth, + ghost: isDragging, + disableInteraction: isSorting, + disabled, + handleProps: { + ...attributes, + ...listeners + }, + ...props + }); + } else { + return /* @__PURE__ */ _n.createElement(TreeItem, { + ref: setDraggableNodeRef, + wrapperRef: setDroppableNodeRef, + data, + depth, + ghost: isDragging, + disableInteraction: isSorting, + disabled, + handleProps: { + ...attributes, + ...listeners + }, + ...props + }); + } +} +var TreeItem = N2(({ + childCount, + clone, + data, + depth, + disableSelection, + disableInteraction, + ghost, + handleProps, + indentationWidth, + indicator, + collapsed, + onCollapse, + wrapperRef, + plugin, + disabled, + ...props +}, ref) => { + const collapsible = true; + const [activeFile2, setActiveFile] = Recoil_index_14(activeFile); + const [sections2, setSections] = Recoil_index_14(sections); + const [fileIcons2, setFileIcons] = Recoil_index_14(fileIcons); + const [referenceElement, setReferenceElement] = _n.useState(null); + const [popperElement, setPopperElement] = p2(null); + const { styles, attributes } = usePopper(referenceElement, popperElement); + const collapseSection = (section) => { + }; + const openFile2 = (file, e5) => { + openFile(file, plugin.app, e5.ctrlKey || e5.metaKey); + setActiveFile(file.path); + }; + const updateSections = (sections3) => { + plugin.settings.spaces = sections3; + plugin.saveSettings(); + }; + const triggerContextMenu = (file, isFolder, e5) => { + const fileMenu = new import_obsidian6.Menu(); + if (isFolder) { + fileMenu.addSeparator(); + fileMenu.addItem((menuItem) => { + menuItem.setIcon("edit"); + menuItem.setTitle(i18n_default.buttons.createNote); + menuItem.onClick((ev) => { + newFileInFolder(); + }); + }); + fileMenu.addItem((menuItem) => { + menuItem.setIcon("folder-plus"); + menuItem.setTitle(i18n_default.buttons.createFolder); + menuItem.onClick((ev) => { + let vaultChangeModal = new VaultChangeModal(plugin, data, "create folder", -1); + vaultChangeModal.open(); + }); + }); + } + fileMenu.addSeparator(); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.spaceTitle); + menuItem.setDisabled(true); + }); + sections2.map((f5, i5) => { + fileMenu.addItem((menuItem) => { + menuItem.setIcon("pin"); + if (f5.children.contains(file.path)) { + menuItem.setIcon("checkmark"); + menuItem.setTitle(f5.section); + } else { + menuItem.setTitle(f5.section); + menuItem.setIcon("plus"); + } + menuItem.onClick((ev) => { + updateSections(!sections2[i5].children.contains(file.path) ? sections2.map((s10, k5) => { + return k5 == i5 ? { + ...s10, + children: [file.path, ...s10.children] + } : s10; + }) : sections2.map((s10, k5) => { + return k5 == i5 ? { + ...s10, + children: s10.children.filter((g4) => g4 != file.path) + } : s10; + })); + }); + }); + }); + fileMenu.addSeparator(); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.rename); + menuItem.setIcon("pencil"); + menuItem.onClick((ev) => { + let vaultChangeModal = new VaultChangeModal(plugin, file, "rename"); + vaultChangeModal.open(); + }); + }); + fileMenu.addItem((menuItem) => { + menuItem.setTitle("Delete"); + menuItem.setIcon("trash"); + menuItem.onClick((ev) => { + let deleteOption = plugin.settings.deleteFileOption; + if (deleteOption === "permanent") { + plugin.app.vault.delete(file, true); + } else if (deleteOption === "system-trash") { + plugin.app.vault.trash(file, true); + } else if (deleteOption === "trash") { + plugin.app.vault.trash(file, false); + } + }); + }); + fileMenu.addItem((menuItem) => { + menuItem.setIcon("go-to-file"); + menuItem.setTitle(i18n_default.menu.openFilePane); + menuItem.onClick((ev) => { + openFileInNewPane(plugin, { ...file, isFolder }); + }); + }); + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.duplicate); + menuItem.setIcon("documents"); + menuItem.onClick((ev) => { + if (file.basename && file.extension) + plugin.app.vault.copy(file, `${file.parent.path}/${file.basename} 1.${file.extension}`); + }); + }); + if (!internalPluginLoaded("file-explorer", plugin.app)) { + fileMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.moveFile); + menuItem.setIcon("paper-plane"); + menuItem.onClick((ev) => { + let fileMoveSuggester = new MoveSuggestionModal(plugin.app, file); + fileMoveSuggester.open(); + }); + }); + } + plugin.app.workspace.trigger("file-menu", fileMenu, file, "file-explorer"); + if (isMouseEvent(e5)) { + fileMenu.showAtPosition({ x: e5.pageX, y: e5.pageY }); + } else { + fileMenu.showAtPosition({ x: e5.nativeEvent.locationX, y: e5.nativeEvent.locationY }); + } + return false; + }; + const newFileInFolder = async () => { + await createNewMarkdownFile(plugin.app, data.parent.children.find((f5) => f5.name == data.name), "", ""); + }; + const fileIcon = fileIcons2.find(([path, icon]) => path == data.path); + const saveFileIcon = (icon) => { + const newFileIcons = [...fileIcons2.filter((f5) => f5[0] != data.path), [data.path, icon]]; + plugin.settings.fileIcons = newFileIcons; + plugin.saveSettings(); + }; + return /* @__PURE__ */ _n.createElement(_n.Fragment, null, /* @__PURE__ */ _n.createElement("div", { + className: (0, import_classnames2.default)("mk-tree-wrapper", clone && "mk-clone", ghost && "mk-ghost", disableSelection && "mk-disable-selection", disableInteraction && "mk-disable-interaction", activeFile2 === data.path && " mk-is-active"), + ref: wrapperRef, + ...props + }, /* @__PURE__ */ _n.createElement("div", { + className: (0, import_classnames2.default)(indicator.state == 2 /* Bottom */ ? "mk-indicator-bottom" : indicator.state == 1 /* Top */ ? "mk-indicator-top" : indicator.state == 3 /* Row */ ? "mk-indicator-row" : ""), + style: { + "--spacing": `${indentationWidth * indicator.depth - 12}px` + }, + ...handleProps + }, /* @__PURE__ */ _n.createElement("div", { + className: (0, import_classnames2.default)(`mk-tree-item`), + ref, + style: { + "--spacing": `${indentationWidth * depth - 12}px` + }, + onClick: (e5) => openFile2(data, e5), + onContextMenu: (e5) => triggerContextMenu(data, data.isFolder, e5) + }, data.isFolder && /* @__PURE__ */ _n.createElement("button", { + "aria-label": `${collapsed ? i18n_default.labels.expand : i18n_default.labels.collapse}`, + className: `mk-collapse ${collapsed ? "mk-collapsed" : ""}`, + onClick: (e5) => { + onCollapse(data); + e5.stopPropagation(); + } + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 2, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M8.25 4.5l7.5 7.5-7.5 7.5" + }))), plugin.settings.sidebarStickers && /* @__PURE__ */ _n.createElement("div", { + className: "mk-file-icon" + }, /* @__PURE__ */ _n.createElement(mt, null, /* @__PURE__ */ _n.createElement(mt.Button, { + "aria-label": i18n_default.buttons.changeIcon, + ref: setReferenceElement + }, fileIcon ? unifiedToNative(fileIcon[1]) : data.isFolder ? /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 2, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z" + })) : /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 2, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" + }))), _n.createPortal(/* @__PURE__ */ _n.createElement(mt.Panel, { + className: "mk-icon-menu", + ref: setPopperElement, + style: styles.popper, + ...attributes.popper + }, ({ close }) => /* @__PURE__ */ _n.createElement(FileStickerMenu, { + setIcon: (emoji) => saveFileIcon(emoji), + close + })), document.querySelector(".app-container")))), /* @__PURE__ */ _n.createElement("div", { + className: `mk-tree-text ` + }, data.isFolder ? data.name : data.name.substring(0, data.name.lastIndexOf(".")) || data.name)), /* @__PURE__ */ _n.createElement("div", { + className: "mk-folder-buttons" + }, /* @__PURE__ */ _n.createElement("button", { + "aria-label": i18n_default.buttons.moreOptions, + onClick: (e5) => { + triggerContextMenu(data, true, e5); + e5.stopPropagation(); + } + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 1.5, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" + }))), data.isFolder && /* @__PURE__ */ _n.createElement("button", { + "aria-label": i18n_default.buttons.newNote, + onClick: (e5) => { + newFileInFolder(); + e5.stopPropagation(); + } + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 1.5, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M12 4.5v15m7.5-7.5h-15" + }))))))); +}); +TreeItem.displayName = "TreeItem"; + +// src/components/Sidebar/FileExplorer.tsx +var FileExplorerComponent = (props) => { + const { plugin } = props; + const indentationWidth = 24; + const [activeFolderPath2, setActiveFolderPath] = Recoil_index_14(activeFolderPath); + const [vaultCollapsed, setVaultCollapsed] = p2(plugin.settings.vaultCollapsed); + const [openFolders2, setOpenFolders] = Recoil_index_14(openFolders); + const [fileIcons2, setFileIcons] = Recoil_index_14(fileIcons); + const [focusedFolder2, setFocusedFolder] = Recoil_index_14(focusedFolder); + const [activeFile2, setActiveFile] = Recoil_index_14(activeFile); + const [sections2, setSections] = Recoil_index_14(sections); + const [_folderTree, setFolderTree] = Recoil_index_14(folderTree); + const forceUpdate = useForceUpdate(); + const loadFolderTree = async (folder) => { + setFolderTree(await sortFolderTree(folder, plugin)); + }; + h2(() => { + window.addEventListener(eventTypes.vaultChange, vaultChangeEvent); + window.addEventListener(eventTypes.activeFileChange, changeActiveFile); + window.addEventListener(eventTypes.refreshView, forceUpdate); + window.addEventListener(eventTypes.settingsChanged, settingsChanged); + return () => { + window.removeEventListener(eventTypes.vaultChange, vaultChangeEvent); + window.removeEventListener(eventTypes.activeFileChange, changeActiveFile); + window.removeEventListener(eventTypes.refreshView, forceUpdate); + window.removeEventListener(eventTypes.settingsChanged, settingsChanged); + }; + }, []); + const handleRevealFileEvent = (evt) => { + console.log("reveal in folder"); + }; + const vaultChangeEvent = (evt) => { + if (evt.detail) { + handleVaultChanges(evt.detail.file, evt.detail.changeType, evt.detail.oldPath); + } + const loadFolderTree2 = async () => { + setFolderTree(await sortFolderTree(plugin.app.vault.getRoot(), plugin)); + }; + cleanData(); + plugin.saveSettings(); + loadFolderTree2(); + }; + const changeActiveFile = (evt) => { + let filePath = evt.detail.filePath; + const activeLeaf = plugin.app.workspace.activeLeaf; + if (activeLeaf.view.getViewType() == FOLDER_VIEW_TYPE) { + setActiveFile(activeLeaf.view.getState().folder); + } else { + let file = plugin.app.vault.getAbstractFileByPath(filePath); + if (file) { + setActiveFile(file.path); + } else { + setActiveFile(null); + } + ; + } + }; + function handleVaultChanges(file, changeType, oldPathBeforeRename) { + if (changeType == "rename") { + renamePathInStringTree(oldPathBeforeRename, file, plugin); + } + if (changeType == "delete") { + } + } + const settingsChanged = () => { + setSections(plugin.settings.spaces); + setOpenFolders(plugin.settings.openFolders); + setFileIcons(plugin.settings.fileIcons); + setVaultCollapsed(plugin.settings.vaultCollapsed); + }; + h2(() => { + setInitialFocusedFolder(); + settingsChanged(); + }, []); + const cleanData = () => { + const cleanedSections = plugin.settings.spaces.map((f5) => { + return { + ...f5, + children: f5.children.filter((f6) => plugin.app.vault.getAbstractFileByPath(f6)) + }; + }); + const cleanedCollapse = plugin.settings.openFolders; + const cleanedFileIcons = plugin.settings.fileIcons.filter((f5) => plugin.app.vault.getAbstractFileByPath(f5[0])); + plugin.settings.spaces = cleanedSections; + plugin.settings.openFolders = cleanedCollapse; + plugin.settings.fileIcons = cleanedFileIcons; + }; + const setInitialFocusedFolder = () => { + cleanData(); + loadFolderTree(plugin.app.vault.getRoot()); + setFocusedFolder(plugin.app.vault.getRoot()); + }; + const sensors = useSensors(useSensor(MouseSensor, { + activationConstraint: { + distance: 10 + } + }), useSensor(TouchSensor, { + activationConstraint: { + delay: 250, + tolerance: 5 + } + })); + const measuring = { + droppable: { + strategy: MeasuringStrategy.Always + } + }; + const [activeId, setActiveId] = p2(null); + const [overId, setOverId] = p2(null); + const [currentPosition, setCurrentPosition] = p2(null); + const [dropPlaceholderItem, setDropPlaceholderItem] = p2(null); + const [offsetLeft, setOffsetLeft] = p2(0); + const flattenSectionTree = (sectionTrees) => { + const getChildren = (section, paths, sectionIndex) => { + return flattenTrees(paths.map((f5) => plugin.app.vault.getAbstractFileByPath(f5)).filter((f5) => f5 != null), "/" + section + "/", sectionIndex, section, 1); + }; + return sectionTrees.reduce((p6, c3, i5) => { + return [...p6, { + id: c3.section, + parentId: null, + name: c3.section, + depth: 0, + index: i5, + section: i5, + isFolder: true + }, ...!c3.collapsed ? getChildren(c3.section, c3.children, i5) : []]; + }, []); + }; + const flattenedItems = F(() => { + const flattenedTree = [ + ...flattenSectionTree(sections2), + ..._folderTree ? flattenTree(_folderTree, "/", -1, vaultCollapsed) : [] + ]; + return includeChildrenOf(flattenedTree, openFolders2); + }, [_folderTree, openFolders2, sections2, vaultCollapsed]); + const sortedIds = F(() => flattenedItems.map(({ id }) => id), [flattenedItems]); + const activeItem = activeId ? flattenedItems.find(({ id }) => id === activeId) : null; + const projected = activeId && overId ? getProjection(flattenedItems, activeId, overId, offsetLeft, indentationWidth) : null; + function handleDragStart(event) { + const { active: { id: activeId2 } } = event; + const activeItem2 = flattenedItems.find(({ id }) => id === activeId2); + if (activeItem2.parentId == null && activeItem2.section == -1) + return; + setActiveId(activeId2); + setOverId(activeId2); + if (activeItem2) { + setCurrentPosition({ + parentId: activeItem2.parentId, + overId: activeId2 + }); + } + document.body.style.setProperty("cursor", "grabbing"); + } + function handleDragMove({ delta }) { + setOffsetLeft(Math.max(1, delta.x)); + } + function handleDragOver({ over }) { + var _a2; + const overId2 = over == null ? void 0 : over.id; + if (overId2) { + setOverId((_a2 = over == null ? void 0 : over.id) != null ? _a2 : null); + } + } + function handleDragEnd({ active, over }) { + resetState(); + moveFile(active, over); + } + const moveFile = async (active, over) => { + if (projected) { + const clonedItems = [ + ...flattenSectionTree(sections2), + ..._folderTree ? flattenTree(_folderTree, "/", -1, false) : [] + ]; + const overIndex = clonedItems.findIndex(({ id }) => id === over.id); + const overItem = clonedItems[overIndex]; + const activeIndex = clonedItems.findIndex(({ id }) => id === active.id); + const activeTreeItem = clonedItems[activeIndex]; + const activeIsSection = activeTreeItem.parentId == null; + const overIsSection = overItem.parentId == null; + if (activeIsSection) { + if (overIsSection) { + const newSections = overItem.section == -1 ? arrayMove(sections2, activeTreeItem.index, sections2.length - 1) : overItem.index > activeIndex ? arrayMove(sections2, activeTreeItem.index, overItem.index - 1) : arrayMove(sections2, activeTreeItem.index, overItem.index); + plugin.settings.spaces = newSections; + plugin.saveSettings(); + return; + } + } + const { depth, overId: overId2, parentId } = projected; + const parentItem = clonedItems.find(({ id }) => id === parentId); + if (overItem.section != activeItem.section || overItem.section != -1) { + if (overItem.section == -1) { + return; + } + if (parentId != sections2[overItem.section].section && parentId != null) { + return; + } + const newSections = sections2.map((s10, k5) => { + if (k5 == overItem.section) { + const index = sections2[overItem.section].children.findIndex((f5) => f5 == overItem.path) + 1; + const activeIndex2 = s10.children.findIndex((g4) => g4 == activeItem.path); + const children = s10.children.filter((g4) => g4 != activeItem.path); + const toIndex = activeIndex2 <= index && activeIndex2 != -1 ? index - 1 : index; + if (activeIndex2 == -1) { + new import_obsidian7.Notice(i18n_default.notice.addedToSection); + } + return { + ...s10, + children: [...children.slice(0, toIndex), activeItem.path, ...children.slice(toIndex)] + }; + } + return s10; + }); + plugin.settings.spaces = newSections; + plugin.saveSettings(); + return; + } + if (parentId != activeTreeItem.parentId) { + const newPath = `${parentItem.isFolder ? parentItem.path : parentItem.parent.path}/${activeItem.name}`; + if (plugin.app.vault.getAbstractFileByPath(newPath)) { + new import_obsidian7.Notice(i18n_default.notice.duplicateFile); + return; + } + await props.plugin.app.vault.rename(activeTreeItem, newPath); + clonedItems[activeIndex] = { ...activeTreeItem, depth, parentId, ...plugin.app.vault.getAbstractFileByPath(newPath) }; + } else { + clonedItems[activeIndex] = { ...activeTreeItem, depth, parentId }; + } + const sortedItems = overIndex > activeIndex ? arrayMove(clonedItems, activeIndex, overIndex) : overIndex < activeIndex ? arrayMove(clonedItems, activeIndex, overIndex + 1) : clonedItems; + const newItems = buildTree(sortedItems); + const newFolderRank = folderTreeToStringTree(newItems); + plugin.settings.folderRank = newFolderRank; + await plugin.saveSettings(); + loadFolderTree(plugin.app.vault.getRoot()); + } + }; + const adjustTranslate = ({ transform }) => { + return { + ...transform, + x: transform.x, + y: transform.y - 10 + }; + }; + function handleDragCancel() { + resetState(); + } + function handleCollapse(folder) { + if (folder.parentId == null) { + if (folder.id == "/") { + plugin.settings.vaultCollapsed = !plugin.settings.vaultCollapsed; + plugin.saveSettings(); + return; + } + const newSections = sections2.map((s10, i5) => { + return i5 == folder.index ? { ...s10, collapsed: !s10.collapsed } : s10; + }); + plugin.settings.spaces = newSections; + plugin.saveSettings(); + } else { + const folderOpen = openFolders2.find((f5) => f5 == folder.id); + const newOpenFolders = !folderOpen ? [...openFolders2, folder.id] : openFolders2.filter((openFolder) => folder.id !== openFolder); + plugin.settings.openFolders = newOpenFolders; + plugin.saveSettings(); + } + } + function resetState() { + setOverId(null); + setActiveId(null); + setOffsetLeft(0); + setDropPlaceholderItem(null); + document.body.style.setProperty("cursor", ""); + } + return /* @__PURE__ */ _n.createElement(DndContext, { + sensors, + collisionDetection: closestCenter, + measuring, + onDragStart: handleDragStart, + onDragMove: handleDragMove, + onDragOver: handleDragOver, + onDragEnd: handleDragEnd, + onDragCancel: handleDragCancel + }, /* @__PURE__ */ _n.createElement(SortableContext, { + items: sortedIds, + strategy: verticalListSortingStrategy + }, flattenedItems.map((f5) => /* @__PURE__ */ _n.createElement(SortableTreeItem, { + key: f5.id, + id: f5.id, + data: f5, + disabled: false, + depth: f5.depth, + childCount: 0, + indentationWidth, + indicator: (projected == null ? void 0 : projected.overId) == f5.id ? f5.parentId == null && projected.parentId == null ? { state: 1 /* Top */, depth: projected.depth } : { state: 2 /* Bottom */, depth: projected.depth } : { state: 0 /* None */, depth: 0 }, + plugin, + collapsed: f5.parentId == null ? f5.id == "/" ? plugin.settings.vaultCollapsed : sections2[f5.index].collapsed : !openFolders2.find((i5) => i5 == f5.id), + onCollapse: handleCollapse + })), $2(/* @__PURE__ */ _n.createElement(DragOverlay, { + dropAnimation: null, + modifiers: [adjustTranslate], + zIndex: 1600 + }, activeId ? /* @__PURE__ */ _n.createElement(SortableTreeItem, { + id: activeId, + data: flattenedItems.find((f5) => f5.id == activeId), + indicator: { state: 0 /* None */, depth: 0 }, + depth: 0, + disabled: false, + plugin, + clone: true, + childCount: 0, + indentationWidth + }) : null), document.body))); +}; + +// src/components/Sidebar/NewNote.tsx +var NewNotes = (props) => { + const [focusedFolder2, setFocusedFolder] = Recoil_index_14(focusedFolder); + const { plugin } = props; + const newFile = async () => { + await createNewMarkdownFile(props.plugin.app, focusedFolder2, "", ""); + }; + return /* @__PURE__ */ _n.createElement("div", { + className: "mk-flow-bar" + }, /* @__PURE__ */ _n.createElement("button", { + "aria-label": i18n_default.buttons.newNote, + className: "mk-new-note", + onClick: () => newFile() + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + "stroke-width": "1.5", + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + "stroke-linecap": "round", + "stroke-linejoin": "round", + d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" + })), /* @__PURE__ */ _n.createElement("p", null, i18n_default.buttons.newNote))); +}; + +// src/components/Sidebar/MainMenu.tsx +var MainMenu = (props) => { + const { plugin } = props; + const newSection = () => { + let vaultChangeModal = new SectionChangeModal(plugin, "", 0, "create"); + vaultChangeModal.open(); + }; + return /* @__PURE__ */ _n.createElement("div", { + className: "mk-main-menu-container" + }, /* @__PURE__ */ _n.createElement(qe, null, /* @__PURE__ */ _n.createElement(qe.Button, { + as: "div", + className: "mk-main-menu-button" + }, plugin.app.vault.getName(), /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 1.5, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" + }))), /* @__PURE__ */ _n.createElement(qe.Items, { + className: "mk-main-menu" + }, /* @__PURE__ */ _n.createElement(qe.Item, null, ({ active }) => /* @__PURE__ */ _n.createElement("div", { + className: `mk-menu-button ${active && "mk-menu-active"}`, + onClick: () => newSection() + }, i18n_default.menu.newSection)), /* @__PURE__ */ _n.createElement(qe.Item, null, ({ active }) => /* @__PURE__ */ _n.createElement("div", { + className: `mk-menu-button ${active && "mk-menu-active"}`, + onClick: () => plugin.app.commands.commands["command-palette:open"].callback() + }, i18n_default.menu.commandPalette)), /* @__PURE__ */ _n.createElement(qe.Item, null, ({ active }) => /* @__PURE__ */ _n.createElement("div", { + className: `mk-menu-button ${active && "mk-menu-active"}`, + onClick: () => plugin.app.commands.commands["app:open-settings"].callback() + }, i18n_default.menu.obSettings)), /* @__PURE__ */ _n.createElement(qe.Item, null, ({ active }) => /* @__PURE__ */ _n.createElement("div", { + className: `mk-menu-button ${active && "mk-menu-active"}`, + onClick: () => plugin.app.commands.commands["app:open-vault"].callback() + }, i18n_default.menu.openVault)), /* @__PURE__ */ _n.createElement(qe.Item, null, ({ active }) => /* @__PURE__ */ _n.createElement("div", { + className: `mk-menu-button ${active && "mk-menu-active"}`, + onClick: () => window.open("https://make.md/community") + }, i18n_default.menu.getHelp))))); +}; + +// src/components/Sidebar/FileTreeView.tsx +var FILE_TREE_VIEW_TYPE = "make-file-view"; +var VIEW_DISPLAY_TEXT = "Make File Tree"; +var ICON = "sheets-in-box"; +var FileTreeView = class extends import_obsidian8.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.navigation = false; + this.plugin = plugin; + } + revealInFolder(folder) { + this.plugin.app.workspace.activeLeaf.setViewState({ type: FOLDER_VIEW_TYPE, state: { folder: folder.path } }); + this.plugin.app.workspace.requestSaveLayout(); + } + getViewType() { + return FILE_TREE_VIEW_TYPE; + } + getDisplayText() { + return VIEW_DISPLAY_TEXT; + } + getIcon() { + return ICON; + } + async onClose() { + let leafs = this.app.workspace.getLeavesOfType(FILE_TREE_VIEW_TYPE); + if (leafs.length == 0) { + let leaf = this.app.workspace.getLeftLeaf(false); + await leaf.setViewState({ type: FILE_TREE_VIEW_TYPE }); + } + this.destroy(); + } + destroy() { + _n.unmountComponentAtNode(this.contentEl); + } + async onOpen() { + this.destroy(); + this.constructFileTree(this.app.vault.getRoot().path, ""); + } + constructFileTree(folderPath, vaultChange) { + this.destroy(); + _n.render(/* @__PURE__ */ _n.createElement("div", { + className: "mk-sidebar" + }, /* @__PURE__ */ _n.createElement(Recoil_index_2, null, /* @__PURE__ */ _n.createElement(MainMenu, { + plugin: this.plugin + }), /* @__PURE__ */ _n.createElement(NewNotes, { + plugin: this.plugin + }), /* @__PURE__ */ _n.createElement("div", { + className: "mk-file-tree" + }, /* @__PURE__ */ _n.createElement(FileExplorerComponent, { + fileTreeView: this, + plugin: this.plugin + })))), this.contentEl); + } +}; + +// src/main.ts +var import_view7 = require("@codemirror/view"); + +// src/settings.ts +var import_obsidian9 = require("obsidian"); +var DEFAULT_SETTINGS = { + filePreviewOnHover: false, + makerMode: true, + editorFlow: true, + sidebar: true, + sidebarStickers: true, + sidebarRibbon: false, + sidebarTabs: false, + deleteFileOption: "trash", + folderRank: { + node: "root", + children: [], + isFolder: true + }, + openFolders: [], + fileIcons: [], + spaces: [], + vaultCollapsed: false, + menuTriggerChar: "/", + emojiTriggerChar: ":" +}; +var MakeMDPluginSettingsTab = class extends import_obsidian9.PluginSettingTab { + constructor(app2, plugin) { + super(app2, plugin); + this.plugin = plugin; + } + refreshView() { + let evt = new CustomEvent(eventTypes.refreshView, {}); + window.dispatchEvent(evt); + } + display() { + let { containerEl } = this; + containerEl.empty(); + containerEl.createEl("h2", { text: i18n_default.settings.sectionSidebar }); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.sidebar.name).setDesc(i18n_default.settings.sidebar.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.sidebar).onChange((value) => { + this.plugin.settings.sidebar = value; + this.plugin.saveSettings(); + if (value) { + this.plugin.openFileTreeLeaf(true); + } else { + this.plugin.detachFileTreeLeafs(); + } + this.refreshView(); + })); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.sidebarStickers.name).setDesc(i18n_default.settings.sidebarStickers.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.sidebarStickers).onChange((value) => { + this.plugin.settings.sidebarStickers = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.sidebarRibbon.name).setDesc(i18n_default.settings.sidebarRibbon.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.sidebarRibbon).onChange((value) => { + this.plugin.settings.sidebarRibbon = value; + this.plugin.saveSettings(); + document.body.classList.toggle("mk-hide-ribbon", !value); + })); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.sidebarTabs.name).setDesc(i18n_default.settings.sidebarTabs.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.sidebarTabs).onChange((value) => { + this.plugin.settings.sidebarTabs = value; + this.plugin.saveSettings(); + document.body.classList.toggle("mk-hide-tabs", !value); + })); + containerEl.createEl("h2", { text: i18n_default.settings.sectionEditor }); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.editorMakermode.name).setDesc(i18n_default.settings.editorMakermode.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.makerMode).onChange((value) => { + this.plugin.settings.makerMode = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new import_obsidian9.Setting(containerEl).setName(i18n_default.settings.editorFlowReplace.name).setDesc(i18n_default.settings.editorFlowReplace.desc).addToggle((toggle) => toggle.setValue(this.plugin.settings.editorFlow).onChange((value) => { + this.plugin.settings.editorFlow = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + } +}; + +// src/components/Editor/MakeMenu/MakeMenu.tsx +var import_obsidian10 = require("obsidian"); + +// src/components/Editor/MakeMenu/commands/default.ts +var default_default = [ + { + label: "todo", + value: "- [ ] ", + icon: ` + + + + ` + }, + { + label: "list", + value: `- `, + icon: ` + + + + + + + + ` + }, + { + label: "ordered-list", + value: `1. `, + icon: ` + + + + + + + + ` + }, + { + label: "h1", + value: "# ", + icon: ` + + + + ` + }, + { + label: "h2", + value: "## ", + icon: ` + + + + ` + }, + { + label: "h3", + value: "### ", + icon: ` + + + + ` + }, + { + label: "quote", + value: "> ", + icon: ` + + + + + + ` + }, + { + label: "divider", + value: ` +--- +`, + icon: ` + + +` + }, + { + label: "link", + value: "", + offset: [-1, 1], + icon: ` + + + ` + }, + { + label: "image", + value: "![](Paste Link)", + offset: [-1, 4], + icon: ` + + + + + + ` + }, + { + label: "codeblock", + value: ` +\`\`\` +Type/Paste Your Code +\`\`\``, + offset: [-3, 3], + icon: ` + + + + + ` + }, + { + label: "callout", + value: `> [!NOTE] +> Content`, + offset: [-7, 12], + icon: ` + + + + ` + }, + { + label: "note", + value: "[[Note Name]]", + offset: [-2, 2], + icon: ` + + + + + + ` + }, + { + label: "flow", + value: `!![[Note Name]]`, + offset: [-2, 4], + icon: ` + + + + ` + }, + { + label: "tag", + value: "#tag", + offset: [0, 1], + icon: ` + + + + ` + } +]; + +// src/components/Editor/MakeMenu/commands/index.ts +function resolveCommands(plugin) { + return default_default; +} + +// src/components/Editor/MakeMenu/MakeMenu.tsx +var MakeMenu = class extends import_obsidian10.EditorSuggest { + constructor(app2, plugin) { + super(app2); + this.inCmd = false; + this.cmdStartCh = 0; + this.plugin = plugin; + } + resetInfos() { + this.cmdStartCh = 0; + this.inCmd = false; + } + onTrigger(cursor, editor, _file) { + const currentLine = editor.getLine(cursor.line).slice(0, cursor.ch); + if (!this.inCmd && currentLine[0] !== this.plugin.settings.menuTriggerChar) { + this.resetInfos(); + return null; + } + if (!this.inCmd) { + this.cmdStartCh = currentLine.length - 1; + this.inCmd = true; + } + const currentCmd = currentLine.slice(this.cmdStartCh, cursor.ch); + if (currentCmd.includes(" ") || !currentCmd.includes(this.plugin.settings.menuTriggerChar)) { + this.resetInfos(); + return null; + } + this.suggestEl.classList.toggle("SlashMenu", true); + return { start: cursor, end: cursor, query: currentCmd.slice(1) }; + } + getSuggestions(context) { + const suggestions = resolveCommands(this.plugin).filter(({ label }) => label.includes(context.query)); + return suggestions.length > 0 ? suggestions : [{ label: i18n_default.commandsSuggest.noResult, value: "", icon: "" }]; + } + renderSuggestion(value, el) { + const div = document.createElement("div"); + const reactElement = /* @__PURE__ */ _n.createElement("div", { + className: "mk-slash-item" + }, /* @__PURE__ */ _n.createElement("div", { + className: "mk-slash-icon", + dangerouslySetInnerHTML: { __html: value.icon } + }), i18n_default.commands[value.label]); + _n.render(reactElement, div); + el.appendChild(div); + } + selectSuggestion(cmd, _evt) { + if (cmd.label === i18n_default.commandsSuggest.noResult) + return; + this.context.editor.replaceRange(cmd.value, { ...this.context.start, ch: this.cmdStartCh }, this.context.end); + if (cmd.offset) { + this.context.editor.setSelection({ ...this.context.start, ch: cmd.offset[1] }, { ...this.context.end, ch: cmd.value.length + cmd.offset[0] }); + } + this.resetInfos(); + this.close(); + } +}; + +// src/components/Editor/StickerMenu/StickerMenu.tsx +var import_obsidian11 = require("obsidian"); +var StickerMenu = class extends import_obsidian11.EditorSuggest { + constructor(app2, plugin) { + super(app2); + this.inCmd = false; + this.cmdStartCh = 0; + this.plugin = plugin; + this.emojis = Object.keys(emojis).reduce((p6, c3) => [...p6, ...emojis[c3].map((e5) => ({ label: e5.n[0], desc: e5.n[1], variants: e5.v, unicode: e5.u }))], []); + } + resetInfos() { + this.cmdStartCh = 0; + this.inCmd = false; + } + onTrigger(cursor, editor, _file) { + const currentLine = editor.getLine(cursor.line).slice(0, cursor.ch); + if (!this.inCmd && !(currentLine.slice(-2) == " " + this.plugin.settings.emojiTriggerChar || currentLine[0] == this.plugin.settings.emojiTriggerChar)) { + this.resetInfos(); + return null; + } + if (!this.inCmd) { + this.cmdStartCh = currentLine.length - 1; + this.inCmd = true; + } + const currentCmd = currentLine.slice(this.cmdStartCh, cursor.ch); + if (currentCmd.includes(" ") || !currentCmd.includes(this.plugin.settings.emojiTriggerChar)) { + this.resetInfos(); + return null; + } + this.suggestEl.classList.toggle("mk-emoji-menu", true); + return { start: cursor, end: cursor, query: currentCmd.slice(1) }; + } + getSuggestions(context) { + const suggestions = this.emojis.filter(({ label }) => label.includes(context.query)); + return suggestions.length > 0 ? suggestions : [{ label: i18n_default.commandsSuggest.noResult, unicode: "", desc: "" }]; + } + renderSuggestion(value, el) { + const div = document.createElement("div"); + div.setAttribute("aria-label", value.label); + const reactElement = /* @__PURE__ */ _n.createElement(_n.Fragment, null, value.unicode.length > 0 ? unifiedToNative(value.unicode) : i18n_default.commandsSuggest.noResult); + _n.render(reactElement, div); + el.appendChild(div); + } + selectSuggestion(cmd, _evt) { + if (cmd.label === i18n_default.commandsSuggest.noResult) + return; + this.context.editor.replaceRange(unifiedToNative(cmd.unicode), { ...this.context.start, ch: this.cmdStartCh }, this.context.end); + this.resetInfos(); + this.close(); + } +}; + +// node_modules/monkey-around/mjs/index.js +function around(obj, factories) { + const removers = Object.keys(factories).map((key2) => around1(obj, key2, factories[key2])); + return removers.length === 1 ? removers[0] : function() { + removers.forEach((r6) => r6()); + }; +} +function around1(obj, method, createWrapper) { + const original = obj[method], hadOwn = obj.hasOwnProperty(method); + let current = createWrapper(original); + if (original) + Object.setPrototypeOf(current, original); + Object.setPrototypeOf(wrapper, current); + obj[method] = wrapper; + return remove; + function wrapper(...args) { + if (current === original && obj[method] === wrapper) + remove(); + return current.apply(this, args); + } + function remove() { + if (obj[method] === wrapper) { + if (hadOwn) + obj[method] = original; + else + delete obj[method]; + } + if (current === original) + return; + current = original; + Object.setPrototypeOf(wrapper, original || Function); + } +} + +// src/cm-extensions/inlineStylerView/inlineStyler.tsx +var import_state7 = require("@codemirror/state"); + +// src/cm-extensions/inlineStylerView/styles/default.ts +var default_default2 = [ + { + label: "bold", + value: `****`, + insertOffset: 2, + icon: ` + + + ` + }, + { + label: "italics", + value: "**", + insertOffset: 1, + icon: ` + + ` + }, + { + label: "strikethrough", + value: "~~~~", + insertOffset: 2, + icon: ` + + + + ` + }, + { + label: "code", + value: "``", + insertOffset: 1, + icon: ` + + + + + ` + }, + { + label: "link", + value: "[]()", + insertOffset: 1, + cursorOffset: 2, + icon: ` + + ` + }, + { + label: "blocklink", + value: "[[]]", + insertOffset: 2, + icon: ` + + + + + + + ` + } +]; + +// src/cm-extensions/inlineStylerView/styles/index.ts +function resolveStyles() { + return default_default2; +} + +// src/cm-extensions/inlineStylerView/InlineMenu.tsx +var InlineMenuComponent = (props) => { + const [colorMode, setColorMode] = p2(null); + const colors = ["#eb3b5a", "#fa8231", "#f7b731", "#20bf6b", "#0fb9b1", "#2d98da", "#3867d6", "#8854d0", "#4b6584"]; + return /* @__PURE__ */ _n.createElement("div", { + className: "menu mk-style-menu" + }, !colorMode ? /* @__PURE__ */ _n.createElement(_n.Fragment, null, " ", resolveStyles().map((s10) => /* @__PURE__ */ _n.createElement("div", { + "aria-label": i18n_default.styles[s10.label], + className: "Style", + dangerouslySetInnerHTML: { __html: s10.icon }, + onClick: () => { + const selection = props.cm.state.selection.main; + const selectedText = props.cm.state.sliceDoc(selection.from, selection.to); + props.cm.dispatch({ + changes: { from: selection.from, to: selection.to, insert: s10.value.substring(0, s10.insertOffset) + selectedText + s10.value.substring(s10.insertOffset) }, + selection: s10.cursorOffset ? { anchor: selection.from + s10.value.substring(0, s10.insertOffset).length + selectedText.length + s10.cursorOffset, head: selection.from + s10.value.substring(0, s10.insertOffset).length + selectedText.length + s10.cursorOffset } : { anchor: selection.from + s10.value.substring(0, s10.insertOffset).length, head: selection.from + s10.value.substring(0, s10.insertOffset).length + selectedText.length } + }); + } + })), " ", /* @__PURE__ */ _n.createElement("div", { + className: "mk-divider" + }), /* @__PURE__ */ _n.createElement("div", { + "aria-label": "Text Color", + onClick: () => setColorMode({ prefix: ``, closeTag: "" }), + className: "Style" + }, /* @__PURE__ */ _n.createElement("svg", { + width: "24", + height: "24", + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, /* @__PURE__ */ _n.createElement("path", { + d: "M8.47727 17H7L11.2727 5H12.7273L17 17H15.5227L12.0455 6.89844H11.9545L8.47727 17ZM9.02273 12.3125H14.9773V13.6016H9.02273V12.3125Z", + fill: "currentColor" + }), /* @__PURE__ */ _n.createElement("path", { + opacity: "0.2", + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M18 21H6V19H18V20Z", + fill: "currentColor" + }))), /* @__PURE__ */ _n.createElement("div", { + "aria-label": "Highlight", + onClick: () => setColorMode({ prefix: ``, closeTag: "" }), + className: "Style" + }, /* @__PURE__ */ _n.createElement("svg", { + width: "24", + height: "24", + viewBox: "0 0 24 24", + fill: "none", + xmlns: "http://www.w3.org/2000/svg" + }, /* @__PURE__ */ _n.createElement("g", { + opacity: "0.2" + }, /* @__PURE__ */ _n.createElement("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M18 21H6V19H18V20Z", + fill: "currentColor" + })), /* @__PURE__ */ _n.createElement("path", { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + d: "M9.43302 10.7498L9.2698 13.9711L11.3368 15.3582L14.256 13.9863L9.43302 10.7498ZM13.7828 5.58248L9.43305 10.7498L14.256 13.9863L17.3893 8.00268C17.626 7.5506 17.4844 6.99279 17.0606 6.70843L15.1051 5.39611C14.6813 5.11175 14.1114 5.19208 13.7828 5.58248Z", + fill: "currentColor" + }), /* @__PURE__ */ _n.createElement("path", { + d: "M7.65151 16.3826L9.0386 14.3156L11.1056 15.7027L10.412 16.7362L7.65151 16.3826Z", + fill: "currentColor" + })))) : /* @__PURE__ */ _n.createElement(_n.Fragment, null, /* @__PURE__ */ _n.createElement("div", { + className: "Style", + onClick: () => setColorMode(null) + }, /* @__PURE__ */ _n.createElement("svg", { + xmlns: "http://www.w3.org/2000/svg", + width: "24px", + height: "24px", + fill: "none", + viewBox: "0 0 24 24", + strokeWidth: 1.5, + stroke: "currentColor" + }, /* @__PURE__ */ _n.createElement("path", { + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M6 18L18 6M6 6l12 12" + }))), colors.map((c3) => /* @__PURE__ */ _n.createElement("div", { + onClick: () => { + setColorMode(null); + const selection = props.cm.state.selection.main; + const selectedText = props.cm.state.sliceDoc(selection.from, selection.to); + props.cm.dispatch({ + changes: { from: selection.from, to: selection.to, insert: colorMode.prefix + c3 + colorMode.suffix + selectedText + colorMode.closeTag } + }); + }, + className: "mk-color", + style: { background: c3 } + })))); +}; + +// src/cm-extensions/inlineStylerView/inlineStyler.tsx +var cursorTooltipField = import_state7.StateField.define({ + create: getCursorTooltips, + update(tooltips2, tr) { + if (!tr.docChanged && !tr.selection) + return tooltips2; + return getCursorTooltips(tr.state); + }, + provide: (f5) => showTooltip.computeN([f5], (state) => state.field(f5)) +}); +function getCursorTooltips(state) { + return state.selection.ranges.filter((range) => !range.empty).map((range) => { + let line = state.doc.lineAt(range.head); + let text = line.number + ":" + (range.head - line.from); + return { + pos: Math.min(range.head, range.anchor), + above: true, + strictSide: true, + arrow: false, + create: (view2) => { + let dom = document.createElement("div"); + dom.className = "cm-tooltip-cursor"; + const reactElement = /* @__PURE__ */ _n.createElement(_n.Fragment, null, /* @__PURE__ */ _n.createElement(InlineMenuComponent, { + cm: view2 + })); + _n.render(reactElement, dom); + return { dom }; + } + }; + }); +} +function cursorTooltip() { + return [tooltips({ parent: document.body }), cursorTooltipField]; +} + +// src/cm-extensions/makerMode/hr.ts +var import_view5 = require("@codemirror/view"); +var import_state8 = require("@codemirror/state"); +var hrField = import_state8.StateField.define({ + create() { + return import_view5.Decoration.none; + }, + update(value, tr) { + let builder = new import_state8.RangeSetBuilder(); + let nodes2 = []; + iterateTreeInDocument(tr.state, { + enter: ({ name, from, to }) => { + if (name.contains("formatting-header") && tr.state.sliceDoc(from, to) == "---" && !(tr.newSelection.main.from >= from && tr.newSelection.main.to <= to)) { + builder.add(from, to, hr); + } + } + }); + const dec = builder.finish(); + return dec; + }, + provide: (f5) => import_view5.EditorView.decorations.from(f5) +}); +var HRWidget = class extends import_view5.WidgetType { + constructor() { + super(); + } + eq(other) { + return true; + } + toDOM() { + const div = document.createElement("hr"); + return div; + } +}; +var hr = import_view5.Decoration.replace({ + widget: new HRWidget(), + block: false +}); + +// src/cm-extensions/makerMode/selection.ts +var import_state9 = require("@codemirror/state"); +var import_view6 = require("@codemirror/view"); +var resetLine = import_view6.Decoration.line({ class: "mk-reset" }); +var needsReset = (state, typeString, from, to) => { + const length = to - from; + if (typeString.contains("HyperMD-header")) { + if (parseInt(typeString.replace(/.*HyperMD-header-(\d+).*/, "$1")) == length) { + return true; + } + let truefalse = true; + iterateTreeInSelection({ from, to }, state, { + enter: ({ type, from: from2, to: to2 }) => { + if (type.name.contains("formatting-header")) { + truefalse = false; + } + } + }); + return truefalse; + } + return false; +}; +var makerResetFix = import_state9.StateField.define({ + create() { + return import_view6.Decoration.none; + }, + update(value, tr) { + let builder = new import_state9.RangeSetBuilder(); + iterateTreeInDocument(tr.state, { + enter: ({ type, from, to }) => { + if (needsReset(tr.state, type.name, from, to)) { + builder.add(from, from, resetLine); + } + } + }); + const dec = builder.finish(); + return dec; + }, + provide: (f5) => import_view6.EditorView.decorations.from(f5) +}); +var makerDelete = import_state9.EditorState.transactionFilter.of((tr) => { + let newTrans = []; + if (tr.isUserEvent("delete.forward")) { + } + if (tr.isUserEvent("delete.backward") && !tr.isUserEvent("delete.selection") && !tr.isUserEvent("delete.selection.smart")) { + const selection = tr.newSelection.main; + iterateTreeInSelection(selection, tr.startState, { + enter: ({ type, from, to }) => { + const mark = positionMarkOffset(type.name, from, to, tr.startState); + if (mark) { + if (!hasReset(tr.startState, from, to)) { + newTrans.push(pointDeletion(tr, mark.from, mark.to, selection.from)); + } + } + } + }); + } + return [tr, ...newTrans]; +}); +var reverseSel = (t4) => { + const sel = t4.selection; + return { + selection: import_state9.EditorSelection.single(sel.main.head, sel.main.anchor) + }; +}; +var selFromTo = (from, to) => { + return { + selection: import_state9.EditorSelection.single(from, to) + }; +}; +var delFromTo = (tr, from, to) => { + return { + changes: { from, to }, + annotations: import_state9.Transaction.userEvent.of(`${tr.annotation(import_state9.Transaction.userEvent)}.smart`) + }; +}; +var pointDeletion = (tr, from, to, pos) => checkMarkMiddle(from, to, pos) ? deleteMark(tr, from, pos) : {}; +var deleteMark = (tr, from, pos) => from == 0 ? delFromTo(tr, from, pos) : delFromTo(tr, from, pos); +var changeSelectionToPrevLine = (from, head) => selFromTo(from - 1, head); +var changeSelectionToEndPrevLine = (from, head) => selFromTo(from, head - 1); +var changeSelectionToAfterMark = (head, to) => selFromTo(head, to); +var changeSelectionToMark = (to, head) => selFromTo(to, head); +var rangeBeginsInMark = (from, to, pos) => pos >= from && pos < to; +var rangeEndsAtMark = (from, to, pos) => pos == from; +var rangeBeginsBefore = (from, to, anchor, head) => head == from - 1; +var pointSelection = (from, to, pos, left2) => checkLineStart(from, pos) ? to - from == 1 && left2 ? selectPreviousLine(from, pos) : selectLineStart(to) : checkMarkMiddle(from, to, pos) ? left2 && checkMarkMiddleRightMost(from, to, pos) ? selectPreviousLine(from, pos) : selectLineStart(to) : {}; +var checkLineStart = (from, pos) => from == pos; +var checkMarkMiddle = (from, to, pos) => pos > from && pos < to; +var checkMarkMiddleRightMost = (from, to, pos) => pos == to - 1; +var selectPreviousLine = (from, pos) => from == 0 ? selFromTo(pos, pos) : selFromTo(from - 1, from - 1); +var selectLineStart = (to) => selFromTo(to, to); +var positionMarkOffset = (typeString, from, to, state) => { + if (typeString.contains("HyperMD-header")) { + return { from, to: from + parseInt(typeString.replace(/.*HyperMD-header-(\d+).*/, "$1")) + 1 }; + } + if (typeString.contains("HyperMD-task-line")) { + return { from, to: from + parseInt(typeString.replace(/.*HyperMD-list-line-(\d+).*/, "$1")) + 5 }; + } + if (typeString.contains("formatting-list-ol")) { + let returnMark = void 0; + iterateTreeInSelection({ from, to }, state, { + enter: ({ type, from: from2, to: to2 }) => { + if (type.name.contains("HyperMD-list-line")) { + returnMark = { from: from2, to: from2 + parseInt(type.name.replace(/.*HyperMD-list-line-(\d+).*/, "$1")) + 2 }; + } + } + }); + return returnMark; + } + if (typeString.contains("HyperMD-list-line")) { + return { from, to: from + parseInt(typeString.replace(/.*HyperMD-list-line-(\d+).*/, "$1")) + 1 }; + } + if (typeString.contains("HyperMD-quote") && !typeString.contains("HyperMD-quote-lazy")) { + return { from, to: from + 1 }; + } + return void 0; +}; +var rangeSelection = (from, to, anchor, head) => { + const minFrom = Math.min(anchor, head); + const maxTo = Math.max(anchor, head); + if (rangeBeginsBefore(from, to, maxTo, minFrom)) { + const newSel = changeSelectionToMark(to, maxTo); + return minFrom == head ? newSel : reverseSel(newSel); + } + if (rangeEndsAtMark(from, to, maxTo)) { + const newSel = changeSelectionToAfterMark(minFrom, to); + return minFrom == anchor ? newSel : reverseSel(newSel); + } + if (rangeBeginsInMark(from, to, maxTo)) { + const newSel = changeSelectionToEndPrevLine(minFrom, from); + return minFrom == anchor ? newSel : reverseSel(newSel); + } + if (rangeBeginsInMark(from, to, minFrom)) { + const newSel = changeSelectionToPrevLine(from, maxTo); + return minFrom == head ? newSel : reverseSel(newSel); + } + return {}; +}; +var hasReset = (state, from, to) => { + var _a2; + let trueFalse = false; + (_a2 = state.field(makerResetFix, false)) == null ? void 0 : _a2.between(from, to, (f5, t4, v3) => { + trueFalse = true; + }); + return trueFalse; +}; +var makerSelect = import_state9.EditorState.transactionFilter.of((tr) => { + let newTrans = []; + if (tr.isUserEvent("delete")) { + return tr; + } + const selection = tr.newSelection.main; + if (selection.from == 0 && selection.to == 0) + return tr; + iterateTreeInSelection(selection, tr.state, { + enter: ({ type, from, to }) => { + const mark = positionMarkOffset(type.name, from, to, tr.state); + if (mark) { + if (!hasReset(tr.state, from, to)) + newTrans.push(selection.from != selection.to ? rangeSelection(mark.from, mark.to, selection.from, selection.to) : pointSelection(mark.from, mark.to, selection.from, tr.startState.selection.main.from == selection.from + 1)); + } + } + }); + return [tr, ...newTrans]; +}); + +// src/cm-extensions/makerMode.ts +var makerMode = (mode) => [ + ...mode ? [ + makerResetFix, + makerSelect, + makerDelete, + hrField + ] : [], + ...[ + flowTypeStateField, + atomicSelect, + editBlockExtensions(), + preloadFlowEditor, + flowEditorField, + flowEditorInfo, + flowIDStateField, + internalLinkHover, + atomicSelect + ] +]; + +// src/main.ts +var MakeMDPlugin = class extends import_obsidian12.Plugin { + constructor() { + super(...arguments); + this.triggerVaultChangeEvent = (file, changeType, oldPath) => { + let event = new CustomEvent(eventTypes.vaultChange, { + detail: { + file, + changeType, + oldPath: oldPath ? oldPath : "" + } + }); + window.dispatchEvent(event); + }; + this.onCreate = (file) => this.triggerVaultChangeEvent(file, "create", ""); + this.onDelete = (file) => this.triggerVaultChangeEvent(file, "delete", ""); + this.onModify = (file) => this.triggerVaultChangeEvent(file, "modify", ""); + this.onRename = (file, oldPath) => this.triggerVaultChangeEvent(file, "rename", oldPath); + this.openFileTreeLeaf = async (showAfterAttach) => { + let leafs = this.app.workspace.getLeavesOfType(FILE_TREE_VIEW_TYPE); + if (leafs.length == 0) { + let leaf = this.app.workspace.getLeftLeaf(false); + await leaf.setViewState({ type: FILE_TREE_VIEW_TYPE }); + if (showAfterAttach) + this.app.workspace.revealLeaf(leaf); + } else { + leafs.forEach((leaf) => this.app.workspace.revealLeaf(leaf)); + } + }; + this.detachFileTreeLeafs = () => { + let leafs = this.app.workspace.getLeavesOfType(FILE_TREE_VIEW_TYPE); + for (let leaf of leafs) { + leaf.view.destroy(); + leaf.detach(); + } + }; + this.refreshTreeLeafs = () => { + this.detachFileTreeLeafs(); + this.openFileTreeLeaf(true); + }; + } + patchFileExplorer() { + this.register(around(import_obsidian12.Workspace.prototype, { + getLeavesOfType(old) { + return function(type) { + if (type == "file-explorer") { + return old.call(this, FILE_TREE_VIEW_TYPE); + } + return old.call(this, type); + }; + } + })); + } + patchWorkspace() { + let layoutChanging = false; + const uninstaller = around(import_obsidian12.Workspace.prototype, { + changeLayout(old) { + return async function(workspace) { + layoutChanging = true; + try { + await old.call(this, workspace); + } finally { + layoutChanging = false; + } + }; + }, + iterateLeaves(old) { + return function(arg1, arg2) { + if (old.call(this, arg1, arg2)) + return true; + let cb = typeof arg1 === "function" ? arg1 : arg2; + let parent = typeof arg1 === "function" ? arg2 : arg1; + if (!parent) + return false; + if (layoutChanging) + return false; + if (parent === app.workspace.rootSplit || import_obsidian12.WorkspaceContainer && parent instanceof import_obsidian12.WorkspaceContainer) { + for (const popover of FlowEditor.popoversForWindow(parent.win)) { + if (old.call(this, cb, popover.rootSplit)) + return true; + } + } + return false; + }; + }, + getDropLocation(old) { + return function getDropLocation(event) { + for (const popover of FlowEditor.activePopovers()) { + const dropLoc = this.recursiveGetTarget(event, popover.rootSplit); + if (dropLoc) { + return dropLoc; + } + } + return old.call(this, event); + }; + }, + onDragLeaf(old) { + return function(event, leaf) { + const hoverPopover = FlowEditor.forLeaf(leaf); + return old.call(this, event, leaf); + }; + } + }); + this.register(uninstaller); + } + patchWorkspaceLeaf() { + this.register(around(import_obsidian12.WorkspaceLeaf.prototype, { + getRoot(old) { + return function() { + const top2 = old.call(this); + return top2.getRoot === this.getRoot ? top2 : top2.getRoot(); + }; + }, + onResize(old) { + return function() { + var _a2; + (_a2 = this.view) == null ? void 0 : _a2.onResize(); + }; + }, + setViewState(old) { + return async function(viewState, eState) { + var _a2, _b2, _c2; + const result = await old.call(this, viewState, eState); + try { + const he2 = FlowEditor.forLeaf(this); + if (he2) { + if (viewState.type) + he2.hoverEl.setAttribute("data-active-view-type", viewState.type); + const titleEl = he2.hoverEl.querySelector(".popover-title"); + if (titleEl) { + titleEl.textContent = (_a2 = this.view) == null ? void 0 : _a2.getDisplayText(); + if ((_c2 = (_b2 = this.view) == null ? void 0 : _b2.file) == null ? void 0 : _c2.path) { + titleEl.setAttribute("data-path", this.view.file.path); + } else { + titleEl.removeAttribute("data-path"); + } + } + } + } catch (e5) { + } + return result; + }; + }, + setEphemeralState(old) { + return function(state) { + var _a2; + old.call(this, state); + if (state.focus && ((_a2 = this.view) == null ? void 0 : _a2.getViewType()) === "empty") { + this.view.contentEl.tabIndex = -1; + this.view.contentEl.focus(); + } + }; + } + })); + this.register(around(import_obsidian12.WorkspaceItem.prototype, { + getContainer(old) { + return function() { + if (!old) + return; + if (!this.parentSplit || this instanceof import_obsidian12.WorkspaceContainer) + return old.call(this); + return this.parentSplit.getContainer(); + }; + } + })); + } + async onload() { + console.log("Loading Make.md"); + this.patchWorkspace(); + this.addSettingTab(new MakeMDPluginSettingsTab(this.app, this)); + await this.loadSettings(); + document.body.classList.toggle("mk-hide-ribbon", !this.settings.sidebarRibbon); + document.body.classList.toggle("mk-hide-tabs", !this.settings.sidebarTabs); + document.body.classList.toggle("mk-maker-mode", this.settings.makerMode); + document.body.classList.toggle("mk-flow-replace", this.settings.editorFlow); + this.registerView(FOLDER_VIEW_TYPE, (leaf) => { + return new FlowView(leaf, this); + }); + if (this.settings.sidebar) { + this.patchFileExplorer(); + this.registerView(FILE_TREE_VIEW_TYPE, (leaf) => { + return new FileTreeView(leaf, this); + }); + this.app.workspace.onLayoutReady(async () => { + await this.openFileTreeLeaf(true); + }); + } + if (this.settings.makerMode) { + this.registerEditorSuggest(new MakeMenu(this.app, this)); + this.registerEditorSuggest(new StickerMenu(this.app, this)); + } + const ext = import_view7.EditorView.updateListener.of((v3) => { + if (v3.transactions.find((f5) => f5.annotation(toggleFlowEditor))) { + app.workspace.iterateLeaves((leaf) => { + var _a2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm && v3.view.dom == cm.dom) { + loadFlowEditorsForLeaf(cm, leaf, this.app); + } + }, app.workspace["rootSplit"]); + } + if (v3.heightChanged) { + app.workspace.iterateRootLeaves((leaf) => { + var _a2, _b2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm && v3.view.dom == cm.dom && cm.state.field(flowTypeStateField, false)) { + if ((_b2 = leaf.containerEl.parentElement) == null ? void 0 : _b2.hasClass("workspace-tab-container")) { + if (cm.state.field(flowTypeStateField, false) != "doc") { + cm.dispatch({ + annotations: portalTypeAnnotation.of("doc") + }); + } + } + } + }); + } + if (v3.heightChanged) { + const flowID = v3.state.field(flowIDStateField, false); + if (flowID) { + app.workspace.iterateLeaves((leaf) => { + var _a2; + const cm = (_a2 = leaf.view.editor) == null ? void 0 : _a2.cm; + if (cm) { + const stateField = cm.state.field(flowEditorInfo, false); + if (stateField) { + if (stateField.find((f5) => f5.id == flowID)) { + cm.dispatch({ + annotations: cacheFlowEditorHeight.of([flowID, v3.view.contentHeight]) + }); + } + } + } + }, app.workspace["rootSplit"]); + } + } + }); + window.addEventListener(eventTypes.spawnPortal, this.spawnPortal); + window.addEventListener(eventTypes.focusPortal, this.focusPortal); + this.registerEditorExtension([ext, cursorTooltip(), makerMode(this.settings.makerMode)]); + this.app.vault.on("create", this.onCreate); + this.app.vault.on("delete", this.onDelete); + this.app.vault.on("modify", this.onModify); + this.app.vault.on("rename", this.onRename); + } + spawnPortal(e5) { + spawnNewPortal(this, e5); + } + focusPortal(e5) { + focusPortal(this, e5); + } + activeLeafChanged() { + var _a2; + const newPath = (_a2 = this.app.workspace.getActiveFile()) == null ? void 0 : _a2.path; + let evt = new CustomEvent(eventTypes.activeFileChange, { detail: { filePath: newPath } }); + window.dispatchEvent(evt); + } + onunload() { + console.log("Unloading Make.md"); + this.detachFileTreeLeafs(); + this.app.vault.off("create", this.onCreate); + this.app.vault.off("delete", this.onDelete); + this.app.vault.off("modify", this.onModify); + this.app.vault.off("rename", this.onRename); + } + async loadSettings() { + this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + } + async saveSettings(refresh = true) { + await this.saveData(this.settings); + if (refresh) { + let evt = new CustomEvent(eventTypes.settingsChanged, {}); + window.dispatchEvent(evt); + } + } +}; +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..caae1f7 --- /dev/null +++ b/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "make-md", + "name": "MAKE.md", + "version": "0.3.6", + "minAppVersion": "0.16.0", + "description": "This distribution makes Obsidian easy to use.", + "author": "MAKE.md", + "authorUrl": "https://www.make.md", + "isDesktopOnly": true +} diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..606f03b --- /dev/null +++ b/styles.css @@ -0,0 +1,672 @@ +/* src/flow-editor/FlowEditor.module.css */ +.mk-floweditor .workspace-leaf { + all: unset; +} +.mk-floweditor.hover-editor .popover-content { + margin: 0; + border-radius: var(--he-popover-border-radius); + overflow: hidden; + height: 100%; +} +.mk-floweditor.hover-editor .workspace-leaf, +.mk-floweditor.hover-editor .workspace-split { + height: 100%; + width: 100%; +} +.mk-floweditor .markdown-source-view.mod-cm6 .cm-editor { + min-height: auto; +} +.mk-floweditor .cm-content { + padding-bottom: 0 !important; +} +.mk-floweditor .view-content { + background: none !important; +} +.mk-floweditor .cm-scroller { + padding: 0 !important; +} +.mk-floweditor .mk-floweditor-title-container { + display: flex; +} +.mk-hidden { + display: none !important; +} +.mk-floweditor-title { + padding: 8px 0px; + margin: 0; + margin-top: 8px; + border-top: 1px solid #333; + width: 100%; + display: flex; +} +.mk-floweditor-title:hover { + background: var(--background-modifier-hover); +} +.mk-floweditor-title div:not(.collapse) svg { + transform: rotate(0deg); +} +.mk-floweditor-title .collapse svg { + transform: rotate(90deg); +} +.mk-floweditor-title svg { + margin-left: 4px; + width: 10px; + height: 10px; +} +.mk-flow-hover { + margin-top: -34px; +} +.mk-floweditor-container:not(.mk-floweditor-fix) > .mk-floweditor { + padding: 8px; + border-radius: 4px; + border: thin solid var(--color-base-20); +} +.mk-floweditor-container:not(.mk-floweditor-fix) > .mk-floweditor:hover { +} +.mk-floweditor-container { + min-height: var(--flow-height); +} +.mk-floweditor-container > .mk-floweditor:hover { + box-shadow: + 0px 1px 2px rgba(0, 0, 0, 0.06), + 0px 3.4px 6.7px rgba(0, 0, 0, 0.06), + 0px 15px 30px rgba(0, 0, 0, 0.15); +} +.mk-floweditor-container { + display: inline; +} +.cm-tooltip-hover { + margin-bottom: 30px; +} +.mk-floweditor-fix > .mk-floweditor { + margin-top: -28px; +} +.cm-tooltip { + border: none !important; +} +.cm-line:hover .mk-floweditor-selector { + visibility: visible; +} +.mk-floweditor-selector { + position: absolute; + visibility: hidden; + right: 100%; + padding-right: 12px; + height: 30px; +} +.mk-floweditor-selector:hover { + visibility: visible; +} + +/* src/components/FlowView/FlowComponent.module.css */ +.mk-folder-scroller { + display: flex !important; + align-items: flex-start !important; + line-height: 1.4; + height: 100%; + overflow-x: auto; + position: relative; + z-index: 0; + padding: var(--file-margins); +} +.mk-folder-header { + display: flex; +} +.mk-folder-header .inline-title { + flex-grow: 1; +} +.mk-folder-sizer { + display: flex; + flex-direction: column; + align-items: stretch; + width: 100%; + max-width: var(--file-line-width); + margin-left: auto; + margin-right: auto; +} +.mk-file-table-header { + margin-top: 24px; + color: var(--text-faint); +} +.mk-file-table { + border-collapse: collapse; + table-layout: fixed; + width: 100%; +} +.mk-file-row { +} +.mk-file-row:hover { + background: var(--background-modifier-hover) !important; +} +.mk-file-table tr:nth-child(even) { + background: var(--color-base-10); +} +.mk-file-row td { + padding: 10px 10px; +} +.mk-file-row .mk-column-file { + width: 99%; +} +.mk-file-row p { + text-overflow: ellipsis; + overflow: hidden; + font-size: var(--font-ui-smaller); + color: var(--text-faint); + margin: 0; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; +} +.mk-file-row .mk-file-name { + font-weight: var(--font-medium); +} +.mk-file-date { + font-size: var(--font-ui-smaller); + color: var(--text-muted); + width: 100px; +} +.mk-column-icon { + width: 40px; +} +.mk-column-icon svg { + width: 16px; + height: 16px; + color: var(--text-muted); +} +.mk-flowspace-title svg { + width: 16px; + height: 16px; + color: var(--text-muted); +} +.mk-flowspace-title p { + margin: 0; + padding: 0; + margin-left: 8px; +} +.mk-flowspace-title { + display: flex; + align-items: center; + padding: 8px 12px; + border-top: 1px solid var(--color-base-20); +} +.mk-flowspace-editor { + padding: 0px 12px; +} +.mk-flowspace-editor .mk-floweditor { + border-top: 1px solid var(--color-base-10); + padding: 12px 0px; +} +.mk-flowspace-container { +} +.mk-flowspace-title span { + flex-grow: 1; +} +.mk-flowspace-title button { + padding: 8px; + margin-left: 8px; +} +.mk-flowspace-title button.mk-open { + background: var(--icon-color-active); +} +.mk-flowspace-title:hover { + background: var(--color-base-10); +} +.mk-folder-empty { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: var(--font-ui-small); + font-style: italic; +} + +/* src/components/Sidebar/TreeView/FolderTreeView.module.css */ +.mk-tree-wrapper { + box-sizing: border-box; + margin-bottom: 1px; + display: flex; + align-items: center; + padding-right: 12px; + position: relative; +} +.mk-tree-wrapper > div { + display: flex; + align-items: center; + width: 100%; +} +.mk-tree-wrapper > .mk-indicator-bottom::after { + content: " "; + display: block; + position: absolute; + height: 2px; + border-radius: 1px; + background: var(--interactive-accent); + width: calc(100% - var(--spacing)); + left: var(--spacing); + top: 100%; +} +.mk-tree-wrapper > .mk-indicator-top::before { + content: " "; + display: block; + position: absolute; + height: 2px; + border-radius: 1px; + background: var(--interactive-accent); + width: calc(100% - var(--spacing)); + left: var(--spacing); + top: 0%; +} +.mk-tree-wrapper .mk-indicator-row { + background: #dde8f6; +} +.mk-tree-wrapper.mk-clone { + display: inline-block; + pointer-events: none; + padding: 0; + padding-left: 10px; + padding-top: 5px; +} +.mk-tree-wrapper.mk-clone.mk-tree-item { + --vertical-padding: 5px; + padding-right: 24px; + box-shadow: 0px 15px 15px 0 rgba(34, 33, 81, 0.1); +} +.mk-tree-wrapper.mk-ghost { + opacity: 0.5; +} +.mk-tree-item { + margin-left: var(--spacing); + --vertical-padding: 2px; + flex-grow: 1; + position: relative; + display: flex; + align-items: center; + padding: var(--vertical-padding) 2px; + box-sizing: border-box; + min-width: 0; + margin-right: 4px; + height: 28px; +} +.mk-tree-wrapper button { + background: none; + border: 0; + box-shadow: none; + margin: 0; + height: 24px; + width: 24px; + padding: 0; +} +.mk-tree-wrapper button:hover { + background: var(--nav-item-background-hover); +} +.mk-file-icon { + width: 24px; + height: 24px; +} +.mk-tree-wrapper .mk-folder-buttons { + display: none; +} +.mk-tree-wrapper:hover .mk-folder-buttons { + display: flex; + margin-right: 4px; +} +.mk-tree-wrapper svg { + width: 16px; + height: 16px; + color: var(--text-muted); +} +.mk-tree-text { + padding: 0.15rem 0.5rem; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + font-size: var(--font-ui-small); + flex-grow: 1; +} +.mk-disable-interaction { + pointer-events: none; +} +.mk-disable-selection, +.mk-clone .mk-tree-text { + user-select: none; + -webkit-user-select: none; +} +.view-content { + padding: 0 !important; +} +.mk-collapse svg { + transform: rotate(90deg); + transition: transform 250ms ease; + width: 14px; + height: 14px; + margin: 5px; +} +.mk-collapse.mk-collapsed svg { + transform: rotate(0deg); +} +.mk-is-active:not(.clone) { + color: var(--nav-item-color-active); + background: var(--nav-item-background-active); +} +.mk-tree-wrapper:not(.mk-section-wrapper):not(.mk-disable-interaction):hover { + background: var(--nav-item-background-hover); +} +.mk-icon-menu { + transform: translate3d(-500px, 0px, 0px); + z-index: var(--layer-menu); +} +.mk-icon-menu .menu { + position: static !important; + padding: 0 !important; +} +.mk-tree-empty { + padding-left: var(--spacing); + padding-top: 4px; + padding-bottom: 4px; + font-size: var(--font-ui-small); + color: var(--text-faint); +} + +/* src/components/Sidebar/TreeView/SectionView.module.css */ +.mk-section { + display: flex; + padding: 4px 0px; + padding-left: 12px; + margin-top: 12px; + color: var(--text-muted); + font-size: var(--font-ui-smaller); + width: 100%; + justify-content: space-between; +} +.mk-section .mk-section-title:hover { + background: var(--nav-item-background-hover); +} +.mk-section .mk-section-title { + height: 24px; + border-radius: 4px; + display: flex; + min-width: 0; + align-items: center; +} +.mk-section .mk-tree-text { + padding: 0.25rem 0rem 0.3rem 0.25rem; +} +.mk-section .mk-collapse { + display: none; +} +.mk-sction .mk-collapse.mk-collapsed { + display: block; +} +.mk-section:hover .mk-collapse { + display: flex; +} +.mk-section .mk-collapse svg { + margin-left: 4px; + width: 10px; + height: 10px; +} + +/* src/components/Sidebar/NewNote.module.css */ +.mk-flow-bar { + display: flex; +} +.mk-new-note { + flex-grow: 1; + padding: 8px 12px; + font-size: var(--font-ui-smaller); + margin: 4px 12px; + display: flex; + align-items: center; +} +.mk-new-note p { + margin: 0; + margin-left: 8px; + padding: 0; +} +.mk-new-note svg { + width: 16px; + height: 16px; +} +.mk-search { + display: flex; + padding: 8px 8px; + margin: 4px 12px; + margin-left: 0px; +} +.mk-search svg { + width: 16px; + height: 16px; +} + +/* src/components/Sidebar/FileTree.module.css */ +.mk-hide-ribbon.mod-macos.is-hidden-frameless:not(.is-fullscreen):not(.is-popout-window) .workspace-tabs.mod-top-left-space .workspace-tab-header-container { + padding-left: calc(var(--frame-left-space) + var(--ribbon-width)); +} +.mk-hide-ribbon .workspace-ribbon.mod-left { + display: none; +} +.mk-hide-ribbon .workspace-ribbon.mod-right { + visibility: hidden; + position: absolute; +} +.mk-hide-ribbon .workspace-split.mod-right-split { + margin-right: 0; +} +.mk-hide-tabs .mod-left-split .mod-top-left-space .workspace-tab-header-container-inner { + visibility: hidden; +} +.mk-sidebar { + display: flex; + flex-direction: column; + height: 100%; +} +.mk-file-tree { + flex: 1; + overflow-y: auto; + overscroll-behavior-y: auto; + -webkit-overflow-scrolling: touch; +} +.mk-file-tree::-webkit-scrollbar { + display: none; +} +:root { + --highlight-color: #eee; +} + +/* src/components/Sidebar/MainMenu.module.css */ +.mk-main-menu-container { + display: flex; + padding: 12px 8px; +} +.mk-main-menu-button { + text-align: left; + padding: 8px 8px; + border-radius: 4px; + align-items: center; + display: flex; + width: 100%; +} +.mk-main-menu-button svg { + height: 16px; + width: 16px; +} +.mk-main-menu-button:hover { + background: var(--nav-item-background-hover); +} +.mk-main-menu { + position: absolute; + left: 8px; + z-index: var(--layer-menu); + margin-top: 2.25rem; + margin-left: 2px; + background-color: var(--background-secondary); + transform-origin: top left; + border-radius: var(--radius-m); + border: 1px solid var(--background-modifier-border-hover); + box-shadow: var(--shadow-s); +} +.mk-menu-button { + display: flex; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + font-size: 0.75rem; + line-height: 1.25rem; + align-items: center; + width: 100%; + border-radius: 0.375rem; +} +.mk-menu-button:hover { + background: var(--nav-item-background-hover); +} + +/* src/components/Editor/MakeMenu/MakeMenu.module.css */ +.mk-slash-item { + display: flex; + align-items: center; +} +.mk-slash-icon { + display: flex; + margin-right: 8px; +} +.mk-slash-icon svg { + width: 16px; + height: 16px; +} +.cm-active.cm-placeholder:before { + content: attr(data-ph); + color: #555; + position: absolute; +} + +/* src/components/Editor/StickerMenu/StickerMenu.module.css */ +.mk-sticker-menu .suggestion { + width: 240px; + height: 240px; + display: flex; + flex-wrap: wrap; + align-content: flex-start; + flex-direction: row; +} +.mk-sticker-menu .suggestion-item { + width: 30px; + height: 30px; + display: flex; + font-size: 20px; + align-items: center; + padding: 0; + text-align: center; + justify-content: center; +} +.mk-sticker-filter { + border: none; + background: none; + border-bottom: thin solid #333; + width: 100%; + padding: 8px 12px; +} +.mk-sticker-menu .suggestion-item:hover { + background: var(--background-modifier-hover); +} + +/* src/css/makerMode.css */ +.mk-maker-mode .cm-s-obsidian span.cm-hmd-escape-backslash, +.mk-maker-mode .cm-s-obsidian .HyperMD-header:not(.mk-reset) span.cm-formatting-header { + display: inline; + position: absolute; + right: 100%; + white-space: nowrap; + color: transparent; +} +.mk-maker-mode .markdown-source-view.mod-cm6 .cm-formatting-list-ul { + padding-left: 2px; + padding-right: 5px; +} +.mk-maker-mode .markdown-source-view.mod-cm6 .task-list-label .task-list-item-checkbox { + margin-bottom: 4px; +} +.mk-maker-mode .cm-s-obsidian .HyperMD-header.mk-reset span.cm-formatting-header { + color: unset; +} +.mk-maker-mode .mk-reset .cm-fold-indicator { + display: none !important; +} +.mk-maker-mode div[class*=HyperMD-header-].mk-reset { + font-variant: unset; + letter-spacing: unset; + line-height: unset; + font-size: unset; + color: unset; + font-weight: unset; + font-style: unset; + font-family: unset; +} +.mk-maker-mode .HyperMD-quote-lazy:before { + content: none !important; +} +.mk-maker-mode .cm-s-obsidian span.cm-formatting-quote:not(.cm-hmd-callout) { + color: transparent; +} +.mk-maker-mode .cm-s-obsidian span.cm-hmd-escape-backslash::selection, +.mk-maker-mode .cm-s-obsidian span.cm-formatting-header::selection { + background: transparent; +} +.mk-flow-replace .mk-new-file { + background: var(--color-base-10); + border-bottom: thin solid #333; +} +.mk-maker-mode .markdown-source-view.mod-cm6 .HyperMD-quote:not(.HyperMD-callout):before, +.mk-maker-mode .markdown-source-view.mod-cm6 .cm-blockquote-border:before { + left: 0; + content: "\200b"; + display: block; + width: 1px; + border-left: var(--blockquote-border-thickness) solid var(--blockquote-border-color); + color: transparent; + position: absolute; + top: 0; + bottom: 0; +} + +/* src/cm-extensions/inlineStylerView/InlineMenu.module.css */ +.mk-style-menu { + display: flex; + padding: 0; + margin-top: -44px; + margin-left: -80px; +} +.mk-style-menu .Style { + padding: 4px; + margin: 4px; + border-radius: 4px; + display: flex; +} +.mk-style-menu .Style:hover { + padding: 4px; + display: flex; + background: var(--background-modifier-hover); +} +.mk-style-menu svg { + color: var(--text-muted); +} +.mk-divider { + border-left: thin solid #333; + width: 1px; +} +.mk-color { + width: 24px; + height: 24px; + border-radius: 12px; + margin: 8px; +} +.mk-color:hover { + opacity: 0.8; +} +mark { + color: unset; + border-radius: 2px; + margin: 0px 2px; + padding: 0px 2px; +}