UNPKG

@divkitframework/visual-editor

Version:
2,066 lines 2.11 MB
var EV = Object.defineProperty; var zV = (t, e, n) => e in t ? EV(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var tn = (t, e, n) => (zV(t, typeof e != "symbol" ? e + "" : e, n), n), Dd = (t, e, n) => { if (!e.has(t)) throw TypeError("Cannot " + n); }; var Gi = (t, e, n) => (Dd(t, e, "read from private field"), n ? n.call(t) : e.get(t)), cr = (t, e, n) => { if (e.has(t)) throw TypeError("Cannot add the same private member more than once"); e instanceof WeakSet ? e.add(t) : e.set(t, n); }, fl = (t, e, n, i) => (Dd(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n); var ia = (t, e, n, i) => ({ set _(o) { fl(t, e, o, n); }, get _() { return Gi(t, e, i); } }), Ap = (t, e, n) => (Dd(t, e, "access private method"), n); function dn() { } const Hu = (t) => t; function Ns(t, e) { for (const n in e) t[n] = e[n]; return ( /** @type {T & S} */ t ); } function M1(t) { return t(); } function Op() { return /* @__PURE__ */ Object.create(null); } function Un(t) { t.forEach(M1); } function er(t) { return typeof t == "function"; } function xt(t, e) { return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function"; } let Ra; function Tc(t, e) { return t === e ? !0 : (Ra || (Ra = document.createElement("a")), Ra.href = e, t === Ra.href); } function cd(t, e) { return t != t ? e == e : t !== e; } function AV(t) { return Object.keys(t).length === 0; } function Ju(t, ...e) { if (t == null) { for (const i of e) i(void 0); return dn; } const n = t.subscribe(...e); return n.unsubscribe ? () => n.unsubscribe() : n; } function $n(t) { let e; return Ju(t, (n) => e = n)(), e; } function Ie(t, e, n) { t.$$.on_destroy.push(Ju(e, n)); } function Xs(t, e, n, i) { if (t) { const o = P1(t, e, n, i); return t[0](o); } } function P1(t, e, n, i) { return t[1] && i ? Ns(n.ctx.slice(), t[1](i(e))) : n.ctx; } function xs(t, e, n, i) { if (t[2] && i) { const o = t[2](i(n)); if (e.dirty === void 0) return o; if (typeof o == "object") { const r = [], s = Math.max(e.dirty.length, o.length); for (let l = 0; l < s; l += 1) r[l] = e.dirty[l] | o[l]; return r; } return e.dirty | o; } return e.dirty; } function Qs(t, e, n, i, o, r) { if (o) { const s = P1(e, n, i, r); t.p(s, o); } } function el(t) { if (t.ctx.length > 32) { const e = [], n = t.ctx.length / 32; for (let i = 0; i < n; i++) e[i] = -1; return e; } return -1; } function Ai(t, e, n) { return t.set(n), e; } function I1(t) { return t && er(t.destroy) ? t.destroy : dn; } function Mp(t) { const e = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); return e ? [parseFloat(e[1]), e[2] || "px"] : [ /** @type {number} */ t, "px" ]; } const OV = ["", !0, 1, "true", "contenteditable"], D1 = typeof window < "u"; let L1 = D1 ? () => window.performance.now() : () => Date.now(), Uu = D1 ? (t) => requestAnimationFrame(t) : dn; const Cl = /* @__PURE__ */ new Set(); function V1(t) { Cl.forEach((e) => { e.c(t) || (Cl.delete(e), e.f()); }), Cl.size !== 0 && Uu(V1); } function F1(t) { let e; return Cl.size === 0 && Uu(V1), { promise: new Promise((n) => { Cl.add(e = { c: t, f: n }); }), abort() { Cl.delete(e); } }; } const Va = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : ( // @ts-ignore Node typings have this global ); function $(t, e) { t.appendChild(e); } function N1(t) { if (!t) return document; const e = t.getRootNode ? t.getRootNode() : t.ownerDocument; return e && /** @type {ShadowRoot} */ e.host ? ( /** @type {ShadowRoot} */ e ) : t.ownerDocument; } function MV(t) { const e = S("style"); return e.textContent = "/* empty */", PV(N1(t), e), e.sheet; } function PV(t, e) { return $( /** @type {Document} */ t.head || t, e ), e.sheet; } function R(t, e, n) { t.insertBefore(e, n || null); } function N(t) { t.parentNode && t.parentNode.removeChild(t); } function Ri(t, e) { for (let n = 0; n < t.length; n += 1) t[n] && t[n].d(e); } function S(t) { return document.createElement(t); } function Ur(t) { return document.createElementNS("http://www.w3.org/2000/svg", t); } function nt(t) { return document.createTextNode(t); } function G() { return nt(" "); } function Vn() { return nt(""); } function ae(t, e, n, i) { return t.addEventListener(e, n, i), () => t.removeEventListener(e, n, i); } function Ci(t) { return function(e) { return e.preventDefault(), t.call(this, e); }; } function zo(t) { return function(e) { return e.stopPropagation(), t.call(this, e); }; } function h(t, e, n) { n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n); } const IV = ["width", "height"]; function Il(t, e) { const n = Object.getOwnPropertyDescriptors(t.__proto__); for (const i in e) e[i] == null ? t.removeAttribute(i) : i === "style" ? t.style.cssText = e[i] : i === "__value" ? t.value = t[i] = e[i] : n[i] && n[i].set && IV.indexOf(i) === -1 ? t[i] = e[i] : h(t, i, e[i]); } function DV(t, e) { Object.keys(e).forEach((n) => { LV(t, n, e[n]); }); } function LV(t, e, n) { const i = e.toLowerCase(); i in t ? t[i] = typeof t[i] == "boolean" && n === "" ? !0 : n : e in t ? t[e] = typeof t[e] == "boolean" && n === "" ? !0 : n : h(t, e, n); } function Ec(t) { return /-/.test(t) ? DV : Il; } function q1(t) { let e; return { /* push */ p(...n) { e = n, e.forEach((i) => t.push(i)); }, /* remove */ r() { e.forEach((n) => t.splice(t.indexOf(n), 1)); } }; } function Hi(t) { return t === "" ? null : +t; } function VV(t) { return Array.from(t.childNodes); } function ft(t, e) { e = "" + e, t.data !== e && (t.data = /** @type {string} */ e); } function R1(t, e) { e = "" + e, t.wholeText !== e && (t.data = /** @type {string} */ e); } function FV(t, e, n) { ~OV.indexOf(n) ? R1(t, e) : ft(t, e); } function Zn(t, e) { t.value = e ?? ""; } function Te(t, e, n, i) { n == null ? t.style.removeProperty(e) : t.style.setProperty(e, n, ""); } function zc(t, e, n) { for (let i = 0; i < t.options.length; i += 1) { const o = t.options[i]; if (o.__value === e) { o.selected = !0; return; } } (!n || e !== void 0) && (t.selectedIndex = -1); } function B1(t) { const e = t.querySelector(":checked"); return e && e.__value; } let Ba; function NV() { if (Ba === void 0) { Ba = !1; try { typeof window < "u" && window.parent && window.parent.document; } catch { Ba = !0; } } return Ba; } function Wu(t, e) { getComputedStyle(t).position === "static" && (t.style.position = "relative"); const i = S("iframe"); i.setAttribute( "style", "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;" ), i.setAttribute("aria-hidden", "true"), i.tabIndex = -1; const o = NV(); let r; return o ? (i.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", r = ae( window, "message", /** @param {MessageEvent} event */ (s) => { s.source === i.contentWindow && e(); } )) : (i.src = "about:blank", i.onload = () => { r = ae(i.contentWindow, "resize", e), e(); }), $(t, i), () => { (o || r && i.contentWindow) && r(), N(i); }; } function le(t, e, n) { t.classList.toggle(e, !!n); } function H1(t, e, { bubbles: n = !1, cancelable: i = !1 } = {}) { return new CustomEvent(t, { detail: e, bubbles: n, cancelable: i }); } class Zu { constructor(e = !1) { /** * @private * @default false */ tn(this, "is_svg", !1); /** parent for creating node */ tn(this, "e"); /** html tag nodes */ tn(this, "n"); /** target */ tn(this, "t"); /** anchor */ tn(this, "a"); this.is_svg = e, this.e = this.n = null; } /** * @param {string} html * @returns {void} */ c(e) { this.h(e); } /** * @param {string} html * @param {HTMLElement | SVGElement} target * @param {HTMLElement | SVGElement} anchor * @returns {void} */ m(e, n, i = null) { this.e || (this.is_svg ? this.e = Ur( /** @type {keyof SVGElementTagNameMap} */ n.nodeName ) : this.e = S( /** @type {keyof HTMLElementTagNameMap} */ n.nodeType === 11 ? "TEMPLATE" : n.nodeName ), this.t = n.tagName !== "TEMPLATE" ? n : ( /** @type {HTMLTemplateElement} */ n.content ), this.c(e)), this.i(i); } /** * @param {string} html * @returns {void} */ h(e) { this.e.innerHTML = e, this.n = Array.from( this.e.nodeName === "TEMPLATE" ? this.e.content.childNodes : this.e.childNodes ); } /** * @returns {void} */ i(e) { for (let n = 0; n < this.n.length; n += 1) R(this.t, this.n[n], e); } /** * @param {string} html * @returns {void} */ p(e) { this.d(), this.h(e), this.i(this.a); } /** * @returns {void} */ d() { this.n.forEach(N); } } function Dl(t, e) { return new t(e); } const Ac = /* @__PURE__ */ new Map(); let Oc = 0; function qV(t) { let e = 5381, n = t.length; for (; n--; ) e = (e << 5) - e ^ t.charCodeAt(n); return e >>> 0; } function RV(t, e) { const n = { stylesheet: MV(e), rules: {} }; return Ac.set(t, n), n; } function du(t, e, n, i, o, r, s, l = 0) { const a = 16.666 / i; let c = `{ `; for (let g = 0; g <= 1; g += a) { const v = e + (n - e) * r(g); c += g * 100 + `%{${s(v, 1 - v)}} `; } const d = c + `100% {${s(n, 1 - n)}} }`, u = `__svelte_${qV(d)}_${l}`, p = N1(t), { stylesheet: _, rules: f } = Ac.get(p) || RV(p, t); f[u] || (f[u] = !0, _.insertRule(`@keyframes ${u} ${d}`, _.cssRules.length)); const m = t.style.animation || ""; return t.style.animation = `${m ? `${m}, ` : ""}${u} ${i}ms linear ${o}ms 1 both`, Oc += 1, u; } function J1(t, e) { const n = (t.style.animation || "").split(", "), i = n.filter( e ? (r) => r.indexOf(e) < 0 : (r) => r.indexOf("__svelte") === -1 // remove all Svelte animations ), o = n.length - i.length; o && (t.style.animation = i.join(", "), Oc -= o, Oc || BV()); } function BV() { Uu(() => { Oc || (Ac.forEach((t) => { const { ownerNode: e } = t.stylesheet; e && N(e); }), Ac.clear()); }); } function HV(t, e, n, i) { if (!e) return dn; const o = t.getBoundingClientRect(); if (e.left === o.left && e.right === o.right && e.top === o.top && e.bottom === o.bottom) return dn; const { delay: r = 0, duration: s = 300, easing: l = Hu, // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation? start: a = L1() + r, // @ts-ignore todo: end: c = a + s, tick: d = dn, css: u } = n(t, { from: e, to: o }, i); let p = !0, _ = !1, f; function m() { u && (f = du(t, 0, 1, s, r, l, u)), r || (_ = !0); } function g() { u && J1(t, f), p = !1; } return F1((v) => { if (!_ && v >= a && (_ = !0), _ && v >= c && (d(1, 0), g()), !p) return !1; if (_) { const w = v - a, b = 0 + 1 * l(w / s); d(b, 1 - b); } return !0; }), m(), d(0, 1), g; } function JV(t) { const e = getComputedStyle(t); if (e.position !== "absolute" && e.position !== "fixed") { const { width: n, height: i } = e, o = t.getBoundingClientRect(); t.style.position = "absolute", t.style.width = n, t.style.height = i, U1(t, o); } } function U1(t, e) { const n = t.getBoundingClientRect(); if (e.left !== n.left || e.top !== n.top) { const i = getComputedStyle(t), o = i.transform === "none" ? "" : i.transform; t.style.transform = `${o} translate(${e.left - n.left}px, ${e.top - n.top}px)`; } } let ha; function ua(t) { ha = t; } function Hl() { if (!ha) throw new Error("Function called outside component initialization"); return ha; } function dd(t) { Hl().$$.on_mount.push(t); } function js(t) { Hl().$$.after_update.push(t); } function tl(t) { Hl().$$.on_destroy.push(t); } function gi() { const t = Hl(); return (e, n, { cancelable: i = !1 } = {}) => { const o = t.$$.callbacks[e]; if (o) { const r = H1( /** @type {string} */ e, n, { cancelable: i } ); return o.slice().forEach((s) => { s.call(t, r); }), !r.defaultPrevented; } return !0; }; } function Mc(t, e) { return Hl().$$.context.set(t, e), e; } function Ct(t) { return Hl().$$.context.get(t); } function kn(t, e) { const n = t.$$.callbacks[e.type]; n && n.slice().forEach((i) => i.call(this, e)); } const yl = [], gt = []; let Tl = []; const uu = [], W1 = /* @__PURE__ */ Promise.resolve(); let pu = !1; function Z1() { pu || (pu = !0, W1.then(Y1)); } function zr() { return Z1(), W1; } function fo(t) { Tl.push(t); } function Qn(t) { uu.push(t); } const Ld = /* @__PURE__ */ new Set(); let ml = 0; function Y1() { if (ml !== 0) return; const t = ha; do { try { for (; ml < yl.length; ) { const e = yl[ml]; ml++, ua(e), UV(e.$$); } } catch (e) { throw yl.length = 0, ml = 0, e; } for (ua(null), yl.length = 0, ml = 0; gt.length; ) gt.pop()(); for (let e = 0; e < Tl.length; e += 1) { const n = Tl[e]; Ld.has(n) || (Ld.add(n), n()); } Tl.length = 0; } while (yl.length); for (; uu.length; ) uu.pop()(); pu = !1, Ld.clear(), ua(t); } function UV(t) { if (t.fragment !== null) { t.update(), Un(t.before_update); const e = t.dirty; t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(fo); } } function WV(t) { const e = [], n = []; Tl.forEach((i) => t.indexOf(i) === -1 ? e.push(i) : n.push(i)), n.forEach((i) => i()), Tl = e; } let oa; function ZV() { return oa || (oa = Promise.resolve(), oa.then(() => { oa = null; })), oa; } function Vd(t, e, n) { t.dispatchEvent(H1(`${e ? "intro" : "outro"}${n}`)); } const rc = /* @__PURE__ */ new Set(); let ds; function Yt() { ds = { r: 0, c: [], p: ds // parent group }; } function Kt() { ds.r || Un(ds.c), ds = ds.p; } function L(t, e) { t && t.i && (rc.delete(t), t.i(e)); } function H(t, e, n, i) { if (t && t.o) { if (rc.has(t)) return; rc.add(t), ds.c.push(() => { rc.delete(t), i && (n && t.d(1), i()); }), t.o(e); } else i && i(); } const YV = { duration: 0 }; function Xi(t, e, n, i) { let r = e(t, n, { direction: "both" }), s = i ? 0 : 1, l = null, a = null, c = null, d; function u() { c && J1(t, c); } function p(f, m) { const g = ( /** @type {Program['d']} */ f.b - s ); return m *= Math.abs(g), { a: s, b: f.b, d: g, duration: m, start: f.start, end: f.start + m, group: f.group }; } function _(f) { const { delay: m = 0, duration: g = 300, easing: v = Hu, tick: w = dn, css: b } = r || YV, y = { start: L1() + m, b: f }; f || (y.group = ds, ds.r += 1), "inert" in t && (f ? d !== void 0 && (t.inert = d) : (d = /** @type {HTMLElement} */ t.inert, t.inert = !0)), l || a ? a = y : (b && (u(), c = du(t, s, f, g, m, v, b)), f && w(0, 1), l = p(y, g), fo(() => Vd(t, f, "start")), F1((j) => { if (a && j > a.start && (l = p(a, g), a = null, Vd(t, l.b, "start"), b && (u(), c = du( t, s, l.b, l.duration, 0, v, r.css ))), l) { if (j >= l.end) w(s = l.b, 1 - s), Vd(t, l.b, "end"), a || (l.b ? u() : --l.group.r || Un(l.group.c)), l = null; else if (j >= l.start) { const P = j - l.start; s = l.a + l.d * v(P / l.duration), w(s, 1 - s); } } return !!(l || a); })); } return { run(f) { er(r) ? ZV().then(() => { r = r({ direction: f ? "in" : "out" }), _(f); }) : _(f); }, end() { u(), l = a = null; } }; } function hn(t) { return (t == null ? void 0 : t.length) !== void 0 ? t : Array.from(t); } function KV(t, e) { t.d(1), e.delete(t.key); } function Jl(t, e) { H(t, 1, 1, () => { e.delete(t.key); }); } function GV(t, e) { t.f(), Jl(t, e); } function nl(t, e, n, i, o, r, s, l, a, c, d, u) { let p = t.length, _ = r.length, f = p; const m = {}; for (; f--; ) m[t[f].key] = f; const g = [], v = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), b = []; for (f = _; f--; ) { const C = u(o, r, f), k = n(C); let O = s.get(k); O ? b.push(() => O.p(C, e)) : (O = c(k, C), O.c()), v.set(k, g[f] = O), k in m && w.set(k, Math.abs(f - m[k])); } const y = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set(); function P(C) { L(C, 1), C.m(l, d), s.set(C.key, C), d = C.first, _--; } for (; p && _; ) { const C = g[_ - 1], k = t[p - 1], O = C.key, A = k.key; C === k ? (d = C.first, p--, _--) : v.has(A) ? !s.has(O) || y.has(O) ? P(C) : j.has(A) ? p-- : w.get(O) > w.get(A) ? (j.add(O), P(C)) : (y.add(A), p--) : (a(k, s), p--); } for (; p--; ) { const C = t[p]; v.has(C.key) || a(C, s); } for (; _; ) P(g[_ - 1]); return Un(b), g; } function va(t, e) { const n = {}, i = {}, o = { $$scope: 1 }; let r = t.length; for (; r--; ) { const s = t[r], l = e[r]; if (l) { for (const a in s) a in l || (i[a] = 1); for (const a in l) o[a] || (n[a] = l[a], o[a] = 1); t[r] = l; } else for (const a in s) o[a] = 1; } for (const s in i) s in n || (n[s] = void 0); return n; } function Pp(t) { return typeof t == "object" && t !== null ? t : {}; } function Gn(t, e, n) { const i = t.$$.props[e]; i !== void 0 && (t.$$.bound[i] = n, n(t.$$.ctx[i])); } function Pe(t) { t && t.c(); } function Ae(t, e, n) { const { fragment: i, after_update: o } = t.$$; i && i.m(e, n), fo(() => { const r = t.$$.on_mount.map(M1).filter(er); t.$$.on_destroy ? t.$$.on_destroy.push(...r) : Un(r), t.$$.on_mount = []; }), o.forEach(fo); } function Oe(t, e) { const n = t.$$; n.fragment !== null && (WV(n.after_update), Un(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []); } function XV(t, e) { t.$$.dirty[0] === -1 && (yl.push(t), Z1(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31; } function rn(t, e, n, i, o, r, s = null, l = [-1]) { const a = ha; ua(t); const c = t.$$ = { fragment: null, ctx: [], // state props: r, update: dn, not_equal: o, bound: Op(), // lifecycle on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(e.context || (a ? a.$$.context : [])), // everything else callbacks: Op(), dirty: l, skip_bound: !1, root: e.target || a.$$.root }; s && s(c.root); let d = !1; if (c.ctx = n ? n(t, e.props || {}, (u, p, ..._) => { const f = _.length ? _[0] : p; return c.ctx && o(c.ctx[u], c.ctx[u] = f) && (!c.skip_bound && c.bound[u] && c.bound[u](f), d && XV(t, u)), p; }) : [], c.update(), d = !0, Un(c.before_update), c.fragment = i ? i(c.ctx) : !1, e.target) { if (e.hydrate) { const u = VV(e.target); c.fragment && c.fragment.l(u), u.forEach(N); } else c.fragment && c.fragment.c(); e.intro && L(t.$$.fragment), Ae(t, e.target, e.anchor), Y1(); } ua(a); } class sn { constructor() { /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ tn(this, "$$"); /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ tn(this, "$$set"); } /** @returns {void} */ $destroy() { Oe(this, 1), this.$destroy = dn; } /** * @template {Extract<keyof Events, string>} K * @param {K} type * @param {((e: Events[K]) => void) | null | undefined} callback * @returns {() => void} */ $on(e, n) { if (!er(n)) return dn; const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); return i.push(n), () => { const o = i.indexOf(n); o !== -1 && i.splice(o, 1); }; } /** * @param {Partial<Props>} props * @returns {void} */ $set(e) { this.$$set && !AV(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1); } } const xV = "4", gl = []; function QV(t, e) { return { subscribe: $i(t, e).subscribe }; } function $i(t, e = dn) { let n; const i = /* @__PURE__ */ new Set(); function o(l) { if (xt(t, l) && (t = l, n)) { const a = !gl.length; for (const c of i) c[1](), gl.push(c, t); if (a) { for (let c = 0; c < gl.length; c += 2) gl[c][0](gl[c + 1]); gl.length = 0; } } } function r(l) { o(l(t)); } function s(l, a = dn) { const c = [l, a]; return i.add(c), i.size === 1 && (n = e(o, r) || dn), l(t), () => { i.delete(c), i.size === 0 && n && (n(), n = null); }; } return { set: o, update: r, subscribe: s }; } function os(t, e, n) { const i = !Array.isArray(t), o = i ? [t] : t; if (!o.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); const r = e.length < 2; return QV(n, (s, l) => { let a = !1; const c = []; let d = 0, u = dn; const p = () => { if (d) return; u(); const f = e(i ? c[0] : c, s, l); r ? s(f) : u = er(f) ? f : dn; }, _ = o.map( (f, m) => Ju( f, (g) => { c[m] = g, d &= ~(1 << m), a && p(); }, () => { d |= 1 << m; } ) ); return a = !0, p(), function() { Un(_), u(), a = !1; }; }); } typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xV); function Ip(t, e, n) { const i = t.slice(); return i[7] = e[n], i[8] = e, i[9] = n, i; } function Dp(t) { let e, n, i; function o(...r) { return ( /*pointerdown_handler*/ t[5]( /*index*/ t[9], ...r ) ); } return { c() { e = S("div"), h(e, "class", "split-view__splitter svelte-1rid2da"); }, m(r, s) { R(r, e, s), n || (i = [ ae(e, "pointerdown", Ci(o)), ae(e, "dblclick", Ci( /*onDoubleClick*/ t[4] )) ], n = !0); }, p(r, s) { t = r; }, d(r) { r && N(e), n = !1, Un(i); } }; } function Lp(t, e) { let n, i, o, r, s, l = ( /*index*/ e[9] ), a, c = ( /*index*/ e[9] > 0 && Dp(e) ); const d = [ /*item*/ e[7].props ]; var u = ( /*item*/ e[7].component ); function p(m, g) { let v = {}; for (let w = 0; w < d.length; w += 1) v = Ns(v, d[w]); return g !== void 0 && g & /*components*/ 1 && (v = Ns(v, va(d, [Pp( /*item*/ m[7].props )]))), { props: v }; } u && (r = Dl(u, p(e))); const _ = () => ( /*div_binding*/ e[6](o, l) ), f = () => ( /*div_binding*/ e[6](null, l) ); return { key: t, first: null, c() { n = Vn(), c && c.c(), i = G(), o = S("div"), r && Pe(r.$$.fragment), s = G(), h(o, "class", "split-view__part svelte-1rid2da"), Te( o, "--grow", /*item*/ e[7].weight ), Te( o, "min-width", /*orientation*/ e[1] === "horizontal" ? `${/*item*/ e[7].minSize || kl}px` : void 0 ), Te( o, "min-height", /*orientation*/ e[1] === "vertical" ? `${/*item*/ e[7].minSize || kl}px` : void 0 ), this.first = n; }, m(m, g) { R(m, n, g), c && c.m(m, g), R(m, i, g), R(m, o, g), r && Ae(r, o, null), $(o, s), _(), a = !0; }, p(m, g) { if (e = m, /*index*/ e[9] > 0 ? c ? c.p(e, g) : (c = Dp(e), c.c(), c.m(i.parentNode, i)) : c && (c.d(1), c = null), g & /*components*/ 1 && u !== (u = /*item*/ e[7].component)) { if (r) { Yt(); const v = r; H(v.$$.fragment, 1, 0, () => { Oe(v, 1); }), Kt(); } u ? (r = Dl(u, p(e, g)), Pe(r.$$.fragment), L(r.$$.fragment, 1), Ae(r, o, s)) : r = null; } else if (u) { const v = g & /*components*/ 1 ? va(d, [Pp( /*item*/ e[7].props )]) : {}; r.$set(v); } l !== /*index*/ e[9] && (f(), l = /*index*/ e[9], _()), g & /*components*/ 1 && Te( o, "--grow", /*item*/ e[7].weight ), g & /*orientation, components*/ 3 && Te( o, "min-width", /*orientation*/ e[1] === "horizontal" ? `${/*item*/ e[7].minSize || kl}px` : void 0 ), g & /*orientation, components*/ 3 && Te( o, "min-height", /*orientation*/ e[1] === "vertical" ? `${/*item*/ e[7].minSize || kl}px` : void 0 ); }, i(m) { a || (r && L(r.$$.fragment, m), a = !0); }, o(m) { r && H(r.$$.fragment, m), a = !1; }, d(m) { m && (N(n), N(i), N(o)), c && c.d(m), r && Oe(r), f(); } }; } function eF(t) { let e, n = [], i = /* @__PURE__ */ new Map(), o, r = hn( /*components*/ t[0] ); const s = (l) => ( /*item*/ l[7].key || /*index*/ l[9] ); for (let l = 0; l < r.length; l += 1) { let a = Ip(t, r, l), c = s(a); i.set(c, n[l] = Lp(c, a)); } return { c() { e = S("div"); for (let l = 0; l < n.length; l += 1) n[l].c(); h(e, "class", "split-view svelte-1rid2da"), le( e, "split-view_vertical", /*orientation*/ t[1] === "vertical" ); }, m(l, a) { R(l, e, a); for (let c = 0; c < n.length; c += 1) n[c] && n[c].m(e, null); o = !0; }, p(l, [a]) { a & /*parts, components, orientation, MIN_SIZE, undefined, onPointerdown, onDoubleClick*/ 31 && (r = hn( /*components*/ l[0] ), Yt(), n = nl(n, a, s, 1, l, r, i, e, Jl, Lp, null, Ip), Kt()), (!o || a & /*orientation*/ 2) && le( e, "split-view_vertical", /*orientation*/ l[1] === "vertical" ); }, i(l) { if (!o) { for (let a = 0; a < r.length; a += 1) L(n[a]); o = !0; } }, o(l) { for (let a = 0; a < n.length; a += 1) H(n[a]); o = !1; }, d(l) { l && N(e); for (let a = 0; a < n.length; a += 1) n[a].d(); } }; } const kl = 300; function tF(t, e, n) { let { components: i } = e, { orientation: o = "horizontal" } = e, r = []; function s(d, u) { if (d.button !== 0) return; const p = o === "horizontal" ? "pageX" : "pageY", _ = o === "horizontal" ? "offsetWidth" : "offsetHeight", f = d[p], m = r.map((y) => y[_]), g = i[u].minSize ?? kl, v = i[u + 1].minSize ?? kl, w = (y) => { y.preventDefault(); let j = y[p] - f; m[u] + j < g && (j = g - m[u]), m[u + 1] - j < v && (j = m[u + 1] - v), r.forEach((P, C) => { let k; C === u ? k = m[C] + j : C === u + 1 && (k = m[C] - j), k ? P.style.flexBasis = `${k}px` : P.style.flexBasis = `${m[C]}px`; }); }, b = () => { window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", b), window.removeEventListener("pointercancel", b); }; window.addEventListener("pointermove", w), window.addEventListener("pointerup", b), window.addEventListener("pointercancel", b); } function l() { r.forEach((d) => { d.style.flexBasis = ""; }); } const a = (d, u) => s(u, d - 1); function c(d, u) { gt[d ? "unshift" : "push"](() => { r[u] = d, n(2, r); }); } return t.$$set = (d) => { "components" in d && n(0, i = d.components), "orientation" in d && n(1, o = d.orientation); }, [ i, o, r, s, l, a, c ]; } class K1 extends sn { constructor(e) { super(), rn(this, e, tF, eF, xt, { components: 0, orientation: 1 }); } } const oi = Symbol("language"); function Yu(t) { const e = t - 1; return e * e * e + 1; } function Vp(t, { delay: e = 0, duration: n = 400, easing: i = Hu } = {}) { const o = +getComputedStyle(t).opacity; return { delay: e, duration: n, easing: i, css: (r) => `opacity: ${r * o}` }; } function kr(t, { delay: e = 0, duration: n = 400, easing: i = Yu, x: o = 0, y: r = 0, opacity: s = 0 } = {}) { const l = getComputedStyle(t), a = +l.opacity, c = l.transform === "none" ? "" : l.transform, d = a * (1 - s), [u, p] = Mp(o), [_, f] = Mp(r); return { delay: e, duration: n, easing: i, css: (m, g) => ` transform: ${c} translate(${(1 - m) * u}${p}, ${(1 - m) * _}${f}); opacity: ${a - d * g}` }; } function tr(t, { delay: e = 0, duration: n = 400, easing: i = Yu, axis: o = "y" } = {}) { const r = getComputedStyle(t), s = +r.opacity, l = o === "y" ? "height" : "width", a = parseFloat(r[l]), c = o === "y" ? ["top", "bottom"] : ["left", "right"], d = c.map( (v) => `${v[0].toUpperCase()}${v.slice(1)}` ), u = parseFloat(r[`padding${d[0]}`]), p = parseFloat(r[`padding${d[1]}`]), _ = parseFloat(r[`margin${d[0]}`]), f = parseFloat(r[`margin${d[1]}`]), m = parseFloat( r[`border${d[0]}Width`] ), g = parseFloat( r[`border${d[1]}Width`] ); return { delay: e, duration: n, easing: i, css: (v) => `overflow: hidden;opacity: ${Math.min(v * 20, 1) * s};${l}: ${v * a}px;padding-${c[0]}: ${v * u}px;padding-${c[1]}: ${v * p}px;margin-${c[0]}: ${v * _}px;margin-${c[1]}: ${v * f}px;border-${c[0]}-width: ${v * m}px;border-${c[1]}-width: ${v * g}px;` }; } const _u = /* @__PURE__ */ new Set(); function nF(t) { if (t.defaultPrevented) return; const e = []; for (const { shortcut: n, handler: i, prio: o } of _u) n.isPressed(t) && e.push({ handler: i, prio: o }); e.sort((n, i) => { if (n.prio) { if (!i.prio) return -1; } else return 1; return i.prio - n.prio; }), e.length && setTimeout(() => { }); for (let n = 0; n < e.length; ++n) { const { handler: i } = e[n]; if (i(t) !== !1) { t.preventDefault(); break; } } } function iF(t, e, n) { const i = { shortcut: t, handler: e, prio: n }; return _u.add(i), { unbind: () => { _u.delete(i); } }; } function G1(t, e) { const n = e.map((i) => iF(i[0], (o) => { const r = !!t.closest("dialog"), s = !!document.querySelector("dialog"); if (r === s) i[1](o); else return !1; }, i[2]).unbind); return { destroy() { for (const i of n) i(); } }; } function Ll(t) { return t.charAt(0).toUpperCase() + t.substring(1); } const Fp = /Mac OS/i.test(navigator.userAgent), rs = { SHIFT: { val: 4, field: "shiftKey", str: "⇧" }, CTRL: { val: 1, field: "ctrlKey", str: "⌃" }, ALT: { val: 2, field: "altKey", str: "⌥" }, CMD: { val: 8, field: "metaKey", str: "⌘" } }, Pc = { BACKSPACE: 8, TAB: 9, ENTER: 13, ESC: 27, SPACE: 32, HOME: 36, END: 35, PAGEUP: 33, PAGEDOWN: 34, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46, A: 65, B: 66, C: 67, D: 68, E: 69, F: 70, G: 71, H: 72, I: 73, J: 74, K: 75, L: 76, M: 77, N: 78, O: 79, P: 80, S: 83, T: 84, U: 85, V: 86, X: 88, Y: 89, Z: 90, 1: 49, 2: 50, 3: 51, "/": 191 }, oF = Object.keys(Pc).reduce((t, e) => (t[Pc[e]] = e, t), {}), ws = class ws { constructor(e) { tn(this, "_parts"); tn(this, "_strParts"); tn(this, "_str"); e.includes(ws.MAC_SPLITTER) && (e = e.split(ws.MAC_SPLITTER)[Fp ? 1 : 0].trim()), this._parts = [], this._strParts = []; for (const n of e.split(ws.SEVERAL_SPLITTER)) { const i = n.trim(); this._parts.push(this._parse(i)), this._strParts.push(i.split("+")); } Fp ? this._str = this._genMacStr() : this._str = e; } _parse(e) { const n = e.split("+"); let i = 0, o; for (const r of n) { const s = r.toUpperCase(); if (!(s in rs) && !(s in Pc)) throw new Error(`Unknown key ${e}`); s in rs ? i += rs[s].val : o = Pc[s]; } if (!o) throw new Error(`Incorrect shortcut ${e}`); return { which: o, modifiers: i }; } _genMacStr() { return this._parts.map((e) => { let n = ""; const i = e.modifiers; for (const o in rs) i & rs[o].val && (n += rs[o].str); return n += Ll(oF[e.which].toLowerCase()), n; }).join(ws.SEVERAL_SPLITTER); } toString() { return this._str; } isPressed(e) { for (const n of this._parts) { if (e.which !== n.which) continue; let i = 0; for (const o in rs) e[rs[o].field] && (i += rs[o].val); if (i === n.modifiers) return !0; } return !1; } getList() { return this._strParts; } }; tn(ws, "MAC_SPLITTER", ":"), tn(ws, "SEVERAL_SPLITTER", " / "); let mi = ws; const X1 = new mi("Esc"), Ku = new mi("Esc"), Gu = new mi("Enter"), rF = new mi("Ctrl+Enter : Cmd+Enter"), Np = new mi("Up"), sF = new mi("Down"), lF = new mi("Left"), aF = new mi("Right"), cF = new mi("Up"), dF = new mi("Down"), uF = new mi("Left"), pF = new mi("Right"), qp = new mi("Shift+Up"), Rp = new mi("Shift+Down"), Bp = new mi("Shift+Left"), Hp = new mi("Shift+Right"), _F = new mi("Ctrl+Up"), fF = new mi("Ctrl+Down"), mF = new mi("Ctrl+Left"), gF = new mi("Ctrl+Right"), Jp = new mi("Ctrl+Shift+Up"), Up = new mi("Ctrl+Shift+Down"), Wp = new mi("Ctrl+Shift+Left"), Zp = new mi("Ctrl+Shift+Right"), x1 = new mi("Delete / Backspace"), Q1 = new mi("Ctrl+Z : Cmd+Z"), e2 = new mi("Ctrl+Y / Ctrl+Shift+Z : Cmd+Y / Cmd+Shift+Z"), t2 = new mi("Ctrl+C : Cmd+C"), n2 = new mi("Ctrl+V : Cmd+V"), hF = new mi("Up"), vF = new mi("Down"), bF = new mi("Left"), yF = new mi("Right"), wF = new mi("Up"), $F = new mi("Down"), kF = new mi("Left"), jF = new mi("Right"), i2 = new mi("Up"), o2 = new mi("Down"), SF = new mi("Home"), CF = new mi("End"), TF = new mi("Delete / Backspace"), Pn = Symbol("app"); function uo(t) { return t.replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"); } function Yp(t) { let e, n = `url(${uo( /*item*/ t[0].icon )})`; return { c() { e = S("span"), h(e, "class", "menu-item__icon svelte-1o1lgms"), Te(e, "background-image", n); }, m(i, o) { R(i, e, o); }, p(i, o) { o & /*item*/ 1 && n !== (n = `url(${uo( /*item*/ i[0].icon )})`) && Te(e, "background-image", n); }, d(i) { i && N(e); } }; } function Kp(t) { let e; return { c() { e = S("span"), h(e, "class", "menu-item__submenu-icon svelte-1o1lgms"); }, m(n, i) { R(n, e, i); }, d(n) { n && N(e); } }; } function EF(t) { let e, n, i = ( /*item*/ t[0].text + "" ), o, r, s, l, a = ( /*item*/ t[0].icon && Yp(t) ), c = ( /*item*/ t[0].submenu && Kp() ); return { c() { e = S("li"), a && a.c(), n = G(), o = nt(i), r = G(), c && c.c(), h(e, "class", "menu-item svelte-1o1lgms"), le( e, "menu-item_icon", /*item*/ t[0].icon ), le( e, "menu-item_enabled", /*item*/ t[0].enabled !== !1 ), le( e, "menu-item_selected", /*selected*/ t[1] ); }, m(d, u) { R(d, e, u), a && a.m(e, null), $(e, n), $(e, o), $(e, r), c && c.m(e, null), t[5](e), s || (l = [ ae(e, "click", zo(Ci( /*click_handler*/ t[6] ))), ae(e, "mouseenter", function() { er( /*item*/ t[0].submenu ? ( /*mouseenter_handler*/ t[7] ) : null ) && /*item*/ (t[0].submenu ? ( /*mouseenter_handler*/ t[7] ) : null).apply(this, arguments); }), ae(e, "mouseleave", function() { er( /*item*/ t[0].submenu ? ( /*mouseleave_handler*/ t[8] ) : null ) && /*item*/ (t[0].submenu ? ( /*mouseleave_handler*/ t[8] ) : null).apply(this, arguments); }) ], s = !0); }, p(d, [u]) { t = d, /*item*/ t[0].icon ? a ? a.p(t, u) : (a = Yp(t), a.c(), a.m(e, n)) : a && (a.d(1), a = null), u & /*item*/ 1 && i !== (i = /*item*/ t[0].text + "") && ft(o, i), /*item*/ t[0].submenu ? c || (c = Kp(), c.c(), c.m(e, null)) : c && (c.d(1), c = null), u & /*item*/ 1 && le( e, "menu-item_icon", /*item*/ t[0].icon ), u & /*item*/ 1 && le( e, "menu-item_enabled", /*item*/ t[0].enabled !== !1 ), u & /*selected*/ 2 && le( e, "menu-item_selected", /*selected*/ t[1] ); }, i: dn, o: dn, d(d) { d && N(e), a && a.d(), c && c.d(), t[5](null), s = !1, Un(l); } }; } function zF(t, e, n) { let { item: i } = e, { selected: o = !1 } = e; const { contextMenu: r } = Ct(Pn); let s; const l = gi(); function a(p) { gt[p ? "unshift" : "push"](() => { s = p, n(2, s); }); } const c = () => { var p; i.enabled !== !1 && ((p = i.callback) == null ? void 0 : p.call(i)) !== !1 && r().hide(); }, d = () => { l("showsubmenu", { elem: s }); }, u = () => { l("hidesubmenu"); }; return t.$$set = (p) => { "item" in p && n(0, i = p.item), "selected" in p && n(1, o = p.selected); }, [ i, o, s, r, l, a, c, d, u ]; } class r2 extends sn { constructor(e) { super(), rn(this, e, zF, EF, xt, { item: 0, selected: 1 }); } } const { window: AF } = Va; function Gp(t, e, n) { const i = t.slice(); return i[27] = e[n], i; } function Xp(t, e, n) { const i = t.slice(); return i[27] = e[n], i; } function xp(t) { var p; let e, n, i, o, r, s, l, a = hn( /*currentProps*/ t[1].items ), c = []; for (let _ = 0; _ < a.length; _ += 1) c[_] = Qp(Xp(t, a, _)); const d = (_) => H(c[_], 1, 1, () => { c[_] = null; }); let u = ( /*submenu*/ ((p = t[5]) == null ? void 0 : p.submenu) && e_(t) ); return { c() { e = S("div"), n = S("ul"); for (let _ = 0; _ < c.length; _ += 1) c[_].c(); o = G(), u && u.c(), h(n, "class", "menu svelte-1306v9l"), Te( n, "left", /*popupStyle*/ t[2].left ), Te( n, "top", /*popupStyle*/ t[2].top ), Te( n, "width", /*popupStyle*/ t[2].width ), Te( n, "height", /*popupStyle*/ t[2].height ), h(e, "class", "menu-controller svelte-1306v9l"); }, m(_, f) { R(_, e, f), $(e, n); for (let m = 0; m < c.length; m += 1) c[m] && c[m].m(n, null); t[14](n), $(e, o), u && u.m(e, null), t[16](e), r = !0, s || (l = I1(G1.call( null, e, /*SHORTCUTS*/ t[12] )), s = !0); }, p(_, f) { var m; if (f[0] & /*currentProps, submenu, showSubmenu, hideSubmenu*/ 1570) { a = hn( /*currentProps*/ _[1].items ); let g; for (g = 0; g < a.length; g += 1) { const v = Xp(_, a, g); c[g] ? (c[g].p(v, f), L(c[g], 1)) : (c[g] = Qp(v), c[g].c(), L(c[g], 1), c[g].m(n, null)); } for (Yt(), g = a.length; g < c.length; g += 1) d(g); Kt(); } f[0] & /*popupStyle*/ 4 && Te( n, "left", /*popupStyle*/ _[2].left ), f[0] & /*popupStyle*/ 4 && Te( n, "top", /*popupStyle*/ _[2].top ), f[0] & /*popupStyle*/ 4 && Te( n, "width", /*popupStyle*/ _[2].width ), f[0] & /*popupStyle*/ 4 && Te( n, "height", /*popupStyle*/ _[2].height ), /*submenu*/ (m = _[5]) != null && m.submenu ? u ? (u.p(_, f), f[0] & /*submenu*/ 32 && L(u, 1)) : (u = e_(_), u.c(), L(u, 1), u.m(e, null)) : u && (Yt(), H(u, 1, 1, () => { u = null; }), Kt()); }, i(_) { if (!r) { for (let f = 0; f < a.length; f += 1) L(c[f]); _ && fo(() => { r && (i || (i = Xi(n, kr, { y: 10, duration: 150 }, !0)), i.run(1)); }), L(u), r = !0; } }, o(_) { c = c.filter(Boolean); for (let f = 0; f < c.length; f += 1) H(c[f]); _ && (i || (i = Xi(n, kr, { y: 10, duration: 150 }, !1)), i.run(0)), H(u), r = !1; }, d(_) { _ && N(e), Ri(c, _), t[14](null), _ && i && i.end(), u && u.d(), t[16](null), s = !1, l(); } }; } function Qp(t) { let e, n; function i(...o) { return ( /*showsubmenu_handler*/ t[13]( /*item*/ t[27], ...o ) ); } return e = new r2({ props: { item: ( /*item*/ t[27] ), selected: ( /*item*/ t[27] === /*submenu*/ t[5] ) } }), e.$on("showsubmenu", i), e.$on( "hidesubmenu", /*hideSubmenu*/ t[10] ), { c() { Pe(e.$$.fragment); }, m(o, r) { Ae(e, o, r), n = !0; }, p(o, r) { t = o; const s = {}; r[0] & /*currentProps*/ 2 && (s.item = /*item*/ t[27]), r[0] & /*currentProps, submenu*/ 34 && (s.selected = /*item*/ t[27] === /*submenu*/ t[5]), e.$set(s); }, i(o) { n || (L(e.$$.fragment, o), n = !0); }, o(o) { H(e.$$.fragment, o), n = !1; }, d(o) { Oe(e, o); } }; } function e_(t) { let e, n, i, o, r, s = hn( /*submenu*/ t[5].submenu ), l = []; for (let c = 0; c < s.length; c += 1) l[c] = t_(Gp(t, s, c)); const a = (c) => H(l[c], 1, 1, () => { l[c] = null; }); return { c() { e = S("ul"); for (let c = 0; c < l.length; c += 1) l[c].c(); h(e, "class", "menu menu_submenu svelte-1306v9l"), Te( e, "left", /*submenuStyle*/ t[6].left ), Te( e, "top", /*submenuStyle*/ t[6].top ), Te( e, "width", /*submenuStyle*/ t[6].width ), Te( e, "height", /*submenuStyle*/ t[6].height ); }, m(c, d) { R(c, e, d); for (let u = 0; u < l.length; u += 1) l[u] && l[u].m(e, null); t[15](e), i = !0, o || (r = [ ae( e, "mouseenter", /*mouseenterSubmenu*/ t[11] ), ae( e, "mouseleave", /*hideSubmenu*/ t[10] ) ], o = !0); }, p(c, d) { if (d[0] & /*submenu*/ 32) { s = hn( /*submenu*/ c[5].submenu ); let u; for (u = 0; u < s.length; u += 1) { const p = Gp(c, s, u); l[u] ? (l[u].p(p, d), L(l[u], 1)) : (l[u] = t_(p), l[u].c(), L(l[u], 1), l[u].m(e, null)); } for (Yt(), u = s.length; u < l.length; u += 1) a(u); Kt(); } d[0] & /*submenuStyle*/ 64 && Te( e, "left", /*submenuStyle*/ c[6].left ), d[0] & /*submenuStyle*/ 64 && Te( e, "top", /*submenuStyle*/ c[6].top ), d[0] & /*submenuStyle*/ 64 && Te( e, "width", /*submenuStyle*/ c[6].width ), d[0] & /*submenuStyle*/ 64 && Te( e, "height", /*submenuStyle*/ c[6].height ); }, i(c) { if (!i) { for (let d = 0; d < s.length; d += 1) L(l[d]); c && fo(() => { i && (n || (n = Xi(e, kr, { y: 10, duration: 150 }, !0)), n.run(1)); }), i = !0; } }, o(c) { l = l.filter(Boolean); for (let d = 0; d < l.length; d += 1) H(l[d]); c && (n || (n = Xi(e, kr, { y: 10, duration: 150 }, !1)), n.run(0)), i = !1; }, d(c) { c && N(e), Ri(l, c), t[15](null), c && n && n.end(), o = !1, Un(r); } }; } function t_(t) { let e, n; return e = new r2({ props: { item: ( /*item*/ t[27] ) } }), { c() { Pe(e.$$.fragment); }, m(i, o) { Ae(e, i, o), n = !0; }, p(i, o) { const r = {}; o[0] & /*submenu*/ 32 && (r.item = /*item*/ i[27]), e.$set(r); }, i(i) { n || (L(e.$$.fragment, i), n = !0); }, o(i) { H(e.$$.fragment, i), n = !1; }, d(i) { Oe(e, i); } }; } function OF(t) { let e, n, i, o, r = ( /*shown*/ t[0] && /*currentProps*/ t[1] && xp(t) ); return { c() { r && r.c(), e = Vn(); }, m(s, l) { r && r.m(s, l), R(s, e, l), n = !0, i || (o = ae( AF, "click", /*onWindowClick*/ t[8] ), i = !0); }, p(s, l) { /*shown*/ s[0] && /*currentProps*/ s[1] ? r ? (r.p(s, l), l[0] & /*shown, currentProps*/ 3 && L(r, 1)) : (r = xp(s), r.c(), L(r, 1), r.m(e.parentNode, e)) : r && (Yt(), H(r, 1, 1, () => { r = null; }), Kt()); }, i(s) { n || (L(r), n = !0); }, o(s) { H(r), n = !1; }, d(s) { s && N(e), r && r.d(s), i = !1, o(); } }; } function MF(t, e, n) { const { setContextMenuApi: i } = Ct(Pn); i({ toggle: v, hide: b }); let o = "", r = null, s, l, a = {}, c, d, u = null, p = {}, _, f, m, g; function v(W) { o ? b() : w(W); } function w(W) { W.owner instanceof HTMLElement && (n(0, o = W.name || "<unknown>"), n(1, r = W), s = W.owner.getBoundingClientRect(), l = null, n(2, a = {}), n(6, p = {})); } function b() { n(0, o = ""), n(1, r = null), n(5, u = null), f = null; } function y(W) { const J = W.composedPath(); !J.includes(d) && !(r != null && r.owner && J.includes(r.owner)) && b(); } function j(W, J) { g = W.getBoundingClientRect(), clearTimeout(_), n(5, u = J), f = null; } function P() { clearTimeout(_), _ = setTimeout( () => { n(5, u = null), f = null; }, 300 ); } function C() { clearTimeout(_); } const k = [ [ X1, () => { if (o) { b(); return; } return !1; } ] ]; function O(W, J, E) { var ee, pe; const B = ((ee = r == null ? void 0 : r.offset) == null ? void 0 : ee.x) ?? -8, V = ((pe = r == null ? void 0 : r.offset) == null ? void 0 : pe.y) ?? 8, Z = window.scrollY; let K = "auto", ve = "auto", de, x, X = window.innerWidth, te = window.innerHeight, he = W.left + B, ye = W.right + B, re = W.width; he < 0 && (he = 0, re = ye - he), ye > X && (ye = X, re = ye - he); let ce = J.width; ce > X ? (ce = X, K = ce + "px") : ce < re && re <= 500 && (ce = re, K = ce + "px"); const ht = E === "bottom" ? he : he + re; ht + ce < X ? de = ht : ye > ce ? de = ye - ce : he - (X - ce) < ce - ye ? de = X - ce : de = 0; let Me = W.bottom + Z + V; Me > te + Z && (Me = te + Z); let Ue = J.height; Ue > te && (Ue = te, ve = te + "px"), E === "bottom" ? Me + Ue < te + Z ? x = Me : W.top + Z + V > Ue ? x = W.top + Z + V - Ue : x = 0 : E === "right" ? W.top + Ue < te + Z ? x = W.top : te > Ue ? x = te - Ue : x = 0 : x = 0; const Y = d.getBoundingClientRect(); return de -= Y.left, x -= Y.top, { top: x + "px", left: de + "px", width: K, height: ve }; } js(() => { !l && c && d && (l = c.getBoundingClientRect(), n(2, a = O(s, l, "bottom"))), !f && m && d && (f = m.getBoundingClientRect(), n(6, p = O(g, f, "right"))); }); const A = (W, J) => j(J.detail.elem, W); function M(W) { gt[W ? "unshift" : "push"](() => { c = W, n(3, c); }); } function I(W) { gt[W ? "unshift" : "push"](() => { m = W, n(7, m); }); } function D(W) { gt[W ? "unshift" : "push"](() => { d = W, n(4, d); }); } return [ o, r, a, c, d, u, p, m, y, j, P, C, k, A, M, I, D ]; } class PF extends sn { constructor(e) { super(), rn(this, e, MF, OF, xt, {}, null, [-1, -1]); } } function IF(t, e) { let n = 0, i, o = !1; return function() { const r = Date.now(); return !n || Math.abs(r - n) > e ? (n = r, i = t.apply(this, arguments)) : (o || (o = !0, setTimeout(() => { o = !1, i = t.apply(this, arguments); }, e)), i); }; } const { window: Fd } = Va; function n_(t, e, n) { const i = t.slice(); return i[31] = e[n], i; } function i_(t) { let e, n, i = `url(${uo( /*icon*/ t[13] )})`; return { c() { e = S("div"), n = S("div"), h(n, "class", "select__icon svelte-1fdlshr"), Te(n, "background-image", i), h(e, "class", "select__icon-wrapper svelte-1fdlshr"); }, m(o, r) { R(o, e, r), $(e, n); }, p(o, r) { r[0] & /*icon*/ 8192 && i !== (i = `url(${uo( /*icon*/ o[13] )})`) && Te(n, "background-image", i); }, d(o) { o && N(e); } }; } function o_(t) { let e, n, i, o, r, s = hn( /*items*/ t[1] ), l = []; for (let a = 0;