';
+ if (t37.normalizedLayouts.length > 1)
+ for (let [o, a] of t37.normalizedLayouts.entries()) {
+ let s = a, l = [o === e ? "selected" : "layer-switch"];
+ s.tooltip && l.push("MLK__tooltip"), s.labelClass && l.push(...s.labelClass.split(" ")), r += `
${(n = s.label) != null ? n : "untitled"}
`;
+ }
+ return r += "
", r;
+}
+function Vm(t37, e) {
+ let r = "";
+ if (t37.editToolbar === "none")
+ return "";
+ let n = [];
+ e.selectionIsCollapsed ? n.push("undo", "redo", "pasteFromClipboard") : n.push("cutToClipboard", "copyToClipboard", "pasteFromClipboard");
+ let o = { undo: ``), (t37.normalizedLayouts.length > 1 || e.displayEditToolbar) && (i.push("
")), i.push(Nf(t37, n)), i.push("
");
+ return i.join("");
+}
+function Nf(t37, e) {
+ if (typeof e == "string")
+ return e;
+ let r = "";
+ if (typeof e.style == "string" ? r += `` : typeof e.style == "object" && (r += ``), e.backdrop && (r += ``), e.container && (r += `
`), e.rows) {
+ r += "
";
+ for (let i of e.rows) {
+ r += '
';
+ for (let n of i)
+ if (n) {
+ let o = t37.registerKeycap(n), [a, s] = tn(n);
+ /(^|\s)separator/.test(s) ? r += `
${a}
`;
+ }
+ r += "
";
+ }
+ r += "
";
+ } else
+ e.markup && (r += e.markup);
+ return e.container && (r += "
"), e.backdrop && (r += "
"), r;
+}
+function tn(t37, e = { shifted: false }) {
+ var n, o, a, s, l, c, u;
+ let r = "", i = (n = t37.class) != null ? n : "";
+ if (e.shifted && rn(t37) && (i += " is-active"), e.shifted && "shift" in t37)
+ typeof t37.shift == "string" ? r = Yn(t37.shift) : typeof t37.shift == "object" && (r = t37.shift.label ? t37.shift.label : (o = Yn(t37.shift.latex || t37.shift.insert || "") || t37.shift.key) != null ? o : ""), typeof t37.shift == "object" && (i = (s = (a = t37.shift.class) != null ? a : t37.class) != null ? s : "");
+ else {
+ if (r = t37.label ? t37.label : (l = Yn(t37.latex || t37.insert || "") || t37.key) != null ? l : "", t37.shift) {
+ let d;
+ typeof t37.shift == "string" ? d = Yn(t37.shift) : t37.shift.label ? d = t37.shift.label : d = (c = Yn(t37.shift.latex || t37.shift.insert || "") || t37.shift.key) != null ? c : "", r += `