New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

typograf

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typograf - npm Package Compare versions

Comparing version 6.7.0 to 6.7.1

3

CHANGELOG.md
# Changelog
# v6.7.1
Исправлена ошибка в правиле `ru/punctuation/ano` #295
# v6.7.0

@@ -4,0 +7,0 @@ - Правило `common/nbsp/afterParagraph` переименовано в `common/nbsp/afterSectionMark`.

2

dist/typograf.min.js
/*! Typograf | © 2018 Denis Seleznev | MIT License | https://github.com/typograf/typograf/ */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Typograf=t()}(this,function(){"use strict";var e=["a","abbr","acronym","b","bdo","big","br","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","time","tt","var"],t=[["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]],a=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]],r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._entities=this._prepareEntities([].concat(t,a)),this._entitiesByName={},this._entitiesByNameEntity={},this._entitiesByDigitEntity={},this._entitiesByUtf={},this._entities.forEach(function(e){this._entitiesByName[e.name]=e,this._entitiesByNameEntity[e.nameEntity]=e,this._entitiesByDigitEntity[e.digitEntity]=e,this._entitiesByUtf[e.utf]=e},this),this._invisibleEntities=this._prepareEntities(a)}return e.prototype.toUtf=function(e){var t=this;-1!==e.text.search(/&#/)&&(e.text=this.decHexToUtf(e.text)),-1!==e.text.search(/&[a-z]/i)&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,function(e){var a=t._entitiesByNameEntity[e];return a?a.utf:e}))},e.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(e,t){return String.fromCharCode(parseInt(t,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},e.prototype.restore=function(e){var t=e.prefs.htmlEntity,a=t.type,r=this._entities;"name"!==a&&"digit"!==a||((t.onlyInvisible||t.list)&&(r=[],t.onlyInvisible&&(r=r.concat(this._invisibleEntities)),t.list&&(r=r.concat(this._prepareListParam(t.list)))),e.text=this._restoreEntitiesByIndex(e.text,a+"Entity",r))},e.prototype.getByUtf=function(e,t){var a="";switch(t){case"digit":a=this._entitiesByDigitEntity[e];break;case"name":a=this._entitiesByNameEntity[e];break;default:a=e}return a},e.prototype._prepareEntities=function(e){var t=[];return e.forEach(function(e){var a=e[0],r=e[1],n=String.fromCharCode(r);t.push({name:a,nameEntity:"&"+a+";",digitEntity:"&#"+r+";",utf:n,reName:new RegExp("&"+a+";","g"),reUtf:new RegExp(n,"g")})},this),t},e.prototype._prepareListParam=function(e){var t=[];return e.forEach(function(e){var a=this._entitiesByName[e];a&&t.push(a)},this),t},e.prototype._restoreEntitiesByIndex=function(e,t,a){return a.forEach(function(a){e=e.replace(a.reUtf,a[t])}),e},e}()),n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(t){e.push(["<"+t+"(\\s[^>]*?)?>","</"+t+">"])},this),this._tags={own:[],html:e.map(this._prepareRegExp),url:[i._reUrl]},this._groups=["own","html","url"]}return t.prototype.add=function(e){this._tags.own.push(this._prepareRegExp(e))},t.prototype.show=function(e,t){for(var a=i._privateLabel,r=new RegExp(a+"tf\\d+"+a,"g"),n=new RegExp(a+"tf\\d"),s=function(a){return e.safeTags.hidden[t][a]||a},u=0,o=this._tags[t].length;u<o&&(e.text=e.text.replace(r,s),-1!==e.text.search(n));u++);},t.prototype.hide=function(e,t){e.safeTags=e.safeTags||{hidden:{},i:0},e.safeTags.hidden[t]={};var a=this._pasteLabel.bind(this,e,t);this._tags[t].forEach(function(t){e.text=e.text.replace(this._prepareRegExp(t),a)},this)},t.prototype.hideHTMLTags=function(e){if(e.isHTML){var t=this._pasteLabel.bind(this,e,"html");e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,t).replace(/&lt;\/?[a-z][^]*?&gt;/gi,t).replace(/&[gl]t;/gi,t)}},t.prototype.getPrevLabel=function(e,t){for(var a=t-1;a>=0;a--)if(e[a]===i._privateLabel)return e.slice(a,t+1);return!1},t.prototype.getNextLabel=function(e,t){for(var a=t+1;a<e.length;a++)if(e[a]===i._privateLabel)return e.slice(t,a+1);return!1},t.prototype.getTagByLabel=function(e,t){var a=!1;return this._groups.some(function(r){var n=e.safeTags.hidden[r][t];return void 0!==n&&(a={group:r,value:n}),a}),a},t.prototype.getTagInfo=function(t){if(t){var a={group:t.group};switch(t.group){case"html":a.name=t.value.split(/[<\s>]/)[1],a.isInline=e.indexOf(a.name)>-1,a.isClosing=t.value.search(/^<\//)>-1;break;case"url":a.isInline=!0;break;case"own":a.isInline=!1}return a}},t.prototype._pasteLabel=function(e,t,a){var r=e.safeTags,n=i._privateLabel+"tf"+r.i+i._privateLabel;return r.hidden[t][n]=a,r.i++,n},t.prototype._prepareRegExp=function(e){var t=void 0;if(e instanceof RegExp)t=e;else{var a=e[0],r=e[1],n=e[2];void 0===n&&(n="[^]*?"),t=new RegExp(a+n+r,"gi")}return t},t}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._prefs="object"===(void 0===t?"undefined":s(t))?t:{},this._prefs.locale=e._prepareLocale(this._prefs.locale),this._prefs.live=this._prefs.live||!1,this._safeTags=new n,this._settings={},this._enabledRules={},this._innerRulesByQueues={},this._innerRules=[].concat(this._innerRules),this._innerRules.forEach(function(e){var t=e.queue||"default";this._innerRulesByQueues[t]=this._innerRulesByQueues[t]||[],this._innerRulesByQueues[t].push(e)},this),this._rulesByQueues={},this._rules=[].concat(this._rules),this._rules.forEach(function(e){var t=e.queue||"default";this._prepareRule(e),this._rulesByQueues[t]=this._rulesByQueues[t]||[],this._rulesByQueues[t].push(e)},this),this._prefs.disableRule&&this.disableRule(this._prefs.disableRule),this._prefs.enableRule&&this.enableRule(this._prefs.enableRule),this._separatePartsTags=["title","p","h[1-6]","select","legend"]}return e.addRule=function(e){var t=e.name.split("/"),a=t[0],r=t[1],n=t[2];return e._enabled=!0!==e.disabled,e._locale=a,e._group=r,e._name=n,this.addLocale(e._locale),this._setIndex(e),this.prototype._rules.push(e),this._sortRules(this.prototype._rules),this},e.addInnerRule=function(e){return this.prototype._innerRules.push(e),e._locale=e.name.split("/")[0],this},e.deepCopy=function(e){return"object"===(void 0===e?"undefined":s(e))?JSON.parse(JSON.stringify(e)):e},e._repeat=function(e,t){for(var a="";1==(1&t)&&(a+=e),0!==(t>>>=1);)e+=e;return a},e._replace=function(e,t){for(var a=0;a<t.length;a++)e=e.replace(t[a][0],t[a][1]);return e},e._replaceNbsp=function(e){return e.replace(/\u00A0/g," ")},e._setIndex=function(e){var t=e.index,a=void 0===t?"undefined":s(t),r=this.groupIndexes[e._group];"undefined"===a?t=r:"string"===a&&(t=r+parseInt(e.index,10)),e._index=t},e._sortRules=function(e){e.sort(function(e,t){return e._index>t._index?1:-1})},e._mix=function(e,t){Object.keys(t).forEach(function(a){e[a]=t[a]})},e.prototype.execute=function(e,t){if(!(e=""+e))return"";var a=this._prepareContext(e);return this._preparePrefs(a,t),this._process(a)},e.prototype._prepareContext=function(t){return{text:t,isHTML:this._isHTML(t),prefs:e.deepCopy(this._prefs),getData:function(t){return"char"===t?this.prefs.locale.map(function(a){return e.getData(a+"/"+t)}).join(""):e.getData(this.prefs.locale[0]+"/"+t)}}},e.prototype._preparePrefs=function(t,a){a=a||{};for(var r=t.prefs,n=["htmlEntity","lineEnding","processingSeparateParts","ruleFilter"],s=0;s<n.length;s++){var i=n[s];i in a?r[i]=a[i]:i in this._prefs&&(r[i]=this._prefs[i])}r.htmlEntity=r.htmlEntity||{},r.locale=e._prepareLocale(a.locale,this._prefs.locale);var u=r.locale,o=u[0];if(!u.length||!o)throw Error('Not defined the property "locale".');if(!e.hasLocale(o))throw Error('"'+o+'" is not supported locale.')},e.prototype._isHTML=function(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)},e.prototype._splitBySeparateParts=function(t){if(!t.isHTML||!1===t.prefs.processingSeparateParts)return[t.text];var a=[],r=e._privateSeparateLabel,n=new RegExp("<("+this._separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),s=0;return t.text.replace(n,function(e,n,i,u){return s!==u&&a.push((s?r:"")+t.text.slice(s,u)+r),a.push(e),s=u+e.length,e}),a.push(s?r+t.text.slice(s,t.text.length):t.text),a},e.prototype._process=function(t){t.text=this._removeCR(t.text),this._executeRules(t,"start"),this._safeTags.hide(t,"own"),this._executeRules(t,"hide-safe-tags-own"),this._safeTags.hide(t,"html"),this._executeRules(t,"hide-safe-tags-html");var a=t.isHTML,r=new RegExp(e._privateSeparateLabel,"g");return t.text=this._splitBySeparateParts(t).map(function(a){return t.text=a,t.isHTML=this._isHTML(a),this._safeTags.hideHTMLTags(t),this._safeTags.hide(t,"url"),this._executeRules(t,"hide-safe-tags-url"),this._executeRules(t,"hide-safe-tags"),e.HtmlEntities.toUtf(t),this._prefs.live&&(t.text=e._replaceNbsp(t.text)),this._executeRules(t,"utf"),this._executeRules(t),e.HtmlEntities.restore(t),this._executeRules(t,"html-entities"),this._safeTags.show(t,"url"),this._executeRules(t,"show-safe-tags-url"),t.text.replace(r,"")},this).join(""),t.isHTML=a,this._safeTags.show(t,"html"),this._executeRules(t,"show-safe-tags-html"),this._safeTags.show(t,"own"),this._executeRules(t,"show-safe-tags-own"),this._executeRules(t,"end"),this._fixLineEnding(t.text,t.prefs.lineEnding)},e.prototype.getSetting=function(e,t){return this._settings[e]&&this._settings[e][t]},e.prototype.setSetting=function(e,t,a){return this._settings[e]=this._settings[e]||{},this._settings[e][t]=a,this},e.prototype.isEnabledRule=function(e){return this._enabledRules[e]},e.prototype.isDisabledRule=function(e){return!this._enabledRules[e]},e.prototype.enableRule=function(e){return this._enable(e,!0)},e.prototype.disableRule=function(e){return this._enable(e,!1)},e.prototype.addSafeTag=function(e,t,a){var r=e instanceof RegExp?e:[e,t,a];return this._safeTags.add(r),this},e.prototype._executeRules=function(e,t){t=t||"default";var a=this._rulesByQueues[t],r=this._innerRulesByQueues[t];r&&r.forEach(function(t){this._ruleIterator(e,t)},this),a&&a.forEach(function(t){this._ruleIterator(e,t)},this)},e.prototype._ruleIterator=function(e,t){var a=t._locale,r=this._prefs.live;if(!(!0===r&&!1===t.live||!1===r&&!0===t.live)&&("common"===a||a===e.prefs.locale[0])&&this.isEnabledRule(t.name)){if(e.prefs.ruleFilter&&!e.prefs.ruleFilter(t))return;this._onBeforeRule&&this._onBeforeRule(t.name,e.text,e),e.text=t.handler.call(this,e.text,this._settings[t.name],e),this._onAfterRule&&this._onAfterRule(t.name,e.text,e)}},e.prototype._removeCR=function(e){return e.replace(/\r\n?/g,"\n")},e.prototype._fixLineEnding=function(e,t){return"CRLF"===t?e.replace(/\n/g,"\r\n"):"CR"===t?e.replace(/\n/g,"\r"):e},e.prototype._prepareRule=function(t){var a=t.name,r=s(t.settings),n={};"object"===r?n=e.deepCopy(t.settings):"function"===r&&(n=t.settings(t)),this._settings[a]=n,this._enabledRules[a]=t._enabled},e.prototype._enable=function(e,t){return Array.isArray(e)?e.forEach(function(e){this._enableByMask(e,t)},this):this._enableByMask(e,t),this},e.prototype._enableByMask=function(e,t){if(e)if(-1!==e.search(/\*/)){var a=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*"));this._rules.forEach(function(e){var r=e.name;a.test(r)&&(this._enabledRules[r]=t)},this)}else this._enabledRules[e]=t},e.prototype._getRule=function(e){var t=null;return this._rules.some(function(a){return a.name===e&&(t=a,!0)}),t},e}();i._mix(i,{version:"6.7.0",inlineElements:e,blockElements:["address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"],groupIndexes:{symbols:110,space:210,dash:310,punctuation:410,nbsp:510,number:610,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},HtmlEntities:r,_reUrl:new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),_privateLabel:"\uf000",_privateSeparateLabel:"\uf001"}),i._mix(i.prototype,{_rules:[],_innerRules:[]});var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i._mix(i,{getData:function(e){return this._data[e]},setData:function(e,t){"string"==typeof e?(this.addLocale(e),this._data[e]=t):"object"===(void 0===e?"undefined":u(e))&&Object.keys(e).forEach(function(t){this.addLocale(t),this._data[t]=e[t]},this)},_data:{}}),i._mix(i,{addLocale:function(e){var t=(e||"").split("/")[0];t&&"common"!==t&&!this.hasLocale(t)&&(this._locales.push(t),this._locales.sort())},getLocales:function(){return this._locales},hasLocale:function(e){return"common"===e||-1!==this._locales.indexOf(e)},_prepareLocale:function(e,t){var a=e||t,r=a;return Array.isArray(a)||(r=[a]),r},_locales:[]}),i.setData("be/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u044b\u044c\u044d\u044e\u044f\u0451\u0456\u045e\u0491"),i.setData("be/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),i.setData("bg/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044c\u044e\u044f"),i.setData("bg/quote",{left:"\u201e\u2019",right:"\u201c\u2019"}),i.setData("ca/char","abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc"),i.setData("ca/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),i.setData("cs/char","a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e"),i.setData("cs/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),i.setData("common/char","a-z"),i.setData("common/dash","--?|\u2012|\u2013|\u2014"),i.setData("common/quote",'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'),i.setData("da/char","a-z\xe5\xe6\xf8"),i.setData("da/quote",{left:"\xbb\u203a",right:"\xab\u2039"}),i.setData("el/char","\u0390\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce\u03f2\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d"),i.setData("el/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),i.setData("de/char","a-z\xdf\xe4\xf6\xfc"),i.setData("de/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),i.setData("en-GB/char","a-z"),i.setData("en-GB/quote",{left:"\u2018\u201c",right:"\u2019\u201d"}),i.setData("en-US/char","a-z"),i.setData("en-US/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),i.setData("es/char","a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc"),i.setData("es/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),i.setData("eo/char","abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d"),i.setData("eo/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),i.setData("et/char","abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e"),i.setData("et/quote",{left:"\u201e\xab",right:"\u201c\xbb"}),i.setData("fi/char","abcdefghijklmnopqrstuvy\xf6\xe4\xe5"),i.setData("fi/quote",{left:"\u201d\u2019",right:"\u201d\u2019"}),i.setData("fr/char","a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6"),i.setData("fr/quote",{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}),i.setData("hu/char","a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171"),i.setData("hu/quote",{left:"\u201e\xbb",right:"\u201d\xab"}),i.setData("ga/char","abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa"),i.setData("ga/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),i.setData("it/char","a-z\xe0\xe9\xe8\xec\xf2\xf9"),i.setData("it/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),i.setData("lv/char","abcdefghijklmnopqrstuvxz\xe6\u0153"),i.setData("lv/quote",{left:"\xab\u201e",right:"\xbb\u201c"}),i.setData("nl/char","a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc"),i.setData("nl/quote",{left:"\u2018\u201c",right:"\u2019\u201d"}),i.setData("no/char","a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8"),i.setData("no/quote",{left:"\xab\u2019",right:"\xbb\u2019"}),i.setData("pl/char","abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c"),i.setData("pl/quote",{left:"\u201e\xab",right:"\u201d\xbb"}),i.setData("ro/char","abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b"),i.setData("ro/quote",{left:"\u201e\xab",right:"\u201d\xbb"}),i.setData("ru/char","\u0430-\u044f\u0451"),i.setData({"ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)"}),i.setData({"ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z"}),i.setData({"ru/month":"\u044f\u043d\u0432\u0430\u0440\u044c|\u0444\u0435\u0432\u0440\u0430\u043b\u044c|\u043c\u0430\u0440\u0442|\u0430\u043f\u0440\u0435\u043b\u044c|\u043c\u0430\u0439|\u0438\u044e\u043d\u044c|\u0438\u044e\u043b\u044c|\u0430\u0432\u0433\u0443\u0441\u0442|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c|\u043e\u043a\u0442\u044f\u0431\u0440\u044c|\u043d\u043e\u044f\u0431\u0440\u044c|\u0434\u0435\u043a\u0430\u0431\u0440\u044c","ru/monthGenCase":"\u044f\u043d\u0432\u0430\u0440\u044f|\u0444\u0435\u0432\u0440\u0430\u043b\u044f|\u043c\u0430\u0440\u0442\u0430|\u0430\u043f\u0440\u0435\u043b\u044f|\u043c\u0430\u044f|\u0438\u044e\u043d\u044f|\u0438\u044e\u043b\u044f|\u0430\u0432\u0433\u0443\u0441\u0442\u0430|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f|\u043e\u043a\u0442\u044f\u0431\u0440\u044f|\u043d\u043e\u044f\u0431\u0440\u044f|\u0434\u0435\u043a\u0430\u0431\u0440\u044f","ru/monthPreCase":"\u044f\u043d\u0432\u0430\u0440\u0435|\u0444\u0435\u0432\u0440\u0430\u043b\u0435|\u043c\u0430\u0440\u0442\u0435|\u0430\u043f\u0440\u0435\u043b\u0435|\u043c\u0430\u0435|\u0438\u044e\u043d\u0435|\u0438\u044e\u043b\u0435|\u0430\u0432\u0433\u0443\u0441\u0442\u0435|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435|\u043e\u043a\u0442\u044f\u0431\u0440\u0435|\u043d\u043e\u044f\u0431\u0440\u0435|\u0434\u0435\u043a\u0430\u0431\u0440\u0435","ru/shortMonth":"\u044f\u043d\u0432|\u0444\u0435\u0432|\u043c\u0430\u0440|\u0430\u043f\u0440|\u043c\u0430[\u0435\u0439\u044f]|\u0438\u044e\u043d|\u0438\u044e\u043b|\u0430\u0432\u0433|\u0441\u0435\u043d|\u043e\u043a\u0442|\u043d\u043e\u044f|\u0434\u0435\u043a"}),i.setData("ru/quote",{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0}),i.setData("ru/weekday","\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a|\u0432\u0442\u043e\u0440\u043d\u0438\u043a|\u0441\u0440\u0435\u0434\u0430|\u0447\u0435\u0442\u0432\u0435\u0440\u0433|\u043f\u044f\u0442\u043d\u0438\u0446\u0430|\u0441\u0443\u0431\u0431\u043e\u0442\u0430|\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435"),i.setData("sk/char","abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e"),i.setData("sk/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),i.setData("sl/char","a-z\u010d\u0161\u017e"),i.setData("sl/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),i.setData("sr/char","abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e"),i.setData("sr/quote",{left:"\u201e\u2019",right:"\u201d\u2019"}),i.setData("tr/char","abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f"),i.setData("tr/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),i.setData("uk/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044c\u044e\u044f\u0454\u0456\u0457\u0491"),i.setData("uk/quote",{left:"\xab\u201e",right:"\xbb\u201c"}),i.setData("sv/char","a-z\xe4\xe5\xe9\xf6"),i.setData("sv/quote",{left:"\u201d\u2019",right:"\u201d\u2019"}),i.addRule({name:"common/html/e-mail",queue:"end",handler:function(e,t,a){return a.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,})@([\w\-.]{2,})\.([a-z]{2,6})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1}),i.addRule({name:"common/html/escape",index:"+100",queue:"end",handler:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return e.replace(/[&<>"'/]/g,function(e){return t[e]})},disabled:!0}),i.addRule({name:"common/html/nbr",index:"+10",queue:"end",handler:function(e){return e.replace(/([^\n>])\n(?=[^\n])/g,"$1<br/>\n")},disabled:!0,htmlAttrs:!1}),i.addRule({name:"common/html/p",index:"+5",queue:"end",handler:function(e){var t=new RegExp("<("+i.blockElements.join("|")+")[>\\s]"),a=e.split("\n\n");return a.forEach(function(e,a,r){e.trim()&&(t.test(e)||(r[a]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1")))}),a.join("\n\n")},disabled:!0,htmlAttrs:!1}),i.addRule({name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,t,a){var r=this,n=new RegExp("(^|\\s)("+t.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),s=i.deepCopy(a.prefs);return s.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,t,a){return t+a.replace(n,function(e,t,a,n){var i=n[0],u=n[n.length-1],o=n.slice(1,-1);return t+a+"="+i+r.execute(o,s)+u})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1}),i.addRule({name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}}),i.addRule({name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0}),i.addRule({name:"common/html/url",queue:"end",handler:function(e,t,a){return a.isHTML?e:e.replace(i._reUrl,function(e,t,a){a=a.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===t?a=a.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===t&&(a=a.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=a,n=t+"://"+a,s='<a href="'+n+'">';return"http"===t||"https"===t?(r=r.replace(/^www\./,""),s+("http"===t?r:t+"://"+r)+"</a>"):s+n+"</a>"})},disabled:!0,htmlAttrs:!1}),i.addRule({name:"common/number/fraction",handler:function(e){return e.replace(/(^|\D)1\/2(\D|$)/g,"$1\xbd$2").replace(/(^|\D)1\/4(\D|$)/g,"$1\xbc$2").replace(/(^|\D)3\/4(\D|$)/g,"$1\xbe$2")}}),i.addRule({name:"common/number/mathSigns",handler:function(e){return i._replace(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}}),i.addRule({name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}),i.addRule({name:"common/nbsp/afterNumber",handler:function(e,t,a){var r="(^|\\D)(\\d{1,5}) (["+a.getData("char")+"]{2,})";return e.replace(new RegExp(r,"gi"),"$1$2\xa0$3")},disabled:!0}),i.addRule({name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}}),i.addRule({name:"common/nbsp/afterSectionMark",handler:function(e,t,a){var r=a.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===r?"\xa7\u202f":"\xa7\xa0")}}),i.addRule({name:"common/nbsp/afterShortWord",handler:function(e,t,a){var r=t.lengthShortWord,n="(^|["+(" \xa0("+i._privateLabel+i.getData("common/quote"))+"])(["+a.getData("char")+"]{1,"+r+"}) ",s=new RegExp(n,"gim");return e.replace(s,"$1$2\xa0").replace(s,"$1$2\xa0")},settings:{lengthShortWord:2}}),i.addRule({name:"common/nbsp/beforeShortLastNumber",handler:function(e,t,a){var r=a.getData("char"),n=r.toUpperCase(),s=new RegExp("(["+r+n+"]) (?=\\d{1,"+t.lengthLastNumber+"}[-+\u2212%'\""+a.getData("quote").right+"]?([.!?\u2026]( ["+n+"]|$)|$))","gm");return e.replace(s,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}}),i.addRule({name:"common/nbsp/beforeShortLastWord",handler:function(e,t,a){var r=a.getData("char"),n=r.toUpperCase(),s=new RegExp("(["+r+"\\d]) (["+r+n+"]{1,"+t.lengthLastWord+"}[.!?\u2026])( ["+n+"]|$)","g");return e.replace(s,"$1\xa0$2$3")},settings:{lengthLastWord:3}}),i.addRule({name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function e(e,t,a,r){return t+a.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}i.addRule({name:"common/nbsp/nowrap",queue:"end",handler:function(t){return t.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,e).replace(/(<nobr>)(.*?)(<\/nobr>)/g,e)}})}(),i.addRule({name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:i._replaceNbsp,disabled:!0}),i.addRule({name:"common/punctuation/apostrophe",handler:function(e,t,a){var r="(["+a.getData("char")+"])",n=new RegExp(r+"'"+r,"gi");return e.replace(n,"$1\u2019$2")}}),i.addRule({name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}}),i.addRule({name:"common/punctuation/hellip",handler:function(e,t,a){return"ru"===a.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}});var o={bufferQuotes:{left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},maxLevel:3,beforeLeft:" \n\t\xa0[(",afterRight:" \n\t\xa0!?.:;#*,\u2026)",process:function(e){var t=e.context.text;if(!this.count(t).total)return t;var a=e.settings,r=e.settings.left[0]===e.settings.right[0];return r&&(e.settings=i.deepCopy(e.settings),e.settings.left=this.bufferQuotes.left.slice(0,e.settings.left.length),e.settings.right=this.bufferQuotes.right.slice(0,e.settings.right.length)),e.settings.spacing&&(t=this.removeSpacing(t,e.settings)),t=this.set(t,e),e.settings.spacing&&(t=this.setSpacing(t,e.settings)),e.settings.removeDuplicateQuotes&&(t=this.removeDuplicates(t,e.settings)),r&&(t=this.returnOriginalQuotes(t,a,e.settings),e.settings=a),t},returnOriginalQuotes:function(e,t,a){for(var r={},n=0;n<a.left.length;n++)r[a.left[n]]=t.left[n],r[a.right[n]]=t.right[n];return e.replace(new RegExp("["+a.left+a.right+"]","g"),function(e){return r[e]})},count:function(e){var t={total:0};return e.replace(new RegExp("["+i.getData("common/quote")+"]","g"),function(e){return t[e]||(t[e]=0),t[e]++,t.total++,e}),t},removeDuplicates:function(e,t){var a=t.left[0],r=t.left[1]||a,n=t.right[0];return a!==r?e:e.replace(new RegExp(a+a,"g"),a).replace(new RegExp(n+n,"g"),n)},removeSpacing:function(e,t){for(var a=0,r=t.left.length;a<r;a++){var n=t.left[a],s=t.right[a];e=e.replace(new RegExp(n+"([ \u202f\xa0])","g"),n).replace(new RegExp("([ \u202f\xa0])"+s,"g"),s)}return e},setSpacing:function(e,t){for(var a=0,r=t.left.length;a<r;a++){var n=t.left[a],s=t.right[a];e=e.replace(new RegExp(n+"([^\u202f])","g"),n+"\u202f$1").replace(new RegExp("([^\u202f])"+s,"g"),"$1\u202f"+s)}return e},set:function(e,t){var a=i._privateLabel,r=i.getData("common/quote"),n=t.settings.left[0],s=t.settings.left[1]||n,u=t.settings.right[0],o=new RegExp("(^|["+this.beforeLeft+"])(["+r+"]{1,"+this.maxLevel+"})(?=[^\\s"+a+"])","gim"),l=new RegExp("([^\\s"+a+"])(["+r+"]{1,"+this.maxLevel+"})(?=["+this.afterRight+"]|$)","gim");return e=e.replace(o,function(e,t,a){return t+i._repeat(n,a.length)}).replace(l,function(e,t,a){return t+i._repeat(u,a.length)}),e=this.setAboveTags(e,t),n!==s&&(e=this.setInner(e,t.settings)),e},setAboveTags:function(e,t){var a=this,r=i._privateLabel,n=i.getData("common/quote"),s=t.settings.left[0],u=t.settings.right[0];return e.replace(new RegExp("(^|.)(["+n+"])(.|$)","gm"),function(n,i,o,l,c){if(i!==r&&l!==r)return n;if(i===r&&l===r)return'"'===o?i+a.getAboveTwoTags(e,c+1,t)+l:n;if(i===r){var p=a.afterRight.indexOf(l)>-1,d=a.getPrevTagInfo(e,c-1,t);return p&&d&&"html"===d.group?i+(d.isClosing?u:s)+l:i+(!l||p?u:s)+l}var g=a.beforeLeft.indexOf(i)>-1,h=a.getNextTagInfo(e,c+1,t);return g&&h&&"html"===h.group?i+(h.isClosing?u:s)+l:i+(!i||g?s:u)+l})},getAboveTwoTags:function(e,t,a){var r=this.getPrevTagInfo(e,t,a),n=this.getNextTagInfo(e,t,a);if(r&&"html"===r.group){if(!r.isClosing)return a.settings.left[0];if(n&&n.isClosing&&r.isClosing)return a.settings.right[0]}return e[t]},getPrevTagInfo:function(e,t,a){var r=a.safeTags.getPrevLabel(e,t-1);if(r){var n=a.safeTags.getTagByLabel(a.context,r);if(n)return a.safeTags.getTagInfo(n)}return null},getNextTagInfo:function(e,t,a){var r=a.safeTags.getNextLabel(e,t+1);if(r){var n=a.safeTags.getTagByLabel(a.context,r);if(n)return a.safeTags.getTagInfo(n)}return null},setInner:function(e,t){for(var a=[],r=[],n=0;n<t.left.length;n++)a.push(t.left[n]),r.push(t.right[n]);for(var s=t.left[0],i=t.right[0],u=a.length-1,o=-1,l="",c=0,p=e.length;c<p;c++){var d=e[c];d===s?(++o>u&&(o=u),l+=a[o]):d===i?o<=-1?l+=r[o=0]:(l+=r[o],--o<-1&&(o=-1)):('"'===d&&(o=-1),l+=d)}var g=this.count(l,t);return g[s]!==g[i]?e:l}};return i.addRule({name:"common/punctuation/quote",handler:function(e,t,a){var r=t[a.prefs.locale[0]];return r?o.process({context:a,settings:r,safeTags:this._safeTags}):e},settings:function(){var e={};return i.getLocales().forEach(function(t){e[t]=i.deepCopy(i.getData(t+"/quote"))}),e}}),i.addRule({name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,t,a){var r=this.getSetting("common/punctuation/quote",a.prefs.locale[0]);if(!r)return e;var n=i.HtmlEntities,s=n.getByUtf(r.left[0]),u=n.getByUtf(r.right[0]),o=n.getByUtf(r.left[1]),l=n.getByUtf(r.right[1]);o=o?"|"+o:"",l=l?"|"+l:"";var c=new RegExp("(<[aA]\\s[^>]*?>)("+s+o+")([^]*?)("+u+l+")(</[aA]>)","g");return e.replace(c,"$2$1$3$5$4")}}),i.addRule({name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}}),i.addRule({name:"common/other/repeatWord",handler:function(e,t,a){var r="[;:,.?! \n"+i.getData("common/quote")+"]",n=new RegExp("("+r+"|^)(["+a.getData("char")+"]{"+t.min+",}) \\2("+r+"|$)","gi");return e.replace(n,"$1$2$3")},settings:{min:2},disabled:!0}),i.addRule({name:"common/space/afterPunctuation",handler:function(e){var t=i._privateLabel,a=new RegExp("(!|;|\\?)([^).\u2026!;?\\s[\\])"+t+i.getData("common/quote")+"])","g"),r=new RegExp('(\\D)(,|:)([^)",:.?\\s\\/\\\\'+t+"])","g");return e.replace(a,"$1 $2").replace(r,"$1$2 $3")}}),i.addRule({name:"common/space/beforeBracket",handler:function(e,t,a){var r=new RegExp("(["+a.getData("char")+".!?,;\u2026)])\\(","gi");return e.replace(r,"$1 (")}}),i.addRule({name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}}),i.addRule({name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),i.addRule({name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1").replace(/(^|[^!?:;,.\u2026]) ([!?:;,.])(?!\))/g,"$1$2")}}),i.addRule({name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),i.addRule({name:"common/space/delRepeatN",index:"-1",handler:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),i.addRule({name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}}),i.addRule({name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),i.addRule({name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}}),i.addRule({name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}}),i.addRule({name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),i.addRule({name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),i.addRule({name:"common/symbols/arrow",handler:function(e){return i._replace(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),i.addRule({name:"common/symbols/cf",handler:function(e){var t=new RegExp('(^|[^%])(\\d+)( |\xa0)?(C|F)([\\W \\.,:!\\?"\\]\\)]|$)',"g");return e.replace(t,"$1$2\u2009\xb0$4$5")}}),i.addRule({name:"common/symbols/copy",handler:function(e){return i._replace(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}),i.addRule({name:"ru/date/fromISO",handler:function(e){var t=new RegExp("(^|\\D)(\\d{4})(-|\\.|\\/)(\\d{2})(-|\\.|\\/)(\\d{2})(\\D|$)","gi"),a=new RegExp("(^|\\D)(\\d{2})(-|\\/)(\\d{2})(-|\\/)(\\d{4})(\\D|$)","gi");return e.replace(t,"$1$6.$4.$2$7").replace(a,"$1$4.$2.$6$7")}}),i.addRule({name:"ru/date/weekday",handler:function(e){var t=i.getData("ru/monthGenCase"),a=i.getData("ru/weekday"),r=new RegExp("(\\d)( |\xa0)("+t+"),( |\xa0)("+a+")","gi");return e.replace(r,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),i.addRule({name:"ru/money/currency",handler:function(e){var t=new RegExp("(^|[\\D]{2})([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd]) ?([\\d.,]+([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),a=new RegExp("(^|[\\D])([\\d.,]+) ?([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])","gm");return e.replace(t,function(e,t,a,r,n,s,i){return t+r+(i?"\xa0"+i:"")+"\xa0"+a}).replace(a,"$1$2\xa0$3")},disabled:!0}),i.addRule({name:"ru/money/ruble",handler:function(e){var t="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",a=new RegExp("^"+t+"$","g"),r=new RegExp(t+"(?=[!?,:;])","g"),n=new RegExp(t+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(a,"$1\xa0\u20bd").replace(r,"$1\xa0\u20bd").replace(n,"$1\xa0\u20bd.")},disabled:!0}),i.addRule({name:"ru/dash/centuries",handler:function(e,t){var a="("+i.getData("common/dash")+")",r=new RegExp("(X|I|V)[ |\xa0]?"+a+"[ |\xa0]?(X|I|V)","g");return e.replace(r,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/daysMonth",handler:function(e,t){var a=new RegExp("(^|\\s)([123]?\\d)("+i.getData("common/dash")+")([123]?\\d)[ \xa0]("+i.getData("ru/monthGenCase")+")","g");return e.replace(a,"$1$2"+t.dash+"$4\xa0$5")},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/de",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+i.getData("ru/dashAfterDe"),"g");return e.replace(t,"$1-\u0434\u0435")},disabled:!0}),i.addRule({name:"ru/dash/decade",handler:function(e,t){var a=new RegExp("(^|\\s)(\\d{3}|\\d)0("+i.getData("common/dash")+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(a,"$1$20"+t.dash+"$40$5")},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/directSpeech",handler:function(e){var t=i.getData("common/dash"),a=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('+t+")[ |\xa0]","g"),r=new RegExp("(^|"+i._privateLabel+")("+t+")( |\xa0)","gm"),n=new RegExp("([.\u2026?!])[ \xa0]("+t+")[ \xa0]","g");return e.replace(a,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(n,"$1 \u2014\xa0")}}),i.addRule({name:"ru/dash/izpod",handler:function(e){var t=new RegExp(i.getData("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+i.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2\u0437-\u043f\u043e\u0434")}}),i.addRule({name:"ru/dash/izza",handler:function(e){var t=new RegExp(i.getData("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u0437\u0430"+i.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2\u0437-\u0437\u0430")}}),i.addRule({name:"ru/dash/ka",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+i.getData("ru/dashAfter"),"g");return e.replace(t,"$1-\u043a\u0430$2")}}),i.addRule({name:"ru/dash/koe",handler:function(e){var t=new RegExp(i.getData("ru/dashBefore")+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+i.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2-$3")}}),i.addRule({name:"ru/dash/main",index:"-5",handler:function(e){var t=i.getData("common/dash"),a=new RegExp("([ \xa0])("+t+")([ \xa0\\n])","g");return e.replace(a,"\xa0\u2014$3")}}),i.addRule({name:"ru/dash/month",handler:function(e,t){var a="("+i.getData("ru/month")+")",r="("+i.getData("ru/monthPreCase")+")",n=i.getData("common/dash"),s=new RegExp(a+" ?("+n+") ?"+a,"gi"),u=new RegExp(r+" ?("+n+") ?"+r,"gi"),o="$1"+t.dash+"$3";return e.replace(s,o).replace(u,o)},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/surname",handler:function(e){var t=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(t,"$1\xa0\u2014$2")}}),i.addRule({name:"ru/dash/taki",handler:function(e){var t=new RegExp("(\u0432\u0435\u0440\u043d\u043e|\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e|\u043e\u043f\u044f\u0442\u044c|\u043f\u0440\u044f\u043c\u043e|\u0442\u0430\u043a|\u0432\u0441[\u0435\u0451]|\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e|\u043d\u0435\u0443\u0436\u0435\u043b\u0438)\\s(\u0442\u0430\u043a\u0438)"+i.getData("ru/dashAfter"),"g");return e.replace(t,"$1-$2")}}),i.addRule({name:"ru/dash/time",handler:function(e,t){var a=new RegExp(i.getData("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+i.getData("common/dash")+"(\\d?\\d:[0-5]\\d)"+i.getData("ru/dashAfter"),"g");return e.replace(a,"$1$2"+t.dash+"$3")},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/to",handler:function(e){var t=new RegExp("("+["\u043e\u0442\u043a\u0443\u0434\u0430","\u043a\u0443\u0434\u0430","\u0433\u0434\u0435","\u043a\u043e\u0433\u0434\u0430","\u0437\u0430\u0447\u0435\u043c","\u043f\u043e\u0447\u0435\u043c\u0443","\u043a\u0430\u043a","\u043a\u0430\u043a\u043e[\u0435\u0439\u043c]","\u043a\u0430\u043a\u0430\u044f","\u043a\u0430\u043a\u0438[\u0435\u043c\u0445]","\u043a\u0430\u043a\u0438\u043c\u0438","\u043a\u0430\u043a\u0443\u044e","\u0447\u0442\u043e","\u0447\u0435\u0433\u043e","\u0447\u0435[\u0439\u043c]","\u0447\u044c\u0438\u043c?","\u043a\u0442\u043e","\u043a\u043e\u0433\u043e","\u043a\u043e\u043c\u0443","\u043a\u0435\u043c"].join("|")+")( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+i.getData("ru/dashAfter"),"gi");return e.replace(t,"$1-$3")}}),i.addRule({name:"ru/dash/weekday",handler:function(e,t){var a="("+i.getData("ru/weekday")+")",r=new RegExp(a+" ?("+i.getData("common/dash")+") ?"+a,"gi");return e.replace(r,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),i.addRule({name:"ru/dash/years",handler:function(e,t){var a=i.getData("common/dash"),r=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+a+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(r,function(e,a,r,n,s){return parseInt(r,10)<parseInt(s,10)?a+r+t.dash+s:e})},settings:{dash:"\u2013"}}),i.addRule({name:"ru/nbsp/abbr",handler:function(e){function t(e,t,a,r){return["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)>-1?e:t+a+".\xa0"+r+"."}var a=new RegExp("(^|\\s|"+i._privateLabel+")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\.","g");return e.replace(a,t).replace(a,t)}}),i.addRule({name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f-\u0434) *(\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2\xa0").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2\xa0\u044d\u0442\u0430\u0436$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1\u043b\u0438\u0442\u0435\u0440\xa0$2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2.\xa0$3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1\u0433.\xa0$2")}}),i.addRule({name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}}),i.addRule({name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var t="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",a=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+t+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),r=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+t+"[ \xa0]","g");return e.replace(a,"$1\xa0$2").replace(r,"$1\xa0$2 ")}}),i.addRule({name:"ru/nbsp/centuries",handler:function(e){var t=i.getData("common/dash"),a="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',n=new RegExp(a+"[ \xa0]?\u0432\\.?"+r,"gm"),s=new RegExp(a+"("+t+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(n,"$1$2\xa0\u0432.").replace(s,"$1$2$3$4\xa0\u0432\u0432.")}}),i.addRule({name:"ru/nbsp/dayMonth",handler:function(e){var t=new RegExp("(\\d{1,2}) ("+i.getData("ru/shortMonth")+")","gi");return e.replace(t,"$1\xa0$2")}}),i.addRule({name:"ru/nbsp/groupNumbers",handler:function(e){return e.replace(/(^ ?|\D )(\d{1,3}([ \u00A0\u202F\u2009]\d{3})+)(?! ?[\d-])/gm,function(e,t,a){return t+a.replace(/\s/g,"\u202f")})}}),i.addRule({name:"ru/nbsp/initials",handler:function(e){var t=i.getData("ru/quote"),a=new RegExp("(^|[\xa0\u202f "+t.left+i._privateLabel+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)(?=[\\s.,;:?!"'+t.right+"]|$)","gm");return e.replace(a,"$1$2.\xa0$3.\xa0$4")}}),i.addRule({name:"ru/nbsp/m",index:"+5",handler:function(e){var t=i._privateLabel,a=new RegExp("(^|[\\s,."+t+"])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s.!?,;"+t+"]|$)","gm");return e.replace(a,function(e,t,a,r,n,s){return t+a+"\xa0"+r+{2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""}[n||""]+("\xa0"===s?" ":s)})}}),i.addRule({name:"ru/nbsp/mln",handler:function(e){return e.replace(/(\d) ?(\u0442\u044b\u0441|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d)(\.|\s|$)/gi,"$1\xa0$2$3")}}),i.addRule({name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2\xa0")}}),i.addRule({name:"ru/nbsp/page",handler:function(e){var t=new RegExp("(^|[)\\s"+i._privateLabel+"])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(t,"$1$2.\xa0$3$4")}}),i.addRule({name:"ru/nbsp/ps",handler:function(e){var t=new RegExp("(^|\\s|"+i._privateLabel+")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? ","gim");return e.replace(t,function(e,t,a){return t+(a?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}}),i.addRule({name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}}),i.addRule({name:"ru/nbsp/see",handler:function(e){var t=new RegExp("(^|\\s|"+i._privateLabel+"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)","gi");return e.replace(t,function(e,t,a,r,n){return("\xa0"===t?" ":t)+a+".\xa0"+r+n})}}),i.addRule({name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}}),i.addRule({name:"ru/nbsp/years",index:"+5",handler:function(e){var t=i.getData("common/dash"),a=new RegExp("(^|\\D)(\\d{4})("+t+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(a,"$1$2$3$4\xa0\u0433\u0433.")}}),i.addRule({name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}}),i.addRule({name:"ru/number/ordinals",handler:function(e,t,a){var r=new RegExp("(\\d[%\u2030]?)-(\u044b\u0439|\u043e\u0439|\u0430\u044f|\u043e\u0435|\u044b\u0435|\u044b\u043c|\u043e\u043c|\u044b\u0445|\u043e\u0433\u043e|\u043e\u043c\u0443|\u044b\u043c\u0438)(?!["+a.getData("char")+"])","g");return e.replace(r,function(e,t,a){return t+"-"+{"\u043e\u0439":"\u0439","\u044b\u0439":"\u0439","\u0430\u044f":"\u044f","\u043e\u0435":"\u0435","\u044b\u0435":"\u0435","\u044b\u043c":"\u043c","\u043e\u043c":"\u043c","\u044b\u0445":"\u0445","\u043e\u0433\u043e":"\u0433\u043e","\u043e\u043c\u0443":"\u043c\u0443","\u044b\u043c\u0438":"\u043c\u0438"}[a]})}}),function(){var e=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],t="ru/optalign/bracket";i.addRule({name:t,handler:function(e){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:t,queue:"start",handler:function(t){return i._removeOptAlignTags(t,e)}}).addInnerRule({name:t,queue:"end",handler:function(t){return i._removeOptAlignTagsFromTitle(t,e)}})}(),function(){var e=["typograf-oa-comma","typograf-oa-comma-sp"],t="ru/optalign/comma";i.addRule({name:t,handler:function(e,t,a){var r=new RegExp("(["+a.getData("char")+"\\d\u0301]+), ","gi");return e.replace(r,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:t,queue:"start",handler:function(t){return i._removeOptAlignTags(t,e)}}).addInnerRule({name:t,queue:"end",handler:function(t){return i._removeOptAlignTagsFromTitle(t,e)}})}(),i._removeOptAlignTags=function(e,t){var a=new RegExp('<span class="('+t.join("|")+')">([^]*?)</span>',"g");return e.replace(a,"$2")},i._removeOptAlignTagsFromTitle=function(e,t){return e.replace(/<title>[^]*?<\/title>/i,function(e){return i._removeOptAlignTags(e,t)})},function(){var e=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],t="ru/optalign/quote";i.addRule({name:t,handler:function(e){var t=this.getSetting("common/punctuation/quote","ru"),a="(["+t.left[0]+(t.left[1]||"")+"])",r=new RegExp("(^|\n\n|"+i._privateLabel+")("+a+")","g"),n=new RegExp("([^\n"+i._privateLabel+"])([ \xa0\n])("+a+")","gi");return e.replace(r,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(n,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:t,queue:"start",handler:function(t){return i._removeOptAlignTags(t,e)}}).addInnerRule({name:t,queue:"end",handler:function(t){return i._removeOptAlignTagsFromTitle(t,e)}})}(),i.addRule({name:"ru/punctuation/ano",handler:function(e){var t=new RegExp("([^!?,:;\\-\u2012\u2013\u2014\\s])(\\s+)(\u0430|\u043d\u043e)(?= |\xa0|\\n)","g");return e.replace(t,"$1,$2$3")}}),i.addRule({name:"ru/punctuation/exclamation",live:!1,handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")}}),i.addRule({name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var t=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(t,"$1?!$2")}}),i.addRule({name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}),i.addRule({name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,function(e,t,a,r){return t+a.toLowerCase()+"\u0301"+r})},disabled:!0}),function(){function e(e){var a=e[0],i="",l=void 0,c=void 0;if(e.length<8)return t(e);if(e.length>10)if("+"===a){if(e[1]!==n)return e;l=!0,e=e.substr(2)}else"8"===a&&(c=!0,e=e.substr(1));for(var p=u;p>=o;p--){var d=+e.substr(0,p);if(s.indexOf(d)>-1){i=e.substr(0,p),e=e.substr(p);break}}return i||(i=e.substr(0,r),e=e.substr(r)),(l?"+"+n+"\xa0":"")+(c?"8\xa0":"")+function(e){var t=+e,a=e.length,r=[e],n=!1;if(a>3)switch(a){case 4:r=[e.substr(0,2),e.substr(2,2)];break;case 5:r=[e.substr(0,3),e.substr(3,3)];break;case 6:r=[e.substr(0,2),e.substr(2,2),e.substr(4,2)]}else n=t>900&&t<=999||495===t||499===t;return r=r.join("-"),n?r:"("+r+")"}(i)+"\xa0"+t(e)}function t(e){var t="";return e.length%2&&(t=e[0],t+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),t+e.split(/(?=(?:\d\d)+$)/).join("-")}function a(e){return e.replace(/[^\d+]/g,"")}var r=5,n="7",s=[],u=8,o=2;[4162,416332,8512,851111,4722,4725,391379,8442,4732,4152,4154451,4154459,4154455,41544513,8142,8332,8612,8622,3525,812,8342,8152,3812,4862,3422,342633,8112,9142,8452,3432,3434,3435,4812,3919,8432,8439,3822,4872,3412,3511,3512,3022,4112,4852,4855,3852,3854,8182,818,90,3472,4741,4764,4832,4922,8172,8202,8722,4932,493,3952,3951,3953,411533,4842,3842,3843,8212,4942,3912,4712,4742,8362,495,499,4966,4964,4967,498,8312,8313,3832,383612,3532,8412,4232,423370,423630,8632,8642,8482,4242,8672,8652,4752,4822,482502,4826300,3452,8422,4212,3466,3462,8712,8352,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach(function(e){if("string"==typeof e)for(var t=e.split("-"),a=+t[0];a<=+t[1];a++)s.push(a);else s.push(e)}),i.addRule({name:"ru/other/phone-number",live:!1,handler:function(t){var r=i._privateLabel,n=new RegExp("(^|,| |"+r+")(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|"+r+"|$)","gm");return t.replace(n,function(t,r,n){var s=a(n);return 12===s.length?r+e(s):t}).replace(/(^|[^\u0430-\u044f\u0451])([\u260e\u260f\u2706\ud83d\udce0\ud83d\udcde\ud83d\udcf1]|\u0442\.|\u0442\u0435\u043b\.|\u0444\.|\u043c\u043e\u0431\.|\u0444\u0430\u043a\u0441|\u0441\u043e\u0442\u043e\u0432\u044b\u0439|\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439|\u0442\u0435\u043b\u0435\u0444\u043e\u043d)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,function(t,r,n,s,i){var u=a(i);return u.length>=5?r+n+s+e(u):t})}})}(),i.addRule({name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}}),i.addRule({name:"ru/space/year",handler:function(e,t,a){var r=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+a.getData("char")+"]|$)","g");return e.replace(r,"$1$2 $3$5")}}),function(){var e={A:"\u0410",a:"\u0430",B:"\u0412",E:"\u0415",e:"\u0435",K:"\u041a",M:"\u041c",H:"\u041d",O:"\u041e",o:"\u043e",P:"\u0420",p:"\u0440",C:"\u0421",c:"\u0441",T:"\u0422",y:"\u0443",X:"\u0425",x:"\u0445"},t=Object.keys(e).join("");i.addRule({name:"ru/typo/switchingKeyboardLayout",handler:function(a){var r=new RegExp("(["+t+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return a.replace(r,function(t,a){for(var r="",n=0;n<a.length;n++)r+=e[a[n]];return r})}})}(),i.addRule({name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}),i});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Typograf=t()}(this,function(){"use strict";var a=["a","abbr","acronym","b","bdo","big","br","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","time","tt","var"],t=[["iexcl",161],["cent",162],["pound",163],["curren",164],["yen",165],["brvbar",166],["sect",167],["uml",168],["copy",169],["ordf",170],["laquo",171],["not",172],["reg",174],["macr",175],["deg",176],["plusmn",177],["sup2",178],["sup3",179],["acute",180],["micro",181],["para",182],["middot",183],["cedil",184],["sup1",185],["ordm",186],["raquo",187],["frac14",188],["frac12",189],["frac34",190],["iquest",191],["Agrave",192],["Aacute",193],["Acirc",194],["Atilde",195],["Auml",196],["Aring",197],["AElig",198],["Ccedil",199],["Egrave",200],["Eacute",201],["Ecirc",202],["Euml",203],["Igrave",204],["Iacute",205],["Icirc",206],["Iuml",207],["ETH",208],["Ntilde",209],["Ograve",210],["Oacute",211],["Ocirc",212],["Otilde",213],["Ouml",214],["times",215],["Oslash",216],["Ugrave",217],["Uacute",218],["Ucirc",219],["Uuml",220],["Yacute",221],["THORN",222],["szlig",223],["agrave",224],["aacute",225],["acirc",226],["atilde",227],["auml",228],["aring",229],["aelig",230],["ccedil",231],["egrave",232],["eacute",233],["ecirc",234],["euml",235],["igrave",236],["iacute",237],["icirc",238],["iuml",239],["eth",240],["ntilde",241],["ograve",242],["oacute",243],["ocirc",244],["otilde",245],["ouml",246],["divide",247],["oslash",248],["ugrave",249],["uacute",250],["ucirc",251],["uuml",252],["yacute",253],["thorn",254],["yuml",255],["fnof",402],["Alpha",913],["Beta",914],["Gamma",915],["Delta",916],["Epsilon",917],["Zeta",918],["Eta",919],["Theta",920],["Iota",921],["Kappa",922],["Lambda",923],["Mu",924],["Nu",925],["Xi",926],["Omicron",927],["Pi",928],["Rho",929],["Sigma",931],["Tau",932],["Upsilon",933],["Phi",934],["Chi",935],["Psi",936],["Omega",937],["alpha",945],["beta",946],["gamma",947],["delta",948],["epsilon",949],["zeta",950],["eta",951],["theta",952],["iota",953],["kappa",954],["lambda",955],["mu",956],["nu",957],["xi",958],["omicron",959],["pi",960],["rho",961],["sigmaf",962],["sigma",963],["tau",964],["upsilon",965],["phi",966],["chi",967],["psi",968],["omega",969],["thetasym",977],["upsih",978],["piv",982],["bull",8226],["hellip",8230],["prime",8242],["Prime",8243],["oline",8254],["frasl",8260],["weierp",8472],["image",8465],["real",8476],["trade",8482],["alefsym",8501],["larr",8592],["uarr",8593],["rarr",8594],["darr",8595],["harr",8596],["crarr",8629],["lArr",8656],["uArr",8657],["rArr",8658],["dArr",8659],["hArr",8660],["forall",8704],["part",8706],["exist",8707],["empty",8709],["nabla",8711],["isin",8712],["notin",8713],["ni",8715],["prod",8719],["sum",8721],["minus",8722],["lowast",8727],["radic",8730],["prop",8733],["infin",8734],["ang",8736],["and",8743],["or",8744],["cap",8745],["cup",8746],["int",8747],["there4",8756],["sim",8764],["cong",8773],["asymp",8776],["ne",8800],["equiv",8801],["le",8804],["ge",8805],["sub",8834],["sup",8835],["nsub",8836],["sube",8838],["supe",8839],["oplus",8853],["otimes",8855],["perp",8869],["sdot",8901],["lceil",8968],["rceil",8969],["lfloor",8970],["rfloor",8971],["lang",9001],["rang",9002],["spades",9824],["clubs",9827],["hearts",9829],["diams",9830],["loz",9674],["OElig",338],["oelig",339],["Scaron",352],["scaron",353],["Yuml",376],["circ",710],["tilde",732],["ndash",8211],["mdash",8212],["lsquo",8216],["rsquo",8217],["sbquo",8218],["ldquo",8220],["rdquo",8221],["bdquo",8222],["dagger",8224],["Dagger",8225],["permil",8240],["lsaquo",8249],["rsaquo",8250],["euro",8364],["NestedGreaterGreater",8811],["NestedLessLess",8810]],r=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];var e=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._entities=this._prepareEntities([].concat(t,r)),this._entitiesByName={},this._entitiesByNameEntity={},this._entitiesByDigitEntity={},this._entitiesByUtf={},this._entities.forEach(function(e){this._entitiesByName[e.name]=e,this._entitiesByNameEntity[e.nameEntity]=e,this._entitiesByDigitEntity[e.digitEntity]=e,this._entitiesByUtf[e.utf]=e},this),this._invisibleEntities=this._prepareEntities(r)}return e.prototype.toUtf=function(e){var a=this;-1!==e.text.search(/&#/)&&(e.text=this.decHexToUtf(e.text)),-1!==e.text.search(/&[a-z]/i)&&(e.text=e.text.replace(/&[a-z\d]{2,31};/gi,function(e){var t=a._entitiesByNameEntity[e];return t?t.utf:e}))},e.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(e,t){return String.fromCharCode(parseInt(t,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},e.prototype.restore=function(e){var t=e.prefs.htmlEntity,a=t.type,r=this._entities;"name"!==a&&"digit"!==a||((t.onlyInvisible||t.list)&&(r=[],t.onlyInvisible&&(r=r.concat(this._invisibleEntities)),t.list&&(r=r.concat(this._prepareListParam(t.list)))),e.text=this._restoreEntitiesByIndex(e.text,a+"Entity",r))},e.prototype.getByUtf=function(e,t){var a="";switch(t){case"digit":a=this._entitiesByDigitEntity[e];break;case"name":a=this._entitiesByNameEntity[e];break;default:a=e}return a},e.prototype._prepareEntities=function(e){var n=[];return e.forEach(function(e){var t=e[0],a=e[1],r=String.fromCharCode(a);n.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+a+";",utf:r,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(r,"g")})},this),n},e.prototype._prepareListParam=function(e){var a=[];return e.forEach(function(e){var t=this._entitiesByName[e];t&&a.push(t)},this),a},e.prototype._restoreEntitiesByIndex=function(t,a,e){return e.forEach(function(e){t=t.replace(e.reUtf,e[a])}),t},e}());var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){t.push(["<"+e+"(\\s[^>]*?)?>","</"+e+">"])},this),this._tags={own:[],html:t.map(this._prepareRegExp),url:[f._reUrl]},this._groups=["own","html","url"]}return e.prototype.add=function(e){this._tags.own.push(this._prepareRegExp(e))},e.prototype.show=function(t,a){for(var e=f._privateLabel,r=new RegExp(e+"tf\\d+"+e,"g"),n=new RegExp(e+"tf\\d"),s=function(e){return t.safeTags.hidden[a][e]||e},i=0,u=this._tags[a].length;i<u&&(t.text=t.text.replace(r,s),-1!==t.text.search(n));i++);},e.prototype.hide=function(t,e){t.safeTags=t.safeTags||{hidden:{},i:0},t.safeTags.hidden[e]={};var a=this._pasteLabel.bind(this,t,e);this._tags[e].forEach(function(e){t.text=t.text.replace(this._prepareRegExp(e),a)},this)},e.prototype.hideHTMLTags=function(e){if(e.isHTML){var t=this._pasteLabel.bind(this,e,"html");e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,t).replace(/&lt;\/?[a-z][^]*?&gt;/gi,t).replace(/&[gl]t;/gi,t)}},e.prototype.getPrevLabel=function(e,t){for(var a=t-1;0<=a;a--)if(e[a]===f._privateLabel)return e.slice(a,t+1);return!1},e.prototype.getNextLabel=function(e,t){for(var a=t+1;a<e.length;a++)if(e[a]===f._privateLabel)return e.slice(t,a+1);return!1},e.prototype.getTagByLabel=function(a,r){var n=!1;return this._groups.some(function(e){var t=a.safeTags.hidden[e][r];return void 0!==t&&(n={group:e,value:t}),n}),n},e.prototype.getTagInfo=function(e){if(e){var t={group:e.group};switch(e.group){case"html":t.name=e.value.split(/[<\s>]/)[1],t.isInline=-1<a.indexOf(t.name),t.isClosing=-1<e.value.search(/^<\//);break;case"url":t.isInline=!0;break;case"own":t.isInline=!1}return t}},e.prototype._pasteLabel=function(e,t,a){var r=e.safeTags,n=f._privateLabel+"tf"+r.i+f._privateLabel;return r.hidden[t][n]=a,r.i++,n},e.prototype._prepareRegExp=function(e){var t=void 0;if(e instanceof RegExp)t=e;else{var a=e[0],r=e[1],n=e[2];void 0===n&&(n="[^]*?"),t=new RegExp(a+n+r,"gi")}return t},e}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var f=function(){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this._prefs="object"===(void 0===e?"undefined":s(e))?e:{},this._prefs.locale=o._prepareLocale(this._prefs.locale),this._prefs.live=this._prefs.live||!1,this._safeTags=new n,this._settings={},this._enabledRules={},this._innerRulesByQueues={},this._innerRules=[].concat(this._innerRules),this._innerRules.forEach(function(e){var t=e.queue||"default";this._innerRulesByQueues[t]=this._innerRulesByQueues[t]||[],this._innerRulesByQueues[t].push(e)},this),this._rulesByQueues={},this._rules=[].concat(this._rules),this._rules.forEach(function(e){var t=e.queue||"default";this._prepareRule(e),this._rulesByQueues[t]=this._rulesByQueues[t]||[],this._rulesByQueues[t].push(e)},this),this._prefs.disableRule&&this.disableRule(this._prefs.disableRule),this._prefs.enableRule&&this.enableRule(this._prefs.enableRule),this._separatePartsTags=["title","p","h[1-6]","select","legend"]}return o.addRule=function(e){var t=e.name.split("/"),a=t[0],r=t[1],n=t[2];return e._enabled=!0!==e.disabled,e._locale=a,e._group=r,e._name=n,this.addLocale(e._locale),this._setIndex(e),this.prototype._rules.push(e),this._sortRules(this.prototype._rules),this},o.addInnerRule=function(e){return this.prototype._innerRules.push(e),e._locale=e.name.split("/")[0],this},o.deepCopy=function(e){return"object"===(void 0===e?"undefined":s(e))?JSON.parse(JSON.stringify(e)):e},o._repeat=function(e,t){for(var a="";1==(1&t)&&(a+=e),0!==(t>>>=1);)e+=e;return a},o._replace=function(e,t){for(var a=0;a<t.length;a++)e=e.replace(t[a][0],t[a][1]);return e},o._replaceNbsp=function(e){return e.replace(/\u00A0/g," ")},o._setIndex=function(e){var t=e.index,a=void 0===t?"undefined":s(t),r=this.groupIndexes[e._group];"undefined"===a?t=r:"string"===a&&(t=r+parseInt(e.index,10)),e._index=t},o._sortRules=function(e){e.sort(function(e,t){return e._index>t._index?1:-1})},o._mix=function(t,a){Object.keys(a).forEach(function(e){t[e]=a[e]})},o.prototype.execute=function(e,t){if(!(e=""+e))return"";var a=this._prepareContext(e);return this._preparePrefs(a,t),this._process(a)},o.prototype._prepareContext=function(e){return{text:e,isHTML:this._isHTML(e),prefs:o.deepCopy(this._prefs),getData:function(t){return"char"===t?this.prefs.locale.map(function(e){return o.getData(e+"/"+t)}).join(""):o.getData(this.prefs.locale[0]+"/"+t)}}},o.prototype._preparePrefs=function(e,t){t=t||{};for(var a=e.prefs,r=["htmlEntity","lineEnding","processingSeparateParts","ruleFilter"],n=0;n<r.length;n++){var s=r[n];s in t?a[s]=t[s]:s in this._prefs&&(a[s]=this._prefs[s])}a.htmlEntity=a.htmlEntity||{},a.locale=o._prepareLocale(t.locale,this._prefs.locale);var i=a.locale,u=i[0];if(!i.length||!u)throw Error('Not defined the property "locale".');if(!o.hasLocale(u))throw Error('"'+u+'" is not supported locale.')},o.prototype._isHTML=function(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)},o.prototype._splitBySeparateParts=function(n){if(!n.isHTML||!1===n.prefs.processingSeparateParts)return[n.text];var s=[],i=o._privateSeparateLabel,e=new RegExp("<("+this._separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),u=0;return n.text.replace(e,function(e,t,a,r){return u!==r&&s.push((u?i:"")+n.text.slice(u,r)+i),s.push(e),u=r+e.length,e}),s.push(u?i+n.text.slice(u,n.text.length):n.text),s},o.prototype._process=function(t){t.text=this._removeCR(t.text),this._executeRules(t,"start"),this._safeTags.hide(t,"own"),this._executeRules(t,"hide-safe-tags-own"),this._safeTags.hide(t,"html"),this._executeRules(t,"hide-safe-tags-html");var e=t.isHTML,a=new RegExp(o._privateSeparateLabel,"g");return t.text=this._splitBySeparateParts(t).map(function(e){return t.text=e,t.isHTML=this._isHTML(e),this._safeTags.hideHTMLTags(t),this._safeTags.hide(t,"url"),this._executeRules(t,"hide-safe-tags-url"),this._executeRules(t,"hide-safe-tags"),o.HtmlEntities.toUtf(t),this._prefs.live&&(t.text=o._replaceNbsp(t.text)),this._executeRules(t,"utf"),this._executeRules(t),o.HtmlEntities.restore(t),this._executeRules(t,"html-entities"),this._safeTags.show(t,"url"),this._executeRules(t,"show-safe-tags-url"),t.text.replace(a,"")},this).join(""),t.isHTML=e,this._safeTags.show(t,"html"),this._executeRules(t,"show-safe-tags-html"),this._safeTags.show(t,"own"),this._executeRules(t,"show-safe-tags-own"),this._executeRules(t,"end"),this._fixLineEnding(t.text,t.prefs.lineEnding)},o.prototype.getSetting=function(e,t){return this._settings[e]&&this._settings[e][t]},o.prototype.setSetting=function(e,t,a){return this._settings[e]=this._settings[e]||{},this._settings[e][t]=a,this},o.prototype.isEnabledRule=function(e){return this._enabledRules[e]},o.prototype.isDisabledRule=function(e){return!this._enabledRules[e]},o.prototype.enableRule=function(e){return this._enable(e,!0)},o.prototype.disableRule=function(e){return this._enable(e,!1)},o.prototype.addSafeTag=function(e,t,a){var r=e instanceof RegExp?e:[e,t,a];return this._safeTags.add(r),this},o.prototype._executeRules=function(t,e){e=e||"default";var a=this._rulesByQueues[e],r=this._innerRulesByQueues[e];r&&r.forEach(function(e){this._ruleIterator(t,e)},this),a&&a.forEach(function(e){this._ruleIterator(t,e)},this)},o.prototype._ruleIterator=function(e,t){var a=t._locale,r=this._prefs.live;if(!(!0===r&&!1===t.live||!1===r&&!0===t.live)&&("common"===a||a===e.prefs.locale[0])&&this.isEnabledRule(t.name)){if(e.prefs.ruleFilter&&!e.prefs.ruleFilter(t))return;this._onBeforeRule&&this._onBeforeRule(t.name,e.text,e),e.text=t.handler.call(this,e.text,this._settings[t.name],e),this._onAfterRule&&this._onAfterRule(t.name,e.text,e)}},o.prototype._removeCR=function(e){return e.replace(/\r\n?/g,"\n")},o.prototype._fixLineEnding=function(e,t){return"CRLF"===t?e.replace(/\n/g,"\r\n"):"CR"===t?e.replace(/\n/g,"\r"):e},o.prototype._prepareRule=function(e){var t=e.name,a=s(e.settings),r={};"object"===a?r=o.deepCopy(e.settings):"function"===a&&(r=e.settings(e)),this._settings[t]=r,this._enabledRules[t]=e._enabled},o.prototype._enable=function(e,t){return Array.isArray(e)?e.forEach(function(e){this._enableByMask(e,t)},this):this._enableByMask(e,t),this},o.prototype._enableByMask=function(e,a){if(e)if(-1!==e.search(/\*/)){var r=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*"));this._rules.forEach(function(e){var t=e.name;r.test(t)&&(this._enabledRules[t]=a)},this)}else this._enabledRules[e]=a},o.prototype._getRule=function(t){var a=null;return this._rules.some(function(e){return e.name===t&&(a=e,!0)}),a},o}();f._mix(f,{version:"6.7.1",inlineElements:a,blockElements:["address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"],groupIndexes:{symbols:110,space:210,dash:310,punctuation:410,nbsp:510,number:610,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},HtmlEntities:e,_reUrl:new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),_privateLabel:"\uf000",_privateSeparateLabel:"\uf001"}),f._mix(f.prototype,{_rules:[],_innerRules:[]});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};f._mix(f,{getData:function(e){return this._data[e]},setData:function(t,e){"string"==typeof t?(this.addLocale(t),this._data[t]=e):"object"===(void 0===t?"undefined":i(t))&&Object.keys(t).forEach(function(e){this.addLocale(e),this._data[e]=t[e]},this)},_data:{}}),f._mix(f,{addLocale:function(e){var t=(e||"").split("/")[0];t&&"common"!==t&&!this.hasLocale(t)&&(this._locales.push(t),this._locales.sort())},getLocales:function(){return this._locales},hasLocale:function(e){return"common"===e||-1!==this._locales.indexOf(e)},_prepareLocale:function(e,t){var a=e||t,r=a;return Array.isArray(a)||(r=[a]),r},_locales:[]}),f.setData("be/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u044b\u044c\u044d\u044e\u044f\u0451\u0456\u045e\u0491"),f.setData("be/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),f.setData("ca/char","abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc"),f.setData("ca/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),f.setData("common/char","a-z"),f.setData("common/dash","--?|\u2012|\u2013|\u2014"),f.setData("common/quote",'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'),f.setData("bg/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044c\u044e\u044f"),f.setData("bg/quote",{left:"\u201e\u2019",right:"\u201c\u2019"}),f.setData("da/char","a-z\xe5\xe6\xf8"),f.setData("da/quote",{left:"\xbb\u203a",right:"\xab\u2039"}),f.setData("cs/char","a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e"),f.setData("cs/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),f.setData("de/char","a-z\xdf\xe4\xf6\xfc"),f.setData("de/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),f.setData("en-GB/char","a-z"),f.setData("en-GB/quote",{left:"\u2018\u201c",right:"\u2019\u201d"}),f.setData("el/char","\u0390\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce\u03f2\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d"),f.setData("el/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),f.setData("en-US/char","a-z"),f.setData("en-US/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),f.setData("es/char","a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc"),f.setData("es/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),f.setData("eo/char","abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d"),f.setData("eo/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),f.setData("et/char","abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e"),f.setData("et/quote",{left:"\u201e\xab",right:"\u201c\xbb"}),f.setData("fr/char","a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6"),f.setData("fr/quote",{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}),f.setData("fi/char","abcdefghijklmnopqrstuvy\xf6\xe4\xe5"),f.setData("fi/quote",{left:"\u201d\u2019",right:"\u201d\u2019"}),f.setData("ga/char","abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa"),f.setData("ga/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),f.setData("it/char","a-z\xe0\xe9\xe8\xec\xf2\xf9"),f.setData("it/quote",{left:"\xab\u201c",right:"\xbb\u201d"}),f.setData("hu/char","a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171"),f.setData("hu/quote",{left:"\u201e\xbb",right:"\u201d\xab"}),f.setData("lv/char","abcdefghijklmnopqrstuvxz\xe6\u0153"),f.setData("lv/quote",{left:"\xab\u201e",right:"\xbb\u201c"}),f.setData("nl/char","a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc"),f.setData("nl/quote",{left:"\u2018\u201c",right:"\u2019\u201d"}),f.setData("no/char","a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8"),f.setData("no/quote",{left:"\xab\u2019",right:"\xbb\u2019"}),f.setData("pl/char","abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c"),f.setData("pl/quote",{left:"\u201e\xab",right:"\u201d\xbb"}),f.setData("ro/char","abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b"),f.setData("ro/quote",{left:"\u201e\xab",right:"\u201d\xbb"}),f.setData("ru/char","\u0430-\u044f\u0451"),f.setData({"ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)"}),f.setData({"ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z"}),f.setData({"ru/month":"\u044f\u043d\u0432\u0430\u0440\u044c|\u0444\u0435\u0432\u0440\u0430\u043b\u044c|\u043c\u0430\u0440\u0442|\u0430\u043f\u0440\u0435\u043b\u044c|\u043c\u0430\u0439|\u0438\u044e\u043d\u044c|\u0438\u044e\u043b\u044c|\u0430\u0432\u0433\u0443\u0441\u0442|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c|\u043e\u043a\u0442\u044f\u0431\u0440\u044c|\u043d\u043e\u044f\u0431\u0440\u044c|\u0434\u0435\u043a\u0430\u0431\u0440\u044c","ru/monthGenCase":"\u044f\u043d\u0432\u0430\u0440\u044f|\u0444\u0435\u0432\u0440\u0430\u043b\u044f|\u043c\u0430\u0440\u0442\u0430|\u0430\u043f\u0440\u0435\u043b\u044f|\u043c\u0430\u044f|\u0438\u044e\u043d\u044f|\u0438\u044e\u043b\u044f|\u0430\u0432\u0433\u0443\u0441\u0442\u0430|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f|\u043e\u043a\u0442\u044f\u0431\u0440\u044f|\u043d\u043e\u044f\u0431\u0440\u044f|\u0434\u0435\u043a\u0430\u0431\u0440\u044f","ru/monthPreCase":"\u044f\u043d\u0432\u0430\u0440\u0435|\u0444\u0435\u0432\u0440\u0430\u043b\u0435|\u043c\u0430\u0440\u0442\u0435|\u0430\u043f\u0440\u0435\u043b\u0435|\u043c\u0430\u0435|\u0438\u044e\u043d\u0435|\u0438\u044e\u043b\u0435|\u0430\u0432\u0433\u0443\u0441\u0442\u0435|\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435|\u043e\u043a\u0442\u044f\u0431\u0440\u0435|\u043d\u043e\u044f\u0431\u0440\u0435|\u0434\u0435\u043a\u0430\u0431\u0440\u0435","ru/shortMonth":"\u044f\u043d\u0432|\u0444\u0435\u0432|\u043c\u0430\u0440|\u0430\u043f\u0440|\u043c\u0430[\u0435\u0439\u044f]|\u0438\u044e\u043d|\u0438\u044e\u043b|\u0430\u0432\u0433|\u0441\u0435\u043d|\u043e\u043a\u0442|\u043d\u043e\u044f|\u0434\u0435\u043a"}),f.setData("ru/quote",{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0}),f.setData("ru/weekday","\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a|\u0432\u0442\u043e\u0440\u043d\u0438\u043a|\u0441\u0440\u0435\u0434\u0430|\u0447\u0435\u0442\u0432\u0435\u0440\u0433|\u043f\u044f\u0442\u043d\u0438\u0446\u0430|\u0441\u0443\u0431\u0431\u043e\u0442\u0430|\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435"),f.setData("sk/char","abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e"),f.setData("sk/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),f.setData("sl/char","a-z\u010d\u0161\u017e"),f.setData("sl/quote",{left:"\u201e\u201a",right:"\u201c\u2018"}),f.setData("sr/char","abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e"),f.setData("sr/quote",{left:"\u201e\u2019",right:"\u201d\u2019"}),f.setData("sv/char","a-z\xe4\xe5\xe9\xf6"),f.setData("sv/quote",{left:"\u201d\u2019",right:"\u201d\u2019"}),f.setData("tr/char","abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f"),f.setData("tr/quote",{left:"\u201c\u2018",right:"\u201d\u2019"}),f.setData("uk/char","\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044c\u044e\u044f\u0454\u0456\u0457\u0491"),f.setData("uk/quote",{left:"\xab\u201e",right:"\xbb\u201c"}),f.addRule({name:"common/html/e-mail",queue:"end",handler:function(e,t,a){return a.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,})@([\w\-.]{2,})\.([a-z]{2,6})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1}),f.addRule({name:"common/html/escape",index:"+100",queue:"end",handler:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return e.replace(/[&<>"'/]/g,function(e){return t[e]})},disabled:!0}),f.addRule({name:"common/html/nbr",index:"+10",queue:"end",handler:function(e){return e.replace(/([^\n>])\n(?=[^\n])/g,"$1<br/>\n")},disabled:!0,htmlAttrs:!1}),f.addRule({name:"common/html/p",index:"+5",queue:"end",handler:function(e){var r=new RegExp("<("+f.blockElements.join("|")+")[>\\s]"),t=e.split("\n\n");return t.forEach(function(e,t,a){e.trim()&&(r.test(e)||(a[t]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1")))}),t.join("\n\n")},disabled:!0,htmlAttrs:!1}),f.addRule({name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,t,a){var u=this,r=new RegExp("(^|\\s)("+t.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),o=f.deepCopy(a.prefs);return o.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,t,a){return t+a.replace(r,function(e,t,a,r){var n=r[0],s=r[r.length-1],i=r.slice(1,-1);return t+a+"="+n+u.execute(i,o)+s})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1}),f.addRule({name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}}),f.addRule({name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0}),f.addRule({name:"common/html/url",queue:"end",handler:function(e,t,a){return a.isHTML?e:e.replace(f._reUrl,function(e,t,a){a=a.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===t?a=a.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===t&&(a=a.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=a,n=t+"://"+a,s='<a href="'+n+'">';return"http"===t||"https"===t?(r=r.replace(/^www\./,""),s+("http"===t?r:t+"://"+r)+"</a>"):s+n+"</a>"})},disabled:!0,htmlAttrs:!1}),f.addRule({name:"common/nbsp/afterNumber",handler:function(e,t,a){var r="(^|\\D)(\\d{1,5}) (["+a.getData("char")+"]{2,})";return e.replace(new RegExp(r,"gi"),"$1$2\xa0$3")},disabled:!0}),f.addRule({name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}}),f.addRule({name:"common/nbsp/afterSectionMark",handler:function(e,t,a){var r=a.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===r?"\xa7\u202f":"\xa7\xa0")}}),f.addRule({name:"common/nbsp/afterShortWord",handler:function(e,t,a){var r=t.lengthShortWord,n="(^|["+(" \xa0("+f._privateLabel+f.getData("common/quote"))+"])(["+a.getData("char")+"]{1,"+r+"}) ",s=new RegExp(n,"gim");return e.replace(s,"$1$2\xa0").replace(s,"$1$2\xa0")},settings:{lengthShortWord:2}}),f.addRule({name:"common/nbsp/beforeShortLastNumber",handler:function(e,t,a){var r=a.getData("char"),n=r.toUpperCase(),s=new RegExp("(["+r+n+"]) (?=\\d{1,"+t.lengthLastNumber+"}[-+\u2212%'\""+a.getData("quote").right+"]?([.!?\u2026]( ["+n+"]|$)|$))","gm");return e.replace(s,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}}),f.addRule({name:"common/nbsp/beforeShortLastWord",handler:function(e,t,a){var r=a.getData("char"),n=r.toUpperCase(),s=new RegExp("(["+r+"\\d]) (["+r+n+"]{1,"+t.lengthLastWord+"}[.!?\u2026])( ["+n+"]|$)","g");return e.replace(s,"$1\xa0$2$3")},settings:{lengthLastWord:3}}),f.addRule({name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}}),function(){function t(e,t,a,r){return t+a.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}f.addRule({name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,t).replace(/(<nobr>)(.*?)(<\/nobr>)/g,t)}})}(),f.addRule({name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:f._replaceNbsp,disabled:!0}),f.addRule({name:"common/number/fraction",handler:function(e){return e.replace(/(^|\D)1\/2(\D|$)/g,"$1\xbd$2").replace(/(^|\D)1\/4(\D|$)/g,"$1\xbc$2").replace(/(^|\D)3\/4(\D|$)/g,"$1\xbe$2")}}),f.addRule({name:"common/number/mathSigns",handler:function(e){return f._replace(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}}),f.addRule({name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}),f.addRule({name:"common/punctuation/apostrophe",handler:function(e,t,a){var r="(["+a.getData("char")+"])",n=new RegExp(r+"'"+r,"gi");return e.replace(n,"$1\u2019$2")}}),f.addRule({name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}}),f.addRule({name:"common/punctuation/hellip",handler:function(e,t,a){return"ru"===a.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}});var u,o,l,c,p,d,g,h,m={bufferQuotes:{left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},maxLevel:3,beforeLeft:" \n\t\xa0[(",afterRight:" \n\t\xa0!?.:;#*,\u2026)",process:function(e){var t=e.context.text;if(!this.count(t).total)return t;var a=e.settings,r=e.settings.left[0]===e.settings.right[0];return r&&(e.settings=f.deepCopy(e.settings),e.settings.left=this.bufferQuotes.left.slice(0,e.settings.left.length),e.settings.right=this.bufferQuotes.right.slice(0,e.settings.right.length)),e.settings.spacing&&(t=this.removeSpacing(t,e.settings)),t=this.set(t,e),e.settings.spacing&&(t=this.setSpacing(t,e.settings)),e.settings.removeDuplicateQuotes&&(t=this.removeDuplicates(t,e.settings)),r&&(t=this.returnOriginalQuotes(t,a,e.settings),e.settings=a),t},returnOriginalQuotes:function(e,t,a){for(var r={},n=0;n<a.left.length;n++)r[a.left[n]]=t.left[n],r[a.right[n]]=t.right[n];return e.replace(new RegExp("["+a.left+a.right+"]","g"),function(e){return r[e]})},count:function(e){var t={total:0};return e.replace(new RegExp("["+f.getData("common/quote")+"]","g"),function(e){return t[e]||(t[e]=0),t[e]++,t.total++,e}),t},removeDuplicates:function(e,t){var a=t.left[0],r=t.left[1]||a,n=t.right[0];return a!==r?e:e.replace(new RegExp(a+a,"g"),a).replace(new RegExp(n+n,"g"),n)},removeSpacing:function(e,t){for(var a=0,r=t.left.length;a<r;a++){var n=t.left[a],s=t.right[a];e=e.replace(new RegExp(n+"([ \u202f\xa0])","g"),n).replace(new RegExp("([ \u202f\xa0])"+s,"g"),s)}return e},setSpacing:function(e,t){for(var a=0,r=t.left.length;a<r;a++){var n=t.left[a],s=t.right[a];e=e.replace(new RegExp(n+"([^\u202f])","g"),n+"\u202f$1").replace(new RegExp("([^\u202f])"+s,"g"),"$1\u202f"+s)}return e},set:function(e,t){var a=f._privateLabel,r=f.getData("common/quote"),n=t.settings.left[0],s=t.settings.left[1]||n,i=t.settings.right[0],u=new RegExp("(^|["+this.beforeLeft+"])(["+r+"]{1,"+this.maxLevel+"})(?=[^\\s"+a+"])","gim"),o=new RegExp("([^\\s"+a+"])(["+r+"]{1,"+this.maxLevel+"})(?=["+this.afterRight+"]|$)","gim");return e=e.replace(u,function(e,t,a){return t+f._repeat(n,a.length)}).replace(o,function(e,t,a){return t+f._repeat(i,a.length)}),e=this.setAboveTags(e,t),n!==s&&(e=this.setInner(e,t.settings)),e},setAboveTags:function(l,c){var p=this,d=f._privateLabel,e=f.getData("common/quote"),g=c.settings.left[0],h=c.settings.right[0];return l.replace(new RegExp("(^|.)(["+e+"])(.|$)","gm"),function(e,t,a,r,n){if(t!==d&&r!==d)return e;if(t===d&&r===d)return'"'===a?t+p.getAboveTwoTags(l,n+1,c)+r:e;if(t===d){var s=-1<p.afterRight.indexOf(r),i=p.getPrevTagInfo(l,n-1,c);return s&&i&&"html"===i.group?t+(i.isClosing?h:g)+r:t+(!r||s?h:g)+r}var u=-1<p.beforeLeft.indexOf(t),o=p.getNextTagInfo(l,n+1,c);return u&&o&&"html"===o.group?t+(o.isClosing?h:g)+r:t+(!t||u?g:h)+r})},getAboveTwoTags:function(e,t,a){var r=this.getPrevTagInfo(e,t,a),n=this.getNextTagInfo(e,t,a);if(r&&"html"===r.group){if(!r.isClosing)return a.settings.left[0];if(n&&n.isClosing&&r.isClosing)return a.settings.right[0]}return e[t]},getPrevTagInfo:function(e,t,a){var r=a.safeTags.getPrevLabel(e,t-1);if(r){var n=a.safeTags.getTagByLabel(a.context,r);if(n)return a.safeTags.getTagInfo(n)}return null},getNextTagInfo:function(e,t,a){var r=a.safeTags.getNextLabel(e,t+1);if(r){var n=a.safeTags.getTagByLabel(a.context,r);if(n)return a.safeTags.getTagInfo(n)}return null},setInner:function(e,t){for(var a=[],r=[],n=0;n<t.left.length;n++)a.push(t.left[n]),r.push(t.right[n]);for(var s=t.left[0],i=t.right[0],u=a.length-1,o=-1,l="",c=0,p=e.length;c<p;c++){var d=e[c];d===s?(u<++o&&(o=u),l+=a[o]):d===i?o<=-1?l+=r[o=0]:(l+=r[o],--o<-1&&(o=-1)):('"'===d&&(o=-1),l+=d)}var g=this.count(l,t);return g[s]!==g[i]?e:l}};return f.addRule({name:"common/punctuation/quote",handler:function(e,t,a){var r=t[a.prefs.locale[0]];return r?m.process({context:a,settings:r,safeTags:this._safeTags}):e},settings:function(){var t={};return f.getLocales().forEach(function(e){t[e]=f.deepCopy(f.getData(e+"/quote"))}),t}}),f.addRule({name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,t,a){var r=this.getSetting("common/punctuation/quote",a.prefs.locale[0]);if(!r)return e;var n=f.HtmlEntities,s=n.getByUtf(r.left[0]),i=n.getByUtf(r.right[0]),u=n.getByUtf(r.left[1]),o=n.getByUtf(r.right[1]);u=u?"|"+u:"",o=o?"|"+o:"";var l=new RegExp("(<[aA]\\s[^>]*?>)("+s+u+")([^]*?)("+i+o+")(</[aA]>)","g");return e.replace(l,"$2$1$3$5$4")}}),f.addRule({name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}}),f.addRule({name:"common/other/repeatWord",handler:function(e,t,a){var r="[;:,.?! \n"+f.getData("common/quote")+"]",n=new RegExp("("+r+"|^)(["+a.getData("char")+"]{"+t.min+",}) \\2("+r+"|$)","gi");return e.replace(n,"$1$2$3")},settings:{min:2},disabled:!0}),f.addRule({name:"common/symbols/arrow",handler:function(e){return f._replace(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),f.addRule({name:"common/symbols/cf",handler:function(e){var t=new RegExp('(^|[^%])(\\d+)( |\xa0)?(C|F)([\\W \\.,:!\\?"\\]\\)]|$)',"g");return e.replace(t,"$1$2\u2009\xb0$4$5")}}),f.addRule({name:"common/symbols/copy",handler:function(e){return f._replace(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}),f.addRule({name:"common/space/afterPunctuation",handler:function(e){var t=f._privateLabel,a=new RegExp("(!|;|\\?)([^).\u2026!;?\\s[\\])"+t+f.getData("common/quote")+"])","g"),r=new RegExp('(\\D)(,|:)([^)",:.?\\s\\/\\\\'+t+"])","g");return e.replace(a,"$1 $2").replace(r,"$1$2 $3")}}),f.addRule({name:"common/space/beforeBracket",handler:function(e,t,a){var r=new RegExp("(["+a.getData("char")+".!?,;\u2026)])\\(","gi");return e.replace(r,"$1 (")}}),f.addRule({name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}}),f.addRule({name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}}),f.addRule({name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1").replace(/(^|[^!?:;,.\u2026]) ([!?:;,.])(?!\))/g,"$1$2")}}),f.addRule({name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/\n[ \t]+/g,"\n")},disabled:!0}),f.addRule({name:"common/space/delRepeatN",index:"-1",handler:function(e){return e.replace(/\n{3,}/g,"\n\n")}}),f.addRule({name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}}),f.addRule({name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}}),f.addRule({name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}}),f.addRule({name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}}),f.addRule({name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}}),f.addRule({name:"common/space/trimRight",index:"-3",live:!1,handler:String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}}),f.addRule({name:"ru/dash/centuries",handler:function(e,t){var a="("+f.getData("common/dash")+")",r=new RegExp("(X|I|V)[ |\xa0]?"+a+"[ |\xa0]?(X|I|V)","g");return e.replace(r,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/daysMonth",handler:function(e,t){var a=new RegExp("(^|\\s)([123]?\\d)("+f.getData("common/dash")+")([123]?\\d)[ \xa0]("+f.getData("ru/monthGenCase")+")","g");return e.replace(a,"$1$2"+t.dash+"$4\xa0$5")},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/de",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+f.getData("ru/dashAfterDe"),"g");return e.replace(t,"$1-\u0434\u0435")},disabled:!0}),f.addRule({name:"ru/dash/decade",handler:function(e,t){var a=new RegExp("(^|\\s)(\\d{3}|\\d)0("+f.getData("common/dash")+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(a,"$1$20"+t.dash+"$40$5")},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/directSpeech",handler:function(e){var t=f.getData("common/dash"),a=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('+t+")[ |\xa0]","g"),r=new RegExp("(^|"+f._privateLabel+")("+t+")( |\xa0)","gm"),n=new RegExp("([.\u2026?!])[ \xa0]("+t+")[ \xa0]","g");return e.replace(a,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(n,"$1 \u2014\xa0")}}),f.addRule({name:"ru/dash/izpod",handler:function(e){var t=new RegExp(f.getData("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+f.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2\u0437-\u043f\u043e\u0434")}}),f.addRule({name:"ru/dash/izza",handler:function(e){var t=new RegExp(f.getData("ru/dashBefore")+"(\u0418|\u0438)\u0437 \u0437\u0430"+f.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2\u0437-\u0437\u0430")}}),f.addRule({name:"ru/dash/ka",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+f.getData("ru/dashAfter"),"g");return e.replace(t,"$1-\u043a\u0430$2")}}),f.addRule({name:"ru/dash/koe",handler:function(e){var t=new RegExp(f.getData("ru/dashBefore")+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+f.getData("ru/dashAfter"),"g");return e.replace(t,"$1$2-$3")}}),f.addRule({name:"ru/dash/main",index:"-5",handler:function(e){var t=f.getData("common/dash"),a=new RegExp("([ \xa0])("+t+")([ \xa0\\n])","g");return e.replace(a,"\xa0\u2014$3")}}),f.addRule({name:"ru/dash/month",handler:function(e,t){var a="("+f.getData("ru/month")+")",r="("+f.getData("ru/monthPreCase")+")",n=f.getData("common/dash"),s=new RegExp(a+" ?("+n+") ?"+a,"gi"),i=new RegExp(r+" ?("+n+") ?"+r,"gi"),u="$1"+t.dash+"$3";return e.replace(s,u).replace(i,u)},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/surname",handler:function(e){var t=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(t,"$1\xa0\u2014$2")}}),f.addRule({name:"ru/dash/taki",handler:function(e){var t=new RegExp("(\u0432\u0435\u0440\u043d\u043e|\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e|\u043e\u043f\u044f\u0442\u044c|\u043f\u0440\u044f\u043c\u043e|\u0442\u0430\u043a|\u0432\u0441[\u0435\u0451]|\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e|\u043d\u0435\u0443\u0436\u0435\u043b\u0438)\\s(\u0442\u0430\u043a\u0438)"+f.getData("ru/dashAfter"),"g");return e.replace(t,"$1-$2")}}),f.addRule({name:"ru/dash/time",handler:function(e,t){var a=new RegExp(f.getData("ru/dashBefore")+"(\\d?\\d:[0-5]\\d)"+f.getData("common/dash")+"(\\d?\\d:[0-5]\\d)"+f.getData("ru/dashAfter"),"g");return e.replace(a,"$1$2"+t.dash+"$3")},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/to",handler:function(e){var t=new RegExp("("+["\u043e\u0442\u043a\u0443\u0434\u0430","\u043a\u0443\u0434\u0430","\u0433\u0434\u0435","\u043a\u043e\u0433\u0434\u0430","\u0437\u0430\u0447\u0435\u043c","\u043f\u043e\u0447\u0435\u043c\u0443","\u043a\u0430\u043a","\u043a\u0430\u043a\u043e[\u0435\u0439\u043c]","\u043a\u0430\u043a\u0430\u044f","\u043a\u0430\u043a\u0438[\u0435\u043c\u0445]","\u043a\u0430\u043a\u0438\u043c\u0438","\u043a\u0430\u043a\u0443\u044e","\u0447\u0442\u043e","\u0447\u0435\u0433\u043e","\u0447\u0435[\u0439\u043c]","\u0447\u044c\u0438\u043c?","\u043a\u0442\u043e","\u043a\u043e\u0433\u043e","\u043a\u043e\u043c\u0443","\u043a\u0435\u043c"].join("|")+")( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+f.getData("ru/dashAfter"),"gi");return e.replace(t,"$1-$3")}}),f.addRule({name:"ru/dash/weekday",handler:function(e,t){var a="("+f.getData("ru/weekday")+")",r=new RegExp(a+" ?("+f.getData("common/dash")+") ?"+a,"gi");return e.replace(r,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),f.addRule({name:"ru/dash/years",handler:function(e,s){var t=f.getData("common/dash"),a=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+t+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(a,function(e,t,a,r,n){return parseInt(a,10)<parseInt(n,10)?t+a+s.dash+n:e})},settings:{dash:"\u2013"}}),f.addRule({name:"ru/date/fromISO",handler:function(e){var t="(-|\\.|\\/)",a="(-|\\/)",r=new RegExp("(^|\\D)(\\d{4})"+t+"(\\d{2})"+t+"(\\d{2})(\\D|$)","gi"),n=new RegExp("(^|\\D)(\\d{2})"+a+"(\\d{2})"+a+"(\\d{4})(\\D|$)","gi");return e.replace(r,"$1$6.$4.$2$7").replace(n,"$1$4.$2.$6$7")}}),f.addRule({name:"ru/date/weekday",handler:function(e){var t=f.getData("ru/monthGenCase"),a=f.getData("ru/weekday"),r=new RegExp("(\\d)( |\xa0)("+t+"),( |\xa0)("+a+")","gi");return e.replace(r,function(){var e=arguments;return e[1]+e[2]+e[3].toLowerCase()+","+e[4]+e[5].toLowerCase()})}}),f.addRule({name:"ru/money/currency",handler:function(e){var t="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",a=new RegExp("(^|[\\D]{2})"+t+" ?([\\d.,]+([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),r=new RegExp("(^|[\\D])([\\d.,]+) ?"+t,"gm");return e.replace(a,function(e,t,a,r,n,s,i){return t+r+(i?"\xa0"+i:"")+"\xa0"+a}).replace(r,"$1$2\xa0$3")},disabled:!0}),f.addRule({name:"ru/money/ruble",handler:function(e){var t="$1\xa0\u20bd",a="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",r=new RegExp("^"+a+"$","g"),n=new RegExp(a+"(?=[!?,:;])","g"),s=new RegExp(a+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(r,t).replace(n,t).replace(s,t+".")},disabled:!0}),f.addRule({name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}}),f.addRule({name:"ru/number/ordinals",handler:function(e,t,a){var r=new RegExp("(\\d[%\u2030]?)-(\u044b\u0439|\u043e\u0439|\u0430\u044f|\u043e\u0435|\u044b\u0435|\u044b\u043c|\u043e\u043c|\u044b\u0445|\u043e\u0433\u043e|\u043e\u043c\u0443|\u044b\u043c\u0438)(?!["+a.getData("char")+"])","g");return e.replace(r,function(e,t,a){return t+"-"+{"\u043e\u0439":"\u0439","\u044b\u0439":"\u0439","\u0430\u044f":"\u044f","\u043e\u0435":"\u0435","\u044b\u0435":"\u0435","\u044b\u043c":"\u043c","\u043e\u043c":"\u043c","\u044b\u0445":"\u0445","\u043e\u0433\u043e":"\u0433\u043e","\u043e\u043c\u0443":"\u043c\u0443","\u044b\u043c\u0438":"\u043c\u0438"}[a]})}}),f.addRule({name:"ru/nbsp/abbr",handler:function(e){function t(e,t,a,r){return-1<["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)?e:t+a+".\xa0"+r+"."}var a=new RegExp("(^|\\s|"+f._privateLabel+")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\.","g");return e.replace(a,t).replace(a,t)}}),f.addRule({name:"ru/nbsp/addr",handler:function(e){return e.replace(/(\s|^)(\u0434\u043e\u043c|\u0434\.|\u043a\u0432\.|\u043f\u043e\u0434\.|\u043f-\u0434) *(\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\u043c\u043a\u0440-\u043d|\u043c\u043a-\u043d|\u043c\u043a\u0440\.|\u043c\u043a\u0440\u043d)\s/gi,"$1$2\xa0").replace(/(\s|^)(\u044d\u0442\.) *(-?\d+)/gi,"$1$2\xa0$3").replace(/(\s|^)(\d+) +\u044d\u0442\u0430\u0436([^\u0430-\u044f\u0451]|$)/gi,"$1$2\xa0\u044d\u0442\u0430\u0436$3").replace(/(\s|^)\u043b\u0438\u0442\u0435\u0440\s([\u0410-\u042f]|$)/gi,"$1\u043b\u0438\u0442\u0435\u0440\xa0$2").replace(/(\s|^)(\u043e\u0431\u043b|\u043a\u0440|\u0441\u0442|\u043f\u043e\u0441|\u0441|\u0434|\u0443\u043b|\u043f\u0435\u0440|\u043f\u0440|\u043f\u0440-\u0442|\u043f\u0440\u043e\u0441\u043f|\u043f\u043b|\u0431\u0443\u043b|\u0431-\u0440|\u043d\u0430\u0431|\u0448|\u0442\u0443\u043f|\u043e\u0444|\u043a\u043e\u043c\u043d?|\u0443\u0447|\u0432\u043b|\u0432\u043b\u0430\u0434|\u0441\u0442\u0440|\u043a\u043e\u0440)\. *([\u0430-\u044f\u0451a-z\d]+)/gi,"$1$2.\xa0$3").replace(/(\D[ \u00A0]|^)\u0433\. ?([\u0410-\u042f\u0401])/gm,"$1\u0433.\xa0$2")}}),f.addRule({name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}}),f.addRule({name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var t="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",a=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+t+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),r=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+t+"[ \xa0]","g");return e.replace(a,"$1\xa0$2").replace(r,"$1\xa0$2 ")}}),f.addRule({name:"ru/nbsp/centuries",handler:function(e){var t=f.getData("common/dash"),a="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',n=new RegExp(a+"[ \xa0]?\u0432\\.?"+r,"gm"),s=new RegExp(a+"("+t+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(n,"$1$2\xa0\u0432.").replace(s,"$1$2$3$4\xa0\u0432\u0432.")}}),f.addRule({name:"ru/nbsp/dayMonth",handler:function(e){var t=new RegExp("(\\d{1,2}) ("+f.getData("ru/shortMonth")+")","gi");return e.replace(t,"$1\xa0$2")}}),f.addRule({name:"ru/nbsp/groupNumbers",handler:function(e){return e.replace(/(^ ?|\D )(\d{1,3}([ \u00A0\u202F\u2009]\d{3})+)(?! ?[\d-])/gm,function(e,t,a){return t+a.replace(/\s/g,"\u202f")})}}),f.addRule({name:"ru/nbsp/initials",handler:function(e){var t=f.getData("ru/quote"),a=new RegExp("(^|[\xa0\u202f "+t.left+f._privateLabel+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)(?=[\\s.,;:?!"'+t.right+"]|$)","gm");return e.replace(a,"$1$2.\xa0$3.\xa0$4")}}),f.addRule({name:"ru/nbsp/m",index:"+5",handler:function(e){var t=f._privateLabel,a=new RegExp("(^|[\\s,."+t+"])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s.!?,;"+t+"]|$)","gm");return e.replace(a,function(e,t,a,r,n,s){return t+a+"\xa0"+r+{2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""}[n||""]+("\xa0"===s?" ":s)})}}),f.addRule({name:"ru/nbsp/mln",handler:function(e){return e.replace(/(\d) ?(\u0442\u044b\u0441|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d)(\.|\s|$)/gi,"$1\xa0$2$3")}}),f.addRule({name:"ru/nbsp/ooo",handler:function(e){return e.replace(/(^|[^a-\u044f\u0451A-\u042f\u0401])(\u041e\u041e\u041e|\u041e\u0410\u041e|\u0417\u0410\u041e|\u041d\u0418\u0418|\u041f\u0411\u041e\u042e\u041b) /g,"$1$2\xa0")}}),f.addRule({name:"ru/nbsp/page",handler:function(e){var t=new RegExp("(^|[)\\s"+f._privateLabel+"])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(t,"$1$2.\xa0$3$4")}}),f.addRule({name:"ru/nbsp/ps",handler:function(e){var t=new RegExp("(^|\\s|"+f._privateLabel+")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? ","gim");return e.replace(t,function(e,t,a){return t+(a?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}}),f.addRule({name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}}),f.addRule({name:"ru/nbsp/see",handler:function(e){var t=new RegExp("(^|\\s|"+f._privateLabel+"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)","gi");return e.replace(t,function(e,t,a,r,n){return("\xa0"===t?" ":t)+a+".\xa0"+r+n})}}),f.addRule({name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}}),f.addRule({name:"ru/nbsp/years",index:"+5",handler:function(e){var t=f.getData("common/dash"),a=new RegExp("(^|\\D)(\\d{4})("+t+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(a,"$1$2$3$4\xa0\u0433\u0433.")}}),f.addRule({name:"ru/other/accent",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])([\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f])([^\u0410-\u042f\u0401\w]|$)/g,function(e,t,a,r){return t+a.toLowerCase()+"\u0301"+r})},disabled:!0}),function(){var u=5,o="7",l=[],c=8,p=2;function i(e){var t=e[0],a="",r=void 0,n=void 0;if(e.length<8)return d(e);if(10<e.length)if("+"===t){if(e[1]!==o)return e;r=!0,e=e.substr(2)}else"8"===t&&(n=!0,e=e.substr(1));for(var s=c;p<=s;s--){var i=+e.substr(0,s);if(-1<l.indexOf(i)){a=e.substr(0,s),e=e.substr(s);break}}return a||(a=e.substr(0,u),e=e.substr(u)),(r?"+"+o+"\xa0":"")+(n?"8\xa0":"")+function(e){var t=+e,a=e.length,r=[e],n=!1;if(3<a)switch(a){case 4:r=[e.substr(0,2),e.substr(2,2)];break;case 5:r=[e.substr(0,3),e.substr(3,3)];break;case 6:r=[e.substr(0,2),e.substr(2,2),e.substr(4,2)]}else n=900<t&&t<=999||495===t||499===t;return r=r.join("-"),n?r:"("+r+")"}(a)+"\xa0"+d(e)}function d(e){var t="";return e.length%2&&(t=e[0],t+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),t+e.split(/(?=(?:\d\d)+$)/).join("-")}function g(e){return e.replace(/[^\d+]/g,"")}[4162,416332,8512,851111,4722,4725,391379,8442,4732,4152,4154451,4154459,4154455,41544513,8142,8332,8612,8622,3525,812,8342,8152,3812,4862,3422,342633,8112,9142,8452,3432,3434,3435,4812,3919,8432,8439,3822,4872,3412,3511,3512,3022,4112,4852,4855,3852,3854,8182,818,90,3472,4741,4764,4832,4922,8172,8202,8722,4932,493,3952,3951,3953,411533,4842,3842,3843,8212,4942,3912,4712,4742,8362,495,499,4966,4964,4967,498,8312,8313,3832,383612,3532,8412,4232,423370,423630,8632,8642,8482,4242,8672,8652,4752,4822,482502,4826300,3452,8422,4212,3466,3462,8712,8352,"901-934","936-939","950-953",958,"960-969","977-989","991-997",999].forEach(function(e){if("string"==typeof e)for(var t=e.split("-"),a=+t[0];a<=+t[1];a++)l.push(a);else l.push(e)}),f.addRule({name:"ru/other/phone-number",live:!1,handler:function(e){var t=f._privateLabel,a=new RegExp("(^|,| |"+t+")(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|"+t+"|$)","gm");return e.replace(a,function(e,t,a){var r=g(a);return 12===r.length?t+i(r):e}).replace(/(^|[^\u0430-\u044f\u0451])([\u260e\u260f\u2706\ud83d\udce0\ud83d\udcde\ud83d\udcf1]|\u0442\.|\u0442\u0435\u043b\.|\u0444\.|\u043c\u043e\u0431\.|\u0444\u0430\u043a\u0441|\u0441\u043e\u0442\u043e\u0432\u044b\u0439|\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439|\u0442\u0435\u043b\u0435\u0444\u043e\u043d)(:?\s*?)([+\d(][\d \u00A0\-()]{3,}\d)/gi,function(e,t,a,r,n){var s=g(n);return 5<=s.length?t+a+r+i(s):e})}})}(),u=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],o="ru/optalign/bracket",f.addRule({name:o,handler:function(e){return e.replace(/( |\u00A0)\(/g,'<span class="typograf-oa-sp-lbracket">$1</span><span class="typograf-oa-lbracket">(</span>').replace(/^\(/gm,'<span class="typograf-oa-n-lbracket">(</span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:o,queue:"start",handler:function(e){return f._removeOptAlignTags(e,u)}}).addInnerRule({name:o,queue:"end",handler:function(e){return f._removeOptAlignTagsFromTitle(e,u)}}),l=["typograf-oa-comma","typograf-oa-comma-sp"],c="ru/optalign/comma",f.addRule({name:c,handler:function(e,t,a){var r=new RegExp("(["+a.getData("char")+"\\d\u0301]+), ","gi");return e.replace(r,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:c,queue:"start",handler:function(e){return f._removeOptAlignTags(e,l)}}).addInnerRule({name:c,queue:"end",handler:function(e){return f._removeOptAlignTagsFromTitle(e,l)}}),f._removeOptAlignTags=function(e,t){var a=new RegExp('<span class="('+t.join("|")+')">([^]*?)</span>',"g");return e.replace(a,"$2")},f._removeOptAlignTagsFromTitle=function(e,t){return e.replace(/<title>[^]*?<\/title>/i,function(e){return f._removeOptAlignTags(e,t)})},p=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],d="ru/optalign/quote",f.addRule({name:d,handler:function(e){var t=this.getSetting("common/punctuation/quote","ru"),a="(["+t.left[0]+(t.left[1]||"")+"])",r=new RegExp("(^|\n\n|"+f._privateLabel+")("+a+")","g"),n=new RegExp("([^\n"+f._privateLabel+"])([ \xa0\n])("+a+")","gi");return e.replace(r,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(n,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1}).addInnerRule({name:d,queue:"start",handler:function(e){return f._removeOptAlignTags(e,p)}}).addInnerRule({name:d,queue:"end",handler:function(e){return f._removeOptAlignTagsFromTitle(e,p)}}),f.addRule({name:"ru/punctuation/ano",handler:function(e){var t=new RegExp("([^!?,:;\\-\u2012\u2013\u2014\\s])(\\s+)(\u0430|\u043d\u043e)(?= |\xa0|\\n)","g");return e.replace(t,"$1,$2$3")},queue:"hide-safe-tags-html"}),f.addRule({name:"ru/punctuation/exclamation",live:!1,handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")}}),f.addRule({name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var t=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(t,"$1?!$2")}}),f.addRule({name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}),f.addRule({name:"ru/space/afterHellip",handler:function(e){return e.replace(/([\u0430-\u044f\u0451])(\.\.\.|\u2026)([\u0410-\u042f\u0401])/g,"$1$2 $3").replace(/([?!]\.\.)([\u0430-\u044f\u0451a-z])/gi,"$1 $2")}}),f.addRule({name:"ru/space/year",handler:function(e,t,a){var r=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+a.getData("char")+"]|$)","g");return e.replace(r,"$1$2 $3$5")}}),f.addRule({name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}),g={A:"\u0410",a:"\u0430",B:"\u0412",E:"\u0415",e:"\u0435",K:"\u041a",M:"\u041c",H:"\u041d",O:"\u041e",o:"\u043e",P:"\u0420",p:"\u0440",C:"\u0421",c:"\u0441",T:"\u0422",y:"\u0443",X:"\u0425",x:"\u0445"},h=Object.keys(g).join(""),f.addRule({name:"ru/typo/switchingKeyboardLayout",handler:function(e){var t=new RegExp("(["+h+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return e.replace(t,function(e,t){for(var a="",r=0;r<t.length;r++)a+=g[t[r]];return a})}}),f});

@@ -46,49 +46,49 @@ ## Rules of typograf in order of execution

| 41. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Hyphen between “верно-таки” and etc. | 310 | | ✓ |
| 42. | [common/punctuation/quote](../src/rules/common/punctuation/quote.js) | Placement of quotation marks in texts | 410 | | ✓ |
| 43. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | | ✓ |
| 44. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Removing double punctuation | 410 | | ✓ |
| 45. | [common/punctuation/apostrophe](../src/rules/common/punctuation/apostrophe.js) | Placement of correct apostrophe | 410 | | ✓ |
| 46. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Replacement of three points by ellipsis | 410 | | ✓ |
| 47. | [ru/punctuation/hellipQuestion](../src/rules/ru/punctuation/hellipQuestion.js) | «?…» → «?..», «!…» → «!..», «…,» → «…» | 410 | | ✓ |
| 48. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |
| 49. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |
| 50. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ |
| 51. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ |
| 52. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Non-breaking space before lpi and dpi | 510 | | ✓ |
| 53. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Non-breaking space before last short word in sentence | 510 | | ✓ |
| 54. | [common/nbsp/beforeShortLastNumber](../src/rules/common/nbsp/beforeShortLastNumber.js) | Non-breaking space before number (maximum 2 digits) at end of sentence | 510 | | ✓ |
| 55. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Non-breaking space after short word | 510 | | ✓ |
| 56. | [common/nbsp/afterSectionMark](../src/rules/common/nbsp/afterSectionMark.js) | Non-breaking space after § | 510 | | ✓ |
| 57. | [common/nbsp/afterParagraphMark](../src/rules/common/nbsp/afterParagraphMark.js) | Non-breaking space after ¶ | 510 | | ✓ |
| 58. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Non-breaking space between number and word | 510 | | |
| 59. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Non-breaking space before XXXX г. (2012 г.) | 510 | | ✓ |
| 60. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Non-breaking space after abbreviation «см.» and «им.» | 510 | | ✓ |
| 61. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Not once. space before the “rub” and “cop.” | 510 | | ✓ |
| 62. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Non-breaking space in P. S. and P. P. S. | 510 | | ✓ |
| 63. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.” | 510 | | ✓ |
| 64. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ |
| 65. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 510 | | ✓ |
| 66. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ |
| 42. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Replacement of three points by ellipsis | 410 | | ✓ |
| 43. | [common/punctuation/quote](../src/rules/common/punctuation/quote.js) | Placement of quotation marks in texts | 410 | | ✓ |
| 44. | [common/punctuation/apostrophe](../src/rules/common/punctuation/apostrophe.js) | Placement of correct apostrophe | 410 | | ✓ |
| 45. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Removing double punctuation | 410 | | ✓ |
| 46. | [ru/punctuation/hellipQuestion](../src/rules/ru/punctuation/hellipQuestion.js) | «?…» → «?..», «!…» → «!..», «…,» → «…» | 410 | | ✓ |
| 47. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |
| 48. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |
| 49. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Non-breaking space after abbreviation «см.» and «им.» | 510 | | ✓ |
| 50. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Non-breaking space before lpi and dpi | 510 | | ✓ |
| 51. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Non-breaking space before last short word in sentence | 510 | | ✓ |
| 52. | [common/nbsp/beforeShortLastNumber](../src/rules/common/nbsp/beforeShortLastNumber.js) | Non-breaking space before number (maximum 2 digits) at end of sentence | 510 | | ✓ |
| 53. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Non-breaking space after short word | 510 | | ✓ |
| 54. | [common/nbsp/afterSectionMark](../src/rules/common/nbsp/afterSectionMark.js) | Non-breaking space after § | 510 | | ✓ |
| 55. | [common/nbsp/afterParagraphMark](../src/rules/common/nbsp/afterParagraphMark.js) | Non-breaking space after ¶ | 510 | | ✓ |
| 56. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Non-breaking space between number and word | 510 | | |
| 57. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Non-breaking space in P. S. and P. P. S. | 510 | | ✓ |
| 58. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Non-breaking space before XXXX г. (2012 г.) | 510 | | ✓ |
| 59. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Non-breaking space in abbreviations, e.g. “т. д.” | 510 | | ✓ |
| 60. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ |
| 61. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Non-breaking thin space after № | 510 | | ✓ |
| 62. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Non-breaking space after “стр.”, “гл.”, “рис.”, “илл.” | 510 | | ✓ |
| 63. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Non-breaking space between number and month | 510 | | ✓ |
| 64. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Replacement space on a narrow non-breaking space in groups of numbers | 510 | | ✓ |
| 65. | [ru/nbsp/initials](../src/rules/ru/nbsp/initials.js) | Binding of initials to the name | 510 | | ✓ |
| 66. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Non-breaking space after “OOO, ОАО, ЗАО, НИИ, ПБОЮЛ” | 510 | | ✓ |
| 67. | [ru/nbsp/mln](../src/rules/ru/nbsp/mln.js) | Non-breaking space between number and “тыс.”, “млн”, “млрд” and “трлн” | 510 | | ✓ |
| 68. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Remove spaces and extra points in “вв.” | 510 | | ✓ |
| 69. | [ru/nbsp/initials](../src/rules/ru/nbsp/initials.js) | Binding of initials to the name | 510 | | ✓ |
| 70. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Replacement space on a narrow non-breaking space in groups of numbers | 510 | | ✓ |
| 68. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Not once. space before the “rub” and “cop.” | 510 | | ✓ |
| 69. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 515 | | ✓ |
| 70. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ |
| 71. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. and non-breaking space | 515 | | ✓ |
| 72. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Non-breaking space before “ли”, “ль”, “же”, “бы”, “б” | 515 | | ✓ |
| 73. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | m2 → м², m3 → м³ and non-breaking space | 515 | | ✓ |
| 74. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ |
| 75. | [ru/number/comma](../src/rules/ru/number/comma.js) | Commas in numbers | 610 | | ✓ |
| 76. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/4 → ¾ | 610 | | ✓ |
| 77. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ |
| 78. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ |
| 79. | [ru/money/currency](../src/rules/ru/money/currency.js) | Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $ | 710 | | |
| 80. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | |
| 81. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 810 | | ✓ |
| 82. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ |
| 83. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 910 | | |
| 84. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | |
| 85. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Formatting phone numbers | 910 | | ✓ |
| 86. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | |
| 87. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | |
| 88. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | |
| 72. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/4 → ¾ | 610 | | ✓ |
| 73. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ |
| 74. | [ru/number/comma](../src/rules/ru/number/comma.js) | Commas in numbers | 610 | | ✓ |
| 75. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ |
| 76. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ |
| 77. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | |
| 78. | [ru/money/currency](../src/rules/ru/money/currency.js) | Currency symbol ($, €, ¥, Ұ, £ and ₤) after the number, $100 → 100 $ | 710 | | |
| 79. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ |
| 80. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Converting dates YYYY-MM-DD type DD.MM.YYYY | 810 | | ✓ |
| 81. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Removing repeat words | 910 | | |
| 82. | [ru/other/accent](../src/rules/ru/other/accent.js) | Replacement capital letters to lowercase with addition of accent | 910 | | |
| 83. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Formatting phone numbers | 910 | | ✓ |
| 84. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | for opening bracket | 1010 | | |
| 85. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | for comma | 1010 | | |
| 86. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | for opening quotation marks | 1010 | | |
| 87. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | hide-safe-tags-html | ✓ |
| 88. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Placement of non-breaking space after “г.”, “обл.”, “ул.”, “пр.”, “кв.” et al. | 510 | | ✓ |
| 89. | [ru/typo/switchingKeyboardLayout](../src/rules/ru/typo/switchingKeyboardLayout.js) | Replacement of Latin letters in Russian. Typos occur when you switch keyboard layouts | 1110 | | ✓ |

@@ -95,0 +95,0 @@ | 90. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Replace non-breaking space to normal space in tags nowrap and nobr | 510 | end | ✓ |

@@ -46,49 +46,49 @@ ## Правила типографа по порядку выполнения

| 41. | [ru/dash/taki](../src/rules/ru/dash/taki.js) | Дефис между «верно-таки» и т. д. | 310 | | ✓ |
| 42. | [common/punctuation/quote](../src/rules/common/punctuation/quote.js) | Расстановка кавычек правильного вида | 410 | | ✓ |
| 43. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | | ✓ |
| 44. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Удаление двойной пунктуации | 410 | | ✓ |
| 45. | [common/punctuation/apostrophe](../src/rules/common/punctuation/apostrophe.js) | Расстановка правильного апострофа | 410 | | ✓ |
| 46. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Замена трёх точек на многоточие | 410 | | ✓ |
| 47. | [ru/punctuation/hellipQuestion](../src/rules/ru/punctuation/hellipQuestion.js) | «?…» → «?..», «!…» → «!..», «…,» → «…» | 410 | | ✓ |
| 48. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |
| 49. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |
| 50. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ |
| 51. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка нераз. пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ |
| 52. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Нераз. пробел перед lpi и dpi | 510 | | ✓ |
| 53. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Нераз. пробел перед последним коротким словом в предложении | 510 | | ✓ |
| 54. | [common/nbsp/beforeShortLastNumber](../src/rules/common/nbsp/beforeShortLastNumber.js) | Нераз. пробел перед числом (не более 2 цифр) в конце предложения | 510 | | ✓ |
| 55. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Нераз. пробел после короткого слова | 510 | | ✓ |
| 56. | [common/nbsp/afterSectionMark](../src/rules/common/nbsp/afterSectionMark.js) | Нераз. узкий пробел после § | 510 | | ✓ |
| 57. | [common/nbsp/afterParagraphMark](../src/rules/common/nbsp/afterParagraphMark.js) | Нераз. пробел после ¶ | 510 | | ✓ |
| 58. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Нераз. пробел между числом и словом | 510 | | |
| 59. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Нераз. пробел после XXXX г. (2012 г.) | 510 | | ✓ |
| 60. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Нераз. пробел после сокращений «см.» и «им.» | 510 | | ✓ |
| 61. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Нераз. пробел перед «руб.» и «коп.» | 510 | | ✓ |
| 62. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Нераз. пробел в P. S. и P. P. S. | 510 | | ✓ |
| 63. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел после «стр.», «гл.», «рис.», «илл.» | 510 | | ✓ |
| 64. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в «т. д.» | 510 | | ✓ |
| 65. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 510 | | ✓ |
| 66. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ |
| 42. | [common/punctuation/hellip](../src/rules/common/punctuation/hellip.js) | Замена трёх точек на многоточие | 410 | | ✓ |
| 43. | [common/punctuation/quote](../src/rules/common/punctuation/quote.js) | Расстановка кавычек правильного вида | 410 | | ✓ |
| 44. | [common/punctuation/apostrophe](../src/rules/common/punctuation/apostrophe.js) | Расстановка правильного апострофа | 410 | | ✓ |
| 45. | [common/punctuation/delDoublePunctuation](../src/rules/common/punctuation/delDoublePunctuation.js) | Удаление двойной пунктуации | 410 | | ✓ |
| 46. | [ru/punctuation/hellipQuestion](../src/rules/ru/punctuation/hellipQuestion.js) | «?…» → «?..», «!…» → «!..», «…,» → «…» | 410 | | ✓ |
| 47. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |
| 48. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |
| 49. | [ru/nbsp/see](../src/rules/ru/nbsp/see.js) | Нераз. пробел после сокращений «см.» и «им.» | 510 | | ✓ |
| 50. | [common/nbsp/dpi](../src/rules/common/nbsp/dpi.js) | Нераз. пробел перед lpi и dpi | 510 | | ✓ |
| 51. | [common/nbsp/beforeShortLastWord](../src/rules/common/nbsp/beforeShortLastWord.js) | Нераз. пробел перед последним коротким словом в предложении | 510 | | ✓ |
| 52. | [common/nbsp/beforeShortLastNumber](../src/rules/common/nbsp/beforeShortLastNumber.js) | Нераз. пробел перед числом (не более 2 цифр) в конце предложения | 510 | | ✓ |
| 53. | [common/nbsp/afterShortWord](../src/rules/common/nbsp/afterShortWord.js) | Нераз. пробел после короткого слова | 510 | | ✓ |
| 54. | [common/nbsp/afterSectionMark](../src/rules/common/nbsp/afterSectionMark.js) | Нераз. узкий пробел после § | 510 | | ✓ |
| 55. | [common/nbsp/afterParagraphMark](../src/rules/common/nbsp/afterParagraphMark.js) | Нераз. пробел после ¶ | 510 | | ✓ |
| 56. | [common/nbsp/afterNumber](../src/rules/common/nbsp/afterNumber.js) | Нераз. пробел между числом и словом | 510 | | |
| 57. | [ru/nbsp/ps](../src/rules/ru/nbsp/ps.js) | Нераз. пробел в P. S. и P. P. S. | 510 | | ✓ |
| 58. | [ru/nbsp/year](../src/rules/ru/nbsp/year.js) | Нераз. пробел после XXXX г. (2012 г.) | 510 | | ✓ |
| 59. | [ru/nbsp/abbr](../src/rules/ru/nbsp/abbr.js) | Нераз. пробел в сокращениях, например, в «т. д.» | 510 | | ✓ |
| 60. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ |
| 61. | [ru/nbsp/afterNumberSign](../src/rules/ru/nbsp/afterNumberSign.js) | Нераз. узкий пробел после № | 510 | | ✓ |
| 62. | [ru/nbsp/page](../src/rules/ru/nbsp/page.js) | Нераз. пробел после «стр.», «гл.», «рис.», «илл.» | 510 | | ✓ |
| 63. | [ru/nbsp/dayMonth](../src/rules/ru/nbsp/dayMonth.js) | Нераз. пробел между числом и месяцем | 510 | | ✓ |
| 64. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Замена пробела на нераз. узкий пробел в группах чисел | 510 | | ✓ |
| 65. | [ru/nbsp/initials](../src/rules/ru/nbsp/initials.js) | Привязка инициалов к фамилии | 510 | | ✓ |
| 66. | [ru/nbsp/ooo](../src/rules/ru/nbsp/ooo.js) | Нераз. пробел после OOO, ОАО, ЗАО, НИИ и ПБОЮЛ | 510 | | ✓ |
| 67. | [ru/nbsp/mln](../src/rules/ru/nbsp/mln.js) | Неразр. пробел между числом и «тыс.», «млн», «млрд» и «трлн» | 510 | | ✓ |
| 68. | [ru/nbsp/centuries](../src/rules/ru/nbsp/centuries.js) | Удаление пробелов и лишних точек в «вв.» | 510 | | ✓ |
| 69. | [ru/nbsp/initials](../src/rules/ru/nbsp/initials.js) | Привязка инициалов к фамилии | 510 | | ✓ |
| 70. | [ru/nbsp/groupNumbers](../src/rules/ru/nbsp/groupNumbers.js) | Замена пробела на нераз. узкий пробел в группах чисел | 510 | | ✓ |
| 68. | [ru/nbsp/rubleKopek](../src/rules/ru/nbsp/rubleKopek.js) | Нераз. пробел перед «руб.» и «коп.» | 510 | | ✓ |
| 69. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | м2 → м², м3 → м³ и нераз. пробел | 515 | | ✓ |
| 70. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ |
| 71. | [ru/nbsp/years](../src/rules/ru/nbsp/years.js) | г.г. → гг. и нераз. пробел | 515 | | ✓ |
| 72. | [ru/nbsp/beforeParticle](../src/rules/ru/nbsp/beforeParticle.js) | Нераз. пробел перед «ли», «ль», «же», «бы», «б» | 515 | | ✓ |
| 73. | [ru/nbsp/m](../src/rules/ru/nbsp/m.js) | м2 → м², м3 → м³ и нераз. пробел | 515 | | ✓ |
| 74. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ |
| 75. | [ru/number/comma](../src/rules/ru/number/comma.js) | Замена точки на запятую в числах | 610 | | ✓ |
| 76. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/4 → ¾ | 610 | | ✓ |
| 77. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ |
| 78. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ |
| 79. | [ru/money/currency](../src/rules/ru/money/currency.js) | Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $ | 710 | | |
| 80. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | |
| 81. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 810 | | ✓ |
| 82. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ |
| 83. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 910 | | |
| 84. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | |
| 85. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Форматирование телефонных номеров | 910 | | ✓ |
| 86. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | |
| 87. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | |
| 88. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | |
| 72. | [common/number/fraction](../src/rules/common/number/fraction.js) | 1/2 → ½, 1/4 → ¼, 3/4 → ¾ | 610 | | ✓ |
| 73. | [ru/number/ordinals](../src/rules/ru/number/ordinals.js) | N-ый, -ой, -ая, -ое, -ые, -ым, -ом, -ых → N-й, -я, -е, -м, -х (25-й) | 610 | | ✓ |
| 74. | [ru/number/comma](../src/rules/ru/number/comma.js) | Замена точки на запятую в числах | 610 | | ✓ |
| 75. | [common/number/mathSigns](../src/rules/common/number/mathSigns.js) | != → ≠, <= → ≤, >= → ≥, ~= → ≅, +- → ± | 610 | | ✓ |
| 76. | [common/number/times](../src/rules/common/number/times.js) | x → × (10 x 5 → 10×5) | 610 | | ✓ |
| 77. | [ru/money/ruble](../src/rules/ru/money/ruble.js) | 1 руб. → 1 ₽ | 710 | | |
| 78. | [ru/money/currency](../src/rules/ru/money/currency.js) | Символ валюты ($, €, ¥, Ұ, £ и ₤) после числа, $100 → 100 $ | 710 | | |
| 79. | [ru/date/weekday](../src/rules/ru/date/weekday.js) | 2 Мая, Понедельник → 2 мая, понедельник | 810 | | ✓ |
| 80. | [ru/date/fromISO](../src/rules/ru/date/fromISO.js) | Преобразование дат YYYY-MM-DD к виду DD.MM.YYYY | 810 | | ✓ |
| 81. | [common/other/repeatWord](../src/rules/common/other/repeatWord.js) | Удаление повтора слова | 910 | | |
| 82. | [ru/other/accent](../src/rules/ru/other/accent.js) | Замена заглавной буквы на строчную с добавлением ударения | 910 | | |
| 83. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Форматирование телефонных номеров | 910 | | ✓ |
| 84. | [ru/optalign/bracket](../src/rules/ru/optalign/bracket.js) | для открывающей скобки | 1010 | | |
| 85. | [ru/optalign/comma](../src/rules/ru/optalign/comma.js) | для запятой | 1010 | | |
| 86. | [ru/optalign/quote](../src/rules/ru/optalign/quote.js) | для открывающей кавычки | 1010 | | |
| 87. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | hide-safe-tags-html | ✓ |
| 88. | [ru/nbsp/addr](../src/rules/ru/nbsp/addr.js) | Расстановка нераз. пробела после «г.», «обл.», «ул.», «пр.», «кв.» и др. | 510 | | ✓ |
| 89. | [ru/typo/switchingKeyboardLayout](../src/rules/ru/typo/switchingKeyboardLayout.js) | Замена латинских букв на русские. Опечатки, возникающие при переключении клавиатурной раскладки | 1110 | | ✓ |

@@ -95,0 +95,0 @@ | 90. | [common/nbsp/nowrap](../src/rules/common/nbsp/nowrap.js) | Заменять нераз. пробел на обычный пробел в тегах nowrap и nobr | 510 | end | ✓ |

@@ -93,3 +93,3 @@ ## Rules of typograf

| 88. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Formatting phone numbers | 910 | | ✓ |
| 89. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | | ✓ |
| 89. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Placement of commas before “а” and “но” | 410 | hide-safe-tags-html | ✓ |
| 90. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |

@@ -96,0 +96,0 @@ | 91. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |

@@ -93,3 +93,3 @@ ## Правила типографа

| 88. | [ru/other/phone-number](../src/rules/ru/other/phone-number.js) | Форматирование телефонных номеров | 910 | | ✓ |
| 89. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | | ✓ |
| 89. | [ru/punctuation/ano](../src/rules/ru/punctuation/ano.js) | Расстановка запятых перед «а» и «но» | 410 | hide-safe-tags-html | ✓ |
| 90. | [ru/punctuation/exclamation](../src/rules/ru/punctuation/exclamation.js) | !! → ! | 410 | | ✓ |

@@ -96,0 +96,0 @@ | 91. | [ru/punctuation/exclamationQuestion](../src/rules/ru/punctuation/exclamationQuestion.js) | !? → ?! | 415 | | ✓ |

{
"name": "typograf",
"description": "The client and server typography",
"version": "6.7.0",
"version": "6.7.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Denis Seleznev",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc