UNPKG

@divkitframework/divkit

Version:
1,927 lines 686 kB
var Vd = Object.defineProperty; var Id = (e, r, t) => r in e ? Vd(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t; var mr = (e, r, t) => Id(e, typeof r != "symbol" ? r + "" : r, t); /*! DivKit v31.12.0 https://github.com/divkit/divkit @licence Apache-2.0 */ function V() { } const Ps = (e) => e; function to(e, r) { for (const t in r) e[t] = r[t]; return ( /** @type {T & S} */ e ); } function hf(e) { return e(); } function oa() { return /* @__PURE__ */ Object.create(null); } function Qr(e) { e.forEach(hf); } function Tr(e) { return typeof e == "function"; } function Dd(e, r) { return e != e ? r == r : e !== r || e && typeof e == "object" || typeof e == "function"; } let Go; function Gn(e, r) { return e === r ? !0 : (Go || (Go = document.createElement("a")), Go.href = r, e === Go.href); } function Vr(e, r) { return e != e ? r == r : e !== r; } function Td(e) { return Object.keys(e).length === 0; } function N(e, ...r) { if (e == null) { for (const n of r) n(void 0); return V; } const t = e.subscribe(...r); return t.unsubscribe ? () => t.unsubscribe() : t; } function Fd(e) { let r; return N(e, (t) => r = t)(), r; } function fn(e, r, t) { e.$$.on_destroy.push(N(r, t)); } function Ns(e, r, t, n) { if (e) { const i = gf(e, r, t, n); return e[0](i); } } function gf(e, r, t, n) { return e[1] && n ? to(t.ctx.slice(), e[1](n(r))) : t.ctx; } function Os(e, r, t, n) { if (e[2] && n) { const i = e[2](n(t)); if (r.dirty === void 0) return i; if (typeof i == "object") { const o = [], s = Math.max(r.dirty.length, i.length); for (let a = 0; a < s; a += 1) o[a] = r.dirty[a] | i[a]; return o; } return r.dirty | i; } return r.dirty; } function zs(e, r, t, n, i, o) { if (i) { const s = gf(r, t, n, o); e.p(s, i); } } function Ls(e) { if (e.ctx.length > 32) { const r = [], t = e.ctx.length / 32; for (let n = 0; n < t; n++) r[n] = -1; return r; } return -1; } function $s(e, r, t) { return e.set(t), r; } function Rs(e) { return e && Tr(e.destroy) ? e.destroy : V; } function sa(e) { const r = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); return r ? [parseFloat(r[1]), r[2] || "px"] : [ /** @type {number} */ e, "px" ]; } const pf = typeof window < "u"; let Pl = pf ? () => window.performance.now() : () => Date.now(), Nl = pf ? (e) => requestAnimationFrame(e) : V; const ho = /* @__PURE__ */ new Set(); function mf(e) { ho.forEach((r) => { r.c(e) || (ho.delete(r), r.f()); }), ho.size !== 0 && Nl(mf); } function Ol(e) { let r; return ho.size === 0 && Nl(mf), { promise: new Promise((t) => { ho.add(r = { c: e, f: t }); }), abort() { ho.delete(r); } }; } const Si = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : ( // @ts-ignore Node typings have this global ); function St(e, r) { e.appendChild(r); } function bf(e) { if (!e) return document; const r = e.getRootNode ? e.getRootNode() : e.ownerDocument; return r && /** @type {ShadowRoot} */ r.host ? ( /** @type {ShadowRoot} */ r ) : e.ownerDocument; } function Md(e) { const r = De("style"); return r.textContent = "/* empty */", Pd(bf(e), r), r.sheet; } function Pd(e, r) { return St( /** @type {Document} */ e.head || e, r ), r.sheet; } function $(e, r, t) { e.insertBefore(r, t || null); } function x(e) { e.parentNode && e.parentNode.removeChild(e); } function un(e, r) { for (let t = 0; t < e.length; t += 1) e[t] && e[t].d(r); } function De(e) { return document.createElement(e); } function _n(e) { return document.createElementNS("http://www.w3.org/2000/svg", e); } function Zn(e) { return document.createTextNode(e); } function br() { return Zn(" "); } function ir() { return Zn(""); } function He(e, r, t, n) { return e.addEventListener(r, t, n), () => e.removeEventListener(r, t, n); } function m(e, r, t) { t == null ? e.removeAttribute(r) : e.getAttribute(r) !== t && e.setAttribute(r, t); } const Nd = ["width", "height"]; function si(e, r) { const t = Object.getOwnPropertyDescriptors(e.__proto__); for (const n in r) r[n] == null ? e.removeAttribute(n) : n === "style" ? e.style.cssText = r[n] : n === "__value" ? e.value = e[n] = r[n] : t[n] && t[n].set && Nd.indexOf(n) === -1 ? e[n] = r[n] : m(e, n, r[n]); } function Od(e, r) { Object.keys(r).forEach((t) => { zd(e, t, r[t]); }); } function zd(e, r, t) { const n = r.toLowerCase(); n in e ? e[n] = typeof e[n] == "boolean" && t === "" ? !0 : t : r in e ? e[r] = typeof e[r] == "boolean" && t === "" ? !0 : t : m(e, r, t); } function la(e) { return /-/.test(e) ? Od : si; } function Ld(e) { return Array.from(e.childNodes); } function Vi(e, r) { r = "" + r, e.data !== r && (e.data = /** @type {string} */ r); } function aa(e, r) { e.value = r == null ? "" : r; } function H(e, r, t, n) { t == null ? e.style.removeProperty(r) : e.style.setProperty(r, t, ""); } function ca(e, r, t) { for (let n = 0; n < e.options.length; n += 1) { const i = e.options[n]; if (i.__value === r) { i.selected = !0; return; } } (!t || r !== void 0) && (e.selectedIndex = -1); } function Rd(e) { const r = e.querySelector(":checked"); return r && r.__value; } function yf(e, r, { bubbles: t = !1, cancelable: n = !1 } = {}) { return new CustomEvent(e, { detail: r, bubbles: t, cancelable: n }); } function ua(e, r) { return new e(r); } const vs = /* @__PURE__ */ new Map(); let ks = 0; function Bd(e) { let r = 5381, t = e.length; for (; t--; ) r = (r << 5) - r ^ e.charCodeAt(t); return r >>> 0; } function Hd(e, r) { const t = { stylesheet: Md(r), rules: {} }; return vs.set(e, t), t; } function As(e, r, t, n, i, o, s, a = 0) { const l = 16.666 / n; let c = `{ `; for (let j = 0; j <= 1; j += l) { const k = r + (t - r) * o(j); c += j * 100 + `%{${s(k, 1 - k)}} `; } const u = c + `100% {${s(t, 1 - t)}} }`, f = `__svelte_${Bd(u)}_${a}`, h = bf(e), { stylesheet: b, rules: w } = vs.get(h) || Hd(h, e); w[f] || (w[f] = !0, b.insertRule(`@keyframes ${f} ${u}`, b.cssRules.length)); const _ = e.style.animation || ""; return e.style.animation = `${_ ? `${_}, ` : ""}${f} ${n}ms linear ${i}ms 1 both`, ks += 1, f; } function js(e, r) { const t = (e.style.animation || "").split(", "), n = t.filter( r ? (o) => o.indexOf(r) < 0 : (o) => o.indexOf("__svelte") === -1 // remove all Svelte animations ), i = t.length - n.length; i && (e.style.animation = n.join(", "), ks -= i, ks || Wd()); } function Wd() { Nl(() => { ks || (vs.forEach((e) => { const { ownerNode: r } = e.stylesheet; r && x(r); }), vs.clear()); }); } let Po; function Mo(e) { Po = e; } function wo() { if (!Po) throw new Error("Function called outside component initialization"); return Po; } function Bn(e) { wo().$$.on_mount.push(e); } function Bs(e) { wo().$$.after_update.push(e); } function dn(e) { wo().$$.on_destroy.push(e); } function Ud() { const e = wo(); return (r, t, { cancelable: n = !1 } = {}) => { const i = e.$$.callbacks[r]; if (i) { const o = yf( /** @type {string} */ r, t, { cancelable: n } ); return i.slice().forEach((s) => { s.call(e, o); }), !o.defaultPrevented; } return !0; }; } function Gi(e, r) { return wo().$$.context.set(e, r), r; } function Ur(e) { return wo().$$.context.get(e); } function vi(e, r) { const t = e.$$.callbacks[r.type]; t && t.slice().forEach((n) => n.call(this, r)); } const uo = [], Fr = []; let go = []; const fa = [], wf = /* @__PURE__ */ Promise.resolve(); let fl = !1; function vf() { fl || (fl = !0, wf.then(kf)); } function vn() { return vf(), wf; } function Ln(e) { go.push(e); } const el = /* @__PURE__ */ new Set(); let lo = 0; function kf() { if (lo !== 0) return; const e = Po; do { try { for (; lo < uo.length; ) { const r = uo[lo]; lo++, Mo(r), Gd(r.$$); } } catch (r) { throw uo.length = 0, lo = 0, r; } for (Mo(null), uo.length = 0, lo = 0; Fr.length; ) Fr.pop()(); for (let r = 0; r < go.length; r += 1) { const t = go[r]; el.has(t) || (el.add(t), t()); } go.length = 0; } while (uo.length); for (; fa.length; ) fa.pop()(); fl = !1, el.clear(), Mo(e); } function Gd(e) { if (e.fragment !== null) { e.update(), Qr(e.before_update); const r = e.dirty; e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, r), e.after_update.forEach(Ln); } } function qd(e) { const r = [], t = []; go.forEach((n) => e.indexOf(n) === -1 ? r.push(n) : t.push(n)), t.forEach((n) => n()), go = r; } let Do; function zl() { return Do || (Do = Promise.resolve(), Do.then(() => { Do = null; })), Do; } function Ji(e, r, t) { e.dispatchEvent(yf(`${r ? "intro" : "outro"}${t}`)); } const ts = /* @__PURE__ */ new Set(); let _i; function fr() { _i = { r: 0, c: [], p: _i // parent group }; } function dr() { _i.r || Qr(_i.c), _i = _i.p; } function q(e, r) { e && e.i && (ts.delete(e), e.i(r)); } function oe(e, r, t, n) { if (e && e.o) { if (ts.has(e)) return; ts.add(e), _i.c.push(() => { ts.delete(e), n && (t && e.d(1), n()); }), e.o(r); } else n && n(); } const Ll = { duration: 0 }; function Hs(e, r, t) { const n = { direction: "in" }; let i = r(e, t, n), o = !1, s, a, l = 0; function c() { s && js(e, s); } function u() { const { delay: h = 0, duration: b = 300, easing: w = Ps, tick: _ = V, css: j } = i || Ll; j && (s = As(e, 0, 1, b, h, w, j, l++)), _(0, 1); const k = Pl() + h, P = k + b; a && a.abort(), o = !0, Ln(() => Ji(e, !0, "start")), a = Ol((J) => { if (o) { if (J >= P) return _(1, 0), Ji(e, !0, "end"), c(), o = !1; if (J >= k) { const Y = w((J - k) / b); _(Y, 1 - Y); } } return o; }); } let f = !1; return { start() { f || (f = !0, js(e), Tr(i) ? (i = i(n), zl().then(u)) : u()); }, invalidate() { f = !1; }, end() { o && (c(), o = !1); } }; } function Af(e, r, t) { const n = { direction: "out" }; let i = r(e, t, n), o = !0, s; const a = _i; a.r += 1; let l; function c() { const { delay: u = 0, duration: f = 300, easing: h = Ps, tick: b = V, css: w } = i || Ll; w && (s = As(e, 1, 0, f, u, h, w)); const _ = Pl() + u, j = _ + f; Ln(() => Ji(e, !1, "start")), "inert" in e && (l = /** @type {HTMLElement} */ e.inert, e.inert = !0), Ol((k) => { if (o) { if (k >= j) return b(0, 1), Ji(e, !1, "end"), --a.r || Qr(a.c), !1; if (k >= _) { const P = h((k - _) / f); b(1 - P, P); } } return o; }); } return Tr(i) ? zl().then(() => { i = i(n), c(); }) : c(), { end(u) { u && "inert" in e && (e.inert = l), u && i.tick && i.tick(1, 0), o && (s && js(e, s), o = !1); } }; } function da(e, r, t, n) { let o = r(e, t, { direction: "both" }), s = n ? 0 : 1, a = null, l = null, c = null, u; function f() { c && js(e, c); } function h(w, _) { const j = ( /** @type {Program['d']} */ w.b - s ); return _ *= Math.abs(j), { a: s, b: w.b, d: j, duration: _, start: w.start, end: w.start + _, group: w.group }; } function b(w) { const { delay: _ = 0, duration: j = 300, easing: k = Ps, tick: P = V, css: J } = o || Ll, Y = { start: Pl() + _, b: w }; w || (Y.group = _i, _i.r += 1), "inert" in e && (w ? u !== void 0 && (e.inert = u) : (u = /** @type {HTMLElement} */ e.inert, e.inert = !0)), a || l ? l = Y : (J && (f(), c = As(e, s, w, j, _, k, J)), w && P(0, 1), a = h(Y, j), Ln(() => Ji(e, w, "start")), Ol((Z) => { if (l && Z > l.start && (a = h(l, j), l = null, Ji(e, a.b, "start"), J && (f(), c = As( e, s, a.b, a.duration, 0, k, o.css ))), a) { if (Z >= a.end) P(s = a.b, 1 - s), Ji(e, a.b, "end"), l || (a.b ? f() : --a.group.r || Qr(a.group.c)), a = null; else if (Z >= a.start) { const se = Z - a.start; s = a.a + a.d * k(se / a.duration), P(s, 1 - s); } } return !!(a || l); })); } return { run(w) { Tr(o) ? zl().then(() => { o = o({ direction: w ? "in" : "out" }), b(w); }) : b(w); }, end() { f(), a = l = null; } }; } function lr(e) { return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e); } function jf(e, r) { oe(e, 1, 1, () => { r.delete(e.key); }); } function Ef(e, r, t, n, i, o, s, a, l, c, u, f) { let h = e.length, b = o.length, w = h; const _ = {}; for (; w--; ) _[e[w].key] = w; const j = [], k = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), J = []; for (w = b; w--; ) { const W = f(i, o, w), L = t(W); let R = s.get(L); R ? J.push(() => R.p(W, r)) : (R = c(L, W), R.c()), k.set(L, j[w] = R), L in _ && P.set(L, Math.abs(w - _[L])); } const Y = /* @__PURE__ */ new Set(), Z = /* @__PURE__ */ new Set(); function se(W) { q(W, 1), W.m(a, u), s.set(W.key, W), u = W.first, b--; } for (; h && b; ) { const W = j[b - 1], L = e[h - 1], R = W.key, S = L.key; W === L ? (u = W.first, h--, b--) : k.has(S) ? !s.has(R) || Y.has(R) ? se(W) : Z.has(S) ? h-- : P.get(R) > P.get(S) ? (Z.add(R), se(W)) : (Y.add(S), h--) : (l(L, s), h--); } for (; h--; ) { const W = e[h]; k.has(W.key) || l(W, s); } for (; b; ) se(j[b - 1]); return Qr(J), j; } function vo(e, r) { const t = {}, n = {}, i = { $$scope: 1 }; let o = e.length; for (; o--; ) { const s = e[o], a = r[o]; if (a) { for (const l in s) l in a || (n[l] = 1); for (const l in a) i[l] || (t[l] = a[l], i[l] = 1); e[o] = a; } else for (const l in s) i[l] = 1; } for (const s in n) s in t || (t[s] = void 0); return t; } function $t(e) { e && e.c(); } function Kt(e, r, t) { const { fragment: n, after_update: i } = e.$$; n && n.m(r, t), Ln(() => { const o = e.$$.on_mount.map(hf).filter(Tr); e.$$.on_destroy ? e.$$.on_destroy.push(...o) : Qr(o), e.$$.on_mount = []; }), i.forEach(Ln); } function Xt(e, r) { const t = e.$$; t.fragment !== null && (qd(t.after_update), Qr(t.on_destroy), t.fragment && t.fragment.d(r), t.on_destroy = t.fragment = null, t.ctx = []); } function Yd(e, r) { e.$$.dirty[0] === -1 && (uo.push(e), vf(), e.$$.dirty.fill(0)), e.$$.dirty[r / 31 | 0] |= 1 << r % 31; } function Gr(e, r, t, n, i, o, s = null, a = [-1]) { const l = Po; Mo(e); const c = e.$$ = { fragment: null, ctx: [], // state props: o, update: V, not_equal: i, bound: oa(), // lifecycle on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(r.context || (l ? l.$$.context : [])), // everything else callbacks: oa(), dirty: a, skip_bound: !1, root: r.target || l.$$.root }; s && s(c.root); let u = !1; if (c.ctx = t ? t(e, r.props || {}, (f, h, ...b) => { const w = b.length ? b[0] : h; return c.ctx && i(c.ctx[f], c.ctx[f] = w) && (!c.skip_bound && c.bound[f] && c.bound[f](w), u && Yd(e, f)), h; }) : [], c.update(), u = !0, Qr(c.before_update), c.fragment = n ? n(c.ctx) : !1, r.target) { if (r.hydrate) { const f = Ld(r.target); c.fragment && c.fragment.l(f), f.forEach(x); } else c.fragment && c.fragment.c(); r.intro && q(e.$$.fragment), Kt(e, r.target, r.anchor), kf(); } Mo(l); } class qr { constructor() { /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ mr(this, "$$"); /** * ### PRIVATE API * * Do not use, may change at any time * * @type {any} */ mr(this, "$$set"); } /** @returns {void} */ $destroy() { Xt(this, 1), this.$destroy = V; } /** * @template {Extract<keyof Events, string>} K * @param {K} type * @param {((e: Events[K]) => void) | null | undefined} callback * @returns {() => void} */ $on(r, t) { if (!Tr(t)) return V; const n = this.$$.callbacks[r] || (this.$$.callbacks[r] = []); return n.push(t), () => { const i = n.indexOf(t); i !== -1 && n.splice(i, 1); }; } /** * @param {Partial<Props>} props * @returns {void} */ $set(r) { this.$$set && !Td(r) && (this.$$.skip_bound = !0, this.$$set(r), this.$$.skip_bound = !1); } } const Jd = "4"; typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Jd); const ao = []; function Kd(e, r) { return { subscribe: ji(e, r).subscribe }; } function ji(e, r = V) { let t; const n = /* @__PURE__ */ new Set(); function i(a) { if (Dd(e, a) && (e = a, t)) { const l = !ao.length; for (const c of n) c[1](), ao.push(c, e); if (l) { for (let c = 0; c < ao.length; c += 2) ao[c][0](ao[c + 1]); ao.length = 0; } } } function o(a) { i(a(e)); } function s(a, l = V) { const c = [a, l]; return n.add(c), n.size === 1 && (t = r(i, o) || V), a(e), () => { n.delete(c), n.size === 0 && t && (t(), t = null); }; } return { set: i, update: o, subscribe: s }; } function Xi(e, r, t) { const n = !Array.isArray(e), i = n ? [e] : e; if (!i.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value"); const o = r.length < 2; return Kd(t, (s, a) => { let l = !1; const c = []; let u = 0, f = V; const h = () => { if (u) return; f(); const w = r(n ? c[0] : c, s, a); o ? s(w) : f = Tr(w) ? w : V; }, b = i.map( (w, _) => N( w, (j) => { c[_] = j, u &= ~(1 << _), l && h(); }, () => { u |= 1 << _; } ) ); return l = !0, h(), function() { Qr(b), f(), l = !1; }; }); } const Xd = "divkit-6d515", Zd = "divkit-27458", Qd = "divkit-82db1", xd = "divkit-be734", $d = "divkit-9a652", ar = { root_platform_desktop: Xd, root__clickable: Zd, "root__clickable-no-transition": "divkit-3bb57", "root__any-actions": "divkit-ba614", root: Qd, root__selectable: xd, root__unselectable: $d, "root__only-desktop": "divkit-316e7", "root_restrict-scroll": "divkit-0a135", "root_disabled-context-menu": "divkit-f5cb3" }, on = Symbol("root"); function X(e, r = {}) { const t = e; return t.level = r.level || "error", r.additional && (t.additional = r.additional), t; } const e_ = "divkit-bf0ea", t_ = "divkit-27458", r_ = "divkit-05991", n_ = "divkit-80cac", i_ = "divkit-90c49", o_ = "divkit-b33bc", s_ = "divkit-f6ff9", Es = { outer: e_, root__clickable: t_, "root__clickable-no-transition": "divkit-3bb57", "outer_hide-on-transition-in": "divkit-c5f24", "outer_halign-self_start": "divkit-002ec", "outer_halign-self_center": "divkit-204f8", "outer_halign-self_end": "divkit-bd7ba", "outer_halign-self_stretch": "divkit-02d12", "outer_valign-self_start": "divkit-fd8aa", "outer_valign-self_center": "divkit-62df2", "outer_valign-self_end": "divkit-819a0", "outer_valign-self_stretch": "divkit-8a331", "outer_parent-flex_vertical": "divkit-46b27", "outer_parent-flex_horizontal": "divkit-be075", "outer_valign-self_baseline": "divkit-2b876", outer_width_content: r_, outer_height_content: n_, "outer_width-constrained": "divkit-5bdb7", "outer_parent-grid": "divkit-47ef2", "outer_height-constrained": "divkit-351c8", "outer_parent-overlap": "divkit-747b0", "outer_scroll-snap_start": "divkit-91fd4", "outer_scroll-snap_center": "divkit-c525d", "outer_scroll-snap_end": "divkit-67470", outer__border: i_, outer_visibility_invisible: o_, outer_visibility_gone: s_, "outer_has-action-animation": "divkit-4d4f3", "outer_has-custom-focus": "divkit-b630e" }; function Nt(e) { if (!e) return; let r = ""; for (const t in e) if (e.hasOwnProperty(t)) { if (!e[t] && e[t] !== 0) continue; r && (r += ";"), r += t + ":" + String(e[t]); } return r || void 0; } function Ee(e) { if (typeof e != "number" && typeof e != "string" || !e) return "0"; const r = Number(e); return Number.isNaN(r) ? "0" : Math.ceil(r * 1e3) / 1e4 + "em"; } function ln(e) { let r = Ee(e); return r === "0" && (r += "em"), r; } function Cf(e, r) { for (; e.length < r; ) e = "0" + e; return e; } function Sr(e, r = 1, t = "transparent") { if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#") return t; const n = hi(e); return n ? (n.a *= r, Rl(n)) : t; } function l_(e, r, t = "transparent") { if (e = (typeof e == "string" && e || "").toLowerCase(), e.charAt(0) !== "#") return t; const n = hi(e); return n ? (n.a = r, Rl(n)) : t; } function Rl(e) { return e.a === 255 ? `#${[e.r, e.g, e.b].map((r) => Cf(Math.round(r).toString(16), 2)).join("")}` : `rgba(${e.r},${e.g},${e.b},${(e.a / 255).toFixed(2)})`; } function hi(e) { const r = ( // #AARRGGBB e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #ARGB e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])$/i) || // #RRGGBB e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i) || // #RGB e.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i) ); if (r) { if (r.length === 5) { const [c, u, f, h, b] = r, w = f.length === 2 ? f : f + f, _ = h.length === 2 ? h : h + h, j = b.length === 2 ? b : b + b, k = u.length === 2 ? u : u + u; return { a: parseInt(k, 16), r: parseInt(w, 16), g: parseInt(_, 16), b: parseInt(j, 16) }; } const [t, n, i, o] = r, s = n.length === 2 ? n : n + n, a = i.length === 2 ? i : i + i, l = o.length === 2 ? o : o + o; return { a: 255, r: parseInt(s, 16), g: parseInt(a, 16), b: parseInt(l, 16) }; } return null; } function dl(e) { let r = String(e); return r.indexOf("&") > -1 && (r = r.replace(/&/g, "&amp;")), r.indexOf("<") > -1 && (r = r.replace(/</g, "&lt;")), r.indexOf(">") > -1 && (r = r.replace(/>/g, "&gt;")), r.indexOf('"') > -1 && (r = r.replace(/"/g, "&quot;")), r; } const mi = Boolean; function Ws(e) { if (e.length === 1 && e[0].type === "solid") return c_({ bg: e[0] }); const r = e.map((t) => { if (t.type === "solid") return a_({ bg: t }); if (t.type === "gradient") return u_({ bg: t }); if (t.type === "image") return __({ bg: t }); if (t.type === "radial_gradient") return d_({ bg: t }); }).filter(mi).reverse().reduce(function(t, n) { return t.image.push(n.image), t.size.push(n.size || "auto"), t.position.push(n.pos || "50% 50%"), t; }, { image: [], size: [], position: [] }); return { image: r.image.join(","), size: r.size.join(","), position: r.position.join(",") }; } function a_(e) { const r = Sr(e.bg.color || "transparent"); return { size: void 0, pos: void 0, image: `linear-gradient(to bottom,${r},${r})` }; } function c_(e) { return { color: Sr(e.bg.color || "transparent"), size: "auto", position: "50% 50%" }; } function Sf(e) { return e.every((n) => n.color && typeof n.position == "number" && n.position >= 0 && n.position <= 1) ? e.sort((n, i) => Math.abs(n.position - i.position) < 1e-6 ? 0 : n.position - i.position).map((n) => `${Sr(n.color)} ${(n.position * 100).toFixed(2)}%`).join(",") : void 0; } function u_(e) { var n, i, o, s; if (!Array.isArray((n = e.bg) == null ? void 0 : n.colors) && !Array.isArray((i = e.bg) == null ? void 0 : i.color_map)) return; const r = (o = e.bg.colors) == null ? void 0 : o.filter(mi); if (!(r != null && r.length) && !((s = e.bg) != null && s.color_map)) return; let t; if (e.bg.color_map) { const a = Sf(e.bg.color_map); if (!a) return; t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + a + ")"; } else { if (!r) return; t = "linear-gradient(" + (90 - Number(e.bg.angle || 0) + "deg") + "," + r.map((a) => Sr(a)).join(",") + ")"; } return { size: void 0, pos: void 0, image: t }; } const f_ = { nearest_corner: "closest-corner", farthest_corner: "farthest-corner", nearest_side: "closest-side", farthest_side: "farthest-side" }; function _a(e) { if (e && typeof e == "object" && "type" in e && e.value !== void 0) { if (e.type === "fixed") return ln(e.value); if (e.type === "relative") return `${Number(e.value) * 100}%`; } return "50%"; } function d_(e) { var a, l, c, u; if (!Array.isArray((a = e.bg) == null ? void 0 : a.colors) && !Array.isArray((l = e.bg) == null ? void 0 : l.color_map)) return; const r = (c = e.bg.colors) == null ? void 0 : c.filter(mi); if (!(r != null && r.length) && !((u = e.bg) != null && u.color_map)) return; let t; if (e.bg.color_map ? t = Sf(e.bg.color_map) : r && (t = r.map((f) => Sr(f)).join(",")), !t) return; const n = e.bg.radius; let i; n && typeof n == "object" && "type" in n && n.value !== void 0 && (n.type === "fixed" ? i = ln(n.value) : n.type === "relative" && (i = f_[n.value])); const o = _a(e.bg.center_x), s = _a(e.bg.center_y); return { size: void 0, pos: void 0, image: `radial-gradient(circle ${i || "farthest-corner"} at ${o} ${s},` + t + ")" }; } function __(e) { var t; const r = (t = e.bg) == null ? void 0 : t.image_url; if (r) return { size: Vf(e.bg.scale), pos: If(e.bg), image: 'url("' + dl(r) + '")' }; } function Vf(e) { return e === "fit" ? "contain" : e === "stretch" ? "fill" : e === "no_scale" ? "none" : "cover"; } function If(e) { let r, t; return e.content_alignment_horizontal === "left" ? r = "0%" : e.content_alignment_horizontal === "right" ? r = "100%" : r = "50%", e.content_alignment_vertical === "top" ? t = "0%" : e.content_alignment_vertical === "bottom" ? t = "100%" : t = "50%", r + " " + t; } function $r(e, r) { const t = Number(e); return Number.isNaN(t) || t < 0 ? r : t; } function ha(e, r, t) { return typeof r == "number" && (e && r > 0 && r <= 100 || !e && r >= 0 && r < 100) ? r : t; } function h_(e) { return e.is_enabled !== 0 && e.is_enabled !== !1 && e.index !== void 0; } function g_(e, { visibilityActions: r, disappearActions: t, rootCtx: n, componentContext: i }) { const o = []; r && r.forEach((b) => { o.push({ type: "visibility", index: o.length, action: b, visible: !1, count: 0, finished: !1 }); }), t && t.forEach((b) => { o.push({ type: "disappear", index: o.length, action: b, // false, so disappear only works after the element becomes visible visible: !1, count: 0, finished: !1 }); }); const s = o.map((b, w) => { const _ = b.type === "visibility"; return i.getDerivedFromVars({ index: w, visibility_percentage: b.action.visibility_percentage, visibility_duration: _ ? b.action.visibility_duration : b.action.disappear_duration, log_limit: b.action.log_limit, is_enabled: b.action.is_enabled }, void 0, !0); }); let a; const l = () => { a && a.disconnect(), o.forEach((b) => { b.timer && clearTimeout(b.timer); }); }, c = Xi(s, (b) => b); let u; const f = (b) => { const w = b.type === "visibility", _ = i.getJsonWithVars(b.action); i.execAnyActions([_], { logType: w ? "visible" : "disappear", node: e, processUrls: !1 }); }, h = c.subscribe((b) => { u = b.filter(h_); const w = {}; u.forEach((k) => { w[k.index] = k; }), l(); const _ = [...new Set(u.map((k) => { const P = o[k.index].type === "visibility"; return ha( P, k.visibility_percentage, P ? 50 : 0 ) / 100; }))]; if (!_.length) return; const j = (k) => { k.forEach((P) => { u.forEach((J) => { const Y = o[J.index], Z = Y.type === "visibility", se = ha( Z, J.visibility_percentage, Z ? 50 : 0 ); let W; se === 0 ? W = P.intersectionRatio >= 1e-12 : W = P.intersectionRatio >= se / 100, (Z ? !Y.visible && W : Y.visible && !W) ? Y.finished || (Y.timer = setTimeout(() => { ++Y.count; const S = J.log_limit === 0 ? 1 / 0 : J.log_limit || 1; Y.count >= S && (Y.finished = !0), f(Y); }, $r(J.visibility_duration, 800))) : (Z ? !W : W) && Y.timer && clearTimeout(Y.timer), Y.visible = W; }); }); }; a = new IntersectionObserver(j, { threshold: _ }), a.observe(e); }); return { destroy() { u == null || u.forEach((b) => { const w = o[b.index]; !w || w.type !== "disappear" || !w.visible || w.finished || n.registerTimeout(window.setTimeout(() => { f(w); }, b.visibility_duration)); }), l(), h(); } }; } function ga(e, r) { r && e.push(r); } function pt(e, r, t) { const n = []; ga(n, r[e]); for (const i in t) if (t.hasOwnProperty(i)) { const o = t[i]; if (o) { const s = `${e}_${i}` + (typeof o == "string" ? `_${o}` : ""); ga(n, r[s]); } } return n.join(" "); } const Bl = Symbol("state"); function li(e, r) { var s, a; const t = e.top || 0, n = ((s = r === "ltr" ? e.end : e.start) != null ? s : e.right) || 0, i = e.bottom || 0, o = ((a = r === "ltr" ? e.start : e.end) != null ? a : e.left) || 0; return t === 0 && n === 0 && i === 0 && o === 0 ? "" : Ee(t) + " " + Ee(n) + " " + Ee(i) + " " + Ee(o); } function Us(e) { if (typeof e != "number" && typeof e != "string") return !1; const r = Number(e); return !Number.isNaN(r); } function Cn(e) { return Us(e) && e >= 0; } function Cs(e, r, t) { var i, o; if (!e) return t; const n = [ e.top, (i = r === "ltr" ? e.end : e.start) != null ? i : e.right, e.bottom, (o = r === "ltr" ? e.start : e.end) != null ? o : e.left ]; for (let s = 0; s < n.length; ++s) if (n[s] && !Cn(n[s])) return t; return li(e, r); } function p_(e, r) { return !Cn(e) || e === void 0 || e > 1 ? r : Number(e); } const m_ = Object.prototype.hasOwnProperty; function Hl(e, r) { if (Object.is(e, r)) return !0; if (typeof e != "object" || e === null || typeof r != "object" || r === null) return Object.is(e, r); const t = Object.keys(e), n = Object.keys(r); if (t.length !== n.length) return !1; for (let i = 0; i < t.length; i++) { const o = t[i]; if (!m_.call(r, o) || !Hl(e[o], r[o])) return !1; } return !0; } function Ni(e, r) { return Hl(e, r) ? r : e; } function b_(e, r) { return e === "visible" || e === "invisible" || e === "gone" ? e : r; } function Df(e, r) { return e === "linear" || e === "ease" || e === "ease_in_out" || e === "ease_in" || e === "ease_out" ? e : r; } function _o(e, r) { const t = Number(e); return Number.isNaN(t) ? r : t; } function Wl(e) { const r = []; return e.name === "set" ? (e.items || []).forEach((t) => { r.push(...Wl(t)); }) : r.push(e), r; } function ko(e, r) { if (!e || typeof e != "object") return r; const t = [ "top", "right", "bottom", "left" ]; for (let n = 0; n < t.length; ++n) if (e[t[n]] && !Cn(e[t[n]])) return r; return e; } function y_(e, r) { if (!e && !r) return {}; if (!r) return e; if (!e) return r; const t = {}; return [ "top", "right", "bottom", "left", "start", "end" ].forEach((n) => { const i = e[n]; i && (t[n] = i); const o = r[n]; o && (t[n] = (t[n] || 0) + o); }), t; } function w_(e, r) { const t = [ e["top-left"], e["top-right"], e["bottom-right"], e["bottom-left"] ]; for (let n = 0; n < t.length; ++n) if (t[n] && !Cn(t[n])) return r; return e; } function rs(e, r = 0, t = 10) { return [ e["top-left"], e["top-right"], e["bottom-right"], e["bottom-left"] ].map((n) => Ee((n || r) / t * 10)).join(" "); } function v_(e) { var r, t, n, i, o, s; return Ee(((t = (r = e.offset) == null ? void 0 : r.x) == null ? void 0 : t.value) || 0) + " " + Ee(((i = (n = e.offset) == null ? void 0 : n.y) == null ? void 0 : i.value) || 0) + " " + Ee((o = e.blur) != null ? o : 2) + " " + Sr(e.color || "#000000", (s = e.alpha) != null ? s : 0.19); } function k_(e, r) { var t, n, i, o, s, a; return "drop-shadow(" + Sr(e.color || "#000000", (t = e.alpha) != null ? t : 0.19) + " " + Ee((((i = (n = e.offset) == null ? void 0 : n.x) == null ? void 0 : i.value) || 0) * 10 / r) + " " + Ee((((s = (o = e.offset) == null ? void 0 : o.y) == null ? void 0 : s.value) || 0) * 10 / r) + " " + Ee(((a = e.blur) != null ? a : 2) * 10 / r) + ")"; } function Mn(e) { return e.is_enabled !== 0 && e.is_enabled !== !1; } let tl; function Gs() { return typeof matchMedia > "u" ? !1 : (tl || (tl = window.matchMedia("(prefers-reduced-motion)")), tl.matches); } const A_ = 8, j_ = (e, r, t, n) => { let i; return (t || n) && typeof ResizeObserver < "u" && (i = new ResizeObserver(async () => { let o = 0; const s = {}, a = (c, u) => { if (c) { const f = r.getVariable(c, "integer"); if (f) { if (u = Math.round(u), s[c] || (s[c] = /* @__PURE__ */ new Set()), !s[c].has(u)) return f.setValue(u), s[c].add(u), !0; } else { const h = new Error("Missing variable"); h.level = "error", h.additional = { variableName: c }, r.logError(h); } } return !1; }, l = () => { if (!e) return !1; const c = e.getBoundingClientRect(), u = a(t, c.width), f = a(n, c.height); return u || f; }; for (; l(); ) { if (++o > A_) { const c = new Error("Recursive layout in size_provider"); c.level = "warn", c.additional = { widthVariableName: t, heightVariableName: n }, r.logError(c); break; } await vn(); } }), i.observe(e)), i; }, Ul = Symbol("enabled"); function En(e, r) { return e === 1 || e === 0 || e === !1 || e === !0 ? !!e : r; } function mo(e) { return [ e.state_description, e.description, e.hint ].filter(Boolean).join(", "); } const E_ = "divkit-ee5cc", pa = { actionable__button: E_ }; function C_() { } const Zi = Symbol("action"); function _l(e) { if (e.startsWith("tel:")) return "tel"; const r = /^([^/]+):\/\//.exec(e); return r && r[1] || ""; } function hl(e, r) { return r.has(e); } function S_(e) { var f; let r, t, n, i, o, s; const a = ( /*#slots*/ e[28].default ), l = Ns( a, e, /*$$scope*/ e[27], null ); let c = [ { class: t = /*cls*/ e[1] + " " + /*longTapActions*/ ((f = e[0]) != null && f.length ? ar["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/ (e[12] ? ar["root__any-actions"] : "") }, { style: ( /*style*/ e[2] ) }, { role: ( /*role*/ e[9] ) }, { "aria-checked": ( /*isChecked*/ e[13] ) }, { "aria-hidden": n = /*ariaHidden*/ e[10] || void 0 }, /*attrs*/ e[3] ], u = {}; for (let h = 0; h < c.length; h += 1) u = to(u, c[h]); return { c() { r = De("span"), l && l.c(), si(r, u); }, m(h, b) { $(h, r, b), l && l.m(r, null), e[40](r), i = !0, o || (s = [ Rs( /*use*/ e[4].call(null, r) ), He( r, "click", /*click_handler_2*/ e[35] ), He( r, "keydown", /*onKeydown*/ e[14] ), He( r, "focus", /*focus_handler_2*/ e[36] ), He( r, "blur", /*blur_handler_2*/ e[37] ) ], o = !0); }, p(h, b) { var w; l && l.p && (!i || b[0] & /*$$scope*/ 134217728) && zs( l, a, h, /*$$scope*/ h[27], i ? Os( a, /*$$scope*/ h[27], b, null ) : Ls( /*$$scope*/ h[27] ), null ), si(r, u = vo(c, [ (!i || b[0] & /*cls, longTapActions, hasAnyActions*/ 4099 && t !== (t = /*cls*/ h[1] + " " + /*longTapActions*/ ((w = h[0]) != null && w.length ? ar["root_disabled-context-menu"] : "") + " " + /*hasAnyActions*/ (h[12] ? ar["root__any-actions"] : ""))) && { class: t }, (!i || b[0] & /*style*/ 4) && { style: ( /*style*/ h[2] ) }, (!i || b[0] & /*role*/ 512) && { role: ( /*role*/ h[9] ) }, (!i || b[0] & /*isChecked*/ 8192) && { "aria-checked": ( /*isChecked*/ h[13] ) }, (!i || b[0] & /*ariaHidden*/ 1024 && n !== (n = /*ariaHidden*/ h[10] || void 0)) && { "aria-hidden": n }, b[0] & /*attrs*/ 8 && /*attrs*/ h[3] ])); }, i(h) { i || (q(l, h), i = !0); }, o(h) { oe(l, h), i = !1; }, d(h) { h && x(r), l && l.d(h), e[40](null), o = !1, Qr(s); } }; } function V_(e) { var u; let r, t, n, i, o; const s = ( /*#slots*/ e[28].default ), a = Ns( s, e, /*$$scope*/ e[27], null ); let l = [ { class: t = /*cls*/ e[1] + " " + pa.actionable__button + " " + ar["root__any-actions"] + ` ${/*isNativeActionAnimation*/ e[5] ? ar.root__clickable : ar["root__clickable-no-transition"]} ${ar.root__unselectable} ` + /*longTapActions*/ ((u = e[0]) != null && u.length ? ar["root_disabled-context-menu"] : "") }, { style: ( /*style*/ e[2] ) }, { role: ( /*role*/ e[9] ) }, { "aria-checked": ( /*isChecked*/ e[13] ) }, { type: "button" }, /*attrs*/ e[3] ], c = {}; for (let f = 0; f < l.length; f += 1) c = to(c, l[f]); return { c() { r = De("button"), a && a.c(), si(r, c); }, m(f, h) { $(f, r, h), a && a.m(r, null), r.autofocus && r.focus(), e[39](r), n = !0, i || (o = [ Rs( /*use*/ e[4].call(null, r) ), He( r, "click", /*click_handler_1*/ e[32] ), He( r, "keydown", /*onKeydown*/ e[14] ), He( r, "focus", /*focus_handler_1*/ e[33] ), He( r, "blur", /*blur_handler_1*/ e[34] ) ], i = !0); }, p(f, h) { var b; a && a.p && (!n || h[0] & /*$$scope*/ 134217728) && zs( a, s, f, /*$$scope*/ f[27], n ? Os( s, /*$$scope*/ f[27], h, null ) : Ls( /*$$scope*/ f[27] ), null ), si(r, c = vo(l, [ (!n || h[0] & /*cls, isNativeActionAnimation, longTapActions*/ 35 && t !== (t = /*cls*/ f[1] + " " + pa.actionable__button + " " + ar["root__any-actions"] + ` ${/*isNativeActionAnimation*/ f[5] ? ar.root__clickable : ar["root__clickable-no-transition"]} ${ar.root__unselectable} ` + /*longTapActions*/ ((b = f[0]) != null && b.length ? ar["root_disabled-context-menu"] : ""))) && { class: t }, (!n || h[0] & /*style*/ 4) && { style: ( /*style*/ f[2] ) }, (!n || h[0] & /*role*/ 512) && { role: ( /*role*/ f[9] ) }, (!n || h[0] & /*isChecked*/ 8192) && { "aria-checked": ( /*isChecked*/ f[13] ) }, { type: "button" }, h[0] & /*attrs*/ 8 && /*attrs*/ f[3] ])); }, i(f) { n || (q(a, f), n = !0); }, o(f) { oe(a, f), n = !1; }, d(f) { f && x(r), a && a.d(f), e[39](null), i = !1, Qr(o); } }; } function I_(e) { var u; let r, t, n, i, o; const s = ( /*#slots*/ e[28].default ), a = Ns( s, e, /*$$scope*/ e[27], null ); let l = [ { href: ( /*href*/ e[7] ) }, { target: ( /*target*/ e[11] ) }, { style: ( /*style*/ e[2] ) }, { role: ( /*role*/ e[9] ) }, { "aria-checked": ( /*isChecked*/ e[13] ) }, { class: t = /*cls*/ e[1] + " " + ar["root__any-actions"] + " " + /*isNativeActionAnimation*/ (e[5] ? ar.root__clickable : ar["root__clickable-no-transition"]) + " " + /*longTapActions*/ ((u = e[0]) != null && u.length ? ar["root_disabled-context-menu"] : "") }, /*attrs*/ e[3] ], c = {}; for (let f = 0; f < l.length; f += 1) c = to(c, l[f]); return { c() { r = De("a"), a && a.c(), si(r, c); }, m(f, h) { $(f, r, h), a && a.m(r, null), e[38](r), n = !0, i || (o = [ Rs( /*use*/ e[4].call(null, r) ), He( r, "click", /*click_handler*/ e[29] ), He( r, "keydown", /*onKeydown*/ e[14] ), He( r, "focus", /*focus_handler*/ e[30] ), He( r, "blur", /*blur_handler*/ e[31] ) ], i = !0); }, p(f, h) { var b; a && a.p && (!n || h[0] & /*$$scope*/ 134217728) && zs( a, s, f, /*$$scope*/ f[27], n ? Os( s, /*$$scope*/ f[27], h, null ) : Ls( /*$$scope*/ f[27] ), null ), si(r, c = vo(l, [ (!n || h[0] & /*href*/ 128) && { href: ( /*href*/ f[7] ) }, (!n || h[0] & /*target*/ 2048) && { target: ( /*target*/ f[11] ) }, (!n || h[0] & /*style*/ 4) && { style: ( /*style*/ f[2] ) }, (!n || h[0] & /*role*/ 512) && { role: ( /*role*/ f[9] ) }, (!n || h[0] & /*isChecked*/ 8192) && { "aria-checked": ( /*isChecked*/ f[13] ) }, (!n || h[0] & /*cls, isNativeActionAnimation, longTapActions*/ 35 && t !== (t = /*cls*/ f[1] + " " + ar["root__any-actions"] + " " + /*isNativeActionAnimation*/ (f[5] ? ar.root__clickable : ar["root__clickable-no-transition"]) + " " + /*longTapActions*/ ((b = f[0]) != null && b.length ? ar["root_disabled-context-menu"] : ""))) && { class: t }, h[0] & /*attrs*/ 8 && /*attrs*/ f[3] ])); }, i(f) { n || (q(a, f), n = !0); }, o(f) { oe(a, f), n = !1; }, d(f) { f && x(r), a && a.d(f), e[38](null), i = !1, Qr(o); } }; } function D_(e) { let r, t, n, i; const o = [I_, V_, S_], s = []; function a(l, c) { return ( /*href*/ l[7] ? 0 : ( /*hasJSAction*/ l[8] ? 1 : 2 ) ); } return r = a(e), t = s[r] = o[r](e), { c() { t.c(), n = ir(); }, m(l, c) { s[r].m(l, c), $(l, n, c), i = !0; }, p(l, c) { let u = r; r = a(l), r === u ? s[r].p(l, c) : (fr(), oe(s[u], 1, 1, () => { s[u] = null; }), dr(), t = s[r], t ? t.p(l, c) : (t = s[r] = o[r](l), t.c()), q(t, 1), t.m(n.parentNode, n)); }, i(l) { i || (q(t), i = !0); }, o(l) { oe(t), i = !1; }, d(l) { l && x(n), s[r].d(l); } }; } const ma = 8, ba = 400, rl = 400, T_ = /* @__PURE__ */ new Set(["button", "image", "checkbox", "radio", "header"]); function ya(e) { e.preventDefault(); } function F_(e, r, t) { let { $$slots: n = {}, $$scope: i } = r, { componentContext: o } = r, { id: s = "" } = r, { actions: a = void 0 } = r, { doubleTapActions: l = void 0 } = r, { longTapActions: c = void 0 } = r, { pressStartActions: u = void 0 } = r, { pressEndActions: f = void 0 } = r, { hoverStartActions: h = void 0 } = r, { hoverEndActions: b = void 0 } = r, { cls: w = "" } = r, { style: _ = null } = r, { attrs: j = void 0 } = r, { use: k = C_ } = r, { customAction: P = null } = r, { isNativeActionAnimation: J = !0 } = r, { hasInnerFocusable: Y = !1 } = r, { customAccessibility: Z = void 0 } = r, { captureFocusOnAction: se = !0 } = r; const W = Ur(on), L = Ur(Zi); Gi(Zi, { hasAction() { return !!(L.hasAction() || a != null && a.length || (Z == null ? void 0 : Z.mode) === "exclude"); } }); let R, S = "", I, D = -1, U = -1, Ie = null, Xe = !1, ae = !1, Pe = !1, Me, Ue, Le, jt, ye = !1; function Ce() { return (a == null ? void 0 : a.some((A) => { if (A != null && A.typed) return !0; const _e = A == null ? void 0 : A.url; if (!_e) return !1; const K = _l(_e); return K && !hl(K, W.getBuiltinProtocols()); })) || !1; } async function re(A, _e) { a && (A && Ce() && A.preventDefault(), o.execAnyActions(a, { node: R, processUrls: _e })); } async function Re(A) { if (L.hasAction() || A.button !== void 0 && A.button !== 0) return; const _e = Date.now(); if (D > 0 && _e > D + ba) { A.preventDefault(); return; } if (l != null && l.length && U > 0 && _e - U < rl) { A.preventDefault(), o.execAnyActions(l, { processUrls: !0, node: R }), U = -1; return; } if (U = _e, l != null && l.length && D > 0 && _e < D + rl) { A.preventDefault(), clearTimeout(Ue), Ue = window.setTimeout( () => { re(void 0, !0); }, rl ); return; } (P == null ? void 0 : P(A)) === !1 ? A.preventDefault() : re(A, !1); } function pe(A) { L.hasAction() || (Ie = { x: A.clientX, y: A.clientY }, Xe = !1, D = Date.now(), Me && clearTimeout(Me), clearTimeout(Ue), o.execAnyActions(u, { node: R })); } function we(A) { Ie && (Math.abs(Ie.x - A.clientX) > ma || Math.abs(Ie.y - A.clientY) > ma) && (Xe = !0); } function Se(A) { L.hasAction() || !Ie || D < 0 || (!Xe && Date.now() - D >= ba && (A.stopImmediatePropagation(), o.execAnyActions(c, { processUrls: !0, node: R })), Me && clearTimeout(Me), Me = window.setTimeout( () => { Ie = null, D = -1; }, 100 ), o.execAnyActions(f, { node: R })); } function it() { L.hasAction() || o.execAnyActions(h, { node: R }); } function Tt() { L.hasAction() || o.execAnyActions(b, { node: R }); } function ne(A) { const _e = A.target; _e instanceof HTMLElement && (_e.tagName === "INPUT" || _e.contentEditable === "true") || A.ctrlKey || A.metaKey || A.altKey || A.shiftKey || A.key === "Enter" && Array.isArray(a) && a.length && (o.execAnyActions(a), A.preventDefault()); } Bn(() => { s && !Y && W.registerFocusable(s, { focus() { R && (S || ae) && R.focus(); } }); }), dn(() => { typeof window < "u" && (window.removeEventListener("pointermove", we), window.removeEventListener("pointerup", Se), window.removeEventListener("pointercancel", Se)), s && !Y && W.unregisterFocusable(s), Me && clearTimeout(Me), Ue && clearTimeout(Ue); }); function me(A) { vi.call(this, e, A); } function fe(A) { vi.call(this, e, A); } function te(A) { vi.call(this, e, A); } function tt(A) { vi.call(this, e, A); } function ot(A) { vi.call(this, e, A); } function Te(A) { vi.call(this, e, A); } function $e(A) { vi.call(this, e, A); } function Et(A) { vi.call(this, e, A); } function Mt(A) { vi.call(this, e, A); } function Ze(A) { Fr[A ? "unshift" : "push"](() => { R = A, t(6, R); }); } function xe(A) { Fr[A ? "unshift" : "push"](() => { R = A, t(6, R); }); } function ct(A) { Fr[A ? "unshift" : "push"](() => { R = A, t(6, R); }); } return e.$$set = (A) => { "componentContext" in A && t(15, o = A.componentContext), "id" in A && t(16, s = A.id), "actions" in A && t(17, a = A.actions), "doubleTapActions" in A && t(18, l = A.doubleTapActions), "longTapActions" in A && t(0, c = A.longTapActions), "pressStartActions" in A && t(19, u = A.pressStartActions), "pressEndActions" in A && t(20, f = A.pressEndActions), "hoverStartActions" in A && t(21, h = A.hoverStartActions), "hoverEndActions" in A && t(22, b = A.hoverEndActions), "cls" in A && t(1, w = A.cls), "style" in A && t(2, _ = A.style), "attrs" in A && t(3, j = A.attrs), "use" in A && t(4, k = A.use), "customAction" in A && t(23, P = A.customAction), "isNativeActionAnimation" in A && t(5, J = A.isNativeActionAnimation), "hasInnerFocusable" in A && t(24, Y = A.hasInnerFocusable), "customAccessibility" in A && t(25, Z = A.customAccessibility), "captureFocusOnActio