· 9 years ago · Aug 21, 2016, 06:58 PM
1function rc(t, e) {
2 var n = t.href;
3 t.href = e, setTimeout(function() {
4 t.href = n
5 }, 500)
6 }
7
8 function parseYCookie(t) {
9 if (!t || "string" != typeof t || !t.length) return {};
10 t = t.split("#");
11 for (var e, n = Date.now() / 1e3, i = {}, r = 0, s = t.length; s > r; r++) e = t[r].split("."), 3 === e.length ? e[0] > n && (i[e[1]] = {
12 value: decodeURIComponent(e[2]),
13 expires: new Date(+(e[0] + "000"))
14 }) : 2 === e.length && (i[e[0]] = decodeURIComponent(e[1]));
15 return i
16 }! function(t) {
17 function e(e, i, r) {
18 var o = !1;
19 if (s) {
20 var a = [];
21 t.each(u, function() {
22 r.hasOwnProperty(this) && (o = !0) && a.push({
23 name: this,
24 val: r[this]
25 })
26 }), o && (t.each(r, function(t) {
27 a.push({
28 name: t,
29 val: this
30 })
31 }), r = a)
32 }
33 t.each(r, function(r, s) {
34 if (o && (r = s.name, s = s.val), t.isFunction(s) && (!n || s.toString().indexOf(".__base") > -1)) {
35 var a = e[r] || function() {};
36 i[r] = function() {
37 var t = this.__base;
38 this.__base = a;
39 var e = s.apply(this, arguments);
40 return this.__base = t, e
41 }
42 } else i[r] = s
43 })
44 }
45 var n = function() {
46 "_"
47 }.toString().indexOf("_") > -1,
48 i = function() {},
49 r = Object.create || function(t) {
50 var e = function() {};
51 return e.prototype = t, new e
52 },
53 s = !0,
54 o = {
55 toString: ""
56 };
57 for (var a in o) o.hasOwnProperty(a) && (s = !1);
58 var u = s ? ["toString", "valueOf"] : null;
59 t.inherit = function() {
60 var n = arguments,
61 s = t.isFunction(n[0]),
62 o = s ? n[0] : i,
63 a = n[s ? 1 : 0] || {},
64 u = n[s ? 2 : 1],
65 c = a.__constructor || s && o.prototype.__constructor ? function() {
66 return this.__constructor.apply(this, arguments)
67 } : function() {};
68 if (!s) return c.prototype = a, c.prototype.__self = c.prototype.constructor = c, t.extend(c, u);
69 t.extend(c, o);
70 var l = o.prototype,
71 h = c.prototype = r(l);
72 return h.__self = h.constructor = c, e(l, h, a), u && e(o, c, u), c
73 }, t.inheritSelf = function(t, n, i) {
74 var r = t.prototype;
75 return e(r, r, n), i && e(t, t, i), t
76 }
77 }(jQuery),
78 function(t) {
79 var e = 0,
80 n = "__" + +new Date,
81 i = function() {
82 return "uniq" + ++e
83 };
84 t.identify = function(t, e) {
85 if (!t) return i();
86 var r = "uniqueID" in t ? "uniqueID" : n;
87 return e || r in t ? t[r] : t[r] = i()
88 }
89 }(jQuery),
90 function(t) {
91 t.isEmptyObject || (t.isEmptyObject = function(t) {
92 for (var e in t) return !1;
93 return !0
94 })
95 }(jQuery),
96 function(t) {
97 t.extend({
98 debounce: function(t, e, n, i) {
99 3 == arguments.length && "boolean" != typeof n && (i = n, n = !1);
100 var r;
101 return function() {
102 var s = arguments;
103 i = i || this, n && !r && t.apply(i, s), clearTimeout(r), r = setTimeout(function() {
104 n || t.apply(i, s), r = null
105 }, e)
106 }
107 },
108 throttle: function(t, e, n) {
109 var i, r, s;
110 return function() {
111 r = arguments, s = !0, n = n || this, i || function() {
112 s ? (t.apply(n, r), s = !1, i = setTimeout(arguments.callee, e)) : i = null
113 }()
114 }
115 }
116 })
117 }(jQuery),
118 function(t) {
119 var e = "__" + +new Date + "storage",
120 n = function(e, n) {
121 return t.identify(e) + (n ? t.identify(n) : "")
122 },
123 i = {
124 buildEventName: function(t) {
125 return t
126 },
127 on: function(i, r, s, o, a) {
128 if ("string" == typeof i) {
129 t.isFunction(r) && (o = s, s = r, r = void 0);
130 for (var u, c = n(s, o), l = this[e] || (this[e] = {}), h = i.split(" "), d = 0; i = h[d++];)
131 if (i = this.buildEventName(i), u = l[i] || (l[i] = {
132 ids: {},
133 list: {}
134 }), !(c in u.ids)) {
135 var p = u.list,
136 m = {
137 fn: s,
138 data: r,
139 ctx: o,
140 special: a
141 };
142 p.last ? (p.last.next = m, m.prev = p.last) : p.first = m, u.ids[c] = p.last = m
143 }
144 } else {
145 var f = this;
146 t.each(i, function(t, e) {
147 f.on(t, e, r, a)
148 })
149 }
150 return this
151 },
152 onFirst: function(t, e, n, i) {
153 return this.on(t, e, n, i, {
154 one: !0
155 })
156 },
157 un: function(i, r, s) {
158 if ("string" == typeof i || "undefined" == typeof i) {
159 var o = this[e];
160 if (o)
161 if (i) {
162 for (var a, u = i.split(" "), c = 0; i = u[c++];)
163 if (i = this.buildEventName(i), a = o[i])
164 if (r) {
165 var l = n(r, s),
166 h = a.ids;
167 if (l in h) {
168 var d = a.list,
169 p = h[l],
170 m = p.prev,
171 f = p.next;
172 m ? m.next = f : p === d.first && (d.first = f), f ? f.prev = m : p === d.last && (d.last = m), delete h[l]
173 }
174 } else delete this[e][i]
175 } else delete this[e]
176 } else {
177 var _ = this;
178 t.each(i, function(t, e) {
179 _.un(t, e, s)
180 })
181 }
182 return this
183 },
184 trigger: function(n, i) {
185 var r, s = this,
186 o = s[e];
187 if ("string" == typeof n ? n = t.Event(s.buildEventName(r = n)) : n.type = s.buildEventName(r = n.type), n.target || (n.target = s), o && (o = o[n.type]))
188 for (var a, u = o.list.first; u;) n.data = u.data, a = u.fn.call(u.ctx || s, n, i), "undefined" != typeof a && (n.result = a, a === !1 && (n.preventDefault(), n.stopPropagation())), u.special && u.special.one && s.un(r, u.fn, u.ctx), u = u.next;
189 return this
190 }
191 };
192 t.observable = t.inherit(i, i)
193 }(jQuery),
194 function(t, e) {
195 function n(t, e, n) {
196 return (t ? "__elem_" + t : "") + "__mod" + (e ? "_" + e : "") + (n ? "_" + n : "")
197 }
198
199 function i(e, i, r) {
200 t.isFunction(e) ? i[n(r, "*", "*")] = e : t.each(e, function(e, s) {
201 t.isFunction(s) ? i[n(r, e, "*")] = s : t.each(s, function(t, s) {
202 i[n(r, e, t)] = s
203 })
204 })
205 }
206
207 function r(t, e) {
208 return e ? Array.isArray(e) ? function(n) {
209 for (var i = 0, r = e.length; r > i;)
210 if (n.hasMod(t, e[i++])) return !0;
211 return !1
212 } : function(n) {
213 return n.hasMod(t, e)
214 } : function(e) {
215 return e.hasMod(t)
216 }
217 }
218 var s = [],
219 o = {},
220 a = {};
221 this.BEM = t.inherit(t.observable, {
222 __constructor: function(t, e, n) {
223 var i = this;
224 i._modCache = t || {}, i._processingMods = {}, i._params = e, i.params = null, n !== !1 ? i._init() : i.afterCurrentEvent(function() {
225 i._init()
226 })
227 },
228 _init: function() {
229 return this._initing || this.hasMod("js", "inited") || (this._initing = !0, this.params || (this.params = t.extend(this.getDefaultParams(), this._params), delete this._params), this.setMod("js", "inited"), delete this._initing, this.hasMod("js", "inited") && this.trigger("init")), this
230 },
231 changeThis: function(t, e) {
232 return t.bind(e || this)
233 },
234 afterCurrentEvent: function(t, e) {
235 this.__self.afterCurrentEvent(this.changeThis(t, e))
236 },
237 trigger: function(t, e) {
238 return this.__base(t = this.buildEvent(t), e).__self.trigger(t, e), this
239 },
240 buildEvent: function(e) {
241 return "string" == typeof e && (e = t.Event(e)), e.block = this, e
242 },
243 hasMod: function(t, n, i) {
244 var r = arguments.length,
245 s = !1;
246 1 == r ? (i = "", n = t, t = e, s = !0) : 2 == r && ("string" == typeof t ? (i = n, n = t, t = e) : (i = "", s = !0));
247 var o = this.getMod(t, n) === i;
248 return s ? !o : o
249 },
250 getMod: function(t, e) {
251 var n = typeof t;
252 if ("string" === n || "undefined" === n) {
253 e = t || e;
254 var i = this._modCache;
255 return e in i ? i[e] : i[e] = this._extractModVal(e)
256 }
257 return this._getElemMod(e, t)
258 },
259 _getElemMod: function(t, e, n) {
260 return this._extractModVal(t, e, n)
261 },
262 getMods: function(t) {
263 var n = t && "string" != typeof t,
264 i = this,
265 r = [].slice.call(arguments, n ? 1 : 0),
266 s = i._extractMods(r, n ? t : e);
267 return n || (r.length ? r.forEach(function(t) {
268 i._modCache[t] = s[t]
269 }) : i._modCache = s), s
270 },
271 setMod: function(n, i, r) {
272 "undefined" == typeof r && (r = i, i = n, n = e);
273 var s = this;
274 if (!n || n[0]) {
275 var o = (n && n[0] ? t.identify(n[0]) : "") + "_" + i;
276 if (this._processingMods[o]) return s;
277 var a, u = n ? s._getElemMod(i, n, a = s.__self._extractElemNameFrom(n)) : s.getMod(i);
278 if (u === r) return s;
279 this._processingMods[o] = !0;
280 var c = !0,
281 l = [i, r, u];
282 n && l.unshift(n), [
283 ["*", "*"],
284 [i, "*"],
285 [i, r]
286 ].forEach(function(t) {
287 c = s._callModFn(a, t[0], t[1], l) !== !1 && c
288 }), !n && c && (s._modCache[i] = r), c && s._afterSetMod(i, r, u, n, a), delete this._processingMods[o]
289 }
290 return s
291 },
292 _afterSetMod: function(t, e, n, i, r) {},
293 toggleMod: function(t, n, i, r, s) {
294 "string" == typeof t && (s = r, r = i, i = n, n = t, t = e), "undefined" == typeof r ? r = "" : "boolean" == typeof r && (s = r, r = "");
295 var o = this.getMod(t, n);
296 return (o == i || o == r) && this.setMod(t, n, "boolean" == typeof s ? s ? i : r : this.hasMod(t, n, i) ? r : i), this
297 },
298 delMod: function(t, n) {
299 return n || (n = t, t = e), this.setMod(t, n, "")
300 },
301 _callModFn: function(t, i, r, s) {
302 var o = n(t, i, r);
303 return this[o] ? this[o].apply(this, s) : e
304 },
305 _extractModVal: function(t, e) {
306 return ""
307 },
308 _extractMods: function(t, e) {
309 return {}
310 },
311 channel: function(t, e) {
312 return this.__self.channel(t, e)
313 },
314 getDefaultParams: function() {
315 return {}
316 },
317 del: function(t) {
318 var e = [].slice.call(arguments);
319 return "string" == typeof t && e.unshift(this), this.__self.del.apply(this.__self, e), this
320 },
321 destruct: function() {}
322 }, {
323 _name: "i-bem",
324 blocks: o,
325 decl: function(n, s, a) {
326 if ("string" == typeof n ? n = {
327 block: n
328 } : n.name && (n.block = n.name), n.baseBlock && !o[n.baseBlock]) throw 'baseBlock "' + n.baseBlock + '" for "' + n.block + '" is undefined';
329 s || (s = {}), s.onSetMod && (i(s.onSetMod, s), delete s.onSetMod), s.onElemSetMod && (t.each(s.onElemSetMod, function(t, e) {
330 i(e, s, t)
331 }), delete s.onElemSetMod);
332 var u = o[n.baseBlock || n.block] || this;
333 if (n.modName) {
334 var c = r(n.modName, n.modVal);
335 t.each(s, function(n, i) {
336 t.isFunction(i) && (s[n] = function() {
337 var t;
338 if (c(this)) t = i;
339 else {
340 var r = u.prototype[n];
341 r && r !== s[n] && (t = this.__base)
342 }
343 return t ? t.apply(this, arguments) : e
344 })
345 })
346 }
347 if (a && "boolean" == typeof a.live) {
348 var l = a.live;
349 a.live = function() {
350 return l
351 }
352 }
353 var h;
354 return n.block == u._name ? (h = t.inheritSelf(u, s, a))._processLive(!0) : ((h = o[n.block] = t.inherit(u, s, a))._name = n.block, delete h._liveInitable), h
355 },
356 _processLive: function(t) {
357 return !1
358 },
359 create: function(t, e) {
360 return "string" == typeof t && (t = {
361 block: t
362 }), new o[t.block](t.mods, e)
363 },
364 getName: function() {
365 return this._name
366 },
367 _extractElemNameFrom: function(t) {},
368 afterCurrentEvent: function(t, e) {
369 1 == s.push({
370 fn: t,
371 ctx: e
372 }) && setTimeout(this._runAfterCurrentEventFns, 0)
373 },
374 _runAfterCurrentEventFns: function() {
375 var t = s.length;
376 if (t)
377 for (var e, n = s.splice(0, t); e = n.shift();) e.fn.call(e.ctx || this)
378 },
379 changeThis: function(t, e) {
380 return t.bind(e || this)
381 },
382 del: function(t) {
383 var e = "string" == typeof t,
384 n = e ? 0 : 1,
385 i = arguments.length;
386 for (e && (t = this); i > n;) delete t[arguments[n++]];
387 return this
388 },
389 channel: function(n, i) {
390 return "boolean" == typeof n && (i = n, n = e), n || (n = "default"), i ? void(a[n] && (a[n].un(), delete a[n])) : a[n] || (a[n] = new t.observable)
391 }
392 })
393 }(jQuery),
394 function() {
395 Object.keys || (Object.keys = function(t) {
396 var e = [];
397 for (var n in t) t.hasOwnProperty(n) && e.push(n);
398 return e
399 })
400 }(),
401 function() {
402 var t = Array.prototype,
403 e = Object.prototype.toString,
404 n = {
405 indexOf: function(t, e) {
406 e = +(e || 0);
407 var n = this,
408 i = n.length;
409 if (i > 0 && i > e)
410 for (e = 0 > e ? Math.ceil(e) : Math.floor(e), -i > e && (e = 0), 0 > e && (e += i); i > e;) {
411 if (e in n && n[e] === t) return e;
412 ++e
413 }
414 return -1
415 },
416 forEach: function(t, e) {
417 for (var n = -1, i = this, r = i.length; ++n < r;) n in i && (e ? t.call(e, i[n], n, i) : t(i[n], n, i))
418 },
419 map: function(t, e) {
420 for (var n = -1, i = this, r = i.length, s = new Array(r); ++n < r;) n in i && (s[n] = e ? t.call(e, i[n], n, i) : t(i[n], n, i));
421 return s
422 },
423 filter: function(t, e) {
424 for (var n = -1, i = this, r = i.length, s = []; ++n < r;) n in i && (e ? t.call(e, i[n], n, i) : t(i[n], n, i)) && s.push(i[n]);
425 return s
426 },
427 reduce: function(t, e) {
428 var n, i = -1,
429 r = this,
430 s = r.length;
431 if (arguments.length < 2) {
432 for (; ++i < s;)
433 if (i in r) {
434 n = r[i];
435 break
436 }
437 } else n = e;
438 for (; ++i < s;) i in r && (n = t(n, r[i], i, r));
439 return n
440 },
441 some: function(t, e) {
442 for (var n = -1, i = this, r = i.length; ++n < r;)
443 if (n in i && (e ? t.call(e, i[n], n, i) : t(i[n], n, i))) return !0;
444 return !1
445 },
446 every: function(t, e) {
447 for (var n = -1, i = this, r = i.length; ++n < r;)
448 if (n in i && !(e ? t.call(e, i[n], n, i) : t(i[n], n, i))) return !1;
449 return !0
450 }
451 };
452 for (var i in n) t[i] || (t[i] = n[i]);
453 Array.isArray || (Array.isArray = function(t) {
454 return "[object Array]" === e.call(t)
455 })
456 }(),
457 function() {
458 var t = Array.prototype.slice;
459 Function.prototype.bind || (Function.prototype.bind = function(e) {
460 var n = this,
461 i = t.call(arguments, 1);
462 return function() {
463 return n.apply(e, i.concat(t.call(arguments)))
464 }
465 })
466 }(),
467 function(t, e, n) {
468 function i(t, e, n) {
469 n.push(o, t, o, e)
470 }
471
472 function r(t, e, n, r) {
473 r.push(t), n && i(e, n, r)
474 }
475
476 function s(t, e, s, o, u) {
477 r(t, n, n, u), u.push(a, e), o && i(s, o, u)
478 }
479 var o = "_",
480 a = "__",
481 u = "[a-zA-Z0-9-]+";
482 t.INTERNAL = {
483 NAME_PATTERN: u,
484 MOD_DELIM: o,
485 ELEM_DELIM: a,
486 buildModPostfix: function(t, e, n) {
487 var r = n || [];
488 return i(t, e, r), n ? r : r.join("")
489 },
490 buildClass: function(t, e, i, o, a) {
491 var u = typeof i;
492 if ("string" == u ? "string" != typeof o && "number" != typeof o && (a = o, o = i, i = e, e = n) : "undefined" != u ? (a = i, i = n) : e && "string" != typeof e && (a = e, e = n), !(e || i || a)) return t;
493 var c = a || [];
494 return e ? s(t, e, i, o, c) : r(t, i, o, c), a ? c : c.join("")
495 },
496 buildClasses: function(t, i, o, a) {
497 i && "string" != typeof i && (a = o, o = i, i = n);
498 var u = a || [];
499 return i ? s(t, i, n, n, u) : r(t, n, n, u), o && e.each(o, function(e, n) {
500 n && (u.push(" "), i ? s(t, i, e, n, u) : r(t, e, n, u))
501 }), a ? u : u.join("")
502 }
503 }
504 }(BEM, jQuery),
505 function(t, e, n) {
506 function i(t, e, n) {
507 (t[e] || (t[e] = [])).unshift(n)
508 }
509
510 function r(t, e) {
511 return e.modName ? function(n) {
512 (n._curBlock.mods || {})[e.modName] === e.modVal && t(n)
513 } : t
514 }
515
516 function s(t, n) {
517 var i, r = e.isArray(n);
518 return e.isArray(t) ? r ? i = t.concat(n) : (i = t).push(n) : r ? (i = n).unshift(t) : i = [t, n], i
519 }
520
521 function o(t) {
522 return t.replace(m, function(t) {
523 return p[t]
524 })
525 }
526 var a = t.INTERNAL,
527 u = a.ELEM_DELIM,
528 c = {
529 area: 1,
530 base: 1,
531 br: 1,
532 col: 1,
533 command: 1,
534 embed: 1,
535 hr: 1,
536 img: 1,
537 input: 1,
538 keygen: 1,
539 link: 1,
540 meta: 1,
541 param: 1,
542 source: 1,
543 wbr: 1
544 },
545 l = a.buildClass,
546 h = a.buildClasses,
547 d = {},
548 p = {
549 '"': """,
550 "&": "&",
551 "<": "<",
552 ">": ">"
553 },
554 m = /["&<>]/g;
555 t.HTML = {
556 decl: function(t, n) {
557 "string" == typeof t && (t = {
558 block: t
559 }), t.name && (t.block = t.name);
560 var s = d[t.block] || (d[t.block] = {});
561 n.onBlock && i(s, "_block", r(n.onBlock, t)), n.onElem && (e.isFunction(n.onElem) ? i(s, "_elem", r(n.onElem, t)) : e.each(n.onElem, function(e, n) {
562 i(s, "_elem" + ("*" === e ? "" : u + e), r(n, t))
563 }))
564 },
565 build: function(t) {
566 var e = new this.Ctx(t);
567 return e._buildAll(), e._flush()
568 },
569 Ctx: e.inherit({
570 __constructor: function(t) {
571 this._buffer = [], this._params = t, this._tParams = null, this._tParamsChanges = null, this._curBlock = n
572 },
573 pos: function() {
574 return this._params._pos
575 },
576 isFirst: function() {
577 return 1 === this._params._pos
578 },
579 isLast: function() {
580 var t = this._params;
581 return t._pos === t._siblingsCount
582 },
583 params: function(t) {
584 var e = this;
585 return "undefined" == typeof t ? e._params : (e._params = t, e)
586 },
587 param: function(t, n, i, r) {
588 var s = this,
589 o = s._params;
590 return "undefined" == typeof n ? o[t] : (!i && t in o ? r && (o[t] = e.extend(n, o[t])) : o[t] = n, s)
591 },
592 attrs: function(t, e) {
593 return this.param("attrs", t, e, !0)
594 },
595 attr: function(t, e, n) {
596 var i = this;
597 if ("undefined" == typeof e) return (i._params.attrs || {})[t];
598 var r = i._params.attrs;
599 return r ? (n || !(t in r)) && (r[t] = e) : (i._params.attrs = {})[t] = e, i
600 },
601 tag: function(t, e) {
602 return this.param("tag", t, e)
603 },
604 cls: function(t, e) {
605 return this.param("cls", t, e)
606 },
607 mods: function(t, e) {
608 return this.param("mods", t, e, !0)
609 },
610 mod: function(t, e, n) {
611 var i = this;
612 if ("undefined" == typeof e) return (i._params.mods || {})[t];
613 var r = i._params.mods;
614 return r ? (n || !(t in r)) && (r[t] = e) : (i._params.mods = {})[t] = e, i
615 },
616 mix: function(t, e) {
617 var n = this,
618 i = n._params;
619 return "undefined" == typeof t ? i.mix : (!e && "mix" in i ? i.mix = i.mix.concat(t) : i.mix = t, n)
620 },
621 js: function(t) {
622 return this.param("js", t)
623 },
624 content: function(t, e) {
625 return this.param("content", t, e)
626 },
627 wrapContent: function(t) {
628 var e = this,
629 n = e._params;
630 return t.content = n.content, n.content = t, e
631 },
632 beforeContent: function(t) {
633 var e = this,
634 n = e._params;
635 return n.content = s(t, n.content), e
636 },
637 afterContent: function(t) {
638 var e = this,
639 n = e._params;
640 return n.content = s(n.content, t), e
641 },
642 wrap: function(t) {
643 var e = this,
644 n = e._params;
645 return t.block || (t._curBlock = e._curBlock), t.content = n._wrapper ? n._wrapper : n, n._wrapper = t, e
646 },
647 tParam: function(t, e) {
648 var n = this,
649 i = n._tParams || (n._tParams = {});
650 if ("undefined" == typeof e) return i[t];
651 var r = n._tParamsChanges || (n._tParamsChanges = {});
652 return t in r || (r[t] = i[t]), i[t] = e, n
653 },
654 generateId: function() {
655 return e.identify()
656 },
657 stop: function() {
658 this._params._isStopped = !0
659 },
660 _buildAll: function() {
661 var t = this,
662 n = t._buffer,
663 i = t._params,
664 r = typeof i;
665 if ("string" === r || "number" === r) n.push(i);
666 else if (e.isArray(i))
667 for (var s, o, a = 0, u = i.length; u > a;) t._params = s = i[a++], o = typeof s, "string" === o || "number" === o ? n.push(s) : s && (s._pos = a, s._siblingsCount = u, t._buildByDecl());
668 else i && (t._params._pos = t._params._siblingsCount = 1, t._buildByDecl())
669 },
670 _build: function() {
671 var t, n = this,
672 i = n._buffer,
673 r = n._params,
674 s = r.tag || "div",
675 a = r.block || r.elem,
676 u = a && (r.block || n._curBlock.block),
677 d = !1;
678 r.js && ((t = {})[l(u, r.elem)] = r.js === !0 ? {} : r.js, d = !r.elem), i.push("<", s), (a || r.cls) && (i.push(' class="'), a && (h(u, r.elem, r.mods, i), r.mix && e.each(r.mix, function(e, n) {
679 n && (i.push(" "), h(n.block, n.elem, n.mods, i), n.js && ((t || (t = {}))[l(n.block, n.elem)] = n.js === !0 ? {} : n.js, d || (d = !n.elem)))
680 })), r.cls && i.push(a ? " " : "", r.cls), d && i.push(" i-bem"), i.push('"')), t && i.push(' onclick="return ', o(JSON.stringify(t)), '"'), r.attrs && e.each(r.attrs, function(t, e) {
681 "undefined" != typeof e && null !== e && e !== !1 && i.push(" ", t, '="', e.toString().replace(/"/g, """), '"')
682 }), c[s] ? i.push("/>") : (i.push(">"), "undefined" != typeof r.content && (n._params = r.content, n._buildAll()), i.push("</", s, ">"))
683 },
684 _flush: function() {
685 var t = this._buffer.join("");
686 return delete this._buffer, t
687 },
688 _buildByDecl: function() {
689 var t = this,
690 n = t._curBlock,
691 i = t._params;
692 if (i._curBlock && (t._curBlock = i._curBlock), i.block && (t._curBlock = i), !i._wrapper) {
693 if (i.block || i.elem) {
694 var r = d[t._curBlock.block];
695 if (r) {
696 var s;
697 if (i.elem ? (s = r["_elem" + u + i.elem], r._elem && (s = s ? s.concat(r._elem) : r._elem)) : s = r._block, s)
698 for (var o, a = 0;
699 (o = s[a++]) && (o(t), !i._isStopped););
700 }
701 }
702 if (i._wrapper) return i._curBlock = t._curBlock, t._params = i._wrapper, t._buildAll()
703 }
704 var c = t._tParamsChanges;
705 if (t._tParamsChanges = null, t._build(), t._curBlock = n, c) {
706 var l = t._tParams;
707 e.each(c, function(t, e) {
708 "undefined" == typeof e ? delete l[t] : l[t] = e
709 })
710 }
711 }
712 })
713 }
714 }(BEM, jQuery),
715 function(t) {
716 if (!window.JSON) {
717 var e, n = Object.prototype.toString,
718 i = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
719 r = {
720 "\b": "\\b",
721 " ": "\\t",
722 "\n": "\\n",
723 "\f": "\\f",
724 "\r": "\\r",
725 '"': '\\"',
726 "\\": "\\\\"
727 };
728 window.JSON = {
729 stringify: e = function(s) {
730 if (null === s) return "null";
731 if ("undefined" == typeof s) return t;
732 switch (n.call(s)) {
733 case "[object String]":
734 return i.lastIndex = 0, '"' + (i.test(s) ? s.replace(i, function(t) {
735 var e = r[t];
736 return "string" == typeof e ? e : "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice(-4)
737 }) : s) + '"';
738 case "[object Number]":
739 case "[object Boolean]":
740 return "" + s;
741 case "[object Array]":
742 for (var o, a = "[", u = 0, c = s.length; c > u;) o = e(s[u]), a += (u++ ? "," : "") + ("undefined" == typeof o ? "null" : o);
743 return a + "]";
744 case "[object Object]":
745 if ("[object Function]" === n.call(s.toJSON)) return e(s.toJSON());
746 var o, a = "{",
747 u = 0;
748 for (var l in s) s.hasOwnProperty(l) && (o = e(s[l]), "undefined" != typeof o && (a += (u++ ? "," : "") + '"' + l + '":' + o));
749 return a + "}";
750 default:
751 return t
752 }
753 },
754 parse: function(t) {
755 return Function("return " + t)()
756 }
757 }
758 }
759 }(), jQuery.cookie = function(t, e, n) {
760 if ("undefined" == typeof e) {
761 var i = null;
762 if (document.cookie && "" != document.cookie)
763 for (var r = document.cookie.split(";"), s = 0; s < r.length; s++) {
764 var o = jQuery.trim(r[s]);
765 if (o.substring(0, t.length + 1) == t + "=") {
766 i = decodeURIComponent(o.substring(t.length + 1));
767 break
768 }
769 }
770 return i
771 }
772 n = n || {}, null === e && (e = "", n.expires = -1);
773 var a = "";
774 if (n.expires && ("number" == typeof n.expires || n.expires.toUTCString)) {
775 var u;
776 "number" == typeof n.expires ? (u = new Date, u.setTime(u.getTime() + 24 * n.expires * 60 * 60 * 1e3)) : u = n.expires, a = "; expires=" + u.toUTCString()
777 }
778 var c = n.path ? "; path=" + n.path : "",
779 l = n.domain ? "; domain=" + n.domain : "",
780 h = n.secure ? "; secure" : "";
781 document.cookie = [t, "=", encodeURIComponent(e), a, c, l, h].join("")
782 },
783 function(t) {
784 function e(t) {
785 return t.replace(/%.{2}/g, function(t) {
786 return i[t] || t
787 })
788 }
789
790 function n(t, n) {
791 var i = "";
792 try {
793 i = t(n)
794 } catch (r) {
795 try {
796 i = t(e(n))
797 } catch (r) {
798 i = n
799 }
800 }
801 return i
802 }
803 var i = {
804 "%D0": "%D0%A0",
805 "%C0": "%D0%90",
806 "%C1": "%D0%91",
807 "%C2": "%D0%92",
808 "%C3": "%D0%93",
809 "%C4": "%D0%94",
810 "%C5": "%D0%95",
811 "%A8": "%D0%81",
812 "%C6": "%D0%96",
813 "%C7": "%D0%97",
814 "%C8": "%D0%98",
815 "%C9": "%D0%99",
816 "%CA": "%D0%9A",
817 "%CB": "%D0%9B",
818 "%CC": "%D0%9C",
819 "%CD": "%D0%9D",
820 "%CE": "%D0%9E",
821 "%CF": "%D0%9F",
822 "%D1": "%D0%A1",
823 "%D2": "%D0%A2",
824 "%D3": "%D0%A3",
825 "%D4": "%D0%A4",
826 "%D5": "%D0%A5",
827 "%D6": "%D0%A6",
828 "%D7": "%D0%A7",
829 "%D8": "%D0%A8",
830 "%D9": "%D0%A9",
831 "%DA": "%D0%AA",
832 "%DB": "%D0%AB",
833 "%DC": "%D0%AC",
834 "%DD": "%D0%AD",
835 "%DE": "%D0%AE",
836 "%DF": "%D0%AF",
837 "%E0": "%D0%B0",
838 "%E1": "%D0%B1",
839 "%E2": "%D0%B2",
840 "%E3": "%D0%B3",
841 "%E4": "%D0%B4",
842 "%E5": "%D0%B5",
843 "%B8": "%D1%91",
844 "%E6": "%D0%B6",
845 "%E7": "%D0%B7",
846 "%E8": "%D0%B8",
847 "%E9": "%D0%B9",
848 "%EA": "%D0%BA",
849 "%EB": "%D0%BB",
850 "%EC": "%D0%BC",
851 "%ED": "%D0%BD",
852 "%EE": "%D0%BE",
853 "%EF": "%D0%BF",
854 "%F0": "%D1%80",
855 "%F1": "%D1%81",
856 "%F2": "%D1%82",
857 "%F3": "%D1%83",
858 "%F4": "%D1%84",
859 "%F5": "%D1%85",
860 "%F6": "%D1%86",
861 "%F7": "%D1%87",
862 "%F8": "%D1%88",
863 "%F9": "%D1%89",
864 "%FA": "%D1%8A",
865 "%FB": "%D1%8B",
866 "%FC": "%D1%8C",
867 "%FD": "%D1%8D",
868 "%FE": "%D1%8E",
869 "%FF": "%D1%8F"
870 };
871 t.extend({
872 decodeURI: function(t) {
873 return n(decodeURI, t)
874 },
875 decodeURIComponent: function(t) {
876 return n(decodeURIComponent, t)
877 }
878 })
879 }(jQuery),
880 function(t, e, n) {
881 function i(t, n) {
882 var i = t[0];
883 e.each(a(i), function(o, a) {
884 s(a, i, o, n);
885 var u = m[a.uniqId];
886 u ? u.domElem.index(i) < 0 && (u.domElem = u.domElem.add(t), e.extend(u._params, a)) : r(o, t, a)
887 })
888 }
889
890 function r(t, i, r, o, u) {
891 "boolean" == typeof r && (u = o, o = r, r = n);
892 var c = i[0];
893 r = s(r || a(c)[t], c, t);
894 var l = r.uniqId;
895 if (m[l]) return m[l]._init();
896 p[l] = p[l] ? p[l].add(i) : i;
897 var h = c.parentNode;
898 h && 11 !== h.nodeType || e.unique(p[l]);
899 var d = g[t] || B.decl(t, {}, {
900 live: !0
901 });
902 if (!(d._liveInitable = !!d._processLive()) || o || r.live === !1) {
903 o && i.addClass("i-bem");
904 var f = new d(p[l], r, !!o);
905 return delete p[l], u && u.apply(f, M.call(arguments, 4)), f
906 }
907 }
908
909 function s(t, n, i, r) {
910 (t || (t = {})).uniqId || (t.uniqId = (t.id ? i + "-id-" + t.id : e.identify()) + (r || e.identify()));
911 var s = e.identify(n),
912 o = f[s] || (f[s] = {});
913 return o[i] || (o[i] = t), t
914 }
915
916 function o(t, e, n) {
917 var i = t.find(e);
918 return n ? i : i.add(t.filter(e))
919 }
920
921 function a(t) {
922 var n = e.identify(t);
923 return f[n] || (f[n] = u(t))
924 }
925
926 function u(t) {
927 var n, i, r = t.getAttribute("data-bem");
928 return r ? JSON.parse(r) : (n = t.onclick || t.ondblclick, n || "body" != t.tagName.toLowerCase() || (i = e(t), r = i.attr("onclick") || i.attr("ondblclick"), r && (n = Function(r))), n ? n() : {})
929 }
930
931 function c(t) {
932 delete f[e.identify(t)]
933 }
934
935 function l(t, e) {
936 1 === t.domElem.length ? t.destruct(!0) : t.domElem = t.domElem.not(e)
937 }
938 var h = e(window),
939 d = e(document),
940 p = {},
941 m = {},
942 f = {},
943 _ = {},
944 b = {},
945 g = t.blocks,
946 y = t.INTERNAL,
947 v = y.NAME_PATTERN,
948 k = y.MOD_DELIM,
949 w = y.ELEM_DELIM,
950 x = y.buildClass,
951 M = Array.prototype.slice,
952 E = Array.prototype.reverse;
953 e.fn.bem = function(t, e) {
954 return r(t, this, e, !0)
955 };
956 var B = t.DOM = t.decl("i-bem__dom", {
957 __constructor: function(t, n, i) {
958 var r = this;
959 r.domElem = t, r._eventNameCache = {}, r._elemCache = {}, m[r._uniqId = n.uniqId || e.identify(r)] = r, r._needSpecialUnbind = !1, r.__base(null, n, i)
960 },
961 findBlocksInside: function(t, e) {
962 return this._findBlocks("find", t, e)
963 },
964 findBlockInside: function(t, e) {
965 return this._findBlocks("find", t, e, !0)
966 },
967 findBlocksOutside: function(t, e) {
968 return this._findBlocks("parents", t, e)
969 },
970 findBlockOutside: function(t, e) {
971 return this._findBlocks("closest", t, e)[0] || null
972 },
973 findBlocksOn: function(t, e) {
974 return this._findBlocks("", t, e)
975 },
976 findBlockOn: function(t, e) {
977 return this._findBlocks("", t, e, !0)
978 },
979 _findBlocks: function(t, i, s, o) {
980 if (!this.domElem) return [];
981 s || (s = i, i = n);
982 var a = i ? "string" == typeof i ? this.findElem(i) : i : this.domElem,
983 u = "string" == typeof s,
984 c = u ? s : s.block || s.blockName,
985 l = "." + (u ? x(c) : x(c, s.modName, s.modVal)) + (o ? ":first" : ""),
986 h = a.filter(l);
987 if (t && (h = h.add(a[t](l))), o) return h[0] ? r(c, h.eq(0), !0) : null;
988 var d = [],
989 p = {};
990 return e.each(h, function(t, n) {
991 var i = r(c, e(n), !0);
992 p[i._uniqId] || (p[i._uniqId] = !0, d.push(i))
993 }), d
994 },
995 bindToDomElem: function(t, n, i) {
996 var r = this;
997 return i ? t.bind(r._buildEventName(n), function(t) {
998 return (t.data || (t.data = {})).domElem = e(this), i.apply(r, arguments)
999 }) : e.each(n, function(e, n) {
1000 r.bindToDomElem(t, e, n)
1001 }), r
1002 },
1003 bindToDoc: function(t, e) {
1004 return this._needSpecialUnbind = !0, this.bindToDomElem(d, t, e)
1005 },
1006 bindToWin: function(t, e) {
1007 var n, i, r = e;
1008 return "resize" === t && (e = function() {
1009 var t = h.height(),
1010 e = h.width();
1011 n === t && i === e || (n = t, i = e, r.apply(this, arguments))
1012 }), this._needSpecialUnbind = !0, this.bindToDomElem(h, t, e)
1013 },
1014 bindTo: function(t, n, i) {
1015 return !n || e.isFunction(n) ? (i = n, n = t, t = this.domElem) : "string" == typeof t && (t = this.elem(t)), this.bindToDomElem(t, n, i)
1016 },
1017 unbindFromDomElem: function(t, e) {
1018 return t.unbind(this._buildEventName(e)), this
1019 },
1020 unbindFromDoc: function(t) {
1021 return this.unbindFromDomElem(d, t)
1022 },
1023 unbindFromWin: function(t) {
1024 return this.unbindFromDomElem(h, t)
1025 },
1026 unbindFrom: function(t, e) {
1027 return e ? "string" == typeof t && (t = this.elem(t)) : (e = t, t = this.domElem), this.unbindFromDomElem(t, e)
1028 },
1029 _buildEventName: function(t) {
1030 var e = this;
1031 return t.indexOf(" ") > 1 ? t.split(" ").map(function(t) {
1032 return e._buildOneEventName(t)
1033 }).join(" ") : e._buildOneEventName(t)
1034 },
1035 _buildOneEventName: function(t) {
1036 var e = this,
1037 n = e._eventNameCache;
1038 if (t in n) return n[t];
1039 var i = "." + e._uniqId;
1040 if (t.indexOf(".") < 0) return n[t] = t + i;
1041 var r = ".bem_" + e.__self._name;
1042 return n[t] = t.split(".").map(function(t, e) {
1043 return 0 == e ? t + r : r + "_" + t
1044 }).join("") + i
1045 },
1046 trigger: function(t, e) {
1047 return this.__base(t = this.buildEvent(t), e).domElem && this._ctxTrigger(t, e), this
1048 },
1049 _ctxTrigger: function(t, n) {
1050 var i = this,
1051 r = _[i.__self._buildCtxEventName(t.type)],
1052 s = {};
1053 r && i.domElem.each(function() {
1054 for (var o = this, a = r.counter; o && a;) {
1055 var u = e.identify(o, !0);
1056 if (u) {
1057 if (s[u]) break;
1058 var c = r.ctxs[u];
1059 c && (e.each(c, function(e, r) {
1060 r.fn.call(r.ctx || i, t, n)
1061 }), a--), s[u] = !0
1062 }
1063 o = o.parentNode
1064 }
1065 })
1066 },
1067 setMod: function(t, n, i) {
1068 if (t && "undefined" != typeof i && t.length > 1) {
1069 var r = this;
1070 return t.each(function() {
1071 var s = e(this);
1072 s.__bemElemName = t.__bemElemName, r.setMod(s, n, i)
1073 }), r
1074 }
1075 return this.__base(t, n, i)
1076 },
1077 _extractModVal: function(t, e, n) {
1078 var i, r = (e || this.domElem)[0];
1079 return r && (i = r.className.match(this.__self._buildModValRE(t, n || e))), i ? i[2] : ""
1080 },
1081 _extractMods: function(t, e) {
1082 var n = {},
1083 i = !t.length,
1084 r = 0;
1085 return ((e || this.domElem)[0].className.match(this.__self._buildModValRE("(" + (i ? v : t.join("|")) + ")", e, "g")) || []).forEach(function(t) {
1086 var e = (t = t.trim()).lastIndexOf(k),
1087 i = t.substr(0, e - 1).lastIndexOf(k);
1088 n[t.substr(i + 1, e - i - 1)] = t.substr(e + 1), ++r
1089 }), r < t.length && t.forEach(function(t) {
1090 t in n || (n[t] = "")
1091 }), n
1092 },
1093 _afterSetMod: function(t, n, i, r, s) {
1094 if (!this._isDestructing) {
1095 var o = this.__self,
1096 a = o._buildModClassPrefix(t, s),
1097 u = o._buildModValRE(t, s),
1098 c = "" === n;
1099 (r || this.domElem).each(function() {
1100 var t = this.className;
1101 t.indexOf(a) > -1 ? this.className = t.replace(u, c ? "" : "$1" + a + n) : c || e(this).addClass(a + n)
1102 }), s && this.dropElemCache(s, t, i).dropElemCache(s, t, n)
1103 }
1104 },
1105 findElem: function(t, e, n, i) {
1106 arguments.length % 2 ? (i = n, n = e, e = t, t = this.domElem) : "string" == typeof t && (t = this.findElem(t)), e = e.split(" ");
1107 var r = this.__self.getName(),
1108 s = e.map(function(t) {
1109 return x(r, t, n, i)
1110 }),
1111 a = 1 === s.length,
1112 u = "." + (a ? s[0] : s.join(",.")),
1113 c = o(t, u);
1114 return 1 === t.length && this.domElem && 1 === this.domElem.length && t[0] === this.domElem[0] && s.forEach(function(t, n) {
1115 (this._elemCache[t] = a ? c : c.filter("." + t)).__bemElemName = e[n]
1116 }, this), c
1117 },
1118 _elem: function(t, e, n) {
1119 return this._elemCache[x(this.__self.getName(), t, e, n)] || this.findElem(t, e, n)
1120 },
1121 elem: function(t, n, i) {
1122 if (n && "string" != typeof n) return n.__bemElemName = t, n;
1123 if (t.indexOf(" ") < 0) return this._elem(t, n, i);
1124 var r = e([]),
1125 s = this;
1126 return t.split(" ").forEach(function(t) {
1127 r = r.add(s._elem(t, n, i))
1128 }), r
1129 },
1130 dropElemCache: function(t, e, n) {
1131 if (t) {
1132 var i = this.__self.getName();
1133 t.split(" ").forEach(function(t) {
1134 delete this._elemCache[x(i, t, e, n)]
1135 }, this)
1136 } else this._elemCache = {};
1137 return this
1138 },
1139 elemParams: function(t) {
1140 var e;
1141 return "string" == typeof t ? (e = t, t = this.elem(t)) : e = this.__self._extractElemNameFrom(t), u(t[0])[x(this.__self.getName(), e)] || {}
1142 },
1143 elemify: function(t, n) {
1144 return (t = e(t)).__bemElemName = n, t
1145 },
1146 containsDomElem: function(t) {
1147 var e = !1;
1148 return this.domElem.each(function() {
1149 return !(e = t.parents().andSelf().index(this) > -1)
1150 }), e
1151 },
1152 buildSelector: function(t, e, n) {
1153 return this.__self.buildSelector(t, e, n)
1154 },
1155 destruct: function(t) {
1156 var n = this,
1157 i = n.__self;
1158 n._isDestructing || (n._isDestructing = !0, n._needSpecialUnbind && i.doc.add(i.win).unbind("." + n._uniqId), n.dropElemCache().domElem.each(function(t, n) {
1159 var i = a(n);
1160 e.each(i, function(t, e) {
1161 var i = m[e.uniqId];
1162 i ? i._isDestructing || l(i, n) : delete p[e.uniqId]
1163 }), c(n)
1164 }), t || n.domElem.remove(), delete m[n.un()._uniqId], delete n.domElem, delete n._elemCache, n.__base())
1165 }
1166 }, {
1167 scope: null,
1168 doc: d,
1169 win: h,
1170 _processLive: function(t) {
1171 var e = this,
1172 n = e._liveInitable;
1173 if ("live" in e) {
1174 var i = "undefined" == typeof n;
1175 if (i ^ t) {
1176 n = e.live() !== !1;
1177 var r = e.getName(),
1178 s = e.live;
1179 e.live = function() {
1180 return this.getName() === r ? n : s.apply(this, arguments)
1181 }
1182 }
1183 }
1184 return n
1185 },
1186 init: function(t, n, r) {
1187 t && !e.isFunction(t) || (r = n, n = t, t = d);
1188 var s = e.identify();
1189 return o(t, ".i-bem").each(function() {
1190 i(e(this), s)
1191 }), n && this.afterCurrentEvent(function() {
1192 n.call(r || this, t)
1193 }), this._runAfterCurrentEventFns(), t
1194 },
1195 destruct: function(t, i, r) {
1196 "boolean" != typeof t && (r = i, i = t, t = n), E.call(o(i, ".i-bem", r)).each(function(t, n) {
1197 var i = a(this);
1198 e.each(i, function(t, e) {
1199 if (e.uniqId) {
1200 var i = m[e.uniqId];
1201 i ? l(i, n) : delete p[e.uniqId]
1202 }
1203 }), c(this)
1204 }), t || (r ? i.empty() : i.remove())
1205 },
1206 update: function(t, e, n, i) {
1207 return this.destruct(t, !0), this.init(t.html(e), n, i)
1208 },
1209 replace: function(t, n) {
1210 return this.destruct(!0, t), this.init(e(n).replaceAll(t))
1211 },
1212 append: function(t, n) {
1213 return this.init(e(n).appendTo(t))
1214 },
1215 prepend: function(t, n) {
1216 return this.init(e(n).prependTo(t))
1217 },
1218 before: function(t, n) {
1219 return this.init(e(n).insertBefore(t))
1220 },
1221 after: function(t, n) {
1222 return this.init(e(n).insertAfter(t))
1223 },
1224 _buildCtxEventName: function(t) {
1225 return this._name + ":" + t
1226 },
1227 _liveClassBind: function(t, n, i, r) {
1228 var s = this;
1229 if (n.indexOf(" ") > -1) n.split(" ").forEach(function(e) {
1230 s._liveClassBind(t, e, i, r)
1231 });
1232 else {
1233 var o = b[n],
1234 a = e.identify(i);
1235 o || (o = b[n] = {}, d.bind(n, s.changeThis(s._liveClassTrigger, s))), o = o[t] || (o[t] = {
1236 uniqIds: {},
1237 fns: []
1238 }), a in o.uniqIds || (o.fns.push({
1239 uniqId: a,
1240 fn: s._buildLiveEventFn(i, r)
1241 }), o.uniqIds[a] = o.fns.length - 1)
1242 }
1243 return this
1244 },
1245 _liveClassUnbind: function(t, n, i) {
1246 var r = b[n];
1247 if (r)
1248 if (i) {
1249 if (r = r[t]) {
1250 var s = e.identify(i);
1251 if (s in r.uniqIds) {
1252 var o = r.uniqIds[s],
1253 a = r.fns.length - 1;
1254 for (r.fns.splice(o, 1); a > o;) r.uniqIds[r.fns[o++].uniqId] = o - 1;
1255 delete r.uniqIds[s]
1256 }
1257 }
1258 } else delete r[t];
1259 return this
1260 },
1261 _liveClassTrigger: function(t) {
1262 var n = b[t.type];
1263 if (n) {
1264 var i = t.target,
1265 r = [];
1266 for (var s in n) n.hasOwnProperty(s) && r.push(s);
1267 do
1268 for (var o = " " + i.className + " ", a = 0; s = r[a++];)
1269 if (o.indexOf(" " + s + " ") > -1) {
1270 for (var u, c = 0, l = n[s].fns, h = !1; u = l[c++];) u.fn.call(e(i), t) === !1 && (h = !0);
1271 if (h && t.preventDefault(), h || t.isPropagationStopped()) return;
1272 r.splice(--a, 1)
1273 }
1274 while (r.length && (i = i.parentNode))
1275 }
1276 },
1277 _buildLiveEventFn: function(t, n) {
1278 var i = this;
1279 return function(s) {
1280 var o = [i._name, ((s.data || (s.data = {})).domElem = e(this)).closest(i.buildSelector()), !0],
1281 a = r.apply(null, n ? o.concat([t, s]) : o);
1282 return a && !n && t ? t.apply(a, arguments) : void 0
1283 }
1284 },
1285 liveInitOnEvent: function(t, e, n) {
1286 return this.liveBindTo(t, e, n, !0)
1287 },
1288 liveBindTo: function(t, i, r, s) {
1289 i && !e.isFunction(i) || (r = i, i = t, t = n), t && "string" != typeof t || (t = {
1290 elem: t
1291 }), t.elemName && (t.elem = t.elemName);
1292 var o = this;
1293 return t.elem && t.elem.indexOf(" ") > 0 ? (t.elem.split(" ").forEach(function(e) {
1294 o._liveClassBind(x(o._name, e, t.modName, t.modVal), i, r, s)
1295 }), o) : o._liveClassBind(x(o._name, t.elem, t.modName, t.modVal), i, r, s)
1296 },
1297 liveUnbindFrom: function(t, i, r) {
1298 i && !e.isFunction(i) || (r = i, i = t, t = n);
1299 var s = this;
1300 return t && t.indexOf(" ") > 1 ? (t.split(" ").forEach(function(t) {
1301 s._liveClassUnbind(x(s._name, t), i, r)
1302 }), s) : s._liveClassUnbind(x(s._name, t), i, r)
1303 },
1304 _liveInitOnBlockEvent: function(t, e, n, i) {
1305 var r = this._name;
1306 return g[e].on(t, function(t) {
1307 if (t.block.domElem) {
1308 var e = arguments,
1309 s = t.block[i](r);
1310 n && s.forEach(function(t) {
1311 n.apply(t, e)
1312 })
1313 }
1314 }), this
1315 },
1316 liveInitOnBlockEvent: function(t, e, n) {
1317 return this._liveInitOnBlockEvent(t, e, n, "findBlocksOn")
1318 },
1319 liveInitOnBlockInsideEvent: function(t, e, n) {
1320 return this._liveInitOnBlockEvent(t, e, n, "findBlocksOutside")
1321 },
1322 liveInitOnBlockInit: function(t, e) {
1323 return this.liveInitOnBlockEvent("init", t, e)
1324 },
1325 liveInitOnBlockInsideInit: function(t, e) {
1326 return this.liveInitOnBlockInsideEvent("init", t, e)
1327 },
1328 on: function(t, e, n, i, r) {
1329 return t.jquery ? this._liveCtxBind(t, e, n, i, r) : this.__base(t, e, n, i)
1330 },
1331 un: function(t, e, n, i) {
1332 return t.jquery ? this._liveCtxUnbind(t, e, n, i) : this.__base(t, e, n)
1333 },
1334 liveCtxBind: function(t, e, n, i, r) {
1335 return this._liveCtxBind(t, e, n, i, r)
1336 },
1337 _liveCtxBind: function(t, i, r, s, o) {
1338 var a = this;
1339 if ("string" == typeof i)
1340 if (e.isFunction(r) && (o = s, s = r, r = n), i.indexOf(" ") > -1) i.split(" ").forEach(function(e) {
1341 a._liveCtxBind(t, e, r, s, o)
1342 });
1343 else {
1344 var u = a._buildCtxEventName(i),
1345 c = _[u] || (_[u] = {
1346 counter: 0,
1347 ctxs: {}
1348 });
1349 t.each(function() {
1350 var t = e.identify(this),
1351 n = c.ctxs[t];
1352 n || (n = c.ctxs[t] = {}, ++c.counter), n[e.identify(s) + (o ? e.identify(o) : "")] = {
1353 fn: s,
1354 data: r,
1355 ctx: o
1356 }
1357 })
1358 }
1359 else e.each(i, function(e, n) {
1360 a._liveCtxBind(t, e, n, r)
1361 });
1362 return a
1363 },
1364 liveCtxUnbind: function(t, e, n, i) {
1365 return this._liveCtxUnbind(t, e, n, i)
1366 },
1367 _liveCtxUnbind: function(t, n, i, r) {
1368 var s = this,
1369 o = _[n = s._buildCtxEventName(n)];
1370 return o && (t.each(function() {
1371 var t, n = e.identify(this, !0);
1372 n && (t = o.ctxs[n]) && (i && delete t[e.identify(i) + (r ? e.identify(r) : "")], i && !e.isEmptyObject(t) || (o.counter--, delete o.ctxs[n]))
1373 }), o.counter || delete _[n]), s
1374 },
1375 _extractElemNameFrom: function(t) {
1376 if (t.__bemElemName) return t.__bemElemName;
1377 var e = t[0].className.match(this._buildElemNameRE());
1378 return e ? e[1] : n
1379 },
1380 extractParams: u,
1381 _buildModClassPrefix: function(t, e) {
1382 return x(this._name) + (e ? w + ("string" == typeof e ? e : this._extractElemNameFrom(e)) : "") + k + t + k
1383 },
1384 _buildModValRE: function(t, e, n) {
1385 return new RegExp("(\\s|^)" + this._buildModClassPrefix(t, e) + "(" + v + ")(?=\\s|$)", n)
1386 },
1387 _buildElemNameRE: function() {
1388 return new RegExp(this._name + w + "(" + v + ")(?:\\s|$)")
1389 },
1390 buildSelector: function(t, e, n) {
1391 return "." + x(this._name, t, e, n)
1392 },
1393 getBlockByUniqId: function(t) {
1394 return m[t]
1395 },
1396 getWindowSize: function() {
1397 return {
1398 width: h.width(),
1399 height: h.height()
1400 }
1401 }
1402 });
1403 e(function() {
1404 t.DOM.scope = e("body")
1405 })
1406 }(BEM, jQuery),
1407 function() {
1408 String.prototype.trim || (String.prototype.trim = function() {
1409 for (var t = this.replace(/^\s\s*/, ""), e = /\s/, n = t.length; e.test(t.charAt(--n)););
1410 return t.slice(0, n + 1)
1411 })
1412 }(), BEM.DOM.decl("i-global", {
1413 onSetMod: {
1414 js: function() {
1415 this.del(this.__self._params = $.extend({}, this.params), "uniqId", "name");
1416 var t = this.__self._params;
1417 t["passport-msg"] || (t["passport-msg"] = t.id), void 0 === t["show-counters"] && (t["show-counters"] = Math.round(100 * Math.random()) <= t["show-counters-percent"]), t.locale = t.lang, $(function() {
1418 t.oframebust && Lego.oframebust(t.oframebust)
1419 })
1420 }
1421 },
1422 getDefaultParams: function() {
1423 return {
1424 id: "",
1425 login: Lego.isSessionValid() ? $.cookie("yandex_login") || "" : "",
1426 yandexuid: $.cookie("yandexuid"),
1427 lang: "ru",
1428 tld: "ru",
1429 retpath: encodeURI($.decodeURI(location.href)),
1430 "passport-host": "https://passport.yandex.ru",
1431 "pass-host": "https://pass.yandex.ru",
1432 "social-host": "https://social.yandex.ru",
1433 "lego-path": "/lego",
1434 "show-counters-percent": 100
1435 }
1436 }
1437 }, {
1438 param: function(t, e) {
1439 return "undefined" == typeof e ? (this._params || {})[t] : void(this._params && (this._params[t] = e))
1440 }
1441 }),
1442 function(t) {
1443 t || (t = window.Lego = {}), t.isSessionValid = function() {
1444 return !!t.getCookie("yandex_login")
1445 }
1446 }(window.Lego),
1447 function(t) {
1448 function e(t) {
1449 return t.replace(/^(?:https?:)?\/\//, "")
1450 }
1451 t || (t = window.Lego = {}), !t.params && (t.params = {}), t.c = function(t, n, i) {
1452 i = i || {};
1453 var r = e(i.host || BEM.blocks["i-global"].param("click-host") || "clck.yandex.ru"),
1454 s = function(t, e, n, i) {
1455 return e = e.replace("'", "%27"), e.indexOf("/dtype=") > -1 ? e : location.protocol + "//" + r + "/" + n + "/dtype=" + t + "/rnd=" + ((new Date).getTime() + Math.round(100 * Math.random())) + (i ? "/*" + (e.match(/^http/) ? e : location.protocol + "//" + location.host + (e.match("^/") ? e : "/" + e)) : "/*data=" + encodeURIComponent("url=" + encodeURIComponent(e.match(/^http/) ? e : location.protocol + "//" + location.host + (e.match("^/") ? e : "/" + e))))
1456 },
1457 o = function() {
1458 var e = document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0],
1459 r = document.createElement("script");
1460 r.setAttribute("src", s(t, i.useLinkHref && Object(n).href ? n.href : location.href, "jclck")), e.insertBefore(r, e.firstChild)
1461 };
1462 if (n)
1463 if (n.className.match(/b-link_pseudo_yes/) || n.href && n.href.match(/^mailto:/) || i.noRedirect === !0) o();
1464 else if (n.href) {
1465 var a = n.href;
1466 n.href = s(t, a, "redir"), setTimeout(function() {
1467 n.href = a
1468 }, 500)
1469 } else if (n.form)
1470 if (n.type.match(/submit|button|image/)) {
1471 var a = n.form.action;
1472 n.form.action = s(t, a, "redir", !0), setTimeout(function() {
1473 n.form.action = a
1474 }, 500)
1475 } else o();
1476 else {
1477 if (!n.action) throw "counter.js: not link and not form!";
1478 n.action = s(t, n.action, "redir", !0)
1479 } else o()
1480 }
1481 }(window.Lego),
1482 function(t, e) {
1483 t || (t = window.Lego = {}), t.cp = function(n, i, r, s, o, a) {
1484 "string" == typeof s || (a = o, o = s, s = e), t.c("stred/pid=" + n + "/cid=" + i + (r ? "/path=" + r + (s ? "/vars=" + s : "") : ""), o, a)
1485 }
1486 }(window.Lego),
1487 function(t) {
1488 t || (t = window.Lego = {}), t.ch = function(e, n, i) {
1489 BEM.blocks["i-global"].param("show-counters") && t.cp(0, 2219, e, n, i)
1490 }
1491 }(window.Lego),
1492 function(t) {
1493 t || (t = window.Lego = {}), t.getCookie = function(t) {
1494 var e = document.cookie;
1495 if (e.length < 1) return !1;
1496 var n = e.indexOf(t + "=");
1497 if (-1 === n) return !1;
1498 n += t.length + 1;
1499 var i = e.indexOf(";", n);
1500 return decodeURIComponent(-1 === i ? e.substring(n) : e.substring(n, i))
1501 }
1502 }(window.Lego),
1503 function(t, e) {
1504 e || (e = window.Lego = {}), e.init || (e.init = function(n) {
1505 return (n = e.params = t.extend({
1506 id: "",
1507 login: e.isSessionValid() ? e.getCookie("yandex_login") || "" : "",
1508 yandexuid: e.getCookie("yandexuid"),
1509 locale: "ru",
1510 retpath: window.location.toString(),
1511 "passport-host": "https://passport.yandex.ru",
1512 "pass-host": "https://pass.yandex.ru",
1513 "passport-msg": n.id,
1514 "social-host": "https://social.yandex.ru",
1515 "lego-path": "/lego",
1516 "show-counters-percent": 100
1517 }, n, e.params))["show-counters"] = Math.round(100 * Math.random()) <= n["show-counters-percent"], BEM.blocks["i-global"]._params || t.extend(BEM.blocks["i-global"]._params = {}, n), t(function() {
1518 n.oframebust && e.oframebust(n.oframebust)
1519 }), n
1520 }), e.block || (e.block = {}), e.blockInit || (e.blockInit = function(n, i) {
1521 n = n || document, i = i || ".g-js", t(n).find(i).each(function() {
1522 var n = t(this),
1523 i = this.onclick ? this.onclick() : {},
1524 r = i.name || "",
1525 s = e.block[r];
1526 s && !n.data(r) && (s.call(n, i), n.data(r, !0).addClass(r + "_js_inited"))
1527 })
1528 }), e.blockInitBinded || (e.blockInitBinded = !!t(document).ready(function() {
1529 e.blockInit()
1530 }))
1531 }(jQuery, window.Lego),
1532 function(t, e) {
1533 var n = 1,
1534 i = !1;
1535 if ("deviceXDPI" in screen && "logicalXDPI" in screen ? n = screen.deviceXDPI / screen.logicalXDPI : "devicePixelRatio" in t && (n = t.devicePixelRatio), "function" == typeof t.matchMedia) {
1536 var r = "only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 124dpi)";
1537 i = t.matchMedia(r).matches
1538 } else i = n >= 1.3;
1539 var s = {};
1540 /msie|trident/i.test(e) ? s.ie = parseInt(e.split(/msie|rv:/i)[1], 10) : t.opera && (s.opera = parseInt(t.opera.version(), 10));
1541 var o, a = {},
1542 u = {};
1543 (o = e.match(/Windows\sPhone[^\d]*\s([\d.]+)/)) ? a.wp = o[1]: (o = e.match(/Android\s+([\d.]+)/)) ? a.android = o[1] : e.match(/\sHTC[\s_].*AppleWebKit/) ? a.android = "2.3" : (o = e.match(/iPhone\sOS\s([\d_]+)/)) ? (a.ios = o[1].replace(/_/g, "."), u.iphone = !0) : (o = e.match(/iPad.*OS\s([\d_]+)/)) ? (a.ios = o[1].replace(/_/g, "."), u.ipad = !0) : (o = e.match(/Bada\/([\d.]+)/)) ? a.bada = o[1] : (o = e.match(/MSIE\s9/)) ? a.wp = "7.5" : a.other = !0, BEM.DOM.decl("i-ua", {
1544 onSetMod: {
1545 js: function() {
1546 var t = this.__self,
1547 e = "other";
1548 ["ios", "android", "bada", "wp", "opera"].some(function(n) {
1549 return t[n] && (e = n)
1550 }), this.setMod("platform", e), t.hiDpi && this.setMod("hi-dpi", "yes")
1551 }
1552 }
1553 }, {
1554 ios: a.ios,
1555 iphone: u.iphone,
1556 ipad: u.ipad,
1557 android: a.android,
1558 bada: a.bada,
1559 wp: a.wp,
1560 other: a.other,
1561 dpr: n,
1562 hiDpi: i,
1563 ua: e,
1564 ie: s.ie,
1565 opera: s.opera
1566 })
1567 }(window, navigator.userAgent),
1568 function(t) {
1569 t || (t = window.Lego = {}), t.messages = t.messages || {}, t.message = function(e, n) {
1570 return "ru" === t.params.locale ? n : t.messages[e] || n
1571 }
1572 }(window.Lego), $(function() {
1573 BEM.afterCurrentEvent(function() {
1574 BEM.DOM.init()
1575 })
1576 }),
1577 function() {
1578 var t = {
1579 9: "tab",
1580 13: "enter",
1581 32: "space",
1582 33: "page up",
1583 34: "page down",
1584 35: "end",
1585 36: "home",
1586 37: "left arrow",
1587 38: "up arrow",
1588 39: "right arrow",
1589 40: "down arrow",
1590 46: "delete"
1591 },
1592 e = {
1593 27: "escape"
1594 };
1595 BEM.DOM.decl({
1596 block: "i-ua",
1597 modName: "interaction",
1598 modVal: "yes"
1599 }, {
1600 onSetMod: {
1601 js: {
1602 inited: function() {
1603 this.bindTo("mousedown", this._onPointer).bindTo("keydown", this._onKeyboard)
1604 }
1605 }
1606 },
1607 _onPointer: function() {
1608 this.interaction = "pointer", this.domElem.attr("data-interaction", "pointer"), this.unbindFrom("mousedown")
1609 },
1610 _onKeyboard: function(n) {
1611 var i = n.keyCode;
1612 return e[i] ? void this._onPointer() : void(t[i] && "keyboard" !== this.interaction && (this.domElem.attr("data-interaction", "keyboard"), this.interaction = "keyboard", this.bindTo("mousedown", this._onPointer)))
1613 }
1614 })
1615 }(),
1616 function(t) {
1617 var e = "yandex_ru",
1618 n = "tnsCounterTns_" + e,
1619 i = "tnscounter_callback";
1620 t.decl("b-statcounter__tns", {
1621 onSetMod: {
1622 js: function() {
1623 this.__self.loadTns(), this.addCounter(this.params)
1624 }
1625 },
1626 addCounter: function(t) {
1627 var e = window[i] || (window[i] = []),
1628 r = function() {
1629 try {
1630 window[n] = new TNS.TnsCounter(t)
1631 } catch (e) {}
1632 };
1633 window[n] ? r() : e.push(r)
1634 },
1635 getDefaultParams: function() {
1636 return {
1637 account: e
1638 }
1639 }
1640 }, {
1641 loadTns: function() {
1642 var t = window.TNS && TNS.Counter,
1643 e = "https:" === document.location.protocol ? "https:" : "http:",
1644 n = "//www.tns-counter.ru/tcounter.js";
1645 !t && $("script")[0].parentNode.appendChild($("<script>").attr({
1646 type: "text/javascript",
1647 async: !0,
1648 src: e + n
1649 })[0]), this.loadTns = function() {}
1650 }
1651 })
1652 }(BEM.DOM),
1653 function(t) {
1654 t.decl("b-statcounter__metrika", {
1655 onSetMod: {
1656 js: function() {
1657 this.__self.loadMetrika(), this.addCounter(this.params)
1658 }
1659 },
1660 addCounter: function(t) {
1661 var e = window.Ya && Ya.Metrika,
1662 n = window.yandex_metrika_callbacks || (window.yandex_metrika_callbacks = []),
1663 i = function() {
1664 window["yaCounter" + t.id] = new Ya.Metrika(t)
1665 };
1666 if (!t.id) throw new Error([BEM.I18N("b-statcounter__metrika", "JSERR_incorrectID"), "block: " + this.__self.getName(), "method: addCounter"].join("\n"));
1667 e ? i() : n.push(i)
1668 },
1669 getDefaultParams: function() {
1670 return {
1671 enableAll: !0
1672 }
1673 }
1674 }, {
1675 loadMetrika: function() {
1676 var t = window.Ya && Ya.Metrika,
1677 e = "https:" === document.location.protocol ? "https:" : "http:",
1678 n = "//mc.yandex.ru/metrika/watch.js";
1679 !t && $("script")[0].parentNode.appendChild($("<script>").attr({
1680 type: "text/javascript",
1681 async: !0,
1682 src: e + n
1683 })[0]), this.loadMetrika = function() {}
1684 }
1685 })
1686 }(BEM.DOM),
1687 function(t) {
1688 t.queryParam = function(t) {
1689 var e = RegExp("[?&]" + t + "=([^&]*)").exec(location.search);
1690 return e && decodeURIComponent(e[1].replace(/\+/g, " "))
1691 }
1692 }(jQuery), BEM.DOM.decl("i-redir", {
1693 onSetMod: {
1694 js: function() {
1695 this.redir = this.findBlockOutside("b-page").findBlockInside("redir"), this.bindTo("click", this._click)
1696 }
1697 },
1698 _click: function() {
1699 this.redir.send(this.params.event)
1700 }
1701 }),
1702 function(t, e, n) {
1703 t.DOM.decl("b-page", {
1704 onSetMod: {
1705 js: function() {
1706 this.bindTo("mousedown", function() {
1707 this.setMod("pressed", "yes")
1708 }).bindTo("mouseup dragend", function() {
1709 this.delMod("pressed")
1710 })
1711 }
1712 }
1713 })
1714 }(BEM, jQuery),
1715 function(t) {
1716 t = t || {}, t.oframebustMatchDomain = function(t, e) {
1717 t = "[object Array]" === Object.prototype.toString.call(t) ? t : function() {
1718 var e = [];
1719 for (var n in t) t.hasOwnProperty(n) && e.push(n);
1720 return e
1721 }();
1722 for (var n = 0, i = t.length; i > n; n++) {
1723 var r = t[n];
1724 if ("string" == typeof r) {
1725 if (/(\?|\*)/.test(r)) {
1726 var s = r.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".{1}");
1727 if (new RegExp("^" + s + "$").test(e)) return !0
1728 } else if (e === r) return !0
1729 } else try {
1730 if (r.test(e)) return !0
1731 } catch (o) {}
1732 }
1733 }
1734 }(window.Lego),
1735 function(t) {
1736 t = t || {}, t.oframebust = function(e) {
1737 if (window.top.location !== window.location) {
1738 var n = document.referrer.match(/^https?:\/\/([^:\/\s]+)\/?.*/);
1739 if (!n) return;
1740 !t.oframebustMatchDomain(e, n[1]) && (window.top.location = window.location)
1741 }
1742 }
1743 }(window.Lego), BEM.DOM.decl("header2", {
1744 onSetMod: {
1745 js: {
1746 inited: function() {
1747 this._openedPanel = null
1748 }
1749 }
1750 },
1751 _setOpenedPanel: function(t) {
1752 var e = this._openedPanel;
1753 e !== t && (this._openedPanel = t, this.trigger("panel-switch", {
1754 closing: e,
1755 opening: t
1756 }))
1757 },
1758 getOpenedPanel: function() {
1759 return this._openedPanel
1760 },
1761 openPanel: function(t) {
1762 return this._setOpenedPanel(t), this
1763 },
1764 closePanel: function(t) {
1765 return t && t !== this._openedPanel || this._setOpenedPanel(null), this
1766 },
1767 togglePanel: function(t, e) {
1768 return t !== this._openedPanel || e ? (t !== this._openedPanel && e || arguments.length < 2) && this._setOpenedPanel(t) : this._setOpenedPanel(null), this
1769 }
1770 }), BEM.DOM.decl("header2", {
1771 onSetMod: {
1772 js: function() {
1773 this.__base.apply(this, arguments), this._$logo = this.elem("logo"), this._$text = this.findBlockInside({
1774 block: "input",
1775 modName: "after-nameplate",
1776 modVal: "yes"
1777 }), this._page = this.findBlockOutside("b-page"), this._domain = BEM.blocks["i-global"].param("tld"), this._delay = 300, this._headerNode = this.domElem[0], this.tableau = $.Tableau({
1778 preset: this._domain,
1779 domain: this._domain,
1780 lang: BEM.I18N.lang(),
1781 serviceId: "weather",
1782 zIndex: 102
1783 }), this.tableau._reposition(), this.params.isTouch || this._bindLogoEvents(), this.bindTo("click", function(t) {
1784 $(t.target).closest(".header2__logo").length || this._closeTableau()
1785 }), this.bindTo(this._$logo, "mouseover click touchstart", function(t) {
1786 this.params.isTouch ? "click" !== t.type || this.tableau.isOpened() || (t.preventDefault(), this._openTableau()) : this._$text.on("change", this._updateTableau.bind(this))
1787 }), this._$text.on("focus change", this._closeTableau.bind(this))
1788 }
1789 },
1790 _bindLogoEvents: function() {
1791 var t, e = this,
1792 n = function() {
1793 clearTimeout(t), t = setTimeout(function() {
1794 e._openTableau(), e._$logo.off("mousemove", n)
1795 }, e._delay)
1796 };
1797 this._$logo.on("mouseover", function() {
1798 n(), e._$logo.on("mousemove", n)
1799 }).on("mousedown", function() {
1800 clearTimeout(t)
1801 }).on("mouseleave", function() {
1802 clearTimeout(t), e._$logo.off("mousemove", n)
1803 })
1804 },
1805 _openTableau: function() {
1806 var t = this,
1807 e = !t.params.isTouch && $(".suggest_type_weather").hasClass("popup_visibility_visible");
1808 if (t.tableau && !e && !t._page.hasMod("pressed")) {
1809 t.channel("tableau").trigger("open"), t._updateTableau(), t.tableau.setPos(t._getPos()), t.tableau.open();
1810 var n = $(document.body),
1811 i = function(e) {
1812 var r = $(e.target);
1813 r.closest(".header2").length || r.closest(".tableau").length || (t._closeTableau(), n.off("mouseover", i))
1814 };
1815 n.on("mouseover touchstart", i)
1816 }
1817 },
1818 _closeTableau: function() {
1819 var t = this;
1820 t.tableau && setTimeout(function() {
1821 t.tableau.close()
1822 }, t._delay)
1823 },
1824 _updateTableau: function() {
1825 this.tableau && this.tableau.setSearchText(this._$text.val())
1826 },
1827 _getPos: function() {
1828 var t = this._headerNode.clientHeight + this._headerNode.offsetTop;
1829 return $(".alert-weather").length && t--, {
1830 left: this.elem("logo").find(".image")[0].offsetLeft,
1831 top: t
1832 }
1833 }
1834 }), BEM.DOM.decl("header2", {
1835 onSetMod: {
1836 js: function() {
1837 this.__base.apply(this, arguments), this.findBlockInside("search2_template_service").bindTo("submit", function(t) {
1838 this.domElem[0].request.value || t.preventDefault()
1839 })
1840 }
1841 }
1842 }), BEM.DOM.decl("link", {
1843 getDefaultParams: function() {
1844 return {
1845 origTabindex: "0"
1846 }
1847 },
1848 onSetMod: {
1849 disabled: function(t, e) {
1850 var n = "yes" === e;
1851 this.domElem.attr({
1852 "aria-disabled": n,
1853 tabindex: n ? -1 : this.params.origTabindex
1854 })
1855 }
1856 }
1857 }),
1858 function(t) {
1859 var e = t.event.special.leftclick = {
1860 setup: function() {
1861 t(this).bind("click", e.handler)
1862 },
1863 teardown: function() {
1864 t(this).unbind("click", e.handler)
1865 },
1866 handler: function(e) {
1867 e.button || (e.type = "leftclick", t.event.dispatch.apply(this, arguments), e.type = "click")
1868 }
1869 }
1870 }(jQuery),
1871 function() {
1872 BEM.DOM.decl("i-ua", {}, {
1873 placeholder: "placeholder" in document.createElement("input")
1874 })
1875 }(), BEM.DOM.decl("input", {
1876 onSetMod: {
1877 js: function() {
1878 this._val = this.elem("control").val()
1879 },
1880 disabled: {
1881 "*": function(t, e) {
1882 this.elem("control").attr("disabled", "yes" === e)
1883 },
1884 yes: function() {
1885 this.delMod("focused")
1886 }
1887 },
1888 focused: function(t, e) {
1889 if (this.hasMod("disabled", "yes")) return !1;
1890 var n = "yes" === e;
1891 n ? this._focused || this._focus() : this._focused && this._blur(), this.afterCurrentEvent(function() {
1892 this.trigger(n ? "focus" : "blur")
1893 })
1894 }
1895 },
1896 isDisabled: function() {
1897 return this.hasMod("disabled", "yes")
1898 },
1899 val: function(t, e) {
1900 var n = "undefined" != typeof t,
1901 i = this.elem("control");
1902 return t = n ? null === t ? "" : t.toString() : i.val(), this._val !== t && (this._val = t, i.val() !== t && i.val(t), this.trigger("change", e)), n ? this : t
1903 },
1904 name: function(t) {
1905 var e = this.elem("control");
1906 return arguments.length ? (e.attr("name", t), this) : e.attr("name")
1907 },
1908 getSelectionEnd: function() {
1909 var t = this.elem("control")[0],
1910 e = 0;
1911 if ("number" == typeof t.selectionEnd) e = t.selectionEnd;
1912 else {
1913 var n = document.selection.createRange();
1914 if (n && n.parentElement() === t) {
1915 var i = t.value.length,
1916 r = t.createTextRange();
1917 r.moveToBookmark(n.getBookmark());
1918 var s = t.createTextRange();
1919 s.collapse(!1), e = r.compareEndPoints("EndToEnd", s) > -1 ? i : -r.moveEnd("character", -i)
1920 }
1921 }
1922 return e
1923 },
1924 _onFocus: function() {
1925 return this._focused = !0, this.setMod("focused", "yes")
1926 },
1927 _onBlur: function() {
1928 return this._returnFocus ? (this.afterCurrentEvent(function() {
1929 this._focus()
1930 }), this) : this.hasMod(this.elem("clear"), "pressed") ? this : (this._focused = !1, this.delMod("focused"))
1931 },
1932 _focus: function() {
1933 return this.hasMod("disabled", "yes") ? !1 : void this.elem("control").focus()
1934 },
1935 _blur: function() {
1936 this._returnFocus = !1, this.elem("control").blur()
1937 },
1938 destruct: function() {
1939 this._blur(), this.__base.apply(this, arguments)
1940 }
1941 }, {
1942 live: function() {
1943 this.liveBindTo("control", "focusin focusout", function(t) {
1944 this["focusin" === t.type ? "_onFocus" : "_onBlur"](t)
1945 })
1946 }
1947 }),
1948 function() {
1949 var t, e = [],
1950 n = function() {
1951 e.forEach(function(t) {
1952 t.val(t.elem("control").val())
1953 })
1954 };
1955 BEM.DOM.decl("input", {
1956 onSetMod: {
1957 js: {
1958 inited: function() {
1959 this.__base.apply(this, arguments), this._instanceIndex = e.push(this) - 1;
1960 var i = this.elem("control"),
1961 r = $.dom.getActiveElement(),
1962 s = this.params.autoFocus && !r.is("input, textarea");
1963 (r[0] === i[0] || s) && (this.setMod("focused", "yes")._focused = !0), t || (t = this.channel("sys").on({
1964 tick: n,
1965 idle: function() {
1966 t.un("tick", n)
1967 },
1968 wakeup: function() {
1969 t.on("tick", n)
1970 }
1971 })), this.params.shortcut && this.bindToDoc("keydown", function(t) {
1972 t.ctrlKey && 38 === t.which && !$(t.target).is("input, textarea") && this.setMod("focused", "yes")
1973 })
1974 }
1975 }
1976 },
1977 _focus: function() {
1978 var t = this.elem("control")[0];
1979 if (t.createTextRange && !t.selectionStart) {
1980 var e = t.createTextRange();
1981 e.move("character", t.value.length), e.select()
1982 } else t.focus()
1983 },
1984 destruct: function() {
1985 this.__base.apply(this, arguments), this.params.shortcut && this.unbindFromDoc("keydown"), e.splice(this._instanceIndex, 1), e.slice(this._instanceIndex).forEach(function(t) {
1986 t._instanceIndex--
1987 })
1988 }
1989 }, {})
1990 }(),
1991 function() {
1992 var t, e = 0,
1993 n = !1,
1994 i = 0,
1995 r = BEM.channel("sys"),
1996 s = 50;
1997 BEM.decl("i-system", {}, {
1998 start: function() {
1999 $(document).bind("mousemove keydown", function() {
2000 i = 0, n && (n = !1, r.trigger("wakeup"))
2001 }), this._tick()
2002 },
2003 _tick: function() {
2004 var o = this;
2005 r.trigger("tick", {
2006 counter: e++
2007 }), !n && (i += s) > 3e3 && (n = !0, r.trigger("idle")), t = setTimeout(function() {
2008 o._tick()
2009 }, s)
2010 }
2011 }).start()
2012 }(), BEM.DOM.decl("input", {
2013 onSetMod: {
2014 js: function() {
2015 this.__base.apply(this, arguments), this.on("change", this._updateClear)._updateClear()
2016 }
2017 },
2018 _onBoxClear: function() {
2019 this.hasMod("clear", "visibility", "visible") || this.hasMod("disabled", "yes") || this.setMod("focused", "yes")
2020 },
2021 _onClearClick: function() {
2022 return this.trigger("clear"), this.removeInsets && this.removeInsets(), this.clearInput({
2023 source: "clear"
2024 })._focus()
2025 },
2026 clearInput: function(t) {
2027 return this.val("", t), this
2028 },
2029 _updateClear: function() {
2030 return this.toggleMod(this.elem("clear"), "visibility", "visible", "", !!this._val)
2031 }
2032 }, {
2033 live: function() {
2034 this.__base.apply(this, arguments), this.liveBindTo("clear", "mousedown", function(t) {
2035 1 === t.which && this.setMod(this.elem("clear"), "pressed", "yes")
2036 }).liveBindTo("clear", "leftclick tap", function() {
2037 this.delMod(this.elem("clear"), "pressed"), this._onClearClick()
2038 }).liveBindTo("box", "leftclick tap", function() {
2039 this._onBoxClear()
2040 })
2041 }
2042 }),
2043 function(t) {
2044 t.dom = {
2045 getActiveElement: function() {
2046 try {
2047 return t(document.activeElement)
2048 } catch (e) {
2049 return t()
2050 }
2051 }
2052 }, t.fn.isFocused = function() {
2053 return this.is(t.dom.getActiveElement())
2054 }
2055 }(jQuery), BEM.DOM.decl("button", {
2056 onSetMod: {
2057 js: function() {
2058 var t = this.isDisabled(),
2059 e = this.domElem;
2060 (this._href = e.attr("href")) && t && e.removeAttr("href")
2061 },
2062 disabled: function(t, e) {
2063 var n = "yes" === e,
2064 i = this.domElem;
2065 n && this.delMod("hovered"), this._href && (n ? i.removeAttr("href") : i.attr("href", this._href)), this.afterCurrentEvent(function() {
2066 i.attr("disabled", n)
2067 })
2068 },
2069 pressed: function(t, e) {
2070 return this.isDisabled() ? !1 : void this.trigger("yes" === e ? "press" : "release")
2071 }
2072 },
2073 isDisabled: function() {
2074 return this.hasMod("disabled", "yes")
2075 },
2076 url: function(t) {
2077 return "undefined" == typeof t ? this._href : (this._href = t, this.isDisabled() || this.domElem.attr("href", t), this)
2078 },
2079 _onClick: function(t) {
2080 this.isDisabled() ? t.preventDefault() : this.afterCurrentEvent(function() {
2081 this.trigger("click")
2082 })
2083 }
2084 }, {
2085 live: function() {
2086 this.liveBindTo("leftclick tap", function(t) {
2087 this._onClick(t)
2088 })
2089 }
2090 }), BEM.DOM.decl("button", {
2091 onSetMod: {
2092 js: function() {
2093 this.__base.apply(this, arguments)
2094 },
2095 focused: {
2096 yes: function() {
2097 return this.isDisabled() ? !1 : (this.bindToWin("unload", function() {
2098 this.delMod("focused")
2099 }).bindTo("keydown", this._onKeyDown), this._isControlFocused() || this._getControl().focus(), void this.trigger("focus"))
2100 },
2101 "": function() {
2102 this.unbindFromWin("unload").unbindFrom("keydown"), this._isControlFocused() && this._getControl().blur(), this.trigger("blur")
2103 }
2104 },
2105 disabled: function(t, e) {
2106 this.__base.apply(this, arguments), "yes" === e && this.domElem.keyup()
2107 },
2108 hovered: function(t, e) {
2109 return this.isDisabled() ? !1 : void("" === e && this.delMod("pressed"))
2110 },
2111 pressed: function() {
2112 return this.isDisabled() || this.setMod("focused", "yes"), this.__base.apply(this, arguments)
2113 }
2114 },
2115 _getControl: function() {
2116 return this.elem("control").length && this.elem("control") || this.domElem
2117 },
2118 _isControlFocused: function() {
2119 try {
2120 return this.containsDomElem($(this.__self.doc[0].activeElement))
2121 } catch (t) {
2122 return !1
2123 }
2124 },
2125 _onKeyDown: function(t) {
2126 var e = t.keyCode;
2127 13 !== e && 32 !== e || this._keyDowned || (this._keyDowned = !0, this.setMod("pressed", "yes").bindTo("keyup", function() {
2128 this.delMod("pressed").unbindFrom("keyup"), delete this._keyDowned, 32 === e && this.domElem.attr("href") && (document.location = this.domElem.attr("href"))
2129 }))
2130 },
2131 destruct: function() {
2132 this.delMod("focused"), this.__base.apply(this, arguments)
2133 }
2134 }, {
2135 live: function() {
2136 this.__base.apply(this, arguments);
2137 var t = {
2138 mouseover: {
2139 name: "hovered",
2140 val: "yes"
2141 },
2142 mouseout: {
2143 name: "hovered"
2144 },
2145 mousedown: {
2146 name: "pressed",
2147 val: "yes"
2148 },
2149 mouseup: {
2150 name: "pressed"
2151 },
2152 focusin: {
2153 name: "focused",
2154 val: "yes"
2155 },
2156 focusout: {
2157 name: "focused"
2158 }
2159 },
2160 e = 8 === BEM.blocks["i-ua"].ie;
2161 this.liveBindTo("mouseover mouseout mouseup focusin focusout", function(n) {
2162 var i = t[n.type];
2163 this.setMod(i.name, i.val || ""), !e || this._href || "mouseup" !== n.type && "mouseout" !== n.type || this.domElem.height()
2164 }).liveBindTo("mousedown", function(e) {
2165 var n = t[e.type];
2166 1 === e.which && this.setMod(n.name, n.val || "")
2167 })
2168 }
2169 }),
2170 function() {
2171 function t() {
2172 n.hasClass("pointerfocus") && (r = !0, setTimeout(function() {
2173 r = !1
2174 }))
2175 }
2176 var e = $(window),
2177 n = $(document.documentElement),
2178 i = 0,
2179 r = !1;
2180 document.documentMode <= 9 ? n.on("focusin", function(e) {
2181 var n = e.originalEvent;
2182 !n || n.fromElement || n.relatedTarget || t()
2183 }) : e.on("blur", function() {
2184 e.one("focus", t)
2185 }), n.addClass("utilityfocus").on({
2186 focusin: function() {
2187 n.toggleClass("pointerfocus", r).toggleClass("utilityfocus", !r)
2188 },
2189 keydown: function() {
2190 clearTimeout(i), r = !1
2191 },
2192 "mousedown touchstart mouseup click": function() {
2193 r = !0, clearTimeout(i), i = setTimeout(function() {
2194 r = !1
2195 }, 600)
2196 }
2197 })
2198 }(), BEM.DOM.decl("user", {
2199 onSetMod: {
2200 js: function() {
2201 this.__base.apply(this, arguments);
2202 var t = this.findBlockOn("enter", "button");
2203 if (null !== t) {
2204 var e = this.domElem.prop("tabindex");
2205 this.domElem.attr({
2206 tabindex: -1,
2207 role: "group"
2208 }).removeAttr("aria-haspopup aria-expanded"), t.domElem.attr("tabindex", e), this._domik = BEM.create("domik_type_popup", {
2209 mods: this.params.domikMods,
2210 js: this.params.domikJs,
2211 hidden: this.findBlockInside({
2212 block: "domik",
2213 modName: "type",
2214 modVal: "hidden"
2215 })
2216 }), t.bindTo("leftclick tap", function(t) {
2217 t.preventDefault(), this._domik.open()
2218 }.bind(this))
2219 }
2220 }
2221 },
2222 destruct: function() {
2223 this._domik && this._domik.destruct(), this.__base.apply(this, arguments)
2224 }
2225 }), BEM.DOM.decl({
2226 name: "button",
2227 modName: "pseudo",
2228 modVal: "yes"
2229 }, {
2230 _onClick: function(t) {
2231 this.__base.apply(this, arguments), this._href && t.preventDefault()
2232 }
2233 }), BEM.decl("domik_type_popup", {
2234 destruct: function() {
2235 this._form && this._form.destruct(), this._popup && this._popup.destruct(), this.__base.apply(this, arguments)
2236 },
2237 create: function() {
2238 if (this._created) return this;
2239 var t, e, n = this.__self,
2240 i = n._buildTypePopup(this._uniqId, this.params.mods, this.params.js),
2241 r = $(BEMHTML.apply(i)),
2242 s = this.params.hidden;
2243 if (BEM.DOM.append(BEM.DOM.scope, r), e = this._popup = r.bem("popup"), t = this._form = this._popup.findBlockInside("auth"), s) {
2244 var o = s.domElem;
2245 t.getUsernameBlock().val(o.find("input[name=login]").change().val()), t.getPasswordBlock().val(o.find("input[name=passwd]").change().val()), delete this.params.hidden, s.destruct()
2246 }
2247 return this._created = !0, this
2248 },
2249 open: function() {
2250 return BEM.blocks["i-global"].param("login") ? this : (this._created || this.create(), this.close(), this._popup.show(), this.afterCurrentEvent(function() {
2251 BEM.blocks["i-ua"].ios || this._form.getUsernameBlock().setMod("focused", "yes"), this._form.redraw()
2252 }), this)
2253 },
2254 close: function() {
2255 return this._popup.hide(), this
2256 },
2257 isOpened: function() {
2258 return this._popup && this._popup.isShown() || !1
2259 },
2260 getFormBlock: function() {
2261 return this._form
2262 }
2263 }, {
2264 _buildTypePopup: function(t, e, n) {
2265 var i = (n || {}).explain;
2266 return {
2267 block: "popup",
2268 mix: [{
2269 block: "domik",
2270 elem: "popup"
2271 }],
2272 mods: {
2273 type: "modal",
2274 position: "fixed",
2275 "body-scroll": "no",
2276 theme: "ffffff"
2277 },
2278 underMods: {
2279 type: "paranja"
2280 },
2281 content: {
2282 elem: "content",
2283 content: {
2284 block: "domik",
2285 js: $.extend({
2286 _uniqId: t
2287 }, n),
2288 mods: $.extend({
2289 type: "popup"
2290 }, e),
2291 content: [i ? {
2292 elem: "explain",
2293 content: i
2294 } : "", {
2295 block: "auth",
2296 mods: {
2297 content: "auto"
2298 }
2299 }]
2300 }
2301 }
2302 }
2303 }
2304 }), BEM.DOM.decl("popup", {
2305 getDefaultParams: function() {
2306 var t = {
2307 left: 15,
2308 right: 15,
2309 top: 15,
2310 bottom: 15
2311 };
2312 return {
2313 directions: [{
2314 to: "bottom",
2315 axis: "center",
2316 tail: {
2317 axis: "center"
2318 }
2319 }, {
2320 to: "top",
2321 axis: "center",
2322 tail: {
2323 axis: "center"
2324 }
2325 }, {
2326 to: "right",
2327 axis: "middle",
2328 tail: {
2329 axis: "middle"
2330 }
2331 }, {
2332 to: "left",
2333 axis: "middle",
2334 tail: {
2335 axis: "middle"
2336 }
2337 }],
2338 tail: {
2339 width: 24.04,
2340 height: 12.02,
2341 offset: t
2342 },
2343 duration: 150
2344 }
2345 },
2346 onSetMod: {
2347 js: function() {
2348 this._cache = {}, this._viewport = BEM.DOM.win, this._scope = BEM.DOM.scope, this._channel = BEM.channel("popups"), this._inContainer = !1, this._isParentFixed = !1, this._owner = null, this._userPosition = null, this._parent = null, this._childs = [], this._isShown = !1, this._isHiding = !1, this._positions = {}, this._currPos = {}, this._visibilityFactor = null, this._direction = !1, this._directions = {};
2349 var t = this.getDefaultParams(),
2350 e = this.params,
2351 n = this._repackDirParams(t.directions),
2352 i = e.generateDirections ? this._generateDirections : e.directions,
2353 r = this._repackDirParams(i);
2354 e.tail && (this.params.tail = this._mergeParams(t.tail, e.tail)), this._order = r.keys.map(function(t) {
2355 var e = r.directions[t],
2356 i = n.directions[t];
2357 return i || (i = n.directions[e.to]), this._directions[t] = this._mergeParams(i, e, {
2358 tail: this._tailParamsHook
2359 }), t
2360 }, this)
2361 },
2362 visibility: {
2363 visible: function() {
2364 this._onShown()
2365 },
2366 "": function() {
2367 this._onHidden()
2368 }
2369 }
2370 },
2371 show: function(t) {
2372 var e;
2373 if (t instanceof BEM) e = t.domElem.eq(0);
2374 else if (t instanceof $) e = t;
2375 else if (!t) return;
2376 if (e) {
2377 this._owner && e[0] !== this._owner[0] && this.delMod("visibility"), this._owner = e;
2378 var n = this._findParent(e);
2379 n && this.setParent(n)
2380 } else this._userPosition = t;
2381 return this.setMod("visibility", "outside").repaint()
2382 },
2383 hide: function() {
2384 if (this._isHiding) return this;
2385 if (this._isShown && (this._isHiding = !0, this._childs.forEach(function(t) {
2386 t.hide()
2387 }), this.hasMod("animate", "yes") && !this.hasMod("fade-out", "no"))) {
2388 var t = this;
2389 return this.beforeHide(function() {
2390 t.domElem && t.delMod("visibility")
2391 }), this
2392 }
2393 return this.delMod("visibility")
2394 },
2395 toggle: function(t) {
2396 return this._isShown && !this._isHiding ? this.hide() : this.show(t || this._owner)
2397 },
2398 repaint: function() {
2399 this._moveToContainer();
2400 var t = this._pickDirection();
2401 return this.setMod("to", t.to)._show(this._positions[t.key], this._tailPos && this._tailPos[t.key]), this
2402 },
2403 repaintShadowIfNeeded: function() {
2404 return this
2405 },
2406 getCurrPos: function() {
2407 return this._currPos
2408 },
2409 getCurrDirection: function() {
2410 return this._direction
2411 },
2412 setContent: function(t) {
2413 return BEM.DOM.update(this.elem("content"), t), this._resetDefault(), this._isShown && this.repaint(), this
2414 },
2415 isShown: function() {
2416 return this._isShown
2417 },
2418 setParent: function(t) {
2419 return this._parent = t, this._isParentFixed = t.hasMod("position", "fixed"), t.addChild(this), this
2420 },
2421 addChild: function(t) {
2422 for (var e = this._childs, n = e.length, i = 0; n > i; i++)
2423 if (e[i]._uniqId === t._uniqId) return;
2424 t.on("hide", function() {
2425 this.removeChild(t)
2426 }, this), e.push(t)
2427 },
2428 removeChild: function(t) {
2429 for (var e = this._childs, n = e.length, i = 0; n > i; i++)
2430 if (e[i]._uniqId === t._uniqId) return void e.splice(i, 1)
2431 },
2432 setSize: function(t) {
2433 return t && (this._resetDefault(), this.domElem.css(t), this._isShown && !this._isHiding && this.repaint()), this
2434 },
2435 _show: function(t, e) {
2436 return this._currPos = t, e && this.elem("tail").removeAttr("style").css(e), this.domElem.css(t), (!this._isShown || this._isHiding) && this.hasMod("animate", "yes") && !this.hasMod("fade-in", "no") && this.afterShow(), this._isHiding = !1, this.setMod("visibility", "visible"), this
2437 },
2438 _onShown: function() {
2439 this.bindToDoc("keydown", function(t) {
2440 27 === t.which && 0 === this._childs.length && this.hide()
2441 }), this._attachRepaintOnResize(), this._bindFocusEvents(), this._attachUnder(), this._isShown = !0, this.hasMod("autoclosable", "yes") && this.afterCurrentEvent(function() {
2442 this._enableAutoclosable()
2443 }), this.hasMod("adaptive", "yes") && this._enableAdaptive(), this._channel.on("hide", this.hide, this), this.trigger("show")
2444 },
2445 _onHidden: function() {
2446 this.unbindFromDoc("keydown"), this._detachRepaintOnResize(), this._unbindFocusEvents(), this._detachUnder(), this.hasMod("autoclosable", "yes") && this._disableAutoclosable(), this.hasMod("adaptive", "yes") && this._disableAdaptive(), this._cache = {}, this._isShown = !1, this._isHiding = !1, this._channel.un("hide"), this._returnFocus(), this.trigger("hide")
2447 },
2448 _attachRepaintOnResize: function() {
2449 window.attachEvent && this.domElem[0].attachEvent("onresize", this.__self._enforcePageRepaint)
2450 },
2451 _detachRepaintOnResize: function() {
2452 window.detachEvent && this.domElem[0].detachEvent("onresize", this.__self._enforcePageRepaint)
2453 },
2454 _bindFocusEvents: function() {
2455 this._lastFocused = $($.dom.getActiveElement()[0] || this._scope);
2456 var t = this.__self._getFocusable(this.elem("content"));
2457 return this._firstFocusable = t.first(), this._lastFocusable = t.last(), this._skipReturnFocus = !1, 0 === this._firstFocusable.length ? void(this._skipReturnFocus = !0) : void this.bindTo(this._lastFocused, "keydown", this._onLastFocusedKeyDown).bindTo(this._firstFocusable, "keydown", this._onFirstFocusableKeyDown).bindTo(this._lastFocusable, "keydown", this._onLastFocusableKeyDown)
2458 },
2459 _unbindFocusEvents: function() {
2460 this.unbindFrom(this._firstFocusable, "keydown"), this.unbindFrom(this._lastFocusable, "keydown"), this.unbindFrom(this._lastFocused, "keydown")
2461 },
2462 _onLastFocusedKeyDown: function(t) {
2463 this._lastFocused.is(this._scope) && !this._lastFocused.is(t.target) || t.ctrlKey || t.altKey || t.metaKey || 9 === t.which && (t.preventDefault(), this[t.shiftKey ? "_lastFocusable" : "_firstFocusable"].focus())
2464 },
2465 _onFirstFocusableKeyDown: function(t) {
2466 t.ctrlKey || t.altKey || t.metaKey || t.shiftKey && 9 === t.which && (t.preventDefault(), this._lastFocused.focus())
2467 },
2468 _onLastFocusableKeyDown: function(t) {
2469 t.shiftKey || t.ctrlKey || t.altKey || t.metaKey || 9 === t.which && (t.preventDefault(), this._lastFocused.focus())
2470 },
2471 _returnFocus: function() {
2472 var t = (this._parent || {})._skipReturnFocus || this._skipReturnFocus;
2473 t || this._lastFocused.focus()
2474 },
2475 _mergeParams: function(t, e, n) {
2476 var i = {},
2477 r = Object.prototype.hasOwnProperty;
2478 return n || (n = {}), t && "object" == typeof t && Object.keys(t).forEach(function(e) {
2479 i[e] = t[e]
2480 }), Object.keys(e).forEach(function(s) {
2481 var o = r.call(n, s) ? n[s].call(this, t[s], e[s]) : e[s];
2482 !o || "object" != typeof o || Array.isArray(o) ? i[s] = o : t[s] ? i[s] = this._mergeParams(t[s], o, n) : i[s] = o
2483 }, this), i
2484 },
2485 _tailParamsHook: function(t, e) {
2486 return e.offset || (e.offset = this.params.tail.offset), "number" == typeof e.offset ? {
2487 offset: {
2488 left: e.offset,
2489 top: e.offset
2490 }
2491 } : e
2492 },
2493 _generateDirections: function() {
2494 if (this.__self._generateDirectionsCache) return this.__self._generateDirectionsCache;
2495 for (var t = [
2496 ["bottom", "top"],
2497 ["left", "right"]
2498 ], e = [
2499 ["center", "left", "right"],
2500 ["middle", "top", "bottom"]
2501 ], n = e, i = t.length, r = [], s = 0; i > s; s++)
2502 for (var o = t[s], a = o.length, u = 0; a > u; u++)
2503 for (var c = e[s], l = c.length, h = 0; l > h; h++)
2504 for (var d = n[s], p = d.length, m = 0; p > m; m++) r.push({
2505 direction: o[u],
2506 axis: c[h],
2507 tail: {
2508 axis: d[m]
2509 }
2510 });
2511 return this.__self._generateDirectionsCache = r, r
2512 },
2513 _repackDirParams: function(t) {
2514 var e = {},
2515 n = [];
2516 return ("string" == typeof t || $.isPlainObject(t)) && (t = [t]), n = t.map(function(t) {
2517 if ("string" == typeof t) {
2518 var n = t.split("-");
2519 t = {
2520 to: n[0],
2521 tail: {}
2522 }, n[1] && (t.axis = n[1]), n[2] && (t.tail.axis = n[2])
2523 }
2524 var i = t.to;
2525 return e[i] || (e[i] = t), t.axis && (i += "-" + t.axis), t.key = i, e[i] = t, i
2526 }, this), {
2527 directions: e,
2528 keys: n
2529 }
2530 },
2531 setViewport: function(t) {
2532 return this._viewport = t, this
2533 },
2534 _pickDirection: function() {
2535 var t, e = this._order,
2536 n = this.hasMod("adaptive", "yes") ? e.length : 1;
2537 for (this._visibilityFactor = 0, t = 0; n > t; t++) {
2538 var i = e[t],
2539 r = this._directions[i];
2540 this._resetPos(i)._pushPos(i, this._calcPos(r))._pushPos(i, this._calcOffsets(r)), this._hasTail() && this._resetTailPos(i)._pushTailPos(i, this._calcTailPos(r))._pushTailPos(i, this._calcTailOffset(r))._pushPos(i, this._calcOffsetByTail(r)), this._pushPos(i, this._getParentOffset());
2541 var s = this._calcVisibilityFactor(r);
2542 if ((s > this._visibilityFactor || !this._direction) && (this._visibilityFactor = s, this._direction = this._directions[i], this.size = this.getPlacingSize(), 100 === s)) break
2543 }
2544 return this._direction
2545 },
2546 _getParentOffset: function() {
2547 var t = this.domElem.offsetParent().offset();
2548 return t.left *= -1, t.top *= -1, t
2549 },
2550 _calcPos: function(t) {
2551 this._calcPlacingSize(t);
2552 var e = this.getOwnerPos(),
2553 n = this.getOwnerSize(),
2554 i = this.getPlacingSize(),
2555 r = t.axis,
2556 s = this.params.position || {},
2557 o = {},
2558 a = Object.prototype.hasOwnProperty;
2559 switch (t.to) {
2560 case "bottom":
2561 o = {
2562 top: a.call(s, "top") ? s.top : e.top + n.height,
2563 left: a.call(s, "left") ? s.left : this._calcLeft(r)
2564 };
2565 break;
2566 case "top":
2567 o = {
2568 top: a.call(s, "top") ? s.top : e.top - i.height,
2569 left: a.call(s, "left") ? s.left : this._calcLeft(r)
2570 };
2571 break;
2572 case "left":
2573 o = {
2574 top: a.call(s, "top") ? s.top : this._calcTop(r),
2575 left: a.call(s, "left") ? s.left : e.left - i.width
2576 };
2577 break;
2578 case "right":
2579 o = {
2580 top: a.call(s, "top") ? s.top : this._calcTop(r),
2581 left: a.call(s, "left") ? s.left : e.left + n.width
2582 }
2583 }
2584 return o
2585 },
2586 _calcTop: function(t) {
2587 var e = 0,
2588 n = this.getPlacingSize(),
2589 i = this.getOwnerPos(),
2590 r = this.getOwnerSize();
2591 return "top" === t ? e += i.top : "middle" === t ? e += i.top + r.height / 2 - n.height / 2 : "bottom" === t && (e += i.top + r.height - n.height), e
2592 },
2593 _calcLeft: function(t) {
2594 var e = 0,
2595 n = this.getPlacingSize(),
2596 i = this.getOwnerPos(),
2597 r = this.getOwnerSize();
2598 return "left" === t ? e += i.left : "center" === t ? e += i.left + r.width / 2 - n.width / 2 : "right" === t && (e += i.left + r.width - n.width), e
2599 },
2600 getPlacingSize: function() {
2601 return this.getPopupSize()
2602 },
2603 _calcOffsets: function(t) {
2604 var e, n = this._cache.offset || (this._cache.offset = {}),
2605 i = t.key,
2606 r = t.offset;
2607 if (n[i]) return n[i];
2608 if (!r) return !1;
2609 if (e = {
2610 left: 0,
2611 top: 0
2612 }, "number" == typeof r) switch (i) {
2613 case "left":
2614 e.left += r;
2615 break;
2616 case "right":
2617 e.left -= r;
2618 break;
2619 case "top":
2620 e.top += r;
2621 break;
2622 case "bottom":
2623 e.top -= r
2624 } else r.left && (e.left += r.left), r.right && (e.left -= r.right), r.top && (e.top += r.top), r.bottom && (e.top -= r.bottom);
2625 return n[i] = e, e
2626 },
2627 _hasTail: function() {
2628 return 0 !== this.elem("tail").length
2629 },
2630 _moveToContainer: function(t) {
2631 if (t) this._inContainer = !1;
2632 else {
2633 if (this._isShown) return;
2634 t = this._parent ? this._parent.domElem : this._scope
2635 }
2636 this.domElem.appendTo(t), this._inContainer = !0
2637 },
2638 _resetPos: function(t) {
2639 return t ? this._positions[t] = null : this._positions = {}, this
2640 },
2641 _pushPosTo: function(t, e, n) {
2642 n !== !1 && ("string" == typeof e ? this._sum(t[e] || (t[e] = {}), n) : (n = e, Object.keys(t).forEach(function(e) {
2643 this._sum(t[e], n)
2644 }, this)))
2645 },
2646 _pushPos: function(t, e) {
2647 return this._pushPosTo(this._positions, t, e), this
2648 },
2649 _sum: function(t, e) {
2650 Object.keys(e).forEach(function(n) {
2651 t[n] = (t[n] || 0) + e[n]
2652 })
2653 },
2654 _getSizeOf: function(t) {
2655 return {
2656 height: t.outerHeight(),
2657 width: t.outerWidth()
2658 }
2659 },
2660 getOwnerSize: function() {
2661 return this._owner ? this._cache.ownerSize || (this._cache.ownerSize = this._getSizeOf(this._owner)) : {
2662 height: 0,
2663 width: 0
2664 }
2665 },
2666 getPopupSize: function() {
2667 return this._getSizeOf(this.domElem)
2668 },
2669 _getPosOf: function(t) {
2670 return t.offset() || {
2671 left: 0,
2672 top: 0
2673 }
2674 },
2675 getOwnerPos: function() {
2676 var t;
2677 return this._owner && (t = this._getPosOf(this._owner), "pageYOffset" in window && (t.top -= window.pageYOffset - (document.documentElement.scrollTop || document.body.scrollTop), t.left -= window.pageXOffset - (document.documentElement.scrollLeft || document.body.scrollLeft))), t || this._userPosition
2678 },
2679 _calcVisibilityFactor: function(t) {
2680 var e, n, i = this._viewport,
2681 r = this._getSizeOf(i),
2682 s = this.getPopupSize(),
2683 o = this._positions[t.key],
2684 a = this._parent && this._isParentFixed ? this._parent.domElem.offset() : {
2685 top: 0,
2686 left: 0
2687 },
2688 u = this.hasMod("position", "fixed") ? {
2689 top: 0,
2690 left: 0
2691 } : {
2692 top: i.scrollTop(),
2693 left: i.scrollLeft()
2694 },
2695 c = o.top + a.top - u.top,
2696 l = o.left + a.left - u.left,
2697 h = l + s.width - r.width,
2698 d = c + s.height - r.height,
2699 p = {
2700 height: s.height,
2701 width: s.width
2702 },
2703 m = 100;
2704 return d > 0 && (p.height -= d), 0 > c && (p.height += c), 0 > l && (p.width += l), h > 0 && (p.width -= h),
2705 p.height < 0 || p.width < 0 ? m = 0 : (n = Math.abs(p.height * p.width), e = s.height * s.width, e !== n && (m = n / e * 100)), m
2706 },
2707 _findParent: function(t) {
2708 return this.findBlockOutside(t, "popup")
2709 },
2710 destruct: function() {
2711 return this._childs.forEach(function(t) {
2712 BEM.DOM.destruct(t.domElem)
2713 }), this.setMod("fade-out", "no"), this.hide(), this.__base.apply(this, arguments)
2714 },
2715 _resetDefault: function() {},
2716 _calcPlacingSize: function() {}
2717 }, {
2718 live: function() {
2719 this.liveBindTo("close", "leftclick tap", function() {
2720 this.hide()
2721 })
2722 },
2723 _getFocusable: function(t) {
2724 var e = $.data(t, "popup-getFocusable-id");
2725 e || (e = $.identify(), $.data(t, "popup-getFocusable-id", e)), e = '*[data-popup-getFocusable-id="' + e + '"]';
2726 var n = "a[href], link, ";
2727 return BEM.blocks["i-ua"].opera < 13 && (n = ""), t.find(n + '*[tabindex], button, input:not([type="hidden"]), textarea, select, menuitem').filter(function() {
2728 var t = $(this),
2729 n = !0;
2730 return parseInt(t.prop("tabindex"), 10) < 0 || "hidden" === t.css("visibility") ? !1 : ($(this).parentsUntil(e).each(function() {
2731 var t = $(this);
2732 return "none" === t.css("display") ? n = !1 : void 0
2733 }), n)
2734 })
2735 },
2736 _enforcePageRepaint: function() {
2737 document.body.className += ""
2738 },
2739 _generateDirectionsCache: null
2740 }), BEM.DOM.decl("popup", {
2741 onSetMod: {
2742 autoclosable: {
2743 yes: function() {
2744 this._enableAutoclosable()
2745 },
2746 "": function() {
2747 this._disableAutoclosable()
2748 }
2749 }
2750 },
2751 _enableAutoclosable: function() {
2752 var t = this._under;
2753 this.hasMod(t, "type", "paranja") && (t.is("iframe") && (t = $([t[0].contentWindow, t[0].contentWindow.document])), this.bindTo(t, "leftclick tap", function(t) {
2754 t.stopPropagation(), this.hide()
2755 }), this.bindTo(t, "mousedown", function() {
2756 this._skipReturnFocus = !0
2757 })), this.bindToDoc("leftclick tap", function(t) {
2758 if (!this._isRelatedNode($(t.target))) {
2759 var e = $.Event("outside-click");
2760 this.trigger(e, t), e.isDefaultPrevented() || this.hide()
2761 }
2762 }), this.bindToDoc("mousedown", function() {
2763 this._skipReturnFocus = !0
2764 })
2765 },
2766 _disableAutoclosable: function() {
2767 this.hasMod(this._under, "type", "paranja") && this.unbindFrom(this._under, "leftclick tap mousedown"), this.unbindFromDoc("leftclick tap mousedown")
2768 },
2769 _isRelatedNode: function(t) {
2770 var e = this.containsDomElem(t);
2771 if (e || (e = Boolean(this._owner) && this.containsDomElem.call({
2772 domElem: this._owner
2773 }, t)), e) return !0;
2774 var n, i = this._childs.length;
2775 for (n = 0; i > n; n++)
2776 if (this.containsDomElem.call({
2777 domElem: this._childs[n].domElem
2778 }, t)) return !0;
2779 return !1
2780 }
2781 }), BEM.DOM.decl({
2782 block: "popup",
2783 modName: "adaptive",
2784 modVal: "yes"
2785 }, {
2786 onSetMod: {
2787 adaptive: {
2788 yes: function() {
2789 this._enableAdaptive()
2790 },
2791 no: function() {
2792 this._disableAdaptive()
2793 }
2794 },
2795 "watch-scroll": {
2796 yes: function() {
2797 this._watchScroll()
2798 },
2799 no: function() {
2800 this._unwatchScroll()
2801 }
2802 }
2803 },
2804 _enableAdaptive: function() {
2805 this.afterCurrentEvent(function() {
2806 this.domElem && this.bindToWin("resize", this.onResize)
2807 }), this._watchScroll()
2808 },
2809 _disableAdaptive: function() {
2810 this.unbindFromWin("resize")._unwatchScroll()
2811 },
2812 getScrollEvents: function() {
2813 return ["scroll"]
2814 },
2815 _watchScroll: function() {
2816 this._owner && !this.hasMod("watch-scroll", "no") && this.bindTo(this._owner.parents().add(this._viewport), this.getScrollEvents().join(" "), this.onScroll, this)
2817 },
2818 _unwatchScroll: function() {
2819 this._owner && this.unbindFromDomElem(this._owner.parents().add(this._viewport), this.getScrollEvents().join(" "))
2820 },
2821 onResize: function(t) {
2822 this._cache = {}, this._isShown && !this._isHiding && this.repaint()
2823 },
2824 onScroll: function(t) {
2825 this._cache = {}, this._isShown && !this._isHiding && this.repaint()
2826 },
2827 destruct: function() {
2828 this._disableAdaptive(), this.__base.apply(this, arguments)
2829 }
2830 }), BEM.DOM.decl({
2831 block: "popup",
2832 modName: "animate",
2833 modVal: "yes"
2834 }, {
2835 afterShow: function() {
2836 var t = this.getCurrDirection();
2837 if (t) {
2838 var e = t.to,
2839 n = this.getCurrPos(),
2840 i = {
2841 opacity: 1,
2842 top: n.top,
2843 left: n.left
2844 },
2845 r = {
2846 opacity: 0,
2847 top: n.top,
2848 left: n.left
2849 };
2850 "bottom" === e ? r.top += 10 : "top" === e ? r.top -= 10 : "left" === e ? r.left -= 10 : "right" === e && (r.left += 10), this.domElem.stop(!0).css(r).animate(i, this.params.duration)
2851 }
2852 },
2853 beforeHide: function(t) {
2854 var e = this.getCurrDirection();
2855 if (!e) return t();
2856 var n = e.to,
2857 i = this.getCurrPos(),
2858 r = this.domElem,
2859 s = {
2860 top: i.top,
2861 left: i.left,
2862 opacity: 0
2863 };
2864 return "bottom" === n ? s.top += 10 : "top" === n ? s.top -= 10 : "left" === n ? s.left -= 10 : "right" === n && (s.left += 10), r.stop(!0, !0).animate(s, this.params.duration, function() {
2865 t(), r.css("opacity", "")
2866 })
2867 }
2868 }),
2869 function() {
2870 var t = [];
2871 BEM.DOM.decl("popup", {
2872 onSetMod: {
2873 js: function() {
2874 this.__base.call(this);
2875 var t = this.findElem("under").first();
2876 this._underClassAttr = t.attr("class"), this.isDivEnough() ? this._under = t : (t.remove(), this._under = null), this._underInPool = !1
2877 }
2878 },
2879 isDivEnough: function() {
2880 return !1
2881 },
2882 _createUnder: function() {
2883 return $('<iframe frameBorder="0" tabindex="-1" src="about:blank"/>')
2884 },
2885 _getUnder: function() {
2886 if (this._under) return this._under;
2887 var e = t.pop();
2888 return e && (this._underInPool = !1), this._under = e || this._createUnder()
2889 },
2890 _attachUnder: function() {
2891 var t = this._under = this._getUnder();
2892 t.attr("class", this._underClassAttr), this.hasMod(t, "type", "paranja") ? t.detach().insertBefore(this.domElem) : t.prependTo(this.domElem)
2893 },
2894 _detachUnder: function() {
2895 var e = this._under;
2896 t.push(e.detach()), this._under = null, this._underInPool = !0
2897 },
2898 destruct: function() {
2899 return this._underInPool && t.pop(), this._under && this._under.remove(), this.__base.apply(this, arguments)
2900 }
2901 })
2902 }(), BEM.DOM.decl({
2903 block: "popup",
2904 modName: "type",
2905 modVal: "modal"
2906 }, {
2907 getDefaultParams: function() {
2908 var t = this.__base();
2909 return t.top = "50%", t.left = "50%", t
2910 },
2911 _isPercentVal: function(t) {
2912 return "string" == typeof t && t.indexOf("%") > 0
2913 },
2914 show: function(t) {
2915 return this._moveToContainer(), this.setMod("visibility", "outside").setMod("adaptive", "no"), this.repaint(t), this
2916 },
2917 repaint: function(t) {
2918 this._moveToContainer(), t || (t = {
2919 left: this.params.left,
2920 top: this.params.top
2921 });
2922 var e = this.getPopupSize();
2923 return this._isPercentVal(t.left) && !t.marginLeft && (t.marginLeft = e.width / (-100 / parseInt(t.left, 10))), this._isPercentVal(t.top) && !t.marginTop && (t.marginTop = e.height / (-100 / parseInt(t.top, 10))), this._show(t), this
2924 }
2925 }), BEM.DOM.decl({
2926 block: "popup",
2927 modName: "position",
2928 modVal: "fixed"
2929 }, {
2930 addChild: function(t) {
2931 this.__base.apply(this, arguments), t.setMod("watch-scroll", "no")
2932 },
2933 _onFirstFocusableKeyDown: function(t) {
2934 t.ctrlKey || t.altKey || t.metaKey || t.shiftKey && 9 === t.which && (t.preventDefault(), this._lastFocusable.focus())
2935 },
2936 _onLastFocusableKeyDown: function(t) {
2937 t.shiftKey || t.ctrlKey || t.altKey || t.metaKey || 9 === t.which && (t.preventDefault(), this._firstFocusable.focus())
2938 }
2939 }), BEM.DOM.decl({
2940 block: "popup",
2941 modName: "position",
2942 modVal: "fixed"
2943 }, {
2944 getOwnerPos: function() {
2945 var t = this.__base.apply(this, arguments);
2946 if (this._owner) {
2947 var e = this._viewport;
2948 t.top -= e.scrollTop(), t.left -= e.scrollLeft()
2949 }
2950 return t
2951 }
2952 }),
2953 function() {
2954 var t = {};
2955 BEM.DOM.decl({
2956 block: "popup",
2957 modName: "body-scroll",
2958 modVal: "no"
2959 }, {
2960 onSetMod: {
2961 visibility: function() {
2962 return this.afterCurrentEvent(function() {
2963 this.domElem && this.hasMod("visibility", "visible") ? t[this.params.uniqId] = !0 : delete t[this.params.uniqId], this._manageScopeOverflow()
2964 }), this.__base()
2965 }
2966 },
2967 destruct: function() {
2968 var e = this.params.uniqId;
2969 t[e] && (delete t[e], this._manageScopeOverflow()), this.__base.apply(this, arguments)
2970 },
2971 _enableScroll: function() {
2972 return this._scope.css({
2973 overflow: ""
2974 }), this
2975 },
2976 _disableScroll: function() {
2977 return this._scope.css({
2978 overflow: "hidden"
2979 }), this
2980 },
2981 _manageScopeOverflow: function() {
2982 var e = Object.keys(t).length;
2983 0 === e ? this._enableScroll() : 1 === e && this._disableScroll()
2984 }
2985 })
2986 }(), BEM.DOM.decl("auth", {
2987 onSetMod: {
2988 js: {
2989 inited: function() {
2990 this._username = this.findBlockInside("username", "input").on("change", this._onInputChange, this), this._password = this.findBlockInside("password", "input").on("change", this._onInputChange, this), this._button = this.findBlockInside("button", "button"), this._error = null, this._errorOwner = null, this.bindTo("submit", this._onBeforeSubmit), this.redraw()
2991 }
2992 }
2993 },
2994 destruct: function() {
2995 this._error && this._error.destruct(), this.__base.apply(this, arguments)
2996 },
2997 _checkInput: function(t) {
2998 var e = this,
2999 n = this.__self._getValidators(e, e._username.val(), e._password.val(), {
3000 checkEmpty: t
3001 }),
3002 i = n.every(function(t) {
3003 var n = t();
3004 return Array.isArray(n) ? (e.showError(n[0], BEM.I18N("auth", n[1])), n[0].elem("control").attr("aria-invalid", !0), !1) : !0
3005 });
3006 return i && (this.hideError(), this._username.elem("control").removeAttr("aria-invalid"), this._password.elem("control").removeAttr("aria-invalid")), i
3007 },
3008 _onInputChange: function(t) {
3009 this._checkInput(!1)
3010 },
3011 enableButton: function() {
3012 return this._button.delMod("disabled"), this
3013 },
3014 disableButton: function() {
3015 return this._button.setMod("disabled", "yes"), this
3016 },
3017 _onBeforeSubmit: function(t) {
3018 return this._username.val(this._username.val().trim()), this._checkInput(!0) ? (this._onSubmit(t), void this.trigger("submit", t)) : !1
3019 },
3020 _onSubmit: function(t) {
3021 if (this.disableButton(), this.elem("retpath").val(this.__self._getRetpath()), !this._timestamp) {
3022 var e = this.__self._timestampName;
3023 this._timestamp = $('<input type="hidden" name="' + e + '"/>').appendTo(this.domElem)
3024 }
3025 this._timestamp.val(+new Date);
3026 var n = this.domElem.attr("action");
3027 n && this.domElem.attr("action", n.replace(/^(https?:)?/, "https:"))
3028 },
3029 _getError: function() {
3030 if (this._error) return this._error;
3031 var t = $(BEMHTML.apply(this.__self._buildError()));
3032 return BEM.DOM.append(this.domElem, t), this._error = this.findBlockOn(t, "popup"), this._errorMsg = this.findElem(t, "error"), this._error.on("hide", function() {
3033 this._errorOwner = null
3034 }, this), this._error
3035 },
3036 showError: function(t, e) {
3037 var n = this._getError();
3038 return this._curErrorMsg !== e && (this._errorMsg.text(e), this._curErrorMsg = e), this._errorOwner !== t && (this._errorOwner = t, n.hide().show(t)), this
3039 },
3040 hideError: function() {
3041 return this._error && this._error.hide(), this
3042 },
3043 getUsernameBlock: function() {
3044 return this._username
3045 },
3046 getPasswordBlock: function() {
3047 return this._password
3048 },
3049 getHaunterBlock: function() {
3050 return this._haunter || (this._haunter = this.findBlockInside("haunter", "checkbox")), this._haunter
3051 },
3052 submit: function() {
3053 return this.domElem.submit(), this
3054 },
3055 redraw: function() {
3056 var t, e = this.__self;
3057 return this._onInputChange(), t = this.findBlockInside("register", "button"), t && t.url(e._getRegisterURL()), t = this.findBlockInside("remember", "button"), t && t.url(e._getRememberURL()), this
3058 }
3059 }, {
3060 _fromName: "from",
3061 _retpathName: "retpath",
3062 _timestampName: "timestamp",
3063 _isUsernameValid: function(t, e) {
3064 return this._isUsernameEmailValid(t) || this._isUsernameLoginValid(t) || this._isUsernamePhoneValid(t, e)
3065 },
3066 _isUsernameEmailValid: function(t) {
3067 return /^\s*[^@\s]+@[^@\s]+\s*$/.test(t)
3068 },
3069 _isUsernameLoginValid: function(t) {
3070 return /^\s*[-ð-ÑÂÃÂ-ïёÃÂA-Za-z0-9.]+\s*$/.test(t)
3071 },
3072 _isUsernamePhoneValid: function(t, e) {
3073 return e ? (t = t.trim(), t = t.replace(/-\)/, "+)"), t = t.replace(/(\d)-/g, "$1"), t = t.replace(/\((\d+)\)/, "$1"), t = t.replace(/(^|\d+)\(/, "$1"), t = t.replace(/^\+/, ""), /^\d*$/.test(t)) : /^\+?[-0-9]*(?:\([-0-9]+\))?[-0-9]+$/.test(t)
3074 },
3075 _isPasswordValid: function(t) {
3076 return !/[^\-a-zA-Z0-9`!@#$%^&*()_=+\[\]{};:"\|\\,.<>\/?]/.test(t)
3077 },
3078 _getRetpath: function() {
3079 return BEM.blocks["i-global"].param("retpath")
3080 },
3081 _getPassportURL: function(t) {
3082 var e = BEM.blocks["i-global"],
3083 n = e.param("passport-host"),
3084 i = e.param("passport-msg"),
3085 r = this._getRetpath();
3086 return [n, "/passport?mode=", t, i ? "&" + this._fromName + "=" + encodeURIComponent(i) : "", r ? "&" + this._retpathName + "=" + encodeURIComponent(r) : ""].join("")
3087 },
3088 _getRegisterURL: function() {
3089 return this._getPassportURL("register")
3090 },
3091 _getRememberURL: function() {
3092 return this._getPassportURL("restore")
3093 },
3094 _buildError: function() {
3095 return {
3096 block: "popup",
3097 mods: {
3098 autoclosable: "no"
3099 },
3100 js: {
3101 directions: ["right", "left"]
3102 },
3103 attrs: {
3104 role: "alert",
3105 "aria-live": "assertive",
3106 "aria-atomic": !0
3107 },
3108 content: [{
3109 elem: "tail"
3110 }, {
3111 elem: "content",
3112 mix: [{
3113 block: "auth",
3114 elem: "error"
3115 }]
3116 }]
3117 }
3118 },
3119 _getValidators: function(t, e, n, i) {
3120 var r = i.checkEmpty,
3121 s = this;
3122 return [function() {
3123 return r && 0 === e.length ? [t._username, "fill-input"] : !0
3124 }, function() {
3125 return r && 0 === n.length ? [t._password, "fill-input"] : !0
3126 }, function() {
3127 return /[ð-ÑÂÃÂ-ïёÃÂ]/.test(n) ? [t._password, "wrong-keyboard-layout"] : !0
3128 }, function() {
3129 return s._isUsernameValid(e, !r) ? !0 : [t._username, "wrong-characters"]
3130 }, function() {
3131 return s._isPasswordValid(n) ? !0 : [t._password, "wrong-characters"]
3132 }, function() {
3133 return n && n === e ? [t._password, "wrong-password"] : !0
3134 }]
3135 }
3136 }), BEM.DOM.decl("auth", {
3137 onSetMod: {
3138 js: {
3139 inited: function() {
3140 var t = this;
3141 t.__base.apply(t, arguments);
3142 var e = document.createElement("b");
3143 e.innerHTML = "<!--[if IE 9]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length && t._username.elem("control").add(t._password.elem("control")).keydown(function(e) {
3144 return 13 === e.which ? (t.submit(), !1) : void 0
3145 })
3146 }
3147 }
3148 }
3149 }), BEM.DOM.decl("popup", {
3150 onSetMod: {
3151 js: function() {
3152 this.__base(), this._tailPos = {}
3153 }
3154 },
3155 _calcTailPos: function(t) {
3156 var e = t.to,
3157 n = this._positions[t.key],
3158 i = t.tail.axis,
3159 r = {};
3160 return "top" === e || "bottom" === e ? r.left = this._calcTailLeft(i, n) : "left" !== e && "right" !== e || (r.top = this._calcTailTop(i, n)), r
3161 },
3162 _calcTailTop: function(t, e) {
3163 var n = 0,
3164 i = this.getOwnerSize(),
3165 r = this.getOwnerPos(),
3166 s = this.params.tail.width,
3167 o = this.getPopupSize(),
3168 a = o.height,
3169 u = r.top - e.top,
3170 c = e.top + o.height - (r.top + i.height);
3171 return u > 0 && (n += u, a -= u), c > 0 && (a -= c), "middle" === t ? (a -= s, n += a / 2) : "bottom" === t && (a -= s, n += a), 0 > n && (n = 0), n
3172 },
3173 _calcTailLeft: function(t, e) {
3174 var n = 0,
3175 i = this.getOwnerSize(),
3176 r = this.getOwnerPos(),
3177 s = this.params.tail.width,
3178 o = this.getPopupSize(),
3179 a = r.left - e.left,
3180 u = o.width,
3181 c = e.left + o.width - (r.left + i.width);
3182 return a > 0 && (n += a, u -= a), c > 0 && (u -= c), "center" === t ? (u -= s, n += u / 2) : "right" === t && (u -= s, n += u), n
3183 },
3184 _calcOffsetByTail: function(t) {
3185 var e = this.params.tail,
3186 n = e.height,
3187 i = {};
3188 switch (t.to) {
3189 case "top":
3190 i = {
3191 top: -n
3192 };
3193 break;
3194 case "bottom":
3195 i = {
3196 top: n
3197 };
3198 break;
3199 case "right":
3200 i = {
3201 left: n
3202 };
3203 break;
3204 case "left":
3205 i = {
3206 left: -n
3207 }
3208 }
3209 return i
3210 },
3211 _calcTailOffset: function(t) {
3212 var e = {},
3213 n = t.to,
3214 i = t.tail,
3215 r = i.offset,
3216 s = i.axis;
3217 return r ? ("top" === n || "bottom" === n ? (e.left = 0, "left" === s ? e.left += r.left : "center" === s ? (r.left && (e.left += r.left), r.right && (e.left -= r.right)) : "right" === s && (e.left -= r.right)) : "left" !== n && "right" !== n || (e.top = 0, "top" === s ? e.top += r.top : "middle" === s ? (r.top && (e.top += r.top), r.bottom && (e.top -= r.bottom)) : "bottom" === s && (e.top -= r.bottom)), e) : !1
3218 },
3219 _resetTailPos: function(t) {
3220 return t ? this._tailPos[t] = null : this._tailPos = {}, this
3221 },
3222 _pushTailPos: function(t, e) {
3223 return this._pushPosTo(this._tailPos, t, e), this
3224 }
3225 }), BEM.DOM.decl("auth", {
3226 onSetMod: {
3227 js: {
3228 inited: function() {
3229 this.__base.apply(this, arguments), this._socialDropdown = null, this._initSocialProviders()
3230 }
3231 }
3232 },
3233 destruct: function() {
3234 var t = this._socialDropdown;
3235 t && t.domElem && t.desruct(), this.__base.apply(this, arguments)
3236 },
3237 _initSocialProviders: function() {
3238 var t = BEM.blocks["i-global"],
3239 e = t.param("social-providers"),
3240 n = this;
3241 if (e) n._createSocial(e);
3242 else {
3243 var i = t.param("social-host");
3244 if (!i) return;
3245 n._getSocialProviders(i, function(t) {
3246 n._createSocial(t)
3247 })
3248 }
3249 },
3250 _getSocialProviders: function(t, e) {
3251 var n = this.elem("social");
3252 n.css("height", this.__self._socialStubHeight), $.getJSON(this.__self._getProvidersURL(t), function(t) {
3253 n.css("height", ""), e(t.providers)
3254 })
3255 },
3256 _createSocial: function(t) {
3257 return t.length ? (BEM.DOM.update(this.elem("social"), BEMHTML.apply(this.__self._buildSocial(t, this._uniqId))), void(this._socialDropdown = this.findBlockInside("social", "dropdown"))) : (this.elem("social").remove(), void this.dropElemCache("social"))
3258 },
3259 _onSocialClick: function(t) {
3260 t.preventDefault();
3261 var e = BEM.blocks["i-global"];
3262 this._socialDropdown && this._socialDropdown.hide(), BEM.blocks["social-broker"].start(function() {
3263 e.param("retpath") && top.location.href !== e.param("retpath") ? top.location.href = e.param("retpath") : top.location.reload()
3264 }, function() {}, {
3265 provider: this.elemParams(t.data.domElem).provider
3266 })
3267 }
3268 }, {
3269 live: function() {
3270 return this.__base.apply(this, arguments), this.liveBindTo("social-link", "leftclick tap", function(t) {
3271 this._onSocialClick(t)
3272 }).liveBindTo("social-link", "keyup", function(t) {
3273 t.shiftKey || t.ctrlKey || t.altKey || t.metaKey || 32 === t.keyCode && this._onSocialClick(t)
3274 }), !1
3275 },
3276 _getProvidersURL: function(t) {
3277 return t + "/providers2.jsonp?callback=?"
3278 },
3279 _buildSocial: function(t, e) {
3280 var n, i, r = [];
3281 if (t = t.filter(function(t) {
3282 return t.enabled
3283 }), n = t.filter(function(t) {
3284 return t.primary
3285 }).map(function(t) {
3286 return {
3287 block: "auth",
3288 elem: "social-link",
3289 js: {
3290 provider: t.code
3291 },
3292 mix: [{
3293 elem: "social-icon",
3294 elemMods: {
3295 code: t.code
3296 }
3297 }],
3298 title: t.display_name
3299 }
3300 }), r = r.concat(n), i = t.map(function(t) {
3301 return {
3302 block: "auth",
3303 elem: "social-link",
3304 js: {
3305 provider: t.code
3306 },
3307 title: t.display_name,
3308 content: [{
3309 elem: "social-icon",
3310 elemMods: {
3311 code: t.code
3312 }
3313 }, t.display_name]
3314 }
3315 }), n.length < t.length) {
3316 var s = BEM.I18N("auth", "more");
3317 r.push({
3318 block: "dropdown",
3319 js: !0,
3320 content: [{
3321 block: "button",
3322 mods: {
3323 pseudo: "yes",
3324 theme: "pseudo",
3325 size: "s"
3326 },
3327 mix: [{
3328 block: "dropdown",
3329 elem: "switcher"
3330 }],
3331 attrs: {
3332 title: s,
3333 "aria-label": s
3334 },
3335 content: "· · ·"
3336 }, {
3337 elem: "popup",
3338 content: {
3339 block: "auth",
3340 elem: "social-popup",
3341 mix: [{
3342 block: "auth",
3343 js: {
3344 uniqId: e
3345 }
3346 }],
3347 content: i
3348 }
3349 }]
3350 })
3351 }
3352 return r
3353 },
3354 _socialStubHeight: 28
3355 }), BEM.decl("social-broker", {
3356 _windowWidth: 500,
3357 _windowHeight: 280,
3358 onSetMod: {
3359 js: {
3360 inited: function() {
3361 this._window = null, this._timer = 0, this._salt = 0
3362 }
3363 }
3364 },
3365 start: function(t, e, n) {
3366 var i, r, s, o, a = this;
3367 if (this._cleanup(), this._onSuccess = t, this._onFailure = e, n = $.extend({}, a._getDefaultParams(), n), i = n.startUrl + "?", o = n.popupName, delete n.startUrl, delete n.popupName, r = n.display, s = n.retpath, r && "popup" !== r && (n.retpath = n.retnopopup || n.retpath || window.location.href, delete n.retnopopup), i += Object.keys(n).reduce(function(t, e) {
3368 return t.push(encodeURIComponent(e) + "=" + encodeURIComponent(n[e])), t
3369 }, []).join("&"), r && "popup" !== r) return void this._navigate(i);
3370 this._salt = (~~(1e9 * Math.random())).toString(16);
3371 var u = o + "_" + this._salt;
3372 this._lsLoginStatusKey = "login_status_from_" + u, this._window = window.open(i, u, this._getPopupParams(), !1), this._window && (this._window.focus(), clearInterval(this._timer), this._timer = setInterval(function() {
3373 var t = window.localStorage.getItem(a._lsLoginStatusKey);
3374 if (a.isClosed() && (clearInterval(a._timer), !t)) return void a.onFailure({
3375 status: "error"
3376 });
3377 if (t) {
3378 var e = a._deserialize(t);
3379 a._handleStatus(e) === !1 && a.onFailure({
3380 status: "error"
3381 })
3382 }
3383 }, 500))
3384 },
3385 _deserialize: function(t) {
3386 var e;
3387 try {
3388 e = JSON.parse(t)
3389 } catch (n) {
3390 e = {
3391 raw: t
3392 }
3393 }
3394 return e
3395 },
3396 _handleStatus: function(t) {
3397 return "ok" === t.status ? (this.onSuccess(t), !0) : "error" === t.status ? (this.onFailure(t), !0) : !1
3398 },
3399 isClosed: function() {
3400 if (!this._window) return !0;
3401 try {
3402 return this._window.closed
3403 } catch (t) {
3404 return !0
3405 }
3406 },
3407 _navigate: function(t) {
3408 window.location.href = t
3409 },
3410 _getDefaultParams: function() {
3411 var t = BEM.blocks["i-global"],
3412 e = t.param("id");
3413 return {
3414 startUrl: t.param("social-startUrl") || t.param("social-host") + "/broker/start",
3415 retpath: t.param("social-retpath") || [location.protocol, "//", location.host, t.param("lego-path"), "/common.blocks/social-broker/__closer/social-broker__closer.html"].join(""),
3416 retnopopup: t.param("social-retnopopup") || !1,
3417 consumer: e || "morda",
3418 popupName: "social_" + (e || "morda"),
3419 action_if_anonymous: "authorize",
3420 result_location: "fragment"
3421 }
3422 },
3423 _getPositionedParams: function(t, e, n, i) {
3424 return ["scrollbars=yes, resizable=1, menubar=0, toolbar=0, status=0, location=0, directories=0", ", left=", e, ", top=", t, ", width=", n, ", height=", i].join("")
3425 },
3426 _getPopupParams: function() {
3427 var t, e, n = this._windowWidth,
3428 i = this._windowHeight;
3429 return window.opera ? (t = (screen.availWidth - n) / 2, e = (screen.availHeight - i) / 2) : (t = (window.innerWidth - n) / 2, e = (window.innerHeight - i) / 2), t = Math.round(t), e = Math.round(e), this._getPositionedParams(e, t, n, i)
3430 },
3431 _cleanup: function() {
3432 clearInterval(this._timer), this._lsLoginStatusKey && window.localStorage.removeItem(this._lsLoginStatusKey), this.isClosed() || this._window.close(), this._window = null
3433 },
3434 onSuccess: function(t) {
3435 this._cleanup(), this._onSuccess && this._onSuccess(t)
3436 },
3437 onFailure: function(t) {
3438 this._cleanup(), this._onFailure && this._onFailure(t)
3439 },
3440 destruct: function() {
3441 this._cleanup(), this.__base.apply(this, arguments)
3442 }
3443 }, {
3444 start: function() {
3445 this._current && this._current.destruct(), this._current = BEM.create("social-broker"), Lego.block["i-social"] = {
3446 broker: this._current
3447 }, this._current.start.apply(this._current, arguments)
3448 },
3449 onSuccess: function() {
3450 this._current.onSuccess.apply(this._current, arguments)
3451 },
3452 onFailure: function() {
3453 this._current.onFailure.apply(this._current, arguments)
3454 }
3455 }), BEM.decl("social-broker", {
3456 onSetMod: {
3457 js: {
3458 inited: function() {
3459 this.__base.apply(this, arguments), this._window = null, this._timer = 0, this._salt = 0
3460 }
3461 }
3462 },
3463 start: function(t, e, n) {
3464 var i, r, s, o, a = this;
3465 if (this._cleanup(), this._onSuccess = t, this._onFailure = e, n = $.extend({}, a._getDefaultParams(), n), i = n.startUrl + "?", o = n.popupName, delete n.startUrl, delete n.popupName, r = n.display, s = n.retpath, r && "popup" !== r && (n.retpath = n.retnopopup || n.retpath || window.location.href, delete n.retnopopup), i += Object.keys(n).reduce(function(t, e) {
3466 return t.push(encodeURIComponent(e) + "=" + encodeURIComponent(n[e])), t
3467 }, []).join("&"), r && "popup" !== r) return void this._navigate(i);
3468 this._salt = (~~(1e9 * Math.random())).toString(16);
3469 var u = o + "_" + this._salt;
3470 this._lsLoginStatusKey = "login_status_from_" + u, this._window = window.open(i, u, this._getPopupParams(), !1), this._window && (this._window.focus(), clearInterval(this._timer), this._timer = setInterval(function() {
3471 var t = window.localStorage.getItem(a._lsLoginStatusKey);
3472 if (a.isClosed() && (clearInterval(a._timer), !t)) return void a.onFailure({
3473 status: "error"
3474 });
3475 if (t) {
3476 var e = a._deserialize(t);
3477 a._handleStatus(e) === !1 && a.onFailure({
3478 status: "error"
3479 })
3480 }
3481 }, 500))
3482 },
3483 _deserialize: function(t) {
3484 var e;
3485 try {
3486 e = JSON.parse(t)
3487 } catch (n) {
3488 e = {
3489 raw: t
3490 }
3491 }
3492 return e
3493 },
3494 _handleStatus: function(t) {
3495 return "ok" === t.status ? (this.onSuccess(t), !0) : "error" === t.status ? (this.onFailure(t), !0) : !1
3496 },
3497 _cleanup: function() {
3498 clearInterval(this._timer), this._lsLoginStatusKey && window.localStorage.removeItem(this._lsLoginStatusKey), this.isClosed() || this._window.close(), this._window = null
3499 },
3500 destruct: function() {
3501 this._cleanup(), this.__base.apply(this, arguments)
3502 }
3503 }, {
3504 start: function() {
3505 this._current && this._current.destruct(), this._current = BEM.create("social-broker"), Lego.block["i-social"] = {
3506 broker: this._current
3507 }, this._current.start.apply(this._current, arguments)
3508 },
3509 onSuccess: function() {
3510 this._current.onSuccess.apply(this._current, arguments)
3511 },
3512 onFailure: function() {
3513 this._current.onFailure.apply(this._current, arguments)
3514 }
3515 }), BEM.DOM.decl("dropdown", {
3516 onSetMod: {
3517 js: function() {
3518 var t = this,
3519 e = t.params,
3520 n = t._popup = t.findBlockOn(t.elem(e.popupElem), "popup");
3521 n.on("show", this._onPopupShow, this).on("hide", this._onPopupHide, this), e.popupMethods.map(function(e) {
3522 t[e] = n[e].bind(n)
3523 });
3524 var i = t.params.switcherBlock,
3525 r = t.elem("switcher");
3526 i && (t._switcher = t.findBlockOn(r, i).domElem), r.attr({
3527 "aria-haspopup": !0,
3528 "aria-expanded": !1
3529 })
3530 },
3531 action: function(t, e) {
3532 var n = "open" === e;
3533 this.elem("switcher").attr("aria-expanded", n), this._getButton() && this._getButton().toggleMod("arrow", "up", "down", n)
3534 }
3535 },
3536 getPopup: function() {
3537 return this._popup
3538 },
3539 _getButton: function() {
3540 return this._button || (this._button = this.findBlockInside("switcher", "button")), this._button
3541 },
3542 getDefaultParams: function() {
3543 return {
3544 popupElem: "popup",
3545 popupMethods: ["toggle", "show", "hide", "setContent"]
3546 }
3547 },
3548 destruct: function() {
3549 this._popup && (this._popup.un("show", this._onPopupShow, this).un("hide", this._onPopupHide, this), this._popup.domElem && BEM.DOM.destruct(this._popup.domElem)), this.__base.apply(this, arguments)
3550 },
3551 _toggle: function() {
3552 this._popup.toggle(this._switcher)
3553 },
3554 _onSwitcherClick: function() {
3555 this._switcher || (this._switcher = this.elem("switcher")), this._toggle()
3556 },
3557 _onSwitcherKeyUp: function(t) {
3558 if (!(t.shiftKey || t.ctrlKey || t.altKey || t.metaKey)) {
3559 var e = this.elem("switcher")[0].tagName.toLowerCase();
3560 "button" !== e && ("a" !== e && 13 === t.which || 32 === t.which) && (t.preventDefault(), this.params.switcherBlock || this._toggle())
3561 }
3562 },
3563 _onPopupShow: function() {
3564 this.setMod("action", "open").trigger("show")
3565 },
3566 _onPopupHide: function() {
3567 this.setMod("action", "closed").trigger("hide")
3568 }
3569 }, {
3570 live: function() {
3571 this.liveBindTo("switcher", "leftclick tap", function(t) {
3572 this._onSwitcherClick(t)
3573 }).liveBindTo("switcher", "keyup", function(t) {
3574 this._onSwitcherKeyUp(t)
3575 })
3576 }
3577 }), BEM.DOM.decl("input", {
3578 onSetMod: {
3579 js: function() {
3580 this.__base.apply(this, arguments), (this._hasHint = Boolean(this.elem("hint")[0])) && this.on("change", this._updateHint)._updateHint()
3581 },
3582 focused: function() {
3583 return this.__base.apply(this, arguments) === !1 ? !1 : void(this._hasHint && this._updateHint())
3584 }
3585 },
3586 _updateHint: function() {
3587 this.toggleMod(this.elem("hint"), "visibility", "visible", !this.val())
3588 }
3589 }), BEM.DOM.decl("checkbox", {
3590 onSetMod: {
3591 js: function() {
3592 this.setMod("checked", this.elem("control").prop("checked") ? "yes" : ""), this._isControlFocused() && this.setMod("focused", "yes")
3593 },
3594 focused: {
3595 yes: function() {
3596 return this.isDisabled() ? !1 : (this._isControlFocused() || this.elem("control").focus(), this.setMod(this.elem("box"), "focused", "yes"), void this.afterCurrentEvent(function() {
3597 this.trigger("focus")
3598 }))
3599 },
3600 "": function() {
3601 this._isControlFocused() && this.elem("control").blur(), this.delMod(this.elem("box"), "focused"), this.afterCurrentEvent(function() {
3602 this.trigger("blur")
3603 })
3604 }
3605 },
3606 checked: function(t, e) {
3607 this.elem("control").prop("checked", "yes" === e), this.afterCurrentEvent(function() {
3608 this.trigger("change", {
3609 checked: "yes" === e
3610 })
3611 }), this.setMod(this.elem("box"), "checked", e)
3612 },
3613 disabled: function(t, e) {
3614 this.elem("control").prop("disabled", "yes" === e)
3615 }
3616 },
3617 isDisabled: function() {
3618 return this.hasMod("disabled", "yes")
3619 },
3620 isChecked: function() {
3621 return this.hasMod("checked", "yes")
3622 },
3623 toggle: function() {
3624 this.toggleMod("checked", "yes", "")
3625 },
3626 val: function(t) {
3627 var e = this.elem("control");
3628 return "undefined" == typeof t ? e.val() : (e.val(t), this)
3629 },
3630 name: function(t) {
3631 var e = this.elem("control");
3632 return arguments.length ? (e.attr("name", t), this) : e.attr("name")
3633 },
3634 _onClick: function(t) {
3635 this.isDisabled() || this.setMod("focused", "yes")
3636 },
3637 _onChange: function(t) {
3638 t.target.checked ? this.setMod("checked", "yes") : this.delMod("checked")
3639 },
3640 _onFocusInFocusOut: function(t) {
3641 this.setMod("focused", "focusin" === t.type ? "yes" : "")
3642 },
3643 _onMouseOverMouseOut: function(t) {
3644 this.isDisabled() || this.setMod("hovered", "mouseover" === t.type ? "yes" : "")
3645 },
3646 _isControlFocused: function() {
3647 try {
3648 return this.containsDomElem($(this.__self.doc[0].activeElement))
3649 } catch (t) {
3650 return !1
3651 }
3652 }
3653 }, {
3654 live: function() {
3655 this.liveBindTo("leftclick tap", function(t) {
3656 this._onClick(t)
3657 }).liveBindTo("control", "change", function(t) {
3658 this._onChange(t)
3659 }).liveBindTo("control", "focusin focusout", function(t) {
3660 this._onFocusInFocusOut(t)
3661 }).liveBindTo("mouseover mouseout", function(t) {
3662 this._onMouseOverMouseOut(t)
3663 })
3664 }
3665 }), BEM.DOM.decl("user", {
3666 redraw: function() {
3667 return this
3668 }
3669 }, {
3670 getLogoutUrl: function() {
3671 var t = BEM.blocks["i-global"],
3672 e = t.param("retpath"),
3673 n = t.param("yandexuid");
3674 return [t.param("passport-host"), "/passport?mode=logout", n ? "&yu=" + n : "", e ? "&retpath=" + encodeURIComponent(e) : ""].join("")
3675 }
3676 }), BEM.decl("i-common__string", {}, {
3677 cleverSubstring: function() {
3678 var t = "…";
3679 return function(e, n, i) {
3680 return e.length > n + i ? e.substring(0, n - 1) + t : e
3681 }
3682 }(),
3683 escapeHTML: function() {
3684 var t = {
3685 "&": "&",
3686 "<": "<",
3687 ">": ">",
3688 "'": "'",
3689 '"': """
3690 };
3691 return function(e) {
3692 return String(e).replace(/&(?!\w+;)|[<>"']/g, function(e) {
3693 return t[e] || e
3694 })
3695 }
3696 }(),
3697 escapeRegExp: function(t) {
3698 return t.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1")
3699 },
3700 highlight: function(t, e) {
3701 if (!$.isArray(e)) return t;
3702 var n, i = [],
3703 r = 0,
3704 s = e.sort(function(t, e) {
3705 return t[0] - e[0]
3706 }),
3707 o = [],
3708 a = "?",
3709 u = ~t.indexOf(a),
3710 c = function() {
3711 for (var e, n = /\&#\d+;/gi; e = n.exec(t);) o.push(e[0]), t = t.replace(e[0], a)
3712 },
3713 l = function(t) {
3714 if (u) return t;
3715 for (; ~t.indexOf(a) && o.length;) t = t.replace(a, o[0]), o.shift();
3716 return t
3717 };
3718 return !u && c(), s.forEach(function(e) {
3719 n = r > e[0] ? r : e[0], i.push({
3720 tag: "span",
3721 elem: "span",
3722 content: l(t.slice(r, n))
3723 }), i.push({
3724 tag: "em",
3725 elem: "em",
3726 content: l(t.slice(n, r = e[1]))
3727 })
3728 }, this), i.push({
3729 tag: "span",
3730 elem: "span",
3731 content: l(t.slice(r))
3732 }), i
3733 }
3734 }), BEM.DOM.decl("user", {
3735 onSetMod: {
3736 js: {
3737 inited: function() {
3738 if (this.__base.apply(this, arguments), this.elem("name").length) {
3739 var t = this,
3740 e = t.elemParams("name");
3741 e.isUglyUserName && BEM.blocks["i-user-services"].get(function(n) {
3742 var i = BEM.blocks["i-common__string"].cleverSubstring,
3743 r = BEM.blocks["i-common__string"].escapeHTML,
3744 s = Object(n.displayName).name || n.login,
3745 o = i(s, e.maxLength, e.maxLengthRelative);
3746 o = r(o), o = '<span class="user__first-letter">' + o.charAt(0) + "</span>" + o.slice(1), t.elem("name").html(o), t.trigger("update-name")
3747 })
3748 }
3749 }
3750 }
3751 },
3752 toggleCollapsed: function(t) {
3753 return this.toggleMod("hide-name", "yes", "", t)
3754 }
3755 }), BEM.decl("i-user-services", {}, {
3756 get: function(t) {
3757 this._data ? t(this._data) : this._get(t)
3758 },
3759 getApiUrl: function() {
3760 return BEM.blocks["i-global"].param("pass-host") + "/services?callback=?"
3761 },
3762 _callbacks: [],
3763 _get: function(t) {
3764 var e = this;
3765 e._callbacks.push(t), 1 === e._callbacks.length && $.getJSON(e.getApiUrl(), {
3766 locale: BEM.blocks["i-global"].param("lang"),
3767 login: "yes",
3768 "current-login": BEM.blocks["i-global"].param("login"),
3769 yu: $.cookie("yandexuid")
3770 }, function(t) {
3771 e._data = t, $.each(e._callbacks, function() {
3772 this(t)
3773 }), e._callbacks.length = 0
3774 })
3775 }
3776 }), BEM.DOM.decl("user", {
3777 onSetMod: {
3778 js: {
3779 inited: function() {
3780 this.__base.apply(this, arguments), this._isRetina = BEM.blocks["i-ua"].hiDpi, this._isRetina && this.updateIcon()
3781 }
3782 }
3783 },
3784 _getIconPath: function(t) {
3785 var e = this.params.avatarHost,
3786 n = this._getIconSize(),
3787 i = (this._isRetina ? "/islands-retina-" : "/islands-") + n;
3788 return [e, "/get-yapic/", t, i, "?rnd=", +new Date].join("")
3789 },
3790 _setIconBackground: function(t) {
3791 var e = this.elem("icon");
3792 e && e.css("background-image", "url(" + t + ")")
3793 },
3794 updateIcon: function() {
3795 this.elem("icon").length && this._setIconBackground(this._getIconPath(this.elemParams("icon").avatarId))
3796 },
3797 getDefaultParams: function() {
3798 return $.extend(this.__base(), {
3799 avatarHost: "//avatars.mds.yandex.net"
3800 })
3801 }
3802 }), BEM.DOM.decl("user", {
3803 _getIconSize: function() {
3804 return "middle"
3805 }
3806 }),
3807 function() {
3808 var t = {};
3809 BEM.decl("i-request", {
3810 onSetMod: {
3811 js: function() {
3812 this._preventCache = !1
3813 }
3814 },
3815 get: function(t, e, n, i) {
3816 $.isFunction(n) || (i = n, n = this.params.onError), this._get(t, e, n, $.extend({}, this.params, i))
3817 },
3818 _get: function(e, n, i, r) {
3819 var s = this._buildCacheKey(e, r),
3820 o = t[r.cacheGroup];
3821 r.cache && o && s in o.data ? this.afterCurrentEvent(function() {
3822 n.call(this.params.callbackCtx, o.data[s])
3823 }, this) : this._do(e, n, i, r)
3824 },
3825 _do: function(t, e, n, i) {},
3826 _onSuccess: function(t, e, n, i) {
3827 i.cache && !this._preventCache && this.putToCache(i, t, n), this._preventCache = !1
3828 },
3829 _buildCacheKey: function(t, e) {
3830 return "string" == typeof t ? t : $.param(t)
3831 },
3832 putToCache: function(e, n, i) {
3833 var r = t[e.cacheGroup] || (t[e.cacheGroup] = {
3834 keys: [],
3835 data: {}
3836 });
3837 r.keys.length >= e.cacheSize && delete r.data[r.keys.shift()];
3838 var s = this._buildCacheKey(n, e);
3839 r.data[s] = i, r.keys.push(s)
3840 },
3841 dropCache: function() {
3842 delete t[this.params.cacheGroup]
3843 },
3844 getDefaultParams: function() {
3845 return {
3846 cache: !1,
3847 cacheGroup: "default",
3848 cacheSize: 100,
3849 callbackCtx: this
3850 }
3851 }
3852 }, {
3853 _cache: t
3854 })
3855 }(),
3856 function(t) {
3857 t.decl({
3858 block: "i-request_type_ajax",
3859 baseBlock: "i-request"
3860 }, {
3861 onSetMod: {
3862 js: function() {
3863 this.__base(), this._requestNumber = this._number = this._preventNumber = this._retryCount = 0
3864 }
3865 },
3866 _get: function(t, e, n, i) {
3867 this._number++, this._requestNumber++, this._retryCount = i.retryCount, this.__base.apply(this, arguments)
3868 },
3869 _do: function(t, e, n, i) {
3870 var r = this;
3871 if (r._number > r._preventNumber) {
3872 var s = arguments,
3873 o = {
3874 data: i.data ? $.extend({}, i.data, t) : t
3875 },
3876 a = r._wrapCallback(function(n, s, o) {
3877 r._onSuccess(r._buildCacheKey(t, i), t, n[0], i), r._allowCallback(s, o) && e.apply(i.callbackCtx, n)
3878 }),
3879 u = r._wrapCallback(function(t, e, o) {
3880 r._allowCallback(e, o) && (r._retryCount-- > 0 ? setTimeout(function() {
3881 r._do.apply(r, s)
3882 }, i.retryInterval) : n && n.apply(i.callbackCtx, t))
3883 });
3884 $.each(["url", "dataType", "timeout", "type", "jsonp", "jsonpCallback"].concat(i.paramsToSettings || []), function(t, e) {
3885 o[e] = i[e]
3886 }), $.ajax(o).done(a).fail(u)
3887 }
3888 },
3889 _wrapCallback: function(t) {
3890 var e = this._requestNumber,
3891 n = this._number;
3892 return function(i) {
3893 null !== i && t(arguments, e, n)
3894 }
3895 },
3896 _allowCallback: function(t, e) {
3897 return e > this._preventNumber && this._requestNumber === t
3898 },
3899 _buildCacheKey: function(t, e) {
3900 return "string" == typeof t ? t : this.__base(t) + e.url
3901 },
3902 abort: function() {
3903 this._preventNumber = ++this._number
3904 },
3905 preventCallbacks: function() {
3906 this.abort()
3907 },
3908 getDefaultParams: function() {
3909 return $.extend(this.__base(), {
3910 cache: !0,
3911 type: "GET",
3912 dataType: "jsonp",
3913 timeout: 2e4,
3914 retryCount: 0,
3915 retryInterval: 2e3
3916 })
3917 }
3918 })
3919 }(BEM), BEM.DOM.decl({
3920 block: "user",
3921 modName: "menu",
3922 modVal: "multiauth"
3923 }, {
3924 onSetMod: {
3925 js: function() {
3926 this.__base.apply(this, arguments), this._dropdown = this.findBlockOutside("dropdown-menu"), this._dropdown && this._dropdown.on("show", this._onPopupShow, this).on("hide", this._onPopupHide, this), this._dataProvider = BEM.create(this.params.dataProvider, {
3927 url: this.params.accountsUrl,
3928 timeout: this.params.getAccountsTimeout
3929 })
3930 }
3931 },
3932 getDefaultParams: function() {
3933 return $.extend(this.__base(), {
3934 accountsUrl: BEM.blocks["i-global"].param("pass-host") + "/accounts",
3935 maxAccounts: 5,
3936 getAccountsTimeout: 5e3,
3937 dataProvider: "i-request_type_ajax"
3938 })
3939 },
3940 destruct: function() {
3941 this._dropdown && this._dropdown.domElem && this._dropdown.destruct(), this.__base.apply(this, arguments)
3942 },
3943 _onPopupShow: function() {
3944 this.redraw(), this.domElem.attr("aria-expanded", !0), this._getAccounts()
3945 },
3946 _onPopupHide: function() {
3947 this.domElem.attr("aria-expanded", !1)
3948 },
3949 _onClick: function(t) {
3950 t.preventDefault(), this.__base.apply(this, arguments), this._dropdown && this._dropdown.toggle(this.elem("icon").length ? this.elem("icon") : this.elem("name"))
3951 },
3952 redraw: function() {
3953 if (this.__base.apply(this, arguments), !this._dropdown) return this;
3954 var t = BEM.blocks["i-global"].param("retpath") || "",
3955 e = this._dropdown.getPopup().domElem,
3956 n = e.find(this.buildSelector("logout")),
3957 i = e.find(this.buildSelector("add")),
3958 r = e.find(this.buildSelector("edit-list"));
3959 return [n, i, r].forEach(function(e) {
3960 var n = e.attr("href");
3961 n = n.replace(/&retpath=.*$/, "&retpath=" + encodeURIComponent(t)), e.attr("href", n)
3962 }), this
3963 },
3964 _getAccounts: function() {
3965 this._accountsInited || (this._accountsInited = !0, this._dataProvider.get({
3966 yu: BEM.blocks["i-global"].param("yandexuid")
3967 }, this._addAccounts.bind(this)))
3968 },
3969 _addAccounts: function(t) {
3970 if ((t && t.accounts || []).length > 1) {
3971 var e = 0,
3972 n = this._dropdown.getPopup().domElem,
3973 i = n.find(this.buildSelector("accounts")).parent();
3974 t.accounts.forEach(function(n) {
3975 if (n && n.uid !== t.default_uid && n.displayName) {
3976 var r = BEM.blocks["i-global"],
3977 s = $(BEMHTML.apply([{
3978 block: "i-global",
3979 params: {
3980 uid: n.uid,
3981 displayName: n.displayName,
3982 "passport-host": r.param("passport-host"),
3983 login: void 0
3984 }
3985 }, {
3986 block: "b-menu-vert",
3987 elem: "item",
3988 mods: {
3989 theme: "grey"
3990 },
3991 type: "account",
3992 mix: {
3993 block: "user",
3994 elem: "account"
3995 },
3996 content: {
3997 block: "user",
3998 js: {
3999 pos: e++
4000 },
4001 mix: [{
4002 block: "link"
4003 }, {
4004 block: "user",
4005 elem: "account-link"
4006 }],
4007 content: [{
4008 elem: "icon"
4009 }, {
4010 elem: "name",
4011 js: !1
4012 }]
4013 }
4014 }, ""]));
4015 i.after(s), i = s
4016 }
4017 }, this), this.setMod(n.find(this.buildSelector("edit-list")), "visible", "yes"), (!t["can-add-more"] || t.accounts.length >= this.params.maxAccounts) && this.setMod(n.find(this.buildSelector("add")), "hidden", "yes")
4018 }
4019 }
4020 }, {
4021 live: function() {
4022 return this.__base.apply(this, arguments), this._menu || (this._menu = !0, this.liveBindTo("leftclick tap", function(t) {
4023 this._onClick(t)
4024 }).liveBindTo("keyup", function(t) {
4025 t.shiftKey || t.ctrlKey || t.altKey || t.metaKey || t.which === BEM.blocks.keycodes.SPACE && this.domElem.click()
4026 })), this.liveBindTo("account-link", "leftclick tap", function(t) {
4027 var e = this.findBlockOutside($(t.target), "user");
4028 e.params && (t.preventDefault(), this.__self.setMainAccount(e.params.uid))
4029 }), !1
4030 },
4031 setMainAccount: function(t) {
4032 var e = BEM.blocks["i-global"],
4033 n = e.param("passport-host") + "/passport?mode=embeddedauth";
4034 $('<form method="POST" action="' + n + '"><input type="hidden" name="uid" value="' + t + '"><input type="hidden" name="action" value="change_default"><input type="hidden" name="retpath" value="' + e.param("retpath") + '"><input type="hidden" name="yu" value="' + e.param("yandexuid") + '"></form>').appendTo("body").submit()
4035 }
4036 }), BEM.DOM.decl({
4037 block: "dropdown-menu",
4038 baseBlock: "dropdown"
4039 }), BEM.DOM.decl("i-menu", {
4040 onElemSetMod: {
4041 item: {
4042 state: {
4043 current: function(t, e, n, i) {
4044 if ("disabled" == i) return !1;
4045 var r = this.elem("item", "state", "current");
4046 this.delMod(r, "state").trigger("current", {
4047 prev: r,
4048 current: t
4049 })
4050 }
4051 }
4052 }
4053 },
4054 onItemSelectorClick: function(t) {
4055 var e = this._getItemByEvent(t);
4056 this.setMod(e, "state", "current")
4057 },
4058 _getItemByEvent: function(t) {
4059 return t.data.domElem.closest(this.buildSelector("item"))
4060 }
4061 }, {
4062 live: function() {
4063 this.liveBindTo("item-selector", "leftclick tap", function(t) {
4064 this.onItemSelectorClick(t)
4065 })
4066 }
4067 }), BEM.DOM.decl({
4068 block: "b-menu-vert",
4069 baseBlock: "i-menu"
4070 }), BEM.DOM.decl({
4071 name: "b-menu-horiz",
4072 baseBlock: "i-menu"
4073 }), BEM.DOM.decl("user-menu-update", {
4074 onSetMod: {
4075 js: {
4076 inited: function() {
4077 var t = this;
4078 t.updateInformer(t.onUpdateSuccess, t.onUpdateError)
4079 }
4080 }
4081 },
4082 updateInformer: function(t, e) {
4083 var n = this;
4084 n._getExporter().get({
4085 key: $.cookie("yandexuid")
4086 }, function(n) {
4087 n.unread ? t.apply(this, arguments) : e && e.call(this)
4088 }, e)
4089 },
4090 onUpdateSuccess: function(t) {
4091 var e = parseInt(t.unread, 10) || 0,
4092 n = this.params.unreadMax;
4093 e && n && e > n && (e = n + "+");
4094 var i = e ? e + " " : "";
4095 BEM.DOM.update(this.domElem, i + BEM.I18N("user", "letter", {
4096 count: e
4097 }))
4098 },
4099 onUpdateError: function() {},
4100 _getExporter: function() {
4101 return this._exporter || (this._exporter = BEM.create("i-request_type_ajax", {
4102 url: this.__self.getExportApiUrl(),
4103 cache: !1,
4104 callbackCtx: this
4105 }))
4106 },
4107 getDefaultParams: function() {
4108 return {
4109 unreadMax: 99
4110 }
4111 }
4112 }, {
4113 getExportApiUrl: function() {
4114 return BEM.blocks["i-global"].param("export-host") + "/for/unread.xml?callback=?"
4115 }
4116 }), BEM.decl("keycodes", {}, {
4117 BACKSPACE: 8,
4118 TAB: 9,
4119 ENTER: 13,
4120 CAPS_LOCK: 20,
4121 ESC: 27,
4122 SPACE: 32,
4123 PAGE_UP: 33,
4124 PAGE_DOWN: 34,
4125 END: 35,
4126 HOME: 36,
4127 LEFT: 37,
4128 UP: 38,
4129 RIGHT: 39,
4130 DOWN: 40,
4131 INSERT: 45,
4132 DELETE: 46,
4133 is: function(t, e) {
4134 return Array.prototype.slice.call(arguments, 1).some(function(e) {
4135 return this[e] === t
4136 }, this)
4137 }
4138 }),
4139 function(t, e, n) {
4140 function i(t) {
4141 this._addStyle(f), this._params = e.extend({
4142 width: 370,
4143 preset: "ru",
4144 lang: "ru",
4145 domain: "ru",
4146 device: "desktop",
4147 zIndex: 1
4148 }, t), this._top = 0, this._left = 0, this._isOpened = !1, this._isIframeLoaded = !1, this._$iframe = this._buildIframe(this._buildUrl(this._params)), this._$tableau = this._buildAndAppendTableau(this._params, this._$iframe), this._namespace = ".tableau" + b++, this._bindToIframePostMessages(this._namespace)
4149 }
4150 var r = "https://yastatic.net",
4151 s = "/tableau/tableau.html",
4152 o = "tableau",
4153 a = o + "_opened",
4154 u = o + "_closed",
4155 c = o + "__content",
4156 l = o + "__tail",
4157 h = "tableau.",
4158 d = h + "close",
4159 p = h + "height",
4160 m = 1,
4161 f = ".tableau{position:absolute;z-index:-1;visibility:hidden;overflow:visible;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-top:-20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;border:1px solid #ccc;border-color:rgba(0,0,0,.06);-webkit-transition:margin .15s ease-out 0s,opacity .15s ease-out 0s,visibility 0s ease-out .15s;transition:margin .15s ease-out 0s,opacity .15s ease-out 0s,visibility 0s ease-out .15s;-webkit-overflow-scrolling:touch}.tableau_opened{visibility:visible;margin-top:0;opacity:1;-webkit-transition-delay:0s;transition-delay:0s}.tableau__content{display:block;width:100%;height:100%;background:#fff;-webkit-box-shadow:0 30px 70px -10px rgba(0,0,0,.4);box-shadow:0 30px 70px -10px rgba(0,0,0,.4)}.tableau_closed .tableau__content{display:none}.tableau__tail,.tableau__tail:after{position:absolute;display:block;width:0;height:0;border-style:solid;border-color:transparent;border-color:rgba(255,255,255,0)}.tableau__tail{top:-15px;left:32px;border-width:0 14px 14px 14px;border-bottom-color:#ccc;border-bottom-color:rgba(0,0,0,.06)}.tableau__tail:after{top:1.4px;left:-15px;content:'';border-width:0 15px 15px 15px;border-bottom-color:#fff}.tableau_opened .tableau__tail:after{content:' '}",
4162 _ = !1,
4163 b = 0;
4164 i.prototype.setSearchText = function(t) {
4165 var n = JSON.stringify({
4166 fnName: "updateUrls",
4167 fnArgs: [{
4168 text: t,
4169 serviceId: this._params.serviceId
4170 }]
4171 });
4172 return this._isIframeLoaded ? this._postMessage(n) : this._$iframe.load(e.proxy(this._postMessage, this, n)), this
4173 }, i.prototype._postMessage = function(t) {
4174 this._$iframe[0].contentWindow.postMessage(t, "*")
4175 }, i.prototype.setPos = function(t) {
4176 return "undefined" == typeof t.top || (this._top = t.top), "undefined" == typeof t.left || (this._left = t.left), this._isOpened && this._reposition(), this
4177 }, i.prototype._reposition = function() {
4178 this._$tableau.css({
4179 top: this._top - m,
4180 left: this._left - m
4181 })
4182 }, i.prototype.open = function() {
4183 return this._isOpened || (this._reposition(), this._$tableau.css({
4184 zIndex: this._params.zIndex
4185 }).removeClass(u).addClass(a), this._isOpened = !0), this
4186 }, i.prototype.close = function() {
4187 return this._isOpened && (this._isOpened = !1, this._$tableau.removeClass(a), this._$tableau.css({
4188 zIndex: -1
4189 })), this
4190 }, i.prototype.isOpened = function() {
4191 return this._isOpened
4192 }, i.prototype.getNode = function() {
4193 return this._$tableau[0]
4194 }, i.prototype.destruct = function() {
4195 this._$tableau.remove(), e(t).off("message" + this._namespace)
4196 }, i.prototype._buildUrl = function(t) {
4197 var n = {
4198 preset: t.preset,
4199 lang: t.lang,
4200 domain: t.domain,
4201 device: t.device,
4202 "service-id": t.serviceId
4203 };
4204 return "string" == typeof t.target && (n.target = t.target), r + (t.path || s + "?" + e.param(n))
4205 }, i.prototype._buildIframe = function(t) {
4206 var n = this;
4207 return e("<iframe/>", {
4208 "class": c,
4209 src: t,
4210 frameborder: 0,
4211 allowtransparency: !0,
4212 load: function() {
4213 n._isIframeLoaded = !0
4214 }
4215 })
4216 }, i.prototype._buildTail = function() {
4217 return e("<div/>", {
4218 "class": l
4219 })
4220 }, i.prototype._buildAndAppendTableau = function(t, n) {
4221 var i = this;
4222 return e("<div/>", {
4223 "class": o,
4224 css: {
4225 width: t.width + 2 * m,
4226 height: t.height && t.height + 2 * m
4227 }
4228 }).addClass(function() {
4229 return i._params.height && u
4230 }).append(this._buildTail()).append(n).on("transitionend webkitTransitionEnd", function() {
4231 i._isOpened || i._$tableau.addClass(u)
4232 }).appendTo("body")
4233 }, i.prototype._bindToIframePostMessages = function(n) {
4234 var i = this;
4235 e(t).on("message" + n, function(t) {
4236 var e = t.originalEvent.data;
4237 if ("string" == typeof e && 0 === e.indexOf(h)) {
4238 var n = e.split(":");
4239 switch (n[0]) {
4240 case d:
4241 i.close();
4242 break;
4243 case p:
4244 i._params.height || i._$tableau.height(parseInt(n[1], 10) + 2 * m).addClass(u)
4245 }
4246 }
4247 })
4248 }, i.prototype._addStyle = function(t) {
4249 if (!_) {
4250 var e = document.createElement("style");
4251 e.type = "text/css", e.setAttribute("nonce", n.blocks["i-global"].param("nonce")), document.getElementsByTagName("head")[0].appendChild(e), e.styleSheet ? e.styleSheet.cssText = t : "textContent" in e ? e.textContent = t : e.innerHTML = t, _ = !0
4252 }
4253 }, e.Tableau = function(t) {
4254 return new i(t)
4255 }
4256 }(window, jQuery, BEM), BEM.DOM.decl("suggest2", {
4257 onSetMod: {
4258 js: {
4259 inited: function() {
4260 this.params.form || this.findBlockOutside("suggest2-form"), this._lastSubmitTime = 0, this._lastBlurTime = 0, this._clear()
4261 }
4262 }
4263 },
4264 _bodyHandler: function(t) {
4265 if (!this._isDestructing) {
4266 var e = $(t.target),
4267 n = this.containsDomElem(e) || this.params.form.containsDomElem(e);
4268 n || (this._freezeInputFocus = !1)
4269 }
4270 },
4271 getDefaultParams: function() {
4272 return {
4273 submitBySelect: !1,
4274 updateOnEnterByKeyboard: !0,
4275 onFocus: "request",
4276 requestOnEmptyInput: !1,
4277 abortQueries: !1,
4278 sequentialQueriesTimeout: !1
4279 }
4280 },
4281 destruct: function() {
4282 this.unbindAllEvents(), this.__base.apply(this, arguments)
4283 },
4284 init: function() {
4285 var t = this;
4286 return t.params.form.on("submit", function(e, n) {
4287 t._lastSubmitTime = (new Date).getTime(), t._isActualSearchCGIParams ? t._isActualSearchCGIParams = !1 : "suggest2-counter" !== n.data.block && n.data.prevent !== !1 && this.removeHiddenInputs(), t._clear(), t._popup.hide()
4288 }), t._input = t.params["suggest2-input"], t._popup = t.params["suggest2-popup"], t._model = t.initModel(), t._view = t.initView(), t._counter = t.initCounter(), t._model.on({
4289 response: this.setItems,
4290 reject: function(e, n) {
4291 2 === n.code && (t._popup.hide(), t._clear())
4292 }
4293 }, t), t.bindToDoc("click tap leftclick", t._bodyHandler), t.bindEvents(), t
4294 },
4295 initModel: function() {
4296 return BEM.create("suggest2-model", this.params)
4297 },
4298 getModel: function() {
4299 return this._model
4300 },
4301 initView: function(t, e) {
4302 return BEM.create({
4303 block: "suggest2-view",
4304 mods: t || {}
4305 }, e || {})
4306 },
4307 getView: function() {
4308 return this._view
4309 },
4310 initCounter: function() {
4311 return this.params.counter ? this.params.counter.initValues().bindEvents() : void 0
4312 },
4313 getCounter: function() {
4314 return this._counter
4315 },
4316 setDataConverter: function(t) {
4317 return this.getModel().getProvider().convert = t, this
4318 },
4319 setRequestData: function(t) {
4320 return this.getModel().getProvider().getRequestData = t, this
4321 },
4322 setRequestUrl: function(t) {
4323 return this.getModel().getProvider().getRequestUrl = t, this
4324 },
4325 setOwner: function(t) {
4326 return this._popup.owner(t), this
4327 },
4328 bindEvents: function() {
4329 var t = this;
4330 return t._input.bindEvents({
4331 change: t._onChange,
4332 focus: t._onFocus,
4333 blur: t._onBlur
4334 }, t), t._popup.on({
4335 preshow: function() {
4336 t.trigger("preshow")
4337 },
4338 show: function() {
4339 t.trigger("show")
4340 },
4341 hide: function(e, n) {
4342 t.trigger("hide", n)
4343 }
4344 }), t.params.form && t.params.form.on("button-press", t._onSearchButtonMousedown, t), BEM.blocks["suggest2-item"].on(t.domElem, {
4345 "link-click": function(e, n) {
4346 t._counter && "_self" === $(n.$e.target).attr("target") && n.$e.preventDefault()
4347 }
4348 }), t
4349 },
4350 _onSearchButtonMousedown: function() {
4351 this._input.realVal(this._input.val()), this._popup.hide()
4352 },
4353 unbindAllEvents: function() {
4354 var t = this;
4355 return t.unbindFromDoc("click tap leftclick"), t._input.unbindAllEvents(), t.params.form.un("submit"), t._model.un("response").un("reject"), t._popup.un("preshow").un("show").un("hide"), t.params.form && t.params.form.un("button-press", t._onSearchButtonMousedown, t), t
4356 },
4357 setItems: function(t, e) {
4358 var n = this,
4359 i = e.data.items || [];
4360 return n._isFormSubmitDurinQuery() || !i.length ? (n._popup.hide(), n._clear()) : this.params.sequentialQueriesTimeout || n._input.val() === e.val ? (n._text = e.val, n._pos = e.pos, n._meta = e.data.meta || {}, n._popup.show(n._view.html(i, n._meta)).width(n.getPopupWidth()), n._items = n.findBlocksInside("suggest2-item"), n._clearItems().trigger("update", {
4361 val: n._text,
4362 pos: n._pos,
4363 items: n._items
4364 }), n) : n._clear()
4365 },
4366 getItems: function() {
4367 return this._items || []
4368 },
4369 isBlur: function() {
4370 return this._isBlur && !this._isMouseDown
4371 },
4372 getPopupWidth: function() {},
4373 getInputWidth: function() {},
4374 isNeedSubmitFormOnSelectItem: function(t) {
4375 return this.params.submitBySelect && "link" !== t.getMod("interact")
4376 },
4377 _isFormSubmitDurinQuery: function() {
4378 return this._lastSubmitTime ? (this._model.filterRequestsByVal(this._input.realVal()), this._model.isTimeInRequestInterval(this._lastSubmitTime)) : !1
4379 },
4380 _onChange: function(t, e) {
4381 this._model.request(this._input.realVal(this._input.val()), this._input.getCaretPosition(), e)
4382 },
4383 _onFocus: function() {
4384 !this._popup.isShown() && this._isBlur && this.params.onFocus && this._isLastBlurTimeLater(50) && (this.getItems().length && this._input.val() === this._text ? (this._clearItems(), this._popup.show()) : this._isMouseDown || "request" !== this.params.onFocus || this._onChange())
4385 },
4386 _onBlur: function() {
4387 this._isBlur ? (this._clear(), this._popup.hide()) : this._freezeInputFocus ? (this._clear(), this._input.focus()) : this._isMouseDown && this._input.focus(), this._lastBlurTime = (new Date).getTime(), this._isBlur = !0
4388 },
4389 _getItemIndex: function(t) {
4390 return this.getItems().indexOf(t)
4391 },
4392 _clear: function() {
4393 return this._isBlur = !0, this._freezeInputFocus = !1, this._clearItems()
4394 },
4395 _clearItems: function() {
4396 return this._isMouseDown = !1, this._enterItemIndex = -1, this._unselectItems()
4397 },
4398 _isLastBlurTimeLater: function(t) {
4399 return (new Date).getTime() - this._lastBlurTime > t
4400 },
4401 _unselectItems: function(t) {
4402 var e = t ? [].slice.call(arguments) : this.getItems();
4403 return e.forEach(function(t) {
4404 t.onLeave()
4405 }), this
4406 },
4407 _onSelectItem: function(t, e) {
4408 var n = this,
4409 i = n._getItemIndex(t),
4410 r = t.onSelect(e),
4411 s = t.valOnSelect();
4412 return n._text = n._input.realVal(s), n._isBlur = !0, n._freezeInputFocus = !1, n._setSearchCGIParams(t), n.trigger("select", {
4413 val: n._text,
4414 pos: n._pos,
4415 item: t,
4416 meta: n._meta,
4417 itemIndex: i,
4418 byKeyboard: e,
4419 callbackOnSelect: r
4420 }), s !== !1 && (n._items = [], this.isNeedSubmitFormOnSelectItem(t) && n.params.form.submit()), i
4421 },
4422 _isActualSearchCGIParams: !1,
4423 _setSearchCGIParams: function(t) {
4424 this.params.form.removeHiddenInputs(), t.params.searchCGI && (this._isActualSearchCGIParams = !0, this.params.form.appendHiddenInputs(t.params.searchCGI.map(function(t) {
4425 return {
4426 name: t[0],
4427 value: t[1]
4428 }
4429 })))
4430 },
4431 _onDownItem: function() {
4432 this._isBlur = !1, this._isMouseDown = !0
4433 }
4434 }), BEM.DOM.decl("suggest2", {
4435 bindEvents: function() {
4436 var t = this;
4437 return t._input.bindEvents({
4438 keydown: t._onKeyDown,
4439 keyup: t._onKeyUp,
4440 keypress: t._onKeyPress,
4441 mousedown: function() {
4442 t._input.isFocused() && t._onFocus()
4443 }
4444 }, t), BEM.blocks["suggest2-item"].on(t.domElem, {
4445 mouseover: function(e) {
4446 t._onEnterItem(e.block, !1)
4447 },
4448 mouseout: function(e, n) {
4449 var i = e.block.domElem[0];
4450 i === n.relatedTarget || $.contains(i, n.relatedTarget) || t._onLeaveItem(e.block, !1)
4451 },
4452 mousedown: function() {
4453 t._onDownItem()
4454 },
4455 leftclick: function(e) {
4456 t._onSelectItem(e.block, !1)
4457 }
4458 }), t.__base.apply(t, arguments)
4459 },
4460 _onKeyDown: function(t) {
4461 var e = this.__self.keyboard,
4462 n = t.which;
4463 !this._popup.isShown() || n !== e.up && n !== e.down || (t.preventDefault(), this._enterByKeyboard(n))
4464 },
4465 _onKeyUp: function(t) {
4466 var e = this.__self.keyboard;
4467 if (t.which !== e.left && t.which !== e.right || (this.trigger("change-cursor-pos"), this._model.request(this._input.realVal(this._input.val()), this._input.getCaretPosition())), t.which === e.right && ~this._enterItemIndex && this._enterItemByKeyboard) {
4468 var n = this._items[this._enterItemIndex];
4469 n && this.trigger("ahead", {
4470 item: n,
4471 val: "link" === n.getMod("interact") ? n.elem("text").text() : n.val()
4472 })
4473 }
4474 },
4475 _onKeyPress: function(t) {
4476 if (t.which === this.__self.keyboard.enter && ~this._enterItemIndex && this._enterItemByKeyboard) {
4477 var e = this._items[this._enterItemIndex];
4478 e && (t.preventDefault(), this._onSelectItem(e, !0))
4479 }
4480 },
4481 _enterByKeyboard: function(t) {
4482 var e = t - 39,
4483 n = this._items.length,
4484 i = this._enterItemIndex + e;
4485 return -1 === i || i === n ? (this._enterItemIndex = i, this._unselectItems(this._items[i]), this.trigger("out", {
4486 val: this._text,
4487 byKeyboard: !0
4488 })) : (0 > i ? i = n - 1 : i >= n && (i = 0), void this._onEnterItem(this._items[i], !0))
4489 },
4490 _onEnterItem: function(t, e) {
4491 this._enterItemIndex = this._getItemIndex(t), this._enterItemByKeyboard = e, this._unselectItems(), t.onEnter(e)
4492 },
4493 _onLeaveItem: function(t, e) {
4494 this._clearItems()._unselectItems(t)
4495 }
4496 }, {
4497 keyboard: {
4498 enter: 13,
4499 left: 37,
4500 up: 38,
4501 right: 39,
4502 down: 40
4503 },
4504 live: function() {
4505 this.liveBindTo("mousedown", function() {
4506 this._onDownItem()
4507 })
4508 }
4509 }), BEM.DOM.decl("suggest2", {
4510 init: function() {
4511 this.__base.apply(this, arguments);
4512 var t = this.params,
4513 e = "month" === t.page;
4514 this.setDataConverter(function(t) {
4515 if (!t || !t.length) return {
4516 data: {}
4517 };
4518 var n, i = t[1];
4519 return e && (i = i.filter(function(t) {
4520 return "weather" === t.kind
4521 }), n = {
4522 weatherSfx: "/month"
4523 }), i = i.map(function(t) {
4524 return ["weather", t.name, "", "", "", {
4525 url: BEM.blocks["geo-suggest-util"].getUrl(t, n),
4526 target: "_self",
4527 hl: t.hl
4528 }]
4529 }), {
4530 orig: t[0],
4531 items: i,
4532 meta: {}
4533 }
4534 })
4535 }
4536 }), BEM.decl("suggest2-model", {
4537 onSetMod: {
4538 js: {
4539 inited: function() {
4540 this._requests = []
4541 }
4542 }
4543 },
4544 destruct: function() {
4545 this._provider && this._provider.destruct(), this.__base.apply(this, arguments)
4546 },
4547 getProvider: function() {
4548 return this._provider ? this._provider : (this._provider = this.setProvider(this.params), this._provider)
4549 },
4550 setProvider: function(t) {
4551 return this._provider = BEM.create("suggest2-provider", t), this._provider
4552 },
4553 getCancelRequestConditions: function() {
4554 return [{
4555 block: "suggest2",
4556 show: !1
4557 }, {
4558 block: "suggest2",
4559 event: "select"
4560 }, {
4561 block: "suggest2-item",
4562 event: "select"
4563 }, {
4564 block: "suggest2",
4565 event: "out"
4566 }, {
4567 block: "suggest2-item",
4568 show: !1
4569 }, {
4570 block: "suggest2-popup",
4571 event: "hide"
4572 }, {
4573 suggest: !1
4574 }, {
4575 source: "sample"
4576 }]
4577 },
4578 request: function(t, e, n) {
4579 var i = this,
4580 r = {
4581 val: t,
4582 caretPosition: e,
4583 data: n
4584 };
4585 i._requests.push(r);
4586 var s = i._isNeedRequest(t, n);
4587 return s.need ? (r.requestTime = (new Date).getTime(), i.trigger("request", {
4588 val: t,
4589 pos: e
4590 }), i.getProvider().get(t, e, function(t, e, n) {
4591 r.responseTime = (new Date).getTime(), i._onResponse(t, e, n);
4592 var s = i._requests[i._requests.length - 1];
4593 i.params.sequentialQueriesTimeout && s.val !== t && i.request(s.val, s.caretPosition, s.data)
4594 }), i) : i.trigger("reject", {
4595 val: t,
4596 pos: e,
4597 code: s.code,
4598 reason: s.reason || {}
4599 })
4600 },
4601 isTimeInRequestInterval: function(t) {
4602 for (var e = this._requests.length - 1; e >= 0; e--)
4603 if (t > this._requests[e].requestTime && t < this._requests[e].responseTime) return !0;
4604 return !1
4605 },
4606 filterRequestsByVal: function(t) {
4607 this._requests = this._requests.filter(function(e) {
4608 return e.val === t
4609 })
4610 },
4611 _isNeedRequest: function(t, e) {
4612 if ("" === t && !this.params.requestOnEmptyInput) return {
4613 need: !1,
4614 code: 2
4615 };
4616 var n;
4617 if (this.params.sequentialQueriesTimeout)
4618 for (n = this._requests.length - 1; n >= 0; n--) {
4619 var i = this._requests[n];
4620 if (void 0 === i.responseTime && (new Date).getTime() - i.requestTime < this.params.sequentialQueriesTimeout) return {
4621 need: !1,
4622 code: 3,
4623 reason: {
4624 request: i
4625 }
4626 }
4627 }
4628 if (!e) return {
4629 need: !0
4630 };
4631 var r, s = this.getCancelRequestConditions();
4632 t: for (n = 0; n < s.length; n++) {
4633 r = s[n];
4634 for (var o in r)
4635 if (r.hasOwnProperty(o) && r[o] !== e[o]) continue t;
4636 return {
4637 need: !1,
4638 code: 1,
4639 reason: {
4640 condition: r
4641 }
4642 }
4643 }
4644 return {
4645 need: !0
4646 }
4647 },
4648 _onResponse: function(t, e, n) {
4649 this.trigger("response", {
4650 val: t,
4651 pos: e,
4652 data: n
4653 })
4654 }
4655 }), BEM.DOM.decl("suggest2-detect", {
4656 onSetMod: {
4657 js: {
4658 inited: function() {
4659 this.bindToDoc("keydown", function(t) {
4660 this.__self._pressedKeyCode = t.which
4661 }, this).bindToDoc("keyup", function() {
4662 this.__self._pressedKeyCode = null
4663 }, this), this.__self.isSupportInlineSVG() || this.setMod("inlinesvg", "no")
4664 }
4665 }
4666 }
4667 }, {
4668 _pressedKeyCode: null,
4669 isPressedEscape: function() {
4670 return 27 === this._pressedKeyCode
4671 },
4672 _isSupportInlineSVG: null,
4673 isSupportInlineSVG: function() {
4674 if (null !== this._isSupportInlineSVG) return this._isSupportInlineSVG;
4675 var t = document.createElement("div");
4676 return t.innerHTML = "<svg/>", this._isSupportInlineSVG = "http://www.w3.org/2000/svg" === (t.firstChild && t.firstChild.namespaceURI), this._isSupportInlineSVG
4677 }
4678 }),
4679 function(t) {
4680 if (t.support.cors || !t.ajaxTransport || !window.XDomainRequest) return t;
4681 var e = /^(https?:)?\/\//i,
4682 n = /^get|post$/i,
4683 i = new RegExp("^(//|" + location.protocol + ")", "i");
4684 return t.ajaxTransport("* text html json", function(r, s, o) {
4685 if (r.crossDomain && r.async && n.test(r.type) && e.test(r.url) && i.test(r.url)) {
4686 var a = null;
4687 return {
4688 send: function(e, n) {
4689 var i = "",
4690 o = (s.dataType || "").toLowerCase();
4691 a = new XDomainRequest, /^\d+$/.test(s.timeout) && (a.timeout = s.timeout), a.ontimeout = function() {
4692 n(500, "timeout")
4693 }, a.onload = function() {
4694 var e = "Content-Length: " + a.responseText.length + "\r\nContent-Type: " + a.contentType,
4695 i = {
4696 code: 200,
4697 message: "success"
4698 },
4699 r = {
4700 text: a.responseText
4701 };
4702 try {
4703 if ("html" === o || /text\/html/i.test(a.contentType)) r.html = a.responseText;
4704 else if ("json" === o || "text" !== o && /\/json/i.test(a.contentType)) try {
4705 r.json = t.parseJSON(a.responseText)
4706 } catch (s) {
4707 i.code = 500, i.message = "parseerror"
4708 }
4709 } catch (u) {
4710 throw u
4711 } finally {
4712 n(i.code, i.message, r, e)
4713 }
4714 }, a.onprogress = function() {}, a.onerror = function() {
4715 n(500, "error", {
4716 text: a.responseText
4717 })
4718 }, s.data && (i = "string" === t.type(s.data) ? s.data : t.param(s.data)), a.open(r.type, r.url), a.send(i)
4719 },
4720 abort: function() {
4721 a && a.abort()
4722 }
4723 }
4724 }
4725 }), t
4726 }(jQuery), BEM.decl("suggest2-provider", {
4727 getDefaultParams: function() {
4728 return {
4729 cache: !1,
4730 type: "GET",
4731 dataType: "jsonp",
4732 timeout: 2e3
4733 }
4734 },
4735 _lastQuery: null,
4736 get: function(t, e, n) {
4737 var i = this,
4738 r = this.params.abortQueries,
4739 s = function() {
4740 n.call(i, t, e, i.convert(i._lastData))
4741 };
4742 return i._lastText === t ? this._lastQuery.always(s) : (i._lastText = t, r && null !== this._lastQuery && this._lastQuery.abort(), void(this._lastQuery = $.ajax(i._extendParamsData(i.getRequestData(t, e))).done(function(t) {
4743 i._lastData = t, r && s()
4744 }).fail(function() {
4745 i._lastData = []
4746 }).always(function() {
4747 r || s()
4748 })))
4749 },
4750 convert: function(t) {
4751 return {
4752 orig: t[0],
4753 items: t[1],
4754 meta: t[2]
4755 }
4756 },
4757 getRequestData: function(t, e) {
4758 var n = {};
4759 return BEM.blocks["suggest2-detect"].isSupportInlineSVG() && (n.svg = 1), $.extend({
4760 part: t,
4761 pos: e
4762 }, n)
4763 },
4764 getRequestUrl: function() {
4765 return this.params.url
4766 },
4767 _extendParamsData: function(t) {
4768 return this.params.url = this.getRequestUrl(), this.params.data = $.extend(this.params.data || {}, t), this.params
4769 },
4770 _lastText: void 0,
4771 _lastData: []
4772 }), BEM.decl("suggest2-view", {
4773 html: function(t, e) {
4774 return BEMHTML.apply(this.build(t, e))
4775 },
4776 build: function(t, e) {
4777 return {
4778 block: "suggest2",
4779 elem: "content",
4780 mods: {
4781 theme: "normal"
4782 },
4783 content: this.buildItems(t, e)
4784 }
4785 },
4786 buildItems: function(t, e) {
4787 return t.reduce(function(t, e) {
4788 return t.push(this.buildItem(e)), t
4789 }.bind(this), [])
4790 },
4791 buildItem: function(t) {
4792 var e = this.__self._getPrefs(t),
4793 n = this.__self._getType(t, e),
4794 i = "html" === n || "bemjson" === n ? {} : {
4795 type: n
4796 };
4797 return this._getItemByType(t, e, n, {
4798 text: {
4799 elem: "text",
4800 content: this.__self._highlight(this.__self._getText(t, e), e)
4801 },
4802 mods: i,
4803 js: e.js || {},
4804 props: {},
4805 content: []
4806 })
4807 },
4808 _getItemByType: function(t, e, n, i) {
4809 var r = i.text,
4810 s = i.mods,
4811 o = i.js,
4812 a = i.props,
4813 u = i.content;
4814 if (e.pers && (s.personal = "yes"), "fact" === n) u.push(r, {
4815 elem: "bullet"
4816 }, {
4817 elem: "fact",
4818 content: t[2]
4819 });
4820 else if ("weather" === n) u.push(r, {
4821 elem: "icon",
4822 elemMods: {
4823 weather: t[3]
4824 }
4825 }, {
4826 elem: "fact",
4827 content: t[2]
4828 });
4829 else if ("traffic" === n) u.push(r, {
4830 elem: "icon",
4831 elemMods: {
4832 traffic: t[3]
4833 }
4834 }, {
4835 elem: "fact",
4836 content: t[2]
4837 });
4838 else if ("nav" === n) o.val = t[1], s.interact = "link", a.url = this.__self._resolveUrl(t[4]), u.push({
4839 elem: "text",
4840 content: t[3]
4841 }, {
4842 elem: "bullet"
4843 }, {
4844 elem: "fact",
4845 content: t[2]
4846 });
4847 else if ("icon" === n) {
4848 var c = {};
4849 e.icon.forEach(function(t, e, n) {
4850 Array.isArray(t) ? c[t[0]] = t[1] : 0 === e && (c[t] = n[e + 1])
4851 }), u.push(r, $.extend({
4852 elem: "icon",
4853 elemMods: {
4854 type: "favicon"
4855 }
4856 }, c)), e.fact && u.push({
4857 elem: "fact",
4858 content: e.fact
4859 })
4860 } else "html" === n ? (o.val = t[1], u.push(e.body)) : "bemjson" === n ? (o.val = t[1], u = u.concat(e.bemjson)) : u.push(r);
4861 return e.url && (s.interact = "link", a.url = this.__self._resolveUrl(e.url), e.target && (a.target = e.target)), e.search_cgi && (o.searchCGI = e.search_cgi), $.extend({
4862 block: "suggest2-item",
4863 mods: s,
4864 js: o,
4865 content: u
4866 }, a)
4867 }
4868 }, {
4869 _getPrefs: function(t) {
4870 if (!Array.isArray(t)) return {};
4871 var e = t[t.length - 1];
4872 return $.isPlainObject(e) ? e : {}
4873 },
4874 _getType: function(t, e) {
4875 var n = Array.isArray(t) ? t[0] || "text" : "text";
4876 return "icon" !== n || e.icon ? n : "text"
4877 },
4878 _getText: function(t) {
4879 return Array.isArray(t) ? t[1] : t
4880 },
4881 _highlight: function(t, e) {
4882 if (!e.hl) return t;
4883 var n, i = e.hl.sort(function(t, e) {
4884 return t[0] - e[0]
4885 }).filter(function(t) {
4886 return t[0] >= 0
4887 }),
4888 r = [],
4889 s = 0;
4890 return i.length ? (i.forEach(function(e) {
4891 n = s > e[0] ? s : e[0], r.push(t.slice(s, n)), r.push({
4892 elem: "highlight",
4893 content: t.slice(n, s = e[1])
4894 })
4895 }, this), r.push(t.slice(s)), r.filter(function(t) {
4896 return !!t
4897 })) : t
4898 },
4899 _resolveUrl: function(t) {
4900 return (/[\/]{2}/.test(t) ? "" : "http://") + t
4901 }
4902 }), BEM.decl("suggest2-view", {}, {
4903 _getGroupType: function(t, e) {
4904 return t.pers ? "nah" : ~["nav"].indexOf(e) ? e : "text"
4905 },
4906 _getTextLabel: function(t) {
4907 return BEM.I18N("suggest2", t)
4908 }
4909 }), BEM.decl("suggest2-popup", {
4910 onSetMod: {
4911 js: {
4912 inited: function() {
4913 this._popup = this.params.popup, this._popup.on("hide", function() {
4914 BEM.blocks["suggest2-detect"].isPressedEscape() && this.trigger("hide", {})
4915 }, this), this.bindSuggestEvents()
4916 }
4917 }
4918 },
4919 show: function(t) {
4920 return this._popup.domElem ? (t && this._popup.setContent(t), this.isShown() ? this : (this.trigger("preshow"), this._popup.show(this.params.owner), this.trigger("show"), this)) : this
4921 },
4922 hide: function(t) {
4923 return this.isShown() && (this._popup.hide(), this.trigger("hide", t || {})), this
4924 },
4925 setContent: function(t) {
4926 return this._popup.setContent(t), this
4927 },
4928 isShown: function() {
4929 return this._popup ? this._popup.isShown() : !1
4930 },
4931 owner: function(t) {
4932 return t ? (this.params.owner = t, this) : this.params.owner
4933 },
4934 getOwnerPos: function() {
4935 return this._popup.getOwnerPos() || {}
4936 },
4937 get: function() {
4938 return this._popup
4939 },
4940 width: function(t) {
4941 return void 0 === t ? this._popup.domElem.outerWidth() : (this._popup.domElem.outerWidth(t), this)
4942 },
4943 destruct: function() {
4944 this._popup && (this.unbindAllEvents(), this.__base.apply(this, arguments))
4945 },
4946 bindSuggestEvents: function() {
4947 return this.params.suggest.on({
4948 select: function(t, e) {
4949 this.hide(e)
4950 },
4951 update: function(t, e) {
4952 e.items.length || this.hide({
4953 response: "empty"
4954 })
4955 }
4956 }, this), this
4957 },
4958 unbindAllEvents: function() {
4959 return this.params.suggest.un("select").un("update"), this
4960 }
4961 }), BEM.decl("suggest2-input", {
4962 onSetMod: {
4963 js: {
4964 inited: function() {
4965 var t = this;
4966 t._input = t.params.input, t.disableBrowserAutocomplete(), t.realVal(t.val()), t.bindEvents({
4967 change: function(e, n) {
4968 t.trigger("change", n)
4969 },
4970 clear: $.throttle(function(e, n) {
4971 t.trigger("clear", n)
4972 }, 300)
4973 }, t), t.bindSuggestEvents()
4974 }
4975 }
4976 },
4977 destruct: function() {
4978 this.unbindAllEvents(), this.__base.apply(this, arguments)
4979 },
4980 get: function() {
4981 return this._input
4982 },
4983 isFocused: function() {
4984 return this._input.hasMod("focused")
4985 },
4986 focus: function() {
4987 return this._input.setMod("focused", "yes"), this
4988 },
4989 blur: function() {
4990 return this._input.delMod("focused"), this
4991 },
4992 getControl: function() {
4993 return this._input.elem("control")
4994 },
4995 val: function(t, e) {
4996 return this._input.val.apply(this._input, arguments)
4997 },
4998 valWithoutSuggest: function(t, e) {
4999 return this._input.val.call(this._input, t, $.extend(e, {
5000 suggest: !1
5001 }))
5002 },
5003 realVal: function(t) {
5004 return void 0 === t ? this._realVal : ("string" == typeof t && (this._realVal = t), this._realVal)
5005 },
5006 width: function() {
5007 return this._input.domElem.width()
5008 },
5009 getCaretPosition: function() {
5010 var t, e = this.getControl()[0],
5011 n = this.val().length;
5012 return document.selection ? (t = document.selection.createRange(), t.moveStart("character", -n), t.text.length) : "number" == typeof e.selectionStart ? e.selectionStart : n
5013 },
5014 moveCaretToEnd: function() {
5015 var t = this.getControl()[0],
5016 e = t.value.length;
5017 if ("number" == typeof t.selectionStart) t.scrollLeft = 999999, t.setSelectionRange(e, e);
5018 else if ("undefined" != typeof t.createTextRange) {
5019 var n = t.createTextRange();
5020 n.collapse(!1), n.select()
5021 }
5022 return this
5023 },
5024 disableBrowserAutocomplete: function() {
5025 var t = this._input.hasMod("focused");
5026 t && this._input.delMod("focused"), this.getControl().attr({
5027 autocomplete: "off",
5028 autocorrect: "off",
5029 autocapitalize: "off",
5030 spellcheck: "false",
5031 "aria-autocomplete": "list"
5032 }), t && this._input.setMod("focused", "yes")
5033 },
5034 _bindedEventsNames: [],
5035 bindEvents: function(t, e) {
5036 return Object.keys(t).forEach(function(n) {
5037 -1 === this._bindedEventsNames.indexOf(n) && this._bindedEventsNames.push(n), this._eventsFilter(n).on(n, t[n].bind(e || this))
5038 }, this), this
5039 },
5040 bindSuggestEvents: function() {
5041 var t = this.params.suggest;
5042 return t.on({
5043 out: function(t, e) {
5044 this.a11yDeactive(), this._changeValueByEvent(t, e)
5045 }
5046 }, this), BEM.blocks["suggest2-item"].on(t.domElem, {
5047 tpah: function(t, e) {
5048 this._changeValueByEvent(t, e), this.moveCaretToEnd()
5049 },
5050 select: function(t, e) {
5051 "link" !== t.block.getMod("interact") && (this._changeValueByEvent(t, e), this.moveCaretToEnd())
5052 },
5053 enter: function(t, e) {
5054 this.a11yActive(e.id), e.byKeyboard && this.params.updateOnEnterByKeyboard && (this._changeValueByEvent(t, e), this.moveCaretToEnd())
5055 }
5056 }, this), this
5057 },
5058 unbindAllEvents: function() {
5059 return this._input.domElem && this._bindedEventsNames.forEach(function(t) {
5060 var e = this._eventsFilter(t);
5061 e[e instanceof BEM.DOM ? "un" : "off"](t)
5062 }, this), this._bindedEventsNames = [], this.params.suggest.un("out"), this
5063 },
5064 a11yActive: function(t) {
5065 this.getControl().attr("aria-activedescendant", t)
5066 },
5067 a11yDeactive: function() {
5068 this.getControl().removeAttr("aria-activedescendant")
5069 },
5070 _eventsFilter: function(t) {
5071 return ~["blur", "focus", "change", "clear"].indexOf(t) ? this._input : this.getControl()
5072 },
5073 _changeValueByEvent: function(t, e) {
5074 var n = e && void 0 !== e.val ? e.val : this.realVal();
5075 this.val(n, $.extend({
5076 block: t.block.__self.getName(),
5077 event: t.type
5078 }, e))
5079 }
5080 }), BEM.decl("suggest2-input", {
5081 onSetMod: {
5082 js: {
5083 inited: function() {
5084 this.__base.apply(this, arguments), this.bindEvents({
5085 keydown: function(t) {
5086 t.which === this.params.suggest.__self.keyboard.enter && this.trigger("enter")
5087 }
5088 }, this)
5089 }
5090 }
5091 }
5092 }), BEM.DOM.decl("suggest2-item", {
5093 val: function() {
5094 if (void 0 !== this.params.val) return this.params.val;
5095 var t = this.elem("text");
5096 return (t.length ? t : this.domElem).text()
5097 },
5098 valOnSelect: function() {
5099 return this.val()
5100 },
5101 valOnEnter: function() {
5102 return this.val()
5103 },
5104 valOnLeave: function() {
5105 return this.val()
5106 },
5107 onEnter: function(t) {
5108 return this.setMod("selected", "yes").triggerEvent("enter", {
5109 val: this.valOnEnter(),
5110 byKeyboard: t
5111 })
5112 },
5113 onLeave: function(t) {
5114 return this.delMod("selected").triggerEvent("leave", {
5115 val: this.valOnLeave(),
5116 byKeyboard: t
5117 })
5118 },
5119 onSelect: function(t) {
5120 this.triggerEvent("select", {
5121 val: this.valOnSelect(),
5122 byKeyboard: t
5123 })
5124 },
5125 triggerEvent: function(t, e) {
5126 return this.trigger(t, {
5127 val: e.val,
5128 id: this.domElem.attr("id"),
5129 show: !1,
5130 byKeyboard: e.byKeyboard
5131 })
5132 }
5133 }), BEM.DOM.decl("suggest2-item", {}, {
5134 live: function() {
5135 this.__base.apply(this, arguments), this.liveBindTo("mouseover mouseout mousedown leftclick", function(t) {
5136 this.trigger(t.type, t)
5137 }).liveBindTo("link", "leftclick", function(t) {
5138 this.trigger("link-click", {
5139 $e: t
5140 })
5141 })
5142 }
5143 }), BEM.DOM.decl({
5144 block: "suggest2-item",
5145 modName: "interact",
5146 modVal: "link"
5147 }, {
5148 onSelect: function(t) {
5149 var e = this;
5150 e.__base.apply(e, arguments);
5151 var n = e.elem("link");
5152 return t || "_self" === n.attr("target") ? function() {
5153 e._locationChange(n.attr("href"))
5154 } : void 0
5155 },
5156 _locationChange: function(t) {
5157 window.location = t
5158 },
5159 valOnSelect: function() {
5160 return !1
5161 }
5162 }), BEM.decl("geo-suggest-util", {}, {
5163 getUrl: function(t, e) {
5164 var n = BEM.blocks["i-global"].param("host") + BEM.blocks["i-global"].param("service-root"),
5165 i = $.queryParam("lang") || "";
5166 return "weather" === t.kind && t.geoid ? n + "/" + t.geoid + (e && e.weatherSfx || "") + (i && "?lang=" + i) : -1 === ["street", "house", "metro", "airport"].indexOf(t.kind) ? n + "/?lat=" + t.lat + "&lon=" + t.lon + (i && "&lang=" + i) : n + "/?name=" + encodeURIComponent(t.name) + "&kind=" + encodeURIComponent(t.kind) + "&lat=" + t.lat + "&lon=" + t.lon + (i && "&lang=" + i)
5167 }
5168 }), BEM.DOM.decl({
5169 block: "suggest2",
5170 modName: "theme",
5171 modVal: "normal"
5172 }, {
5173 getPopupWidth: function() {
5174 return this._input.width()
5175 }
5176 }), BEM.DOM.decl({
5177 block: "suggest2",
5178 modName: "theme",
5179 modVal: "large"
5180 }, {
5181 init: function() {
5182 this.__base.apply(this, arguments), this.updateItemMinWidth()
5183 },
5184 initView: function(t, e) {
5185 return t = t || {}, this.__base($.extend(t, {
5186 theme: "large",
5187 group: t.group || this.getMod("group") || "type"
5188 }), e)
5189 },
5190 getInputWidth: function() {
5191 return this._input.get().domElem.outerWidth()
5192 },
5193 updateItemMinWidth: function() {
5194 var t = this.getInputWidth() + this.__self.ITEM_MARGIN_LEFT;
5195 return this._view.setMinWidth(t), t
5196 }
5197 }, {
5198 ITEM_MARGIN_LEFT: 130
5199 }), BEM.DOM.decl({
5200 block: "suggest2",
5201 modName: "theme",
5202 modVal: "large"
5203 }, {
5204 updateItemMinWidth: function() {
5205 var t = this.getInputWidth() + this.getInputOffset();
5206 return this._view.setMinWidth(t), t
5207 },
5208 getInputOffset: function() {
5209 return this._input.get().domElem.offset().left
5210 }
5211 }), BEM.decl({
5212 block: "suggest2-view",
5213 modName: "theme",
5214 modVal: "large"
5215 }, {
5216 build: function(t, e) {
5217 var n = this.__base.apply(this, arguments);
5218 return n.mods.theme = "large", n
5219 }
5220 }), BEM.decl({
5221 block: "suggest2-view",
5222 modName: "theme",
5223 modVal: "large"
5224 }, {
5225 getMinWidth: function() {
5226 return this._minWidth || 0
5227 },
5228 setMinWidth: function(t) {
5229 return this._minWidth = t, this
5230 },
5231 build: function(t, e) {
5232 var n = this.__base.apply(this, arguments);
5233 return n.attrs = {
5234 style: "min-width:" + this.getMinWidth() + "px;"
5235 }, n
5236 }
5237 }), BEM.decl({
5238 block: "suggest2-view",
5239 modName: "group",
5240 modVal: "type"
5241 }, {
5242 buildItems: function(t, e) {
5243 var n, i;
5244 return t.reduce(function(t, e) {
5245 var r = this.__self._getPrefs(e),
5246 s = this.__self._getType(e, r),
5247 o = this.__self._getGroupType(r, s);
5248 return n !== o && (n = o, i = [], t.push({
5249 block: "suggest2",
5250 elem: "group",
5251 content: [{
5252 elem: "title",
5253 content: this.__self._getTextLabel(n)
5254 }, {
5255 elem: "items",
5256 content: i
5257 }]
5258 })), i.push(this.buildItem(e)), t
5259 }.bind(this), [])
5260 }
5261 }), BEM.DOM.decl({
5262 block: "suggest2",
5263 modName: "adaptive",
5264 modVal: "yes"
5265 }, {
5266 init: function() {
5267 this.__base.apply(this, arguments), this._boundResizeHandler = this._resizeHandler.bind(this), this.__self._bindToWinResize(this._boundResizeHandler)
5268 },
5269 _resizeHandler: function() {
5270 this._popup.width(this.getPopupWidth())
5271 },
5272 destruct: function() {
5273 this.__self._unbindFromWinResize(this._boundResizeHandler), this._boundResizeHandler = null, this.__base.apply(this, arguments)
5274 }
5275 }, {
5276 _resizeCallbacks: [],
5277 _bindToWinResize: function(t) {
5278 return this._resizeCallbacks.push(t), this
5279 },
5280 _unbindFromWinResize: function(t) {
5281 for (var e = 0; e < this._resizeCallbacks.length; e++)
5282 if (this._resizeCallbacks[e] === t) return this._resizeCallbacks.splice(e, 1), this;
5283 return this
5284 },
5285 _getResizeCallback: function() {
5286 return $.throttle(function() {
5287 var t = arguments;
5288 this._resizeCallbacks.forEach(function(e) {
5289 e.apply(this, t)
5290 }, this)
5291 }, 300, this)
5292 },
5293 live: function() {
5294 this.__base.apply(this, arguments), this._resizeCallback = this._getResizeCallback(), BEM.DOM.win.on("resize", this._resizeCallback)
5295 }
5296 }), BEM.DOM.decl({
5297 block: "suggest2",
5298 modName: "adaptive",
5299 modVal: "yes"
5300 }, {
5301 init: function() {
5302 this.__base.apply(this, arguments), this.hasMod("theme", "large") && this.__self._bindToWinResize(this.updateItemMinWidth.bind(this))
5303 },
5304 _itemMinWidth: 0,
5305 updateItemMinWidth: function() {
5306 var t = this.__base.apply(this, arguments);
5307 return t !== this._itemMinWidth && (this._itemMinWidth = t, this.findElem("content").css("min-width", t)), t
5308 }
5309 }), BEM.DOM.decl({
5310 block: "suggest2",
5311 modName: "group",
5312 modVal: "label"
5313 }, {
5314 initView: function(t, e) {
5315 return this.__base($.extend(t || {}, {
5316 group: "label"
5317 }), $.extend(e || {}, {
5318 label: this.params.label
5319 }))
5320 }
5321 }), BEM.decl({
5322 block: "suggest2-view",
5323 modName: "group",
5324 modVal: "label"
5325 }, {
5326 buildItems: function(t, e) {
5327 var n, i;
5328 return t.reduce(function(t, e, r) {
5329 var s = this.__self._getPrefs(e).label || "";
5330 if (n !== s) {
5331 n = s, i = [];
5332 var o;
5333 o = s ? s : 0 === r ? "" : this.params.label || this.__self._getTextLabel("text"), t.push({
5334 block: "suggest2",
5335 elem: "group",
5336 content: [{
5337 elem: "title",
5338 content: o
5339 }, {
5340 elem: "items",
5341 content: i
5342 }]
5343 })
5344 }
5345 return i.push(this.buildItem(e)), t
5346 }.bind(this), [])
5347 }
5348 }), BEM.DOM.decl("suggest2-counter", {
5349 onSetMod: {
5350 js: {
5351 inited: function() {
5352 this.clear()
5353 }
5354 }
5355 },
5356 destruct: function() {
5357 this.unbindAllEvents()
5358 },
5359 getDefaultParams: function() {
5360 return {
5361 submitBySelect: !1,
5362 suggestReqID: !1,
5363 preventSubmit: !0,
5364 host: "//yandex.ru",
5365 path: "clck/jclck",
5366 dataUrl: "http://ya.ru",
5367 params: {},
5368 timeout: 300
5369 }
5370 },
5371 metaProps: {
5372 exprt: "exprt",
5373 r: "region",
5374 log: "log"
5375 },
5376 clear: function() {
5377 var t = this;
5378 return t._params = {
5379 user_input: "",
5380 text: ""
5381 }, t._times = [], t._path = {
5382 service: t.params.service,
5383 state: "not_shown",
5384 index: 0,
5385 personal: "nah_not_shown",
5386 submit: ""
5387 }, t._ratio = {
5388 len: 0,
5389 queryLen: 0,
5390 actionsCount: 0
5391 }, t._firstChange = 0, t._lastChange = 0, t._sinceChange = {
5392 first: 0,
5393 last: 0
5394 }, t._selectedText = "", t._session = 0, t._reqID = 0, t._meta = {}, t._afterSendAjaxCallback, t
5395 },
5396 submit: function(t) {
5397 var e = this,
5398 n = e.params.suggest.params["suggest2-input"],
5399 i = n.val();
5400 e._params.text = i, e._params.pos = n.getCaretPosition(), e._selectedText && e._selectedText !== e._params.text && (e._path.state = "edit"), e.params.suggestReqID && e.attachReqID(), e.sendAjax(e.getUrl(), $.extend({
5401 submitForm: !0,
5402 afterSendAjaxCallback: function() {}
5403 }, t)), e.trigger("submit", e._getSubmitEventData()).clear(), e._params.prev_query = i
5404 },
5405 _getSubmitEventData: function() {
5406 var t = this;
5407 return {
5408 path: t._path,
5409 times: t._times,
5410 prev_query: t._params.prev_query,
5411 user_input: t._params.user_input,
5412 text: t._params.text,
5413 pos: t._params.pos,
5414 ratio: t._ratio,
5415 since_first_change: t._sinceChange.first,
5416 since_last_change: t._sinceChange.last,
5417 session: t._session,
5418 suggest_reqid: t._reqID,
5419 meta: t._meta,
5420 url: t.getUrl()
5421 }
5422 },
5423 sendAjax: function(t, e) {
5424 return $.ajax({
5425 type: "GET",
5426 url: t,
5427 dataType: "script",
5428 timeout: this.params.timeout,
5429 cache: !0
5430 }).always(this._sendAjaxAlways.bind(this, e)), this
5431 },
5432 afterSendAjax: function(t) {
5433 return this._afterSendAjaxCallback = t, this
5434 },
5435 getUrl: function() {
5436 return this.params.host + ["/", this.params.path].concat(this._getUrlParams()).join("/").replace(/(\/+)/g, "/")
5437 },
5438 _sendAjaxAlways: function(t) {
5439 this.params.preventSubmit && t.submitForm && this.params.form.submit({
5440 block: this.__self.getName(),
5441 prevent: !1
5442 }), t.afterSendAjaxCallback(), this._afterSendAjaxCallback && this._afterSendAjaxCallback()
5443 },
5444 _getUrlParams: function() {
5445 var t = this;
5446 return this._getParamsList().concat(t._getData()).reduce(function(e, n) {
5447 return e.concat(t._getParams(n))
5448 }, []).concat(["/"])
5449 },
5450 _getParamsList: function() {
5451 var t = this;
5452 return [t.params.params, t._getPath(), t._params, t._getRatio(), t._getSinceChange(), t._getSession(), {
5453 suggest_reqid: t._reqID
5454 }]
5455 },
5456 initValues: function() {
5457 return this._params.prev_query = this.params.suggest.params["suggest2-input"].val(), this
5458 },
5459 attachReqID: function() {
5460 this._reqID = this.__self._generateReqID(), this.params.form.appendHiddenInputs([{
5461 name: "suggest_reqid",
5462 value: this._reqID
5463 }])
5464 },
5465 bindEvents: function() {
5466 var t, e = this,
5467 n = e.params,
5468 i = n.suggest;
5469 return n.form.on("button-click", function() {
5470 "keyboard" !== e._path.submit && (e._path.submit = "button_by_mouse")
5471 }), n.form.on("submit", function(t, i) {
5472 i.data.block !== e.__self.getName() && i.data.prevent !== !1 && (n.preventSubmit && (i.stopImmediatePropagation(), i.preventDefault()), e.submit())
5473 }), i.getModel().on({
5474 request: function() {
5475 t = new Date
5476 },
5477 response: function(n, i) {
5478 i.data.items && (e._path.personal = e._hasPersonal(i.data.items) ? "nah_not_used" : "nah_not_shown", e._meta = i.data.meta || {}, e._addTime(new Date - t), e._setMetaProps(i))
5479 }
5480 }), i.params["suggest2-input"].on({
5481 change: function(t, n) {
5482 n && "clear" !== n.source || (e._params.user_input = t.block.val(), e[e._firstChange ? "_lastChange" : "_firstChange"] = new Date), e._ratio.actionsCount++
5483 },
5484 enter: function() {
5485 e._path.submit = "keyboard"
5486 }
5487 }), i.params["suggest2-popup"].on({
5488 show: function() {
5489 e._path.state = "not_used"
5490 },
5491 hide: function(t, n) {
5492 "empty" === n.response && (e._path.state = "not_shown")
5493 }
5494 }), BEM.blocks["suggest2-item"].on(i.domElem, {
5495 enter: function(t, n) {
5496 n.byKeyboard && e.params.suggest.params.updateOnEnterByKeyboard && (e._selectedText = n.val, e._path.state = "suggest")
5497 }
5498 }), i.on({
5499 select: function(t, r) {
5500 e._path.state = r.byKeyboard ? "keyboard" : "mouse", e._path.index = r.itemIndex + 1, e._selectedText = r.val, r.item.hasMod("personal") && (e._path.personal = "nah_used"), n.submitBySelect && (e._path.submit = r.byKeyboard ? "keyboard" : "click_by_mouse", e._params.pos = r.pos, e._params.text = e._selectedText), i.isNeedSubmitFormOnSelectItem(r.item) || e.submit({
5501 submitForm: !1,
5502 afterSendAjaxCallback: r.callbackOnSelect
5503 })
5504 }
5505 }, e), e
5506 },
5507 unbindAllEvents: function() {
5508 var t = this.params,
5509 e = t.suggest;
5510 return t.form.un("button-click").un("submit"), e.getModel().un("request").un("response"), e.params["suggest2-input"].un("change").un("enter"), e.params["suggest2-popup"].un("show").un("hide"), e.un("select"), this
5511 },
5512 _hasPersonal: function(t) {
5513 return t.some(function(t) {
5514 return 1 === BEM.blocks["suggest2-view"]._getPrefs(t).pers
5515 })
5516 },
5517 _setMetaProps: function(t) {
5518 t.data.meta && Object.keys(this.metaProps).forEach(function(e) {
5519 this._params[this.metaProps[e]] = t.data.meta[e] || ""
5520 }, this)
5521 },
5522 _getParams: function(t) {
5523 return Object.keys(t).reduce(function(e, n) {
5524 return "" === t[n] ? e : (e.push(n + "=" + encodeURIComponent(t[n]).replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/%2C/g, ",")), e)
5525 }, [])
5526 },
5527 _getPath: function() {
5528 return {
5529 path: [this._path.service, this._path.state, "p" + this._path.index, this._path.personal, this._path.submit].join(".")
5530 }
5531 },
5532 _getSession: function() {
5533 return this._session = (new Date).getTime() + Math.round(1e4 * Math.random()), {
5534 session: this._session
5535 }
5536 },
5537 _getSinceChange: function() {
5538 return {
5539 since_first_change: this._getSinceTime("first"),
5540 since_last_change: this._getSinceTime("last")
5541 }
5542 },
5543 _getSinceTime: function(t) {
5544 var e = "_" + t + "Change";
5545 return this._sinceChange[t] = this[e] ? (new Date).getTime() - this[e] : 0, this._sinceChange[t]
5546 },
5547 _getRatio: function() {
5548 return this._ratio.len = this._params.user_input.length, this._ratio.queryLen = this._params.text.length, {
5549 ratio: [this._ratio.len, this._ratio.queryLen, this._ratio.actionsCount].join(".")
5550 }
5551 },
5552 _addTime: function(t) {
5553 return this._times.push(t), this._params.times = this._times.join("."), this
5554 },
5555 _getData: function() {
5556 return {
5557 "*data": "url=" + this.params.dataUrl
5558 }
5559 }
5560 }, {
5561 _generateReqID: function() {
5562 var t = BEM.blocks["i-global"] && BEM.blocks["i-global"].param("yandexuid") ? BEM.blocks["i-global"].param("yandexuid") : this._random(9) + this._random(9);
5563 return t + (+new Date).toString().slice(-7) + this._random(7)
5564 },
5565 _random: function(t) {
5566 return Math.random().toString().slice(2, Math.min(t, 10) + 2)
5567 }
5568 }), BEM.DOM.decl("suggest2-form", {
5569 onSetMod: {
5570 js: {
5571 inited: function() {
5572 this._isReady = !1, this._nodes = this.initNodes()
5573 }
5574 }
5575 },
5576 getDefaultParams: function() {
5577 return {
5578 inputName: "input",
5579 buttonName: "button",
5580 popupName: "popup"
5581 }
5582 },
5583 destruct: function() {
5584 this._nodes.forEach(function(t) {
5585 t.suggest.domElem && BEM.DOM.destruct(t.suggest.domElem), this.unbindFormEvents(t), t.proxies.input.destruct(), t.proxies.popup.destruct()
5586 }, this), this.__base.apply(this, arguments)
5587 },
5588 getOwner: function(t) {},
5589 isReady: function() {
5590 return this._isReady
5591 },
5592 initNodes: function() {
5593 var t = this.getNodes();
5594 return t.forEach(function(t) {
5595 t.suggest.init()
5596 }), this._isReady = !0, this.trigger("ready", {
5597 nodes: t
5598 }), t
5599 },
5600 getNodes: function() {
5601 return this.getNodeList().map(function(t) {
5602 var e = t.suggest,
5603 n = e.params;
5604 return n.input = t.input, n.button = t.button, n.form = this, t.proxies = {}, t.proxies.popup = n["suggest2-popup"] = BEM.create("suggest2-popup", {
5605 suggest: e,
5606 popup: e.findBlockOn(this.params.popupName),
5607 owner: this.getOwner(t) || n.input
5608 }), t.proxies.input = n["suggest2-input"] = BEM.create("suggest2-input", {
5609 suggest: e,
5610 input: n.input,
5611 updateOnEnterByKeyboard: n.updateOnEnterByKeyboard
5612 }), t.counter && (t.counter.params.suggest = e, t.counter.params.form = this, n.counter = t.counter), this.bindFormEvents(t), t
5613 }, this)
5614 },
5615 bindFormEvents: function(t) {
5616 var e = this;
5617 return t.button && t.button.bindTo("click press", function(t) {
5618 e.trigger("button-" + t.type, t)
5619 }), e.bindTo("submit", function(t, n) {
5620 e.onSubmit(t, n)
5621 }), e
5622 },
5623 unbindFormEvents: function(t) {
5624 var e = this;
5625 return t.button && t.button.un("click press"), e.unbindFrom("submit"), e
5626 },
5627 submit: function(t) {
5628 return this.domElem.trigger("submit", t || {}), this
5629 },
5630 onSubmit: function(t, e) {
5631 t.data = e || {}, this.trigger("submit", t)
5632 },
5633 getNodeList: function() {
5634 var t = this,
5635 e = [];
5636 return t.elem("node").each(function(n, i) {
5637 var r = $(i),
5638 s = t.findBlockInside(r, "suggest2"),
5639 o = {
5640 input: t.findElem(r, "input"),
5641 button: t.findElem(r, "button")
5642 };
5643 e.push({
5644 node: r,
5645 suggest: s,
5646 counter: t.findBlockOn("suggest2-counter"),
5647 input: t.findBlockOn(o.input, t.params.inputName),
5648 button: t.findBlockOn(o.button, t.params.buttonName),
5649 popup: s.findBlockOn(t.params.popupName)
5650 })
5651 }), e
5652 },
5653 appendHiddenInputs: function(t) {
5654 return BEM.DOM.append(this.domElem, BEMHTML.apply(t.map(function(t) {
5655 return {
5656 block: this.__self.getName(),
5657 elem: "hidden-input",
5658 tag: "input",
5659 attrs: {
5660 type: "hidden",
5661 name: t.name,
5662 value: t.value
5663 }
5664 }
5665 }, this))), this
5666 },
5667 removeHiddenInputs: function() {
5668 return BEM.DOM.destruct(this.findElem(this.domElem, "hidden-input")), this
5669 }
5670 }), BEM.DOM.decl("suggest2-form", {
5671 appendHiddenInputs: function() {
5672 this.__base.apply(this, arguments);
5673 var t = $.queryParam("lang");
5674 return t && BEM.DOM.append(this.domElem, bh.apply({
5675 block: this.__self.getName(),
5676 elem: "hidden-input",
5677 tag: "input",
5678 attrs: {
5679 type: "hidden",
5680 name: "lang",
5681 value: t
5682 }
5683 })), this
5684 }
5685 }), BEM.DOM.decl("tabular", {
5686 onSetMod: {
5687 js: function() {
5688 this.bindTo("tab", "click tap", function(t) {
5689 t.preventDefault(), this.trigger("click", t)
5690 })
5691 }
5692 },
5693 _active: null,
5694 active: function(t) {
5695 var e = this._active;
5696 return t && e !== t ? (e && this.delMod(e, "active"), this._active = e = t, this.setMod(e, "active", "yes"), e) : e
5697 }
5698 }), BEM.DOM.decl({
5699 name: "link",
5700 modName: "pseudo",
5701 modVal: "yes"
5702 }, {
5703 _onClick: function(t) {
5704 t.preventDefault(), this.hasMod("disabled", "yes") || this.afterCurrentEvent(function() {
5705 this.trigger("click")
5706 })
5707 },
5708 _onKeyUp: function(t) {
5709 t.shiftKey || t.ctrlKey || t.altKey || 13 !== t.which && 32 !== t.which || this.hasMod("disabled", "yes") || this.afterCurrentEvent(function() {
5710 this.trigger("click")
5711 })
5712 }
5713 }, {
5714 live: function() {
5715 this.__base.apply(this, arguments), this.liveBindTo({
5716 modName: "pseudo",
5717 modVal: "yes"
5718 }, "leftclick tap", function(t) {
5719 this._onClick(t)
5720 }).liveBindTo({
5721 modName: "pseudo",
5722 modVal: "yes"
5723 }, "keyup", function(t) {
5724 this._onKeyUp(t)
5725 })
5726 }
5727 }), BEM.DOM.decl("lang-switcher", {
5728 onSetMod: {
5729 js: {
5730 inited: function() {
5731 this.params["secret-key"] && this.bindTo("lang", "mousedown keydown", this._preprocessOpenLink)
5732 }
5733 }
5734 },
5735 _preprocessOpenLink: function(t) {
5736 var e = $(t.currentTarget),
5737 n = this.elemParams(e);
5738 this.hasMod(e, "selected", "yes") || n.url || e.attr("href", this._getUrl(this._getLang(n)))
5739 },
5740 _getLang: function(t) {
5741 var e = t.lang;
5742 return "gb" === e ? "en" : e
5743 },
5744 _getUrl: function(t) {
5745 return this.params.tune + "/api/lang/v1.1/save.xml?" + $.param({
5746 intl: t,
5747 sk: this.params["secret-key"],
5748 retpath: this.params.retpath || BEM.blocks["i-global"].param("retpath") || window.location.href
5749 })
5750 }
5751 }, {
5752 live: function() {
5753 this.liveInitOnBlockEvent("init", "dropdown-menu")
5754 }
5755 }), BEM.DOM.decl("lang-switcher", {
5756 _hasMda: function() {
5757 return !document.cookie.match(/\bmda=0\b/)
5758 },
5759 _getUrl: function(t) {
5760 var e = this._hasMda() ? this.params.tune : this.params.portal,
5761 n = this.params.retpath || BEM.blocks["i-global"].param("retpath") || window.location.href;
5762 return n = n.replace(/&lang=[^&]*()|\?lang=[^&]*$|lang=[^&]*&/, ""), e + "?" + $.param({
5763 intl: t,
5764 sk: this.params["secret-key"],
5765 retpath: n
5766 })
5767 }
5768 }),
5769 function(t) {
5770 t.decl("adsrv", {}, {
5771 updateHeight: function(t) {
5772 var e = $(t.top);
5773 e.parent().css("min-height", e.outerHeight(!0)), t.btm && (e = $(t.btm), e.parent().css("min-height", e.outerHeight(!0)))
5774 }
5775 })
5776 }(BEM),
5777 function(t, e) {
5778 if (t.getComputedStyle && Function.prototype.bind) {
5779 var n = {
5780 MIN_HEIGHT: 0,
5781 detect: function(t) {
5782 this.params = t;
5783 var e = this.check();
5784 t.los && BEM.blocks.adsrv.updateHeight(t.inquire), e ? this.setCookie(!0) : t.los || this.setCookie(!1)
5785 },
5786 check: function() {
5787 var t = this.params.inquire,
5788 e = [];
5789 for (var n in t)
5790 if (t.hasOwnProperty(n)) {
5791 if (!t[n]) continue;
5792 var i = !0,
5793 r = t[n];
5794 if (r instanceof Array)
5795 for (var s = r.length; s-- && i;) i = this.checkBlock(r[s]);
5796 else i = this.checkBlock(r);
5797 i || e.push(n)
5798 }
5799 return !!e.length
5800 },
5801 checkBlock: function(n) {
5802 var i = e.querySelector(n),
5803 r = i && t.getComputedStyle(i, "");
5804 return !(!i || "none" === r.display || "visible" !== r.visibility || "1" !== r.opacity || r.MozBinding && r.MozBinding.indexOf("abp") > -1 || this.MIN_HEIGHT && parseInt(r.height, 10) < this.MIN_HEIGHT)
5805 },
5806 setCookie: function(t) {
5807 var n = (e.cookie || "").split(/\s*;\s*/),
5808 i = "." + String(location.host),
5809 r = new Date;
5810 r.setMonth(r.getMonth() + 3);
5811 var s, o, a, u = "; expires=" + r.toGMTString() + "; domain=" + i + "; path=" + BEM.blocks["i-global"].param("service-root");
5812 for (a = n.length; !s && a--;) 0 === n[a].indexOf("yw_sol") && (s = n[a].slice(7));
5813 o = t ? "1" : "0", s === o || s > o || (e.cookie = "yw_sol=" + o + u)
5814 }
5815 };
5816 BEM.DOM.decl("inquire", {
5817 onSetMod: {
5818 js: function() {
5819 var t = this.params;
5820 n.detect(t), setTimeout(n.detect.bind(n, t), 1e4)
5821 }
5822 }
5823 })
5824 }
5825 }(window, document), BEM.decl("geo-stat", {
5826 onSetMod: {
5827 js: function() {
5828 this._makeMetrikaReq(this._getMetrikaParams())
5829 }
5830 },
5831 _getMetrikaParams: function() {
5832 function t(t) {
5833 var e = [15, 30, 60, 120, 180, 360].filter(function(e) {
5834 return e > t
5835 })[0];
5836 return e || 360
5837 }
5838 var e;
5839 try {
5840 e = parseYCookie($.cookie("yp"))
5841 } catch (n) {}
5842 if (e && !$.isEmptyObject(e)) {
5843 var i = e.gpauto;
5844 if (i && i.value) {
5845 var r = i.value.split(":"),
5846 s = {
5847 0: "GPS",
5848 1: "WIFI",
5849 2: "GSM",
5850 3: "IP"
5851 }[r[3]],
5852 o = r[4],
5853 a = Math.floor((Date.now() / 1e3 - o) / 60);
5854 return a = t(a), {
5855 source: s,
5856 actual_time: String(a)
5857 }
5858 }
5859 }
5860 },
5861 _makeMetrikaReq: function(t) {
5862 t && (window.yandex_metrika_callbacks = window.yandex_metrika_callbacks || []).push(function() {
5863 setTimeout(function() {
5864 try {
5865 var e = "yaCounter" + BEM.blocks["i-global"].param("metrikaId");
5866 window[e].reachGoal("gpauto", t)
5867 } catch (n) {}
5868 }, 0)
5869 })
5870 }
5871 }), BEM.DOM.decl("redir", {
5872 onSetMod: {
5873 js: function() {
5874 this.abt = this.params.abt, this.requestId = BEM.blocks["i-global"].param("nonce"), this.indexCounter = 0, this.send(this.params.events)
5875 }
5876 },
5877 send: function(t) {
5878 if (t) {
5879 Array.isArray(t) || (t = [t]);
5880 var e = Date.now();
5881 t = t.map(function(t) {
5882 return this.indexCounter++, {
5883 id: t.id,
5884 parent_id: t.parent_id || 0,
5885 event_index: this.indexCounter,
5886 event_type: t.type,
5887 user_timestamp: e,
5888 path: t.path,
5889 vars: t.vars || null
5890 }
5891 }, this), (new Image).src = "https://clck.yandex.ru/counter/dtype=bebr/pid=619/session_id=" + this.requestId + "/user_timestamp=" + e + "/events=" + encodeURIComponent(JSON.stringify(t)) + "/user_agent=" + encodeURIComponent(navigator.userAgent) + "/test_buckets=" + this.abt.boxes + "/test_ids=" + this.abt.boxes + "/slots=" + this.abt.boxes + "/*"
5892 }
5893 }
5894 }), BEM.DOM.decl("navigation-city", {
5895 onSetMod: {
5896 js: function() {
5897 this.serviceRoot = BEM.blocks["i-global"].param("service-root"), this.bindTo("icon", "leftclick tap", function() {
5898 this._createdPopupMeteum || this._createPopupMeteum(), this._popupMeteum.show()
5899 })
5900 }
5901 },
5902 _createPopupMeteum: function() {
5903 this._createdPopupMeteum || (this._popupMeteum = $(bh.apply({
5904 block: "popup",
5905 mods: {
5906 type: "modal",
5907 position: "fixed",
5908 "has-close": "yes"
5909 },
5910 underMods: {
5911 type: "paranja"
5912 },
5913 content: {
5914 elem: "content",
5915 content: blocks.exec("meteum-popup", "s", this.serviceRoot)
5916 }
5917 })).bem("popup"), this._createdPopupMeteum = !0)
5918 }
5919 }), BEM.DOM.decl("my-location", {
5920 onSetMod: {
5921 js: function() {
5922 this.lang = BEM.I18N.lang(), this.metrikaCounter = "yaCounter" + BEM.blocks["i-global"].param("metrikaId"), this.initMod = this.getMod("type"), this.serviceRoot = BEM.blocks["i-global"].param("service-root"), this.bindTo("click", this._getPositionHandler)
5923 }
5924 },
5925 _getPositionHandler: function(t) {
5926 var e = this;
5927 e._reachGoal("click")._startProcess(), navigator.geolocation.getCurrentPosition(function(n) {
5928 var i = $.extend({}, n.coords);
5929 t && (i = e._promptCoords(t, i)), i.latitude = +parseFloat(i.latitude).toFixed(6), i.longitude = +parseFloat(i.longitude).toFixed(6), e._doRequest(i)
5930 }, e._error.bind(e), {
5931 timeout: 1e4
5932 })
5933 },
5934 _promptCoords: function(t, e) {
5935 if (t.altKey) {
5936 var n = window.prompt("Enter lon&lat:", e.longitude + "&" + e.latitude);
5937 n && (n = n.replace(/[a-z=\?]/g, "").split("&"), e.longitude = n[0], e.latitude = n[1])
5938 }
5939 return e
5940 },
5941 _doRequest: function(t) {
5942 var e = this;
5943 $.get(e.serviceRoot + "/front/geo-object", {
5944 lat: t.latitude,
5945 lon: t.longitude,
5946 lang: e.lang
5947 }).done(function(n) {
5948 e._success(n, t)
5949 }).fail(function(t) {
5950 e._error(t)
5951 })
5952 },
5953 _success: function(t, e) {
5954 var n = this,
5955 i = 1,
5956 r = {
5957 device: i,
5958 format: "json",
5959 lat: e.latitude,
5960 lon: e.longitude,
5961 lang: n.lang,
5962 precision: e.accuracy || 5e3,
5963 persistent: 0,
5964 sk: BEM.blocks["i-global"].param("secret-key")
5965 },
5966 s = Date.now();
5967 $.get("/gpsave", r).done(function() {
5968 var i = Date.now() - s,
5969 r = 1800,
5970 o = r > i ? r - i : 0;
5971 n._reachGoal("gpsaved"), setTimeout(function() {
5972 location.href = n._getUrl(t, e)
5973 }, o)
5974 }).fail(function(t) {
5975 n._error(t)
5976 }), this._reachGoal("success")
5977 },
5978 _getUrl: function(t, e) {
5979 var n = this,
5980 i = $.queryParam("lang");
5981 return e = "?lat=" + e.latitude + "&lon=" + e.longitude + (i ? "&lang=" + i : ""), t.locality && t.locality.slug ? n.serviceRoot + "/" + t.locality.slug + e : n.serviceRoot + "/" + e
5982 },
5983 _startProcess: function() {
5984 this.setMod("type", "progress")
5985 },
5986 _error: function(t) {
5987 var e;
5988 switch (t.code) {
5989 case 1:
5990 e = "disable";
5991 break;
5992 case 2:
5993 e = "network";
5994 break;
5995 default:
5996 e = "unknown"
5997 }
5998 BEM.I18N("interface-common", "geolocation-error-" + e) ? this._reachGoal("error")._reachGoal("error-" + e).errorMsg = BEM.I18N("interface-common", "geolocation-error-" + e) : (this._reachGoal("error"), this.errorMsg = BEM.I18N("interface-common", "error-try-again"))
5999 },
6000 _reachGoal: function(t) {
6001 return window[this.metrikaCounter] && window[this.metrikaCounter].reachGoal("my-location." + t), this
6002 }
6003 }), BEM.DOM.decl("my-location", {
6004 _init: function() {
6005 this.__base.apply(this, arguments), "geolocation" in navigator || (this.destruct(), document.getElementById("my-location").remove())
6006 },
6007 _createPopupError: function() {
6008 this._createdPopupError || (this._popupError = $(bh.apply({
6009 block: "popup",
6010 mods: {
6011 theme: "error",
6012 animate: "yes",
6013 autoclosable: "yes"
6014 },
6015 js: {
6016 directions: "right"
6017 },
6018 content: [{
6019 elem: "tail"
6020 }, {
6021 elem: "content",
6022 content: this.errorMsg
6023 }]
6024 })).bem("popup"), this._createdPopupError = !0)
6025 },
6026 _error: function() {
6027 var t = this;
6028 t.__base.apply(t, arguments), t.setMod("type", t.initMod), t.unbindFrom("click"), t._createdPopupError || t._createPopupError(), t._popupError.setContent(t.errorMsg).show(t.domElem), setTimeout(function() {
6029 t._popupError.hide(), t.bindTo("click", t._getPositionHandler)
6030 }, 3e3)
6031 }
6032 }), BEM.decl("forecasts", {}, {
6033 getUrl: function(t, e) {
6034 t = t || "";
6035 var n = BEM.blocks["i-global"].param("service-root"),
6036 i = BEM.blocks["i-global"].param("slug");
6037 return i ? n + "/" + i + (t && "/" + t) + e : n + "/" + e.replace(/&tab=[^&;]+/, "") + (t && "&tab=" + t)
6038 }
6039 }), BEM.DOM.decl("forecast-detailed", {
6040 onSetMod: {
6041 js: function() {
6042 var t = location.hash;
6043 t && (t = t.slice(1), setTimeout(function() {
6044 window.scrollTo(0, 0), setTimeout(function() {
6045 if (!($(window).scrollTop() > 0)) {
6046 var e = $("[data-anchor=" + t + "]");
6047 e.length && $("html, body").animate({
6048 scrollTop: e.offset().top - 42
6049 }, 1e3)
6050 }
6051 }, 600)
6052 }, 1))
6053 }
6054 }
6055 }), BEM.DOM.decl("tabs-panes", {
6056 onElemSetMod: {
6057 pane: {
6058 active: {
6059 yes: function(t, e, n) {
6060 var i = this.findPane("active", "yes");
6061 i.attr("aria-expanded", !1), t.attr("aria-expanded", !0), this.delMod(i, "active")
6062 }
6063 }
6064 }
6065 },
6066 _onControlChange: function(t, e) {
6067 this.setMod(this.findPane().eq(e.currentIndex), "active", "yes")
6068 },
6069 findPane: function(t, e) {
6070 return this.domElem.children(this.buildSelector("pane", t, e))
6071 }
6072 }, {
6073 getSupportedControls: function() {
6074 return ["tabs"]
6075 },
6076 live: function() {
6077 this.getSupportedControls().forEach(function(t) {
6078 BEM.blocks[t] && this.liveInitOnBlockEvent("change", t, function(t, e) {
6079 this._onControlChange(t, e)
6080 })
6081 }, this)
6082 }
6083 }), BEM.DOM.decl("tabs", {
6084 getCount: function() {
6085 return this.elem("tab").length
6086 },
6087 activate: function(t) {
6088 return this
6089 },
6090 getActive: function() {
6091 return -1
6092 },
6093 disable: function(t) {
6094 return this
6095 },
6096 enable: function(t) {
6097 return this
6098 },
6099 isDisabled: function(t) {},
6100 _onControlChange: function(t, e) {}
6101 }, {
6102 getSupportedControls: function() {
6103 return ["tabs-menu", "radio-button"]
6104 },
6105 live: function() {
6106 this.getSupportedControls().forEach(function(t) {
6107 BEM.blocks[t] && this.liveInitOnBlockInsideEvent("change", t, function(t, e) {
6108 this._onControlChange(t, e)
6109 })
6110 }, this)
6111 }
6112 }), BEM.DOM.decl({
6113 block: "tabs",
6114 modName: "control",
6115 modVal: "buttons"
6116 }, {
6117 onSetMod: {
6118 js: function() {
6119 this.__base.apply(this, arguments), this._radioButton = this.findBlockOn("control", "radio-button")
6120 }
6121 },
6122 activate: function(t) {
6123 return this.isDisabled(t) || this._radioButton.setMod(this._getRadio(t), "checked", "yes"), this
6124 },
6125 disable: function(t) {
6126 return this._radioButton.setMod(this._getRadio(t), "disabled", "yes"), this
6127 },
6128 enable: function(t) {
6129 return this._radioButton.delMod(this._getRadio(t), "disabled"), this
6130 },
6131 isDisabled: function(t) {
6132 return this._radioButton.isDisabled(this._getRadio(t))
6133 },
6134 getActive: function() {
6135 return this._indexOfButton(this._radioButton.getCurrent())
6136 },
6137 _getRadio: function(t) {
6138 return this._radioButton.elem("radio").eq(t)
6139 },
6140 _indexOfButton: function(t) {
6141 return $.inArray(t.get(0), this._radioButton.elem("radio"))
6142 },
6143 _onControlChange: function(t, e) {
6144 e.current.attr("aria-selected", !0), e.prev.attr("aria-selected", !1), this.trigger("change", {
6145 currentIndex: this._indexOfButton(e.current),
6146 prevIndex: this._indexOfButton(e.prev)
6147 })
6148 }
6149 }), BEM.DOM.decl("radiobox", {
6150 onSetMod: {
6151 js: function() {
6152 var t = this;
6153 t._val = t.findElem(t.elem("radio", "checked", "yes"), "control").val(), t.elem("control").each(function(e, n) {
6154 var i = [];
6155 if (t._isControlFocused($(n)) && i.push("focused"), n.checked && i.push("checked"), i[0]) {
6156 var r = t.__self._getRadioByElem($(n));
6157 i.forEach(function(e) {
6158 t.setMod(r, e, "yes")
6159 })
6160 }
6161 })
6162 },
6163 disabled: {
6164 yes: function() {
6165 this.setMod(this.elem("radio"), "disabled", "yes")
6166 },
6167 "": function() {
6168 this.delMod(this.elem("radio"), "disabled")
6169 }
6170 }
6171 },
6172 onElemSetMod: {
6173 radio: {
6174 focused: {
6175 yes: function(t) {
6176 this.delMod(this.elem("radio", "focused", "yes"), "focused");
6177 var e = this.findElem(t, "control");
6178 this._isControlFocused(e) || e.focus(), this.afterCurrentEvent(function() {
6179 this.trigger("focus", {
6180 current: t
6181 })
6182 })
6183 },
6184 "": function(t) {
6185 this.afterCurrentEvent(function() {
6186 this.trigger("blur", {
6187 prev: t
6188 })
6189 })
6190 }
6191 },
6192 checked: {
6193 yes: function(t) {
6194 var e = this.elem("radio", "checked", "yes"),
6195 n = this.findElem(t, "control");
6196 this._willSwitch = !0, this.delMod(e, "checked"), this._willSwitch = !1, n.prop("checked", !0), this._val = n.val(), this.trigger("change", {
6197 current: t,
6198 prev: e
6199 })
6200 },
6201 "": function(t) {
6202 var e = this.findElem(t, "control");
6203 e.prop("checked", !1), this._val = void 0, this._willSwitch || this.trigger("change", {
6204 current: void 0,
6205 prev: t
6206 })
6207 }
6208 },
6209 hovered: function(t) {
6210 return !this.isDisabled(t)
6211 },
6212 disabled: function(t, e, n) {
6213 t.find(this.buildSelector("control")).prop("disabled", "yes" === n)
6214 }
6215 }
6216 },
6217 _isControlFocused: function(t) {
6218 try {
6219 return t[0] === this.__self.doc[0].activeElement
6220 } catch (e) {
6221 return !1
6222 }
6223 },
6224 isDisabled: function(t) {
6225 return this.hasMod(t, "disabled", "yes")
6226 },
6227 val: function(t) {
6228 if ("undefined" == typeof t) return this._val;
6229 var e = this;
6230 return this.elem("control").each(function(n, i) {
6231 return i.value === t ? (e.setMod(e.__self._getRadioByElem($(i)), "checked", "yes"), !1) : void 0
6232 }), e
6233 },
6234 name: function(t) {
6235 var e = this.elem("control");
6236 return arguments.length ? (e.attr("name", t), this) : e.attr("name")
6237 },
6238 getCurrent: function() {
6239 return this.findElem("radio", "checked", "yes")
6240 },
6241 uncheckAll: function() {
6242 return this.delMod(this.elem("radio", "checked", "yes"), "checked")
6243 },
6244 _onLeftClick: function(t) {
6245 this.isDisabled(t.data.domElem) || this.setMod(t.data.domElem, "focused", "yes")
6246 },
6247 _onChange: function(t) {
6248 this.setMod(this.__self._getRadioByElem(t.data.domElem), "checked", "yes")
6249 }
6250 }, {
6251 live: function() {
6252 this.liveBindTo("radio", "leftclick tap", function(t) {
6253 this._onLeftClick(t)
6254 }).liveBindTo("control", "change", function(t) {
6255 this._onChange(t)
6256 }).liveBindTo("radio", "mouseover mouseout", function(t) {
6257 this.setMod(t.data.domElem, "hovered", "mouseover" === t.type ? "yes" : "")
6258 }).liveBindTo("control", "focusin focusout", function(t) {
6259 this.setMod(this.__self._getRadioByElem(t.data.domElem), "focused", "focusin" === t.type ? "yes" : "")
6260 })
6261 },
6262 _getRadioByElem: function(t) {
6263 return t.closest(this.buildSelector("radio"))
6264 }
6265 }), BEM.DOM.decl({
6266 block: "radio-button",
6267 baseBlock: "radiobox"
6268 }, {
6269 onElemSetMod: {
6270 radio: {
6271 checked: function(t, e, n) {
6272 this.__base.apply(this, arguments), this.setMod(t, "pressed", n)
6273 },
6274 "next-for-pressed": {
6275 yes: function() {
6276 this.delMod(this.elem("radio", "next-for-pressed", "yes"), "next-for-pressed")
6277 }
6278 },
6279 pressed: {
6280 yes: function(t) {
6281 this.delMod(this.elem("radio"), "pressed").setMod(t.next(), "next-for-pressed", "yes")
6282 },
6283 "": function(t) {
6284 this.delMod(t.next(), "next-for-pressed")
6285 }
6286 }
6287 }
6288 },
6289 _onMouseDown: function(t) {
6290 var e = t.data.domElem;
6291 this.isDisabled(e) || this.hasMod(e, "checked", "yes") || (this.setMod(e, "pressed", "yes"), this.bindToDoc("mouseup touchend", function(t) {
6292 this.afterCurrentEvent(function() {
6293 var n = this.findElem(e, "control");
6294 n.prop("checked") || (e.find(t.target).add(e).length ? n.trigger("change").focus() : this.delMod(e, "pressed").setMod(this.elem("radio", "checked", "yes"), "pressed", "yes"))
6295 }), this.unbindFromDoc("mouseup touchend")
6296 }))
6297 }
6298 }, {
6299 live: function() {
6300 var t = this.__base.apply(this, arguments);
6301 return this.liveBindTo("radio", "mousedown", function(t) {
6302 this._onMouseDown(t)
6303 }), t
6304 }
6305 }), BEM.DOM.decl({
6306 block: "radio-button",
6307 modName: "links",
6308 modVal: "yes"
6309 }, {
6310 onSetMod: {
6311 js: function() {
6312 this.__base.apply(this, arguments), this.metrikaCounter = "yaCounter" + this.findBlockOutside("i-global").params.metrikaId, this.metrikaParams = {
6313 lang: BEM.I18N.lang()
6314 }, this.initSearch = location.search, window.history.replaceState && this.bindTo(this.domElem.find(".link"), "click", function(t) {
6315 t.preventDefault()
6316 })
6317 }
6318 },
6319 _onMouseDown: function(t) {
6320 this.__base.apply(this, arguments);
6321 var e = t.data.domElem;
6322 this.bindToDoc("mouseup touchend", function() {
6323 var t = e.find(".link"),
6324 n = BEM.blocks.forecasts.getUrl(t.data("type"), this.initSearch);
6325 t.attr("href", n), window.history.replaceState && (history.replaceState(null, null, n), window[this.metrikaCounter] && window[this.metrikaCounter].hit(location.pathname, document.title, document.referrer, this.metrikaParams)), this.unbindFromDoc("mouseup touchend")
6326 })
6327 }
6328 }), BEM.DOM.decl("maps", {
6329 onSetMod: {
6330 js: function() {
6331 var t = this;
6332 t.serviceRoot = BEM.blocks["i-global"].param("service-root"), t.map = !1, t.cache = {}, t.points = {}, t.zoom = 7, t.region = "", t.bindToWin("scroll", t._removePointerEvents)
6333 }
6334 },
6335 _initMap: function() {
6336 var t = this;
6337 ymaps.option.presetStorage.add("weather#onMap1", {
6338 iconLayout: t.iconLayoutClass,
6339 iconOffset: [-26, -46],
6340 pane: "overlaps",
6341 interactivityModel: "default#opaque"
6342 }), ymaps.option.presetStorage.add("weather#onMapCluster1", {
6343 iconLayout: t.iconClusterLayoutClass,
6344 iconOffset: [-26, -46],
6345 interactivity: !1
6346 }), t.cluster = new ymaps.Clusterer({
6347 gridSize: 128,
6348 margin: 5,
6349 minClusterSize: 2,
6350 groupByCoordinates: !1,
6351 maxZoom: 11,
6352 clusterDisableClickZoom: !1,
6353 clusterOpenBalloonOnClick: !1,
6354 clusterIconLayout: t.iconClusterLayoutClass,
6355 clusterPane: "overlaps"
6356 }), t.cluster.origCreateCluster = t.cluster.createCluster, t.cluster.createCluster = function(e, n) {
6357 var i = t.cluster.origCreateCluster(e, n),
6358 r = i.getGeoObjects()[0].properties.getAll();
6359 return i.properties.set({
6360 icon: r.icon,
6361 temp: r.temp
6362 }), i
6363 }, t.map.geoObjects.add(t.cluster), t.map.events.add("boundschange", function(e) {
6364 var n = e.get("newZoom");
6365 n !== t.zoom && (t.zoom = n), t._mapRender()
6366 })
6367 },
6368 _mapRender: function(t) {
6369 var e = this,
6370 n = e._getBounds();
6371 t && (e.cluster.removeAll(), e.points = {});
6372 var i = n.lt + ":" + n.rb + ":" + e.zoom;
6373 if ("undefined" != typeof e.cacheKeyPostfix && (i += ":" + e.cacheKeyPostfix), e.cache[i]) return void e._addNewPlacemarks(e.cache[i]);
6374 var r = {
6375 lt: n.lt,
6376 rb: n.rb,
6377 zoom: e.zoom,
6378 lang: BEM.I18N.lang(),
6379 day: e.currentDay
6380 },
6381 s = $.queryParam("ext");
6382 s && (r.ext = s), $.get(e.serviceRoot + "/front/map/forecast", r, "json").success(e._processData(i)).error(function() {
6383 delete e.cache[i]
6384 })
6385 },
6386 _processData: function(t) {
6387 var e = this;
6388 return function(n) {
6389 n && n.length ? (e._addNewPlacemarks(n), e.cache[t] = n) : delete e.cache[t]
6390 }
6391 },
6392 _addNewPlacemarks: function(t) {
6393 for (var e, n = this, i = 0; i < t.length; i++) e = t[i], !n.points[e.slug] && e.zoom <= n.zoom && n.cluster.add(n._createPlacemark(e))
6394 },
6395 _getName: function(t) {
6396 return t && t.split(", ")[0] || t
6397 },
6398 _createPlacemark: function(t) {
6399 var e = this,
6400 n = t.slug,
6401 i = t.temp,
6402 r = {
6403 slug: n,
6404 name: e._getName(t.name),
6405 icon: e._iconName(t.icon),
6406 temp: i > 0 ? "+" + i : i.toString().replace(/-/, "−")
6407 },
6408 s = new ymaps.Placemark([t.lon, t.lat], r, {
6409 preset: "weather#onMap1",
6410 interactivityModel: "default#silent"
6411 });
6412 return e.points[n] = !0, s
6413 },
6414 _getContentPlacemark: function(t) {
6415 return [{
6416 block: "icon",
6417 mix: {
6418 block: "baloon",
6419 elem: "icon"
6420 },
6421 mods: {
6422 thumb: "{{properties.icon}}",
6423 size: 24
6424 }
6425 }, {
6426 block: "baloon",
6427 elem: "temp",
6428 content: "{{properties.temp}}"
6429 }, t && {
6430 block: "baloon",
6431 elem: "name",
6432 content: "{{properties.name}}"
6433 }]
6434 },
6435 _getBounds: function() {
6436 var t = this;
6437 if (t.zoom <= 3) return {
6438 lt: "-90,-180",
6439 rb: "90,180"
6440 };
6441 var e = t.map.getBounds();
6442 return {
6443 lt: e[0][1] + "," + e[0][0],
6444 rb: e[1][1] + "," + e[1][0]
6445 }
6446 },
6447 _iconName: function(t) {
6448 return {
6449 "bkn_+ra_d": "bkn-p-ra-d",
6450 "bkn_+ra_n": "bkn-p-ra-n",
6451 "bkn_+sn_d": "bkn-p-sn-d",
6452 "bkn_+sn_n": "bkn-p-sn-n",
6453 "bkn_-ra_d": "bkn-m-ra-d",
6454 "bkn_-ra_n": "bkn-m-ra-n",
6455 "bkn_-sn_d": "bkn-m-sn-d",
6456 "bkn_-sn_n": "bkn-m-sn-n",
6457 bkn_d: "bkn-d",
6458 bkn_n: "bkn-n",
6459 bkn_ra_d: "bkn-ra-d",
6460 bkn_ra_n: "bkn-ra-n",
6461 bkn_sn_d: "bkn-sn-d",
6462 bkn_sn_n: "bkn-sn-n",
6463 bl: "bl",
6464 br_d: "br-d",
6465 br_n: "br-n",
6466 fg_d: "fg-d",
6467 fg_n: "fg-n",
6468 ovc: "ovc",
6469 "ovc_+ra": "ovc-p-ra",
6470 "ovc_+sn": "ovc-p-sn",
6471 "ovc_-ra": "ovc-m-ra",
6472 "ovc_-sn": "ovc-m-sn",
6473 ovc_gr: "ovc-gr",
6474 ovc_gr_ra: "ovc-gr-ra",
6475 ovc_ra: "ovc-ra",
6476 ovc_ra_gr: "ovc-ra-gr",
6477 ovc_ra_sn: "ovc-ra-sn",
6478 ovc_ra_sn_gr: "ovc-ra-sn-gr",
6479 ovc_sn: "ovc-sn",
6480 ovc_ts_ra: "ovc-ts-ra",
6481 ovc_ts_ra_sn: "ovc-ts-ra-sn",
6482 ovc_ts_sn: "ovc-ts-sn",
6483 skc_d: "skc-d",
6484 skc_n: "skc-n",
6485 sq: "sq",
6486 strm: "strm",
6487 wnd: "wnd"
6488 }[t]
6489 },
6490 _removePointerEvents: function() {
6491 var t = $(document.body);
6492 clearTimeout(this._timer), t.is(".disable-hover") || t.addClass("disable-hover"), this._timer = setTimeout(function() {
6493 t.removeClass("disable-hover")
6494 }, 250)
6495 }
6496 }), BEM.DOM.decl({
6497 block: "maps",
6498 modName: "type",
6499 modVal: "widget"
6500 }, {
6501 onSetMod: {
6502 js: function() {
6503 var t = this;
6504 t.__base.apply(this, arguments), t.metrikaCounter = "yaCounter" + t.findBlockOutside("i-global").params.metrikaId, t.metrikaParams = {
6505 lang: BEM.I18N.lang()
6506 }, t.info = t.params.info, t.mapHeight = t.params.mapHeight || "290px", ymaps.ready(function() {
6507 t._initMap(), t._onLoadMap(), t._mapRender()
6508 })
6509 }
6510 },
6511 _initMap: function() {
6512 var t = this,
6513 e = t.elem("viewport"),
6514 n = $.queryParam("lang");
6515 t.iconLayoutClass = ymaps.templateLayoutFactory.createClass(bh.apply({
6516 block: "baloon",
6517 cls: "ymaps-placemark",
6518 content: {
6519 block: "link",
6520 url: t.serviceRoot + "/{{properties.slug}}/" + (n ? "?lang=" + n : ""),
6521 attrs: {
6522 onmousedown: t._makeStringCallMetrika("maps.baloon.click")
6523 },
6524 content: t._getContentPlacemark(!0)
6525 }
6526 })), t.iconClusterLayoutClass = ymaps.templateLayoutFactory.createClass(bh.apply({
6527 block: "baloon",
6528 cls: "ymaps-placemark",
6529 attrs: {
6530 onmousedown: t._makeStringCallMetrika("maps.baloon-cluster.click")
6531 },
6532 content: t._getContentPlacemark()
6533 })), e.empty().css({
6534 width: "100%",
6535 height: t.mapHeight
6536 }), t.map = new ymaps.Map(e[0], {
6537 center: [t.info.lon, t.info.lat],
6538 zoom: t.zoom,
6539 type: "yandex#map",
6540 behaviors: ["default", "scrollZoom"],
6541 controls: ["zoomControl"]
6542 }, {
6543 minZoom: t.params.minZoom,
6544 maxZoom: t.params.maxZoom,
6545 adjustZoomOnTypeChange: !0
6546 }), t.map.events.add("boundschange", function(e) {
6547 var n = e.get("newZoom");
6548 window[t.metrikaCounter] && (n !== e.get("oldZoom") ? window[t.metrikaCounter].reachGoal("map.boundschange.zoom", t.metrikaParams) : window[t.metrikaCounter].reachGoal("map.boundschange", t.metrikaParams))
6549 }), t.__base.apply(this, arguments)
6550 },
6551 _onLoadMap: function() {
6552 var t = this;
6553 t.map.setCenter([t.info.lon, t.info.lat], t.info.zoom)
6554 },
6555 _mapRender: function() {
6556 var t = this;
6557 t.__base.apply(this, arguments), t.zoom !== t.map.getZoom() && t.map.setZoom(t.info.zoom)
6558 },
6559 _makeStringCallMetrika: function(t) {
6560 var e = this;
6561 return "window." + e.metrikaCounter + " && " + e.metrikaCounter + ".reachGoal('" + t + "', " + JSON.stringify(e.metrikaParams).replace(/"/g, "'") + "); return true;"
6562 }
6563 }),
6564 function(t, e, n) {
6565 function i() {
6566 m && f && console.log.apply(console, arguments)
6567 }
6568
6569 function r(t) {
6570 return "string" == typeof t && (t = {
6571 block: t
6572 }), t.block + (t.elem ? l + t.elem : "") + (t.modName ? c + t.modName + c + t.modVal : "")
6573 }
6574
6575 function s(t) {
6576 var e = {};
6577 return t.split(l).forEach(function(t, n) {
6578 var i = [n ? "elem" : "block", "mod", "val"];
6579 t.split(c).forEach(function(t, n) {
6580 e[i[n]] = t
6581 })
6582 }), e
6583 }
6584
6585 function o(t) {
6586 return t ? p.push(t) : !1
6587 }
6588
6589 function a() {
6590 return p.length && p.pop()
6591 }
6592
6593 function u() {
6594 this._lang = "", this._prj = "lego", this._keyset = "", this._key = ""
6595 }
6596 if ("function" == typeof e.I18N && e.I18N._proto) return e.I18N;
6597 "undefined" == typeof i18n && (i18n = {}), BEM = e;
6598 var c = "_",
6599 l = "__",
6600 h = "ru",
6601 d = {},
6602 p = [],
6603 m = !1,
6604 f = "undefined" != typeof console && "function" == typeof console.log;
6605 u.prototype = {
6606 lang: function(t) {
6607 return this._lang = t, this
6608 },
6609 project: function(t) {
6610 return this._prj = t, this
6611 },
6612 keyset: function(t, e) {
6613 return e && o(this._keyset), this._keyset = r(t), this
6614 },
6615 key: function(t) {
6616 return this._key = t, this
6617 },
6618 decl: function(t) {
6619 var e = s(this._keyset),
6620 n = "i-tanker" === e.block ? "tanker" : this._prj,
6621 i = e.elem || this._keyset,
6622 r = this._key;
6623 n = i18n[n] || (i18n[n] = {}), i = n[i] || (n[i] = {}), i[r] = "function" == typeof t ? t : function(e) {
6624 return t
6625 };
6626 var o = d[this._lang] || (d[this._lang] = {}),
6627 a = o[this._keyset] || (o[this._keyset] = {});
6628 a[r] = t
6629 },
6630 val: function(t, e) {
6631 var n = d[this._lang] && d[this._lang][this._keyset],
6632 r = "keyset: " + this._keyset + " key: " + this._key + " (lang: " + this._lang + ")";
6633 if (!n) return i("[I18N_NO_KEYSET] %s", r), "";
6634 n = n[this._key];
6635 var s = typeof n;
6636 return "undefined" === s ? (i("[I18N_NO_VALUE] %s", r), "") : "string" === s ? n : (e || (e = this), n.call(e, t))
6637 },
6638 _cache: function() {
6639 return d
6640 }
6641 }, e.I18N = function(t) {
6642 var e = function(t, n, i) {
6643 return e.keyset(t).key(n, i)
6644 };
6645 return e._proto = t, e.project = function(t) {
6646 return this._proto.project(t), this
6647 }, e.keyset = function(t) {
6648 return this._proto.keyset(t, !0), this
6649 }, e.key = function(t, n) {
6650 var i, r, s = this._proto;
6651 return s.lang(this._lang).key(t), i = s.val.call(s, n, e), r = a(), r && s.keyset(r, !1), i
6652 }, e.decl = function(t, e, n) {
6653 var i, r = this._proto;
6654 n || (n = {}), n.lang && r.lang(n.lang), r.keyset(t);
6655 for (i in e) e.hasOwnProperty(i) && r.key(i).decl(e[i]);
6656 return this
6657 }, e.lang = function(t) {
6658 return "undefined" != typeof t && (this._lang = t), this._lang
6659 }, e.debug = function(t) {
6660 m = !!t
6661 }, e.lang(h), e
6662 }(new u)
6663 }(this, "undefined" == typeof BEM ? {} : BEM), "undefined" != typeof BEM && BEM.I18N && (BEM.I18N.decl("auth", {
6664 auth: "ÃÂòтþрø÷ðцøÑÂ",
6665 "fill-input": "×ðÿþûýøтõ ÑÂтþ ÿþûõ",
6666 login: "Ûþóøý",
6667 logon: "Òþùтø",
6668 more: "Õщё",
6669 password: "ßðрþûь",
6670 permanent: "×ðÿþüýøть üõýÑÂ",
6671 register: "à õóøÑÂтрðцøÑÂ",
6672 remember: "Ã’ÑÂÿþüýøть ÿðрþûь",
6673 "social-log-in": "Òþùтø ÿрø ÿþüþщø ÑÂþцøðûьýþù ÑÂõтø",
6674 temporary: "çуöþù úþüÿьютõр",
6675 "wrong-characters": "ÃÂõôþÿуÑÂтøüыù òòþô",
6676 "wrong-keyboard-layout": "áüõýøтõ рðÑÂúûðôúу",
6677 "wrong-password": "ßðрþûь ýõ üþöõт ÑÂþòÿðôðть Ѡûþóøýþü"
6678 }, {
6679 lang: "ru"
6680 }), BEM.I18N.decl("b-statcounter__metrika", {
6681 JSERR_incorrectID: "Incorrect ID has been passed."
6682 }, {
6683 lang: "ru"
6684 }), BEM.I18N.decl("copyright", {
6685 link: function(t) {
6686 return "ÞÞÞ «" + t.content + "»"
6687 },
6688 yandex: "ïýôõúÑÂ"
6689 }, {
6690 lang: "ru"
6691 }), BEM.I18N.decl("footer", {
6692 about: "Þ úþüÿðýøø",
6693 "about-url": "//company.yandex.ru",
6694 advert: "à õúûðüð",
6695 "advert-url": "//advertising.yandex.ru/kupislova.xml?advertising",
6696 agreement: "ßþûь÷þòðтõÃȄ΄Âúþõ ÑÂþóûðшõýøõ",
6697 apps: "Üþñøûьýыõ ÿрøûþöõýøÑÂ",
6698 "apps-url": "//mobile.yandex.ru",
6699 beta: "β-òõрÑÂøÑÂ",
6700 "copyright-notice": "",
6701 design: "Ãâ€Ã¸Ã·Ã°Ã¹Ã½",
6702 "design-artlebedev": "áтуôøѠÃÂртõüøÑ Ûõñõôõòð",
6703 "design-artlebedev-url": "http://www.artlebedev.ru",
6704 mobile: "ÜþñøûьýðѠòõрÑÂøÑÂ",
6705 "privacy-policy": "",
6706 "services-button-value": "ßõрõùтø",
6707 stat: "áтðтøÑÂтøúð",
6708 "terms-of-service": "",
6709 termsofuse: "Ûøцõý÷øѠýð ÿþøÑÂú",
6710 "termsofuse-url": "//legal.yandex.ru/termsofuse/",
6711 vacancies: "ÒðúðýÑÂøø",
6712 "yandex-is-local": "ïýôõúѠûþúðûõý",
6713 "yandex-is-not-local": "Úðú ÑÂôõûðть ïýôõúѠûþúðûьýыü"
6714 }, {
6715 lang: "ru"
6716 }), BEM.I18N.decl("header2", {
6717 "action-filter-title": "ÃÂðÑÂтрþùúø ÿþøÑÂúð",
6718 "action-settings-title": "ÃÂðÑÂтрþùúø",
6719 "action-tableau-title": "âðñûþ ÑÂõрòøÑÂþò"
6720 }, {
6721 lang: "ru"
6722 }), BEM.I18N.decl("header2__logo", {
6723 "logo-alt": "ïýôõúÑÂ",
6724 "logo-img-png-url": "https://yastatic.net/islands/_/qhI8Etj7_e_K-61N2-_GH1gF4QI.png",
6725 "logo-img-svg": "https://yastatic.net/islands/_/uBeuL5reE-5D8m89Ky4i6XNh8yo.svg"
6726 }, {
6727 lang: "ru"
6728 }), BEM.I18N.decl("i-services", {
6729 404: "404",
6730 adresa: "ÃÂôрõÑÂð",
6731 advertising: "à õúûðüð",
6732 afisha: "ÃÂфøшð",
6733 all: "Ã’ÑÂõ ÑÂõрòøÑÂÑ‹",
6734 api: "API",
6735 appsearch: "ßрøûþöõýøÑÂ",
6736 auto: "ÃÂòтþ",
6737 avia: "ÃÂòøðñøûõты",
6738 aziada: "ÃÂ÷øðôð",
6739 ba: "ÑðÑÂý",
6740 backapv: "ßðртýõр ï.Úðрт",
6741 balance: "ÑðûðýÑÂ",
6742 bar: "Ñðр",
6743 "bar-ie": "Ñðр ôÃȄ ØÕ",
6744 "bar-ie9": "Ñðр ôÃȄ ØÕ9",
6745 bayan: "Ñðýýõры ïýôõúÑÂð",
6746 blogs: "Ñûþóø",
6747 books: "Úýøóø",
6748 browser: "Ñрðу÷õр",
6749 calendar: "Úðûõýôðрь",
6750 captcha: "þù...",
6751 catalogwdgt: "Úðтðûþó òøôöõтþò",
6752 chrome: "åрþü ѠÿþøÑÂúþü ïýôõúÑÂð",
6753 city: "Óþрþôð",
6754 cityday: "Ãâ€ÃµÃ½ÑŒ óþрþôð",
6755 collection: "ÚþûûõúцøÑÂ",
6756 company: "ÚþüÿðýøÑÂ",
6757 contest: "Contest",
6758 desktop: "ßõрÑÂþýðûьýыù ÿþøÑÂú",
6759 direct: "Ãâ€Ã¸Ñ€ÃµÃºÑ‚",
6760 "direct.market": "Üðрúõт",
6761 disk: "Ãâ€Ã¸ÑÂú",
6762 display: "Ãâ€Ã¸ÑÂÿûõù",
6763 ege: "ÕÓÃÂ",
6764 expert: "ÃÂúÑÂÿõрт",
6765 feedback: "ÞñрðтýðѠÑÂòÑÂ÷ь",
6766 feedback2: "ÞñрðтýðѠÑÂòÑÂ÷ь",
6767 ff: "ää ѠÿþøÑÂúþü ïýôõúÑÂð",
6768 fotki: "äþтúø",
6769 fresh: "áòõöõõ",
6770 games: "Øóрушúø",
6771 geocontext: "ÓõþúþýтõúÑÂÑ‚",
6772 goroda: "Óþрþôð",
6773 help: "ßþüþщь",
6774 i: "Üþø ÑÂõрòøÑÂÑ‹",
6775 ie: "ØՠѠÿþøÑÂúþü ïýôõúÑÂð",
6776 images: "Úðртøýúø",
6777 "images-com": "Úðртøýúø",
6778 interests: "ØýтõрõÑÂÑ‹",
6779 internet: "Øýтõрýõт",
6780 kassa: "ÚðÑÂÑÂð",
6781 keyboard: "Úûðòøðтурð",
6782 kraski: "ÚрðÑÂúø",
6783 kuda: "Úуôð òÑÂõ øôут",
6784 large: "ïýôõúѠôÃȄʄÂûðñþòøôÑÂщøх",
6785 legal: "ßрðòþòыõ ôþúуüõýты",
6786 lenta: "Ûõýтð",
6787 libra: "Ñøñûøþтõúð",
6788 literacy: "ÃÂõôõûѠñþрьñы ÷ð óрðüþтýþÑÂть",
6789 local: "ÛþúðûьýðÑ ÑÂõть",
6790 lost: "ÃÂõ÷ðñуôúø",
6791 love: "Ãâ€ÃµÃ½ÑŒÂ ò÷ðøüýþóþ тÑÂóþтõýøÑ â€â€Ã‚ 13 ðòóуÑÂтð",
6792 mail: "ßþчтð",
6793 maps: "Úðрты",
6794 "maps-wiki": "ÃÂðрþôýðѠúðртð",
6795 market: "Üðрúõт",
6796 "market.advertising": "Üðрúõт",
6797 master: "ÜðÑÂтõр",
6798 metrika: "Üõтрøúð",
6799 metro: "Üõтрþ",
6800 mobile: "Üþñøûьýыù",
6801 moikrug: "Üþù Úруó",
6802 money: "Ãâ€ÃµÃ½ÑŒÃ³Ã¸",
6803 museums: "Ãâ€Ã½Ã¸Â øÑÂтþрøчõÑÂúþóþ ø úуûьтурýþóþ ýðÑÂûõôøÑÂ",
6804 music: "Üу÷ыúð",
6805 "music-partner": "Üу÷ыúð: ÑÂтðтøÑÂтøúð",
6806 nahodki: "Üþø ýðхþôúø",
6807 nano: "ÃÂðýþ",
6808 newhire: "ÃÂðýøüðтþр",
6809 news: "ÃÂþòþÑÂтø",
6810 notifications: "ÃÂþтøфøúðцøþýýðѠÿðýõûь",
6811 oauth: "ÃÂòтþрø÷ðцøÑÂ",
6812 online: "Þýûðùý",
6813 openid: "OpenID",
6814 opera: "Opera Software",
6815 opinion: "æøтðты",
6816 partners: "à õúûðüýðÑ ÑÂõть",
6817 partnersearch: "ßþøÑÂú ôûѠÿðртýõрþò",
6818 passport: "ßðÑÂÿþрт",
6819 pdd: "ßþчтð ôûѠôþüõýð",
6820 peoplesearch: "Ûюôø",
6821 perevod: "ßõрõòþôчøú",
6822 probki: "ßрþñúø",
6823 pulse: "ñûþóø: ÿуÃȄ΄Â",
6824 punto: "Punto switcher",
6825 pvo: "Þтòõты",
6826 rabota: "à ðñþтð",
6827 ramazan: "",
6828 rasp: "à ðÑÂÿøÑÂðýøÑÂ",
6829 realty: "ÃÂõôòøöøüþÑÂть",
6830 referats: "à õфõрðты",
6831 rk: "ÕÑÂть òþÿрþÑÂÑ‹?",
6832 root: "ïýôõúÑÂ.Þûøüÿøðôð ôûѠUnix ðôüøýøÑÂтрðтþрþò",
6833 school: "èúþûð",
6834 search: "ßþøÑÂú",
6835 server: "áõрòõр",
6836 shtrafi: "èтрðфы",
6837 site: "ßþøÑÂú ôÃȄ ÑÂðùтð",
6838 slovari: "áûþòðрø",
6839 so: "áðüþþñþрþýð",
6840 social: "áþцøðûø÷ü",
6841 soft: "ßрþóрðüüы",
6842 sport: "áÿþрт",
6843 sprav: "áÿрðòþчýøú",
6844 start: "áтðртþòðѠÑÂтрðýøцð",
6845 stat: "áтðтøÑÂтøúð",
6846 subs: "ßþôÿøÑÂúø",
6847 taxi: "âðúÑÂø",
6848 terms: "à ð÷óþòþрýøú",
6849 tests: "âõÑÂты ø þÿрþÑÂÑ‹",
6850 tickets: "Ñøûõты",
6851 time: "ïýôõúÑÂ.ÒрõüÑÂ",
6852 toster: "âþÑÂты",
6853 translate: "ßõрõòþôчøú",
6854 tune: "ÃÂðÑÂтрþùúø",
6855 tv: "âÒ",
6856 uslugi: "ãÑÂûуóø",
6857 video: "Òøôõþ",
6858 "video-com": "Òøôõþ",
6859 vno: "Ã’ÃÂÞ",
6860 wdgt: "Òøôöõты",
6861 weather: "ßþóþôð",
6862 webmaster: "ÒõñüðÑÂтõр",
6863 widgets: "Òøôöõты",
6864 wordstat: "áтðтøÑÂтøúð",
6865 wow: "ï.ру",
6866 www: "ßþøÑÂú",
6867 xmlsearch: "XML",
6868 yaca: "Úðтðûþó",
6869 yamb: "Üõôøùýыõ ñðýýõры",
6870 zakladki: "×ðúûðôúø"
6871 }, {
6872 lang: "ru"
6873 }), BEM.I18N.decl("i-tanker__dynamic", {
6874 gender: function(t) {
6875 return function(t) {
6876 return t[t.gender]
6877 }.call(this, t)
6878 },
6879 plural: function(t) {
6880 return function(t) {
6881 var e = isNaN(parseInt(t.count)) ? 0 : t.count,
6882 n = e % 10,
6883 i = e % 100;
6884 return 1 == n && 11 != i ? t.one : n > 1 && 5 > n && (10 > i || i > 20) ? t.some : t.many
6885 }.call(this, t)
6886 },
6887 plural_adv: function(t) {
6888 return function(t) {
6889 var e = isNaN(parseInt(t.count)) ? 0 : t.count;
6890 return 0 === e ? t.none : this.keyset("i-tanker__dynamic").key("plural", {
6891 count: t.count,
6892 one: t.one,
6893 some: t.some,
6894 many: t.many
6895 })
6896 }.call(this, t)
6897 },
6898 toggle: function(t) {
6899 return function(t) {
6900 return Boolean(t.condition) ? t["true"] : t["false"]
6901 }.call(this, t)
6902 }
6903 }, {
6904 lang: "ru"
6905 }), BEM.I18N.decl("interface-common", {
6906 "404-text": "Ã’Ñ‹ ÿþÿðûø ýð ýõÑÂущõÑÂтòующую ÑÂтрðýøцу.<br> ÒõрþÑÂтýþ, ÑÂтþ ÿрþø÷þшûþ ø÷-÷ð þÿõчðтúø øûø ýõÿрðòøûьýþù рðÑÂúûðôúø úûðòøðтуры. <br><br> ÕÑÂûø òы ÿрþшûø ÑÂюôð ÿþ ÑÂÑÂыûúõ, <a class='link' target='_blank' href='%s'>ÿþôõûøтõÑÂÑŒ õю Ѡýðüø</a>, ÿþöðûуùÑÂтð.",
6907 "500-text": "áõрòøѠÿþóþôы òрõüõýýþ ýõôþÑÂтуÿõý.<br> Üы уöõ ÷ýðõü þ ÿрþñûõüõ ø рðñþтðõü ýðô õё уÑÂтрðýõýøõü.",
6908 "500-title": "áõрòøѠòрõüõýýþ ýõôþÑÂтуÿõý",
6909 "bandit-title": "àÿþúð òы üþöõтõ ÷ðúð÷ðть ÿþóþôу ýð уôðчу",
6910 briefly: "úрðтúþ",
6911 "day-ak": "ôýёü",
6912 detailed: "ÿþôрþñýþ",
6913 "error-try-again": "ßрþø÷þшûð þшøñúð  ÿþÿрþñуùтõ õщõ рð÷",
6914 "evening-ak": "òõчõрþü",
6915 find: "ÃÂðùтø",
6916 "geolocation-error-disable": "à ð÷рõшøтõ óõþûþúðцøю",
6917 "geolocation-error-network": "ÃÂõт øýтõрýõтð",
6918 "geolocation-error-unknown": "ßþÿрþñуùтõ ÿþ÷öõ",
6919 "geolocation-specify-global": "Üþё üõÑÂтþÿþûþöõýøõ",
6920 hPa: "óßð",
6921 humidity: "ÒûðöýþÑÂть",
6922 "in-the-world": "Ò üøрõ",
6923 kmph: "úü/ч",
6924 "learn-more": "ã÷ýðть ÿþôрþñýõõ",
6925 "meta-description-fallback": "ßþôрþñýыù ÿрþóýþ÷ ÿþóþôы ýð ÑÂõóþôýÑÂ, ÷ðòтрð, ýõôõûю, 10 ôýõù, üõÑÂÑÂц. âõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть, ÑÂúþрþÑÂть òõтрð. ÕÑÂть ÿþóþôýыõ úðрты ø øýфþрüõр ôÃȄʄÂðùтð. ",
6926 "meta-description-main": "ßþôрþñýыù ÿрþóýþ÷ ÿþóþôы ôûѠ%{genitive}s ýð ÑÂõóþôýÑÂ, ÷ðòтрð, ýõôõûю, 10 ôýõù, üõÑÂÑÂц. âõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть, ÑÂúþрþÑÂть òõтрð. ßþóþôýыõ úðрты, øýфþрüõр ôÃȄʄÂðùтð ø øýфþрüðцøѠþ úûøüðтõ рõóøþýþò. ",
6927 "meta-title-main": "ßрþóýþ÷ ÿþóþôы %{preposition}s %{prepositional}s ýð 10 ôýõù ",
6928 "meteum-description": "Úðú ïýôõúѠрðÑÂÑÂчøтыòðõт тþчýыù ÿрþóýþ÷ ÿþóþôы ôûѠúðöôþóþ úþýúрõтýþóþ üõÑÂтð.",
6929 "meteum-title": "âõхýþûþóøѠMeteum",
6930 mmHg: "üü рт. ÑÂÑ‚.",
6931 "more-details": "ßþôрþñýõõ",
6932 "morning-ak": "утрþü",
6933 mps: "ü/ÑÂ",
6934 "night-ak": "ýþчью",
6935 "no-search-result": "ßþ òðшõüу ÷ðÿрþÑÂу ýøчõóþ ýõ ýðшûþÑÂÑŒ",
6936 now: "áõùчðÑÂ",
6937 "page-doesnt-exist": "âðúþù ÑÂтрðýøцы ýõ ÑÂущõÑÂтòуõт",
6938 "polar-day": "ßþÃȄÂрýыù ôõýь",
6939 "polar-night": "ßþÃȄÂрýðѠýþчь",
6940 pressure: "Ãâ€Ã°Ã²Ã»ÃµÃ½Ã¸Ãµ",
6941 sunrise: "ÒþÑÂхþô",
6942 sunset: "×ðúðт",
6943 today: "ÑÂõóþôýÑÂ",
6944 tomorrow: "÷ðòтрð",
6945 "try-another-city": "ßþÿрþñуùтõ òыñрðть ôруóþù óþрþô",
6946 "water-temperature": "âõüÿõрðтурð òþôы",
6947 weather: "ßþóþôð",
6948 wind: "Òõтõр",
6949 "wind-calm": "èтøûь",
6950 "wind-e": "òþÑÂтþчýыù",
6951 "wind-e-short": "۪̉",
6952 "wind-n": "ÑÂõòõрýыù",
6953 "wind-n-short": "á",
6954 "wind-ne": "ÑÂõòõрþ-òþÑÂтþчýыù",
6955 "wind-ne-short": "áÒ",
6956 "wind-nw": "ÑÂõòõрþ-÷ðÿðôýыù",
6957 "wind-nw-short": "á×",
6958 "wind-s": "юöýыù",
6959 "wind-s-short": "î",
6960 "wind-se": "юóþ-òþÑÂтþчýыù",
6961 "wind-se-short": "îÒ",
6962 "wind-sw": "юóþ-÷ðÿðôýыù",
6963 "wind-sw-short": "î×",
6964 "wind-w": "÷ðÿðôýыù",
6965 "wind-w-short": "×",
6966 "ya-alert-prefix": "ßþóþôð üõýÑÂõтÑÂÑÂ:",
6967 "ya-pogoda": "ïýôõúÑÂ.ßþóþôð"
6968 }, {
6969 lang: "ru"
6970 }), BEM.I18N.decl("interface-desktop", {
6971 "advert-url": "//advertising.yandex.ru/kupislova.xml?advertising",
6972 "all-cities": "Ã’ÑÂõ óþрþôð",
6973 "bar-weather": "ßþóþôð ò òðшõü ñрðу÷õрõ",
6974 belarus: "ÑõûðруÑÂÑŒ",
6975 "by-regions": "ßþ рõóøþýðü",
6976 "cities-dynamic": function(t) {
6977 return this.keyset("i-tanker__dynamic").key("plural_adv", {
6978 count: t.count,
6979 one: "%d óþрþô",
6980 some: "%d óþрþôð",
6981 many: "%d óþрþôþò",
6982 none: "%d óþрþôþò"
6983 })
6984 },
6985 "city-choose": "Ãâ€Ã‘€ÑƒÃ³Ã¾Ã¹ óþрþô",
6986 climate: "Úûøüðт",
6987 "climate-caption-city": "ÚûøüðтøчõÑÂúðѠýþрüð %s",
6988 "climate-caption-day-night": "áþþтýþшõýøõ ôýõòýþù ø ýþчýþù тõüÿõрðтур",
6989 "climate-caption-days-precepitations": "çøÑÂûþ ôýõù ѠþÑÂðôúðüø ñþûõõ 1 üü",
6990 "climate-caption-days-sun-rain": "çøÑÂûþ ÑÂþûýõчýых ø ôþöôûøòых ôýõù",
6991 "climate-caption-days-sunny": "çøÑÂûþ ÑÂþûýõчýых ôýõù",
6992 "climate-caption-humidity": "ÞтýþÑÂøтõûьýðѠòûðöýþÑÂть, %",
6993 "climate-caption-precipitations": "ÚþûøчõÑÂтòþ þÑÂðôúþò, üü",
6994 "climate-caption-temp-day": "âõüÿõрðтурð ôýёü",
6995 "climate-caption-temp-night": "âõüÿõрðтурð ýþчью",
6996 "climate-caption-temp-water": "âõüÿõрðтурð òþôы",
6997 "climate-data": "ÚûøüðтøчõÑÂúøõ ôðýýыõ",
6998 "climate-overview": "Þñщõõ þÿøÑÂðýøõ úûøüðтð",
6999 cloudiness: "ÞñûðчýþÑÂть",
7000 color: "æòõт",
7001 colorful: "рð÷ýþцòõтýыù",
7002 "copyright-tech-fallback": "%s: ûþúðûьýыù ÿрþóýþ÷ ÿþóþôы рðÑÂÑÂчøтðý Ѡÿþüþщью тõхýþûþóøø Meteum ",
7003 "copyright-tech-foreca": "ßрþóýþ÷ ÿþóþôы ôûѠ%s  ÿþ ôðýýыü FORECA",
7004 "copyright-tech-meteum": "ßрþóýþ÷ ÿþóþôы %s1 %s2 ѠтþчýþÑÂтью ôþ рðùþýð  рðÑÂÑÂчøтðý Ѡÿþüþщью тõхýþûþóøø Meteum ",
7005 countries: "áтрðýы",
7006 "countries-dynamic": function(t) {
7007 return this.keyset("i-tanker__dynamic").key("plural_adv", {
7008 count: t.count,
7009 one: "%d ÑÂтрðýð",
7010 some: "%d ÑÂтрðýы",
7011 many: "%d ÑÂтрðý",
7012 none: "%d ÑÂтрðý"
7013 })
7014 },
7015 "data-of": "Ãâ€Ã°Ã½Ã½Ñ‹Ãµ ýð %d",
7016 "data-providers-copyright-for-meteum-pages": "ØÑÂхþôýыõ ôðýýыõ: ÞÞÞ «Ã¯Ã½Ã´ÃµÃºÑÂ.ßрþñúø», Foreca",
7017 "day-short-names": "ßý,Ã’Ñ‚,áр,çт,ßт,áñ,Ã’ÑÂ",
7018 "decreasing-moon": "ãñыòðющðѠûуýð",
7019 "district-caucasus": "áõòõрþ-úðòúð÷ÑÂúøù",
7020 "district-center": "æõýтрðûьýыù",
7021 "district-crimea": "ÚрыüÑÂúøù",
7022 "district-far-east": "Ãâ€Ã°Ã»ÑŒÃ½ÃµÃ²Ã¾ÑÂтþчýыù",
7023 "district-nw": "áõòõрþ-÷ðÿðôýыù",
7024 "district-siberia": "áøñøрÑÂúøù",
7025 "district-south": "îöýыù",
7026 "district-ural": "ãрðÃȄ΄Âúøù",
7027 "district-volga": "ßрøòþûöÑÂúøù",
7028 districts: "äõôõрðûьýыõ þúруóð",
7029 east: "òþÑÂтþú",
7030 europe: "Õòрþÿð",
7031 field_0: "ÑÂÿþúþùýþõ",
7032 field_1: "ýõуÑÂтþùчøòþõ",
7033 field_2: "ÑÂûðñþ òþ÷üущõýýþõ",
7034 field_3: "òþ÷üущõýýþõ",
7035 field_4: "üðóýøтýðѠñурÑÂ",
7036 field_5: "ñþûьшðѠüðóýøтýðѠñурÑÂ",
7037 "first-quarter": "ßõрòðѠчõтòõрть",
7038 "full-moon": "ßþûýþûуýøõ",
7039 gale: "áøûьýыù òõтõр",
7040 "growing-moon": "à ðÑÂтущðѠûуýð",
7041 "hourly-link-label": "ßþчðÑÂþòþù ÿрþóýþ÷",
7042 "index-header": "ßþóþôð %{preposition}s %{prepositional}s",
7043 "informer-can-link": "//help.yandex.ru/pogoda/widgets.xml",
7044 "informer-code": "Úþô øýфþрüõрð",
7045 "informer-header": "ÃÂúтуðûьýðѠøýфþрüðцøѠþ ÿþóþôõ  ýð òðшõü ÑÂðùтõ ",
7046 "informer-select-city": "Òыñрðть øýфþрüõр ÿþóþôы ôûѠóþрþôð:",
7047 "informer-text1": "Ã’Ñ‹ üþöõтõ уÑÂтðýþòøть ýð ÑÂòþёü ÑÂðùтõ øýфþрüõр Ѡôðýýыüø þ ÿþóþôõ. ",
7048 "informer-text2": "Òыñõрøтõ øýтõрõÑÂующøù òðѠрõóøþý ø òðрøðýт øýфþрüõрð, ÿþôхþôÑÂщøù òðü ÿþ цòõту ø рð÷üõру. à ð÷üõÑÂтøтõ ÿþûучõýýыù úþô ýð ÑÂтрðýøцðх ÑÂòþõóþ ÑÂðùтð øûø ñûþóð. ",
7049 informers: "Øýфþрüõры",
7050 kazakhstan: "Úð÷ðхÑÂтðý",
7051 "last-quarter": "ßþÑÂûõôýÑÂѠчõтòõрть",
7052 "link-app-store": "áúðчðть ïýôõúÑÂ.ßþóþôу ò AppStore",
7053 "link-google-play": "áúðчðть ïýôõúÑÂ.ßþóþôу ýð Google Play",
7054 loose_1: "ßрþÑÂтþ ÿрþôþûöðùтõ.",
7055 loose_10: "ÃÂу õщõ рð÷þú!",
7056 loose_2: "áýþòð ýõ ÿþòõ÷ûþ  ÷ðтþ рð÷ýþþñрð÷øõ.",
7057 loose_3: "ßþóþôð ø уôðчð ýõÿрõôÑÂúð÷уõüы. ßрþôþûöðùтõ.",
7058 loose_4: "àчтþ òы хþтøтõ ÿþûучøть-тþ?",
7059 loose_5: "Òþт тðúðѠôёрóðýðѠÿþóþôð.",
7060 loose_6: "à ычðó  þôøý, ð òðѠüýþóþ. Õщõ рð÷  ø ôþ ÿþÑÂûõ÷ðòтрð.",
7061 loose_7: "çõü ôðûьшõ  тõü øýтõрõÑÂýõõ.",
7062 loose_8: "Üýõ ÿþòõ÷õт!",
7063 loose_9: "áûþöýþ уÿрðòÃȄÂть ÿþóþôþù.",
7064 "magnetic-field": "Üðóýøтýþõ ÿþûõ",
7065 "maps-widget-link-full": "ÃÂð ñþûьшþù úðртõ",
7066 "max-temp-day-alt": "ÜðúÑÂøüðûьýðѠтõüÿõрðтурð ôýёü",
7067 "meta-description-climate": "Úûøüðт %{genitive}s ø тыÑÂÑÂч óþрþôþò ÿþ òÑÂõüу üøру ýð ïýôõúÑÂ.ßþóþôõ. ÞтýþÑÂøтõûьýðѠòûðöýþÑÂть, úþûøчõÑÂтòþ þÑÂðôúþò, тõüÿõрðтурð ôýёü ø ýþчью, чøÑÂûþ ÑÂþûýõчýых ôýõù %{preposition}s %{prepositional}s. àтðúöõ ÿþôрþñýыù ÿрþóýþ÷ ÿþóþôы ýð ñûøöðùшøõ 10 ôýõù. ",
7068 "meta-description-fallback": "ßþôрþñýыù ÿрþóýþ÷ ÿþóþôы ò óþрþôðх òÑÂõóþ üøрð ýð ñûøöðùшøõ 10 ôýõù. âõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть, ÑÂúþрþÑÂть òõтрð. ÕÑÂть ÿþóþôýыõ úðрты ø øýфþрüõр ôÃȄʄÂðùтð. ",
7069 "meta-description-maps": "ßþóþôð ò рð÷ýых óþрþôðх òðшõóþ рõóøþýð ÿрÑÂüþ ýð ïýôõúÑÂ.Úðртðх. ",
7070 "meta-description-month-with-no-water": "ßрþóýþ÷ ÿþóþôы %{preposition}s %{prepositional}s ýð üõÑÂÑÂц. Ãâ€Ã¾Ã»Ã³Ã¾ÑÂрþчýыù ÿрþóýþ÷ ÿþóþôы %{preposition}s %{prepositional}s ýð 30 ôýõù. ßþóþôð %{preposition}s %{prepositional}s ÿþ üõÑÂÑÂцðü: тõüÿõрðтурð òþ÷ôухð, þÑÂðôúø, úþûøчõÑÂтòþ ÑÂþûýõчýых ôýõù, ôðòûõýøõ ø òûðöýþÑÂть. ßþóþôýыõ úðрты ø øýфþрüðцøѠþ úûøüðтõ рõóøþýþò.",
7071 "meta-description-month-with-no-water-selected": "ßþóþôð %{preposition}s %{prepositional}s ò %{month}: тõüÿõрðтурð òþ÷ôухð, úþûøчõÑÂтòþ ÑÂþûýõчýых ôýõù, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть. ßþóþôð %{preposition}s %{prepositional}s ÿþ üõÑÂÑÂцðü. ßþóþôýыõ úðрты ø øýфþрüðцøѠþ úûøüðтõ рõóøþýþò.",
7072 "meta-description-month-with-water": "ßрþóýþ÷ ÿþóþôы %{preposition}s %{prepositional}s ýð üõÑÂÑÂц. Ãâ€Ã¾Ã»Ã³Ã¾ÑÂрþчýыù ÿрþóýþ÷ ÿþóþôы %{preposition}s %{prepositional}s ýð 30 ôýõù. ßþóþôð %{preposition}s %{prepositional}s ÿþ üõÑÂÑÂцðü: тõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, úþûøчõÑÂтòþ ÑÂþûýõчýых ôýõù, ôðòûõýøõ ø òûðöýþÑÂть. ßþóþôýыõ úðрты ø øýфþрüðцøѠþ úûøüðтõ рõóøþýþò.",
7073 "meta-description-month-with-water-selected": "ßþóþôð %{preposition}s %{prepositional}s ò %{month}: тõüÿõрðтурð òþ÷ôухð, úþûøчõÑÂтòþ ÑÂþûýõчýых ôýõù, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть. âõüÿõрðтурð òþôы %{preposition}s %{prepositional}s ò %{month}. ßþóþôð %{preposition}s %{prepositional}s ÿþ üõÑÂÑÂцðü. ßþóþôýыõ úðрты ø øýфþрüðцøѠþ úûøüðтõ рõóøþýþò.",
7074 "meta-description-region": "ßþôрþñýыù ÿрþóýþ÷ ÿþóþôы ò óþрþôðх %{genitive}s ø òÑÂõóþ üøрð ýð ñûøöðùшøõ 10 ôýõù. âõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть, ÑÂúþрþÑÂть òõтрð. ÕÑÂть ÿþóþôýыõ úðрты ø øýфþрüõр ôÃȄʄÂðùтð. ",
7075 "meta-description-region-no-chief": "ßþôрþñýыù ÿрþóýþ÷ ÿþóþôы ò óþрþôðх òÑÂõóþ üøрð ýð ñûøöðùшøõ 10 ôýõù. âõüÿõрðтурð òþ÷ôухð ø òþôы, þÑÂðôúø, ôðòûõýøõ ø òûðöýþÑÂть, ÑÂúþрþÑÂть òõтрð. ÕÑÂть ÿþóþôýыõ úðрты ø øýфþрüõр ôÃȄʄÂðùтð. ",
7076 "meta-description-widgets": "Øýфþрüõр ÿþóþôы ôûѠòðшõóþ ÑÂðùтð",
7077 "meta-title-choose": "ßрþóýþ÷ ÿþóþôы ÿþ óþрþôðü",
7078 "meta-title-climate": "Úûøüðт %{genitive}s",
7079 "meta-title-maps": "ßþóþôð ýð úðртõ",
7080 "meta-title-month": "ßþóþôð %{preposition}s %{prepositional}s ýð üõÑÂÑÂц",
7081 "meta-title-month-selected": "ßþóþôð %{preposition}s %{prepositional}s ò %{month}",
7082 "meta-title-region": "ßþóþôð %{preposition}s %{prepositional}s",
7083 "meta-title-widgets": "Øýфþрüõр ÿþóþôы ôûѠòðшõóþ ÑÂðùтð",
7084 "min-temp-night-alt": "ÜøýøüðûьýðѠтõüÿõрðтурð ýþчью",
7085 "mini-link-label": "Ò üøýøðтюрõ",
7086 "month-forecast": "ßрþóýþ÷ ýð üõÑÂÑÂц",
7087 "month-nom-names": "ÑÂýòðрь,фõòрðûь,üðрт,ðÿрõûь,üðù,øюýь,øюûь,ðòóуÑÂÑ‚,ÑÂõýтÑÂñрь,þúтÑÂñрь,ýþÑÂñрь,ôõúðñрь",
7088 "month-prep-names": "ÑÂýòðрõ,фõòрðûõ,üðртõ,ðÿрõûõ,üðõ,øюýõ,øюûõ,ðòóуÑÂтõ,ÑÂõýтÑÂñрõ,þúтÑÂñрõ,ýþÑÂñрõ,ôõúðñрõ",
7089 "month-short-names": "ïýò,äõò,Üðр,ÃÂÿр,Üðù,Øюý,Øюû,ÃÂòó,áõý,Þúт,ÃÂþÑÂ,Ãâ€ÃµÃº",
7090 "my-location-hint-done": "ßрþóýþ÷ рðÑÂÑÂчøтðý ôûѠòðшøх úþþрôøýðт",
7091 "my-location-hint-get": "à ðÑÂÑÂчøтðть ÿрþóýþ÷ ôûѠüþøх úþþрôøýðт",
7092 "nav-forecast-10d": "ýð 10 ôýõù",
7093 "nav-forecast-30d": "ÿþ üõÑÂÑÂцðü",
7094 "new-moon": "ÃÂþòþûуýøõ",
7095 north: "ÑÂõòõр",
7096 "other-forecasts": "Ãâ€Ã‘€ÑƒÃ³Ã¸Ãµ ÿрþóýþ÷ы",
7097 precipitation: "ÞÑÂðôúø",
7098 russia: "à þÑÂÑÂøÑÂ",
7099 "russia-center": "æõýтр à þÑÂÑÂøø",
7100 "search-city": "Óþрþô",
7101 "search-place": "Óþрþô, рðùþý øûø тþчýыù ðôрõÑÂ",
7102 "search-result-title": "Ã’Ñ‹ øÑÂúðûø:",
7103 size: "à ð÷üõр",
7104 south: "юó",
7105 "tech-copyright-foreca": "ßрþóýþ÷ ÿþóþôы ôûѠ%s  ÿþ ôðýýыü FORECA",
7106 "tech-copyright-meteum": "тõхýþûþóøø Meteum",
7107 "tech-copyright-nominative": "%s: ûþúðûьýыù ÿрþóýþ÷ ÿþóþôы рðÑÂÑÂчøтðý Ѡÿþüþщью",
7108 "tech-copyright-prepositional": "ßрþóýþ÷ ÿþóþôы %s1 %s2 ѠтþчýþÑÂтью ôþ рðùþýð  рðÑÂÑÂчøтðý Ѡÿþüþщью ",
7109 "tech-copyright-turkish": "",
7110 "tech-copyright-turkish-meteum": "",
7111 "telegram-link-label": "ßþóþôð ò Telegram",
7112 "temp-alt-celsius": "%d° ÿþ æõÃȄ΄Âøю",
7113 temperature: "âõüÿõрðтурð",
7114 ukraine: "ãúрðøýð",
7115 "weather-extension": "à ðÑÂшøрõýøõ ôûѠñрðу÷õрð",
7116 "weather-in": "ßþóþôð %p %s",
7117 "weather-in-cities": "ßþóþôð ò óþрþôðх",
7118 "weather-in-other-cities": "ßþóþôð ò ôруóøх óþрþôðх",
7119 "weather-on-map": "ßþóþôð ýð úðртõ",
7120 "weather-unknown": "ÿþóþôð ò ÑÂтþü óþрþôõ ýðü ýõø÷òõÑÂтýð",
7121 "weather-with-you": "ßþóþôð Ñ ÑÂþñþù",
7122 west: "÷ðÿðô",
7123 white: "ñõûыù",
7124 "widget-ya": "Òøôöõт ôûѠïýôõúÑÂð",
7125 "yesterday-temp": "Ã’чõрð ò ÑÂтþ òрõüÑÂ: %d"
7126 }, {
7127 lang: "ru"
7128 }), BEM.I18N.decl("lang-switcher", {
7129 all: "Õщё"
7130 }, {
7131 lang: "ru"
7132 }), BEM.I18N.decl("search2", {
7133 "search-button-text": "ÃÂðùтø",
7134 "search-input-label": "×ðÿрþÑÂ",
7135 "search-service-label": "ßþøÑÂú ÿþ ÑÂõрòøÑÂу",
7136 "search-web-label": "ßþøÑÂú ò øýтõрýõтõ"
7137 }, {
7138 lang: "ru"
7139 }), BEM.I18N.decl("suggest2", {
7140 fact: "äðúты",
7141 group: "Óруÿÿð ÿþôÑÂúð÷þú",
7142 nah: "Ã’Ñ‹ øÑÂúðûø",
7143 nav: "áðùт",
7144 text: "ßþøÑÂú",
7145 traffic: "ßрþñúø",
7146 weather: "ßþóþôð"
7147 }, {
7148 lang: "ru"
7149 }), BEM.I18N.decl("suggest2-item", {
7150 "quick-answer": "ÃԄ܄Âтрыù þтòõт"
7151 }, {
7152 lang: "ru"
7153 }), BEM.I18N.decl("user", {
7154 enter: "Òþùтø",
7155 exit: "Òыùтø",
7156 letter: function(t) {
7157 return this.keyset("i-tanker__dynamic").key("plural_adv", {
7158 count: t.count,
7159 one: "ýþòþõ ÿøÑÂьüþ",
7160 some: "ýþòых ÿøÑÂьüð",
7161 many: "ýþòых ÿøÑÂõü",
7162 none: "ÃÂõт ýþòых ÿøÑÂõü"
7163 })
7164 },
7165 letter_compose: "ÃÂðÿøÑÂðть ÿøÑÂьüþ",
7166 passport: "ßðÑÂÿþрт",
7167 tune: "ÃÂðÑÂтрþùúð",
7168 upload_files: "Üþù Ãâ€Ã¸ÑÂú"
7169 }, {
7170 lang: "ru"
7171 }), BEM.I18N.decl("user_menu_multiauth", {
7172 "add-user": "Ãâ€Ã¾Ã±Ã°Ã²Ã¸Ñ‚ÑŒ ÿþûь÷þòðтõÃȄÂ",
7173 "edit-list": "à õôðúтøрþòðть ÑÂÿøÑÂþú"
7174 }, {
7175 lang: "ru"
7176 }), BEM.I18N.decl("weather-conditions", {
7177 "abrupt-cold-snap": "рõ÷úþõ ÿþхþûþôðýøõ",
7178 "abrupt-warming": "рõ÷úþõ ÿþтõÿûõýøõ",
7179 clear: "ÑÂÑÂýþ",
7180 "clear-skies": "ÑÂÑÂýþ",
7181 "clouds-developing": "þñûðчýþÑÂть",
7182 "clouds-dissolving": "üðûþþñûðчýþ",
7183 cloudy: "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø",
7184 "cloudy-and-light-rain": "ýõñþûьшþù ôþöôь",
7185 "cloudy-and-light-snow": "ýõñþûьшþù ÑÂýõó",
7186 "cloudy-and-light-wet-snow": "ýõñþûьшþù ôþöôь ÑÂþ ÑÂýõóþü",
7187 "cloudy-and-rain": "ôþöôь",
7188 "cloudy-and-showers": "ôþöôь",
7189 "cloudy-and-snow": "ÑÂýõó",
7190 "cloudy-and-snow-showers": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, òрõüõýðüø ÑÂýõó",
7191 "cloudy-and-wet-snow": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, ôþöôь ÑÂþ ÑÂýõóþü",
7192 "cloudy-and-wet-snow-showers": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, òрõüõýðüø ôþöôь ÑÂþ ÑÂýõóþü",
7193 "cloudy-thunderstorms-with-rain": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, ôþöôь, óрþ÷ð",
7194 "cloudy-thunderstorms-with-snow": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, ÑÂýõó, óрþ÷ð",
7195 "cloudy-thunderstorms-with-wet-snow": "þñûðчýþ ѠÿрþÑÂÑÂýõýøÑÂüø, ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7196 "cold-snap": "ÿþхþûþôðýøõ",
7197 "continuous-heavy-drizzle": "ÑÂøûьýðѠüþрþÑÂÑŒ",
7198 "continuous-heavy-rain": "ÑÂøûьýыù ôþöôь",
7199 "continuous-heavy-snow": "ÑÂøûьýыù ÑÂýõó",
7200 "continuous-light-drizzle": "ÑÂûðñðѠüþрþÑÂÑŒ",
7201 "continuous-light-rain": "ÑÂûðñыù ôþöôь",
7202 "continuous-light-snow": "ÑÂûðñыù ÑÂýõó",
7203 "continuous-moderate-drizzle": "üþрþÑÂÑŒ",
7204 "continuous-moderate-rain": "ôþöôь",
7205 "continuous-moderate-snow": "ÑÂýõó",
7206 "continuous-shallow-fog": "туüðý",
7207 "diamond-dust": "ûõôÑÂýыõ øóûы",
7208 "distant-precipitation-but-not-falling-at-station": "þÑÂðôúø",
7209 drizzle: "üþрþÑÂÑŒ, ÑÂýõöýыõ ÷ёрýð",
7210 "dust-or-sand-raised-by-wind": "ÿыûь ÿþôýÑÂтðѠòõтрþü",
7211 "dust-or-sand-storm-within-sight-but-not-at-station": "ÿыûьýðѠñурÑÂ",
7212 fog: "туüðý",
7213 "fog-at-a-distance": "туüðý",
7214 "fog-depositing-rime-sky-not-visible": "ÑÂøûьýыù туüðý ѠþтûþöõýøÑÂüø ø÷üþрþ÷ø",
7215 "fog-depositing-rime-sky-visible": "туüðý ѠþтûþöõýøÑÂüø ø÷üþрþ÷ø",
7216 "fog-sky-not-visible-becoming-thicker": "ÑÂøûьýыù туüðý",
7217 "fog-sky-not-visible-no-change": "ÑÂøûьýыù туüðý",
7218 "fog-sky-not-visible-thinning": "ÑÂøûьýыù туüðý",
7219 "fog-sky-visible-becoming-thicker": "туüðý",
7220 "fog-sky-visible-no-change": "туüðý",
7221 "fog-sky-visible-thinning": "туüðý",
7222 "freezing-rain": "÷ðüõр÷ðющøù ôþöôь",
7223 "funnel-clouds-within-sight": "ÑÂüõрч",
7224 "hail-showers": "ûøòýõòыù óрðô",
7225 haze: "üóûð",
7226 "heavy-drifting-snow-above-eye-level": "ÑÂøûьýðѠüõтõûь",
7227 "heavy-drifting-snow-below-eye-level": "ÑÂøûьýыù ÿþ÷ёüþú",
7228 "heavy-thunderstorm": "ÑÂøûьýðѠóрþ÷ð",
7229 "heavy-thunderstorm-with-duststorm": "óрþ÷ð, ÿыûьýðѠñурÑÂ",
7230 "heavy-thunderstorm-with-hail": "ÑÂøûьýðѠóрþ÷ð, óрðô",
7231 "ice-pellets": "ûõôÑÂýþù ôþöôь",
7232 "intermittent-heavy-drizzle": "òрõüõýðüø ÑÂøûьýðѠüþрþÑÂÑŒ",
7233 "intermittent-heavy-rain": "òрõüõýðüø ÑÂøûьýыù ôþöôь",
7234 "intermittent-heavy-snow": "òрõüõýðüø ÑÂøûьýыù ÑÂýõó",
7235 "intermittent-light-drizzle": "òрõüõýðüø ÑÂûðñðѠüþрþÑÂÑŒ",
7236 "intermittent-light-rain": "òрõüõýðüø ÑÂûðñыù ôþöôь",
7237 "intermittent-light-snow": "òрõüõýðüø ÑÂûðñыù ÑÂýõó",
7238 "intermittent-moderate-drizzle": "òрõüõýðüø üþрþÑÂÑŒ",
7239 "intermittent-moderate-rain": "òрõüõýðüø ôþöôь",
7240 "intermittent-moderate-snow": "òрõüõýðüø ÑÂýõó",
7241 "light-drizzle-and-rain": "ÑÂûðñðѠüþрþÑÂÑŒ Ѡôþöôõü",
7242 "light-freezing-drizzle": "ÑÂûðñðѠ÷ðüõр÷ðющðѠüþрþÑÂÑŒ",
7243 "light-freezing-rain": "ÑÂûðñыù ôþöôь, þñрð÷ующøù óþûþûёô",
7244 "light-hail-showers": "ÑÂûðñыù óрðô",
7245 "light-rain-and-snow": "ÑÂûðñыù ôþöôь ÑÂþ ÑÂýõóþü",
7246 "light-rain-and-snow-showers": "ÑÂûðñыù ûøòýõòыù ôþöôь ÑÂþ ÑÂýõóþü",
7247 "light-rain-showers": "ÑÂûðñыù ûøòýõòыù ôþöôь",
7248 "light-snow-ice-pellet-showers": "ÑÂûðñðѠûøòýõòðѠúруÿð",
7249 "light-snow-showers": "ÑÂûðñыù ûøòýõòыù ÑÂýõó",
7250 "light-to-moderate-thunderstorm": "óрþ÷ð",
7251 "light-to-moderate-thunderstorm-with-hail": "óрþ÷ð, óрðô",
7252 "lightning-visible-no-thunder-heard": "÷ðрýøцð",
7253 mist: "ôыüúð",
7254 "moderate-to-heavy-drizzle-and-rain": "ÑÂøûьýðѠüþрþÑÂÑŒ Ѡôþöôõü",
7255 "moderate-to-heavy-freezing-drizzle": "ÑÂøûьýðѠ÷ðüõр÷ðющðѠüþрþÑÂÑŒ",
7256 "moderate-to-heavy-freezing-rain": "ÑÂøûьýыù ôþöôь, þñрð÷ующøù óþûþûёô",
7257 "moderate-to-heavy-hail-showers": "ÑÂøûьýыù óрðô",
7258 "moderate-to-heavy-rain-and-snow": "ÑÂøûьýыù ôþöôь ÑÂþ ÑÂýõóþü",
7259 "moderate-to-heavy-rain-and-snow-showers": "ÑÂøûьýыù ûøòýõòыù ôþöôь ÑÂþ ÑÂýõóþü",
7260 "moderate-to-heavy-rain-showers": "ÑÂøûьýыù ûøòýõòыù ôþöôь",
7261 "moderate-to-heavy-snow-ice-pellet-showers": "ûøòýõòðѠúруÿð",
7262 "moderate-to-heavy-snow-showers": "ÑÂøûьýыù ûøòýõòыù ÑÂýõó",
7263 "mostly-clear": "üðûþþñûðчýþ",
7264 "mostly-clear-and-light-rain": "ýõñþûьшþù ôþöôь",
7265 "mostly-clear-and-light-snow": "ýõñþûьшþù ÑÂýõó",
7266 "mostly-clear-possible-thunderstorms-with-rain": "üðûþþñûðчýþ, òþ÷üþöõý ôþöôь, óрþ÷ð",
7267 "mostly-clear-possible-thunderstorms-with-snow": "üðûþþñûðчýþ, òþ÷üþöõý ÑÂýõó, óрþ÷ð",
7268 "mostly-clear-possible-thunderstorms-with-wet-snow": "üðûþþñûðчýþ, òþ÷üþöõý ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7269 "mostly-clear-slight-possibility-of-rain": "ôþöôь",
7270 "mostly-clear-slight-possibility-of-snow": "üðûþþñûðчýþ, ñõ÷ ÑÂущõÑÂтòõýýых þÑÂðôúþò",
7271 "mostly-clear-slight-possibility-of-wet-snow": "üðûþþñûðчýþ, ñõ÷ ÑÂущõÑÂтòõýýых þÑÂðôúþò",
7272 "nearby-precipitation-but-not-falling-at-station": "þÑÂðôúø",
7273 overcast: "ÿðÑÂüурýþ",
7274 "overcast-and-heavy-rain": "ÑÂøûьýыù ôþöôь",
7275 "overcast-and-light-rain": "ýõñþûьшþù ôþöôь",
7276 "overcast-and-light-snow": "ýõñþûьшþù ÑÂýõó",
7277 "overcast-and-light-wet-snow": "þñûðчýþ, ýõñþûьшþù ôþöôь ÑÂþ ÑÂýõóþü",
7278 "overcast-and-rain": "ÑÂøûьýыù ôþöôь",
7279 "overcast-and-showers": "ôþöôь",
7280 "overcast-and-snow": "ÑÂýõóþÿðô",
7281 "overcast-and-snow-showers": "þñûðчýþ, òрõüõýðüø ÑÂýõó",
7282 "overcast-and-wet-snow": "ôþöôь ÑÂþ ÑÂýõóþü",
7283 "overcast-and-wet-snow-showers": "þñûðчýþ, òрõüõýðüø ôþöôь ÑÂþ ÑÂýõóþü",
7284 "overcast-thunderstorms-with-rain": "ÑÂøûьýыù ôþöôь, óрþ÷ð",
7285 "overcast-thunderstorms-with-snow": "þñûðчýþ, ÑÂýõó, óрþ÷ð",
7286 "overcast-thunderstorms-with-wet-snow": "þñûðчýþ, ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7287 "partly-cloudy": "üðûþþñûðчýþ",
7288 "partly-cloudy-and-light-rain": "ýõñþûьшþù ôþöôь",
7289 "partly-cloudy-and-light-snow": "ýõñþûьшþù ÑÂýõó",
7290 "partly-cloudy-and-light-wet-snow": "ÿõрõüõýýðѠþñûðчýþÑÂть, ýõñþûьшþù ôþöôь ÑÂþ ÑÂýõóþü",
7291 "partly-cloudy-and-rain": "ôþöôь",
7292 "partly-cloudy-and-showers": "ÿõрõüõýýðѠþñûðчýþÑÂть, òрõüõýðüø ôþöôь",
7293 "partly-cloudy-and-snow": "ÑÂýõó",
7294 "partly-cloudy-and-snow-showers": "ÿõрõüõýýðѠþñûðчýþÑÂть, òрõüõýðüø ÑÂýõó",
7295 "partly-cloudy-and-wet-snow": "ÿõрõüõýýðѠþñûðчýþÑÂть, ôþöôь ÑÂþ ÑÂýõóþü",
7296 "partly-cloudy-and-wet-snow-showers": "ÿõрõüõýýðѠþñûðчýþÑÂть, òрõüõýðüø ôþöôь ÑÂþ ÑÂýõóþü",
7297 "partly-cloudy-possible-thunderstorms-with-rain": "ÿõрõüõýýðѠþñûðчýþÑÂть, òþ÷üþöõý ôþöôь, óрþ÷ð",
7298 "partly-cloudy-possible-thunderstorms-with-snow": "ÿõрõüõýýðѠþñûðчýþÑÂть, òþ÷üþöõý ÑÂýõó, óрþ÷ð",
7299 "partly-cloudy-possible-thunderstorms-with-wet-snow": "ÿõрõüõýýðѠþñûðчýþÑÂть, òþ÷üþöõý ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7300 "patches-of-fog": "üõÑÂтðüø туüðý",
7301 "patches-of-shallow-fog": "туüðý",
7302 "precipitation-within-sight-but-not-hitting-ground": "þÑÂðôúø",
7303 rain: "ôþöôь",
7304 "rain-and-snow": "ôþöôь ÑÂþ ÑÂýõóþü",
7305 "rain-showers": "ûøòýõòыù ôþöôь",
7306 "severe-duststorm-decreasing-in-intensity": "ÑÂøûьýðѠÿыûьýðѠñурÑÂ",
7307 "severe-duststorm-increasing-in-intensity": "ÑÂøûьýðѠÿыûьýðѠñурÑÂ",
7308 "severe-duststorm-no-change": "ÑÂøûьýðѠÿыûьýðѠñурÑÂ",
7309 "slight-to-moderate-drifting-snow-above-eye-level": "üõтõûь",
7310 "slight-to-moderate-drifting-snow-below-eye-level": "ÿþ÷ёüþú",
7311 "slight-to-moderate-duststorm-decreasing-in-intensity": "ÿыûьýðѠñурÑÂ",
7312 "slight-to-moderate-duststorm-increasing-in-intensity": "ÿыûьýðѠñурÑÂ",
7313 "slight-to-moderate-duststorm-no-change": "ÿыûьýðѠñурÑÂ",
7314 snow: "ÑÂýõó",
7315 "snow-crystals": "þтôõûьýыõ ÑÂýõöøýúø",
7316 "snow-grains": "ÑÂýõöýыõ ÷ёрýð",
7317 "snow-showers": "ûøòýõòыù ÑÂýõó",
7318 "squalls-within-sight-but-no-precipitation-falling-at-station": "шúòðû",
7319 "state-of-sky-unchanged": "üðûþþñûðчýþ",
7320 "thin-high-clouds": "ÿþûуÿрþ÷рðчýðѠþñûðчýþÑÂть",
7321 "thunderstorm-but-no-precipitation-falling-at-station": "óрþ÷ð",
7322 "thunderstorm-in-past-hour-currently-only-light-rain": "ÑÂûðñыù ôþöôь, óрþ÷ð",
7323 "thunderstorm-in-past-hour-currently-only-light-snow-or-rain-snow-mix": "ÑÂûðñыù ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7324 "thunderstorm-in-past-hour-currently-only-moderate-to-heavy-rain": "ÑÂøûьýыù ôþöôь, óрþ÷ð",
7325 "thunderstorm-in-past-hour-currently-only-moderate-to-heavy-snow-or-rain-snow-mix": "ÑÂøûьýыù ôþöôь ÑÂþ ÑÂýõóþü, óрþ÷ð",
7326 thunderstorms: "óрþ÷ð",
7327 "thunderstorms-with-rain": "ÑÂøûьýыù ôþöôь, óрþ÷ð",
7328 "violent-rain-showers": "þчõýь ÑÂøûьýыù ûøòýõòыù ôþöôь",
7329 "visibility-reduced-by-smoke": "ôыü",
7330 "well-developed-dust-or-sand-whirls": "ÿыûьýыõ òøхрø",
7331 "widespread-dust-in-suspension-not-raised-by-wind": "ÿыûь ò òþ÷ôухõ"
7332 }, {
7333 lang: "ru"
7334 }), BEM.I18N.lang("ru"));
7335 var BH = function() {
7336 function t() {
7337 this._lastMatchId = 0, this._matchers = [], this._infiniteLoopDetection = !1, this.lib = {}, this._inited = !1, this._options = {}, this._optJsAttrName = "onclick", this._optJsAttrIsJs = !0, this._optEscapeContent = !1, this.utils = {
7338 _expandoId: (new Date).getTime(),
7339 bh: this,
7340 isSimple: function(t) {
7341 if (!t || t === !0) return !0;
7342 var e = typeof t;
7343 return "string" === e || "number" === e
7344 },
7345 extend: function(t) {
7346 t && "object" == typeof t || (t = {});
7347 for (var e = 1, n = arguments.length; n > e; e++) {
7348 var i, r = arguments[e];
7349 if (r)
7350 for (i in r) t[i] = r[i]
7351 }
7352 return t
7353 },
7354 position: function() {
7355 var t = this.node;
7356 return "content" === t.index ? 1 : t.position
7357 },
7358 isFirst: function() {
7359 var t = this.node;
7360 return "content" === t.index || 1 === t.position
7361 },
7362 isLast: function() {
7363 var t = this.node;
7364 return "content" === t.index || t.position === t.arr._listLength
7365 },
7366 tParam: function(t, e, n) {
7367 var i = "__tp_" + t,
7368 r = this.node;
7369 if (arguments.length > 1) return !n && r.hasOwnProperty(i) || (r[i] = e), this;
7370 for (; r;) {
7371 if (r.hasOwnProperty(i)) return r[i];
7372 r = r.parentNode
7373 }
7374 },
7375 apply: function(t) {
7376 var e = this.ctx,
7377 n = this.node,
7378 i = this.bh.processBemJson(t, e.block);
7379 return this.ctx = e, this.node = n, i
7380 },
7381 applyBase: function() {
7382 var t = this.node,
7383 e = t.json;
7384 !e.elem && e.mods && (e.blockMods = e.mods);
7385 var n = e.block,
7386 i = e.blockMods,
7387 r = this.bh._fastMatcher(this, e);
7388 return void 0 !== r && (this.ctx = t.arr[t.index] = t.json = r, t.blockName = n, t.blockMods = i), this
7389 },
7390 stop: function() {
7391 return this.ctx._stop = !0, this
7392 },
7393 generateId: function() {
7394 return "uniq" + this._expandoId + ++e
7395 },
7396 mod: function(t, e, n) {
7397 var i;
7398 return arguments.length > 1 ? (i = this.ctx.mods || (this.ctx.mods = {}), i[t] = !i.hasOwnProperty(t) || n ? e : i[t], this) : (i = this.ctx.mods, i ? i[t] : void 0)
7399 },
7400 mods: function(t, e) {
7401 var n = this.ctx.mods || (this.ctx.mods = {});
7402 return void 0 !== t ? (this.ctx.mods = e ? this.extend(n, t) : this.extend(t, n), this) : n
7403 },
7404 tag: function(t, e) {
7405 return void 0 !== t ? (this.ctx.tag = void 0 === this.ctx.tag || e ? t : this.ctx.tag, this) : this.ctx.tag
7406 },
7407 mix: function(t, e) {
7408 return void 0 !== t ? (e ? this.ctx.mix = t : this.ctx.mix ? this.ctx.mix = Array.isArray(this.ctx.mix) ? this.ctx.mix.concat(t) : [this.ctx.mix].concat(t) : this.ctx.mix = t, this) : this.ctx.mix
7409 },
7410 attr: function(t, e, n) {
7411 var i;
7412 return arguments.length > 1 ? (i = this.ctx.attrs || (this.ctx.attrs = {}), i[t] = !i.hasOwnProperty(t) || n ? e : i[t], this) : (i = this.ctx.attrs, i ? i[t] : void 0)
7413 },
7414 attrs: function(t, e) {
7415 var n = this.ctx.attrs || {};
7416 return void 0 !== t ? (this.ctx.attrs = e ? this.extend(n, t) : this.extend(t, n), this) : n
7417 },
7418 bem: function(t, e) {
7419 return void 0 !== t ? (this.ctx.bem = void 0 === this.ctx.bem || e ? t : this.ctx.bem, this) : this.ctx.bem
7420 },
7421 js: function(t, e) {
7422 var n = this.ctx;
7423 return void 0 === t ? n.js : (e || void 0 === n.js ? n.js = t : n.js !== !1 && (n.js = this.extend(n.js, t)), this)
7424 },
7425 cls: function(t, e) {
7426 return void 0 !== t ? (this.ctx.cls = void 0 === this.ctx.cls || e ? t : this.ctx.cls, this) : this.ctx.cls
7427 },
7428 param: function(t, e, n) {
7429 return void 0 !== e ? (this.ctx[t] = void 0 === this.ctx[t] || n ? e : this.ctx[t], this) : this.ctx[t]
7430 },
7431 content: function(t, e) {
7432 return arguments.length > 0 ? (this.ctx.content = void 0 === this.ctx.content || e ? t : this.ctx.content, this) : this.ctx.content
7433 },
7434 html: function(t, e) {
7435 return arguments.length > 0 ? (this.ctx.html = void 0 === this.ctx.html || e ? t : this.ctx.html, this) : this.ctx.html
7436 },
7437 json: function() {
7438 return this.ctx
7439 }
7440 }
7441 }
7442 var e = 0;
7443 t.prototype = {
7444 setOptions: function(t) {
7445 var e;
7446 for (e in t) this._options[e] = t[e];
7447 return t.jsAttrName && (this._optJsAttrName = t.jsAttrName), t.jsAttrScheme && (this._optJsAttrIsJs = "js" === t.jsAttrScheme), t.escapeContent && (this._optEscapeContent = t.escapeContent), this
7448 },
7449 getOptions: function() {
7450 return this._options
7451 },
7452 enableInfiniteLoopDetection: function(t) {
7453 return this._infiniteLoopDetection = t, this
7454 },
7455 apply: function(t) {
7456 return this.toHtml(this.processBemJson(t))
7457 },
7458 match: function(t, e) {
7459 if (!t) return this;
7460 if (Array.isArray(t)) return t.forEach(function(n, i) {
7461 this.match(t[i], e)
7462 }, this), this;
7463 if ("object" == typeof t) {
7464 for (var n in t) this.match(n, t[n]);
7465 return this
7466 }
7467 return e.__id = "__func" + this._lastMatchId++, this._matchers.push([t, e]), this._fastMatcher = null, this
7468 },
7469 buildMatcher: function() {
7470 function t(t, e) {
7471 for (var n = {}, i = 0, r = t.length; r > i; i++) {
7472 var s = t[i],
7473 o = s[e] || "__no_value__";
7474 (n[o] || (n[o] = [])).push(s)
7475 }
7476 return n
7477 }
7478 var e, n, i, r, s, o, a, u, c = [],
7479 l = ["bh = this"],
7480 h = this._matchers,
7481 d = [];
7482 for (e = h.length - 1; e >= 0; e--) o = h[e], s = o[0], l.push("_m" + e + " = ms[" + e + "][1]"), r = {
7483 fn: o[1],
7484 index: e
7485 }, ~s.indexOf("__") ? (a = s.split("__"), u = a[0].split("_"), r.block = u[0], u.length > 1 && (r.blockMod = u[1], r.blockModVal = u[2] || !0), a = a[1].split("_"), r.elem = a[0], a.length > 1 && (r.elemMod = a[1], r.elemModVal = a[2] || !0)) : (a = s.split("_"), r.block = a[0], a.length > 1 && (r.blockMod = a[1], r.blockModVal = a[2] || !0)), d.push(r);
7486 var p = t(d, "block");
7487 c.push("var " + l.join(", ") + ";"), c.push("function applyMatchers(ctx, json) {"), c.push("var subRes;"), c.push("switch (json.block) {");
7488 for (var m in p) {
7489 c.push('case "' + m + '":');
7490 var f = t(p[m], "elem");
7491 c.push("switch (json.elem) {");
7492 for (var _ in f) {
7493 "__no_value__" === _ ? c.push("case undefined:") : c.push('case "' + _ + '":');
7494 var b = f[_];
7495 for (n = 0, i = b.length; i > n; n++) {
7496 r = b[n];
7497 var g = r.fn,
7498 y = [];
7499 y.push("!json." + g.__id), r.elemMod && y.push('json.mods && json.mods["' + r.elemMod + '"] === ' + (r.elemModVal === !0 || '"' + r.elemModVal + '"')), r.blockMod && y.push('json.blockMods["' + r.blockMod + '"] === ' + (r.blockModVal === !0 || '"' + r.blockModVal + '"')), c.push("if (" + y.join(" && ") + ") {"), c.push("json." + g.__id + " = true;"), c.push("subRes = _m" + r.index + "(ctx, json);"), c.push('if (subRes !== undefined) { return (subRes || "") }'), c.push("if (json._stop) return;"), c.push("}")
7500 }
7501 c.push("return;")
7502 }
7503 c.push("}"), c.push("return;")
7504 }
7505 return c.push("}"), c.push("};"), c.push("return applyMatchers;"), c.join("\n")
7506 },
7507 processBemJson: function(t, e, n) {
7508 function i() {
7509 this.ctx = null
7510 }
7511 if (null != t) {
7512 this._inited || this._init();
7513 var r, s, o, a, u, c, l, h, d, p, m = [t],
7514 f = [{
7515 json: t,
7516 arr: m,
7517 index: 0,
7518 blockName: e,
7519 blockMods: !t.elem && t.mods || {}
7520 }],
7521 _ = this._fastMatcher || (this._fastMatcher = Function("ms", this.buildMatcher())(this._matchers)),
7522 b = !n,
7523 g = this._infiniteLoopDetection;
7524 i.prototype = this.utils;
7525 for (var y = new i; r = f.shift();) {
7526 if (s = r.json, o = r.blockName, a = r.blockMods, Array.isArray(s)) {
7527 for (u = 0, c = 0, l = s.length; l > u; u++) d = s[u], d !== !1 && null != d && "object" == typeof d && f.push({
7528 json: d,
7529 arr: s,
7530 index: u,
7531 position: ++c,
7532 blockName: o,
7533 blockMods: a,
7534 parentNode: r
7535 });
7536 s._listLength = c
7537 } else {
7538 var v, k = !1;
7539 if (s.elem ? (o = s.block = s.block || o, a = s.blockMods = s.blockMods || a, s.elemMods && (s.mods = s.elemMods)) : s.block && (o = s.block, a = s.blockMods = s.mods || {}), s.block) {
7540 if (g) {
7541 if (s.__processCounter = (s.__processCounter || 0) + 1, _.__processCounter = (_.__processCounter || 0) + 1, s.__processCounter > 100) throw new Error('Infinite json loop detected at "' + s.block + (s.elem ? "__" + s.elem : "") + '".');
7542 if (_.__processCounter > 1e3) throw new Error('Infinite matcher loop detected at "' + s.block + (s.elem ? "__" + s.elem : "") + '".')
7543 }
7544 p = void 0, s._stop || (y.node = r, y.ctx = s, p = _(y, s), void 0 !== p && (s = p, r.json = s, r.blockName = o, r.blockMods = a, f.push(r), k = !0))
7545 }
7546 if (!k && b && (v = s.content))
7547 if (Array.isArray(v)) {
7548 var w;
7549 do {
7550 for (w = !1, u = 0, l = v.length; l > u; u++)
7551 if (Array.isArray(v[u])) {
7552 w = !0;
7553 break
7554 }
7555 w && (s.content = v = v.concat.apply([], v))
7556 } while (w);
7557 for (u = 0, c = 0, l = v.length, h = l - 1; l > u; u++) d = v[u], d !== !1 && null != d && "object" == typeof d && f.push({
7558 json: d,
7559 arr: v,
7560 index: u,
7561 position: ++c,
7562 blockName: o,
7563 blockMods: a,
7564 parentNode: r
7565 });
7566 v._listLength = c
7567 } else f.push({
7568 json: v,
7569 arr: s,
7570 index: "content",
7571 blockName: o,
7572 blockMods: a,
7573 parentNode: r
7574 })
7575 }
7576 r.arr[r.index] = s
7577 }
7578 return m[0]
7579 }
7580 },
7581 toHtml: function(t) {
7582 var e, o, a, u;
7583 if (t === !1 || null == t) return "";
7584 if ("object" != typeof t) return this._optEscapeContent ? i(t) : t;
7585 if (Array.isArray(t)) {
7586 for (e = "", o = 0, a = t.length; a > o; o++) u = t[o], u !== !1 && null != u && (e += this.toHtml(u));
7587 return e
7588 }
7589 var c = t.bem !== !1;
7590 if ("undefined" != typeof t.tag && !t.tag) return t.html || (t.content ? this.toHtml(t.content) : "");
7591 t.mix && !Array.isArray(t.mix) && (t.mix = [t.mix]);
7592 var l, h, d, p = "",
7593 m = "",
7594 f = !1;
7595 if (l = t.attrs)
7596 for (o in l) h = l[o], null !== h && void 0 !== h && (m += " " + o + '="' + r(h) + '"');
7597 if (c) {
7598 var _ = t.block + (t.elem ? "__" + t.elem : "");
7599 t.block && (p = s(t, _), t.js && ((d = {})[_] = t.js === !0 ? {} : t.js));
7600 var b = d && !t.elem,
7601 g = t.mix;
7602 if (g && g.length)
7603 for (o = 0, a = g.length; a > o; o++) {
7604 var y = g[o];
7605 if (y && y.bem !== !1) {
7606 var v = y.block || t.block || "",
7607 k = y.elem || (y.block ? null : t.block && t.elem),
7608 w = v + (k ? "__" + k : "");
7609 v && (p += s(y, w, _), y.js && ((d = d || {})[w] = y.js === !0 ? {} : y.js, f = !0, b || (b = v && !k)))
7610 }
7611 }
7612 if (d) {
7613 b && (p += " i-bem");
7614 var x = f || t.js !== !0 ? r(JSON.stringify(d)) : "{"" + _ + "":{}}";
7615 m += " " + (t.jsAttr || this._optJsAttrName) + '="' + (this._optJsAttrIsJs ? "return " + x : x) + '"'
7616 }
7617 }
7618 t.cls && (p = p ? p + " " + t.cls : t.cls);
7619 var M, E = t.tag || "div";
7620 if (e = "<" + E + (p ? ' class="' + r(p) + '"' : "") + (m ? m : ""), n[E]) e += "/>";
7621 else {
7622 if (e += ">", t.html) e += t.html;
7623 else if (null != (M = t.content))
7624 if (Array.isArray(M))
7625 for (o = 0, a = M.length; a > o; o++) u = M[o], u !== !1 && null != u && (e += this.toHtml(u));
7626 else e += this.toHtml(M);
7627 e += "</" + E + ">"
7628 }
7629 return e
7630 },
7631 _init: function() {
7632 this._inited = !0, "undefined" != typeof BEM && "undefined" != typeof BEM.I18N && (this.lib.i18n = this.lib.i18n || BEM.I18N)
7633 }
7634 }, t.prototype.processBemjson = t.prototype.processBemJson;
7635 var n = {
7636 area: 1,
7637 base: 1,
7638 br: 1,
7639 col: 1,
7640 command: 1,
7641 embed: 1,
7642 hr: 1,
7643 img: 1,
7644 input: 1,
7645 keygen: 1,
7646 link: 1,
7647 menuitem: 1,
7648 meta: 1,
7649 param: 1,
7650 source: 1,
7651 track: 1,
7652 wbr: 1
7653 },
7654 i = t.prototype.xmlEscape = function(t) {
7655 return (t + "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")
7656 },
7657 r = t.prototype.attrEscape = function(t) {
7658 return (t + "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """)
7659 },
7660 s = function(t, e, n) {
7661 var i, r, s, o = "";
7662 if (n !== e && (n && (o += " "), o += e), i = t.mods || t.elem && t.elemMods)
7663 for (s in i) r = i[s], (r || 0 === r) && (o += " " + e + "_" + s + (r === !0 ? "" : "_" + r));
7664 return o
7665 };
7666 return t
7667 }();
7668 "undefined" != typeof module && (module.exports = BH);
7669 var bh = new BH;
7670 if (bh.setOptions({
7671 jsAttrName: "data-bem",
7672 jsAttrScheme: "json"
7673 }), "undefined" == typeof BEMHTML) var BEMHTML = bh;
7674 bh.match("i-jquery", function(t, e) {
7675 return {
7676 block: "b-page",
7677 elem: "js",
7678 nonce: e.nonce || bh.lib.global.nonce,
7679 url: e.url || (e.protocol ? e.protocol + ":" : "") + "//yastatic.net/jquery/" + t.mod("version") + "/jquery.min.js"
7680 }
7681 }), bh.match("b-page__js", function(t, e) {
7682 t.bem(!1).tag("script").attrs({
7683 src: e.url,
7684 nonce: e.nonce || bh.lib.global.nonce
7685 })
7686 });
7687 var lib = bh.lib,
7688 glob = lib.global = bh.utils.extend({
7689 lang: "ru",
7690 tld: "ru",
7691 "content-region": "ru",
7692 "click-host": "//clck.yandex.ru",
7693 "passport-host": "https://passport.yandex.ru",
7694 "pass-host": "https://pass.yandex.ru",
7695 "social-host": "https://social.yandex.ru",
7696 "export-host": "https://export.yandex.ru",
7697 login: "",
7698 "lego-static-host": "//yastatic.net/lego/2.10-142"
7699 }, lib.global);
7700 glob._public = {
7701 id: !0,
7702 lang: !0,
7703 tld: !0,
7704 "content-region": !0,
7705 "user-region": !0,
7706 login: !0,
7707 displayName: !0,
7708 index: !0,
7709 yandexuid: !0,
7710 "passport-host": !0,
7711 "pass-host": !0,
7712 "passport-msg": !0,
7713 "static-host": !0,
7714 "lego-static-host": !0,
7715 "social-host": !0,
7716 clck: !0,
7717 "click-host": !0,
7718 "export-host": !0,
7719 "i-host": !0,
7720 "social-retpath": !0,
7721 "lego-path": !0,
7722 sid: !0,
7723 retpath: !0,
7724 uid: !0
7725 }, glob.makePublic = function(t, e) {
7726 return "object" == typeof t ? void(glob._public = bh.utils.extend({}, glob._public, t)) : ("undefined" == typeof e && (e = !0), void(glob._public[t] = e))
7727 }, glob.isPublic = function(t) {
7728 return Boolean(glob._public[t])
7729 }, glob.setTld = function(t) {
7730 var e = "tr" === t ? "yandex.com.tr" : "yandex." + t,
7731 n = -1 !== ["ua", "by", "kz"].indexOf(t) ? "yandex.ru" : e;
7732 bh.utils.extend(glob, {
7733 tld: t,
7734 "content-region": t,
7735 "click-host": "//clck." + n,
7736 "passport-host": "https://passport." + n,
7737 "pass-host": "https://pass." + e,
7738 "social-host": "https://social." + e,
7739 "export-host": "https://export." + e
7740 })
7741 };
7742 var iGlobalBackup = {
7743 _backup: null,
7744 exists: function() {
7745 return Boolean(this._backup)
7746 },
7747 save: function() {
7748 this._backup = bh.utils.extend({}, glob)
7749 },
7750 restore: function() {
7751 var t;
7752 for (t in glob) delete glob[t];
7753 bh.utils.extend(glob, this._backup)
7754 }
7755 };
7756 bh.match("i-global", function(t, e) {
7757 t.tag("");
7758 var n = lib.global,
7759 i = e.params || {};
7760 iGlobalBackup.exists() ? e.reset !== !1 && iGlobalBackup.restore() : iGlobalBackup.save(), i.tld && i.tld !== n.tld && n.setTld(i.tld), t.extend(n, i)
7761 }), bh.match("i-global", function() {
7762 bh.lib.global.makePublic({
7763 "lego-static-host": !1,
7764 nonce: !0,
7765 host: !0,
7766 "informer-host": !0,
7767 "service-root": !0,
7768 rid: !0,
7769 urid: !0,
7770 slug: !0,
7771 metrikaId: !0,
7772 "my-location": !0,
7773 "β": !0,
7774 Y: !0
7775 }), bh.lib.randomName = function(t, e) {
7776 var n = Math.random() * (e - t) + t;
7777 return Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, n)
7778 }
7779 }), bh.match("i-ua", function(t, e) {
7780 t.bem(!1).tag("script").attr("nonce", e.nonce || bh.lib.global.nonce).content([';(function(d,e,c,r){e=d.documentElement;c="className";r="replace";e[c]=e[c][r]("i-ua_js_no","i-ua_js_yes");if(d.compatMode!="CSS1Compat")e[c]=e[c][r]("i-ua_css_standart","i-ua_css_quirks")})(document);', t.content()], !0)
7781 }), bh.match("i-ua", function(t) {
7782 t.attr("nonce", bh.lib.global.nonce, !0)
7783 }), bh.match("i-ua", function(t) {
7784 t.content([{
7785 tag: !1,
7786 html: [";(function(d,e,c,n,w,v,f){", "e=d.documentElement;", 'c="className";', 'n="createElementNS";', 'f="firstChild";', 'w="http://www.w3.org/2000/svg";', 'e[c]+=" i-ua_svg_"+(!!d[n]&&!!d[n](w,"svg").createSVGRect?"yes":"no");', 'v=d.createElement("div");', 'v.innerHTML="<svg/>";', 'e[c]+=" i-ua_inlinesvg_"+((v[f]&&v[f].namespaceURI)==w?"yes":"no");', "})(document);"].join("")
7787 }, t.content()], !0)
7788 }), bh.match("i-bem__i18n", function(t, e) {
7789 var n = e.keyset,
7790 i = e.key,
7791 r = e.params || {};
7792 return n || i ? (e.content && (r.content = bh.apply(e.content)), {
7793 tag: !1,
7794 html: bh.lib.i18n(n, i, r)
7795 }) : void t.tag(!1)
7796 }), bh.match("user__enter", function(t) {
7797 var e = bh.lib.i18n("user", "enter");
7798 return [{
7799 block: "button",
7800 mods: {
7801 pseudo: "yes",
7802 size: "m"
7803 },
7804 mix: [{
7805 block: "user",
7806 elem: "enter"
7807 }],
7808 attrs: {
7809 tabindex: "-1",
7810 title: e,
7811 "aria-label": e
7812 },
7813 content: [{
7814 block: "image",
7815 mix: [{
7816 block: "button",
7817 elem: "icon",
7818 mods: {
7819 16: "enter"
7820 }
7821 }],
7822 alt: ""
7823 }, {
7824 block: "user",
7825 elem: "enter-label"
7826 }]
7827 }, {
7828 block: "domik",
7829 mods: {
7830 type: "hidden"
7831 }
7832 }]
7833 }), bh.match("user__enter-label", function(t) {
7834 t.tag("span").attr("aria-hidden", !0).content(bh.lib.i18n("user", "enter"))
7835 }), bh.match("image", function(t, e) {
7836 t.tag("img").attrs({
7837 src: e.url || "//yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif",
7838 alt: e.alt || "",
7839 width: e.width,
7840 height: e.height
7841 })
7842 }), bh.match("button", function(t, e) {
7843 var n = e.url;
7844 t.js(!0).tag(n ? "a" : "button").mod("theme", "normal").attrs({
7845 role: "button",
7846 tabindex: e.tabindex
7847 }), n ? t.attrs({
7848 href: n,
7849 target: e.target
7850 }) : t.attrs({
7851 type: e.type || "button",
7852 autocomplete: "off",
7853 name: e.name,
7854 value: e.value
7855 }), t.content({
7856 elem: "text",
7857 tag: "span",
7858 content: t.content()
7859 }, !0)
7860 }), bh.match("button_disabled_yes", function(t, e) {
7861 e.url ? t.attr("aria-disabled", !0) : t.attr("disabled", "disabled")
7862 }), bh.match("button_pseudo_yes", function(t) {
7863 t.mod("theme", "pseudo")
7864 }), bh.match("domik", function(t) {
7865 var e, n;
7866 BEM.blocks ? (n = BEM.blocks["i-global"], e = n.param("lang")) : (n = bh.lib.global, e = n.lang), t.mod("logo", ~["en", "tr"].indexOf(e) ? "en" : "ru").content([{
7867 elem: "roof",
7868 content: [{
7869 elem: "roof-border"
7870 }, {
7871 elem: "roof-body"
7872 }, {
7873 elem: "logo"
7874 }]
7875 }, {
7876 elem: "content",
7877 content: t.content()
7878 }], !0)
7879 }), bh.match(["domik__roof-border", "domik__roof-body", "domik__logo"], function(t) {
7880 t.tag("i")
7881 }), bh.match("domik_type_popup", function(t) {
7882 t.attr("role", "dialog")
7883 }), bh.match("domik_type_hidden", function(t) {
7884 return t.js(!1, !0).tParam("inDomik", !0), {
7885 block: "auth",
7886 mix: {
7887 block: "domik",
7888 mods: {
7889 type: "hidden"
7890 }
7891 },
7892 js: !1,
7893 attrs: {
7894 style: "display:none"
7895 },
7896 content: [{
7897 tag: "input",
7898 attrs: {
7899 name: "login"
7900 }
7901 }, {
7902 tag: "input",
7903 attrs: {
7904 name: "passwd",
7905 type: "password"
7906 }
7907 }]
7908 }
7909 }), bh.match("auth", function(t) {
7910 t.tParam("inDomik") && t.js(!1, !0)
7911 }), bh.match("popup", function(t, e) {
7912 t.mods({
7913 theme: "ffffff",
7914 autoclosable: "yes",
7915 adaptive: "yes",
7916 animate: "yes"
7917 }), e.zIndex && t.attr("style", (t.attr("style") || "") + ";z-index:" + e.zIndex + ";", !0), t.content([{
7918 elem: "under",
7919 mods: e.underMods
7920 }, t.content()], !0)
7921 }), bh.match("auth", function(t, e) {
7922 var n = bh.lib.global,
7923 i = n["passport-host"],
7924 r = n["passport-msg"] ? "&from=" + encodeURIComponent(n["passport-msg"]) : "",
7925 s = n.retpath ? "&retpath=" + encodeURIComponent(n.retpath) : "";
7926 t.js(!0).tag("form").attrs({
7927 method: "POST",
7928 action: e.url || i + "/auth?twoweeks=yes" + r,
7929 role: "form",
7930 "aria-label": bh.lib.i18n("auth", "auth")
7931 }).content([t.content(), {
7932 elem: "retpath"
7933 }], !0).tParam("passportHost", i).tParam("retpath", s).tParam("from", r)
7934 }), bh.match("auth__retpath", function(t) {
7935 t.tag("input").attrs({
7936 type: "hidden",
7937 name: "retpath",
7938 value: t.tParam("retpath")
7939 })
7940 }), bh.match("auth", function(t) {
7941 var e, n, i;
7942 BEM && BEM.blocks ? (i = BEM.blocks["i-global"], e = i.param("passport-host"), n = i.param("passport-msg")) : (i = bh.lib.global, e = i["passport-host"], n = i["passport-msg"]), n = n ? "&from=" + encodeURIComponent(n) : "", t.attr("action", e + "/auth?twoweeks=yes" + n)
7943 }), bh.match("popup__tail", function(t) {
7944 t.tag("i")
7945 }), bh.match("auth", function(t, e) {
7946 t.tParam("hasCustomContent", Boolean(e.content)).content(e.content || [{
7947 elem: "username"
7948 }, {
7949 elem: "password"
7950 }, {
7951 elem: "row",
7952 mods: {
7953 button: "yes"
7954 },
7955 content: [{
7956 elem: "haunter"
7957 }, {
7958 elem: "button"
7959 }]
7960 }, {
7961 elem: "social"
7962 }, {
7963 elem: "row",
7964 content: [{
7965 elem: "remember"
7966 }, {
7967 elem: "register"
7968 }]
7969 }])
7970 }), bh.match("auth__username", function(t) {
7971 t.tParam("hasCustomContent") || t.content({
7972 block: "input",
7973 mods: {
7974 theme: "normal",
7975 size: "m"
7976 },
7977 name: "login",
7978 placeholder: bh.lib.i18n("auth", "login"),
7979 content: [{
7980 elem: "control",
7981 attrs: {
7982 "aria-required": !0
7983 }
7984 }]
7985 })
7986 }), bh.match("auth__password", function(t) {
7987 t.tParam("hasCustomContent") || t.content({
7988 block: "input",
7989 mods: {
7990 theme: "normal",
7991 size: "m"
7992 },
7993 name: "passwd",
7994 placeholder: bh.lib.i18n("auth", "password"),
7995 content: [{
7996 elem: "control",
7997 attrs: {
7998 type: "password",
7999 maxlength: 256,
8000 "aria-required": !0
8001 }
8002 }]
8003 })
8004 }), bh.match("auth__haunter", function(t) {
8005 t.tParam("hasCustomContent") || t.content({
8006 block: "checkbox",
8007 mods: {
8008 theme: "normal",
8009 size: "m"
8010 },
8011 checkboxAttrs: {
8012 id: "auth-haunter",
8013 autocomplete: "off",
8014 name: "twoweeks",
8015 value: "no"
8016 },
8017 content: {
8018 elem: "label",
8019 content: bh.lib.i18n("auth", "temporary")
8020 }
8021 })
8022 }), bh.match("auth__button", function(t) {
8023 t.tParam("hasCustomContent") || t.content({
8024 block: "button",
8025 type: "submit",
8026 mods: {
8027 theme: "action",
8028 size: "m"
8029 },
8030 content: bh.lib.i18n("auth", "logon")
8031 })
8032 }), bh.match("auth__remember", function(t, e) {
8033 if (!t.tParam("hasCustomContent")) {
8034 var n = e.url || [t.tParam("passportHost"), "/passport?mode=restore", t.tParam("from"), t.tParam("retpath")].join("");
8035 t.content({
8036 block: "button",
8037 mods: {
8038 theme: "pseudo",
8039 size: "s"
8040 },
8041 url: n,
8042 content: bh.lib.i18n("auth", "remember")
8043 })
8044 }
8045 }), bh.match("auth__register", function(t, e) {
8046 if (!t.tParam("hasCustomContent")) {
8047 var n = e.url || [t.tParam("passportHost"), "/passport?mode=register", t.tParam("from"), t.tParam("retpath")].join("");
8048 t.content({
8049 block: "button",
8050 mods: {
8051 theme: "pseudo",
8052 size: "s"
8053 },
8054 url: n,
8055 content: bh.lib.i18n("auth", "register")
8056 })
8057 }
8058 }), bh.match("auth__social", function(t) {
8059 t.attrs({
8060 role: "group",
8061 "aria-label": bh.lib.i18n("auth", "social-log-in")
8062 })
8063 }), bh.match("auth__social-icon", function(t) {
8064 t.tag("i")
8065 }), bh.match("auth__social-link", function(t, e) {
8066 var n = e.title;
8067 t.tag("a").attrs({
8068 role: "button",
8069 tabindex: 0,
8070 title: n,
8071 "aria-label": n
8072 })
8073 }), bh.match("dropdown", function(t) {
8074 t.js(!0).mod("action", "closed")
8075 }), bh.match("dropdown__popup", function(t, e) {
8076 return t.mix({
8077 block: "dropdown",
8078 elem: "popup"
8079 }), {
8080 block: "popup",
8081 mix: e.mix,
8082 mods: e.mods,
8083 underMods: e.underMods,
8084 attrs: e.attrs,
8085 js: e.js,
8086 content: [{
8087 elem: "tail"
8088 }, {
8089 elem: "content",
8090 content: e.content
8091 }]
8092 }
8093 }), bh.match("i-ua", function(t) {
8094 t.content([";(function(d,e,p){", "e=d.documentElement;", 'p="placeholder";', 'e.className+=" i-ua_"+p+(p in d.createElement("input")?"_yes":"_no")', "})(document);", t.content()], !0)
8095 }), bh.match("input", function(t, e) {
8096 var n = t.js() || {},
8097 i = !1,
8098 r = t.mods(),
8099 s = {
8100 autofocus: "yes",
8101 width: "content",
8102 "tap-ahead": "yes"
8103 };
8104 if (n.autoFocus && n.live) throw new Error('input block can\'t have both "live" and "autoFocus" enabled');
8105 n.hasOwnProperty("live") && (i = n.live), (Object.keys(s).some(function(t) {
8106 return r[t] === s[t]
8107 }) || n.autoFocus) && (i = !1), n.live = i;
8108 var o = e.value;
8109 t.isSimple(o) || (o = bh.apply(o));
8110 var a;
8111 e.hasOwnProperty("placeholder") && (a = e.placeholder, t.isSimple(a) || (a = bh.apply(a)));
8112 var u = e.id || t.generateId();
8113 t.tag("span").js(n).mod("theme", "normal").tParam("inputId", u).tParam("labelId", "label" + u).tParam("hintId", "hint" + u).tParam("name", e.name || "").tParam("value", o).tParam("inputLink", !0).tParam("placeholder", a).tParam("live", n.live).tParam("disabled", r.disabled).tParam("hasClear", "no" !== r.clear)
8114 }), bh.match("input__box", function(t) {
8115 if (t.tag("span"), t.tParam("hasClear")) {
8116 var e = t.tParam("value");
8117 t.content([t.content(), {
8118 elem: "clear",
8119 elemMods: e || 0 === e ? {
8120 visibility: "visible"
8121 } : void 0,
8122 content: "Â "
8123 }], !0)
8124 }
8125 }), bh.match("input__control", function(t, e) {
8126 var n = t.tParam("value"),
8127 i = t.tParam("placeholder");
8128 return t.tag("input").attrs(t.extend({
8129 id: t.tParam("inputId"),
8130 name: t.tParam("name"),
8131 placeholder: i,
8132 "aria-labelledby": t.tParam("labelId") + " " + t.tParam("hintId")
8133 }, e.controlAttrs)), t.tParam("disabled") && t.attr("disabled", "disabled"), (n || 0 === n) && t.attr("value", n), t.tParam("live") && t.attr("autocomplete", "off"), [i ? {
8134 elem: "hint",
8135 elemMods: {
8136 fallback: "yes"
8137 },
8138 content: i
8139 } : "", {
8140 elem: "box",
8141 content: t.json()
8142 }]
8143 }), bh.match("input__clear", function(t) {
8144 t.tag("span").attr("unselectable", "on")
8145 }), bh.match("input__hint", function(t) {
8146 var e = t.tParam("value");
8147 t.tag("label").attrs({
8148 id: t.tParam("hintId"),
8149 "for": t.tParam("inputId"),
8150 "aria-hidden": !0
8151 }), e || 0 === e || t.mod("visibility", "visible")
8152 }), bh.match("checkbox", function(t, e) {
8153 var n = t.extend({
8154 id: t.generateId()
8155 }, e.checkboxAttrs),
8156 i = t.extend({
8157 live: !1
8158 }, t.js());
8159 t.mod("disabled") && (n.disabled = "disabled"), t.mod("checked") && (n.checked = "checked"), t.tag("span").js(i).mod("theme", "normal").tParam("checkboxAttrs", n).tParam("labelId", "label" + n.id).content([{
8160 elem: "box",
8161 tag: "span",
8162 elemMods: {
8163 checked: t.mod("checked")
8164 },
8165 content: [{
8166 elem: "control"
8167 }, {
8168 elem: "tick",
8169 tag: "i"
8170 }]
8171 }, t.content()], !0)
8172 }), bh.match("checkbox__control", function(t) {
8173 t.tag("input").attrs(t.extend({
8174 type: "checkbox",
8175 autocomplete: "off",
8176 "aria-labelledby": t.tParam("labelId")
8177 }, t.tParam("checkboxAttrs")))
8178 }), bh.match("checkbox__label", function(t) {
8179 t.tag("label").attrs({
8180 "for": t.tParam("checkboxAttrs").id,
8181 id: t.tParam("labelId"),
8182 "aria-hidden": !0
8183 })
8184 }), bh.match("user", function(t, e) {
8185 var n = bh.lib.global,
8186 i = e.login || n.login,
8187 r = i && /^uid-/.test(i),
8188 s = e.counter || (e.counters || {}).user,
8189 o = (t.js() || {}).uid || e.uid || n.uid,
8190 a = i || (n.displayName || {}).name;
8191 t.tag("a").js({
8192 uid: o,
8193 login: i
8194 }).attr("href", r ? n["social-host"] : n["passport-host"] + "/passport?mode=passport").content(a ? [e.content] : {
8195 elem: "enter"
8196 }, !0).tParam("login", e.login).tParam("uid", o), s && t.attr("onmousedown", s)
8197 });
8198 var common = bh.lib.common = bh.lib.common || {},
8199 string = common.string = common.string || {};
8200 string.cleverSubstring = function(t, e, n) {
8201 return t.length > e + n ? t.substring(0, e - 1) + "…" : t
8202 }, bh.match("user__name", function(t, e) {
8203 var n, i, r, s = bh.lib.global,
8204 o = e.content || e.login || t.tParam("login") || (s.displayName || {}).name,
8205 a = !1;
8206 o || (/^uid-/.test(s.login) ? (o = "", a = !0) : o = s.login), n = e.hasOwnProperty("maxLength") ? e.maxLength : 16, i = e.hasOwnProperty("maxLengthRelative") ? e.maxLengthRelative : 3, r = bh.xmlEscape(bh.lib.common.string.cleverSubstring(o, n, i)), t.tag("span").js({
8207 maxLength: n,
8208 maxLengthRelative: i,
8209 isUglyUserName: a
8210 }).content([{
8211 elem: "first-letter",
8212 tag: "span",
8213 content: r.charAt(0)
8214 }, r.slice(1)], !0)
8215 }), bh.match("user__icon", function(t, e) {
8216 t.tParam("host", "//avatars.mds.yandex.net");
8217 var n = t.tParam("host"),
8218 i = e.avatarId || (bh.lib.global.displayName || {}).default_avatar,
8219 r = [n, "/get-yapic/", i, "/islands-", t.tParam("iconSize"), "?rnd=", +new Date].join("");
8220 t.tag("span").js({
8221 avatarId: i
8222 }).attr("style", "background-image: url(" + r + ");")
8223 }), bh.match("user__icon", function(t) {
8224 t.tParam("iconSize", "middle")
8225 }), bh.lib.services = {
8226 _uri: {},
8227 serviceUrl: function(t, e) {
8228 var n = bh.lib.global;
8229 return t || (t = n.id), e || (e = n["content-region"]), this._uri[t](e)
8230 },
8231 serviceName: function(t) {
8232 var e = bh.lib.global;
8233 return bh.lib.i18n("i-services", t || e.id)
8234 }
8235 }, bh.match("i-services__name", function(t, e) {
8236 return bh.lib.services.serviceName(e.id)
8237 }), bh.match("i-services__url", function(t, e) {
8238 return bh.lib.services.serviceUrl(e.id, e.region)
8239 }), bh.lib.services._uri = {
8240 404: function(t) {
8241 switch (t) {
8242 case "ru":
8243 return "http://404.yandex.ru";
8244 case "ua":
8245 return "http://404.yandex.ua";
8246 case "by":
8247 return "http://404.yandex.by";
8248 case "kz":
8249 return "http://404.yandex.kz";
8250 case "com":
8251 return "http://404.yandex.com";
8252 case "tr":
8253 return "http://404.yandex.com.tr";
8254 default:
8255 return "http://404.yandex.ru"
8256 }
8257 },
8258 adresa: function() {
8259 return "http://adresa.yandex.ru"
8260 },
8261 advertising: function(t) {
8262 switch (t) {
8263 case "ru":
8264 return "https://advertising.yandex.ru";
8265 case "ua":
8266 return "https://advertising.yandex.ua";
8267 case "by":
8268 return "https://advertising.yandex.by";
8269 case "kz":
8270 return "https://advertising.yandex.kz";
8271 case "com":
8272 return "https://advertising.yandex.com";
8273 default:
8274 return "https://advertising.yandex.ru"
8275 }
8276 },
8277 afisha: function(t) {
8278 switch (t) {
8279 case "ru":
8280 return "https://afisha.yandex.ru";
8281 case "ua":
8282 return "https://afisha.yandex.ua";
8283 case "by":
8284 return "https://afisha.yandex.by";
8285 case "kz":
8286 return "https://afisha.yandex.kz";
8287 default:
8288 return "https://afisha.yandex.ru"
8289 }
8290 },
8291 all: function(t) {
8292 switch (t) {
8293 case "ru":
8294 return "//www.yandex.ru/all";
8295 case "ua":
8296 return "//www.yandex.ua/all";
8297 case "by":
8298 return "//www.yandex.by/all";
8299 case "kz":
8300 return "//www.yandex.kz/all";
8301 case "com":
8302 return "//www.yandex.com/all";
8303 case "tr":
8304 return "//www.yandex.com.tr/all";
8305 default:
8306 return "//www.yandex.ru/all"
8307 }
8308 },
8309 api: function(t) {
8310 switch (t) {
8311 case "ru":
8312 return "http://api.yandex.ru";
8313 case "com":
8314 return "http://api.yandex.com";
8315 default:
8316 return "http://api.yandex.ru"
8317 }
8318 },
8319 appsearch: function() {
8320 return "//appsearch.yandex.ru"
8321 },
8322 auto: function(t) {
8323 switch (t) {
8324 case "ru":
8325 return "https://auto.yandex.ru";
8326 case "ua":
8327 return "https://auto.yandex.ua";
8328 default:
8329 return "https://auto.yandex.ru"
8330 }
8331 },
8332 avia: function(t) {
8333 switch (t) {
8334 case "ru":
8335 return "https://avia.yandex.ru";
8336 case "ua":
8337 return "https://avia.yandex.ua";
8338 default:
8339 return "https://avia.yandex.ru"
8340 }
8341 },
8342 aziada: function() {
8343 return "http://aziada2011.yandex.kz"
8344 },
8345 ba: function(t) {
8346 switch (t) {
8347 case "ru":
8348 return "https://ba.yandex.ru";
8349 case "ua":
8350 return "https://ba.yandex.ua";
8351 case "by":
8352 return "https://ba.yandex.by";
8353 case "kz":
8354 return "https://ba.yandex.kz";
8355 case "com":
8356 return "https://ba.yandex.com";
8357 default:
8358 return "https://ba.yandex.ru"
8359 }
8360 },
8361 backapv: function() {
8362 return "http://backapv.yandex.ru"
8363 },
8364 balance: function() {
8365 return "https://balance.yandex.ru"
8366 },
8367 bar: function(t) {
8368 switch (t) {
8369 case "ru":
8370 return "http://bar.yandex.ru";
8371 case "ua":
8372 return "http://bar.yandex.ua";
8373 case "by":
8374 return "http://bar.yandex.by";
8375 case "kz":
8376 return "http://bar.yandex.kz";
8377 case "tr":
8378 return "http://bar.yandex.com.tr";
8379 default:
8380 return "http://bar.yandex.ru"
8381 }
8382 },
8383 "bar-ie": function(t) {
8384 switch (t) {
8385 case "ru":
8386 return "http://bar.yandex.ru/ie";
8387 case "ua":
8388 return "http://bar.yandex.ua/ie";
8389 case "by":
8390 return "http://bar.yandex.by/ie";
8391 case "kz":
8392 return "http://bar.yandex.kz/ie";
8393 case "com":
8394 return "http://bar.yandex.com/ie";
8395 case "tr":
8396 return "http://bar.yandex.com.tr/ie";
8397 default:
8398 return "http://bar.yandex.ru/ie"
8399 }
8400 },
8401 "bar-ie9": function(t) {
8402 switch (t) {
8403 case "ru":
8404 return "http://bar.yandex.ru/ie";
8405 case "ua":
8406 return "http://bar.yandex.ua/ie";
8407 case "by":
8408 return "http://bar.yandex.by/ie";
8409 case "kz":
8410 return "http://bar.yandex.kz/ie";
8411 case "com":
8412 return "http://bar.yandex.com/ie";
8413 case "tr":
8414 return "http://bar.yandex.com.tr/ie";
8415 default:
8416 return "http://bar.yandex.ru/ie"
8417 }
8418 },
8419 bayan: function() {
8420 return "http://bayan.yandex.ru"
8421 },
8422 blogs: function(t) {
8423 switch (t) {
8424 case "ru":
8425 return "https://blogs.yandex.ru";
8426 case "ua":
8427 return "https://blogs.yandex.ua";
8428 case "by":
8429 return "https://blogs.yandex.by";
8430 case "kz":
8431 return "https://blogs.yandex.kz";
8432 default:
8433 return "https://blogs.yandex.ru"
8434 }
8435 },
8436 books: function() {
8437 return "http://books.yandex.ru"
8438 },
8439 browser: function(t) {
8440 switch (t) {
8441 case "ru":
8442 return "https://browser.yandex.ru";
8443 case "ua":
8444 return "https://browser.yandex.ua";
8445 case "by":
8446 return "https://browser.yandex.by";
8447 case "kz":
8448 return "https://browser.yandex.kz";
8449 case "com":
8450 return "https://browser.yandex.com";
8451 case "tr":
8452 return "https://browser.yandex.com.tr";
8453 default:
8454 return "https://browser.yandex.ru"
8455 }
8456 },
8457 calendar: function() {
8458 return "https://calendar.yandex.ru"
8459 },
8460 catalogwdgt: function() {
8461 return "https://www.yandex.ru/catalog"
8462 },
8463 chrome: function() {
8464 return "http://chrome.yandex.ru"
8465 },
8466 city: function(t) {
8467 switch (t) {
8468 case "ru":
8469 return "https://gorod.yandex.ru";
8470 case "ua":
8471 return "https://gorod.yandex.ua";
8472 case "by":
8473 return "https://gorod.yandex.by";
8474 case "kz":
8475 return "https://gorod.yandex.kz";
8476 case "com":
8477 return "https://city.yandex.com";
8478 case "tr":
8479 return "https://city.yandex.com.tr";
8480 default:
8481 return "https://gorod.yandex.ru"
8482 }
8483 },
8484 cityday: function() {
8485 return "http://cityday.yandex.ru"
8486 },
8487 collection: function() {
8488 return "https://collection.yandex.ru"
8489 },
8490 company: function(t) {
8491 switch (t) {
8492 case "ru":
8493 return "https://company.yandex.ru";
8494 case "com":
8495 return "https://company.yandex.com";
8496 case "tr":
8497 return "https://company.yandex.com.tr";
8498 default:
8499 return "https://company.yandex.ru"
8500 }
8501 },
8502 contest: function(t) {
8503 switch (t) {
8504 case "ru":
8505 return "https://contest.yandex.ru";
8506 case "com":
8507 return "https://contest.yandex.com";
8508 default:
8509 return "https://contest.yandex.ru"
8510 }
8511 },
8512 desktop: function() {
8513 return "http://desktop.yandex.ru"
8514 },
8515 direct: function(t) {
8516 switch (t) {
8517 case "ru":
8518 return "https://direct.yandex.ru";
8519 case "ua":
8520 return "https://direct.yandex.ua";
8521 case "by":
8522 return "https://direct.yandex.by";
8523 case "kz":
8524 return "https://direct.yandex.kz";
8525 case "com":
8526 return "https://direct.yandex.com";
8527 default:
8528 return "https://direct.yandex.ru"
8529 }
8530 },
8531 "direct.market": function() {
8532 return "https://partner.market.yandex.ru/yandex.market/"
8533 },
8534 disk: function(t) {
8535 switch (t) {
8536 case "ru":
8537 return "https://disk.yandex.ru";
8538 case "ua":
8539 return "https://disk.yandex.ua";
8540 case "by":
8541 return "https://disk.yandex.by";
8542 case "kz":
8543 return "https://disk.yandex.kz";
8544 case "com":
8545 return "https://disk.yandex.com";
8546 case "tr":
8547 return "https://disk.yandex.com.tr";
8548 default:
8549 return "https://disk.yandex.ru"
8550 }
8551 },
8552 display: function(t) {
8553 switch (t) {
8554 case "tr":
8555 return "https://display.yandex.com.tr";
8556 default:
8557 return "https://display.yandex.ru"
8558 }
8559 },
8560 ege: function() {
8561 return "https://ege.yandex.ru"
8562 },
8563 expert: function() {
8564 return "http://expert.yandex.ru"
8565 },
8566 feedback: function(t) {
8567 switch (t) {
8568 case "ru":
8569 return "http://feedback.yandex.ru";
8570 case "ua":
8571 return "http://feedback.yandex.ua";
8572 case "by":
8573 return "http://feedback.yandex.by";
8574 case "kz":
8575 return "http://feedback.yandex.kz";
8576 case "com":
8577 return "http://feedback.yandex.com";
8578 case "tr":
8579 return "http://contact.yandex.com.tr";
8580 default:
8581 return "http://feedback.yandex.ru"
8582 }
8583 },
8584 feedback2: function(t) {
8585 switch (t) {
8586 case "ru":
8587 return "//feedback2.yandex.ru";
8588 case "ua":
8589 return "//feedback2.yandex.ua";
8590 case "by":
8591 return "//feedback2.yandex.by";
8592 case "kz":
8593 return "//feedback2.yandex.kz";
8594 case "com":
8595 return "//feedback2.yandex.com";
8596 case "tr":
8597 return "//contact2.yandex.com.tr";
8598 default:
8599 return "//feedback2.yandex.ru"
8600 }
8601 },
8602 ff: function() {
8603 return "http://ff.yandex.ru"
8604 },
8605 fotki: function() {
8606 return "https://fotki.yandex.ru"
8607 },
8608 fresh: function(t) {
8609 switch (t) {
8610 case "ru":
8611 return "https://yandex.ru";
8612 case "ua":
8613 return "https://yandex.ua";
8614 case "by":
8615 return "https://yandex.by";
8616 case "kz":
8617 return "https://yandex.kz";
8618 case "com":
8619 return "https://www.yandex.com";
8620 case "tr":
8621 return "https://www.yandex.com.tr";
8622 default:
8623 return "https://yandex.ru"
8624 }
8625 },
8626 fx: function(t) {
8627 switch (t) {
8628 case "ru":
8629 return "https://fx.yandex.ru";
8630 case "ua":
8631 return "https://fx.yandex.ua";
8632 case "tr":
8633 return "https://fx.yandex.com.tr";
8634 default:
8635 return "https://fx.yandex.ru"
8636 }
8637 },
8638 games: function() {
8639 return "http://games.yandex.ru"
8640 },
8641 geocontext: function() {
8642 return "https://geocontext.yandex.ru"
8643 },
8644 goroda: function() {
8645 return "http://goroda.yandex.ru"
8646 },
8647 help: function(t) {
8648 switch (t) {
8649 case "ru":
8650 return "https://help.yandex.ru";
8651 case "ua":
8652 return "https://help.yandex.ua";
8653 case "com":
8654 return "https://help.yandex.com";
8655 case "tr":
8656 return "https://yardim.yandex.com.tr";
8657 default:
8658 return "https://help.yandex.ru"
8659 }
8660 },
8661 i: function() {
8662 return "http://i.yandex.ru"
8663 },
8664 ie: function(t) {
8665 switch (t) {
8666 case "ru":
8667 return "https://ie.yandex.ru";
8668 case "ua":
8669 return "https://ie.yandex.ua";
8670 case "tr":
8671 return "https://ie.yandex.com.tr";
8672 default:
8673 return "https://ie.yandex.ru"
8674 }
8675 },
8676 images: function(t) {
8677 switch (t) {
8678 case "ru":
8679 return "https://yandex.ru/images/";
8680 case "ua":
8681 return "https://yandex.ua/images/";
8682 case "by":
8683 return "https://yandex.by/images/";
8684 case "kz":
8685 return "https://yandex.kz/images/";
8686 case "com":
8687 return "https://yandex.com/images/";
8688 case "tr":
8689 return "https://yandex.com.tr/gorsel/";
8690 default:
8691 return "https://yandex.ru/images/"
8692 }
8693 },
8694 "images-com": function() {
8695 return "https://yandex.com/images/"
8696 },
8697 interests: function() {
8698 return "http://interests.yandex.ru"
8699 },
8700 internet: function(t) {
8701 switch (t) {
8702 case "ru":
8703 return "//internet.yandex.ru";
8704 case "com":
8705 return "//internet.yandex.com";
8706 case "tr":
8707 return "//internet.yandex.com.tr";
8708 default:
8709 return "//internet.yandex.ru"
8710 }
8711 },
8712 kassa: function(t) {
8713 switch (t) {
8714 case "ru":
8715 return "https://money.yandex.ru/start";
8716 default:
8717 return "https://money.yandex.ru/start/"
8718 }
8719 },
8720 keyboard: function() {
8721 return "http://www.yandex.ru/index_engl_qwerty.html"
8722 },
8723 kraski: function() {
8724 return "http://kraski.yandex.ru"
8725 },
8726 kuda: function() {
8727 return "http://kuda.yandex.ru"
8728 },
8729 large: function() {
8730 return "http://large.yandex.ru"
8731 },
8732 legal: function(t) {
8733 switch (t) {
8734 case "ru":
8735 return "https://legal.yandex.ru";
8736 case "ua":
8737 return "https://legal.yandex.ua";
8738 case "com":
8739 return "https://legal.yandex.com";
8740 case "tr":
8741 return "https://legal.yandex.com.tr";
8742 default:
8743 return "https://legal.yandex.ru"
8744 }
8745 },
8746 lenta: function() {
8747 return "http://lenta.yandex.ru"
8748 },
8749 literacy: function() {
8750 return "https://literacy.yandex.ru"
8751 },
8752 local: function() {
8753 return "http://local.yandex.ru"
8754 },
8755 lost: function() {
8756 return "http://lost.yandex.ru"
8757 },
8758 love: function() {
8759 return "http://love.yandex.ru"
8760 },
8761 mail: function(t) {
8762 switch (t) {
8763 case "ru":
8764 return "https://mail.yandex.ru";
8765 case "ua":
8766 return "https://mail.yandex.ua";
8767 case "by":
8768 return "https://mail.yandex.by";
8769 case "kz":
8770 return "https://mail.yandex.kz";
8771 case "com":
8772 return "https://mail.yandex.com";
8773 case "tr":
8774 return "https://mail.yandex.com.tr";
8775 default:
8776 return "https://mail.yandex.ru"
8777 }
8778 },
8779 maps: function(t) {
8780 switch (t) {
8781 case "ru":
8782 return "https://maps.yandex.ru";
8783 case "ua":
8784 return "https://maps.yandex.ua";
8785 case "com":
8786 return "https://maps.yandex.com";
8787 case "tr":
8788 return "https://harita.yandex.com.tr";
8789 default:
8790 return "https://maps.yandex.ru"
8791 }
8792 },
8793 "maps-com": function() {
8794 return "https://maps.yandex.com"
8795 },
8796 "maps-wiki": function() {
8797 return "http://nk.yandex.ru"
8798 },
8799 market: function(t) {
8800 switch (t) {
8801 case "ru":
8802 return "https://market.yandex.ru";
8803 case "ua":
8804 return "https://market.yandex.ua";
8805 case "by":
8806 return "https://market.yandex.by";
8807 case "kz":
8808 return "https://market.yandex.kz";
8809 case "tr":
8810 return "https://market.yandex.com.tr";
8811 default:
8812 return "https://market.yandex.ru"
8813 }
8814 },
8815 "market.advertising": function() {
8816 return "https://welcome.advertising.yandex.ru/market/"
8817 },
8818 master: function() {
8819 return "https://master.yandex.ru"
8820 },
8821 metrika: function(t) {
8822 switch (t) {
8823 case "ru":
8824 return "https://metrika.yandex.ru";
8825 case "ua":
8826 return "https://metrika.yandex.ua";
8827 case "by":
8828 return "https://metrika.yandex.by";
8829 case "kz":
8830 return "https://metrika.yandex.kz";
8831 case "com":
8832 return "https://metrica.yandex.com";
8833 case "tr":
8834 return "https://metrica.yandex.com.tr";
8835 default:
8836 return "https://metrika.yandex.ru"
8837 }
8838 },
8839 metro: function() {
8840 return "https://metro.yandex.ru"
8841 },
8842 mobile: function(t) {
8843 switch (t) {
8844 case "ru":
8845 return "https://mobile.yandex.ru";
8846 case "ua":
8847 return "https://mobile.yandex.ua";
8848 case "tr":
8849 return "https://mobil.yandex.com.tr";
8850 default:
8851 return "https://mobile.yandex.ru"
8852 }
8853 },
8854 moikrug: function() {
8855 return "http://moikrug.ru"
8856 },
8857 money: function() {
8858 return "https://money.yandex.ru"
8859 },
8860 museums: function() {
8861 return "http://18.yandex.ru"
8862 },
8863 music: function(t) {
8864 switch (t) {
8865 case "ru":
8866 return "https://music.yandex.ru";
8867 case "ua":
8868 return "https://music.yandex.ua";
8869 case "by":
8870 return "https://music.yandex.by";
8871 case "kz":
8872 return "https://music.yandex.kz";
8873 default:
8874 return "https://music.yandex.ru"
8875 }
8876 },
8877 "music-partner": function() {
8878 return "http://music-partner.yandex.ru"
8879 },
8880 nahodki: function(t) {
8881 switch (t) {
8882 case "ru":
8883 return "https://nahodki.yandex.ru";
8884 case "ua":
8885 return "https://nahodki.yandex.ua";
8886 case "kz":
8887 return "https://nahodki.yandex.kz";
8888 default:
8889 return "https://nahodki.yandex.ru"
8890 }
8891 },
8892 nano: function() {
8893 return "http://nano.yandex.ru"
8894 },
8895 news: function(t) {
8896 switch (t) {
8897 case "ru":
8898 return "https://news.yandex.ru";
8899 case "ua":
8900 return "https://news.yandex.ua";
8901 case "by":
8902 return "https://news.yandex.by";
8903 case "kz":
8904 return "https://news.yandex.kz";
8905 case "tr":
8906 return "https://haber.yandex.com.tr";
8907 default:
8908 return "https://news.yandex.ru"
8909 }
8910 },
8911 "news-com": function() {
8912 return "https://news.yandex.com"
8913 },
8914 notifications: function(t) {
8915 switch (t) {
8916 case "ru":
8917 return "https://notifications.yandex.ru";
8918 case "ua":
8919 return "https://notifications.yandex.ua";
8920 case "by":
8921 return "https://notifications.yandex.by";
8922 case "kz":
8923 return "https://notifications.yandex.kz";
8924 case "com":
8925 return "https://notifications.yandex.com";
8926 case "tr":
8927 return "https://notifications.yandex.com.tr";
8928 default:
8929 return "https://notifications.yandex.ru"
8930 }
8931 },
8932 oauth: function(t) {
8933 switch (t) {
8934 case "ru":
8935 return "https://oauth.yandex.ru";
8936 case "com":
8937 return "https://oauth.yandex.com";
8938 default:
8939 return "https://oauth.yandex.ru"
8940 }
8941 },
8942 online: function() {
8943 return "http://online.yandex.ru"
8944 },
8945 openid: function() {
8946 return "http://openid.yandex.ru"
8947 },
8948 opera: function(t) {
8949 switch (t) {
8950 case "ru":
8951 return "https://opera.yandex.ru";
8952 case "tr":
8953 return "https://opera.yandex.com.tr";
8954 default:
8955 return "https://opera.yandex.ru"
8956 }
8957 },
8958 opinion: function() {
8959 return "http://opinion.yandex.ru"
8960 },
8961 partners: function(t) {
8962 switch (t) {
8963 case "ru":
8964 return "http://partner.yandex.ru";
8965 case "ua":
8966 return "http://partner.yandex.ua";
8967 case "by":
8968 return "http://partner.yandex.by";
8969 case "kz":
8970 return "http://partner.yandex.kz";
8971 case "com":
8972 return "http://partner.yandex.com";
8973 default:
8974 return "http://partner.yandex.ru"
8975 }
8976 },
8977 partnersearch: function() {
8978 return "http://yandex.ru"
8979 },
8980 passport: function(t) {
8981 switch (t) {
8982 case "ru":
8983 return "https://passport.yandex.ru";
8984 case "com":
8985 return "https://passport.yandex.com";
8986 case "tr":
8987 return "https://passport.yandex.com.tr";
8988 default:
8989 return "https://passport.yandex.ru"
8990 }
8991 },
8992 pdd: function() {
8993 return "https://pdd.yandex.ru"
8994 },
8995 peoplesearch: function(t) {
8996 switch (t) {
8997 case "ru":
8998 return "http://people.yandex.ru";
8999 case "ua":
9000 return "http://people.yandex.ua";
9001 default:
9002 return "http://people.yandex.ru"
9003 }
9004 },
9005 perevod: function() {
9006 return "https://perevod.yandex.ru"
9007 },
9008 probki: function(t) {
9009 switch (t) {
9010 case "ru":
9011 return "http://probki.yandex.ru";
9012 case "ua":
9013 return "http://probki.yandex.ua";
9014 default:
9015 return "http://probki.yandex.ru"
9016 }
9017 },
9018 pulse: function(t) {
9019 switch (t) {
9020 case "ru":
9021 return "http://blogs.yandex.ru/pulse";
9022 case "ua":
9023 return "http://blogs.yandex.ua/pulse";
9024 case "by":
9025 return "http://blogs.yandex.by/pulse";
9026 case "kz":
9027 return "http://blogs.yandex.kz/pulse";
9028 default:
9029 return "http://blogs.yandex.ru/pulse"
9030 }
9031 },
9032 punto: function() {
9033 return "https://punto.yandex.ru"
9034 },
9035 pvo: function() {
9036 return "http://ask.yandex.ru"
9037 },
9038 rabota: function(t) {
9039 switch (t) {
9040 case "ru":
9041 return "https://rabota.yandex.ru";
9042 case "ua":
9043 return "https://rabota.yandex.ua";
9044 case "by":
9045 return "https://rabota.yandex.by";
9046 case "kz":
9047 return "https://rabota.yandex.kz";
9048 default:
9049 return "https://rabota.yandex.ru"
9050 }
9051 },
9052 rasp: function(t) {
9053 switch (t) {
9054 case "ru":
9055 return "https://rasp.yandex.ru";
9056 case "ua":
9057 return "https://rasp.yandex.ua";
9058 case "by":
9059 return "https://rasp.yandex.by";
9060 case "kz":
9061 return "https://rasp.yandex.kz";
9062 case "tr":
9063 return "https://seferler.yandex.com.tr";
9064 default:
9065 return "https://rasp.yandex.ru"
9066 }
9067 },
9068 realty: function(t) {
9069 switch (t) {
9070 case "ru":
9071 return "https://realty.yandex.ru";
9072 case "ua":
9073 return "https://realty.yandex.ua";
9074 case "by":
9075 return "https://realty.yandex.by";
9076 case "kz":
9077 return "https://realty.yandex.kz";
9078 default:
9079 return "https://realty.yandex.ru"
9080 }
9081 },
9082 referats: function() {
9083 return "https://referats.yandex.ru"
9084 },
9085 review: function(t) {
9086 switch (t) {
9087 case "ru":
9088 return "https://yandex.ru";
9089 case "ua":
9090 return "https://yandex.ua";
9091 case "by":
9092 return "https://yandex.by";
9093 case "kz":
9094 return "https://yandex.kz";
9095 case "com":
9096 return "https://www.yandex.com";
9097 case "tr":
9098 return "https://www.yandex.com.tr";
9099 default:
9100 return "https://yandex.ru"
9101 }
9102 },
9103 rk: function() {
9104 return "http://rk.yandex.ru"
9105 },
9106 root: function() {
9107 return "https://root.yandex.ru"
9108 },
9109 school: function() {
9110 return "http://school.yandex.ru";
9111 },
9112 search: function(t) {
9113 switch (t) {
9114 case "ru":
9115 return "https://yandex.ru";
9116 case "ua":
9117 return "https://yandex.ua";
9118 case "by":
9119 return "https://yandex.by";
9120 case "kz":
9121 return "https://yandex.kz";
9122 case "com":
9123 return "https://yandex.com";
9124 case "tr":
9125 return "https://yandex.com.tr";
9126 default:
9127 return "https://yandex.ru"
9128 }
9129 },
9130 serp: function(t) {
9131 switch (t) {
9132 case "ru":
9133 return "https://yandex.ru";
9134 case "ua":
9135 return "https://yandex.ua";
9136 case "by":
9137 return "https://yandex.by";
9138 case "kz":
9139 return "https://yandex.kz";
9140 case "com":
9141 return "https://www.yandex.com";
9142 case "tr":
9143 return "https://www.yandex.com.tr";
9144 default:
9145 return "https://yandex.ru"
9146 }
9147 },
9148 server: function() {
9149 return "http://company.yandex.ru/technology/server/"
9150 },
9151 shtrafi: function(t) {
9152 switch (t) {
9153 case "ru":
9154 return "https://money.yandex.net/debts";
9155 default:
9156 return "http://money.yandex.net/debts"
9157 }
9158 },
9159 site: function(t) {
9160 switch (t) {
9161 case "ru":
9162 return "https://site.yandex.ru";
9163 case "ua":
9164 return "https://site.yandex.ua";
9165 case "tr":
9166 return "https://ozel.yandex.com.tr";
9167 default:
9168 return "https://site.yandex.ru"
9169 }
9170 },
9171 slovari: function(t) {
9172 switch (t) {
9173 case "ru":
9174 return "https://slovari.yandex.ru";
9175 case "ua":
9176 return "https://slovari.yandex.ua";
9177 case "by":
9178 return "https://slovari.yandex.by";
9179 case "kz":
9180 return "https://slovari.yandex.kz";
9181 default:
9182 return "https://slovari.yandex.ru"
9183 }
9184 },
9185 so: function() {
9186 return "http://so.yandex.ru"
9187 },
9188 social: function(t) {
9189 switch (t) {
9190 case "ru":
9191 return "https://social.yandex.ru";
9192 case "ua":
9193 return "https://social.yandex.ua";
9194 case "by":
9195 return "https://social.yandex.by";
9196 case "kz":
9197 return "https://social.yandex.kz";
9198 case "com":
9199 return "https://social.yandex.ru";
9200 case "tr":
9201 return "https://social.yandex.com.tr";
9202 default:
9203 return "https://social.yandex.ru"
9204 }
9205 },
9206 soft: function(t) {
9207 switch (t) {
9208 case "ru":
9209 return "https://soft.yandex.ru";
9210 case "ua":
9211 return "https://soft.yandex.ua";
9212 case "tr":
9213 return "https://soft.yandex.com.tr";
9214 default:
9215 return "https://soft.yandex.ru"
9216 }
9217 },
9218 sport: function(t) {
9219 switch (t) {
9220 case "ru":
9221 return "http://sport.yandex.ru";
9222 case "ua":
9223 return "http://sport.yandex.ua";
9224 case "by":
9225 return "http://sport.yandex.by";
9226 case "kz":
9227 return "http://sport.yandex.kz";
9228 case "tr":
9229 return "http://spor.yandex.com.tr";
9230 default:
9231 return "http://sport.yandex.ru"
9232 }
9233 },
9234 sprav: function(t) {
9235 switch (t) {
9236 case "ru":
9237 return "https://sprav.yandex.ru";
9238 case "ua":
9239 return "https://sprav.yandex.ua";
9240 case "by":
9241 return "https://sprav.yandex.by";
9242 case "kz":
9243 return "https://sprav.yandex.kz";
9244 case "tr":
9245 return "https://rehber.yandex.com.tr";
9246 default:
9247 return "https://sprav.yandex.ru"
9248 }
9249 },
9250 start: function(t) {
9251 switch (t) {
9252 case "ru":
9253 return "https://help.yandex.ru/start/";
9254 case "ua":
9255 return "https://help.yandex.ua/start/";
9256 case "com":
9257 return "https://help.yandex.com/start/";
9258 case "tr":
9259 return "https://yardim.yandex.com.tr/start";
9260 default:
9261 return "https://help.yandex.ru/start/"
9262 }
9263 },
9264 stat: function(t) {
9265 switch (t) {
9266 case "ru":
9267 return "https://stat.yandex.ru";
9268 case "ua":
9269 return "https://stat.yandex.ua";
9270 case "by":
9271 return "https://stat.yandex.by";
9272 default:
9273 return "https://stat.yandex.ru"
9274 }
9275 },
9276 subs: function() {
9277 return "https://subs.yandex.ru"
9278 },
9279 taxi: function() {
9280 return "https://taxi.yandex.ru"
9281 },
9282 terms: function() {
9283 return "http://terms.yandex.ru"
9284 },
9285 tests: function() {
9286 return "http://tests.yandex.ru"
9287 },
9288 ticket: function() {
9289 return "http://ticket.yandex.ru"
9290 },
9291 time: function(t) {
9292 switch (t) {
9293 case "ru":
9294 return "https://time.yandex.ru";
9295 case "ua":
9296 return "https://time.yandex.ua";
9297 case "by":
9298 return "https://time.yandex.by";
9299 case "kz":
9300 return "https://time.yandex.kz";
9301 case "com":
9302 return "https://time.yandex.com";
9303 case "tr":
9304 return "https://saat.yandex.com.tr";
9305 default:
9306 return "https://time.yandex.ru"
9307 }
9308 },
9309 toster: function() {
9310 return "http://toster.yandex.ru"
9311 },
9312 translate: function(t) {
9313 switch (t) {
9314 case "ru":
9315 return "https://translate.yandex.ru";
9316 case "ua":
9317 return "https://translate.yandex.ua";
9318 case "by":
9319 return "https://translate.yandex.by";
9320 case "kz":
9321 return "https://translate.yandex.kz";
9322 case "com":
9323 return "https://translate.yandex.com";
9324 case "tr":
9325 return "https://ceviri.yandex.com.tr";
9326 default:
9327 return "https://translate.yandex.ru"
9328 }
9329 },
9330 tune: function(t) {
9331 switch (t) {
9332 case "ru":
9333 return "https://tune.yandex.ru";
9334 case "ua":
9335 return "https://tune.yandex.ua";
9336 case "by":
9337 return "https://tune.yandex.by";
9338 case "kz":
9339 return "https://tune.yandex.kz";
9340 case "com":
9341 return "https://tune.yandex.com";
9342 case "tr":
9343 return "https://tune.yandex.com.tr";
9344 default:
9345 return "https://tune.yandex.ru"
9346 }
9347 },
9348 tv: function(t) {
9349 switch (t) {
9350 case "ru":
9351 return "https://tv.yandex.ru";
9352 case "ua":
9353 return "https://tv.yandex.ua";
9354 case "by":
9355 return "https://tv.yandex.by";
9356 case "kz":
9357 return "https://tv.yandex.kz";
9358 default:
9359 return "https://tv.yandex.ru"
9360 }
9361 },
9362 uslugi: function() {
9363 return "http://uslugi.yandex.ru"
9364 },
9365 video: function(t) {
9366 switch (t) {
9367 case "ru":
9368 return "http://yandex.ru/video/";
9369 case "ua":
9370 return "http://yandex.ua/video/";
9371 case "by":
9372 return "http://yandex.by/video/";
9373 case "kz":
9374 return "http://yandex.kz/video/";
9375 case "com":
9376 return "https://yandex.com/video/";
9377 case "tr":
9378 return "http://yandex.com.tr/video/";
9379 default:
9380 return "http://yandex.ru/video/"
9381 }
9382 },
9383 "video-com": function() {
9384 return "https://yandex.com/video/"
9385 },
9386 vno: function() {
9387 return "https://zno.yandex.ua"
9388 },
9389 wdgt: function(t) {
9390 switch (t) {
9391 case "ru":
9392 return "https://wdgt.yandex.ru";
9393 case "ua":
9394 return "https://wdgt.yandex.ua";
9395 case "by":
9396 return "https://wdgt.yandex.by";
9397 case "kz":
9398 return "https://wdgt.yandex.kz";
9399 case "tr":
9400 return "https://wdgt.yandex.com.tr";
9401 default:
9402 return "https://wdgt.yandex.ru"
9403 }
9404 },
9405 weather: function(t) {
9406 switch (t) {
9407 case "ru":
9408 return "https://pogoda.yandex.ru";
9409 case "ua":
9410 return "https://pogoda.yandex.ua";
9411 case "by":
9412 return "https://pogoda.yandex.by";
9413 case "kz":
9414 return "https://pogoda.yandex.kz";
9415 case "tr":
9416 return "https://hava.yandex.com.tr";
9417 default:
9418 return "https://pogoda.yandex.ru"
9419 }
9420 },
9421 webmaster: function(t) {
9422 switch (t) {
9423 case "ru":
9424 return "https://webmaster.yandex.ru";
9425 case "ua":
9426 return "https://webmaster.yandex.ua";
9427 case "com":
9428 return "https://webmaster.yandex.com";
9429 case "tr":
9430 return "https://webmaster.yandex.com.tr";
9431 default:
9432 return "https://webmaster.yandex.ru"
9433 }
9434 },
9435 widgets: function(t) {
9436 switch (t) {
9437 case "ru":
9438 return "https://widgets.yandex.ru";
9439 case "ua":
9440 return "https://widgets.yandex.ua";
9441 case "by":
9442 return "https://widgets.yandex.by";
9443 case "kz":
9444 return "https://widgets.yandex.kz";
9445 case "tr":
9446 return "https://widgets.yandex.com.tr";
9447 default:
9448 return "https://widgets.yandex.ru"
9449 }
9450 },
9451 wordstat: function() {
9452 return "https://wordstat.yandex.ru"
9453 },
9454 wow: function() {
9455 return "http://my.ya.ru"
9456 },
9457 www: function(t) {
9458 switch (t) {
9459 case "ru":
9460 return "https://www.yandex.ru";
9461 case "ua":
9462 return "https://www.yandex.ua";
9463 case "by":
9464 return "https://www.yandex.by";
9465 case "kz":
9466 return "https://www.yandex.kz";
9467 case "com":
9468 return "https://www.yandex.com";
9469 case "tr":
9470 return "https://www.yandex.com.tr";
9471 default:
9472 return "https://www.yandex.ru"
9473 }
9474 },
9475 xmlsearch: function(t) {
9476 switch (t) {
9477 case "ru":
9478 return "https://xml.yandex.ru";
9479 case "ua":
9480 return "https://xml.yandex.ua";
9481 case "by":
9482 return "https://xml.yandex.by";
9483 case "kz":
9484 return "https://xml.yandex.kz";
9485 case "com":
9486 return "https://xml.yandex.com";
9487 case "tr":
9488 return "https://xml.yandex.com.tr";
9489 default:
9490 return "https://xml.yandex.ru"
9491 }
9492 },
9493 yaca: function(t) {
9494 switch (t) {
9495 case "ru":
9496 return "https://yaca.yandex.ru";
9497 case "ua":
9498 return "https://yaca.yandex.ua";
9499 case "by":
9500 return "https://yaca.yandex.by";
9501 default:
9502 return "https://yaca.yandex.ru"
9503 }
9504 },
9505 yamb: function() {
9506 return "https://yamb.yandex.ru"
9507 },
9508 zakladki: function() {
9509 return "http://zakladki.yandex.ru"
9510 }
9511 }, bh.lib.services._uri.passport = function() {
9512 return bh.lib.global["passport-host"]
9513 }, bh.match("user_menu_multiauth", function(t, e) {
9514 if (!t.tParam("inUserMenu")) {
9515 var n = bh.lib.global;
9516 t.attrs({
9517 role: "button",
9518 tabindex: 0,
9519 "aria-haspopup": !0,
9520 "aria-expanded": !1
9521 });
9522 var i = t.tParam("user-menu");
9523 if (!i) {
9524 var r = e.counters || {},
9525 s = "/passport?mode=embeddedauth&action=logout&yu=" + (n.yandexuid || ""),
9526 o = n["passport-host"],
9527 a = encodeURIComponent(n.retpath || "");
9528 s += "&uid=" + n.uid, s += "&retpath=" + a, s = o + s;
9529 var u = e.js && e.js.mail || 0,
9530 c = u ? u + " " : "",
9531 l = c + bh.lib.i18n("user", "letter", {
9532 count: u
9533 });
9534 i = [{
9535 elem: "item",
9536 type: "mail",
9537 content: {
9538 block: "link",
9539 mods: r.mail ? {
9540 counter: "yes"
9541 } : {},
9542 url: bh.lib.services.serviceUrl("mail"),
9543 counter: r.mail,
9544 content: [{
9545 elem: "text",
9546 tag: "span",
9547 mix: {
9548 block: "user-menu-update",
9549 js: !0
9550 },
9551 content: l
9552 }]
9553 }
9554 }, {
9555 elem: "item",
9556 type: "mailCompose",
9557 content: {
9558 block: "link",
9559 mods: r.write ? {
9560 counter: "yes"
9561 } : {},
9562 content: bh.lib.i18n("user", "letter_compose"),
9563 url: bh.lib.services.serviceUrl("mail") + "/compose",
9564 counter: r.write
9565 }
9566 }, {
9567 elem: "item",
9568 type: "disk",
9569 content: {
9570 block: "link",
9571 url: bh.lib.services.serviceUrl("disk") + "?source=main-loginmenu",
9572 content: [{
9573 elem: "text",
9574 tag: "span",
9575 content: bh.lib.i18n("user", "upload_files")
9576 }]
9577 }
9578 }, {
9579 elem: "item",
9580 mods: {
9581 separator: "yes"
9582 }
9583 }, {
9584 elem: "item",
9585 type: "tune",
9586 content: {
9587 block: "link",
9588 mods: r.settings ? {
9589 counter: "yes"
9590 } : {},
9591 content: bh.lib.i18n("user", "tune"),
9592 url: bh.lib.services.serviceUrl("tune"),
9593 counter: r.settings
9594 }
9595 }, {
9596 elem: "item",
9597 type: "passport",
9598 mods: {
9599 theme: "separator"
9600 },
9601 mix: [{
9602 block: "user",
9603 elem: "accounts"
9604 }],
9605 content: {
9606 block: "link",
9607 mods: r.passport ? {
9608 counter: "yes"
9609 } : {},
9610 content: bh.lib.i18n("user", "passport"),
9611 url: bh.lib.services.serviceUrl("passport"),
9612 counter: r.passport
9613 }
9614 }, {
9615 elem: "item",
9616 mods: {
9617 theme: "grey"
9618 },
9619 type: "add-account",
9620 content: {
9621 block: "link",
9622 url: o + "/auth?mode=add-user&retpath=" + a,
9623 mix: [{
9624 block: "user",
9625 elem: "add"
9626 }, {
9627 block: "user",
9628 elem: "account-link"
9629 }, {
9630 block: "user",
9631 mods: {
9632 js: "inited"
9633 }
9634 }],
9635 content: [{
9636 mix: [{
9637 block: "user",
9638 elem: "icon"
9639 }]
9640 }, {
9641 block: "user",
9642 elem: "account-text",
9643 content: BEM.I18N("user_menu_multiauth", "add-user")
9644 }],
9645 counter: r.addUser
9646 }
9647 }, {
9648 elem: "item",
9649 mods: {
9650 separator: "yes",
9651 theme: "grey"
9652 }
9653 }, {
9654 elem: "item",
9655 mods: {
9656 theme: "grey"
9657 },
9658 type: "edit",
9659 content: {
9660 block: "link",
9661 mix: {
9662 block: "user",
9663 elem: "edit-list"
9664 },
9665 url: o + "/auth?mode=edit&retpath=" + a,
9666 content: [{
9667 elem: "text",
9668 tag: "span",
9669 content: BEM.I18N("user_menu_multiauth", "edit-list")
9670 }],
9671 counter: r.editList
9672 }
9673 }, {
9674 elem: "item",
9675 type: "logout",
9676 mods: {
9677 theme: "grey"
9678 },
9679 content: {
9680 block: "link",
9681 mods: r.logout ? {
9682 counter: "yes"
9683 } : {},
9684 mix: [{
9685 block: "user",
9686 js: {
9687 _uniqId: "user__logout"
9688 }
9689 }, {
9690 block: "user",
9691 elem: "logout"
9692 }],
9693 content: bh.lib.i18n("user", "exit"),
9694 url: s,
9695 counter: r.logout
9696 }
9697 }]
9698 }
9699 return n.login ? (t.tParam("inUserMenu", !0), {
9700 block: "dropdown-menu",
9701 mods: {
9702 user: "yes"
9703 },
9704 content: [{
9705 block: "user",
9706 mods: e.mods,
9707 attrs: t.attrs(),
9708 js: e.js,
9709 counter: e.counter,
9710 content: e.content
9711 }, {
9712 elem: "popup",
9713 mods: {
9714 user: "yes"
9715 },
9716 mix: [{
9717 block: "popup",
9718 mods: {
9719 "fade-out": "no",
9720 "watch-scroll": "no"
9721 }
9722 }, {
9723 block: "user",
9724 elem: "multiauth-popup"
9725 }],
9726 js: {
9727 directions: "bottom-right"
9728 },
9729 content: i
9730 }]
9731 }) : void 0
9732 }
9733 }), bh.match("popup", function(t) {
9734 t.tParam("inUserMenu") && t.cls("popup")
9735 }), bh.match("dropdown-menu", function(t) {
9736 t.js(!0).mod("theme", "ffffff").tParam("dropdownMenuSize", t.mod("size")).tParam("inDropdownMenu", !0)
9737 }), bh.match("dropdown-menu__menu", function(t, e) {
9738 return {
9739 block: "b-menu-" + (e.type || "vert"),
9740 mix: (e.mix || []).concat({
9741 block: "dropdown-menu",
9742 elem: "menu",
9743 mods: t.extend({
9744 theme: "ffffff"
9745 }, e.mods)
9746 }),
9747 title: e.title,
9748 content: e.content
9749 }
9750 }), bh.match(["b-menu-vert", "b-menu-horiz"], function(t) {
9751 t.tParam("inDropdownMenu") && t.attr("role", "menu", !0)
9752 }), bh.match(["b-menu-vert__item", "b-menu-horiz__item"], function(t) {
9753 t.tParam("inDropdownMenu") && t.attr("role", "menuitem", !0)
9754 }), bh.match("dropdown-menu__popup", function(t, e) {
9755 return {
9756 block: "dropdown",
9757 elem: "popup",
9758 js: e.js,
9759 mix: (e.mix || []).concat({
9760 block: "dropdown-menu",
9761 elem: "popup",
9762 mods: t.extend({
9763 size: t.tParam("dropdownMenuSize")
9764 }, e.mods)
9765 }),
9766 attrs: e.attrs,
9767 content: {
9768 block: "dropdown-menu",
9769 elem: "menu",
9770 title: e.menuTitle,
9771 type: e.type,
9772 mods: e.menuMods,
9773 mix: e.menuMix,
9774 content: e.content
9775 }
9776 }
9777 }), bh.match("dropdown-menu__switcher", function(t) {
9778 var e = t.content();
9779 return e.mix = (e.mix || []).concat([{
9780 block: "dropdown-menu",
9781 elem: "switcher"
9782 }]), e
9783 }), bh.match("b-menu-vert", function(t, e) {
9784 t.content([e.title, {
9785 elem: "layout",
9786 content: t.content()
9787 }], !0)
9788 }), bh.match("b-menu-vert__layout", function(t) {
9789 t.tag("ul")
9790 }), bh.match("b-menu-vert__item", function(t, e) {
9791 return t.tParam("inBMenuVertItem") ? void 0 : (t.tParam("inBMenuVertItem", !0), {
9792 elem: "layout-unit",
9793 content: [e, e["item-content"]]
9794 })
9795 }), bh.match("b-menu-vert__layout-unit", function(t) {
9796 t.tag("li"), t.isFirst() && t.mix({
9797 mods: {
9798 position: "first"
9799 }
9800 }), t.isLast() && t.mix({
9801 mods: {
9802 position: "last"
9803 }
9804 })
9805 }), bh.match("b-menu-vert__item-selector", function(t) {
9806 t.tag("span")
9807 }), bh.match("b-menu-vert__submenu", function(t) {
9808 t.tag("ul")
9809 }), bh.match("b-menu-vert__title", function(t) {
9810 t.tag("h3")
9811 }), bh.match("b-menu-vert__title", function(t) {
9812 t.tag("h3")
9813 }), bh.match("b-menu-horiz", function(t) {
9814 t.js(!0)
9815 }), bh.match("b-menu-horiz__item", function(t, e) {
9816 return {
9817 elem: "layout-unit",
9818 content: e
9819 }
9820 }), bh.match("b-menu-horiz__layout-unit", function(t) {
9821 t.isFirst() && t.mix({
9822 mods: {
9823 position: "first"
9824 }
9825 }), t.isLast() && t.mix({
9826 mods: {
9827 position: "last"
9828 }
9829 })
9830 }), bh.match("b-menu-horiz__item-selector", function(t) {
9831 t.tag("span")
9832 }), bh.match("link", function(t, e) {
9833 var n = {},
9834 i = e.url,
9835 r = e.tabindex;
9836 ["title", "target", "id", "tabindex"].forEach(function(t) {
9837 e[t] && (n[t] = e[t])
9838 }), r && t.js({
9839 origTabindex: r
9840 }), i ? (t.tag("a"), n.href = t.isSimple(i) ? i : bh.apply(i)) : (t.tag("span"), n.role = "button", n.tabindex || (n.tabindex = 0)), t.attrs(n)
9841 }), bh.match("link__inner", function(t) {
9842 t.tag("span")
9843 }), bh.match("link_disabled_yes", function(t) {
9844 t.attrs({
9845 tabindex: -1,
9846 "aria-disabled": !0
9847 }, !0)
9848 }), bh.match("user-menu-update", function(t) {
9849 t.js(!0)
9850 }), bh.match("suggest2", function(t) {
9851 t.tag("ul").js(!0).mix({
9852 block: "suggest2-detect",
9853 js: !0
9854 })
9855 }), bh.match("suggest2-item", function(t) {
9856 t.tag("li").js(!0)
9857 }), bh.match("suggest2-item__highlight", function(t, e) {
9858 t.tag("b").bem(!1).content(bh.xmlEscape(e.content), !0)
9859 }), bh.match("suggest2-item__text", function(t, e) {
9860 var n = e.content;
9861 n = Array.isArray(n) ? n.map(function(t) {
9862 return "string" == typeof t ? bh.xmlEscape(t) : t
9863 }) : bh.xmlEscape(n), t.tag("span").content(n, !0), t.tParam("textUrl") && t.mod("type", "url")
9864 }), bh.match("suggest2-item__bullet", function(t) {
9865 t.tag("span").attr("aria-hidden", "true")
9866 }), bh.match("suggest2-item__fact", function(t, e) {
9867 var n = e.color,
9868 i = t.attr("style") || "";
9869 n && t.attr("style", i + ";color:" + n, !0), t.tag("span").content([{
9870 block: "suggest2",
9871 elem: "a11y",
9872 content: bh.lib.i18n("suggest2-item", "quick-answer") + ": "
9873 }, bh.xmlEscape(e.content)])
9874 }), bh.match("suggest2__a11y", function(t) {
9875 t.tag("span")
9876 }), bh.match("suggest2-item_interact_link", function(t, e) {
9877 t.content({
9878 block: "suggest2-item",
9879 elem: "link",
9880 url: e.url,
9881 target: e.target || "_blank",
9882 content: e.content
9883 }, !0);
9884 var n = e.mods || {}; - 1 !== ["nav", "icon"].indexOf(n.type) && t.tParam("textUrl", !0)
9885 }), bh.match("suggest2-item__link", function(t, e) {
9886 t.tag("a").attrs({
9887 href: e.url,
9888 target: e.target
9889 })
9890 }), bh.match("suggest2-item__icon", function(t, e) {
9891 var n = e.png ? 'background-image:url("' + e.png + '");' : "",
9892 i = e.svg ? 'background-image:none,url("' + e.svg + '")' : "";
9893 t.tag("span").attr("style", n + i)
9894 }), bh.match("suggest2-item__icon", function(t) {
9895 var e = t.mod("weather");
9896 e && (e = e.replace("-", "minus-").replace("+", "plus-").replace(/_/g, "-"), t.mod("weather", e, !0))
9897 }), bh.match("suggest2__content_theme_normal", function(t) {
9898 t.tag("ul")
9899 }), bh.match("suggest2__items", function(t) {
9900 t.tag("ul")
9901 }), bh.match("title_level_1", function(t) {
9902 t.tag("h1")
9903 }), bh.match("icon", function(t, e) {
9904 t.tag("i").attrs({
9905 style: e.url && "background-image:url('" + e.url + "');",
9906 "aria-hidden": "true"
9907 })
9908 }), bh.match("icon", function(t, e) {
9909 t.tag("i"), t.attr("data-width", t.mod("size"));
9910 var n = t.content();
9911 return t.content("", !0), e.abbr && [{
9912 tag: "abbr",
9913 mix: {
9914 block: "icon-abbr"
9915 },
9916 attrs: {
9917 title: n
9918 },
9919 content: e.abbr
9920 }, e]
9921 }), bh.match("popup__close", function(t) {
9922 t.tag("i")
9923 }), bh.match("popup_has-close_yes", function(t, e) {
9924 t.applyBase(), t.content([t.content(), {
9925 elem: "close"
9926 }], !0)
9927 }), bh.match("meteum-popup__about", function(t) {
9928 t.tag("p")
9929 }), bh.match("baloon__temp", function(t) {
9930 t.tag("span")
9931 }), bh.match("baloon__name", function(t) {
9932 t.tag("span")
9933 });
9934 var Blocks = function() {
9935 "use strict";
9936
9937 function t() {
9938 this._methods = {}, this.lib = {}
9939 }
9940 return t.prototype.declare = function(t, e) {
9941 if (!t || "string" != typeof t) throw new TypeError("Argument `name` must be a string");
9942 if (null === e || void 0 === e) throw new TypeError("Argument `method` must not be Null or undefined");
9943 return this._methods[t] = e, this
9944 }, t.prototype.decl = t.prototype.declare, t.prototype.get = function(t) {
9945 if (!t || "string" != typeof t) throw new TypeError("Argument `name` must be a string");
9946 var e = this._methods[t];
9947 if (!e) throw new Error("Priv method `" + t + "` was not declared");
9948 return e
9949 }, t.prototype.exec = function(t) {
9950 if (!t || "string" != typeof t) throw new TypeError("Argument `name` must be a string");
9951 var e = this._methods[t];
9952 if (!e) throw new Error("Priv method `" + t + "` was not declared");
9953 var n, i = typeof e;
9954 if ("function" !== i) throw n = ["object", "undefined"].indexOf(i), new TypeError("Can't exec priv method `" + t + "` because It's a" + (n ? "n " : " ") + i + " not a function");
9955 var r = Array.prototype.slice.call(arguments, 1);
9956 return e.apply(this, r)
9957 }, t
9958 }();
9959 "undefined" != typeof module && (module.exports = Blocks);
9960 var blocks = new Blocks;
9961 blocks.declare("meteum-popup", function(t, e) {
9962 return {
9963 block: "meteum-popup",
9964 content: [{
9965 block: "icon",
9966 mods: {
9967 meteum: !0,
9968 size: 64
9969 }
9970 }, {
9971 block: "title",
9972 mods: {
9973 level: "1"
9974 },
9975 content: BEM.I18N("interface-common", "meteum-title")
9976 }, {
9977 elem: "text",
9978 content: BEM.I18N("interface-common", "meteum-description")
9979 }, {
9980 block: "button",
9981 mods: {
9982 size: t,
9983 theme: "action"
9984 },
9985 target: "_blank",
9986 url: e + "/meteum",
9987 content: BEM.I18N("interface-common", "learn-more")
9988 }]
9989 }
9990 });