diff --git a/ChangeLog.md b/ChangeLog.md index 8d833e14..6b979470 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,15 @@ bem-tools changelog =================== +30.05.2013, Version 0.5.33 (stable) +---------------------------------- + +- package: q updated to 0.8.12 +- package: borschik updated to 0.3.1 +- package: xjst updated to 0.4.13 +- package: ometajs updated to 3.2.4 +- package: preferglobal set to false + 23.05.2013, Version 0.5.32 (stable) ----------------------------------- diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index d2440f50..bfb682cb 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "bem", - "version": "0.5.31", + "version": "0.5.33", "dependencies": { "coa": { "version": "0.3.9" }, "q": { - "version": "0.8.11" + "version": "0.8.12" }, "qq": { "version": "0.3.5", @@ -45,42 +45,53 @@ "version": "1.0.4" }, "xjst": { - "version": "0.2.21", + "version": "0.4.13", "dependencies": { - "coa": { - "version": "0.3.1" + "ometajs": { + "version": "3.2.4" }, - "q": { - "version": "0.7.2", + "uglify-js": { + "version": "1.3.4" + }, + "spoon": { + "version": "0.1.10", "dependencies": { - "event-queue": { - "version": "0.2.0" + "esprima": { + "version": "1.0.3" + }, + "escodegen": { + "version": "0.0.22", + "dependencies": { + "source-map": { + "version": "0.1.22", + "dependencies": { + "amdefine": { + "version": "0.0.5" + } + } + } + } + }, + "estraverse": { + "version": "0.0.4" } } - }, - "uglify-js": { - "version": "1.1.1" } } }, "ometajs": { - "version": "2.1.10", + "version": "3.2.4", "dependencies": { "q": { - "version": "0.7.2", - "dependencies": { - "event-queue": { - "version": "0.2.0" - } - } + "version": "0.8.12" }, "uglify-js": { - "version": "1.1.1" + "version": "1.3.4" } } }, "borschik": { - "version": "0.2.8", + "version": "0.3.1", "dependencies": { "ometajs": { "version": "3.1.19" @@ -172,42 +183,6 @@ } } }, - "coverjs": { - "version": "0.0.11-alpha", - "dependencies": { - "esprima": { - "version": "0.9.9" - }, - "escodegen": { - "version": "0.0.15", - "dependencies": { - "esprima": { - "version": "1.0.2" - }, - "source-map": { - "version": "0.1.8", - "dependencies": { - "amdefine": { - "version": "0.0.4" - } - } - } - } - }, - "prime": { - "version": "0.0.5-alpha" - }, - "Supersonic": { - "version": "0.0.6" - }, - "mkdirp": { - "version": "0.3.3" - }, - "colors": { - "version": "0.6.0-1" - } - } - }, "mocha-coverjs": { "version": "0.0.1", "dependencies": { @@ -251,6 +226,42 @@ } } } + }, + "coverjs": { + "version": "0.0.11-alpha", + "dependencies": { + "esprima": { + "version": "0.9.9" + }, + "escodegen": { + "version": "0.0.15", + "dependencies": { + "esprima": { + "version": "1.0.2" + }, + "source-map": { + "version": "0.1.8", + "dependencies": { + "amdefine": { + "version": "0.0.4" + } + } + } + } + }, + "prime": { + "version": "0.0.5-alpha" + }, + "Supersonic": { + "version": "0.0.6" + }, + "mkdirp": { + "version": "0.3.3" + }, + "colors": { + "version": "0.6.0-1" + } + } } } } diff --git a/package.json b/package.json index efd13e88..6c02dbb4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bem", "description": "BEM Tools", - "version": "0.5.32", + "version": "0.5.33", "homepage": "http://github.com/bem/bem-tools", "author": "Sergey Berezhnoy (http://github.com/veged)", "maintainers": [ @@ -29,16 +29,16 @@ }, "dependencies": { "coa": "~0.3.8", - "q": "~0.8.10", + "q": "~0.8.12", "qq": "~0.3.4", "q-fs": "~0.1.33", "q-http": "~0.1.16", "mime": "~1.2.5", "underscore": "~1.3.1", "inherit": "~1.0.0", - "xjst": "0.2.21", - "ometajs": "~2.1.10", - "borschik": "~0.2.8", + "xjst": "0.4.13", + "ometajs": "~3.2.4", + "borschik": "~0.3.1", "apw": "~0.3.9", "winston": ">= 0.5.0", "dom-js": "*", @@ -70,7 +70,7 @@ "url": "http://github.com/bem/bem-tools/raw/master/LICENSE" } ], - "preferGlobal": true, + "preferGlobal": false, "publishConfig": { "tag": "latest" }, diff --git a/test/data/make/reference-result/pages/client/__profile/_client__profile.bemhtml.js b/test/data/make/reference-result/pages/client/__profile/_client__profile.bemhtml.js index eb9717f9..55bc054f 100644 --- a/test/data/make/reference-result/pages/client/__profile/_client__profile.bemhtml.js +++ b/test/data/make/reference-result/pages/client/__profile/_client__profile.bemhtml.js @@ -1,585 +1,209 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34; - exports.apply = apply; - function apply() { - return $55.call(this); + function $1() { + var __t = this._mode; + if (__t === "attrs") { + return $2.call(this); + } else if (__t === "tag") { + return $22.call(this); + } else if (__t === "bem") { + return $48.call(this); + } else if (__t === "default") { + return $69.call(this); + } else if (__t === "content") { + return $91.call(this); + } else { + return $99.call(this); + } } function $2() { - return "link"; - return; - } - function $3() { - return false; - return; - } - function $4() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $5() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); + if (this.block === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } + return; + } else if (__t === "js") { + if (!this.ctx.url === false) { + return { + src: this.ctx.url }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $6() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $55.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $55.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $55.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $55.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $55.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } - } else { - undefined; - } + return; } else { - undefined; + return $99.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $55.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; - } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $55.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; + return; + } else { + return $99.call(this); } + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - undefined; + return $99.call(this); } } else { - undefined; + return $99.call(this); } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $55.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $55.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } + function $22() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $99.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $7() { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } - } - function $8() { - if (!!this["elem"] === false) { - return $4.call(this); - } else { - if (!!this["_start"] === false) { - return $5.call(this); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; + return; } else { - return $6.call(this); + return $99.call(this); } - } - } - function $9() { - return this["ctx"]["content"]; - return; - } - function $10() { - if (!!this["_start"] === false) { - return $5.call(this); } else { - return $9.call(this); + return $99.call(this); } } - function $11() { - return undefined; - return; - } - function $12() { - if (!!this["_start"] === false) { - return $5.call(this); + function $48() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $99.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; + } else { + return $99.call(this); + } } else { - return $11.call(this); + return $99.call(this); } } - function $22() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + function $69() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $74.call(this); } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } + return $79.call(this); } + } else { + return $79.call(this); } + } else { + return $79.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $99.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $99.call(this); } } else { - return $e.call(this, []); - } - } - function $23() { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $22.call(this); + return $99.call(this); } } - function $27() { - return "script"; - return; - } - function $32() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $74() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } } } + } + return; + } + function $79() { + if (!!this.elem === false) { + return $81.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $99.call(this); + } + } + function $81() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -597,708 +221,480 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $91() { + if (this.block === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); return; } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } + return $99.call(this); } + } else { + return $99.call(this); } } - function $46() { - var __this = this; - if (!!this["_start"] === false) { - return $5.call(this); + function $99() { + if (!!this._start === false) { + return $101.call(this); } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return undefined; - return; - } else if (__t === "tag") { - return undefined; + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; return; - } else if (__t === "bem") { + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { return undefined; return; } else if (__t === "default") { - return $6.call(this); - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; + return $120.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } + return $127.call(this); } } else { - return $e.call(this, []); + return $127.call(this); } } } } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function $101() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); } - } else if (__t === "tag") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); } - } else if (__t === "default") { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } + undefined; } } } - } else { - return $e.call(this, []); - } - } - } - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return undefined; - return; - } else if (__t === "tag") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $6.call(this); - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + undefined; + } + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } + undefined; } } + } else { + undefined; } - } else { - return $e.call(this, []); + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; + } else { + undefined; + } + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; + }; + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); } - } - } - } - function $50() { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return $12.call(this); - } else if (__t === "bem") { - return $12.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $50.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + }; + ctx.apply(); + return ctx._buf.join(""); } + return; } - function $55() { - var __t = this["block"]; - if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "tag") { - return $2.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + function $120() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $22.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $99.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $23.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] - }; - return; - } else { - return $12.call(this); - } - } else if (__t === "tag") { - return $27.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "tag") { - return $2.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $32.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $48.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $99.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $99.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $23.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "style"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $32.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "tag") { - return "meta"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $99.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $23.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "body"; - return; - } else if (__t === "bem") { - return $12.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $2.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $23.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "head"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $91.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $99.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $23.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "favicon") { - return $46.call(this); - } else if (__t === "js") { - return $46.call(this); - } else if (__t === "css") { - return $46.call(this); - } else if (__t === "meta") { - return $46.call(this); - } else if (__t === "body") { - return $46.call(this); - } else if (__t === "head") { - return $46.call(this); - } else if (__t === "core") { - return $50.call(this); + } + return; + } + function $127() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $46.call(this); + return $133.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return $27.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $7.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + } else { + return $133.call(this); + } + } + function $133() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $139.call(this); + } + } else { + return $139.call(this); + } + } + function $139() { + if (!true === false) { + if (!!this._mode === false) { + return $142.call(this); } else { - return $46.call(this); + return $e.call(this); } } else { - return $46.call(this); + return $e.call(this); } } + function $142() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $69.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; + } + return; + } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML)); diff --git a/test/data/make/reference-result/pages/client/__profile/client__profile.bemhtml.js b/test/data/make/reference-result/pages/client/__profile/client__profile.bemhtml.js index eb9717f9..55bc054f 100644 --- a/test/data/make/reference-result/pages/client/__profile/client__profile.bemhtml.js +++ b/test/data/make/reference-result/pages/client/__profile/client__profile.bemhtml.js @@ -1,585 +1,209 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34; - exports.apply = apply; - function apply() { - return $55.call(this); + function $1() { + var __t = this._mode; + if (__t === "attrs") { + return $2.call(this); + } else if (__t === "tag") { + return $22.call(this); + } else if (__t === "bem") { + return $48.call(this); + } else if (__t === "default") { + return $69.call(this); + } else if (__t === "content") { + return $91.call(this); + } else { + return $99.call(this); + } } function $2() { - return "link"; - return; - } - function $3() { - return false; - return; - } - function $4() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $5() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); + if (this.block === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } + return; + } else if (__t === "js") { + if (!this.ctx.url === false) { + return { + src: this.ctx.url }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $6() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $55.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $55.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $55.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $55.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $55.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } - } else { - undefined; - } + return; } else { - undefined; + return $99.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $55.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; - } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $55.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; + return; + } else { + return $99.call(this); } + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - undefined; + return $99.call(this); } } else { - undefined; + return $99.call(this); } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $55.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $55.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } + function $22() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $99.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $7() { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } - } - function $8() { - if (!!this["elem"] === false) { - return $4.call(this); - } else { - if (!!this["_start"] === false) { - return $5.call(this); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; + return; } else { - return $6.call(this); + return $99.call(this); } - } - } - function $9() { - return this["ctx"]["content"]; - return; - } - function $10() { - if (!!this["_start"] === false) { - return $5.call(this); } else { - return $9.call(this); + return $99.call(this); } } - function $11() { - return undefined; - return; - } - function $12() { - if (!!this["_start"] === false) { - return $5.call(this); + function $48() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $99.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; + } else { + return $99.call(this); + } } else { - return $11.call(this); + return $99.call(this); } } - function $22() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + function $69() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $74.call(this); } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } + return $79.call(this); } + } else { + return $79.call(this); } + } else { + return $79.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $99.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $99.call(this); } } else { - return $e.call(this, []); - } - } - function $23() { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $22.call(this); + return $99.call(this); } } - function $27() { - return "script"; - return; - } - function $32() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $74() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } } } + } + return; + } + function $79() { + if (!!this.elem === false) { + return $81.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $99.call(this); + } + } + function $81() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -597,708 +221,480 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $91() { + if (this.block === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); return; } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return $6.call(this); - } + return $99.call(this); } + } else { + return $99.call(this); } } - function $46() { - var __this = this; - if (!!this["_start"] === false) { - return $5.call(this); + function $99() { + if (!!this._start === false) { + return $101.call(this); } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return undefined; - return; - } else if (__t === "tag") { - return undefined; + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; return; - } else if (__t === "bem") { + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { return undefined; return; } else if (__t === "default") { - return $6.call(this); - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; + return $120.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } + return $127.call(this); } } else { - return $e.call(this, []); + return $127.call(this); } } } } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function $101() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); } - } else if (__t === "tag") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); } - } else if (__t === "default") { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - return undefined; - return; - } - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } + undefined; } } } - } else { - return $e.call(this, []); - } - } - } - } else { - if (!!this["_start"] === false) { - return $5.call(this); - } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return undefined; - return; - } else if (__t === "tag") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $6.call(this); - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; + undefined; + } + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $55.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } + undefined; } } + } else { + undefined; } - } else { - return $e.call(this, []); + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; + } else { + undefined; + } + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; + }; + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); } - } - } - } - function $50() { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return $12.call(this); - } else if (__t === "bem") { - return $12.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $50.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + }; + ctx.apply(); + return ctx._buf.join(""); } + return; } - function $55() { - var __t = this["block"]; - if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "tag") { - return $2.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + function $120() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $22.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $99.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $23.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] - }; - return; - } else { - return $12.call(this); - } - } else if (__t === "tag") { - return $27.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "tag") { - return $2.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $32.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $48.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $99.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $99.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $23.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "style"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $32.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "tag") { - return "meta"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $99.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $23.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "body"; - return; - } else if (__t === "bem") { - return $12.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $2.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $23.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return "head"; - return; - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $8.call(this); - } else if (__t === "content") { - return $10.call(this); - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $91.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $99.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $23.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "favicon") { - return $46.call(this); - } else if (__t === "js") { - return $46.call(this); - } else if (__t === "css") { - return $46.call(this); - } else if (__t === "meta") { - return $46.call(this); - } else if (__t === "body") { - return $46.call(this); - } else if (__t === "head") { - return $46.call(this); - } else if (__t === "core") { - return $50.call(this); + } + return; + } + function $127() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $46.call(this); + return $133.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "attrs") { - return $12.call(this); - } else if (__t === "tag") { - return $27.call(this); - } else if (__t === "bem") { - return $3.call(this); - } else if (__t === "default") { - return $7.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "mix") { - return $12.call(this); - } else if (__t === "jsAttr") { - return $12.call(this); - } else if (__t === "js") { - return $12.call(this); - } else if (__t === "cls") { - return $12.call(this); - } else { - return $23.call(this); + } else { + return $133.call(this); + } + } + function $133() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $139.call(this); + } + } else { + return $139.call(this); + } + } + function $139() { + if (!true === false) { + if (!!this._mode === false) { + return $142.call(this); } else { - return $46.call(this); + return $e.call(this); } } else { - return $46.call(this); + return $e.call(this); } } + function $142() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $69.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; + } + return; + } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML)); diff --git a/test/data/make/reference-result/pages/client/_client.bemhtml.js b/test/data/make/reference-result/pages/client/_client.bemhtml.js index bfd5e1f3..a5b6bcbc 100644 --- a/test/data/make/reference-result/pages/client/_client.bemhtml.js +++ b/test/data/make/reference-result/pages/client/_client.bemhtml.js @@ -1,1584 +1,339 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34, __r44, __r45, __r46; - exports.apply = apply; - function apply() { - return $79.call(this); - } - function $3() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); - }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } - }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $4() { - return this["ctx"]["content"]; - return; - } - function $5() { - if (!!this["_start"] === false) { - return $3.call(this); + function $1() { + var __t = this._mode; + if (__t === "tag") { + return $2.call(this); + } else if (__t === "content") { + return $42.call(this); + } else if (__t === "attrs") { + return $64.call(this); + } else if (__t === "js") { + return $98.call(this); + } else if (__t === "bem") { + return $109.call(this); + } else if (__t === "default") { + return $130.call(this); } else { - return $4.call(this); + return $152.call(this); } } - function $7() { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; + function $2() { + var __t = this.block; + if (__t === "b-link") { + if (this.elem === "inner") { + return "span"; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } - function $11() { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - function $12() { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - } - function $13() { - return undefined; - return; - } - function $14() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $13.call(this); - } - } - function $18() { - return true; - return; - } - function $21() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $79.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $79.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $79.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $79.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $79.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return this.ctx.url ? "a" : "span"; + return; } else { - undefined; + return $12.call(this); } } else { - undefined; + return $12.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $79.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $79.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); - } - } else { - undefined; - } - } else { - undefined; - } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $79.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $79.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $152.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $22() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } - function $32() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } - } - } + return $152.call(this); } } else { - return $e.call(this, []); + return $152.call(this); } } - function $33() { - if (!!this["_start"] === false) { - return $3.call(this); + function $12() { + if (!!this.elem === false) { + return "a"; + return; } else { - return $32.call(this); + return $152.call(this); } } - function $38() { - var __this = this; - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); + function $42() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.ctx._wrap === false) { + if (!!this.elem === false) { + if (!!this.mods.inner === false) { + { + { ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; + var __r48 = this._mode; + this._mode = ""; + var __r49 = this.ctx; + this.ctx = { + elem: "inner", + content: this.ctx.content, + _wrap: true + }; + $152.call(this); + this._mode = __r48; + this.ctx = __r49; ""; - undefined; - return; - } else { - return $e.call(this, []); } + undefined; + undefined; + undefined; } - } - } - } else { - return $e.call(this, []); - } - } - } - } - function $43() { - var __this = this; - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return this["ctx"]["url"] ? "a" : "span"; - return; - } else if (__t === "content") { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else if (__t === "attrs") { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); + return $152.call(this); } - return a; - return; - } - } else if (__t === "js") { - return true; - return; - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); + return; + } else { + return $152.call(this); } } else { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return "a"; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + return $152.call(this); + } + } + function $64() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + if (!!this.ctx.url === false) { + return {}; return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $74.call(this); } - } - } - function $45() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url + }; + return; } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - return $45.call(this); - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + if (!this.ctx.url === false) { + return { + src: this.ctx.url + }; return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $152.call(this); } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; return; - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } + return $152.call(this); } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } + } else { + return $152.call(this); } } - function $48() { - return "link"; - return; + function $74() { + if (!!this.elem === false) { + return $76.call(this); + } else { + return $152.call(this); + } } - function $50() { - return false; + function $76() { + var __r44, __r45, __r46, __r47; + { + var ctx = this.ctx, props = [ "title", "target" ], p = typeof ctx.url, a = { + href: p === "undefined" || p === "string" ? ctx.url : (p = [], "", __r44 = this._buf, this._buf = p, __r45 = this._mode, this._mode = "", __r46 = this.ctx, this.ctx = ctx.url, __r47 = $152.call(this), this._buf = __r44, this._mode = __r45, this.ctx = __r46, "", __r47, p.join("")) + }; + while (p = props.pop()) { + ctx[p] && (a[p] = ctx[p]); + } + undefined; + return a; + } return; } - function $51() { - if (!!this["elem"] === false) { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; + function $98() { + if (this.block === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return true; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } else { - if (!!this["_start"] === false) { - return $3.call(this); + return $152.call(this); + } + } + function $109() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; } else { - return $21.call(this); + return $152.call(this); } + } else { + return $152.call(this); } } - function $53() { - return "script"; - return; + function $130() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $135.call(this); + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $152.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } - function $60() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $135() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } } } + } + return; + } + function $140() { + if (!!this.elem === false) { + return $142.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $152.call(this); + } + } + function $142() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -1596,384 +351,468 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $152() { + if (!!this._start === false) { + return $154.call(this); + } else { + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; + return; + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { + return undefined; return; + } else if (__t === "default") { + return $173.call(this); } else { - if (!!this["_start"] === false) { - return $3.call(this); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } + return; + } else { + return $180.call(this); + } } else { - return $21.call(this); + return $180.call(this); } } } } - function $74() { - var __t = this["_mode"]; - if (__t === "tag") { - return $14.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $74.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } - function $79() { - var __t = this["block"]; - if (__t === "b-link") { - var __t = this["elem"]; - if (__t === "inner") { - var __t = this["_mode"]; - if (__t === "tag") { - return "span"; - return; - } else if (__t === "content") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $7.call(this); + function $154() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); + } + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); + } + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); + } + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; + } } else { - return $5.call(this); + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; + } else { + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; + } else { + undefined; + } + } } - } else { - return $5.call(this); - } - } else if (__t === "attrs") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $12.call(this); + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - return $14.call(this); + undefined; } - } else { - if (!!this["elem"] === false) { - return $11.call(this); + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + } else { + undefined; + } + } } else { - return $14.call(this); + undefined; } + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } - } else if (__t === "js") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $18.call(this); + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; } else { - return $14.call(this); + undefined; } - } else { - return $14.call(this); - } - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "favicon") { - return $43.call(this); - } else if (__t === "js") { - return $43.call(this); - } else if (__t === "css") { - return $43.call(this); - } else if (__t === "meta") { - return $43.call(this); - } else if (__t === "body") { - return $43.call(this); - } else if (__t === "head") { - return $43.call(this); - } else if (__t === "core") { - return $43.call(this); - } else { - return $43.call(this); - } - } else if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "inner") { - return $47.call(this); - } else if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; }; - return; - } else { - return $14.call(this); - } - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); + } + }; + ctx.apply(); + return ctx._buf.join(""); + } + return; + } + function $173() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $2.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $98.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $33.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $109.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $152.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $152.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $33.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "tag") { - return "style"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "tag") { - return "meta"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $152.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $33.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "tag") { - return "body"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $64.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $33.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "tag") { - return "head"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $42.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $152.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $33.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "inner") { - return $38.call(this); - } else if (__t === "favicon") { - return $38.call(this); - } else if (__t === "js") { - return $38.call(this); - } else if (__t === "css") { - return $38.call(this); - } else if (__t === "meta") { - return $38.call(this); - } else if (__t === "body") { - return $38.call(this); - } else if (__t === "head") { - return $38.call(this); - } else if (__t === "core") { - return $74.call(this); + } + return; + } + function $180() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $38.call(this); + return $186.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); + } else { + return $186.call(this); + } + } + function $186() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $192.call(this); + } + } else { + return $192.call(this); + } + } + function $192() { + if (!true === false) { + if (!!this._mode === false) { + return $195.call(this); } else { - return $38.call(this); + return $e.call(this); } } else { - return $38.call(this); + return $e.call(this); + } + } + function $195() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $130.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; } + return; } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML)); diff --git a/test/data/make/reference-result/pages/client/client.bemhtml.js b/test/data/make/reference-result/pages/client/client.bemhtml.js index bfd5e1f3..a5b6bcbc 100644 --- a/test/data/make/reference-result/pages/client/client.bemhtml.js +++ b/test/data/make/reference-result/pages/client/client.bemhtml.js @@ -1,1584 +1,339 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34, __r44, __r45, __r46; - exports.apply = apply; - function apply() { - return $79.call(this); - } - function $3() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); - }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } - }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $4() { - return this["ctx"]["content"]; - return; - } - function $5() { - if (!!this["_start"] === false) { - return $3.call(this); + function $1() { + var __t = this._mode; + if (__t === "tag") { + return $2.call(this); + } else if (__t === "content") { + return $42.call(this); + } else if (__t === "attrs") { + return $64.call(this); + } else if (__t === "js") { + return $98.call(this); + } else if (__t === "bem") { + return $109.call(this); + } else if (__t === "default") { + return $130.call(this); } else { - return $4.call(this); + return $152.call(this); } } - function $7() { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; + function $2() { + var __t = this.block; + if (__t === "b-link") { + if (this.elem === "inner") { + return "span"; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } - function $11() { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - function $12() { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - } - function $13() { - return undefined; - return; - } - function $14() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $13.call(this); - } - } - function $18() { - return true; - return; - } - function $21() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $79.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $79.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $79.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $79.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $79.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return this.ctx.url ? "a" : "span"; + return; } else { - undefined; + return $12.call(this); } } else { - undefined; + return $12.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $79.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $79.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); - } - } else { - undefined; - } - } else { - undefined; - } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $79.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $79.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $152.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $22() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } - function $32() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } - } - } + return $152.call(this); } } else { - return $e.call(this, []); + return $152.call(this); } } - function $33() { - if (!!this["_start"] === false) { - return $3.call(this); + function $12() { + if (!!this.elem === false) { + return "a"; + return; } else { - return $32.call(this); + return $152.call(this); } } - function $38() { - var __this = this; - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); + function $42() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.ctx._wrap === false) { + if (!!this.elem === false) { + if (!!this.mods.inner === false) { + { + { ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; + var __r48 = this._mode; + this._mode = ""; + var __r49 = this.ctx; + this.ctx = { + elem: "inner", + content: this.ctx.content, + _wrap: true + }; + $152.call(this); + this._mode = __r48; + this.ctx = __r49; ""; - undefined; - return; - } else { - return $e.call(this, []); } + undefined; + undefined; + undefined; } - } - } - } else { - return $e.call(this, []); - } - } - } - } - function $43() { - var __this = this; - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return this["ctx"]["url"] ? "a" : "span"; - return; - } else if (__t === "content") { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else if (__t === "attrs") { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); + return $152.call(this); } - return a; - return; - } - } else if (__t === "js") { - return true; - return; - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); + return; + } else { + return $152.call(this); } } else { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return "a"; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + return $152.call(this); + } + } + function $64() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + if (!!this.ctx.url === false) { + return {}; return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $74.call(this); } - } - } - function $45() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url + }; + return; } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - return $45.call(this); - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + if (!this.ctx.url === false) { + return { + src: this.ctx.url + }; return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $152.call(this); } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; return; - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } + return $152.call(this); } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } + } else { + return $152.call(this); } } - function $48() { - return "link"; - return; + function $74() { + if (!!this.elem === false) { + return $76.call(this); + } else { + return $152.call(this); + } } - function $50() { - return false; + function $76() { + var __r44, __r45, __r46, __r47; + { + var ctx = this.ctx, props = [ "title", "target" ], p = typeof ctx.url, a = { + href: p === "undefined" || p === "string" ? ctx.url : (p = [], "", __r44 = this._buf, this._buf = p, __r45 = this._mode, this._mode = "", __r46 = this.ctx, this.ctx = ctx.url, __r47 = $152.call(this), this._buf = __r44, this._mode = __r45, this.ctx = __r46, "", __r47, p.join("")) + }; + while (p = props.pop()) { + ctx[p] && (a[p] = ctx[p]); + } + undefined; + return a; + } return; } - function $51() { - if (!!this["elem"] === false) { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; + function $98() { + if (this.block === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return true; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } else { - if (!!this["_start"] === false) { - return $3.call(this); + return $152.call(this); + } + } + function $109() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; } else { - return $21.call(this); + return $152.call(this); } + } else { + return $152.call(this); } } - function $53() { - return "script"; - return; + function $130() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $135.call(this); + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $152.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } - function $60() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $135() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } } } + } + return; + } + function $140() { + if (!!this.elem === false) { + return $142.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $152.call(this); + } + } + function $142() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -1596,384 +351,468 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $152() { + if (!!this._start === false) { + return $154.call(this); + } else { + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; + return; + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { + return undefined; return; + } else if (__t === "default") { + return $173.call(this); } else { - if (!!this["_start"] === false) { - return $3.call(this); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } + return; + } else { + return $180.call(this); + } } else { - return $21.call(this); + return $180.call(this); } } } } - function $74() { - var __t = this["_mode"]; - if (__t === "tag") { - return $14.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $74.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } - function $79() { - var __t = this["block"]; - if (__t === "b-link") { - var __t = this["elem"]; - if (__t === "inner") { - var __t = this["_mode"]; - if (__t === "tag") { - return "span"; - return; - } else if (__t === "content") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $7.call(this); + function $154() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); + } + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); + } + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); + } + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; + } } else { - return $5.call(this); + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; + } else { + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; + } else { + undefined; + } + } } - } else { - return $5.call(this); - } - } else if (__t === "attrs") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $12.call(this); + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - return $14.call(this); + undefined; } - } else { - if (!!this["elem"] === false) { - return $11.call(this); + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + } else { + undefined; + } + } } else { - return $14.call(this); + undefined; } + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } - } else if (__t === "js") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $18.call(this); + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; } else { - return $14.call(this); + undefined; } - } else { - return $14.call(this); - } - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "favicon") { - return $43.call(this); - } else if (__t === "js") { - return $43.call(this); - } else if (__t === "css") { - return $43.call(this); - } else if (__t === "meta") { - return $43.call(this); - } else if (__t === "body") { - return $43.call(this); - } else if (__t === "head") { - return $43.call(this); - } else if (__t === "core") { - return $43.call(this); - } else { - return $43.call(this); - } - } else if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "inner") { - return $47.call(this); - } else if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; }; - return; - } else { - return $14.call(this); - } - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); + } + }; + ctx.apply(); + return ctx._buf.join(""); + } + return; + } + function $173() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $2.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $98.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $33.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $109.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $152.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $152.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $33.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "tag") { - return "style"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "tag") { - return "meta"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $152.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $33.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "tag") { - return "body"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $64.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $33.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "tag") { - return "head"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $42.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $152.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $33.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "inner") { - return $38.call(this); - } else if (__t === "favicon") { - return $38.call(this); - } else if (__t === "js") { - return $38.call(this); - } else if (__t === "css") { - return $38.call(this); - } else if (__t === "meta") { - return $38.call(this); - } else if (__t === "body") { - return $38.call(this); - } else if (__t === "head") { - return $38.call(this); - } else if (__t === "core") { - return $74.call(this); + } + return; + } + function $180() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $38.call(this); + return $186.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); + } else { + return $186.call(this); + } + } + function $186() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $192.call(this); + } + } else { + return $192.call(this); + } + } + function $192() { + if (!true === false) { + if (!!this._mode === false) { + return $195.call(this); } else { - return $38.call(this); + return $e.call(this); } } else { - return $38.call(this); + return $e.call(this); + } + } + function $195() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $130.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; } + return; } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML)); diff --git a/test/data/make/reference-result/pages/example/_example.bemhtml.js b/test/data/make/reference-result/pages/example/_example.bemhtml.js index bfd5e1f3..a5b6bcbc 100644 --- a/test/data/make/reference-result/pages/example/_example.bemhtml.js +++ b/test/data/make/reference-result/pages/example/_example.bemhtml.js @@ -1,1584 +1,339 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34, __r44, __r45, __r46; - exports.apply = apply; - function apply() { - return $79.call(this); - } - function $3() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); - }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } - }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $4() { - return this["ctx"]["content"]; - return; - } - function $5() { - if (!!this["_start"] === false) { - return $3.call(this); + function $1() { + var __t = this._mode; + if (__t === "tag") { + return $2.call(this); + } else if (__t === "content") { + return $42.call(this); + } else if (__t === "attrs") { + return $64.call(this); + } else if (__t === "js") { + return $98.call(this); + } else if (__t === "bem") { + return $109.call(this); + } else if (__t === "default") { + return $130.call(this); } else { - return $4.call(this); + return $152.call(this); } } - function $7() { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; + function $2() { + var __t = this.block; + if (__t === "b-link") { + if (this.elem === "inner") { + return "span"; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } - function $11() { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - function $12() { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - } - function $13() { - return undefined; - return; - } - function $14() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $13.call(this); - } - } - function $18() { - return true; - return; - } - function $21() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $79.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $79.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $79.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $79.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $79.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return this.ctx.url ? "a" : "span"; + return; } else { - undefined; + return $12.call(this); } } else { - undefined; + return $12.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $79.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $79.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); - } - } else { - undefined; - } - } else { - undefined; - } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $79.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $79.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $152.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $22() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } - function $32() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } - } - } + return $152.call(this); } } else { - return $e.call(this, []); + return $152.call(this); } } - function $33() { - if (!!this["_start"] === false) { - return $3.call(this); + function $12() { + if (!!this.elem === false) { + return "a"; + return; } else { - return $32.call(this); + return $152.call(this); } } - function $38() { - var __this = this; - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); + function $42() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.ctx._wrap === false) { + if (!!this.elem === false) { + if (!!this.mods.inner === false) { + { + { ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; + var __r48 = this._mode; + this._mode = ""; + var __r49 = this.ctx; + this.ctx = { + elem: "inner", + content: this.ctx.content, + _wrap: true + }; + $152.call(this); + this._mode = __r48; + this.ctx = __r49; ""; - undefined; - return; - } else { - return $e.call(this, []); } + undefined; + undefined; + undefined; } - } - } - } else { - return $e.call(this, []); - } - } - } - } - function $43() { - var __this = this; - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return this["ctx"]["url"] ? "a" : "span"; - return; - } else if (__t === "content") { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else if (__t === "attrs") { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); + return $152.call(this); } - return a; - return; - } - } else if (__t === "js") { - return true; - return; - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); + return; + } else { + return $152.call(this); } } else { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return "a"; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + return $152.call(this); + } + } + function $64() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + if (!!this.ctx.url === false) { + return {}; return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $74.call(this); } - } - } - function $45() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url + }; + return; } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - return $45.call(this); - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + if (!this.ctx.url === false) { + return { + src: this.ctx.url + }; return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $152.call(this); } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; return; - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } + return $152.call(this); } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } + } else { + return $152.call(this); } } - function $48() { - return "link"; - return; + function $74() { + if (!!this.elem === false) { + return $76.call(this); + } else { + return $152.call(this); + } } - function $50() { - return false; + function $76() { + var __r44, __r45, __r46, __r47; + { + var ctx = this.ctx, props = [ "title", "target" ], p = typeof ctx.url, a = { + href: p === "undefined" || p === "string" ? ctx.url : (p = [], "", __r44 = this._buf, this._buf = p, __r45 = this._mode, this._mode = "", __r46 = this.ctx, this.ctx = ctx.url, __r47 = $152.call(this), this._buf = __r44, this._mode = __r45, this.ctx = __r46, "", __r47, p.join("")) + }; + while (p = props.pop()) { + ctx[p] && (a[p] = ctx[p]); + } + undefined; + return a; + } return; } - function $51() { - if (!!this["elem"] === false) { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; + function $98() { + if (this.block === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return true; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } else { - if (!!this["_start"] === false) { - return $3.call(this); + return $152.call(this); + } + } + function $109() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; } else { - return $21.call(this); + return $152.call(this); } + } else { + return $152.call(this); } } - function $53() { - return "script"; - return; + function $130() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $135.call(this); + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $152.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } - function $60() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $135() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } } } + } + return; + } + function $140() { + if (!!this.elem === false) { + return $142.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $152.call(this); + } + } + function $142() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -1596,384 +351,468 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $152() { + if (!!this._start === false) { + return $154.call(this); + } else { + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; + return; + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { + return undefined; return; + } else if (__t === "default") { + return $173.call(this); } else { - if (!!this["_start"] === false) { - return $3.call(this); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } + return; + } else { + return $180.call(this); + } } else { - return $21.call(this); + return $180.call(this); } } } } - function $74() { - var __t = this["_mode"]; - if (__t === "tag") { - return $14.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $74.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } - function $79() { - var __t = this["block"]; - if (__t === "b-link") { - var __t = this["elem"]; - if (__t === "inner") { - var __t = this["_mode"]; - if (__t === "tag") { - return "span"; - return; - } else if (__t === "content") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $7.call(this); + function $154() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); + } + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); + } + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); + } + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; + } } else { - return $5.call(this); + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; + } else { + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; + } else { + undefined; + } + } } - } else { - return $5.call(this); - } - } else if (__t === "attrs") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $12.call(this); + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - return $14.call(this); + undefined; } - } else { - if (!!this["elem"] === false) { - return $11.call(this); + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + } else { + undefined; + } + } } else { - return $14.call(this); + undefined; } + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } - } else if (__t === "js") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $18.call(this); + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; } else { - return $14.call(this); + undefined; } - } else { - return $14.call(this); - } - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "favicon") { - return $43.call(this); - } else if (__t === "js") { - return $43.call(this); - } else if (__t === "css") { - return $43.call(this); - } else if (__t === "meta") { - return $43.call(this); - } else if (__t === "body") { - return $43.call(this); - } else if (__t === "head") { - return $43.call(this); - } else if (__t === "core") { - return $43.call(this); - } else { - return $43.call(this); - } - } else if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "inner") { - return $47.call(this); - } else if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; }; - return; - } else { - return $14.call(this); - } - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); + } + }; + ctx.apply(); + return ctx._buf.join(""); + } + return; + } + function $173() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $2.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $98.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $33.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $109.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $152.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $152.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $33.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "tag") { - return "style"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "tag") { - return "meta"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $152.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $33.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "tag") { - return "body"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $64.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $33.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "tag") { - return "head"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $42.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $152.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $33.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "inner") { - return $38.call(this); - } else if (__t === "favicon") { - return $38.call(this); - } else if (__t === "js") { - return $38.call(this); - } else if (__t === "css") { - return $38.call(this); - } else if (__t === "meta") { - return $38.call(this); - } else if (__t === "body") { - return $38.call(this); - } else if (__t === "head") { - return $38.call(this); - } else if (__t === "core") { - return $74.call(this); + } + return; + } + function $180() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $38.call(this); + return $186.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); + } else { + return $186.call(this); + } + } + function $186() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $192.call(this); + } + } else { + return $192.call(this); + } + } + function $192() { + if (!true === false) { + if (!!this._mode === false) { + return $195.call(this); } else { - return $38.call(this); + return $e.call(this); } } else { - return $38.call(this); + return $e.call(this); + } + } + function $195() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $130.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; } + return; } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML)); diff --git a/test/data/make/reference-result/pages/example/example.bemhtml.js b/test/data/make/reference-result/pages/example/example.bemhtml.js index bfd5e1f3..a5b6bcbc 100644 --- a/test/data/make/reference-result/pages/example/example.bemhtml.js +++ b/test/data/make/reference-result/pages/example/example.bemhtml.js @@ -1,1584 +1,339 @@ var BEMHTML = (function(exports) { - var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34, __r44, __r45, __r46; - exports.apply = apply; - function apply() { - return $79.call(this); - } - function $3() { - var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = { - area: 1, - base: 1, - br: 1, - col: 1, - command: 1, - embed: 1, - hr: 1, - img: 1, - input: 1, - keygen: 1, - link: 1, - meta: 1, - param: 1, - source: 1, - wbr: 1 - }; - (function(BEM, undefined) { - var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; - var buildModPostfix = function(modName, modVal, buffer) { - buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); - }; - var buildBlockClass = function(name, modName, modVal, buffer) { - buffer.push(name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - var buildElemClass = function(block, name, modName, modVal, buffer) { - buildBlockClass(block, undefined, undefined, buffer); - buffer.push(ELEM_DELIM, name); - modVal && buildModPostfix(modName, modVal, buffer); - }; - BEM["INTERNAL"] = { - NAME_PATTERN: NAME_PATTERN, - MOD_DELIM: MOD_DELIM, - ELEM_DELIM: ELEM_DELIM, - buildModPostfix: function(modName, modVal, buffer) { - var res = buffer || []; - buildModPostfix(modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildClass: function(block, elem, modName, modVal, buffer) { - var typeOf = typeof modName; - if (typeOf == "string") { - if (typeof modVal != "string") { - buffer = modVal; - modVal = modName; - modName = elem; - elem = undefined; - } else { - undefined; - } - } else { - if (typeOf != "undefined") { - buffer = modName; - modName = undefined; - } else { - if (elem && typeof elem != "string") { - buffer = elem; - elem = undefined; - } else { - undefined; - } - } - } - undefined; - if (!(elem || modName || buffer)) { - return block; - } else { - undefined; - } - undefined; - var res = buffer || []; - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - return buffer ? res : res.join(""); - }, - buildModsClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - if (mods) { - var modName; - for (modName in mods) { - if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) { - var modVal = mods[modName]; - res.push(" "); - elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); - } else { - undefined; - } - } - } else { - undefined; - } - undefined; - return buffer ? res : res.join(""); - }, - buildClasses: function(block, elem, mods, buffer) { - var res = buffer || []; - elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); - this.buildModsClasses(block, elem, mods, buffer); - return buffer ? res : res.join(""); - } - }; - })(BEM_); - var buildEscape = function() { - var ts = { - '"': """, - "&": "&", - "<": "<", - ">": ">" - }, f = function(t) { - return ts[t] || t; - }; - return function(r) { - r = new RegExp(r, "g"); - return function(s) { - return ("" + s).replace(r, f); - }; - }; - }(), ctx = { - ctx: this, - _start: true, - apply: apply, - _buf: [], - _: { - isArray: function(obj) { - return toString.call(obj) === "[object Array]"; - }, - isSimple: function(obj) { - var t = typeof obj; - return t === "string" || t === "number" || t === "boolean"; - }, - isShortTag: function(t) { - return SHORT_TAGS.hasOwnProperty(t); - }, - extend: function(o1, o2) { - if (!o1 || !o2) { - return o1 || o2; - } else { - undefined; - } - undefined; - var res = {}, n; - for (n in o1) { - o1.hasOwnProperty(n) && (res[n] = o1[n]); - } - undefined; - for (n in o2) { - o2.hasOwnProperty(n) && (res[n] = o2[n]); - } - undefined; - return res; - }, - identify: function() { - var cnt = 0, expando = "__" + +(new Date), get = function() { - return "uniq" + ++cnt; - }; - return function(obj, onlyGet) { - if (!obj) { - return get(); - } else { - undefined; - } - undefined; - if (onlyGet || obj[expando]) { - return obj[expando]; - } else { - return obj[expando] = get(); - } - }; - }(), - xmlEscape: buildEscape("[&<>]"), - attrEscape: buildEscape('["&<>]') - }, - BEM: BEM_, - isFirst: function() { - return this["position"] === 1; - }, - isLast: function() { - return this["position"] === this["_listLength"]; - }, - generateId: function() { - return this["_"].identify(this["ctx"]); - } - }; - ctx.apply(); - return ctx["_buf"].join(""); - return; - } - function $4() { - return this["ctx"]["content"]; - return; - } - function $5() { - if (!!this["_start"] === false) { - return $3.call(this); + function $1() { + var __t = this._mode; + if (__t === "tag") { + return $2.call(this); + } else if (__t === "content") { + return $42.call(this); + } else if (__t === "attrs") { + return $64.call(this); + } else if (__t === "js") { + return $98.call(this); + } else if (__t === "bem") { + return $109.call(this); + } else if (__t === "default") { + return $130.call(this); } else { - return $4.call(this); + return $152.call(this); } } - function $7() { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; + function $2() { + var __t = this.block; + if (__t === "b-link") { + if (this.elem === "inner") { + return "span"; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } - function $11() { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - function $12() { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } - } - function $13() { - return undefined; - return; - } - function $14() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $13.call(this); - } - } - function $18() { - return true; - return; - } - function $21() { - var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag; - tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $79.call(this), this["_mode"] = __r8, "", __r9); - typeof tag != "undefined" || (tag = v["tag"]); - typeof tag != "undefined" || (tag = "div"); - if (tag) { - var jsParams, js; - if (this["block"] && v["js"] !== false) { - js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $79.call(this), this["_mode"] = __r12, "", __r13); - js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"]; - js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js); - } else { - undefined; - } - undefined; - buf.push("<", tag); - var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $79.call(this), this["_mode"] = __r14, "", __r15); - typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]); - var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $79.call(this), this["_mode"] = __r16, "", __r17); - cls || (cls = v["cls"]); - var addJSInitClass = v["block"] && jsParams; - if (isBEM || cls) { - buf.push(' class="'); - if (isBEM) { - BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf); - var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $79.call(this), this["_mode"] = __r18, "", __r19); - v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]); - if (mix) { - var i = 0, l = mix["length"], mixItem, hasItem, block; - while (i < l) { - mixItem = mix[i++]; - hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"]; - hasItem && buf.push(" "); - BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf); - if (mixItem["js"]) { - (jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"]; - addJSInitClass || (addJSInitClass = block && !mixItem["elem"]); - } else { - undefined; - } - } + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return this.ctx.url ? "a" : "span"; + return; } else { - undefined; + return $12.call(this); } } else { - undefined; + return $12.call(this); } - undefined; - cls && buf.push(isBEM ? " " : "", cls); - addJSInitClass && buf.push(" i-bem"); - buf.push('"'); - } else { - undefined; - } - undefined; - if (jsParams) { - var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $79.call(this), this["_mode"] = __r22, "", __r23); - buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"'); - } else { - undefined; } - undefined; - var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $79.call(this), this["_mode"] = __r24, "", __r25); - attrs = this["_"].extend(attrs, v["attrs"]); - if (attrs) { - var name; - for (name in attrs) { - buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"'); - } - } else { - undefined; - } - } else { - undefined; - } - if (this["_"].isShortTag(tag)) { - buf.push("/>"); - } else { - tag && buf.push(">"); - var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $79.call(this), this["_mode"] = __r26, "", __r27); - if (content || content === 0) { - var isBEM = this["block"] || this["elem"]; - { - ""; - var __r28 = this["_notNewList"]; - this["_notNewList"] = false; - var __r29 = this["position"]; - this["position"] = isBEM ? 1 : this["position"]; - var __r30 = this["_listLength"]; - this["_listLength"] = isBEM ? 1 : this["_listLength"]; - var __r31 = this["ctx"]; - this["ctx"] = content; - var __r32 = this["_mode"]; - this["_mode"] = ""; - $79.call(this); - this["_notNewList"] = __r28; - this["position"] = __r29; - this["_listLength"] = __r30; - this["ctx"] = __r31; - this["_mode"] = __r32; - ""; + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return "link"; + return; + } else if (__t === "js") { + return "script"; + return; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return "link"; + return; + } else { + return "style"; + return; } - undefined; - undefined; - undefined; + } else if (__t === "meta") { + return "meta"; + return; + } else if (__t === "body") { + return "body"; + return; + } else if (__t === "head") { + return "head"; + return; } else { - undefined; + return $152.call(this); } - undefined; - tag && buf.push(""); - } - return; - } - function $22() { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } - function $32() { - var __this = this; - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return "script"; return; } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this); - } - } - } + return $152.call(this); } } else { - return $e.call(this, []); + return $152.call(this); } } - function $33() { - if (!!this["_start"] === false) { - return $3.call(this); + function $12() { + if (!!this.elem === false) { + return "a"; + return; } else { - return $32.call(this); + return $152.call(this); } } - function $38() { - var __this = this; - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); + function $42() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.ctx._wrap === false) { + if (!!this.elem === false) { + if (!!this.mods.inner === false) { + { + { ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; + var __r48 = this._mode; + this._mode = ""; + var __r49 = this.ctx; + this.ctx = { + elem: "inner", + content: this.ctx.content, + _wrap: true + }; + $152.call(this); + this._mode = __r48; + this.ctx = __r49; ""; - undefined; - return; - } else { - return $e.call(this, []); } + undefined; + undefined; + undefined; } - } - } - } else { - return $e.call(this, []); - } - } - } - } - function $43() { - var __this = this; - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return this["ctx"]["url"] ? "a" : "span"; - return; - } else if (__t === "content") { - if (!!this["ctx"]["_wrap"] === false) { - if (!!this["mods"]["inner"] === false) { - ""; - var __r48 = this["_mode"]; - this["_mode"] = ""; - var __r49 = this["ctx"]; - this["ctx"] = { - elem: "inner", - content: this["ctx"]["content"], - _wrap: true - }; - $79.call(this); - this["_mode"] = __r48; - this["ctx"] = __r49; - ""; - undefined; - undefined; - undefined; return; } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } - } else if (__t === "attrs") { - if (!!this["ctx"]["url"] === false) { - return {}; - return; - } else { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); + return $152.call(this); } - return a; - return; - } - } else if (__t === "js") { - return true; - return; - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return [ ";(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);" ].join(""); + return; + } else { + return $152.call(this); } } else { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return "a"; - return; - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = { - href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join("")) - }; - while (p = props.pop()) { - ctx[p] && (a[p] = ctx[p]); - } - return a; - return; - } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + return $152.call(this); + } + } + function $64() { + var __t = this.block; + if (__t === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + if (!!this.ctx.url === false) { + return {}; return; - } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $74.call(this); } } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } - } + return $74.call(this); } - } - } - function $45() { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; - } - function $47() { - var __this = this; - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "content") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return this["ctx"]["content"]; - return; - } - } else if (__t === "attrs") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } + } else if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon") { + return { + rel: "shortcut icon", + href: this.ctx.url + }; + return; } else if (__t === "js") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "bem") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; - return; - } - } else if (__t === "default") { - return $45.call(this); - } else if (__t === "mix") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + if (!this.ctx.url === false) { + return { + src: this.ctx.url + }; return; - } - } else if (__t === "jsAttr") { - if (!!this["_start"] === false) { - return $3.call(this); } else { - return undefined; - return; + return $152.call(this); } - } else if (__t === "cls") { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return undefined; + } else if (__t === "css") { + if (!this.ctx.url === false) { + return { + rel: "stylesheet", + href: this.ctx.url + }; return; - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } + return $152.call(this); } - } - } else { - if (!!this["_start"] === false) { - return $3.call(this); + } else if (__t === "meta") { + return this.ctx.attrs; + return; } else { - var __t = this["_mode"]; - if (__t === "tag") { - return undefined; - return; - } else if (__t === "content") { - return this["ctx"]["content"]; - return; - } else if (__t === "attrs") { - return undefined; - return; - } else if (__t === "js") { - return undefined; - return; - } else if (__t === "bem") { - return undefined; - return; - } else if (__t === "default") { - return $21.call(this); - } else if (__t === "mix") { - return undefined; - return; - } else if (__t === "jsAttr") { - return undefined; - return; - } else if (__t === "cls") { - return undefined; - return; - } else { - if (!!this["_mode"] === false) { - if (!this["_"].isSimple(this["ctx"]) === false) { - this["_listLength"]--; - var ctx = this["ctx"]; - (ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx); - return; - } else { - if (!!this["ctx"] === false) { - this["_listLength"]--; - return; - } else { - if (!this["_"].isArray(this["ctx"]) === false) { - var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"]; - if (prevNotNewList) { - this["_listLength"] += l - 1; - } else { - this["position"] = 0; - this["_listLength"] = l; - } - this["_notNewList"] = true; - while (i < l) { - { - ""; - var __r7 = this["ctx"]; - this["ctx"] = v[i++]; - apply.call(__this); - this["ctx"] = __r7; - ""; - } - undefined; - } - undefined; - prevNotNewList || (this["position"] = prevPos); - return; - } else { - if (!true === false) { - var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"]; - this["ctx"] || (this["ctx"] = {}); - ""; - var __r0 = this["_mode"]; - this["_mode"] = "default"; - var __r1 = this["block"]; - this["block"] = vBlock || (vElem ? block : undefined); - var __r2 = this["_currBlock"]; - this["_currBlock"] = vBlock || vElem ? undefined : block; - var __r3 = this["elem"]; - this["elem"] = this["ctx"]["elem"]; - var __r4 = this["mods"]; - this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {}; - var __r5 = this["elemMods"]; - this["elemMods"] = this["ctx"]["elemMods"] || {}; - this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--; - $79.call(this); - undefined; - undefined; - this["_mode"] = __r0; - this["block"] = __r1; - this["_currBlock"] = __r2; - this["elem"] = __r3; - this["mods"] = __r4; - this["elemMods"] = __r5; - ""; - undefined; - return; - } else { - return $e.call(this, []); - } - } - } - } - } else { - return $e.call(this, []); - } - } + return $152.call(this); } + } else { + return $152.call(this); } } - function $48() { - return "link"; - return; + function $74() { + if (!!this.elem === false) { + return $76.call(this); + } else { + return $152.call(this); + } } - function $50() { - return false; + function $76() { + var __r44, __r45, __r46, __r47; + { + var ctx = this.ctx, props = [ "title", "target" ], p = typeof ctx.url, a = { + href: p === "undefined" || p === "string" ? ctx.url : (p = [], "", __r44 = this._buf, this._buf = p, __r45 = this._mode, this._mode = "", __r46 = this.ctx, this.ctx = ctx.url, __r47 = $152.call(this), this._buf = __r44, this._mode = __r45, this.ctx = __r46, "", __r47, p.join("")) + }; + while (p = props.pop()) { + ctx[p] && (a[p] = ctx[p]); + } + undefined; + return a; + } return; } - function $51() { - if (!!this["elem"] === false) { - this["_buf"].push(""); - ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { - tag: "html", - cls: "i-ua_js_no i-ua_css_standard", - content: [ { - elem: "head", - content: [ { - tag: "meta", - attrs: { - charset: "utf-8" - } - }, { - tag: "meta", - attrs: { - "http-equiv": "X-UA-Compatible", - content: "IE=EmulateIE7, IE=edge" - } - }, { - tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { - elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { - block: "i-ua" - }, this["ctx"]["head"] ] - }, { - elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] - } ] - }; - this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; - ""; - return; + function $98() { + if (this.block === "b-link") { + if (!(this.mods && this.mods.pseudo) === false) { + if (!!this.elem === false) { + return true; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } else { - if (!!this["_start"] === false) { - return $3.call(this); + return $152.call(this); + } + } + function $109() { + var __t = this.block; + if (__t === "b-page") { + var __t = this.elem; + if (__t === "favicon" || __t === "js" || __t === "css" || __t === "meta" || __t === "head") { + return false; + return; + } else { + return $152.call(this); + } + } else if (__t === "i-ua") { + if (!!this.elem === false) { + return false; + return; } else { - return $21.call(this); + return $152.call(this); } + } else { + return $152.call(this); } } - function $53() { - return "script"; - return; + function $130() { + var __t = this.block; + if (__t === "b-page") { + if (this.elem === "css") { + if (!this.ctx.hasOwnProperty("ie") === false) { + if (!!this.ctx._ieCommented === false) { + return $135.call(this); + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else { + return $140.call(this); + } + } else if (__t === "i-jquery") { + if (this.elem === "core") { + var __r33, __r34, __r35; + return "", __r33 = this._mode, this._mode = "", __r34 = this.ctx, this.ctx = { + block: "b-page", + elem: "js", + url: "//yandex.st/jquery/1.7.2/jquery.min.js" + }, __r35 = $152.call(this), this._mode = __r33, this.ctx = __r34, "", __r35; + return; + } else { + return $152.call(this); + } + } else { + return $152.call(this); + } } - function $60() { - if (!this["ctx"].hasOwnProperty("ie") === false) { - if (!!this["ctx"]["_ieCommented"] === false) { - var ie = this["ctx"]["ie"]; - if (ie === true) { + function $135() { + { + var ie = this.ctx.ie; + if (ie === true) { + { ""; - var __r38 = this["_mode"]; - this["_mode"] = ""; - var __r39 = this["ctx"]; - this["ctx"] = [ 6, 7, 8, 9 ].map(function(v) { + var __r38 = this._mode; + this._mode = ""; + var __r39 = this.ctx; + this.ctx = [ 6, 7, 8, 9 ].map(function(v) { return { elem: "css", - url: this["ctx"]["url"] + ".ie" + v + ".css", + url: this.ctx.url + ".ie" + v + ".css", ie: "IE " + v }; }, this); this.apply(); - this["_mode"] = __r38; - this["ctx"] = __r39; + this._mode = __r38; + this.ctx = __r39; ""; - } else { - var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; - this.apply(); - this["_mode"] = __r40; - __r41["_ieCommented"] = __r42; - this["ctx"] = __r43; - ""; - } } - return; } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + var hideRule = !ie ? [ "gt IE 9", "", "", "" ]; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r40; + __r41._ieCommented = __r42; + this.ctx = __r43; ""; - return; - } else { - if (!!this["_start"] === false) { - return $3.call(this); - } else { - return $21.call(this); - } } } + } + return; + } + function $140() { + if (!!this.elem === false) { + return $142.call(this); } else { - if (!!this["elem"] === false) { - this["_buf"].push(""); + return $152.call(this); + } + } + function $142() { + { + this._buf.push(""); + { ""; - var __r36 = this["_mode"]; - this["_mode"] = ""; - var __r37 = this["ctx"]; - this["ctx"] = { + var __r36 = this._mode; + this._mode = ""; + var __r37 = this.ctx; + this.ctx = { tag: "html", cls: "i-ua_js_no i-ua_css_standard", content: [ { @@ -1596,384 +351,468 @@ var BEMHTML = (function(exports) { } }, { tag: "title", - content: this["ctx"]["title"] - }, this["ctx"]["favicon"] ? { + content: this.ctx.title + }, this.ctx.favicon ? { elem: "favicon", - url: this["ctx"]["favicon"] - } : "", this["ctx"]["meta"], { + url: this.ctx.favicon + } : "", this.ctx.meta, { block: "i-ua" - }, this["ctx"]["head"] ] + }, this.ctx.head ] }, { elem: "body", - mix: [ this["ctx"] ], - content: [ this["ctx"]["content"] ] + mix: [ this.ctx ], + content: [ this.ctx.content ] } ] }; this.apply(); - this["_mode"] = __r36; - this["ctx"] = __r37; + this._mode = __r36; + this.ctx = __r37; ""; + } + } + return; + } + function $152() { + if (!!this._start === false) { + return $154.call(this); + } else { + var __t = this._mode; + if (__t === "content") { + return this.ctx.content; + return; + } else if (__t === "mix" || __t === "bem" || __t === "jsAttr" || __t === "js" || __t === "cls" || __t === "attrs" || __t === "tag") { + return undefined; return; + } else if (__t === "default") { + return $173.call(this); } else { - if (!!this["_start"] === false) { - return $3.call(this); + if (!this._.isSimple(this.ctx) === false) { + if (!!this._mode === false) { + { + this._listLength--; + var ctx = this.ctx; + (ctx && ctx !== true || ctx === 0) && this._buf.push(ctx); + } + return; + } else { + return $180.call(this); + } } else { - return $21.call(this); + return $180.call(this); } } } } - function $74() { - var __t = this["_mode"]; - if (__t === "tag") { - return $14.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return "", __r33 = this["_mode"], this["_mode"] = "", __r34 = this["ctx"], this["ctx"] = { - block: "b-page", - elem: "js", - url: "//yandex.st/jquery/1.7.2/jquery.min.js" - }, __r35 = $74.call(this), this["_mode"] = __r33, this["ctx"] = __r34, "", __r35; - return; - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } - function $79() { - var __t = this["block"]; - if (__t === "b-link") { - var __t = this["elem"]; - if (__t === "inner") { - var __t = this["_mode"]; - if (__t === "tag") { - return "span"; - return; - } else if (__t === "content") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $7.call(this); + function $154() { + { + var BEM_ = {}, toString = Object.prototype.toString, SHORT_TAGS = { + area: 1, + base: 1, + br: 1, + col: 1, + command: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + wbr: 1 + }; + (function(BEM, undefined) { + var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+"; + function buildModPostfix(modName, modVal, buffer) { + buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal); + } + function buildBlockClass(name, modName, modVal, buffer) { + buffer.push(name); + modVal && buildModPostfix(modName, modVal, buffer); + } + function buildElemClass(block, name, modName, modVal, buffer) { + buildBlockClass(block, undefined, undefined, buffer); + buffer.push(ELEM_DELIM, name); + modVal && buildModPostfix(modName, modVal, buffer); + } + BEM.INTERNAL = { + NAME_PATTERN: NAME_PATTERN, + MOD_DELIM: MOD_DELIM, + ELEM_DELIM: ELEM_DELIM, + buildModPostfix: function(modName, modVal, buffer) { + var res = buffer || []; + buildModPostfix(modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildClass: function(block, elem, modName, modVal, buffer) { + var typeOf = typeof modName; + if (typeOf == "string") { + if (typeof modVal != "string") { + buffer = modVal; + modVal = modName; + modName = elem; + elem = undefined; + } else { + undefined; + } } else { - return $5.call(this); + if (typeOf != "undefined") { + buffer = modName; + modName = undefined; + } else { + if (elem && typeof elem != "string") { + buffer = elem; + elem = undefined; + } else { + undefined; + } + } } - } else { - return $5.call(this); - } - } else if (__t === "attrs") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $12.call(this); + undefined; + if (!(elem || modName || buffer)) { + return block; } else { - return $14.call(this); + undefined; } - } else { - if (!!this["elem"] === false) { - return $11.call(this); + undefined; + var res = buffer || []; + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + return buffer ? res : res.join(""); + }, + buildModsClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + if (mods) { + var modName; + for (modName in mods) { + if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName].length) { + var modVal = mods[modName]; + res.push(" "); + elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res); + } else { + undefined; + } + } } else { - return $14.call(this); + undefined; } + undefined; + return buffer ? res : res.join(""); + }, + buildClasses: function(block, elem, mods, buffer) { + var res = buffer || []; + elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res); + this.buildModsClasses(block, elem, mods, buffer); + return buffer ? res : res.join(""); } - } else if (__t === "js") { - if (!(this["mods"] && this["mods"]["pseudo"]) === false) { - if (!!this["elem"] === false) { - return $18.call(this); + }; + })(BEM_); + var buildEscape = function() { + var ts = { + '"': """, + "&": "&", + "<": "<", + ">": ">" + }, f = function(t) { + return ts[t] || t; + }; + return function(r) { + r = new RegExp(r, "g"); + return function(s) { + return ("" + s).replace(r, f); + }; + }; + }(), ctx = { + ctx: this, + _start: true, + apply: apply, + _buf: [], + _: { + isArray: function(obj) { + return toString.call(obj) === "[object Array]"; + }, + isSimple: function(obj) { + var t = typeof obj; + return t === "string" || t === "number" || t === "boolean"; + }, + isShortTag: function(t) { + return SHORT_TAGS.hasOwnProperty(t); + }, + extend: function(o1, o2) { + if (!o1 || !o2) { + return o1 || o2; } else { - return $14.call(this); + undefined; } - } else { - return $14.call(this); - } - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "favicon") { - return $43.call(this); - } else if (__t === "js") { - return $43.call(this); - } else if (__t === "css") { - return $43.call(this); - } else if (__t === "meta") { - return $43.call(this); - } else if (__t === "body") { - return $43.call(this); - } else if (__t === "head") { - return $43.call(this); - } else if (__t === "core") { - return $43.call(this); - } else { - return $43.call(this); - } - } else if (__t === "b-page") { - var __t = this["elem"]; - if (__t === "inner") { - return $47.call(this); - } else if (__t === "favicon") { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "shortcut icon", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } - } else if (__t === "js") { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - if (!this["ctx"]["url"] === false) { - return { - src: this["ctx"]["url"] + undefined; + var res = {}, n; + for (n in o1) { + o1.hasOwnProperty(n) && (res[n] = o1[n]); + } + undefined; + for (n in o2) { + o2.hasOwnProperty(n) && (res[n] = o2[n]); + } + undefined; + return res; + }, + identify: function() { + var cnt = 0, expando = "__" + +(new Date), get = function() { + return "uniq" + ++cnt; }; - return; - } else { - return $14.call(this); - } - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + return function(obj, onlyGet) { + if (!obj) { + return get(); + } else { + undefined; + } + undefined; + if (onlyGet || obj[expando]) { + return obj[expando]; + } else { + return obj[expando] = get(); + } + }; + }(), + xmlEscape: buildEscape("[&<>]"), + attrEscape: buildEscape('["&<>]') + }, + BEM: BEM_, + isFirst: function() { + return this.position === 1; + }, + isLast: function() { + return this.position === this._listLength; + }, + generateId: function() { + return this._.identify(this.ctx); + } + }; + ctx.apply(); + return ctx._buf.join(""); + } + return; + } + function $173() { + var __r18, __r8, __r12, __r13, __r14, __r15, __r16, __r17, __r9, __r19, __r22, __r23, __r24, __r25, __r26, __r27; + { + var _this = this, BEM_ = _this.BEM, v = this.ctx, buf = this._buf, tag; + tag = ("", __r8 = this._mode, this._mode = "tag", __r9 = $2.call(this), this._mode = __r8, "", __r9); + typeof tag != "undefined" || (tag = v.tag); + typeof tag != "undefined" || (tag = "div"); + if (tag) { + var jsParams, js; + if (this.block && v.js !== false) { + js = ("", __r12 = this._mode, this._mode = "js", __r13 = $98.call(this), this._mode = __r12, "", __r13); + js = js ? this._.extend(v.js, js === true ? {} : js) : v.js === true ? {} : v.js; + js && ((jsParams = {})[BEM_.INTERNAL.buildClass(this.block, v.elem)] = js); } else { - return $33.call(this); + undefined; } - } else if (__t === "css") { - if (!this["ctx"]["url"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $48.call(this); - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return { - rel: "stylesheet", - href: this["ctx"]["url"] - }; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + buf.push("<", tag); + var isBEM = ("", __r14 = this._mode, this._mode = "bem", __r15 = $109.call(this), this._mode = __r14, "", __r15); + typeof isBEM != "undefined" || (isBEM = typeof v.bem != "undefined" ? v.bem : v.block || v.elem); + var cls = ("", __r16 = this._mode, this._mode = "cls", __r17 = $152.call(this), this._mode = __r16, "", __r17); + cls || (cls = v.cls); + var addJSInitClass = v.block && jsParams; + if (isBEM || cls) { + buf.push(' class="'); + if (isBEM) { + BEM_.INTERNAL.buildClasses(this.block, v.elem, v.elemMods || v.mods, buf); + var mix = ("", __r18 = this._mode, this._mode = "mix", __r19 = $152.call(this), this._mode = __r18, "", __r19); + v.mix && (mix = mix ? mix.concat(v.mix) : v.mix); + if (mix) { + var i = 0, l = mix.length, mixItem, hasItem, block; + while (i < l) { + mixItem = mix[i++]; + hasItem = mixItem.block || mixItem.elem, block = mixItem.block || _this.block; + hasItem && buf.push(" "); + BEM_.INTERNAL[hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem.elem || (mixItem.block ? undefined : _this.elem), mixItem.elemMods || mixItem.mods, buf); + if (mixItem.js) { + (jsParams || (jsParams = {}))[BEM_.INTERNAL.buildClass(block, mixItem.elem)] = mixItem.js === true ? {} : mixItem.js; + addJSInitClass || (addJSInitClass = block && !mixItem.elem); + } else { + undefined; + } + } + } else { + undefined; + } } else { - return $33.call(this); + undefined; } + undefined; + cls && buf.push(isBEM ? " " : "", cls); + addJSInitClass && buf.push(" i-bem"); + buf.push('"'); } else { - var __t = this["_mode"]; - if (__t === "tag") { - return "style"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $60.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); - } + undefined; } - } else if (__t === "meta") { - var __t = this["_mode"]; - if (__t === "tag") { - return "meta"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return this["ctx"]["attrs"]; - return; - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + if (jsParams) { + var jsAttr = ("", __r22 = this._mode, this._mode = "jsAttr", __r23 = $152.call(this), this._mode = __r22, "", __r23); + buf.push(" ", jsAttr || "onclick", '="return ', this._.attrEscape(JSON.stringify(jsParams)), '"'); } else { - return $33.call(this); + undefined; } - } else if (__t === "body") { - var __t = this["_mode"]; - if (__t === "tag") { - return "body"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $14.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + undefined; + var attrs = ("", __r24 = this._mode, this._mode = "attrs", __r25 = $64.call(this), this._mode = __r24, "", __r25); + attrs = this._.extend(attrs, v.attrs); + if (attrs) { + var name; + for (name in attrs) { + buf.push(" ", name, '="', this._.attrEscape(attrs[name]), '"'); + } } else { - return $33.call(this); + undefined; } - } else if (__t === "head") { - var __t = this["_mode"]; - if (__t === "tag") { - return "head"; - return; - } else if (__t === "content") { - return $5.call(this); - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $51.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); + } else { + undefined; + } + undefined; + if (this._.isShortTag(tag)) { + buf.push("/>"); + } else { + tag && buf.push(">"); + var content = ("", __r26 = this._mode, this._mode = "content", __r27 = $42.call(this), this._mode = __r26, "", __r27); + if (content || content === 0) { + var isBEM = this.block || this.elem; + { + ""; + var __r28 = this._notNewList; + this._notNewList = false; + var __r29 = this.position; + this.position = isBEM ? 1 : this.position; + var __r30 = this._listLength; + this._listLength = isBEM ? 1 : this._listLength; + var __r31 = this.ctx; + this.ctx = content; + var __r32 = this._mode; + this._mode = ""; + $152.call(this); + this._notNewList = __r28; + this.position = __r29; + this._listLength = __r30; + this.ctx = __r31; + this._mode = __r32; + ""; + } + undefined; + undefined; + undefined; } else { - return $33.call(this); + undefined; } - } else if (__t === "core") { - return $47.call(this); - } else { - return $47.call(this); + undefined; + tag && buf.push(""); } - } else if (__t === "i-jquery") { - var __t = this["elem"]; - if (__t === "inner") { - return $38.call(this); - } else if (__t === "favicon") { - return $38.call(this); - } else if (__t === "js") { - return $38.call(this); - } else if (__t === "css") { - return $38.call(this); - } else if (__t === "meta") { - return $38.call(this); - } else if (__t === "body") { - return $38.call(this); - } else if (__t === "head") { - return $38.call(this); - } else if (__t === "core") { - return $74.call(this); + } + return; + } + function $180() { + if (!!this._mode === false) { + if (!!this.ctx === false) { + this._listLength--; + return; } else { - return $38.call(this); + return $186.call(this); } - } else if (__t === "i-ua") { - if (!!this["elem"] === false) { - var __t = this["_mode"]; - if (__t === "tag") { - return $53.call(this); - } else if (__t === "content") { - return [ ";(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);" ].join(""); - return; - } else if (__t === "attrs") { - return $14.call(this); - } else if (__t === "js") { - return $14.call(this); - } else if (__t === "bem") { - return $50.call(this); - } else if (__t === "default") { - return $22.call(this); - } else if (__t === "mix") { - return $14.call(this); - } else if (__t === "jsAttr") { - return $14.call(this); - } else if (__t === "cls") { - return $14.call(this); - } else { - return $33.call(this); + } else { + return $186.call(this); + } + } + function $186() { + if (!this._.isArray(this.ctx) === false) { + if (!!this._mode === false) { + { + var v = this.ctx, l = v.length, i = 0, prevPos = this.position, prevNotNewList = this._notNewList; + if (prevNotNewList) { + this._listLength += l - 1; + } else { + this.position = 0; + this._listLength = l; + } + undefined; + this._notNewList = true; + while (i < l) { + { + ""; + var __r7 = this.ctx; + this.ctx = v[i++]; + $1.call(this); + this.ctx = __r7; + ""; + } + undefined; + } + undefined; + undefined; + prevNotNewList || (this.position = prevPos); } + return; + } else { + return $192.call(this); + } + } else { + return $192.call(this); + } + } + function $192() { + if (!true === false) { + if (!!this._mode === false) { + return $195.call(this); } else { - return $38.call(this); + return $e.call(this); } } else { - return $38.call(this); + return $e.call(this); + } + } + function $195() { + { + var vBlock = this.ctx.block, vElem = this.ctx.elem, block = this._currBlock || this.block; + this.ctx || (this.ctx = {}); + { + ""; + var __r0 = this._mode; + this._mode = "default"; + var __r1 = this.block; + this.block = vBlock || (vElem ? block : undefined); + var __r2 = this._currBlock; + this._currBlock = vBlock || vElem ? undefined : block; + var __r3 = this.elem; + this.elem = this.ctx.elem; + var __r4 = this.mods; + this.mods = (vBlock ? this.ctx.mods : this.mods) || {}; + var __r5 = this.elemMods; + this.elemMods = this.ctx.elemMods || {}; + { + this.block || this.elem ? this.position = (this.position || 0) + 1 : this._listLength--; + $130.call(this); + undefined; + undefined; + } + this._mode = __r0; + this.block = __r1; + this._currBlock = __r2; + this.elem = __r3; + this.mods = __r4; + this.elemMods = __r5; + ""; + } + undefined; } + return; } function $e() { throw new Error; return; } + exports.apply = apply; + function apply() { + return $1.call(this); + } return exports; })(typeof exports === "undefined" ? {} : exports); BEMHTML = (function(xjst) { return function() { return xjst.apply.call([this]); }; }(BEMHTML));