UNPKG

monaco-editor-vue3

Version:

![npm](https://img.shields.io/npm/v/monaco-editor-vue3) ![npm](https://img.shields.io/npm/dt/monaco-editor-vue3) ![NPM](https://img.shields.io/npm/l/monaco-editor-vue3) ![npm bundle size](https://img.shields.io/bundlephobia/min/format-rmb)

1,535 lines (1,534 loc) 46.6 kB
import * as T from "monaco-editor"; function Jt(e, t) { const n = /* @__PURE__ */ Object.create(null), r = e.split(","); for (let o = 0; o < r.length; o++) n[r[o]] = !0; return t ? (o) => !!n[o.toLowerCase()] : (o) => !!n[o]; } function ve(e) { if (h(e)) { const t = {}; for (let n = 0; n < e.length; n++) { const r = e[n], o = $(r) ? Zt(r) : ve(r); if (o) for (const s in o) t[s] = o[s]; } return t; } else { if ($(e)) return e; if (S(e)) return e; } } const Yt = /;(?![^(]*\))/g, Xt = /:(.+)/; function Zt(e) { const t = {}; return e.split(Yt).forEach((n) => { if (n) { const r = n.split(Xt); r.length > 1 && (t[r[0].trim()] = r[1].trim()); } }), t; } function je(e) { let t = ""; if ($(e)) t = e; else if (h(e)) for (let n = 0; n < e.length; n++) { const r = je(e[n]); r && (t += r + " "); } else if (S(e)) for (const n in e) e[n] && (t += n + " "); return t.trim(); } const V = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {}, Qt = process.env.NODE_ENV !== "production" ? Object.freeze([]) : [], ze = () => { }, kt = () => !1, en = /^on[^a-z]/, tn = (e) => en.test(e), I = Object.assign, nn = (e, t) => { const n = e.indexOf(t); n > -1 && e.splice(n, 1); }, rn = Object.prototype.hasOwnProperty, g = (e, t) => rn.call(e, t), h = Array.isArray, Q = (e) => Ve(e) === "[object Map]", on = (e) => Ve(e) === "[object Set]", w = (e) => typeof e == "function", $ = (e) => typeof e == "string", He = (e) => typeof e == "symbol", S = (e) => e !== null && typeof e == "object", sn = (e) => S(e) && w(e.then) && w(e.catch), cn = Object.prototype.toString, Ve = (e) => cn.call(e), pt = (e) => Ve(e).slice(8, -1), ln = (e) => Ve(e) === "[object Object]", Ke = (e) => $(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, an = (e) => { const t = /* @__PURE__ */ Object.create(null); return (n) => t[n] || (t[n] = e(n)); }, un = an((e) => e.charAt(0).toUpperCase() + e.slice(1)), _e = (e, t) => !Object.is(e, t), fn = (e, t, n) => { Object.defineProperty(e, t, { configurable: !0, enumerable: !1, value: n }); }; let Qe; const dn = () => Qe || (Qe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}); function ke(e, ...t) { console.warn(`[Vue warn] ${e}`, ...t); } let pn; function hn(e, t = pn) { t && t.active && t.effects.push(e); } const se = (e) => { const t = new Set(e); return t.w = 0, t.n = 0, t; }, ht = (e) => (e.w & j) > 0, gt = (e) => (e.n & j) > 0, gn = ({ deps: e }) => { if (e.length) for (let t = 0; t < e.length; t++) e[t].w |= j; }, _n = (e) => { const { deps: t } = e; if (t.length) { let n = 0; for (let r = 0; r < t.length; r++) { const o = t[r]; ht(o) && !gt(o) ? o.delete(e) : t[n++] = o, o.w &= ~j, o.n &= ~j; } t.length = n; } }, Re = /* @__PURE__ */ new WeakMap(); let te = 0, j = 1; const Me = 30; let b; const B = Symbol(process.env.NODE_ENV !== "production" ? "iterate" : ""), Ie = Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : ""); class _t { constructor(t, n = null, r) { this.fn = t, this.scheduler = n, this.active = !0, this.deps = [], this.parent = void 0, hn(this, r); } run() { if (!this.active) return this.fn(); let t = b, n = A; for (; t; ) { if (t === this) return; t = t.parent; } try { return this.parent = b, b = this, A = !0, j = 1 << ++te, te <= Me ? gn(this) : et(this), this.fn(); } finally { te <= Me && _n(this), j = 1 << --te, b = this.parent, A = n, this.parent = void 0, this.deferStop && this.stop(); } } stop() { b === this ? this.deferStop = !0 : this.active && (et(this), this.onStop && this.onStop(), this.active = !1); } } function et(e) { const { deps: t } = e; if (t.length) { for (let n = 0; n < t.length; n++) t[n].delete(e); t.length = 0; } } let A = !0; const mt = []; function Et() { mt.push(A), A = !1; } function wt() { const e = mt.pop(); A = e === void 0 ? !0 : e; } function x(e, t, n) { if (A && b) { let r = Re.get(e); r || Re.set(e, r = /* @__PURE__ */ new Map()); let o = r.get(n); o || r.set(n, o = se()); const s = process.env.NODE_ENV !== "production" ? { effect: b, target: e, type: t, key: n } : void 0; $e(o, s); } } function $e(e, t) { let n = !1; te <= Me ? gt(e) || (e.n |= j, n = !ht(e)) : n = !e.has(b), n && (e.add(b), b.deps.push(e), process.env.NODE_ENV !== "production" && b.onTrack && b.onTrack(Object.assign({ effect: b }, t))); } function z(e, t, n, r, o, s) { const i = Re.get(e); if (!i) return; let c = []; if (t === "clear") c = [...i.values()]; else if (n === "length" && h(e)) i.forEach((d, p) => { (p === "length" || p >= r) && c.push(d); }); else switch (n !== void 0 && c.push(i.get(n)), t) { case "add": h(e) ? Ke(n) && c.push(i.get("length")) : (c.push(i.get(B)), Q(e) && c.push(i.get(Ie))); break; case "delete": h(e) || (c.push(i.get(B)), Q(e) && c.push(i.get(Ie))); break; case "set": Q(e) && c.push(i.get(B)); break; } const a = process.env.NODE_ENV !== "production" ? { target: e, type: t, key: n, newValue: r, oldValue: o, oldTarget: s } : void 0; if (c.length === 1) c[0] && (process.env.NODE_ENV !== "production" ? X(c[0], a) : X(c[0])); else { const d = []; for (const p of c) p && d.push(...p); process.env.NODE_ENV !== "production" ? X(se(d), a) : X(se(d)); } } function X(e, t) { const n = h(e) ? e : [...e]; for (const r of n) r.computed && tt(r, t); for (const r of n) r.computed || tt(r, t); } function tt(e, t) { (e !== b || e.allowRecurse) && (process.env.NODE_ENV !== "production" && e.onTrigger && e.onTrigger(I({ effect: e }, t)), e.scheduler ? e.scheduler() : e.run()); } const mn = /* @__PURE__ */ Jt("__proto__,__v_isRef,__isVue"), Nt = new Set( /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(He) ), En = /* @__PURE__ */ We(), wn = /* @__PURE__ */ We(!0), Nn = /* @__PURE__ */ We(!0, !0), nt = /* @__PURE__ */ bn(); function bn() { const e = {}; return ["includes", "indexOf", "lastIndexOf"].forEach((t) => { e[t] = function(...n) { const r = f(this); for (let s = 0, i = this.length; s < i; s++) x(r, "get", s + ""); const o = r[t](...n); return o === -1 || o === !1 ? r[t](...n.map(f)) : o; }; }), ["push", "pop", "shift", "unshift", "splice"].forEach((t) => { e[t] = function(...n) { Et(); const r = f(this)[t].apply(this, n); return wt(), r; }; }), e; } function We(e = !1, t = !1) { return function(r, o, s) { if (o === "__v_isReactive") return !e; if (o === "__v_isReadonly") return e; if (o === "__v_isShallow") return t; if (o === "__v_raw" && s === (e ? t ? St : Vt : t ? An : vt).get(r)) return r; const i = h(r); if (!e && i && g(nt, o)) return Reflect.get(nt, o, s); const c = Reflect.get(r, o, s); return (He(o) ? Nt.has(o) : mn(o)) || (e || x(r, "get", o), t) ? c : O(c) ? i && Ke(o) ? c : c.value : S(c) ? e ? xt(c) : yt(c) : c; }; } const On = /* @__PURE__ */ vn(); function vn(e = !1) { return function(n, r, o, s) { let i = n[r]; if (J(i) && O(i) && !O(o)) return !1; if (!e && !J(o) && (Ce(o) || (o = f(o), i = f(i)), !h(n) && O(i) && !O(o))) return i.value = o, !0; const c = h(n) && Ke(r) ? Number(r) < n.length : g(n, r), a = Reflect.set(n, r, o, s); return n === f(s) && (c ? _e(o, i) && z(n, "set", r, o, i) : z(n, "add", r, o)), a; }; } function Vn(e, t) { const n = g(e, t), r = e[t], o = Reflect.deleteProperty(e, t); return o && n && z(e, "delete", t, void 0, r), o; } function Sn(e, t) { const n = Reflect.has(e, t); return (!He(t) || !Nt.has(t)) && x(e, "has", t), n; } function yn(e) { return x(e, "iterate", h(e) ? "length" : B), Reflect.ownKeys(e); } const xn = { get: En, set: On, deleteProperty: Vn, has: Sn, ownKeys: yn }, bt = { get: wn, set(e, t) { return process.env.NODE_ENV !== "production" && ke(`Set operation on key "${String(t)}" failed: target is readonly.`, e), !0; }, deleteProperty(e, t) { return process.env.NODE_ENV !== "production" && ke(`Delete operation on key "${String(t)}" failed: target is readonly.`, e), !0; } }, Dn = /* @__PURE__ */ I({}, bt, { get: Nn }), Ue = (e) => e, Se = (e) => Reflect.getPrototypeOf(e); function le(e, t, n = !1, r = !1) { e = e.__v_raw; const o = f(e), s = f(t); n || (t !== s && x(o, "get", t), x(o, "get", s)); const { has: i } = Se(o), c = r ? Ue : n ? Ge : Le; if (i.call(o, t)) return c(e.get(t)); if (i.call(o, s)) return c(e.get(s)); e !== o && e.get(t); } function ae(e, t = !1) { const n = this.__v_raw, r = f(n), o = f(e); return t || (e !== o && x(r, "has", e), x(r, "has", o)), e === o ? n.has(e) : n.has(e) || n.has(o); } function ue(e, t = !1) { return e = e.__v_raw, !t && x(f(e), "iterate", B), Reflect.get(e, "size", e); } function rt(e) { e = f(e); const t = f(this); return Se(t).has.call(t, e) || (t.add(e), z(t, "add", e, e)), this; } function ot(e, t) { t = f(t); const n = f(this), { has: r, get: o } = Se(n); let s = r.call(n, e); s ? process.env.NODE_ENV !== "production" && Ot(n, r, e) : (e = f(e), s = r.call(n, e)); const i = o.call(n, e); return n.set(e, t), s ? _e(t, i) && z(n, "set", e, t, i) : z(n, "add", e, t), this; } function st(e) { const t = f(this), { has: n, get: r } = Se(t); let o = n.call(t, e); o ? process.env.NODE_ENV !== "production" && Ot(t, n, e) : (e = f(e), o = n.call(t, e)); const s = r ? r.call(t, e) : void 0, i = t.delete(e); return o && z(t, "delete", e, void 0, s), i; } function it() { const e = f(this), t = e.size !== 0, n = process.env.NODE_ENV !== "production" ? Q(e) ? new Map(e) : new Set(e) : void 0, r = e.clear(); return t && z(e, "clear", void 0, void 0, n), r; } function fe(e, t) { return function(r, o) { const s = this, i = s.__v_raw, c = f(i), a = t ? Ue : e ? Ge : Le; return !e && x(c, "iterate", B), i.forEach((d, p) => r.call(o, a(d), a(p), s)); }; } function de(e, t, n) { return function(...r) { const o = this.__v_raw, s = f(o), i = Q(s), c = e === "entries" || e === Symbol.iterator && i, a = e === "keys" && i, d = o[e](...r), p = n ? Ue : t ? Ge : Le; return !t && x(s, "iterate", a ? Ie : B), { next() { const { value: l, done: u } = d.next(); return u ? { value: l, done: u } : { value: c ? [p(l[0]), p(l[1])] : p(l), done: u }; }, [Symbol.iterator]() { return this; } }; }; } function P(e) { return function(...t) { if (process.env.NODE_ENV !== "production") { const n = t[0] ? `on key "${t[0]}" ` : ""; console.warn(`${un(e)} operation ${n}failed: target is readonly.`, f(this)); } return e === "delete" ? !1 : this; }; } function Rn() { const e = { get(s) { return le(this, s); }, get size() { return ue(this); }, has: ae, add: rt, set: ot, delete: st, clear: it, forEach: fe(!1, !1) }, t = { get(s) { return le(this, s, !1, !0); }, get size() { return ue(this); }, has: ae, add: rt, set: ot, delete: st, clear: it, forEach: fe(!1, !0) }, n = { get(s) { return le(this, s, !0); }, get size() { return ue(this, !0); }, has(s) { return ae.call(this, s, !0); }, add: P("add"), set: P("set"), delete: P("delete"), clear: P("clear"), forEach: fe(!0, !1) }, r = { get(s) { return le(this, s, !0, !0); }, get size() { return ue(this, !0); }, has(s) { return ae.call(this, s, !0); }, add: P("add"), set: P("set"), delete: P("delete"), clear: P("clear"), forEach: fe(!0, !0) }; return ["keys", "values", "entries", Symbol.iterator].forEach((s) => { e[s] = de(s, !1, !1), n[s] = de(s, !0, !1), t[s] = de(s, !1, !0), r[s] = de(s, !0, !0); }), [ e, n, t, r ]; } const [Mn, In, $n, Cn] = /* @__PURE__ */ Rn(); function Be(e, t) { const n = t ? e ? Cn : $n : e ? In : Mn; return (r, o, s) => o === "__v_isReactive" ? !e : o === "__v_isReadonly" ? e : o === "__v_raw" ? r : Reflect.get(g(n, o) && o in r ? n : r, o, s); } const Tn = { get: /* @__PURE__ */ Be(!1, !1) }, Pn = { get: /* @__PURE__ */ Be(!0, !1) }, Fn = { get: /* @__PURE__ */ Be(!0, !0) }; function Ot(e, t, n) { const r = f(n); if (r !== n && t.call(e, r)) { const o = pt(e); console.warn(`Reactive ${o} contains both the raw and reactive versions of the same object${o === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`); } } const vt = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(); function jn(e) { switch (e) { case "Object": case "Array": return 1; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2; default: return 0; } } function zn(e) { return e.__v_skip || !Object.isExtensible(e) ? 0 : jn(pt(e)); } function yt(e) { return J(e) ? e : qe(e, !1, xn, Tn, vt); } function xt(e) { return qe(e, !0, bt, Pn, Vt); } function pe(e) { return qe(e, !0, Dn, Fn, St); } function qe(e, t, n, r, o) { if (!S(e)) return process.env.NODE_ENV !== "production" && console.warn(`value cannot be made reactive: ${String(e)}`), e; if (e.__v_raw && !(t && e.__v_isReactive)) return e; const s = o.get(e); if (s) return s; const i = zn(e); if (i === 0) return e; const c = new Proxy(e, i === 2 ? r : n); return o.set(e, c), c; } function q(e) { return J(e) ? q(e.__v_raw) : !!(e && e.__v_isReactive); } function J(e) { return !!(e && e.__v_isReadonly); } function Ce(e) { return !!(e && e.__v_isShallow); } function me(e) { return q(e) || J(e); } function f(e) { const t = e && e.__v_raw; return t ? f(t) : e; } function Hn(e) { return fn(e, "__v_skip", !0), e; } const Le = (e) => S(e) ? yt(e) : e, Ge = (e) => S(e) ? xt(e) : e; function Kn(e) { A && b && (e = f(e), process.env.NODE_ENV !== "production" ? $e(e.dep || (e.dep = se()), { target: e, type: "get", key: "value" }) : $e(e.dep || (e.dep = se()))); } function Wn(e, t) { e = f(e), e.dep && (process.env.NODE_ENV !== "production" ? X(e.dep, { target: e, type: "set", key: "value", newValue: t }) : X(e.dep)); } function O(e) { return !!(e && e.__v_isRef === !0); } function Un(e) { return O(e) ? e.value : e; } const Bn = { get: (e, t, n) => Un(Reflect.get(e, t, n)), set: (e, t, n, r) => { const o = e[t]; return O(o) && !O(n) ? (o.value = n, !0) : Reflect.set(e, t, n, r); } }; function qn(e) { return q(e) ? e : new Proxy(e, Bn); } function Ln(e) { process.env.NODE_ENV !== "production" && !me(e) && console.warn("toRefs() expects a reactive object but received a plain one."); const t = h(e) ? new Array(e.length) : {}; for (const n in e) t[n] = Jn(e, n); return t; } class Gn { constructor(t, n, r) { this._object = t, this._key = n, this._defaultValue = r, this.__v_isRef = !0; } get value() { const t = this._object[this._key]; return t === void 0 ? this._defaultValue : t; } set value(t) { this._object[this._key] = t; } } function Jn(e, t, n) { const r = e[t]; return O(r) ? r : new Gn(e, t, n); } class Yn { constructor(t, n, r, o) { this._setter = n, this.dep = void 0, this.__v_isRef = !0, this._dirty = !0, this.effect = new _t(t, () => { this._dirty || (this._dirty = !0, Wn(this)); }), this.effect.computed = this, this.effect.active = this._cacheable = !o, this.__v_isReadonly = r; } get value() { const t = f(this); return Kn(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value; } set value(t) { this._setter(t); } } function Xn(e, t, n = !1) { let r, o; const s = w(e); s ? (r = e, o = process.env.NODE_ENV !== "production" ? () => { console.warn("Write operation failed: computed value is readonly"); } : ze) : (r = e.get, o = e.set); const i = new Yn(r, o, s || !o, n); return process.env.NODE_ENV !== "production" && t && !n && (i.effect.onTrack = t.onTrack, i.effect.onTrigger = t.onTrigger), i; } const L = []; function Zn(e) { L.push(e); } function Qn() { L.pop(); } function v(e, ...t) { Et(); const n = L.length ? L[L.length - 1].component : null, r = n && n.appContext.config.warnHandler, o = kn(); if (r) G(r, n, 11, [ e + t.join(""), n && n.proxy, o.map(({ vnode: s }) => `at <${Bt(n, s.type)}>`).join(` `), o ]); else { const s = [`[Vue warn]: ${e}`, ...t]; o.length && s.push(` `, ...er(o)), console.warn(...s); } wt(); } function kn() { let e = L[L.length - 1]; if (!e) return []; const t = []; for (; e; ) { const n = t[0]; n && n.vnode === e ? n.recurseCount++ : t.push({ vnode: e, recurseCount: 0 }); const r = e.component && e.component.parent; e = r && r.vnode; } return t; } function er(e) { const t = []; return e.forEach((n, r) => { t.push(...r === 0 ? [] : [` `], ...tr(n)); }), t; } function tr({ vnode: e, recurseCount: t }) { const n = t > 0 ? `... (${t} recursive calls)` : "", r = e.component ? e.component.parent == null : !1, o = ` at <${Bt(e.component, e.type, r)}`, s = ">" + n; return e.props ? [o, ...nr(e.props), s] : [o + s]; } function nr(e) { const t = [], n = Object.keys(e); return n.slice(0, 3).forEach((r) => { t.push(...Dt(r, e[r])); }), n.length > 3 && t.push(" ..."), t; } function Dt(e, t, n) { return $(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : O(t) ? (t = Dt(e, f(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : w(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = f(t), n ? t : [`${e}=`, t]); } const Rt = { sp: "serverPrefetch hook", bc: "beforeCreate hook", c: "created hook", bm: "beforeMount hook", m: "mounted hook", bu: "beforeUpdate hook", u: "updated", bum: "beforeUnmount hook", um: "unmounted hook", a: "activated hook", da: "deactivated hook", ec: "errorCaptured hook", rtc: "renderTracked hook", rtg: "renderTriggered hook", [0]: "setup function", [1]: "render function", [2]: "watcher getter", [3]: "watcher callback", [4]: "watcher cleanup function", [5]: "native event handler", [6]: "component event handler", [7]: "vnode hook", [8]: "directive hook", [9]: "transition hook", [10]: "app errorHandler", [11]: "app warnHandler", [12]: "ref function", [13]: "async component loader", [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core" }; function G(e, t, n, r) { let o; try { o = r ? e(...r) : e(); } catch (s) { Mt(s, t, n); } return o; } function Te(e, t, n, r) { if (w(e)) { const s = G(e, t, n, r); return s && sn(s) && s.catch((i) => { Mt(i, t, n); }), s; } const o = []; for (let s = 0; s < e.length; s++) o.push(Te(e[s], t, n, r)); return o; } function Mt(e, t, n, r = !0) { const o = t ? t.vnode : null; if (t) { let s = t.parent; const i = t.proxy, c = process.env.NODE_ENV !== "production" ? Rt[n] : n; for (; s; ) { const d = s.ec; if (d) { for (let p = 0; p < d.length; p++) if (d[p](e, i, c) === !1) return; } s = s.parent; } const a = t.appContext.config.errorHandler; if (a) { G(a, null, 10, [e, i, c]); return; } } rr(e, n, o, r); } function rr(e, t, n, r = !0) { if (process.env.NODE_ENV !== "production") { const o = Rt[t]; if (n && Zn(n), v(`Unhandled error${o ? ` during execution of ${o}` : ""}`), n && Qn(), r) throw e; console.error(e); } else console.error(e); } let Ee = !1, Pe = !1; const R = []; let F = 0; const ne = []; let Y = null, H = 0; const re = []; let C = null, K = 0; const It = /* @__PURE__ */ Promise.resolve(); let Je = null, Fe = null; const or = 100; function sr(e) { const t = Je || It; return e ? t.then(this ? e.bind(this) : e) : t; } function ir(e) { let t = F + 1, n = R.length; for (; t < n; ) { const r = t + n >>> 1; ie(R[r]) < e ? t = r + 1 : n = r; } return t; } function $t(e) { (!R.length || !R.includes(e, Ee && e.allowRecurse ? F + 1 : F)) && e !== Fe && (e.id == null ? R.push(e) : R.splice(ir(e.id), 0, e), Ct()); } function Ct() { !Ee && !Pe && (Pe = !0, Je = It.then(Ft)); } function Tt(e, t, n, r) { h(e) ? n.push(...e) : (!t || !t.includes(e, e.allowRecurse ? r + 1 : r)) && n.push(e), Ct(); } function cr(e) { Tt(e, Y, ne, H); } function Pt(e) { Tt(e, C, re, K); } function Ye(e, t = null) { if (ne.length) { for (Fe = t, Y = [...new Set(ne)], ne.length = 0, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), H = 0; H < Y.length; H++) process.env.NODE_ENV !== "production" && Xe(e, Y[H]) || Y[H](); Y = null, H = 0, Fe = null, Ye(e, t); } } function lr(e) { if (Ye(), re.length) { const t = [...new Set(re)]; if (re.length = 0, C) { C.push(...t); return; } for (C = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), C.sort((n, r) => ie(n) - ie(r)), K = 0; K < C.length; K++) process.env.NODE_ENV !== "production" && Xe(e, C[K]) || C[K](); C = null, K = 0; } } const ie = (e) => e.id == null ? 1 / 0 : e.id; function Ft(e) { Pe = !1, Ee = !0, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), Ye(e), R.sort((n, r) => ie(n) - ie(r)); const t = process.env.NODE_ENV !== "production" ? (n) => Xe(e, n) : ze; try { for (F = 0; F < R.length; F++) { const n = R[F]; if (n && n.active !== !1) { if (process.env.NODE_ENV !== "production" && t(n)) continue; G(n, null, 14); } } } finally { F = 0, R.length = 0, lr(e), Ee = !1, Je = null, (R.length || ne.length || re.length) && Ft(e); } } function Xe(e, t) { if (!e.has(t)) e.set(t, 1); else { const n = e.get(t); if (n > or) { const r = t.ownerInstance, o = r && Ut(r.type); return v(`Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`), !0; } else e.set(t, n + 1); } } const ee = /* @__PURE__ */ new Set(); process.env.NODE_ENV !== "production" && (dn().__VUE_HMR_RUNTIME__ = { createRecord: ye(ar), rerender: ye(ur), reload: ye(fr) }); const we = /* @__PURE__ */ new Map(); function ar(e, t) { return we.has(e) ? !1 : (we.set(e, { initialDef: oe(t), instances: /* @__PURE__ */ new Set() }), !0); } function oe(e) { return qt(e) ? e.__vccOpts : e; } function ur(e, t) { const n = we.get(e); !n || (n.initialDef.render = t, [...n.instances].forEach((r) => { t && (r.render = t, oe(r.type).render = t), r.renderCache = [], r.update(); })); } function fr(e, t) { const n = we.get(e); if (!n) return; t = oe(t), ct(n.initialDef, t); const r = [...n.instances]; for (const o of r) { const s = oe(o.type); ee.has(s) || (s !== n.initialDef && ct(s, t), ee.add(s)), o.appContext.optionsCache.delete(o.type), o.ceReload ? (ee.add(s), o.ceReload(t.styles), ee.delete(s)) : o.parent ? ($t(o.parent.update), o.parent.type.__asyncLoader && o.parent.ceReload && o.parent.ceReload(t.styles)) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn("[HMR] Root or manually mounted instance modified. Full reload required."); } Pt(() => { for (const o of r) ee.delete(oe(o.type)); }); } function ct(e, t) { I(e, t); for (const n in e) n !== "__file" && !(n in t) && delete e[n]; } function ye(e) { return (t, n) => { try { return e(t, n); } catch (r) { console.error(r), console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required."); } }; } let U = null, dr = null; const pr = (e) => e.__isSuspense; function hr(e, t) { t && t.pendingBranch ? h(e) ? t.effects.push(...e) : t.effects.push(e) : Pt(e); } const lt = {}; function gr(e, t, { immediate: n, deep: r, flush: o, onTrack: s, onTrigger: i } = V) { process.env.NODE_ENV !== "production" && !t && (n !== void 0 && v('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'), r !== void 0 && v('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.')); const c = (_) => { v("Invalid watch source: ", _, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."); }, a = k; let d, p = !1, l = !1; if (O(e) ? (d = () => e.value, p = Ce(e)) : q(e) ? (d = () => e, r = !0) : h(e) ? (l = !0, p = e.some((_) => q(_) || Ce(_)), d = () => e.map((_) => { if (O(_)) return _.value; if (q(_)) return Z(_); if (w(_)) return G(_, a, 2); process.env.NODE_ENV !== "production" && c(_); })) : w(e) ? t ? d = () => G(e, a, 2) : d = () => { if (!(a && a.isUnmounted)) return u && u(), Te(e, a, 3, [m]); } : (d = ze, process.env.NODE_ENV !== "production" && c(e)), t && r) { const _ = d; d = () => Z(_()); } let u, m = (_) => { u = y.onStop = () => { G(_, a, 4); }; }, E = l ? [] : lt; const D = () => { if (!!y.active) if (t) { const _ = y.run(); (r || p || (l ? _.some((Lt, Gt) => _e(Lt, E[Gt])) : _e(_, E))) && (u && u(), Te(t, a, 3, [ _, E === lt ? void 0 : E, m ]), E = _); } else y.run(); }; D.allowRecurse = !!t; let ce; o === "sync" ? ce = D : o === "post" ? ce = () => ft(D, a && a.suspense) : ce = () => cr(D); const y = new _t(d, ce); return process.env.NODE_ENV !== "production" && (y.onTrack = s, y.onTrigger = i), t ? n ? D() : E = y.run() : o === "post" ? ft(y.run.bind(y), a && a.suspense) : y.run(), () => { y.stop(), a && a.scope && nn(a.scope.effects, y); }; } function _r(e, t, n) { const r = this.proxy, o = $(e) ? e.includes(".") ? mr(r, e) : () => r[e] : e.bind(r, r); let s; w(t) ? s = t : (s = t.handler, n = t); const i = k; dt(this); const c = gr(o, s.bind(r), n); return i ? dt(i) : Hr(), c; } function mr(e, t) { const n = t.split("."); return () => { let r = e; for (let o = 0; o < n.length && r; o++) r = r[n[o]]; return r; }; } function Z(e, t) { if (!S(e) || e.__v_skip || (t = t || /* @__PURE__ */ new Set(), t.has(e))) return e; if (t.add(e), O(e)) Z(e.value, t); else if (h(e)) for (let n = 0; n < e.length; n++) Z(e[n], t); else if (on(e) || Q(e)) e.forEach((n) => { Z(n, t); }); else if (ln(e)) for (const n in e) Z(e[n], t); return e; } function Er(e) { return w(e) ? { setup: e, name: e.name } : e; } const wr = Symbol(), Ae = (e) => e ? Kr(e) ? Ur(e) || e.proxy : Ae(e.parent) : null, Ne = /* @__PURE__ */ I(/* @__PURE__ */ Object.create(null), { $: (e) => e, $el: (e) => e.vnode.el, $data: (e) => e.data, $props: (e) => process.env.NODE_ENV !== "production" ? pe(e.props) : e.props, $attrs: (e) => process.env.NODE_ENV !== "production" ? pe(e.attrs) : e.attrs, $slots: (e) => process.env.NODE_ENV !== "production" ? pe(e.slots) : e.slots, $refs: (e) => process.env.NODE_ENV !== "production" ? pe(e.refs) : e.refs, $parent: (e) => Ae(e.parent), $root: (e) => Ae(e.root), $emit: (e) => e.emit, $options: (e) => Or(e), $forceUpdate: (e) => e.f || (e.f = () => $t(e.update)), $nextTick: (e) => e.n || (e.n = sr.bind(e.proxy)), $watch: (e) => _r.bind(e) }), Nr = (e) => e === "_" || e === "$", br = { get({ _: e }, t) { const { ctx: n, setupState: r, data: o, props: s, accessCache: i, type: c, appContext: a } = e; if (process.env.NODE_ENV !== "production" && t === "__isVue") return !0; if (process.env.NODE_ENV !== "production" && r !== V && r.__isScriptSetup && g(r, t)) return r[t]; let d; if (t[0] !== "$") { const m = i[t]; if (m !== void 0) switch (m) { case 1: return r[t]; case 2: return o[t]; case 4: return n[t]; case 3: return s[t]; } else { if (r !== V && g(r, t)) return i[t] = 1, r[t]; if (o !== V && g(o, t)) return i[t] = 2, o[t]; if ((d = e.propsOptions[0]) && g(d, t)) return i[t] = 3, s[t]; if (n !== V && g(n, t)) return i[t] = 4, n[t]; i[t] = 0; } } const p = Ne[t]; let l, u; if (p) return t === "$attrs" && (x(e, "get", t), process.env.NODE_ENV !== "production" && void 0), p(e); if ((l = c.__cssModules) && (l = l[t])) return l; if (n !== V && g(n, t)) return i[t] = 4, n[t]; if (u = a.config.globalProperties, g(u, t)) return u[t]; process.env.NODE_ENV !== "production" && U && (!$(t) || t.indexOf("__v") !== 0) && (o !== V && Nr(t[0]) && g(o, t) ? v(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === U && v(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`)); }, set({ _: e }, t, n) { const { data: r, setupState: o, ctx: s } = e; return o !== V && g(o, t) ? (o[t] = n, !0) : r !== V && g(r, t) ? (r[t] = n, !0) : g(e.props, t) ? (process.env.NODE_ENV !== "production" && v(`Attempting to mutate prop "${t}". Props are readonly.`, e), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && v(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`, e), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(s, t, { enumerable: !0, configurable: !0, value: n }) : s[t] = n, !0); }, has({ _: { data: e, setupState: t, accessCache: n, ctx: r, appContext: o, propsOptions: s } }, i) { let c; return !!n[i] || e !== V && g(e, i) || t !== V && g(t, i) || (c = s[0]) && g(c, i) || g(r, i) || g(Ne, i) || g(o.config.globalProperties, i); }, defineProperty(e, t, n) { return n.get != null ? e._.accessCache[t] = 0 : g(n, "value") && this.set(e, t, n.value, null), Reflect.defineProperty(e, t, n); } }; process.env.NODE_ENV !== "production" && (br.ownKeys = (e) => (v("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."), Reflect.ownKeys(e))); function Or(e) { const t = e.type, { mixins: n, extends: r } = t, { mixins: o, optionsCache: s, config: { optionMergeStrategies: i } } = e.appContext, c = s.get(t); let a; return c ? a = c : !o.length && !n && !r ? a = t : (a = {}, o.length && o.forEach((d) => be(a, d, i, !0)), be(a, t, i)), s.set(t, a), a; } function be(e, t, n, r = !1) { const { mixins: o, extends: s } = t; s && be(e, s, n, !0), o && o.forEach((i) => be(e, i, n, !0)); for (const i in t) if (r && i === "expose") process.env.NODE_ENV !== "production" && v('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.'); else { const c = vr[i] || n && n[i]; e[i] = c ? c(e[i], t[i]) : t[i]; } return e; } const vr = { data: at, props: W, emits: W, methods: W, computed: W, beforeCreate: N, created: N, beforeMount: N, mounted: N, beforeUpdate: N, updated: N, beforeDestroy: N, beforeUnmount: N, destroyed: N, unmounted: N, activated: N, deactivated: N, errorCaptured: N, serverPrefetch: N, components: W, directives: W, watch: Sr, provide: at, inject: Vr }; function at(e, t) { return t ? e ? function() { return I(w(e) ? e.call(this, this) : e, w(t) ? t.call(this, this) : t); } : t : e; } function Vr(e, t) { return W(ut(e), ut(t)); } function ut(e) { if (h(e)) { const t = {}; for (let n = 0; n < e.length; n++) t[e[n]] = e[n]; return t; } return e; } function N(e, t) { return e ? [...new Set([].concat(e, t))] : t; } function W(e, t) { return e ? I(I(/* @__PURE__ */ Object.create(null), e), t) : t; } function Sr(e, t) { if (!e) return t; if (!t) return e; const n = I(/* @__PURE__ */ Object.create(null), e); for (const r in t) n[r] = N(e[r], t[r]); return n; } function yr() { return { app: null, config: { isNativeTag: kt, performance: !1, globalProperties: {}, optionMergeStrategies: {}, errorHandler: void 0, warnHandler: void 0, compilerOptions: {} }, mixins: [], components: {}, directives: {}, provides: /* @__PURE__ */ Object.create(null), optionsCache: /* @__PURE__ */ new WeakMap(), propsCache: /* @__PURE__ */ new WeakMap(), emitsCache: /* @__PURE__ */ new WeakMap() }; } const ft = hr, xr = (e) => e.__isTeleport, At = Symbol(process.env.NODE_ENV !== "production" ? "Fragment" : void 0), Dr = Symbol(process.env.NODE_ENV !== "production" ? "Text" : void 0), Rr = Symbol(process.env.NODE_ENV !== "production" ? "Comment" : void 0); Symbol(process.env.NODE_ENV !== "production" ? "Static" : void 0); const he = []; let M = null; function Mr(e = !1) { he.push(M = e ? null : []); } function Ir() { he.pop(), M = he[he.length - 1] || null; } function $r(e) { return e.dynamicChildren = M || Qt, Ir(), M && M.push(e), e; } function Cr(e, t, n, r, o, s) { return $r(Ht(e, t, n, r, o, s, !0)); } function Tr(e) { return e ? e.__v_isVNode === !0 : !1; } const Pr = (...e) => Kt(...e), jt = "__vInternal", zt = ({ key: e }) => e != null ? e : null, ge = ({ ref: e, ref_key: t, ref_for: n }) => e != null ? $(e) || O(e) || w(e) ? { i: U, r: e, k: t, f: !!n } : e : null; function Ht(e, t = null, n = null, r = 0, o = null, s = e === At ? 0 : 1, i = !1, c = !1) { const a = { __v_isVNode: !0, __v_skip: !0, type: e, props: t, key: t && zt(t), ref: t && ge(t), scopeId: dr, slotScopeIds: null, children: n, component: null, suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: null, anchor: null, target: null, targetAnchor: null, staticCount: 0, shapeFlag: s, patchFlag: r, dynamicProps: o, dynamicChildren: null, appContext: null }; return c ? (Ze(a, n), s & 128 && e.normalize(a)) : n && (a.shapeFlag |= $(n) ? 8 : 16), process.env.NODE_ENV !== "production" && a.key !== a.key && v("VNode created with invalid key (NaN). VNode type:", a.type), !i && M && (a.patchFlag > 0 || s & 6) && a.patchFlag !== 32 && M.push(a), a; } const Fr = process.env.NODE_ENV !== "production" ? Pr : Kt; function Kt(e, t = null, n = null, r = 0, o = null, s = !1) { if ((!e || e === wr) && (process.env.NODE_ENV !== "production" && !e && v(`Invalid vnode type when creating vnode: ${e}.`), e = Rr), Tr(e)) { const c = Oe(e, t, !0); return n && Ze(c, n), !s && M && (c.shapeFlag & 6 ? M[M.indexOf(e)] = c : M.push(c)), c.patchFlag |= -2, c; } if (qt(e) && (e = e.__vccOpts), t) { t = Ar(t); let { class: c, style: a } = t; c && !$(c) && (t.class = je(c)), S(a) && (me(a) && !h(a) && (a = I({}, a)), t.style = ve(a)); } const i = $(e) ? 1 : pr(e) ? 128 : xr(e) ? 64 : S(e) ? 4 : w(e) ? 2 : 0; return process.env.NODE_ENV !== "production" && i & 4 && me(e) && (e = f(e), v("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.", ` Component that was made reactive: `, e)), Ht(e, t, n, r, o, i, s, !0); } function Ar(e) { return e ? me(e) || jt in e ? I({}, e) : e : null; } function Oe(e, t, n = !1) { const { props: r, ref: o, patchFlag: s, children: i } = e, c = t ? zr(r || {}, t) : r; return { __v_isVNode: !0, __v_skip: !0, type: e.type, props: c, key: c && zt(c), ref: t && t.ref ? n && o ? h(o) ? o.concat(ge(t)) : [o, ge(t)] : ge(t) : o, scopeId: e.scopeId, slotScopeIds: e.slotScopeIds, children: process.env.NODE_ENV !== "production" && s === -1 && h(i) ? i.map(Wt) : i, target: e.target, targetAnchor: e.targetAnchor, staticCount: e.staticCount, shapeFlag: e.shapeFlag, patchFlag: t && e.type !== At ? s === -1 ? 16 : s | 16 : s, dynamicProps: e.dynamicProps, dynamicChildren: e.dynamicChildren, appContext: e.appContext, dirs: e.dirs, transition: e.transition, component: e.component, suspense: e.suspense, ssContent: e.ssContent && Oe(e.ssContent), ssFallback: e.ssFallback && Oe(e.ssFallback), el: e.el, anchor: e.anchor }; } function Wt(e) { const t = Oe(e); return h(e.children) && (t.children = e.children.map(Wt)), t; } function jr(e = " ", t = 0) { return Fr(Dr, null, e, t); } function Ze(e, t) { let n = 0; const { shapeFlag: r } = e; if (t == null) t = null; else if (h(t)) n = 16; else if (typeof t == "object") if (r & 65) { const o = t.default; o && (o._c && (o._d = !1), Ze(e, o()), o._c && (o._d = !0)); return; } else { n = 32; const o = t._; !o && !(jt in t) ? t._ctx = U : o === 3 && U && (U.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024)); } else w(t) ? (t = { default: t, _ctx: U }, n = 32) : (t = String(t), r & 64 ? (n = 16, t = [jr(t)]) : n = 8); e.children = t, e.shapeFlag |= n; } function zr(...e) { const t = {}; for (let n = 0; n < e.length; n++) { const r = e[n]; for (const o in r) if (o === "class") t.class !== r.class && (t.class = je([t.class, r.class])); else if (o === "style") t.style = ve([t.style, r.style]); else if (tn(o)) { const s = t[o], i = r[o]; i && s !== i && !(h(s) && s.includes(i)) && (t[o] = s ? [].concat(s, i) : i); } else o !== "" && (t[o] = r[o]); } return t; } yr(); let k = null; const dt = (e) => { k = e, e.scope.on(); }, Hr = () => { k && k.scope.off(), k = null; }; function Kr(e) { return e.vnode.shapeFlag & 4; } let Wr = !1; function Ur(e) { if (e.exposed) return e.exposeProxy || (e.exposeProxy = new Proxy(qn(Hn(e.exposed)), { get(t, n) { if (n in t) return t[n]; if (n in Ne) return Ne[n](e); } })); } const Br = /(?:^|[-_])(\w)/g, qr = (e) => e.replace(Br, (t) => t.toUpperCase()).replace(/[-_]/g, ""); function Ut(e, t = !0) { return w(e) ? e.displayName || e.name : e.name || t && e.__name; } function Bt(e, t, n = !1) { let r = Ut(t); if (!r && t.__file) { const o = t.__file.match(/([^/\\]+)\.\w+$/); o && (r = o[1]); } if (!r && e && e.parent) { const o = (s) => { for (const i in s) if (s[i] === t) return i; }; r = o(e.components || e.parent.type.components) || o(e.appContext.components); } return r ? qr(r) : n ? "App" : "Anonymous"; } function qt(e) { return w(e) && "__vccOpts" in e; } const Lr = (e, t) => Xn(e, t, Wr); Symbol(process.env.NODE_ENV !== "production" ? "ssrContext" : ""); function xe(e) { return !!(e && e.__v_isShallow); } function Gr() { if (process.env.NODE_ENV === "production" || typeof window > "u") return; const e = { style: "color:#3ba776" }, t = { style: "color:#0b1bc9" }, n = { style: "color:#b62e24" }, r = { style: "color:#9d288c" }, o = { header(l) { return S(l) ? l.__isVue ? ["div", e, "VueInstance"] : O(l) ? [ "div", {}, ["span", e, p(l)], "<", c(l.value), ">" ] : q(l) ? [ "div", {}, ["span", e, xe(l) ? "ShallowReactive" : "Reactive"], "<", c(l), `>${J(l) ? " (readonly)" : ""}` ] : J(l) ? [ "div", {}, ["span", e, xe(l) ? "ShallowReadonly" : "Readonly"], "<", c(l), ">" ] : null : null; }, hasBody(l) { return l && l.__isVue; }, body(l) { if (l && l.__isVue) return [ "div", {}, ...s(l.$) ]; } }; function s(l) { const u = []; l.type.props && l.props && u.push(i("props", f(l.props))), l.setupState !== V && u.push(i("setup", l.setupState)), l.data !== V && u.push(i("data", f(l.data))); const m = a(l, "computed"); m && u.push(i("computed", m)); const E = a(l, "inject"); return E && u.push(i("injected", E)), u.push([ "div", {}, [ "span", { style: r.style + ";opacity:0.66" }, "$ (internal): " ], ["object", { object: l }] ]), u; } function i(l, u) { return u = I({}, u), Object.keys(u).length ? [ "div", { style: "line-height:1.25em;margin-bottom:0.6em" }, [ "div", { style: "color:#476582" }, l ], [ "div", { style: "padding-left:1.25em" }, ...Object.keys(u).map((m) => [ "div", {}, ["span", r, m + ": "], c(u[m], !1) ]) ] ] : ["span", {}]; } function c(l, u = !0) { return typeof l == "number" ? ["span", t, l] : typeof l == "string" ? ["span", n, JSON.stringify(l)] : typeof l == "boolean" ? ["span", r, l] : S(l) ? ["object", { object: u ? f(l) : l }] : ["span", n, String(l)]; } function a(l, u) { const m = l.type; if (w(m)) return; const E = {}; for (const D in l.ctx) d(m, D, u) && (E[D] = l.ctx[D]); return E; } function d(l, u, m) { const E = l[m]; if (h(E) && E.includes(u) || S(E) && u in E || l.extends && d(l.extends, u, m) || l.mixins && l.mixins.some((D) => d(D, u, m))) return !0; } function p(l) { return xe(l) ? "ShallowRef" : l.effect ? "ComputedRef" : "Ref"; } window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o]; } function Jr() { Gr(); } process.env.NODE_ENV !== "production" && Jr(); const Yr = (e, t) => { const n = e.__vccOpts || e; for (const [r, o] of t) n[r] = o; return n; }, Xr = Er({ name: "MonacoEditor", props: { diffEditor: { type: Boolean, default: !1 }, width: { type: [String, Number], default: "100%" }, height: { type: [String, Number], default: "100%" }, original: String, value: String, language: { type: String, default: "javascript" }, theme: { type: String, default: "vs" }, options: { type: Object, default() { return {}; } } }, emits: ["editorWillMount", "editorDidMount", "change", "update:value"], setup(e) { const { width: t, height: n } = Ln(e); return { style: Lr(() => { const o = t.value.toString().includes("%") ? t.value : `${t.value}px`, s = n.value.toString().includes("%") ? n.value : `${n.value}px`; return { width: o, height: s, "text-align": "left" }; }) }; }, mounted() { this.initMonaco(); }, beforeUnmount() { this.editor && this.editor.dispose(); }, methods: { initMonaco() { this.$emit("editorWillMount", T); const { value: e, language: t, theme: n, options: r } = this; this.editor = T.editor[this.diffEditor ? "createDiffEditor" : "create"](this.$el, { value: e, language: t, theme: n, ...r }), this.diffEditor && this._setModel(this.value, this.original); const o = this._getEditor(); o && o.onDidChangeModelContent((s) => { const i = o.getValue(); this.value !== i && (this.$emit("change", i, s), this.$emit("update:value", i)); }), this.$emit("editorDidMount", this.editor); }, _setModel(e, t) { const { language: n } = this, r = T.editor.createModel(t, n), o = T.editor.createModel(e, n); this.editor.setModel({ original: r, modified: o }); }, _setValue(e) { let t = this._getEditor(); if (t) return t.setValue(e); }, _getValue() { let e = this._getEditor(); return e ? e.getValue() : ""; }, _getEditor() { return this.editor ? this.diffEditor ? this.editor.modifiedEditor : this.editor : null; }, _setOriginal() { const { original: e } = this.editor.getModel(); e.setValue(this.original); } }, watch: { options: { deep: !0, handler(e) { this.editor.updateOptions(e); } }, value() { this.value !== this._getValue() && this._setValue(this.value); }, original() { this._setOriginal(); }, language() { if (!!this.editor) if (this.diffEditor) { const { original: e, modified: t } = this.editor.getModel(); T.editor.setModelLanguage(e, this.language), T.editor.setModelLanguage(t, this.language); } else T.editor.setModelLanguage(this.editor.getModel(), this.language); }, theme() { T.editor.setTheme(this.theme); } } }); function Zr(e, t, n, r, o, s) { return Mr(), Cr("div", { class: "monaco-editor-vue3", style: ve(e.style) }, null, 4); } const De = /* @__PURE__ */ Yr(Xr, [["render", Zr]]); De.install = (e) => { e.component(De.name, De); }; export { De as default };