typograf 7.4.0 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![NPM version](https://img.shields.io/npm/v/typograf.svg?style=flat)](https://www.npmjs.com/package/typograf)
6
6
  [![NPM downloads](https://img.shields.io/npm/dm/typograf.svg?style=flat)](https://www.npmjs.com/package/typograf)
7
7
  [![Coverage Status](https://img.shields.io/coveralls/typograf/typograf.svg?style=flat)](https://coveralls.io/r/typograf/typograf)
8
- [![bundlephobia](https://badgen.net/bundlephobia/minzip/typograf)](https://bundlephobia.com/result?p=typograf)
9
8
  [![install size](https://packagephobia.com/badge?p=typograf)](https://packagephobia.com/result?p=typograf)
10
9
 
11
10
  Помогает автоматически расставить неразрывные пробелы, исправить мелкие опечатки, привести кавычки к правильному виду, заменить дефисы на тире в нужных местах и многое другое.
@@ -806,7 +806,7 @@
806
806
  return preparedRule;
807
807
  }
808
808
 
809
- var PACKAGE_VERSION = '7.4.0';
809
+ var PACKAGE_VERSION = '7.4.1';
810
810
 
811
811
  function prepareHtmlEntity(htmlEntity) {
812
812
  var result = {
@@ -3170,15 +3170,8 @@
3170
3170
  var anoRule = {
3171
3171
  name: 'ru/punctuation/ano',
3172
3172
  handler: function (text) {
3173
- var parts = [
3174
- '([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])', // Запятую не ставим, если уже есть какой-либо знак
3175
- '(?<!([^а-яА-Я]+ну|Ну))', // Запятую не ставим перед ну
3176
- '(\\s+)', // Отступ между левой и правой частями в виде пробельных символов
3177
- '(а|но)', // Союзы
3178
- '(?= |\u00A0|\\n)' // Остальная часть предложения(пробел, неразрывной пробел, перевод строки)
3179
- ];
3180
- var re = new RegExp(parts.join(''), 'g');
3181
- return text.replace(re, '$1,$3$4');
3173
+ var re = new RegExp('([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])(\\s+)(а|но)(?= |\u00A0|\\n)', 'g');
3174
+ return text.replace(re, '$1,$2$3');
3182
3175
  },
3183
3176
  };
3184
3177
 
@@ -1,2 +1,2 @@
1
1
  /*! typograf | © 2024 Denis Seleznev | MIT License | https://github.com/typograf/typograf */
2
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=n()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)};function t(e,n,t){if(t||2===arguments.length)for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||((r=r||Array.prototype.slice.call(n,0,a))[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}var P=[["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]],e=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function n(){var n=this;this.entities=this.prepareEntities(t(t([],P,!0),e,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(e){n.entitiesByName[e.name]=e,n.entitiesByNameEntity[e.nameEntity]=e,n.entitiesByDigitEntity[e.digitEntity]=e,n.entitiesByUtf[e.utf]=e}),this.invisibleEntities=this.prepareEntities(e)}n.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 n=t.entitiesByNameEntity[e];return n?n.utf:e}))},n.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,16))})},n.prototype.restore=function(e){var n=e.prefs.htmlEntity,t=n.type,r=this.entities;"name"!==t&&"digit"!==t||((n.onlyInvisible||n.list)&&(r=[],n.onlyInvisible&&(r=r.concat(this.invisibleEntities)),n.list)&&(r=r.concat(this.prepareListParam(n.list))),e.text=this.restoreEntitiesByIndex(e.text,"name"===t?"nameEntity":"digitEntity",r))},n.prototype.getByUtf=function(e,n){var t;switch(n){case"digit":t=this.entitiesByDigitEntity[e];break;case"name":t=this.entitiesByNameEntity[e];break;default:t=e}return t},n.prototype.prepareEntities=function(e){var r=[];return e.forEach(function(e){var n=e[0],e=e[1],t=String.fromCharCode(e);r.push({name:n,nameEntity:"&"+n+";",digitEntity:"&#"+e+";",utf:t,reName:new RegExp("&"+n+";","g"),reUtf:new RegExp(t,"g")})}),r},n.prototype.prepareListParam=function(e){var n=this,t=[];return e.forEach(function(e){e=n.entitiesByName[e];e&&t.push(e)}),t},n.prototype.restoreEntitiesByIndex=function(n,t,e){return e.forEach(function(e){n=n.replace(e.reUtf,e[t])}),n};var s=new n,a=[];function o(e){e=(e||"").split("/")[0];e&&"common"!==e&&!i(e)&&(a.push(e),a.sort())}function i(e){return"common"===e||-1!==a.indexOf(e)}function u(e,n){e=e||n;return e?Array.isArray(e)?e:[e]:[]}function c(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach(function(e){if(!i(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var l={};function z(e){return l[e]}function p(n){Object.keys(n).forEach(function(e){o(e),l[e]=n[e]})}var I=["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"],m=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),h="\\d+([.,]\\d+)?",C=/\d/;function g(e){return-1<e.search(C)}var d="\uf000",f="\uf001",O=(b.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},b.prototype.show=function(n,t){for(var e=new RegExp("\uf000tf\\d+\uf000","g"),r=new RegExp("\uf000tf\\d"),a=function(e){return n.safeTags.hidden[t][e]||e},o=0,s=this.tags[t].length;o<s&&(n.text=n.text.replace(e,a),-1!==n.text.search(r));o++);},b.prototype.hide=function(n,e){var t=this,r=(n.safeTags.hidden[e]={},this.pasteLabel.bind(this,n,e));this.tags[e].forEach(function(e){n.text=n.text.replace(t.prepareRegExp(e),r)})},b.prototype.hideHTMLTags=function(e){var n;e.isHTML&&(n=this.pasteLabel.bind(this,e,"html"),e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,n).replace(/&lt;\/?[a-z][^]*?&gt;/gi,n).replace(/&[gl]t;/gi,n))},b.prototype.getPrevLabel=function(e,n){for(var t=n-1;0<=t;t--)if(e[t]===d)return e.slice(t,n+1);return""},b.prototype.getNextLabel=function(e,n){for(var t=n+1;t<e.length;t++)if(e[t]===d)return e.slice(n,t+1);return""},b.prototype.getTagByLabel=function(t,r){var a=null;return this.groups.some(function(e){var n=t.safeTags.hidden[e][r];return a=void 0!==n?{group:e,value:n}:a}),a},b.prototype.getTagInfo=function(e){if(!e)return null;var n={group:e.group};switch(e.group){case"html":n.name=e.value.split(/[<\s>]/)[1],n.isInline=-1<I.indexOf(n.name),n.isClosing=-1<e.value.search(/^<\//);break;case"url":n.isInline=!0;break;case"own":n.isInline=!1}return n},b.prototype.pasteLabel=function(e,n,t){var e=e.safeTags,r="\uf000tf"+e.counter+d;return e.hidden[n][r]=t,e.counter++,r},b.prototype.prepareRegExp=function(e){var n,t;return e instanceof RegExp?e:(n=e[0],t=e[1],e=e[2],new RegExp(n+(void 0===e?"[^]*?":e)+t,"gi"))},b.prototype.getPrevTagInfo=function(e,n,t){n=this.getPrevLabel(n,t-1);if(n){t=this.getTagByLabel(e,n);if(t)return this.getTagInfo(t)}return null},b.prototype.getNextTagInfo=function(e,n,t){n=this.getNextLabel(n,t+1);if(n){t=this.getTagByLabel(e,n);if(t)return this.getTagInfo(t)}return null},b);function b(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var n=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){n.push(["<".concat(e,"(\\s[^>]*?)?>"),"</".concat(e,">")])}),this.tags={own:[],html:n.map(this.prepareRegExp),url:[m]}}function $(e,n){for(var t="";1==(1&n)&&(t+=e),0!=(n>>>=1);)e+=e;return t}function y(e){return e.replace(/\u00A0/g," ")}function x(e,n){for(var t=0;t<n.length;t++)e=e.replace(n[t][0],n[t][1]);return e}function H(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function v(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var j={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},Q=0,F="default",Y=[],W=[];function R(){var e=t([],Y,!0);return e.sort(function(e,n){return e.index>n.index?1:-1}),e}function X(){return t([],W,!0)}function G(e){var n=e.name.split("/"),t=n[0],r=n[1],n=n[2];return{name:e.name,shortName:n,handler:e.handler,queue:e.queue||F,enabled:!0!==e.disabled,locale:t,group:r,index:"number"==typeof(n=e).index?n.index:(t=n.name.split("/")[1],void 0===(t=j[t])&&(t=Q),"string"==typeof n.index?t+parseInt(n.index,10):t),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function K(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function V(e){return e||"LF"}S.addRule=function(e){o((e=G(e=e)).locale),Y.push(e)},S.addRules=function(e){var n=this;e.forEach(function(e){n.addRule(e)})},S.addInnerRule=function(e){W.push(G(e))},S.addInnerRules=function(e){var n=this;e.forEach(function(e){n.addInnerRule(e)})},S.getRule=function(n){var t=null;return R().some(function(e){return e.name===n&&(t=e,!0)}),t},S.getRules=R,S.getInnerRules=X,S.getLocales=function(){return a},S.addLocale=function(e){o(e)},S.hasLocale=i,S.setData=function(e){p(e)},S.getData=function(e){return l[e]},S.prototype.execute=function(e,n){var t;return(e=""+e)?(t=this.prefs,n=n,t=r({},t),n&&("locale"in n&&(t.locale=u(n.locale)),"htmlEntity"in n&&(t.htmlEntity=K(n.htmlEntity)),"lineEnding"in n&&(t.lineEnding=V(n.lineEnding)),"processingSeparateParts"in n&&(t.processingSeparateParts=n.processingSeparateParts),"ruleFilter"in n)&&(t.ruleFilter=n.ruleFilter),c((n=t).locale),t=this.prepareContext(e,n),this.process(t)):""},S.prototype.getSetting=function(e,n){return this.settings[e]&&this.settings[e][n]},S.prototype.setSetting=function(e,n,t){this.settings[e]=this.settings[e]||{},this.settings[e][n]=t},S.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},S.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},S.prototype.enableRule=function(e){return this.enable(e,!0)},S.prototype.disableRule=function(e){return this.enable(e,!1)},S.prototype.addSafeTag=function(e,n,t){e=e instanceof RegExp?e:[e,n,t];this.safeTags.add(e)},S.prototype.prepareContext=function(e,t){return{text:e,isHTML:H(e),prefs:t,getData:function(n){return"char"===n?t.locale.map(function(e){return l[e+"/"+n]}).join(""):z(t.locale[0]+"/"+n)},safeTags:this.safeTags}},S.prototype.splitBySeparateParts=function(a){var o,e,s;return a.isHTML&&!1!==a.prefs.processingSeparateParts?(o=[],e=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),s=0,a.text.replace(e,function(e,n,t,r){return s!==r&&o.push((s?f:"")+a.text.slice(s,r)+f),o.push(e),s=r+e.length,e}),o.push(s?f+a.text.slice(s,a.text.length):a.text),o):[a.text]},S.prototype.process=function(n){var e,t=this,r=(n.text=n.text.replace(/\r\n?/g,"\n"),this.executeRules(n,"start"),this.safeTags.hide(n,"own"),this.executeRules(n,"hide-safe-tags-own"),this.safeTags.hide(n,"html"),this.executeRules(n,"hide-safe-tags-html"),n.isHTML),a=new RegExp(f,"g");return n.text=this.splitBySeparateParts(n).map(function(e){return n.text=e,n.isHTML=H(e),t.safeTags.hideHTMLTags(n),t.safeTags.hide(n,"url"),t.executeRules(n,"hide-safe-tags-url"),t.executeRules(n,"hide-safe-tags"),s.toUtf(n),n.prefs.live&&(n.text=y(n.text)),t.executeRules(n,"utf"),t.executeRules(n),s.restore(n),t.executeRules(n,"html-entities"),t.safeTags.show(n,"url"),t.executeRules(n,"show-safe-tags-url"),n.text.replace(a,"")}).join(""),n.isHTML=r,this.safeTags.show(n,"html"),this.executeRules(n,"show-safe-tags-html"),this.safeTags.show(n,"own"),this.executeRules(n,"show-safe-tags-own"),this.executeRules(n,"end"),r=n.text,"CRLF"===(e=n.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===e?r.replace(/\n/g,"\r"):r},S.prototype.executeRules=function(n,e){var t=this,r=this.rulesByQueues[e=void 0===e?F:e],e=this.innerRulesByQueues[e];e&&e.forEach(function(e){t.ruleIterator(n,e)}),r&&r.forEach(function(e){t.ruleIterator(n,e)})},S.prototype.ruleIterator=function(e,n){!0===e.prefs.live&&!1===n.live||!1===e.prefs.live&&!0===n.live||"common"!==n.locale&&n.locale!==e.prefs.locale[0]||!this.isEnabledRule(n.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(n)||(this.onBeforeRule&&this.onBeforeRule(n.name,e),e.text=n.handler.call(this,e.text,this.settings[n.name],e),this.onAfterRule&&this.onAfterRule(n.name,e))},S.prototype.prepareRuleSettings=function(e){this.settings[e.name]=v(e.settings),this.enabledRules[e.name]=e.enabled},S.prototype.enable=function(e,n){var t=this;Array.isArray(e)?e.forEach(function(e){t.enableByMask(e,n)}):this.enableByMask(e,n)},S.prototype.enableByMask=function(e,n){var t,r=this;e&&(-1!==e.search(/\*/)?(t=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach(function(e){e=e.name;t.test(e)&&(r.enabledRules[e]=n)})):this.enabledRules[e]=n)},S.groups=[],S.titles={},S.version="7.4.0";var w=S;function S(e){var n=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:u((e=e).locale),lineEnding:V(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:K(e.htmlEntity)},c(this.prefs.locale),this.safeTags=new O,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=X(),this.innerRules.forEach(function(e){n.innerRulesByQueues[e.queue]=n.innerRulesByQueues[e.queue]||[],n.innerRulesByQueues[e.queue].push(e)}),this.rulesByQueues={},this.rules=R(),this.rules.forEach(function(e){n.prepareRuleSettings(e),n.rulesByQueues[e.queue]=n.rulesByQueues[e.queue]||[],n.rulesByQueues[e.queue].push(e)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"common/char":"a-z","common/dash":"--?|\u2012|\u2013|\u2014","common/quote":'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'},{"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","be/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"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","bg/quote":{left:"\u201e\u2019",right:"\u201c\u2019"}},{"ca/char":"abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc","ca/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"cs/char":"a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e","cs/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"da/char":"a-z\xe5\xe6\xf8","da/quote":{left:"\xbb\u203a",right:"\xab\u2039"}},{"de/char":"a-z\xdf\xe4\xf6\xfc","de/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"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","el/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"en-GB/char":"a-z","en-GB/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"en-US/char":"a-z","en-US/quote":{left:"\u201c\u2018",right:"\u201d\u2019"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d","eo/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"es/char":"a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc","es/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"et/char":"abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e","et/quote":{left:"\u201e\xab",right:"\u201c\xbb"}},{"fi/char":"abcdefghijklmnopqrstuvy\xf6\xe4\xe5","fi/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"fr/char":"a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6","fr/quote":{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa","ga/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"hu/char":"a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171","hu/quote":{left:"\u201e\xbb",right:"\u201d\xab"}},{"it/char":"a-z\xe0\xe9\xe8\xec\xf2\xf9","it/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"lv/char":"abcdefghijklmnopqrstuvxz\xe6\u0153","lv/quote":{left:"\xab\u201e",right:"\xbb\u201c"}},{"nl/char":"a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc","nl/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"no/char":"a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8","no/quote":{left:"\xab\u2019",right:"\xbb\u2019"}},{"pl/char":"abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c","pl/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ro/char":"abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b","ro/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ru/char":"\u0430-\u044f\u0451","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)","ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","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/quote":{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0},"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","ru/shortWord":"\u0430|\u0431\u044b|\u0432|\u0432\u043e|\u0434\u0430|\u0434\u043e|\u0436\u0435|\u0437\u0430|\u0438|\u0438\u0437|\u043a|\u043a\u043e|\u043b\u0438|\u043d\u0430|\u043d\u0435|\u043d\u0438|\u043d\u043e|\u043e|\u043e\u0431|\u043e\u0442|\u043f\u043e|\u0441|\u0441\u043e|\u0442\u043e|\u0443","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"},{"sk/char":"abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e","sk/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sl/char":"a-z\u010d\u0161\u017e","sl/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sr/char":"abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e","sr/quote":{left:"\u201e\u2019",right:"\u201d\u2019"}},{"sv/char":"a-z\xe4\xe5\xe9\xf6","sv/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"tr/char":"abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f","tr/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"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","uk/quote":{left:"\xab\u201e",right:"\xbb\u201c"}}].forEach(p);var Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},E={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,function(e){return Z[e]})},disabled:!0},J=new RegExp("<("+["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"].join("|")+")[>\\s]"),E=(w.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},E,{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},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){e=e.split("\n\n");return e.forEach(function(e,n,t){!e.trim()||J.test(e)||(t[n]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))}),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,n,t){var s=this,r=new RegExp("(^|\\s)("+n.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),i=v(t.prefs);return i.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,n,t){return n+t.replace(r,function(e,n,t,r){var a=r[0],o=r[r.length-1],r=r.slice(1,-1);return n+t+"="+a+s.execute(r,i)+o})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.replace(m,function(e,n,t){t=t.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===n?t=t.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===n&&(t=t.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=t,t=n+"://"+t,a='<a href="'+t+'">';return"http"===n||"https"===n?(r=r.replace(/^www\./,""),a+("http"===n?r:n+"://"+r)+"</a>"):a+t+"</a>"})},disabled:!0,htmlAttrs:!1}]),{name:"common/nbsp/afterNumber",handler:function(e,n,t){t=t.getData("char");return e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+t+"]+)","gi"),"$1$2\xa0$3")},disabled:!0});function _(e,n,t,r){return n+t.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}w.addRules([E,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}},{name:"common/nbsp/afterSectionMark",handler:function(e,n,t){t=t.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===t?"\xa7\u202f":"\xa7\xa0")}},{name:"common/nbsp/afterShortWord",handler:function(e,n,t){var r=n.lengthShortWord,n=n.useShortWordList,a=l["common/quote"],o=t.getData("char"),t=t.getData("shortWord"),a=" \xa0(\uf000"+a,n=new RegExp(n&&void 0!==t?"(^|["+a+"])("+t+") ":"(^|["+a+"])(["+o+"]{1,"+r+"}) ","gim");return e.replace(n,"$1$2\xa0").replace(n,"$1$2\xa0")},settings:{lengthShortWord:2,useShortWordList:!1}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,n,t){var r=t.getData("quote"),t=t.getData("char"),a=t.toUpperCase(),t=new RegExp("(["+t+a+"]) (?=\\d{1,"+n.lengthLastNumber+"}[-+\u2212%'\""+r.right+")]?([.!?\u2026]( ["+a+"]|$)|$))","gm");return e.replace(t,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,n,t){var t=t.getData("char"),r=t.toUpperCase(),t=new RegExp("(["+t+"\\d]) (["+t+r+"]{1,"+n.lengthLastWord+"}[.!?\u2026])( ["+r+"]|$)","g");return e.replace(t,"$1\xa0$2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,_).replace(/(<nobr>)(.*?)(<\/nobr>)/g,_)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:y,disabled:!0}]);E={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,a){return e.replace(new RegExp("(^ ?|\\D |".concat(d,")(\\d{1,3}([ \xa0\u202f\u2009]\\d{3})+)(?! ?[\\d-])"),"gm"),function(e,n,t){return n+t.replace(/\s/g,a.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(e,n){var t=n.match(/[.,]/),n=t?n.split(t):[n],r=n[0],n=n[1],r=r.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+a.space);return t?r+t+n:r})},settings:{space:"\u202f"}},w.addRules([E,{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")}},{name:"common/number/mathSigns",handler:function(e){return x(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}]),w.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,n,t){var r=l["common/quote"],t=t.getData("char"),r="[;:,.?! \n"+r+"]",t=new RegExp("("+r+"|^)(["+t+"]{"+n.min+",}) \\2("+r+"|$)","gi");return e.replace(t,"$1$2$3")},settings:{min:2},disabled:!0}]),E={name:"common/punctuation/apostrophe",handler:function(e,n,t){t="(["+t.getData("char")+"])",t=new RegExp(t+"'"+t,"gi");return e.replace(t,"$1\u2019$2")}};function U(){this.bufferQuotes={left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},this.beforeLeft=" \n\t\xa0[(",this.afterRight=" \n\t\xa0!?.:;#*,\u2026)\\]"}U.prototype.process=function(e){var n,t,r=e.context.text;return this.count(r).total&&(n=e.settings,(t=e.settings.left[0]===e.settings.right[0])&&(e.settings=v(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),t)&&(r=this.returnOriginalQuotes(r,n,e.settings),e.settings=n),r},U.prototype.returnOriginalQuotes=function(e,n,t){for(var r={},a=0;a<t.left.length;a++)r[t.left[a]]=n.left[a],r[t.right[a]]=n.right[a];return e.replace(new RegExp("["+t.left+t.right+"]","g"),function(e){return r[e]})},U.prototype.count=function(e){var n={total:0};return e.replace(new RegExp("["+l["common/quote"]+"]","g"),function(e){return n[e]||(n[e]=0),n[e]++,n.total++,e}),n},U.prototype.removeDuplicates=function(e,n){var t=n.left[0],r=n.left[1]||t,n=n.right[0];return t!==r?e:e.replace(new RegExp(t+t,"g"),t).replace(new RegExp(n+n,"g"),n)},U.prototype.removeSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],o=n.right[t];e=e.replace(new RegExp(a+"([ \u202f\xa0])","g"),a).replace(new RegExp("([ \u202f\xa0])"+o,"g"),o)}return e},U.prototype.setSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],o=n.right[t];e=e.replace(new RegExp(a+"([^\u202f])","g"),a+"\u202f$1").replace(new RegExp("([^\u202f])"+o,"g"),"$1\u202f"+o)}return e},U.prototype.set=function(e,n){var t=l["common/quote"],r=n.settings.left[0],a=n.settings.left[1]||r,o=n.settings.right[0],s=new RegExp("(^|["+this.beforeLeft+"])(["+t+"]+)(?=[^\\s"+d+"])","gim"),t=new RegExp("([^\\s\uf000])(["+t+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(s,function(e,n,t){return n+$(r,t.length)}).replace(t,function(e,n,t){return n+$(o,t.length)}),e=this.setAboveTags(e,n),e=r!==a?this.setInner(e,n.settings):e},U.prototype.setAboveTags=function(o,s){var i=this,u=s.settings.left[0],c=s.settings.right[0];return o.replace(new RegExp("(^|.)(["+l["common/quote"]+"])(.|$)","gm"),function(e,n,t,r,a){return n!==d&&r!==d?e:n===d&&r===d?'"'===t?n+i.getAboveTwoTags(o,a+1,s)+r:e:n===d?(t=-1<i.afterRight.indexOf(r),e=s.safeTags.getPrevTagInfo(s.context,o,a-1),t&&e&&"html"===e.group?n+(e.isClosing?c:u)+r:n+(!r||t?c:u)+r):(e=-1<i.beforeLeft.indexOf(n),t=s.safeTags.getNextTagInfo(s.context,o,a+1),e&&t&&"html"===t.group?n+(t.isClosing?c:u)+r:n+(!n||e?u:c)+r)})},U.prototype.getAboveTwoTags=function(e,n,t){var r=t.safeTags.getPrevTagInfo(t.context,e,n),a=t.safeTags.getNextTagInfo(t.context,e,n);if(r&&"html"===r.group){if(!r.isClosing)return t.settings.left[0];if(a&&a.isClosing&&r.isClosing)return t.settings.right[0]}return e[n]},U.prototype.setInner=function(e,n){for(var t=n.left[0],r=n.right[0],a=this.getMaxLevel(e,t,r,n.left.length),o=0,s="",i=0,u=e.length;i<u;i++){var c=e[i];c===t?(s+=n.left[a-1<o?a-1:o],a<++o&&(o=a)):c===r?(--o<0&&(o=0),s+=n.right[o]):('"'===c&&(o=0),s+=c)}return s},U.prototype.getMaxLevel=function(e,n,t,r){e=this.count(e);return e[n]===e[t]?r:Math.min(r,2)};var ee=new U,ne={},k=(a.forEach(function(e){ne[e]=v(l[e+"/quote"])}),{name:"common/punctuation/quote",handler:function(e,n,t){n=n[t.prefs.locale[0]];return n?ee.process({context:t,settings:n,safeTags:this.safeTags}):e},settings:ne}),E=(w.addRules([E,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,n,t){return"ru"===t.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}},k,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,n,t){var t=this.getSetting("common/punctuation/quote",t.prefs.locale[0]),r=s.getByUtf(t.left[0]),a=s.getByUtf(t.right[0]),o=(o=s.getByUtf(t.left[1]))?"|"+o:"",t=(t=s.getByUtf(t.right[1]))?"|"+t:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+o+")([^]*?)("+a+t+")(</[aA]>)","g");return e.replace(r,"$2$1$3$5$4")}}]),{name:"common/space/beforeBracket",handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(["+t+".!?,;\u2026)])\\(","gi");return e.replace(t,"$1 (")}}),k={name:"common/space/delRepeatN",index:"-1",handler:function(e,n){var n=n.maxConsecutiveLineBreaks,t=new RegExp("\n{".concat(n+1,",}"),"g"),n=$("\n",n);return e.replace(t,n)},settings:{maxConsecutiveLineBreaks:2}},q={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}},te={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,"")}},re=new RegExp('(\\D):([^)",:.?\\s\\/\\\\\uf000])',"g"),T={name:"common/space/afterColon",handler:function(e){return e.replace(re,"$1: $2")}},A={name:"common/space/afterComma",handler:function(e,n,t){t=t.getData("quote"),t="string"==typeof t?t:t.right;return e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\\uf000'+t+"])","g"),function(e,n,t){return g(n)&&g(t)?e:n+", "+t})}},ae=new RegExp("\\?([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),B={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(ae,"? $1")}},oe=new RegExp("!([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),D={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(oe,"! $1")}},se=new RegExp(";([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),T=(w.addRules([T,A,B,D,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(se,"; $1")}},E,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},k,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},q,te]),{name:"common/symbols/arrow",handler:function(e){return x(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),A=(w.addRules([T,{name:"common/symbols/cf",handler:function(e){var n=new RegExp('(^|[\\s(\\[+\u2248\xb1\u2212\u2014\u2013\\-])(\\d+(?:[.,]\\d+)?)[ \xa0\u2009]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(n,"$1$2\u2009\xb0$3$4")}},{name:"common/symbols/copy",handler:function(e){return x(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}]),{name:"en-US/dash/main",index:"-5",handler:function(e){var n=l["common/dash"],t="[ ".concat("\xa0","]"),r="[ ".concat("\xa0","\n]"),t=new RegExp("".concat(t,"(").concat(n,")(").concat(r,")"),"g");return e.replace(t,"".concat("\xa0").concat("\u2014","$2"))}}),B=(w.addRules([A]),{name:"ru/dash/centuries",handler:function(e,n){var t=new RegExp("(X|I|V)[ |\xa0]?"+("("+l["common/dash"]+")")+"[ |\xa0]?(X|I|V)","g");return e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"\u2013"}}),D=(w.addRules([B,{name:"ru/dash/daysMonth",handler:function(e,n){var t=new RegExp("(^|\\s)([123]?\\d)("+l["common/dash"]+")([123]?\\d)[ \xa0]("+l["ru/monthGenCase"]+")","g");return e.replace(t,"$1$2"+n.dash+"$4\xa0$5")},settings:{dash:"\u2013"}},{name:"ru/dash/de",handler:function(e){var n=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+l["ru/dashAfterDe"],"g");return e.replace(n,"$1-\u0434\u0435")},disabled:!0},{name:"ru/dash/decade",handler:function(e,n){var t=new RegExp("(^|\\s)(\\d{3}|\\d)0("+l["common/dash"]+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(t,"$1$20"+n.dash+"$40$5")},settings:{dash:"\u2013"}},{name:"ru/dash/directSpeech",handler:function(e){var n=l["common/dash"],t=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('.concat(n,")[ |\xa0]"),"g"),r=new RegExp("(^|".concat(d,")(").concat(n,")( |\xa0)"),"gm"),n=new RegExp("([.\u2026?!])[ \xa0](".concat(n,")[ \xa0]"),"g");return e.replace(t,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(n,"$1 \u2014\xa0")}},{name:"ru/dash/izpod",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2\u0437-\u043f\u043e\u0434")}},{name:"ru/dash/izza",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u0437\u0430"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2\u0437-\u0437\u0430")}},{name:"ru/dash/ka",handler:function(e){var n=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+l["ru/dashAfter"],"g");return e.replace(n,"$1-\u043a\u0430$2")}},{name:"ru/dash/koe",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var n=new RegExp("([ \xa0])("+l["common/dash"]+")([ \xa0\\n])","g");return e.replace(n,"\xa0\u2014$3")}},{name:"ru/dash/month",handler:function(e,n){var t="("+l["ru/month"]+")",r="("+l["ru/monthPreCase"]+")",a=l["common/dash"],t=new RegExp(t+" ?("+a+") ?"+t,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+n.dash+"$3";return e.replace(t,r).replace(a,r)},settings:{dash:"\u2013"}},{name:"ru/dash/surname",handler:function(e){var n=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(n,"$1\xa0\u2014$2")}},{name:"ru/dash/taki",handler:function(e){var n=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)"+l["ru/dashAfter"],"g");return e.replace(n,"$1-$2")}},{name:"ru/dash/time",handler:function(e,n){var t=new RegExp(l["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+l["common/dash"]+"(\\d?\\d:[0-5]\\d)"+l["ru/dashAfter"],"g");return e.replace(t,"$1$2"+n.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/to",handler:function(e){var n=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041e\u043e]\u0442\u043a\u0443\u0434\u0430|[\u041a\u043a]\u0443\u0434\u0430|[\u0413\u0433]\u0434\u0435|[\u041a\u043a]\u043e\u0433\u0434\u0430|[\u0417\u0437]\u0430\u0447\u0435\u043c|[\u041f\u043f]\u043e\u0447\u0435\u043c\u0443|[\u041a\u043a]\u0430\u043a|[\u041a\u043a]\u0430\u043a\u043e[\u0435\u0439\u043c]|[\u041a\u043a]\u0430\u043a\u0430\u044f|[\u041a\u043a]\u0430\u043a\u0438[\u0435\u043c\u0445]|[\u041a\u043a]\u0430\u043a\u0438\u043c\u0438|[\u041a\u043a]\u0430\u043a\u0443\u044e|[\u0427\u0447]\u0442\u043e|[\u0427\u0447]\u0435\u0433\u043e|[\u0427\u0447]\u0435[\u0439\u043c]|[\u0427\u0447]\u044c\u0438\u043c?|[\u041a\u043a]\u0442\u043e|[\u041a\u043a]\u043e\u0433\u043e|[\u041a\u043a]\u043e\u043c\u0443|[\u041a\u043a]\u0435\u043c)( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+l["ru/dashAfter"],"g");return e.replace(n,function(e,n,t,r,a){r=t+r+a;return"\u043a\u0430\u043a \u0442\u043e"===r||"\u041a\u0430\u043a \u0442\u043e"===r?e:n+t+"-"+a})}},{name:"ru/dash/kakto",handler:function(e){var n=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041a\u043a]\u0430\u043a) \u0442\u043e"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2-\u0442\u043e")}},{name:"ru/dash/weekday",handler:function(e,n){var t="("+l["ru/weekday"]+")",t=new RegExp(t+" ?("+l["common/dash"]+") ?"+t,"gi");return e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/years",handler:function(e,o){var n=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+l["common/dash"]+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(n,function(e,n,t,r,a){return parseInt(t,10)<parseInt(a,10)?n+t+o.dash+a:e})},settings:{dash:"\u2013"}}]),"(-|\\.|\\/)"),E="(-|\\/)",ie=new RegExp("(^|\\D)(\\d{4})"+D+"(\\d{2})"+D+"(\\d{2})(\\D|$)","gi"),ue=new RegExp("(^|\\D)(\\d{2})"+E+"(\\d{2})"+E+"(\\d{4})(\\D|$)","gi"),k=(w.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(ie,"$1$6.$4.$2$7").replace(ue,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var n=new RegExp("(\\d)( |\xa0)("+l["ru/monthGenCase"]+"),( |\xa0)("+l["ru/weekday"]+")","gi");return e.replace(n,function(e,n,t,r,a,o){return n+t+r.toLowerCase()+","+a+o.toLowerCase()})}}]),{name:"ru/money/currency",handler:function(e){var n="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",t=new RegExp("(^|[\\D]{2})"+n+" ?("+h+"([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),n=new RegExp("(^|[\\D])("+h+") ?"+n,"gm");return e.replace(t,function(e,n,t,r,a,o,s,i){return n+r+(i?"\xa0"+i:"")+"\xa0"+t}).replace(n,"$1$2\xa0$4")},disabled:!0});function ce(e,n,t,r){return"\u0434\u0434"===t&&"\u043c\u043c"===r||-1<["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)?e:n+t+".\xa0"+r+"."}w.addRules([k,{name:"ru/money/ruble",handler:function(e){var n="$1\xa0\u20bd",t="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",r=new RegExp("^"+t+"$","g"),a=new RegExp(t+"(?=[!?,:;])","g"),t=new RegExp(t+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(r,n).replace(a,n).replace(t,n+".")},disabled:!0}]);var le={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""};w.addRules([{name:"ru/nbsp/abbr",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\."),"g");return e.replace(n,ce).replace(n,ce)}},{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")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var n="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",t=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+n+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),n=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+n+"[ \xa0]","g");return e.replace(t,"$1\xa0$2").replace(n,"$1\xa0$2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var n=l["common/dash"],t="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',a=new RegExp(t+"[ \xa0]?\u0432\\.?"+r,"gm"),t=new RegExp(t+"("+n+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(a,"$1$2\xa0\u0432.").replace(t,"$1$2$3$4\xa0\u0432\u0432.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var n=new RegExp("(\\d{1,2}) ("+l["ru/shortMonth"]+")","gi");return e.replace(n,"$1\xa0$2")}},{name:"ru/nbsp/initials",handler:function(e){var n=new RegExp("(^|[(\xa0\u202f "+l["ru/quote"].left+d+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)',"gm");return e.replace(n,"$1$2.\xa0$3.\xa0$4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var n=new RegExp("(^|[\\s,.\\(\uf000])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s\\).!?,;\uf000]|$)","gm");return e.replace(n,function(e,n,t,r,a,o){return n+t+"\xa0"+r+le[a||""]+("\xa0"===o?" ":o)})}},{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")}},{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")}},{name:"ru/nbsp/page",handler:function(e){var n=new RegExp("(^|[)\\s\uf000])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(n,"$1$2.\xa0$3$4")}},{name:"ru/nbsp/ps",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? "),"gim");return e.replace(n,function(e,n,t){return n+(t?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}},{name:"ru/nbsp/see",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(n,function(e,n,t,r,a){return("\xa0"===n?" ":n)+t+".\xa0"+r+a})}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var n=new RegExp("(^|\\D)(\\d{4})("+l["common/dash"]+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(n,"$1$2$3$4\xa0\u0433\u0433.")}}]);function L(e,n){n=new RegExp('<span class="('+n.join("|")+')">([^]*?)</span>',"g");return e.replace(n,"$2")}function N(e,n){return e.replace(/<title>[^]*?<\/title>/i,function(e){return L(e,n)})}w.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,n,t){t=t.getData("char"),t=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)(?!["+t+"])","g");return e.replace(t,function(e,n,t){return n+"-"+{"\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"}[t]})}}]);var pe=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],q="ru/optalign/bracket",te={name:q,queue:"start",handler:function(e){return L(e,pe)},htmlAttrs:!1},T={name:q,queue:"end",handler:function(e){return N(e,pe)},htmlAttrs:!1},me=["typograf-oa-comma","typograf-oa-comma-sp"],A="ru/optalign/comma",B={name:A,queue:"start",handler:function(e){return L(e,me)},htmlAttrs:!1},D={name:A,queue:"end",handler:function(e){return N(e,me)},htmlAttrs:!1},he=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],E="ru/optalign/quote",k={name:E,queue:"start",handler:function(e){return L(e,he)},htmlAttrs:!1},ge={name:E,queue:"end",handler:function(e){return N(e,he)},htmlAttrs:!1},M=(w.addRules([{name:q,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},{name:A,handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(["+t+"\\d\u0301]+), ","gi");return e.replace(t,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:E,handler:function(e){var n=this.getSetting("common/punctuation/quote","ru"),n="(["+n.left[0]+(n.left[1]||"")+"])",t=new RegExp("(^|\n\n|\uf000)("+n+")","g"),n=new RegExp("([^\n\uf000])([ \xa0\n])("+n+")","gi");return e.replace(t,'$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}]),w.addInnerRules([te,T,B,D,k,ge]),[]);function de(e){var n,t,r=e[0],a="";if(e.length<8)return fe(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;n=!0,e=e.substr(2)}else"8"===r&&(t=!0,e=e.substr(1));for(var o=8;2<=o;o--){var s=+e.substr(0,o);if(-1<M.indexOf(s)){a=e.substr(0,o),e=e.substr(o);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(n?"+7\xa0":"")+(t?"8\xa0":"")+function(e){var n=+e,t=e.length,r=[e],a=!1;if(3<t)switch(t){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 a=900<n&&n<=999||495==n||499==n;t=r.join("-");return a?t:"("+t+")"}(a)+"\xa0"+fe(e)}function fe(e){var n="";return e.length%2&&(n=e[0],n+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),n+e.split(/(?=(?:\d\d)+$)/).join("-")}function be(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,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,"39131-39179","39190-39199",391,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 n=e.split("-"),t=+n[0];t<=+n[1];t++)M.push(t);else M.push(e)});w.addRules([{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,n,t,r){return n+t.toLowerCase()+"\u0301"+r})},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var n=new RegExp("(^|,| |\uf000)(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|\uf000|$)","gm");return e.replace(n,function(e,n,t){t=be(t);return 12===t.length?n+de(t):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,n,t,r,a){a=be(a);return 5<=a.length?n+t+r+de(a):e})}}]);var q={name:"ru/punctuation/ano",handler:function(e){var n=new RegExp(["([^\xab\u201e[(!?,:;\\-\u2012\u2013\u2014\\s\uf000])","(?<!([^\u0430-\u044f\u0410-\u042f]+\u043d\u0443|\u041d\u0443))","(\\s+)","(\u0430|\u043d\u043e)","(?= |\xa0|\\n)"].join(""),"g");return e.replace(n,"$1,$3$4")}},$e=(w.addRules([q,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),w.addRules([{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")}},{name:"ru/space/year",handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+t+"]|$)","g");return e.replace(t,"$1$2 $3$5")}}]),w.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}]),{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"}),ye=Object.keys($e).join("");w.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var n=new RegExp("(["+ye+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return e.replace(n,function(e,n){for(var t="",r=0;r<n.length;r++)t+=$e[n[r]];return t})}}]);return w.titles={"common/html/e-mail":{"en-US":"Placement of links for e-mail",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u044d\u043b. \u043f\u043e\u0447\u0442\u044b"},"common/html/escape":{"en-US":"Escaping HTML",ru:"\u042d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 HTML"},"common/html/nbr":{"en-US":"Replacement line break on <br/>",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 <br/>"},"common/html/p":{"en-US":"Placement of paragraph",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0431\u0437\u0430\u0446\u0435\u0432"},"common/html/processingAttrs":{"en-US":"Processing HTML attributes",ru:"\u0422\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 HTML-\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432"},"common/html/quot":{common:'&\u2060quot; \u2192 "'},"common/html/stripTags":{"en-US":"Removing HTML-tags",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 HTML-\u0442\u0435\u0433\u043e\u0432"},"common/html/url":{"en-US":"Placement of links",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a"},"common/nbsp/afterNumber":{"en-US":"Non-breaking space between number and word",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0441\u043b\u043e\u0432\u043e\u043c"},"common/nbsp/afterParagraphMark":{"en-US":"Non-breaking space after \xb6",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xb6"},"common/nbsp/afterSectionMark":{"en-US":"Non-breaking space after \xa7",ru:"\u041d\u0435\u0440\u0430\u0437. \u0443\u0437\u043a\u0438\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xa7"},"common/nbsp/afterShortWord":{"en-US":"Non-breaking space after short word",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430"},"common/nbsp/beforeShortLastNumber":{"en-US":"Non-breaking space before number (maximum 2 digits) at end of sentence",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u0447\u0438\u0441\u043b\u043e\u043c (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u0446\u0438\u0444\u0440) \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f"},"common/nbsp/beforeShortLastWord":{"en-US":"Non-breaking space before last short word in sentence",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438"},"common/nbsp/dpi":{"en-US":"Non-breaking space before lpi and dpi",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 lpi \u0438 dpi"},"common/nbsp/nowrap":{"en-US":"Replace non-breaking space to normal space in tags nowrap and nobr",ru:"\u0417\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0442\u0435\u0433\u0430\u0445 nowrap \u0438 nobr"},"common/nbsp/replaceNbsp":{"en-US":"Replacing non-breaking space on normal before text correction",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0434 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c"},"common/number/digitGrouping":{"en-US":"Divide into groups numbers with many digits",ru:"\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u0430\u043c"},"common/number/fraction":{common:"1/2 \u2192 \xbd, 1/4 \u2192 \xbc, 3/4 \u2192 \xbe"},"common/number/mathSigns":{common:"!= \u2192 \u2260, <= \u2192 \u2264, >= \u2192 \u2265, ~= \u2192 \u2245, +- \u2192 \xb1"},"common/number/times":{common:"x \u2192 \xd7 (10 x 5 \u2192 10\xd75)"},"common/other/delBOM":{"en-US":"Delete character BOM (Byte Order Mark)",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 BOM (Byte Order Mark)"},"common/other/repeatWord":{"en-US":"Removing repeat words",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430"},"common/punctuation/apostrophe":{"en-US":"Placement of correct apostrophe",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043f\u043e\u0441\u0442\u0440\u043e\u0444\u0430"},"common/punctuation/delDoublePunctuation":{"en-US":"Removing double punctuation",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438"},"common/punctuation/hellip":{"en-US":"Replacement of three points by ellipsis",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u0440\u0451\u0445 \u0442\u043e\u0447\u0435\u043a \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u0442\u043e\u0447\u0438\u0435"},"common/punctuation/quote":{"en-US":"Placement of quotation marks in texts",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430"},"common/punctuation/quoteLink":{"en-US":"Removal quotes outside a link",ru:"\u0412\u044b\u043d\u043e\u0441 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0441\u0441\u044b\u043b\u043a\u0438"},"common/space/afterColon":{"en-US":"space after colon",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f"},"common/space/afterComma":{"en-US":"space after comma",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"common/space/afterExclamationMark":{"en-US":"space after exclamation mark",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u043d\u0438\u044f"},"common/space/afterQuestionMark":{"en-US":"space after question mark",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430"},"common/space/afterSemicolon":{"en-US":"space after semicolon",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"common/space/beforeBracket":{"en-US":"Space before opening bracket",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/bracket":{"en-US":"Remove extra spaces after opening and before closing bracket",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/delBeforeDot":{"en-US":"Remove space before dot",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0447\u043a\u043e\u0439"},"common/space/delBeforePercent":{"en-US":"Remove space before %, \u2030 and \u2031",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 %, \u2030 \u0438 \u2031"},"common/space/delBeforePunctuation":{"en-US":"Remove spaces before punctuation",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438"},"common/space/delBetweenExclamationMarks":{"en-US":"Remove spaces before exclamation marks",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u043d\u0438\u044f"},"common/space/delLeadingBlanks":{"en-US":"Remove spaces at start of line",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/delRepeatN":{"en-US":"Remove duplicate line breaks",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/delRepeatSpace":{"en-US":"Removing duplicate spaces between characters",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438"},"common/space/delTrailingBlanks":{"en-US":"Remove spaces at end of line",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/insertFinalNewline":{"en-US":"Insert final newline",ru:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/replaceTab":{"en-US":"Replacement of tab to 4 spaces",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u0430 \u043d\u0430 4 \u043f\u0440\u043e\u0431\u0435\u043b\u0430"},"common/space/squareBracket":{"en-US":"Remove extra spaces after opening and before closing square bracket",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/trimLeft":{"en-US":"Remove spaces and line breaks in beginning of text",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0435\u043a\u0441\u0442\u0430"},"common/space/trimRight":{"en-US":"Remove spaces and line breaks at end of text",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0441\u0442\u0430"},"common/symbols/arrow":{common:"-> \u2192 \u2192, <- \u2192 \u2190"},"common/symbols/cf":{"en-US":"Adding \xb0 to C and F",ru:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \xb0 \u043a C \u0438 F"},"common/symbols/copy":{common:"(c) \u2192 \xa9, (tm) \u2192 \u2122, (r) \u2192 \xae"},"en-US/dash/main":{"en-US":"Replace hyphens surrounded by spaces with an em-dash",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0442\u0438\u0440\u0435"},"ru/dash/centuries":{"en-US":"Hyphen to dash in centuries",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435 \u0432 \u0432\u0435\u043a\u0430\u0445"},"ru/dash/daysMonth":{"en-US":"Dash between days of one month",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u043d\u044f\u043c\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u044f\u0446\u0430"},"ru/dash/de":{"en-US":"Hyphen before \u201c\u0434\u0435\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u0434\u0435\xbb"},"ru/dash/decade":{"en-US":"Dash in decade",ru:"\u0422\u0438\u0440\u0435 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f\u0445, 80\u201490-\u0435 \u0433\u0433."},"ru/dash/directSpeech":{"en-US":"Dash in direct speech",ru:"\u0422\u0438\u0440\u0435 \u0432 \u043f\u0440\u044f\u043c\u043e\u0439 \u0440\u0435\u0447\u0438"},"ru/dash/izpod":{"en-US":"Hyphen between \u201c\u0438\u0437-\u043f\u043e\u0434\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0438\u0437-\u043f\u043e\u0434\xbb"},"ru/dash/izza":{"en-US":"Hyphen between \u201c\u0438\u0437-\u0437\u0430\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0438\u0437-\u0437\u0430\xbb"},"ru/dash/ka":{"en-US":"Hyphen before \u201c\u043a\u0430\u201d and \u201c\u043a\u0430\u0441\u044c\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u043a\u0430\xbb \u0438 \xab\u043a\u0430\u0441\u044c\xbb"},"ru/dash/kakto":{"en-US":"Hyphen for \u201c\u043a\u0430\u043a \u0442\u043e\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u0434\u043b\u044f \xab\u043a\u0430\u043a \u0442\u043e\xbb"},"ru/dash/koe":{"en-US":"Hyphen after \u201c\u043a\u043e\u0435\u201d and \u201c\u043a\u043e\u0439\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u043e\u0441\u043b\u0435 \xab\u043a\u043e\u0435\xbb \u0438 \xab\u043a\u043e\u0439\xbb"},"ru/dash/main":{"en-US":"Replacement hyphen with dash",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435"},"ru/dash/month":{"en-US":"Dash between months",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0441\u044f\u0446\u0430\u043c\u0438"},"ru/dash/surname":{"en-US":"Acronyms with a dash",ru:"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0438\u0440\u0435"},"ru/dash/taki":{"en-US":"Hyphen between \u201c\u0432\u0435\u0440\u043d\u043e-\u0442\u0430\u043a\u0438\u201d and etc.",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0432\u0435\u0440\u043d\u043e-\u0442\u0430\u043a\u0438\xbb \u0438 \u0442. \u0434."},"ru/dash/time":{"en-US":"Dash in time intervals",ru:"\u0422\u0438\u0440\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438"},"ru/dash/to":{"en-US":"Hyphen before \u201c\u0442\u043e\u201d, \u201c\u043b\u0438\u0431\u043e\u201d, \u201c\u043d\u0438\u0431\u0443\u0434\u044c\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u0442\u043e\xbb, \xab\u043b\u0438\u0431\u043e\xbb, \xab\u043d\u0438\u0431\u0443\u0434\u044c\xbb"},"ru/dash/weekday":{"en-US":"Dash between the days of the week",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u043d\u044f\u043c\u0438 \u043d\u0435\u0434\u0435\u043b\u0438"},"ru/dash/years":{"en-US":"Hyphen to dash in years",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435 \u0432 \u0433\u043e\u0434\u0430\u0445"},"ru/date/fromISO":{"en-US":"Converting dates YYYY-MM-DD type DD.MM.YYYY",ru:"\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442 YYYY-MM-DD \u043a \u0432\u0438\u0434\u0443 DD.MM.YYYY"},"ru/date/weekday":{common:"2 \u041c\u0430\u044f, \u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u2192 2 \u043c\u0430\u044f, \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a"},"ru/money/currency":{"en-US":"Currency symbol ($, \u20ac, \xa5, \u04b0, \xa3 and \u20a4) after the number, $100 \u2192 100\xa0$",ru:"\u0421\u0438\u043c\u0432\u043e\u043b \u0432\u0430\u043b\u044e\u0442\u044b ($, \u20ac, \xa5, \u04b0, \xa3 \u0438 \u20a4) \u043f\u043e\u0441\u043b\u0435 \u0447\u0438\u0441\u043b\u0430, $100 \u2192 100\xa0$"},"ru/money/ruble":{common:"1 \u0440\u0443\u0431. \u2192 1 \u20bd"},"ru/nbsp/abbr":{"en-US":"Non-breaking space in abbreviations, e.g. \u201c\u0442.\xa0\u0434.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \xab\u0442.\xa0\u0434.\xbb"},"ru/nbsp/addr":{"en-US":"Placement of non-breaking space after \u201c\u0433.\u201d, \u201c\u043e\u0431\u043b.\u201d, \u201c\u0443\u043b.\u201d, \u201c\u043f\u0440.\u201d, \u201c\u043a\u0432.\u201d et al.",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u043e\u0441\u043b\u0435 \xab\u0433.\xbb, \xab\u043e\u0431\u043b.\xbb, \xab\u0443\u043b.\xbb, \xab\u043f\u0440.\xbb, \xab\u043a\u0432.\xbb \u0438 \u0434\u0440."},"ru/nbsp/afterNumberSign":{"en-US":"Non-breaking thin space after \u2116",ru:"\u041d\u0435\u0440\u0430\u0437. \u0443\u0437\u043a\u0438\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u2116"},"ru/nbsp/beforeParticle":{"en-US":"Non-breaking space before \u201c\u043b\u0438\u201d, \u201c\u043b\u044c\u201d, \u201c\u0436\u0435\u201d, \u201c\u0431\u044b\u201d, \u201c\u0431\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \xab\u043b\u0438\xbb, \xab\u043b\u044c\xbb, \xab\u0436\u0435\xbb, \xab\u0431\u044b\xbb, \xab\u0431\xbb"},"ru/nbsp/centuries":{"en-US":"Remove spaces and extra points in \u201c\u0432\u0432.\u201d",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0432 \xab\u0432\u0432.\xbb"},"ru/nbsp/dayMonth":{"en-US":"Non-breaking space between number and month",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u043c"},"ru/nbsp/initials":{"en-US":"Binding of initials to the name",ru:"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u043e\u0432 \u043a \u0444\u0430\u043c\u0438\u043b\u0438\u0438"},"ru/nbsp/m":{"en-US":"m2 \u2192 \u043c\xb2, m3 \u2192 \u043c\xb3 and non-breaking space",ru:"\u043c2 \u2192 \u043c\xb2, \u043c3 \u2192 \u043c\xb3 \u0438 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b"},"ru/nbsp/mln":{"en-US":"Non-breaking space between number and \u201c\u0442\u044b\u0441.\u201d, \u201c\u043c\u043b\u043d\u201d, \u201c\u043c\u043b\u0440\u0434\u201d and \u201c\u0442\u0440\u043b\u043d\u201d",ru:"\u041d\u0435\u0440\u0430\u0437\u0440. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \xab\u0442\u044b\u0441.\xbb, \xab\u043c\u043b\u043d\xbb, \xab\u043c\u043b\u0440\u0434\xbb \u0438 \xab\u0442\u0440\u043b\u043d\xbb"},"ru/nbsp/ooo":{"en-US":"Non-breaking space after \u201cOOO, \u041e\u0410\u041e, \u0417\u0410\u041e, \u041d\u0418\u0418, \u041f\u0411\u041e\u042e\u041b\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 OOO, \u041e\u0410\u041e, \u0417\u0410\u041e, \u041d\u0418\u0418 \u0438 \u041f\u0411\u041e\u042e\u041b"},"ru/nbsp/page":{"en-US":"Non-breaking space after \u201c\u0441\u0442\u0440.\u201d, \u201c\u0433\u043b.\u201d, \u201c\u0440\u0438\u0441.\u201d, \u201c\u0438\u043b\u043b.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xab\u0441\u0442\u0440.\xbb, \xab\u0433\u043b.\xbb, \xab\u0440\u0438\u0441.\xbb, \xab\u0438\u043b\u043b.\xbb"},"ru/nbsp/ps":{"en-US":"Non-breaking space in P.\xa0S. and P.\xa0P.\xa0S.",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u0432 P.\xa0S. \u0438 P.\xa0P.\xa0S."},"ru/nbsp/rubleKopek":{"en-US":"Not once. space before the \u201crub\u201d and \u201ccop.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \xab\u0440\u0443\u0431.\xbb \u0438 \xab\u043a\u043e\u043f.\xbb"},"ru/nbsp/see":{"en-US":"Non-breaking space after abbreviation \xab\u0441\u043c.\xbb and \xab\u0438\u043c.\xbb",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \xab\u0441\u043c.\xbb \u0438 \xab\u0438\u043c.\xbb"},"ru/nbsp/year":{"en-US":"Non-breaking space before XXXX \u0433. (2012 \u0433.)",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 XXXX \u0433. (2012 \u0433.)"},"ru/nbsp/years":{"en-US":"\u0433.\u0433. \u2192 \u0433\u0433. and non-breaking space",ru:"\u0433.\u0433. \u2192 \u0433\u0433. \u0438 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b"},"ru/number/comma":{"en-US":"Commas in numbers",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0437\u0430\u043f\u044f\u0442\u0443\u044e \u0432 \u0447\u0438\u0441\u043b\u0430\u0445"},"ru/number/ordinals":{common:"N-\u044b\u0439, -\u043e\u0439, -\u0430\u044f, -\u043e\u0435, -\u044b\u0435, -\u044b\u043c, -\u043e\u043c, -\u044b\u0445 \u2192 N-\u0439, -\u044f, -\u0435, -\u043c, -\u0445 (25-\u0439)"},"ru/optalign/bracket":{"en-US":"for opening bracket",ru:"\u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u0438"},"ru/optalign/comma":{"en-US":"for comma",ru:"\u0434\u043b\u044f \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"ru/optalign/quote":{"en-US":"for opening quotation marks",ru:"\u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0430\u0432\u044b\u0447\u043a\u0438"},"ru/other/accent":{"en-US":"Replacement capital letters to lowercase with addition of accent",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043d\u0443\u044e \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u044f"},"ru/other/phone-number":{"en-US":"Formatting phone numbers",ru:"\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432"},"ru/punctuation/ano":{"en-US":"Placement of commas before \u201c\u0430\u201d and \u201c\u043d\u043e\u201d",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u043f\u0435\u0440\u0435\u0434 \xab\u0430\xbb \u0438 \xab\u043d\u043e\xbb"},"ru/punctuation/exclamation":{common:"!! \u2192 !"},"ru/punctuation/exclamationQuestion":{common:"!? \u2192 ?!"},"ru/punctuation/hellipQuestion":{common:"\xab?\u2026\xbb \u2192 \xab?..\xbb, \xab!\u2026\xbb \u2192 \xab!..\xbb, \xab\u2026,\xbb \u2192 \xab\u2026\xbb"},"ru/space/afterHellip":{"en-US":"Space after \u201c...\u201d, \u201c!..\u201d and \u201c?..\u201d",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xab...\xbb, \xab!..\xbb \u0438 \xab?..\xbb"},"ru/space/year":{"en-US":"Space between number and word \u201c\u0433\u043e\u0434\u201d",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0441\u043b\u043e\u0432\u043e\u043c \xab\u0433\u043e\u0434\xbb"},"ru/symbols/NN":{common:"\u2116\u2116 \u2192 \u2116"},"ru/typo/switchingKeyboardLayout":{"en-US":"Replacement of Latin letters in Russian. Typos occur when you switch keyboard layouts",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0445 \u0431\u0443\u043a\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0435. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043d\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438"}},w.groups=[{name:"punctuation",title:{"en-US":"Punctuation",ru:"\u041f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f"}},{name:"optalign",title:{"en-US":"Hanging punctuation",ru:"\u0412\u0438\u0441\u044f\u0447\u0430\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f"}},{name:"dash",title:{"en-US":"Dash and hyphen",ru:"\u0422\u0438\u0440\u0435 \u0438 \u0434\u0435\u0444\u0438\u0441"}},{name:"nbsp",title:{"en-US":"Non-breaking space",ru:"\u041d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b"}},{name:"space",title:{"en-US":"Space and line ending",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"}},{name:"html",title:{"en-US":"HTML",ru:"HTML"}},{name:"date",title:{"en-US":"Date",ru:"\u0414\u0430\u0442\u0430"}},{name:"money",title:{"en-US":"Money",ru:"\u0414\u0435\u043d\u044c\u0433\u0438"}},{name:"number",title:{"en-US":"Numbers and mathematical expressions",ru:"\u0427\u0438\u0441\u043b\u0430 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f"}},{name:"symbols",title:{"en-US":"Symbols and signs",ru:"\u0421\u0438\u043c\u0432\u043e\u043b\u044b \u0438 \u0437\u043d\u0430\u043a\u0438"}},{name:"typo",title:{"en-US":"Typos",ru:"\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438"}},{name:"other",title:{"en-US":"Other",ru:"\u041f\u0440\u043e\u0447\u0435\u0435"}}],w});
2
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=n()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)};function t(e,n,t){if(t||2===arguments.length)for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||((r=r||Array.prototype.slice.call(n,0,a))[a]=n[a]);return e.concat(r||Array.prototype.slice.call(n))}var P=[["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]],e=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function n(){var n=this;this.entities=this.prepareEntities(t(t([],P,!0),e,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(e){n.entitiesByName[e.name]=e,n.entitiesByNameEntity[e.nameEntity]=e,n.entitiesByDigitEntity[e.digitEntity]=e,n.entitiesByUtf[e.utf]=e}),this.invisibleEntities=this.prepareEntities(e)}n.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 n=t.entitiesByNameEntity[e];return n?n.utf:e}))},n.prototype.decHexToUtf=function(e){return e.replace(/&#(\d{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,10))}).replace(/&#x([\da-f]{1,6});/gi,function(e,n){return String.fromCharCode(parseInt(n,16))})},n.prototype.restore=function(e){var n=e.prefs.htmlEntity,t=n.type,r=this.entities;"name"!==t&&"digit"!==t||((n.onlyInvisible||n.list)&&(r=[],n.onlyInvisible&&(r=r.concat(this.invisibleEntities)),n.list)&&(r=r.concat(this.prepareListParam(n.list))),e.text=this.restoreEntitiesByIndex(e.text,"name"===t?"nameEntity":"digitEntity",r))},n.prototype.getByUtf=function(e,n){var t;switch(n){case"digit":t=this.entitiesByDigitEntity[e];break;case"name":t=this.entitiesByNameEntity[e];break;default:t=e}return t},n.prototype.prepareEntities=function(e){var r=[];return e.forEach(function(e){var n=e[0],e=e[1],t=String.fromCharCode(e);r.push({name:n,nameEntity:"&"+n+";",digitEntity:"&#"+e+";",utf:t,reName:new RegExp("&"+n+";","g"),reUtf:new RegExp(t,"g")})}),r},n.prototype.prepareListParam=function(e){var n=this,t=[];return e.forEach(function(e){e=n.entitiesByName[e];e&&t.push(e)}),t},n.prototype.restoreEntitiesByIndex=function(n,t,e){return e.forEach(function(e){n=n.replace(e.reUtf,e[t])}),n};var s=new n,a=[];function o(e){e=(e||"").split("/")[0];e&&"common"!==e&&!i(e)&&(a.push(e),a.sort())}function i(e){return"common"===e||-1!==a.indexOf(e)}function u(e,n){e=e||n;return e?Array.isArray(e)?e:[e]:[]}function c(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach(function(e){if(!i(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var l={};function z(e){return l[e]}function p(n){Object.keys(n).forEach(function(e){o(e),l[e]=n[e]})}var I=["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"],m=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),h="\\d+([.,]\\d+)?",C=/\d/;function g(e){return-1<e.search(C)}var d="\uf000",f="\uf001",O=(b.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},b.prototype.show=function(n,t){for(var e=new RegExp("\uf000tf\\d+\uf000","g"),r=new RegExp("\uf000tf\\d"),a=function(e){return n.safeTags.hidden[t][e]||e},o=0,s=this.tags[t].length;o<s&&(n.text=n.text.replace(e,a),-1!==n.text.search(r));o++);},b.prototype.hide=function(n,e){var t=this,r=(n.safeTags.hidden[e]={},this.pasteLabel.bind(this,n,e));this.tags[e].forEach(function(e){n.text=n.text.replace(t.prepareRegExp(e),r)})},b.prototype.hideHTMLTags=function(e){var n;e.isHTML&&(n=this.pasteLabel.bind(this,e,"html"),e.text=e.text.replace(/<\/?[a-z][^]*?>/gi,n).replace(/&lt;\/?[a-z][^]*?&gt;/gi,n).replace(/&[gl]t;/gi,n))},b.prototype.getPrevLabel=function(e,n){for(var t=n-1;0<=t;t--)if(e[t]===d)return e.slice(t,n+1);return""},b.prototype.getNextLabel=function(e,n){for(var t=n+1;t<e.length;t++)if(e[t]===d)return e.slice(n,t+1);return""},b.prototype.getTagByLabel=function(t,r){var a=null;return this.groups.some(function(e){var n=t.safeTags.hidden[e][r];return a=void 0!==n?{group:e,value:n}:a}),a},b.prototype.getTagInfo=function(e){if(!e)return null;var n={group:e.group};switch(e.group){case"html":n.name=e.value.split(/[<\s>]/)[1],n.isInline=-1<I.indexOf(n.name),n.isClosing=-1<e.value.search(/^<\//);break;case"url":n.isInline=!0;break;case"own":n.isInline=!1}return n},b.prototype.pasteLabel=function(e,n,t){var e=e.safeTags,r="\uf000tf"+e.counter+d;return e.hidden[n][r]=t,e.counter++,r},b.prototype.prepareRegExp=function(e){var n,t;return e instanceof RegExp?e:(n=e[0],t=e[1],e=e[2],new RegExp(n+(void 0===e?"[^]*?":e)+t,"gi"))},b.prototype.getPrevTagInfo=function(e,n,t){n=this.getPrevLabel(n,t-1);if(n){t=this.getTagByLabel(e,n);if(t)return this.getTagInfo(t)}return null},b.prototype.getNextTagInfo=function(e,n,t){n=this.getNextLabel(n,t+1);if(n){t=this.getTagByLabel(e,n);if(t)return this.getTagInfo(t)}return null},b);function b(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var n=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){n.push(["<".concat(e,"(\\s[^>]*?)?>"),"</".concat(e,">")])}),this.tags={own:[],html:n.map(this.prepareRegExp),url:[m]}}function $(e,n){for(var t="";1==(1&n)&&(t+=e),0!=(n>>>=1);)e+=e;return t}function y(e){return e.replace(/\u00A0/g," ")}function x(e,n){for(var t=0;t<n.length;t++)e=e.replace(n[t][0],n[t][1]);return e}function H(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function v(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var j={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},Q=0,F="default",Y=[],W=[];function R(){var e=t([],Y,!0);return e.sort(function(e,n){return e.index>n.index?1:-1}),e}function X(){return t([],W,!0)}function G(e){var n=e.name.split("/"),t=n[0],r=n[1],n=n[2];return{name:e.name,shortName:n,handler:e.handler,queue:e.queue||F,enabled:!0!==e.disabled,locale:t,group:r,index:"number"==typeof(n=e).index?n.index:(t=n.name.split("/")[1],void 0===(t=j[t])&&(t=Q),"string"==typeof n.index?t+parseInt(n.index,10):t),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function K(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function V(e){return e||"LF"}S.addRule=function(e){o((e=G(e=e)).locale),Y.push(e)},S.addRules=function(e){var n=this;e.forEach(function(e){n.addRule(e)})},S.addInnerRule=function(e){W.push(G(e))},S.addInnerRules=function(e){var n=this;e.forEach(function(e){n.addInnerRule(e)})},S.getRule=function(n){var t=null;return R().some(function(e){return e.name===n&&(t=e,!0)}),t},S.getRules=R,S.getInnerRules=X,S.getLocales=function(){return a},S.addLocale=function(e){o(e)},S.hasLocale=i,S.setData=function(e){p(e)},S.getData=function(e){return l[e]},S.prototype.execute=function(e,n){var t;return(e=""+e)?(t=this.prefs,n=n,t=r({},t),n&&("locale"in n&&(t.locale=u(n.locale)),"htmlEntity"in n&&(t.htmlEntity=K(n.htmlEntity)),"lineEnding"in n&&(t.lineEnding=V(n.lineEnding)),"processingSeparateParts"in n&&(t.processingSeparateParts=n.processingSeparateParts),"ruleFilter"in n)&&(t.ruleFilter=n.ruleFilter),c((n=t).locale),t=this.prepareContext(e,n),this.process(t)):""},S.prototype.getSetting=function(e,n){return this.settings[e]&&this.settings[e][n]},S.prototype.setSetting=function(e,n,t){this.settings[e]=this.settings[e]||{},this.settings[e][n]=t},S.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},S.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},S.prototype.enableRule=function(e){return this.enable(e,!0)},S.prototype.disableRule=function(e){return this.enable(e,!1)},S.prototype.addSafeTag=function(e,n,t){e=e instanceof RegExp?e:[e,n,t];this.safeTags.add(e)},S.prototype.prepareContext=function(e,t){return{text:e,isHTML:H(e),prefs:t,getData:function(n){return"char"===n?t.locale.map(function(e){return l[e+"/"+n]}).join(""):z(t.locale[0]+"/"+n)},safeTags:this.safeTags}},S.prototype.splitBySeparateParts=function(a){var o,e,s;return a.isHTML&&!1!==a.prefs.processingSeparateParts?(o=[],e=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),s=0,a.text.replace(e,function(e,n,t,r){return s!==r&&o.push((s?f:"")+a.text.slice(s,r)+f),o.push(e),s=r+e.length,e}),o.push(s?f+a.text.slice(s,a.text.length):a.text),o):[a.text]},S.prototype.process=function(n){var e,t=this,r=(n.text=n.text.replace(/\r\n?/g,"\n"),this.executeRules(n,"start"),this.safeTags.hide(n,"own"),this.executeRules(n,"hide-safe-tags-own"),this.safeTags.hide(n,"html"),this.executeRules(n,"hide-safe-tags-html"),n.isHTML),a=new RegExp(f,"g");return n.text=this.splitBySeparateParts(n).map(function(e){return n.text=e,n.isHTML=H(e),t.safeTags.hideHTMLTags(n),t.safeTags.hide(n,"url"),t.executeRules(n,"hide-safe-tags-url"),t.executeRules(n,"hide-safe-tags"),s.toUtf(n),n.prefs.live&&(n.text=y(n.text)),t.executeRules(n,"utf"),t.executeRules(n),s.restore(n),t.executeRules(n,"html-entities"),t.safeTags.show(n,"url"),t.executeRules(n,"show-safe-tags-url"),n.text.replace(a,"")}).join(""),n.isHTML=r,this.safeTags.show(n,"html"),this.executeRules(n,"show-safe-tags-html"),this.safeTags.show(n,"own"),this.executeRules(n,"show-safe-tags-own"),this.executeRules(n,"end"),r=n.text,"CRLF"===(e=n.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===e?r.replace(/\n/g,"\r"):r},S.prototype.executeRules=function(n,e){var t=this,r=this.rulesByQueues[e=void 0===e?F:e],e=this.innerRulesByQueues[e];e&&e.forEach(function(e){t.ruleIterator(n,e)}),r&&r.forEach(function(e){t.ruleIterator(n,e)})},S.prototype.ruleIterator=function(e,n){!0===e.prefs.live&&!1===n.live||!1===e.prefs.live&&!0===n.live||"common"!==n.locale&&n.locale!==e.prefs.locale[0]||!this.isEnabledRule(n.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(n)||(this.onBeforeRule&&this.onBeforeRule(n.name,e),e.text=n.handler.call(this,e.text,this.settings[n.name],e),this.onAfterRule&&this.onAfterRule(n.name,e))},S.prototype.prepareRuleSettings=function(e){this.settings[e.name]=v(e.settings),this.enabledRules[e.name]=e.enabled},S.prototype.enable=function(e,n){var t=this;Array.isArray(e)?e.forEach(function(e){t.enableByMask(e,n)}):this.enableByMask(e,n)},S.prototype.enableByMask=function(e,n){var t,r=this;e&&(-1!==e.search(/\*/)?(t=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach(function(e){e=e.name;t.test(e)&&(r.enabledRules[e]=n)})):this.enabledRules[e]=n)},S.groups=[],S.titles={},S.version="7.4.1";var w=S;function S(e){var n=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:u((e=e).locale),lineEnding:V(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:K(e.htmlEntity)},c(this.prefs.locale),this.safeTags=new O,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=X(),this.innerRules.forEach(function(e){n.innerRulesByQueues[e.queue]=n.innerRulesByQueues[e.queue]||[],n.innerRulesByQueues[e.queue].push(e)}),this.rulesByQueues={},this.rules=R(),this.rules.forEach(function(e){n.prepareRuleSettings(e),n.rulesByQueues[e.queue]=n.rulesByQueues[e.queue]||[],n.rulesByQueues[e.queue].push(e)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"common/char":"a-z","common/dash":"--?|\u2012|\u2013|\u2014","common/quote":'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'},{"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","be/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"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","bg/quote":{left:"\u201e\u2019",right:"\u201c\u2019"}},{"ca/char":"abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc","ca/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"cs/char":"a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e","cs/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"da/char":"a-z\xe5\xe6\xf8","da/quote":{left:"\xbb\u203a",right:"\xab\u2039"}},{"de/char":"a-z\xdf\xe4\xf6\xfc","de/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"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","el/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"en-GB/char":"a-z","en-GB/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"en-US/char":"a-z","en-US/quote":{left:"\u201c\u2018",right:"\u201d\u2019"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d","eo/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"es/char":"a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc","es/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"et/char":"abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e","et/quote":{left:"\u201e\xab",right:"\u201c\xbb"}},{"fi/char":"abcdefghijklmnopqrstuvy\xf6\xe4\xe5","fi/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"fr/char":"a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6","fr/quote":{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa","ga/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"hu/char":"a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171","hu/quote":{left:"\u201e\xbb",right:"\u201d\xab"}},{"it/char":"a-z\xe0\xe9\xe8\xec\xf2\xf9","it/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"lv/char":"abcdefghijklmnopqrstuvxz\xe6\u0153","lv/quote":{left:"\xab\u201e",right:"\xbb\u201c"}},{"nl/char":"a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc","nl/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"no/char":"a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8","no/quote":{left:"\xab\u2019",right:"\xbb\u2019"}},{"pl/char":"abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c","pl/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ro/char":"abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b","ro/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ru/char":"\u0430-\u044f\u0451","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)","ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","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/quote":{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0},"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","ru/shortWord":"\u0430|\u0431\u044b|\u0432|\u0432\u043e|\u0434\u0430|\u0434\u043e|\u0436\u0435|\u0437\u0430|\u0438|\u0438\u0437|\u043a|\u043a\u043e|\u043b\u0438|\u043d\u0430|\u043d\u0435|\u043d\u0438|\u043d\u043e|\u043e|\u043e\u0431|\u043e\u0442|\u043f\u043e|\u0441|\u0441\u043e|\u0442\u043e|\u0443","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"},{"sk/char":"abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e","sk/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sl/char":"a-z\u010d\u0161\u017e","sl/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sr/char":"abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e","sr/quote":{left:"\u201e\u2019",right:"\u201d\u2019"}},{"sv/char":"a-z\xe4\xe5\xe9\xf6","sv/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"tr/char":"abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f","tr/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"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","uk/quote":{left:"\xab\u201e",right:"\xbb\u201c"}}].forEach(p);var Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},E={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,function(e){return Z[e]})},disabled:!0},J=new RegExp("<("+["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"].join("|")+")[>\\s]"),E=(w.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},E,{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},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){e=e.split("\n\n");return e.forEach(function(e,n,t){!e.trim()||J.test(e)||(t[n]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))}),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,n,t){var s=this,r=new RegExp("(^|\\s)("+n.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),i=v(t.prefs);return i.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,n,t){return n+t.replace(r,function(e,n,t,r){var a=r[0],o=r[r.length-1],r=r.slice(1,-1);return n+t+"="+a+s.execute(r,i)+o})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,n,t){return t.isHTML?e:e.replace(m,function(e,n,t){t=t.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===n?t=t.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===n&&(t=t.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=t,t=n+"://"+t,a='<a href="'+t+'">';return"http"===n||"https"===n?(r=r.replace(/^www\./,""),a+("http"===n?r:n+"://"+r)+"</a>"):a+t+"</a>"})},disabled:!0,htmlAttrs:!1}]),{name:"common/nbsp/afterNumber",handler:function(e,n,t){t=t.getData("char");return e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+t+"]+)","gi"),"$1$2\xa0$3")},disabled:!0});function _(e,n,t,r){return n+t.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}w.addRules([E,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}},{name:"common/nbsp/afterSectionMark",handler:function(e,n,t){t=t.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===t?"\xa7\u202f":"\xa7\xa0")}},{name:"common/nbsp/afterShortWord",handler:function(e,n,t){var r=n.lengthShortWord,n=n.useShortWordList,a=l["common/quote"],o=t.getData("char"),t=t.getData("shortWord"),a=" \xa0(\uf000"+a,n=new RegExp(n&&void 0!==t?"(^|["+a+"])("+t+") ":"(^|["+a+"])(["+o+"]{1,"+r+"}) ","gim");return e.replace(n,"$1$2\xa0").replace(n,"$1$2\xa0")},settings:{lengthShortWord:2,useShortWordList:!1}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,n,t){var r=t.getData("quote"),t=t.getData("char"),a=t.toUpperCase(),t=new RegExp("(["+t+a+"]) (?=\\d{1,"+n.lengthLastNumber+"}[-+\u2212%'\""+r.right+")]?([.!?\u2026]( ["+a+"]|$)|$))","gm");return e.replace(t,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,n,t){var t=t.getData("char"),r=t.toUpperCase(),t=new RegExp("(["+t+"\\d]) (["+t+r+"]{1,"+n.lengthLastWord+"}[.!?\u2026])( ["+r+"]|$)","g");return e.replace(t,"$1\xa0$2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,_).replace(/(<nobr>)(.*?)(<\/nobr>)/g,_)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:y,disabled:!0}]);E={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,a){return e.replace(new RegExp("(^ ?|\\D |".concat(d,")(\\d{1,3}([ \xa0\u202f\u2009]\\d{3})+)(?! ?[\\d-])"),"gm"),function(e,n,t){return n+t.replace(/\s/g,a.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(e,n){var t=n.match(/[.,]/),n=t?n.split(t):[n],r=n[0],n=n[1],r=r.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+a.space);return t?r+t+n:r})},settings:{space:"\u202f"}},w.addRules([E,{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")}},{name:"common/number/mathSigns",handler:function(e){return x(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}]),w.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,n,t){var r=l["common/quote"],t=t.getData("char"),r="[;:,.?! \n"+r+"]",t=new RegExp("("+r+"|^)(["+t+"]{"+n.min+",}) \\2("+r+"|$)","gi");return e.replace(t,"$1$2$3")},settings:{min:2},disabled:!0}]),E={name:"common/punctuation/apostrophe",handler:function(e,n,t){t="(["+t.getData("char")+"])",t=new RegExp(t+"'"+t,"gi");return e.replace(t,"$1\u2019$2")}};function U(){this.bufferQuotes={left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},this.beforeLeft=" \n\t\xa0[(",this.afterRight=" \n\t\xa0!?.:;#*,\u2026)\\]"}U.prototype.process=function(e){var n,t,r=e.context.text;return this.count(r).total&&(n=e.settings,(t=e.settings.left[0]===e.settings.right[0])&&(e.settings=v(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),t)&&(r=this.returnOriginalQuotes(r,n,e.settings),e.settings=n),r},U.prototype.returnOriginalQuotes=function(e,n,t){for(var r={},a=0;a<t.left.length;a++)r[t.left[a]]=n.left[a],r[t.right[a]]=n.right[a];return e.replace(new RegExp("["+t.left+t.right+"]","g"),function(e){return r[e]})},U.prototype.count=function(e){var n={total:0};return e.replace(new RegExp("["+l["common/quote"]+"]","g"),function(e){return n[e]||(n[e]=0),n[e]++,n.total++,e}),n},U.prototype.removeDuplicates=function(e,n){var t=n.left[0],r=n.left[1]||t,n=n.right[0];return t!==r?e:e.replace(new RegExp(t+t,"g"),t).replace(new RegExp(n+n,"g"),n)},U.prototype.removeSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],o=n.right[t];e=e.replace(new RegExp(a+"([ \u202f\xa0])","g"),a).replace(new RegExp("([ \u202f\xa0])"+o,"g"),o)}return e},U.prototype.setSpacing=function(e,n){for(var t=0,r=n.left.length;t<r;t++){var a=n.left[t],o=n.right[t];e=e.replace(new RegExp(a+"([^\u202f])","g"),a+"\u202f$1").replace(new RegExp("([^\u202f])"+o,"g"),"$1\u202f"+o)}return e},U.prototype.set=function(e,n){var t=l["common/quote"],r=n.settings.left[0],a=n.settings.left[1]||r,o=n.settings.right[0],s=new RegExp("(^|["+this.beforeLeft+"])(["+t+"]+)(?=[^\\s"+d+"])","gim"),t=new RegExp("([^\\s\uf000])(["+t+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(s,function(e,n,t){return n+$(r,t.length)}).replace(t,function(e,n,t){return n+$(o,t.length)}),e=this.setAboveTags(e,n),e=r!==a?this.setInner(e,n.settings):e},U.prototype.setAboveTags=function(o,s){var i=this,u=s.settings.left[0],c=s.settings.right[0];return o.replace(new RegExp("(^|.)(["+l["common/quote"]+"])(.|$)","gm"),function(e,n,t,r,a){return n!==d&&r!==d?e:n===d&&r===d?'"'===t?n+i.getAboveTwoTags(o,a+1,s)+r:e:n===d?(t=-1<i.afterRight.indexOf(r),e=s.safeTags.getPrevTagInfo(s.context,o,a-1),t&&e&&"html"===e.group?n+(e.isClosing?c:u)+r:n+(!r||t?c:u)+r):(e=-1<i.beforeLeft.indexOf(n),t=s.safeTags.getNextTagInfo(s.context,o,a+1),e&&t&&"html"===t.group?n+(t.isClosing?c:u)+r:n+(!n||e?u:c)+r)})},U.prototype.getAboveTwoTags=function(e,n,t){var r=t.safeTags.getPrevTagInfo(t.context,e,n),a=t.safeTags.getNextTagInfo(t.context,e,n);if(r&&"html"===r.group){if(!r.isClosing)return t.settings.left[0];if(a&&a.isClosing&&r.isClosing)return t.settings.right[0]}return e[n]},U.prototype.setInner=function(e,n){for(var t=n.left[0],r=n.right[0],a=this.getMaxLevel(e,t,r,n.left.length),o=0,s="",i=0,u=e.length;i<u;i++){var c=e[i];c===t?(s+=n.left[a-1<o?a-1:o],a<++o&&(o=a)):c===r?(--o<0&&(o=0),s+=n.right[o]):('"'===c&&(o=0),s+=c)}return s},U.prototype.getMaxLevel=function(e,n,t,r){e=this.count(e);return e[n]===e[t]?r:Math.min(r,2)};var ee=new U,ne={},k=(a.forEach(function(e){ne[e]=v(l[e+"/quote"])}),{name:"common/punctuation/quote",handler:function(e,n,t){n=n[t.prefs.locale[0]];return n?ee.process({context:t,settings:n,safeTags:this.safeTags}):e},settings:ne}),E=(w.addRules([E,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,n,t){return"ru"===t.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}},k,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,n,t){var t=this.getSetting("common/punctuation/quote",t.prefs.locale[0]),r=s.getByUtf(t.left[0]),a=s.getByUtf(t.right[0]),o=(o=s.getByUtf(t.left[1]))?"|"+o:"",t=(t=s.getByUtf(t.right[1]))?"|"+t:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+o+")([^]*?)("+a+t+")(</[aA]>)","g");return e.replace(r,"$2$1$3$5$4")}}]),{name:"common/space/beforeBracket",handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(["+t+".!?,;\u2026)])\\(","gi");return e.replace(t,"$1 (")}}),k={name:"common/space/delRepeatN",index:"-1",handler:function(e,n){var n=n.maxConsecutiveLineBreaks,t=new RegExp("\n{".concat(n+1,",}"),"g"),n=$("\n",n);return e.replace(t,n)},settings:{maxConsecutiveLineBreaks:2}},q={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}},te={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,"")}},re=new RegExp('(\\D):([^)",:.?\\s\\/\\\\\uf000])',"g"),T={name:"common/space/afterColon",handler:function(e){return e.replace(re,"$1: $2")}},A={name:"common/space/afterComma",handler:function(e,n,t){t=t.getData("quote"),t="string"==typeof t?t:t.right;return e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\\uf000'+t+"])","g"),function(e,n,t){return g(n)&&g(t)?e:n+", "+t})}},ae=new RegExp("\\?([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),B={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(ae,"? $1")}},oe=new RegExp("!([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),D={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(oe,"! $1")}},se=new RegExp(";([^).\u2026!;?\\s[\\])\uf000"+l["common/quote"]+"])","g"),T=(w.addRules([T,A,B,D,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(se,"; $1")}},E,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},k,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},q,te]),{name:"common/symbols/arrow",handler:function(e){return x(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),A=(w.addRules([T,{name:"common/symbols/cf",handler:function(e){var n=new RegExp('(^|[\\s(\\[+\u2248\xb1\u2212\u2014\u2013\\-])(\\d+(?:[.,]\\d+)?)[ \xa0\u2009]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(n,"$1$2\u2009\xb0$3$4")}},{name:"common/symbols/copy",handler:function(e){return x(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}]),{name:"en-US/dash/main",index:"-5",handler:function(e){var n=l["common/dash"],t="[ ".concat("\xa0","]"),r="[ ".concat("\xa0","\n]"),t=new RegExp("".concat(t,"(").concat(n,")(").concat(r,")"),"g");return e.replace(t,"".concat("\xa0").concat("\u2014","$2"))}}),B=(w.addRules([A]),{name:"ru/dash/centuries",handler:function(e,n){var t=new RegExp("(X|I|V)[ |\xa0]?"+("("+l["common/dash"]+")")+"[ |\xa0]?(X|I|V)","g");return e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"\u2013"}}),D=(w.addRules([B,{name:"ru/dash/daysMonth",handler:function(e,n){var t=new RegExp("(^|\\s)([123]?\\d)("+l["common/dash"]+")([123]?\\d)[ \xa0]("+l["ru/monthGenCase"]+")","g");return e.replace(t,"$1$2"+n.dash+"$4\xa0$5")},settings:{dash:"\u2013"}},{name:"ru/dash/de",handler:function(e){var n=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+l["ru/dashAfterDe"],"g");return e.replace(n,"$1-\u0434\u0435")},disabled:!0},{name:"ru/dash/decade",handler:function(e,n){var t=new RegExp("(^|\\s)(\\d{3}|\\d)0("+l["common/dash"]+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(t,"$1$20"+n.dash+"$40$5")},settings:{dash:"\u2013"}},{name:"ru/dash/directSpeech",handler:function(e){var n=l["common/dash"],t=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('.concat(n,")[ |\xa0]"),"g"),r=new RegExp("(^|".concat(d,")(").concat(n,")( |\xa0)"),"gm"),n=new RegExp("([.\u2026?!])[ \xa0](".concat(n,")[ \xa0]"),"g");return e.replace(t,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(n,"$1 \u2014\xa0")}},{name:"ru/dash/izpod",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2\u0437-\u043f\u043e\u0434")}},{name:"ru/dash/izza",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u0437\u0430"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2\u0437-\u0437\u0430")}},{name:"ru/dash/ka",handler:function(e){var n=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+l["ru/dashAfter"],"g");return e.replace(n,"$1-\u043a\u0430$2")}},{name:"ru/dash/koe",handler:function(e){var n=new RegExp(l["ru/dashBefore"]+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var n=new RegExp("([ \xa0])("+l["common/dash"]+")([ \xa0\\n])","g");return e.replace(n,"\xa0\u2014$3")}},{name:"ru/dash/month",handler:function(e,n){var t="("+l["ru/month"]+")",r="("+l["ru/monthPreCase"]+")",a=l["common/dash"],t=new RegExp(t+" ?("+a+") ?"+t,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+n.dash+"$3";return e.replace(t,r).replace(a,r)},settings:{dash:"\u2013"}},{name:"ru/dash/surname",handler:function(e){var n=new RegExp("([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)\\s-([\u0430-\u044f\u0451]{1,3})(?![^\u0430-\u044f\u0451]|$)","g");return e.replace(n,"$1\xa0\u2014$2")}},{name:"ru/dash/taki",handler:function(e){var n=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)"+l["ru/dashAfter"],"g");return e.replace(n,"$1-$2")}},{name:"ru/dash/time",handler:function(e,n){var t=new RegExp(l["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+l["common/dash"]+"(\\d?\\d:[0-5]\\d)"+l["ru/dashAfter"],"g");return e.replace(t,"$1$2"+n.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/to",handler:function(e){var n=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041e\u043e]\u0442\u043a\u0443\u0434\u0430|[\u041a\u043a]\u0443\u0434\u0430|[\u0413\u0433]\u0434\u0435|[\u041a\u043a]\u043e\u0433\u0434\u0430|[\u0417\u0437]\u0430\u0447\u0435\u043c|[\u041f\u043f]\u043e\u0447\u0435\u043c\u0443|[\u041a\u043a]\u0430\u043a|[\u041a\u043a]\u0430\u043a\u043e[\u0435\u0439\u043c]|[\u041a\u043a]\u0430\u043a\u0430\u044f|[\u041a\u043a]\u0430\u043a\u0438[\u0435\u043c\u0445]|[\u041a\u043a]\u0430\u043a\u0438\u043c\u0438|[\u041a\u043a]\u0430\u043a\u0443\u044e|[\u0427\u0447]\u0442\u043e|[\u0427\u0447]\u0435\u0433\u043e|[\u0427\u0447]\u0435[\u0439\u043c]|[\u0427\u0447]\u044c\u0438\u043c?|[\u041a\u043a]\u0442\u043e|[\u041a\u043a]\u043e\u0433\u043e|[\u041a\u043a]\u043e\u043c\u0443|[\u041a\u043a]\u0435\u043c)( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+l["ru/dashAfter"],"g");return e.replace(n,function(e,n,t,r,a){r=t+r+a;return"\u043a\u0430\u043a \u0442\u043e"===r||"\u041a\u0430\u043a \u0442\u043e"===r?e:n+t+"-"+a})}},{name:"ru/dash/kakto",handler:function(e){var n=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041a\u043a]\u0430\u043a) \u0442\u043e"+l["ru/dashAfter"],"g");return e.replace(n,"$1$2-\u0442\u043e")}},{name:"ru/dash/weekday",handler:function(e,n){var t="("+l["ru/weekday"]+")",t=new RegExp(t+" ?("+l["common/dash"]+") ?"+t,"gi");return e.replace(t,"$1"+n.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/years",handler:function(e,o){var n=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+l["common/dash"]+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(n,function(e,n,t,r,a){return parseInt(t,10)<parseInt(a,10)?n+t+o.dash+a:e})},settings:{dash:"\u2013"}}]),"(-|\\.|\\/)"),E="(-|\\/)",ie=new RegExp("(^|\\D)(\\d{4})"+D+"(\\d{2})"+D+"(\\d{2})(\\D|$)","gi"),ue=new RegExp("(^|\\D)(\\d{2})"+E+"(\\d{2})"+E+"(\\d{4})(\\D|$)","gi"),k=(w.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(ie,"$1$6.$4.$2$7").replace(ue,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var n=new RegExp("(\\d)( |\xa0)("+l["ru/monthGenCase"]+"),( |\xa0)("+l["ru/weekday"]+")","gi");return e.replace(n,function(e,n,t,r,a,o){return n+t+r.toLowerCase()+","+a+o.toLowerCase()})}}]),{name:"ru/money/currency",handler:function(e){var n="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",t=new RegExp("(^|[\\D]{2})"+n+" ?("+h+"([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),n=new RegExp("(^|[\\D])("+h+") ?"+n,"gm");return e.replace(t,function(e,n,t,r,a,o,s,i){return n+r+(i?"\xa0"+i:"")+"\xa0"+t}).replace(n,"$1$2\xa0$4")},disabled:!0});function ce(e,n,t,r){return"\u0434\u0434"===t&&"\u043c\u043c"===r||-1<["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)?e:n+t+".\xa0"+r+"."}w.addRules([k,{name:"ru/money/ruble",handler:function(e){var n="$1\xa0\u20bd",t="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",r=new RegExp("^"+t+"$","g"),a=new RegExp(t+"(?=[!?,:;])","g"),t=new RegExp(t+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(r,n).replace(a,n).replace(t,n+".")},disabled:!0}]);var le={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""};w.addRules([{name:"ru/nbsp/abbr",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\."),"g");return e.replace(n,ce).replace(n,ce)}},{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")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var n="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",t=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+n+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),n=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+n+"[ \xa0]","g");return e.replace(t,"$1\xa0$2").replace(n,"$1\xa0$2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var n=l["common/dash"],t="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',a=new RegExp(t+"[ \xa0]?\u0432\\.?"+r,"gm"),t=new RegExp(t+"("+n+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(a,"$1$2\xa0\u0432.").replace(t,"$1$2$3$4\xa0\u0432\u0432.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var n=new RegExp("(\\d{1,2}) ("+l["ru/shortMonth"]+")","gi");return e.replace(n,"$1\xa0$2")}},{name:"ru/nbsp/initials",handler:function(e){var n=new RegExp("(^|[(\xa0\u202f "+l["ru/quote"].left+d+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)',"gm");return e.replace(n,"$1$2.\xa0$3.\xa0$4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var n=new RegExp("(^|[\\s,.\\(\uf000])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s\\).!?,;\uf000]|$)","gm");return e.replace(n,function(e,n,t,r,a,o){return n+t+"\xa0"+r+le[a||""]+("\xa0"===o?" ":o)})}},{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")}},{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")}},{name:"ru/nbsp/page",handler:function(e){var n=new RegExp("(^|[)\\s\uf000])(\u0441\u0442\u0440|\u0433\u043b|\u0440\u0438\u0441|\u0438\u043b\u043b?|\u0441\u0442|\u043f|c)\\. *(\\d+)([\\s.,?!;:]|$)","gim");return e.replace(n,"$1$2.\xa0$3$4")}},{name:"ru/nbsp/ps",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? "),"gim");return e.replace(n,function(e,n,t){return n+(t?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}},{name:"ru/nbsp/see",handler:function(e){var n=new RegExp("(^|\\s|".concat(d,"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(n,function(e,n,t,r,a){return("\xa0"===n?" ":n)+t+".\xa0"+r+a})}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var n=new RegExp("(^|\\D)(\\d{4})("+l["common/dash"]+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(n,"$1$2$3$4\xa0\u0433\u0433.")}}]);function L(e,n){n=new RegExp('<span class="('+n.join("|")+')">([^]*?)</span>',"g");return e.replace(n,"$2")}function N(e,n){return e.replace(/<title>[^]*?<\/title>/i,function(e){return L(e,n)})}w.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,n,t){t=t.getData("char"),t=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)(?!["+t+"])","g");return e.replace(t,function(e,n,t){return n+"-"+{"\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"}[t]})}}]);var pe=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],q="ru/optalign/bracket",te={name:q,queue:"start",handler:function(e){return L(e,pe)},htmlAttrs:!1},T={name:q,queue:"end",handler:function(e){return N(e,pe)},htmlAttrs:!1},me=["typograf-oa-comma","typograf-oa-comma-sp"],A="ru/optalign/comma",B={name:A,queue:"start",handler:function(e){return L(e,me)},htmlAttrs:!1},D={name:A,queue:"end",handler:function(e){return N(e,me)},htmlAttrs:!1},he=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],E="ru/optalign/quote",k={name:E,queue:"start",handler:function(e){return L(e,he)},htmlAttrs:!1},ge={name:E,queue:"end",handler:function(e){return N(e,he)},htmlAttrs:!1},M=(w.addRules([{name:q,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},{name:A,handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(["+t+"\\d\u0301]+), ","gi");return e.replace(t,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:E,handler:function(e){var n=this.getSetting("common/punctuation/quote","ru"),n="(["+n.left[0]+(n.left[1]||"")+"])",t=new RegExp("(^|\n\n|\uf000)("+n+")","g"),n=new RegExp("([^\n\uf000])([ \xa0\n])("+n+")","gi");return e.replace(t,'$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}]),w.addInnerRules([te,T,B,D,k,ge]),[]);function de(e){var n,t,r=e[0],a="";if(e.length<8)return fe(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;n=!0,e=e.substr(2)}else"8"===r&&(t=!0,e=e.substr(1));for(var o=8;2<=o;o--){var s=+e.substr(0,o);if(-1<M.indexOf(s)){a=e.substr(0,o),e=e.substr(o);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(n?"+7\xa0":"")+(t?"8\xa0":"")+function(e){var n=+e,t=e.length,r=[e],a=!1;if(3<t)switch(t){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 a=900<n&&n<=999||495==n||499==n;t=r.join("-");return a?t:"("+t+")"}(a)+"\xa0"+fe(e)}function fe(e){var n="";return e.length%2&&(n=e[0],n+=e.length<=5?"-":"",e=e.substr(1,e.length-1)),n+e.split(/(?=(?:\d\d)+$)/).join("-")}function be(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,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,"39131-39179","39190-39199",391,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 n=e.split("-"),t=+n[0];t<=+n[1];t++)M.push(t);else M.push(e)});w.addRules([{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,n,t,r){return n+t.toLowerCase()+"\u0301"+r})},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var n=new RegExp("(^|,| |\uf000)(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|\uf000|$)","gm");return e.replace(n,function(e,n,t){t=be(t);return 12===t.length?n+de(t):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,n,t,r,a){a=be(a);return 5<=a.length?n+t+r+de(a):e})}}]);var q={name:"ru/punctuation/ano",handler:function(e){var n=new RegExp("([^\xab\u201e[(!?,:;\\-\u2012\u2013\u2014\\s\uf000])(\\s+)(\u0430|\u043d\u043e)(?= |\xa0|\\n)","g");return e.replace(n,"$1,$2$3")}},$e=(w.addRules([q,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var n=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(n,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),w.addRules([{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")}},{name:"ru/space/year",handler:function(e,n,t){t=t.getData("char"),t=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+t+"]|$)","g");return e.replace(t,"$1$2 $3$5")}}]),w.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}]),{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"}),ye=Object.keys($e).join("");w.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var n=new RegExp("(["+ye+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return e.replace(n,function(e,n){for(var t="",r=0;r<n.length;r++)t+=$e[n[r]];return t})}}]);return w.titles={"common/html/e-mail":{"en-US":"Placement of links for e-mail",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u044d\u043b. \u043f\u043e\u0447\u0442\u044b"},"common/html/escape":{"en-US":"Escaping HTML",ru:"\u042d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 HTML"},"common/html/nbr":{"en-US":"Replacement line break on <br/>",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 <br/>"},"common/html/p":{"en-US":"Placement of paragraph",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0431\u0437\u0430\u0446\u0435\u0432"},"common/html/processingAttrs":{"en-US":"Processing HTML attributes",ru:"\u0422\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 HTML-\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432"},"common/html/quot":{common:'&\u2060quot; \u2192 "'},"common/html/stripTags":{"en-US":"Removing HTML-tags",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 HTML-\u0442\u0435\u0433\u043e\u0432"},"common/html/url":{"en-US":"Placement of links",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043e\u043a"},"common/nbsp/afterNumber":{"en-US":"Non-breaking space between number and word",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0441\u043b\u043e\u0432\u043e\u043c"},"common/nbsp/afterParagraphMark":{"en-US":"Non-breaking space after \xb6",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xb6"},"common/nbsp/afterSectionMark":{"en-US":"Non-breaking space after \xa7",ru:"\u041d\u0435\u0440\u0430\u0437. \u0443\u0437\u043a\u0438\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xa7"},"common/nbsp/afterShortWord":{"en-US":"Non-breaking space after short word",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430"},"common/nbsp/beforeShortLastNumber":{"en-US":"Non-breaking space before number (maximum 2 digits) at end of sentence",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u0447\u0438\u0441\u043b\u043e\u043c (\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u0446\u0438\u0444\u0440) \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f"},"common/nbsp/beforeShortLastWord":{"en-US":"Non-breaking space before last short word in sentence",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438"},"common/nbsp/dpi":{"en-US":"Non-breaking space before lpi and dpi",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 lpi \u0438 dpi"},"common/nbsp/nowrap":{"en-US":"Replace non-breaking space to normal space in tags nowrap and nobr",ru:"\u0417\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0442\u0435\u0433\u0430\u0445 nowrap \u0438 nobr"},"common/nbsp/replaceNbsp":{"en-US":"Replacing non-breaking space on normal before text correction",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0434 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c"},"common/number/digitGrouping":{"en-US":"Divide into groups numbers with many digits",ru:"\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u0430\u043c"},"common/number/fraction":{common:"1/2 \u2192 \xbd, 1/4 \u2192 \xbc, 3/4 \u2192 \xbe"},"common/number/mathSigns":{common:"!= \u2192 \u2260, <= \u2192 \u2264, >= \u2192 \u2265, ~= \u2192 \u2245, +- \u2192 \xb1"},"common/number/times":{common:"x \u2192 \xd7 (10 x 5 \u2192 10\xd75)"},"common/other/delBOM":{"en-US":"Delete character BOM (Byte Order Mark)",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 BOM (Byte Order Mark)"},"common/other/repeatWord":{"en-US":"Removing repeat words",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432\u0430"},"common/punctuation/apostrophe":{"en-US":"Placement of correct apostrophe",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043f\u043e\u0441\u0442\u0440\u043e\u0444\u0430"},"common/punctuation/delDoublePunctuation":{"en-US":"Removing double punctuation",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u043e\u0439\u043d\u043e\u0439 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438"},"common/punctuation/hellip":{"en-US":"Replacement of three points by ellipsis",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u0440\u0451\u0445 \u0442\u043e\u0447\u0435\u043a \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u0442\u043e\u0447\u0438\u0435"},"common/punctuation/quote":{"en-US":"Placement of quotation marks in texts",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430"},"common/punctuation/quoteLink":{"en-US":"Removal quotes outside a link",ru:"\u0412\u044b\u043d\u043e\u0441 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0441\u0441\u044b\u043b\u043a\u0438"},"common/space/afterColon":{"en-US":"space after colon",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f"},"common/space/afterComma":{"en-US":"space after comma",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"common/space/afterExclamationMark":{"en-US":"space after exclamation mark",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u043d\u0438\u044f"},"common/space/afterQuestionMark":{"en-US":"space after question mark",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430"},"common/space/afterSemicolon":{"en-US":"space after semicolon",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"common/space/beforeBracket":{"en-US":"Space before opening bracket",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/bracket":{"en-US":"Remove extra spaces after opening and before closing bracket",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/delBeforeDot":{"en-US":"Remove space before dot",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0447\u043a\u043e\u0439"},"common/space/delBeforePercent":{"en-US":"Remove space before %, \u2030 and \u2031",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u0435\u0440\u0435\u0434 %, \u2030 \u0438 \u2031"},"common/space/delBeforePunctuation":{"en-US":"Remove spaces before punctuation",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438"},"common/space/delBetweenExclamationMarks":{"en-US":"Remove spaces before exclamation marks",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u043d\u0438\u044f"},"common/space/delLeadingBlanks":{"en-US":"Remove spaces at start of line",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/delRepeatN":{"en-US":"Remove duplicate line breaks",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/delRepeatSpace":{"en-US":"Removing duplicate spaces between characters",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438"},"common/space/delTrailingBlanks":{"en-US":"Remove spaces at end of line",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/insertFinalNewline":{"en-US":"Insert final newline",ru:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438"},"common/space/replaceTab":{"en-US":"Replacement of tab to 4 spaces",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u0430 \u043d\u0430 4 \u043f\u0440\u043e\u0431\u0435\u043b\u0430"},"common/space/squareBracket":{"en-US":"Remove extra spaces after opening and before closing square bracket",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439"},"common/space/trimLeft":{"en-US":"Remove spaces and line breaks in beginning of text",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0435\u043a\u0441\u0442\u0430"},"common/space/trimRight":{"en-US":"Remove spaces and line breaks at end of text",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432 \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0441\u0442\u0430"},"common/symbols/arrow":{common:"-> \u2192 \u2192, <- \u2192 \u2190"},"common/symbols/cf":{"en-US":"Adding \xb0 to C and F",ru:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \xb0 \u043a C \u0438 F"},"common/symbols/copy":{common:"(c) \u2192 \xa9, (tm) \u2192 \u2122, (r) \u2192 \xae"},"en-US/dash/main":{"en-US":"Replace hyphens surrounded by spaces with an em-dash",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0442\u0438\u0440\u0435"},"ru/dash/centuries":{"en-US":"Hyphen to dash in centuries",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435 \u0432 \u0432\u0435\u043a\u0430\u0445"},"ru/dash/daysMonth":{"en-US":"Dash between days of one month",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u043d\u044f\u043c\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u044f\u0446\u0430"},"ru/dash/de":{"en-US":"Hyphen before \u201c\u0434\u0435\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u0434\u0435\xbb"},"ru/dash/decade":{"en-US":"Dash in decade",ru:"\u0422\u0438\u0440\u0435 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f\u0445, 80\u201490-\u0435 \u0433\u0433."},"ru/dash/directSpeech":{"en-US":"Dash in direct speech",ru:"\u0422\u0438\u0440\u0435 \u0432 \u043f\u0440\u044f\u043c\u043e\u0439 \u0440\u0435\u0447\u0438"},"ru/dash/izpod":{"en-US":"Hyphen between \u201c\u0438\u0437-\u043f\u043e\u0434\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0438\u0437-\u043f\u043e\u0434\xbb"},"ru/dash/izza":{"en-US":"Hyphen between \u201c\u0438\u0437-\u0437\u0430\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0438\u0437-\u0437\u0430\xbb"},"ru/dash/ka":{"en-US":"Hyphen before \u201c\u043a\u0430\u201d and \u201c\u043a\u0430\u0441\u044c\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u043a\u0430\xbb \u0438 \xab\u043a\u0430\u0441\u044c\xbb"},"ru/dash/kakto":{"en-US":"Hyphen for \u201c\u043a\u0430\u043a \u0442\u043e\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u0434\u043b\u044f \xab\u043a\u0430\u043a \u0442\u043e\xbb"},"ru/dash/koe":{"en-US":"Hyphen after \u201c\u043a\u043e\u0435\u201d and \u201c\u043a\u043e\u0439\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u043e\u0441\u043b\u0435 \xab\u043a\u043e\u0435\xbb \u0438 \xab\u043a\u043e\u0439\xbb"},"ru/dash/main":{"en-US":"Replacement hyphen with dash",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435"},"ru/dash/month":{"en-US":"Dash between months",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0441\u044f\u0446\u0430\u043c\u0438"},"ru/dash/surname":{"en-US":"Acronyms with a dash",ru:"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0438\u0440\u0435"},"ru/dash/taki":{"en-US":"Hyphen between \u201c\u0432\u0435\u0440\u043d\u043e-\u0442\u0430\u043a\u0438\u201d and etc.",ru:"\u0414\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \xab\u0432\u0435\u0440\u043d\u043e-\u0442\u0430\u043a\u0438\xbb \u0438 \u0442. \u0434."},"ru/dash/time":{"en-US":"Dash in time intervals",ru:"\u0422\u0438\u0440\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438"},"ru/dash/to":{"en-US":"Hyphen before \u201c\u0442\u043e\u201d, \u201c\u043b\u0438\u0431\u043e\u201d, \u201c\u043d\u0438\u0431\u0443\u0434\u044c\u201d",ru:"\u0414\u0435\u0444\u0438\u0441 \u043f\u0435\u0440\u0435\u0434 \xab\u0442\u043e\xbb, \xab\u043b\u0438\u0431\u043e\xbb, \xab\u043d\u0438\u0431\u0443\u0434\u044c\xbb"},"ru/dash/weekday":{"en-US":"Dash between the days of the week",ru:"\u0422\u0438\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u043d\u044f\u043c\u0438 \u043d\u0435\u0434\u0435\u043b\u0438"},"ru/dash/years":{"en-US":"Hyphen to dash in years",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u0435\u0444\u0438\u0441\u0430 \u043d\u0430 \u0442\u0438\u0440\u0435 \u0432 \u0433\u043e\u0434\u0430\u0445"},"ru/date/fromISO":{"en-US":"Converting dates YYYY-MM-DD type DD.MM.YYYY",ru:"\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442 YYYY-MM-DD \u043a \u0432\u0438\u0434\u0443 DD.MM.YYYY"},"ru/date/weekday":{common:"2 \u041c\u0430\u044f, \u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u2192 2 \u043c\u0430\u044f, \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a"},"ru/money/currency":{"en-US":"Currency symbol ($, \u20ac, \xa5, \u04b0, \xa3 and \u20a4) after the number, $100 \u2192 100\xa0$",ru:"\u0421\u0438\u043c\u0432\u043e\u043b \u0432\u0430\u043b\u044e\u0442\u044b ($, \u20ac, \xa5, \u04b0, \xa3 \u0438 \u20a4) \u043f\u043e\u0441\u043b\u0435 \u0447\u0438\u0441\u043b\u0430, $100 \u2192 100\xa0$"},"ru/money/ruble":{common:"1 \u0440\u0443\u0431. \u2192 1 \u20bd"},"ru/nbsp/abbr":{"en-US":"Non-breaking space in abbreviations, e.g. \u201c\u0442.\xa0\u0434.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \xab\u0442.\xa0\u0434.\xbb"},"ru/nbsp/addr":{"en-US":"Placement of non-breaking space after \u201c\u0433.\u201d, \u201c\u043e\u0431\u043b.\u201d, \u201c\u0443\u043b.\u201d, \u201c\u043f\u0440.\u201d, \u201c\u043a\u0432.\u201d et al.",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043f\u043e\u0441\u043b\u0435 \xab\u0433.\xbb, \xab\u043e\u0431\u043b.\xbb, \xab\u0443\u043b.\xbb, \xab\u043f\u0440.\xbb, \xab\u043a\u0432.\xbb \u0438 \u0434\u0440."},"ru/nbsp/afterNumberSign":{"en-US":"Non-breaking thin space after \u2116",ru:"\u041d\u0435\u0440\u0430\u0437. \u0443\u0437\u043a\u0438\u0439 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u2116"},"ru/nbsp/beforeParticle":{"en-US":"Non-breaking space before \u201c\u043b\u0438\u201d, \u201c\u043b\u044c\u201d, \u201c\u0436\u0435\u201d, \u201c\u0431\u044b\u201d, \u201c\u0431\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \xab\u043b\u0438\xbb, \xab\u043b\u044c\xbb, \xab\u0436\u0435\xbb, \xab\u0431\u044b\xbb, \xab\u0431\xbb"},"ru/nbsp/centuries":{"en-US":"Remove spaces and extra points in \u201c\u0432\u0432.\u201d",ru:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0438 \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0432 \xab\u0432\u0432.\xbb"},"ru/nbsp/dayMonth":{"en-US":"Non-breaking space between number and month",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u043c"},"ru/nbsp/initials":{"en-US":"Binding of initials to the name",ru:"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u043e\u0432 \u043a \u0444\u0430\u043c\u0438\u043b\u0438\u0438"},"ru/nbsp/m":{"en-US":"m2 \u2192 \u043c\xb2, m3 \u2192 \u043c\xb3 and non-breaking space",ru:"\u043c2 \u2192 \u043c\xb2, \u043c3 \u2192 \u043c\xb3 \u0438 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b"},"ru/nbsp/mln":{"en-US":"Non-breaking space between number and \u201c\u0442\u044b\u0441.\u201d, \u201c\u043c\u043b\u043d\u201d, \u201c\u043c\u043b\u0440\u0434\u201d and \u201c\u0442\u0440\u043b\u043d\u201d",ru:"\u041d\u0435\u0440\u0430\u0437\u0440. \u043f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \xab\u0442\u044b\u0441.\xbb, \xab\u043c\u043b\u043d\xbb, \xab\u043c\u043b\u0440\u0434\xbb \u0438 \xab\u0442\u0440\u043b\u043d\xbb"},"ru/nbsp/ooo":{"en-US":"Non-breaking space after \u201cOOO, \u041e\u0410\u041e, \u0417\u0410\u041e, \u041d\u0418\u0418, \u041f\u0411\u041e\u042e\u041b\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 OOO, \u041e\u0410\u041e, \u0417\u0410\u041e, \u041d\u0418\u0418 \u0438 \u041f\u0411\u041e\u042e\u041b"},"ru/nbsp/page":{"en-US":"Non-breaking space after \u201c\u0441\u0442\u0440.\u201d, \u201c\u0433\u043b.\u201d, \u201c\u0440\u0438\u0441.\u201d, \u201c\u0438\u043b\u043b.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xab\u0441\u0442\u0440.\xbb, \xab\u0433\u043b.\xbb, \xab\u0440\u0438\u0441.\xbb, \xab\u0438\u043b\u043b.\xbb"},"ru/nbsp/ps":{"en-US":"Non-breaking space in P.\xa0S. and P.\xa0P.\xa0S.",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u0432 P.\xa0S. \u0438 P.\xa0P.\xa0S."},"ru/nbsp/rubleKopek":{"en-US":"Not once. space before the \u201crub\u201d and \u201ccop.\u201d",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \xab\u0440\u0443\u0431.\xbb \u0438 \xab\u043a\u043e\u043f.\xbb"},"ru/nbsp/see":{"en-US":"Non-breaking space after abbreviation \xab\u0441\u043c.\xbb and \xab\u0438\u043c.\xbb",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \xab\u0441\u043c.\xbb \u0438 \xab\u0438\u043c.\xbb"},"ru/nbsp/year":{"en-US":"Non-breaking space before XXXX \u0433. (2012 \u0433.)",ru:"\u041d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 XXXX \u0433. (2012 \u0433.)"},"ru/nbsp/years":{"en-US":"\u0433.\u0433. \u2192 \u0433\u0433. and non-breaking space",ru:"\u0433.\u0433. \u2192 \u0433\u0433. \u0438 \u043d\u0435\u0440\u0430\u0437. \u043f\u0440\u043e\u0431\u0435\u043b"},"ru/number/comma":{"en-US":"Commas in numbers",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0437\u0430\u043f\u044f\u0442\u0443\u044e \u0432 \u0447\u0438\u0441\u043b\u0430\u0445"},"ru/number/ordinals":{common:"N-\u044b\u0439, -\u043e\u0439, -\u0430\u044f, -\u043e\u0435, -\u044b\u0435, -\u044b\u043c, -\u043e\u043c, -\u044b\u0445 \u2192 N-\u0439, -\u044f, -\u0435, -\u043c, -\u0445 (25-\u0439)"},"ru/optalign/bracket":{"en-US":"for opening bracket",ru:"\u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u0438"},"ru/optalign/comma":{"en-US":"for comma",ru:"\u0434\u043b\u044f \u0437\u0430\u043f\u044f\u0442\u043e\u0439"},"ru/optalign/quote":{"en-US":"for opening quotation marks",ru:"\u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043a\u0430\u0432\u044b\u0447\u043a\u0438"},"ru/other/accent":{"en-US":"Replacement capital letters to lowercase with addition of accent",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043d\u0443\u044e \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u044f"},"ru/other/phone-number":{"en-US":"Formatting phone numbers",ru:"\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432"},"ru/punctuation/ano":{"en-US":"Placement of commas before \u201c\u0430\u201d and \u201c\u043d\u043e\u201d",ru:"\u0420\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u043f\u0435\u0440\u0435\u0434 \xab\u0430\xbb \u0438 \xab\u043d\u043e\xbb"},"ru/punctuation/exclamation":{common:"!! \u2192 !"},"ru/punctuation/exclamationQuestion":{common:"!? \u2192 ?!"},"ru/punctuation/hellipQuestion":{common:"\xab?\u2026\xbb \u2192 \xab?..\xbb, \xab!\u2026\xbb \u2192 \xab!..\xbb, \xab\u2026,\xbb \u2192 \xab\u2026\xbb"},"ru/space/afterHellip":{"en-US":"Space after \u201c...\u201d, \u201c!..\u201d and \u201c?..\u201d",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 \xab...\xbb, \xab!..\xbb \u0438 \xab?..\xbb"},"ru/space/year":{"en-US":"Space between number and word \u201c\u0433\u043e\u0434\u201d",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0441\u043b\u043e\u0432\u043e\u043c \xab\u0433\u043e\u0434\xbb"},"ru/symbols/NN":{common:"\u2116\u2116 \u2192 \u2116"},"ru/typo/switchingKeyboardLayout":{"en-US":"Replacement of Latin letters in Russian. Typos occur when you switch keyboard layouts",ru:"\u0417\u0430\u043c\u0435\u043d\u0430 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0445 \u0431\u0443\u043a\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0435. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043d\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438"}},w.groups=[{name:"punctuation",title:{"en-US":"Punctuation",ru:"\u041f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f"}},{name:"optalign",title:{"en-US":"Hanging punctuation",ru:"\u0412\u0438\u0441\u044f\u0447\u0430\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f"}},{name:"dash",title:{"en-US":"Dash and hyphen",ru:"\u0422\u0438\u0440\u0435 \u0438 \u0434\u0435\u0444\u0438\u0441"}},{name:"nbsp",title:{"en-US":"Non-breaking space",ru:"\u041d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b"}},{name:"space",title:{"en-US":"Space and line ending",ru:"\u041f\u0440\u043e\u0431\u0435\u043b \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438"}},{name:"html",title:{"en-US":"HTML",ru:"HTML"}},{name:"date",title:{"en-US":"Date",ru:"\u0414\u0430\u0442\u0430"}},{name:"money",title:{"en-US":"Money",ru:"\u0414\u0435\u043d\u044c\u0433\u0438"}},{name:"number",title:{"en-US":"Numbers and mathematical expressions",ru:"\u0427\u0438\u0441\u043b\u0430 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f"}},{name:"symbols",title:{"en-US":"Symbols and signs",ru:"\u0421\u0438\u043c\u0432\u043e\u043b\u044b \u0438 \u0437\u043d\u0430\u043a\u0438"}},{name:"typo",title:{"en-US":"Typos",ru:"\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438"}},{name:"other",title:{"en-US":"Other",ru:"\u041f\u0440\u043e\u0447\u0435\u0435"}}],w});
@@ -800,7 +800,7 @@ function prepareRule(rule) {
800
800
  return preparedRule;
801
801
  }
802
802
 
803
- var PACKAGE_VERSION = '7.4.0';
803
+ var PACKAGE_VERSION = '7.4.1';
804
804
 
805
805
  function prepareHtmlEntity(htmlEntity) {
806
806
  var result = {
@@ -3164,15 +3164,8 @@ Typograf.addRules([
3164
3164
  var anoRule = {
3165
3165
  name: 'ru/punctuation/ano',
3166
3166
  handler: function (text) {
3167
- var parts = [
3168
- '([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])', // Запятую не ставим, если уже есть какой-либо знак
3169
- '(?<!([^а-яА-Я]+ну|Ну))', // Запятую не ставим перед ну
3170
- '(\\s+)', // Отступ между левой и правой частями в виде пробельных символов
3171
- '(а|но)', // Союзы
3172
- '(?= |\u00A0|\\n)' // Остальная часть предложения(пробел, неразрывной пробел, перевод строки)
3173
- ];
3174
- var re = new RegExp(parts.join(''), 'g');
3175
- return text.replace(re, '$1,$3$4');
3167
+ var re = new RegExp('([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])(\\s+)(а|но)(?= |\u00A0|\\n)', 'g');
3168
+ return text.replace(re, '$1,$2$3');
3176
3169
  },
3177
3170
  };
3178
3171
 
package/dist/typograf.js CHANGED
@@ -806,7 +806,7 @@
806
806
  return preparedRule;
807
807
  }
808
808
 
809
- var PACKAGE_VERSION = '7.4.0';
809
+ var PACKAGE_VERSION = '7.4.1';
810
810
 
811
811
  function prepareHtmlEntity(htmlEntity) {
812
812
  var result = {
@@ -3170,15 +3170,8 @@
3170
3170
  var anoRule = {
3171
3171
  name: 'ru/punctuation/ano',
3172
3172
  handler: function (text) {
3173
- var parts = [
3174
- '([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])', // Запятую не ставим, если уже есть какой-либо знак
3175
- '(?<!([^а-яА-Я]+ну|Ну))', // Запятую не ставим перед ну
3176
- '(\\s+)', // Отступ между левой и правой частями в виде пробельных символов
3177
- '(а|но)', // Союзы
3178
- '(?= |\u00A0|\\n)' // Остальная часть предложения(пробел, неразрывной пробел, перевод строки)
3179
- ];
3180
- var re = new RegExp(parts.join(''), 'g');
3181
- return text.replace(re, '$1,$3$4');
3173
+ var re = new RegExp('([^«„[(!?,:;\\-‒–—\\s' + privateLabel + '])(\\s+)(а|но)(?= |\u00A0|\\n)', 'g');
3174
+ return text.replace(re, '$1,$2$3');
3182
3175
  },
3183
3176
  };
3184
3177
 
@@ -1,2 +1,2 @@
1
1
  /*! typograf | © 2024 Denis Seleznev | MIT License | https://github.com/typograf/typograf */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=t()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function n(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||((r=r||Array.prototype.slice.call(t,0,a))[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var P=[["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]],e=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function t(){var t=this;this.entities=this.prepareEntities(n(n([],P,!0),e,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(e){t.entitiesByName[e.name]=e,t.entitiesByNameEntity[e.nameEntity]=e,t.entitiesByDigitEntity[e.digitEntity]=e,t.entitiesByUtf[e.utf]=e}),this.invisibleEntities=this.prepareEntities(e)}t.prototype.toUtf=function(e){var n=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=n.entitiesByNameEntity[e];return t?t.utf:e}))},t.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))})},t.prototype.restore=function(e){var t=e.prefs.htmlEntity,n=t.type,r=this.entities;"name"!==n&&"digit"!==n||((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,"name"===n?"nameEntity":"digitEntity",r))},t.prototype.getByUtf=function(e,t){var n;switch(t){case"digit":n=this.entitiesByDigitEntity[e];break;case"name":n=this.entitiesByNameEntity[e];break;default:n=e}return n},t.prototype.prepareEntities=function(e){var r=[];return e.forEach(function(e){var t=e[0],e=e[1],n=String.fromCharCode(e);r.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+e+";",utf:n,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(n,"g")})}),r},t.prototype.prepareListParam=function(e){var t=this,n=[];return e.forEach(function(e){e=t.entitiesByName[e];e&&n.push(e)}),n},t.prototype.restoreEntitiesByIndex=function(t,n,e){return e.forEach(function(e){t=t.replace(e.reUtf,e[n])}),t};var o=new t,a=[];function i(e){e=(e||"").split("/")[0];e&&"common"!==e&&!s(e)&&(a.push(e),a.sort())}function s(e){return"common"===e||-1!==a.indexOf(e)}function u(e,t){e=e||t;return e?Array.isArray(e)?e:[e]:[]}function l(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach(function(e){if(!s(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var c={};function N(e){return c[e]}function p(t){Object.keys(t).forEach(function(e){i(e),c[e]=t[e]})}var j=["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"],g=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),h="\\d+([.,]\\d+)?",O=/\d/;function f(e){return-1<e.search(O)}var d="\uf000",m="\uf001",M=($.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},$.prototype.show=function(t,n){for(var e=new RegExp("\uf000tf\\d+\uf000","g"),r=new RegExp("\uf000tf\\d"),a=function(e){return t.safeTags.hidden[n][e]||e},i=0,o=this.tags[n].length;i<o&&(t.text=t.text.replace(e,a),-1!==t.text.search(r));i++);},$.prototype.hide=function(t,e){var n=this,r=(t.safeTags.hidden[e]={},this.pasteLabel.bind(this,t,e));this.tags[e].forEach(function(e){t.text=t.text.replace(n.prepareRegExp(e),r)})},$.prototype.hideHTMLTags=function(e){var t;e.isHTML&&(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))},$.prototype.getPrevLabel=function(e,t){for(var n=t-1;0<=n;n--)if(e[n]===d)return e.slice(n,t+1);return""},$.prototype.getNextLabel=function(e,t){for(var n=t+1;n<e.length;n++)if(e[n]===d)return e.slice(t,n+1);return""},$.prototype.getTagByLabel=function(n,r){var a=null;return this.groups.some(function(e){var t=n.safeTags.hidden[e][r];return a=void 0!==t?{group:e,value:t}:a}),a},$.prototype.getTagInfo=function(e){if(!e)return null;var t={group:e.group};switch(e.group){case"html":t.name=e.value.split(/[<\s>]/)[1],t.isInline=-1<j.indexOf(t.name),t.isClosing=-1<e.value.search(/^<\//);break;case"url":t.isInline=!0;break;case"own":t.isInline=!1}return t},$.prototype.pasteLabel=function(e,t,n){var e=e.safeTags,r="\uf000tf"+e.counter+d;return e.hidden[t][r]=n,e.counter++,r},$.prototype.prepareRegExp=function(e){var t,n;return e instanceof RegExp?e:(t=e[0],n=e[1],e=e[2],new RegExp(t+(void 0===e?"[^]*?":e)+n,"gi"))},$.prototype.getPrevTagInfo=function(e,t,n){t=this.getPrevLabel(t,n-1);if(t){n=this.getTagByLabel(e,t);if(n)return this.getTagInfo(n)}return null},$.prototype.getNextTagInfo=function(e,t,n){t=this.getNextLabel(t,n+1);if(t){n=this.getTagByLabel(e,t);if(n)return this.getTagInfo(n)}return null},$);function $(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var t=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){t.push(["<".concat(e,"(\\s[^>]*?)?>"),"</".concat(e,">")])}),this.tags={own:[],html:t.map(this.prepareRegExp),url:[g]}}function b(e,t){for(var n="";1==(1&t)&&(n+=e),0!=(t>>>=1);)e+=e;return n}function x(e){return e.replace(/\u00A0/g," ")}function v(e,t){for(var n=0;n<t.length;n++)e=e.replace(t[n][0],t[n][1]);return e}function U(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function y(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var Q={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},F=0,H="default",W=[],G=[];function R(){var e=n([],W,!0);return e.sort(function(e,t){return e.index>t.index?1:-1}),e}function X(){return n([],G,!0)}function V(e){var t=e.name.split("/"),n=t[0],r=t[1],t=t[2];return{name:e.name,shortName:t,handler:e.handler,queue:e.queue||H,enabled:!0!==e.disabled,locale:n,group:r,index:"number"==typeof(t=e).index?t.index:(n=t.name.split("/")[1],void 0===(n=Q[n])&&(n=F),"string"==typeof t.index?n+parseInt(t.index,10):n),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function K(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function Y(e){return e||"LF"}w.addRule=function(e){i((e=V(e=e)).locale),W.push(e)},w.addRules=function(e){var t=this;e.forEach(function(e){t.addRule(e)})},w.addInnerRule=function(e){G.push(V(e))},w.addInnerRules=function(e){var t=this;e.forEach(function(e){t.addInnerRule(e)})},w.getRule=function(t){var n=null;return R().some(function(e){return e.name===t&&(n=e,!0)}),n},w.getRules=R,w.getInnerRules=X,w.getLocales=function(){return a},w.addLocale=function(e){i(e)},w.hasLocale=s,w.setData=function(e){p(e)},w.getData=function(e){return c[e]},w.prototype.execute=function(e,t){var n;return(e=""+e)?(n=this.prefs,t=t,n=r({},n),t&&("locale"in t&&(n.locale=u(t.locale)),"htmlEntity"in t&&(n.htmlEntity=K(t.htmlEntity)),"lineEnding"in t&&(n.lineEnding=Y(t.lineEnding)),"processingSeparateParts"in t&&(n.processingSeparateParts=t.processingSeparateParts),"ruleFilter"in t)&&(n.ruleFilter=t.ruleFilter),l((t=n).locale),n=this.prepareContext(e,t),this.process(n)):""},w.prototype.getSetting=function(e,t){return this.settings[e]&&this.settings[e][t]},w.prototype.setSetting=function(e,t,n){this.settings[e]=this.settings[e]||{},this.settings[e][t]=n},w.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},w.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},w.prototype.enableRule=function(e){return this.enable(e,!0)},w.prototype.disableRule=function(e){return this.enable(e,!1)},w.prototype.addSafeTag=function(e,t,n){e=e instanceof RegExp?e:[e,t,n];this.safeTags.add(e)},w.prototype.prepareContext=function(e,n){return{text:e,isHTML:U(e),prefs:n,getData:function(t){return"char"===t?n.locale.map(function(e){return c[e+"/"+t]}).join(""):N(n.locale[0]+"/"+t)},safeTags:this.safeTags}},w.prototype.splitBySeparateParts=function(a){var i,e,o;return a.isHTML&&!1!==a.prefs.processingSeparateParts?(i=[],e=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),o=0,a.text.replace(e,function(e,t,n,r){return o!==r&&i.push((o?m:"")+a.text.slice(o,r)+m),i.push(e),o=r+e.length,e}),i.push(o?m+a.text.slice(o,a.text.length):a.text),i):[a.text]},w.prototype.process=function(t){var e,n=this,r=(t.text=t.text.replace(/\r\n?/g,"\n"),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"),t.isHTML),a=new RegExp(m,"g");return t.text=this.splitBySeparateParts(t).map(function(e){return t.text=e,t.isHTML=U(e),n.safeTags.hideHTMLTags(t),n.safeTags.hide(t,"url"),n.executeRules(t,"hide-safe-tags-url"),n.executeRules(t,"hide-safe-tags"),o.toUtf(t),t.prefs.live&&(t.text=x(t.text)),n.executeRules(t,"utf"),n.executeRules(t),o.restore(t),n.executeRules(t,"html-entities"),n.safeTags.show(t,"url"),n.executeRules(t,"show-safe-tags-url"),t.text.replace(a,"")}).join(""),t.isHTML=r,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"),r=t.text,"CRLF"===(e=t.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===e?r.replace(/\n/g,"\r"):r},w.prototype.executeRules=function(t,e){var n=this,r=this.rulesByQueues[e=void 0===e?H:e],e=this.innerRulesByQueues[e];e&&e.forEach(function(e){n.ruleIterator(t,e)}),r&&r.forEach(function(e){n.ruleIterator(t,e)})},w.prototype.ruleIterator=function(e,t){!0===e.prefs.live&&!1===t.live||!1===e.prefs.live&&!0===t.live||"common"!==t.locale&&t.locale!==e.prefs.locale[0]||!this.isEnabledRule(t.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(t)||(this.onBeforeRule&&this.onBeforeRule(t.name,e),e.text=t.handler.call(this,e.text,this.settings[t.name],e),this.onAfterRule&&this.onAfterRule(t.name,e))},w.prototype.prepareRuleSettings=function(e){this.settings[e.name]=y(e.settings),this.enabledRules[e.name]=e.enabled},w.prototype.enable=function(e,t){var n=this;Array.isArray(e)?e.forEach(function(e){n.enableByMask(e,t)}):this.enableByMask(e,t)},w.prototype.enableByMask=function(e,t){var n,r=this;e&&(-1!==e.search(/\*/)?(n=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach(function(e){e=e.name;n.test(e)&&(r.enabledRules[e]=t)})):this.enabledRules[e]=t)},w.groups=[],w.titles={},w.version="7.4.0";var E=w;function w(e){var t=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:u((e=e).locale),lineEnding:Y(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:K(e.htmlEntity)},l(this.prefs.locale),this.safeTags=new M,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=X(),this.innerRules.forEach(function(e){t.innerRulesByQueues[e.queue]=t.innerRulesByQueues[e.queue]||[],t.innerRulesByQueues[e.queue].push(e)}),this.rulesByQueues={},this.rules=R(),this.rules.forEach(function(e){t.prepareRuleSettings(e),t.rulesByQueues[e.queue]=t.rulesByQueues[e.queue]||[],t.rulesByQueues[e.queue].push(e)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"common/char":"a-z","common/dash":"--?|\u2012|\u2013|\u2014","common/quote":'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'},{"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","be/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"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","bg/quote":{left:"\u201e\u2019",right:"\u201c\u2019"}},{"ca/char":"abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc","ca/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"cs/char":"a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e","cs/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"da/char":"a-z\xe5\xe6\xf8","da/quote":{left:"\xbb\u203a",right:"\xab\u2039"}},{"de/char":"a-z\xdf\xe4\xf6\xfc","de/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"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","el/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"en-GB/char":"a-z","en-GB/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"en-US/char":"a-z","en-US/quote":{left:"\u201c\u2018",right:"\u201d\u2019"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d","eo/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"es/char":"a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc","es/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"et/char":"abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e","et/quote":{left:"\u201e\xab",right:"\u201c\xbb"}},{"fi/char":"abcdefghijklmnopqrstuvy\xf6\xe4\xe5","fi/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"fr/char":"a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6","fr/quote":{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa","ga/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"hu/char":"a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171","hu/quote":{left:"\u201e\xbb",right:"\u201d\xab"}},{"it/char":"a-z\xe0\xe9\xe8\xec\xf2\xf9","it/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"lv/char":"abcdefghijklmnopqrstuvxz\xe6\u0153","lv/quote":{left:"\xab\u201e",right:"\xbb\u201c"}},{"nl/char":"a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc","nl/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"no/char":"a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8","no/quote":{left:"\xab\u2019",right:"\xbb\u2019"}},{"pl/char":"abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c","pl/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ro/char":"abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b","ro/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ru/char":"\u0430-\u044f\u0451","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)","ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","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/quote":{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0},"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","ru/shortWord":"\u0430|\u0431\u044b|\u0432|\u0432\u043e|\u0434\u0430|\u0434\u043e|\u0436\u0435|\u0437\u0430|\u0438|\u0438\u0437|\u043a|\u043a\u043e|\u043b\u0438|\u043d\u0430|\u043d\u0435|\u043d\u0438|\u043d\u043e|\u043e|\u043e\u0431|\u043e\u0442|\u043f\u043e|\u0441|\u0441\u043e|\u0442\u043e|\u0443","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"},{"sk/char":"abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e","sk/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sl/char":"a-z\u010d\u0161\u017e","sl/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sr/char":"abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e","sr/quote":{left:"\u201e\u2019",right:"\u201d\u2019"}},{"sv/char":"a-z\xe4\xe5\xe9\xf6","sv/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"tr/char":"abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f","tr/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"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","uk/quote":{left:"\xab\u201e",right:"\xbb\u201c"}}].forEach(p);var Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},q={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,function(e){return Z[e]})},disabled:!0},J=new RegExp("<("+["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"].join("|")+")[>\\s]"),q=(E.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},q,{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},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){e=e.split("\n\n");return e.forEach(function(e,t,n){!e.trim()||J.test(e)||(n[t]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))}),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,t,n){var o=this,r=new RegExp("(^|\\s)("+t.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),s=y(n.prefs);return s.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,t,n){return t+n.replace(r,function(e,t,n,r){var a=r[0],i=r[r.length-1],r=r.slice(1,-1);return t+n+"="+a+o.execute(r,s)+i})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.replace(g,function(e,t,n){n=n.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===t?n=n.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===t&&(n=n.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=n,n=t+"://"+n,a='<a href="'+n+'">';return"http"===t||"https"===t?(r=r.replace(/^www\./,""),a+("http"===t?r:t+"://"+r)+"</a>"):a+n+"</a>"})},disabled:!0,htmlAttrs:!1}]),{name:"common/nbsp/afterNumber",handler:function(e,t,n){n=n.getData("char");return e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+n+"]+)","gi"),"$1$2\xa0$3")},disabled:!0});function _(e,t,n,r){return t+n.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}E.addRules([q,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}},{name:"common/nbsp/afterSectionMark",handler:function(e,t,n){n=n.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===n?"\xa7\u202f":"\xa7\xa0")}},{name:"common/nbsp/afterShortWord",handler:function(e,t,n){var r=t.lengthShortWord,t=t.useShortWordList,a=c["common/quote"],i=n.getData("char"),n=n.getData("shortWord"),a=" \xa0(\uf000"+a,t=new RegExp(t&&void 0!==n?"(^|["+a+"])("+n+") ":"(^|["+a+"])(["+i+"]{1,"+r+"}) ","gim");return e.replace(t,"$1$2\xa0").replace(t,"$1$2\xa0")},settings:{lengthShortWord:2,useShortWordList:!1}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,t,n){var r=n.getData("quote"),n=n.getData("char"),a=n.toUpperCase(),n=new RegExp("(["+n+a+"]) (?=\\d{1,"+t.lengthLastNumber+"}[-+\u2212%'\""+r.right+")]?([.!?\u2026]( ["+a+"]|$)|$))","gm");return e.replace(n,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,t,n){var n=n.getData("char"),r=n.toUpperCase(),n=new RegExp("(["+n+"\\d]) (["+n+r+"]{1,"+t.lengthLastWord+"}[.!?\u2026])( ["+r+"]|$)","g");return e.replace(n,"$1\xa0$2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,_).replace(/(<nobr>)(.*?)(<\/nobr>)/g,_)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:x,disabled:!0}]);q={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,a){return e.replace(new RegExp("(^ ?|\\D |".concat(d,")(\\d{1,3}([ \xa0\u202f\u2009]\\d{3})+)(?! ?[\\d-])"),"gm"),function(e,t,n){return t+n.replace(/\s/g,a.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(e,t){var n=t.match(/[.,]/),t=n?t.split(n):[t],r=t[0],t=t[1],r=r.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+a.space);return n?r+n+t:r})},settings:{space:"\u202f"}},E.addRules([q,{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")}},{name:"common/number/mathSigns",handler:function(e){return v(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}]),E.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,t,n){var r=c["common/quote"],n=n.getData("char"),r="[;:,.?! \n"+r+"]",n=new RegExp("("+r+"|^)(["+n+"]{"+t.min+",}) \\2("+r+"|$)","gi");return e.replace(n,"$1$2$3")},settings:{min:2},disabled:!0}]),q={name:"common/punctuation/apostrophe",handler:function(e,t,n){n="(["+n.getData("char")+"])",n=new RegExp(n+"'"+n,"gi");return e.replace(n,"$1\u2019$2")}};function A(){this.bufferQuotes={left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},this.beforeLeft=" \n\t\xa0[(",this.afterRight=" \n\t\xa0!?.:;#*,\u2026)\\]"}A.prototype.process=function(e){var t,n,r=e.context.text;return this.count(r).total&&(t=e.settings,(n=e.settings.left[0]===e.settings.right[0])&&(e.settings=y(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),n)&&(r=this.returnOriginalQuotes(r,t,e.settings),e.settings=t),r},A.prototype.returnOriginalQuotes=function(e,t,n){for(var r={},a=0;a<n.left.length;a++)r[n.left[a]]=t.left[a],r[n.right[a]]=t.right[a];return e.replace(new RegExp("["+n.left+n.right+"]","g"),function(e){return r[e]})},A.prototype.count=function(e){var t={total:0};return e.replace(new RegExp("["+c["common/quote"]+"]","g"),function(e){return t[e]||(t[e]=0),t[e]++,t.total++,e}),t},A.prototype.removeDuplicates=function(e,t){var n=t.left[0],r=t.left[1]||n,t=t.right[0];return n!==r?e:e.replace(new RegExp(n+n,"g"),n).replace(new RegExp(t+t,"g"),t)},A.prototype.removeSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],i=t.right[n];e=e.replace(new RegExp(a+"([ \u202f\xa0])","g"),a).replace(new RegExp("([ \u202f\xa0])"+i,"g"),i)}return e},A.prototype.setSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],i=t.right[n];e=e.replace(new RegExp(a+"([^\u202f])","g"),a+"\u202f$1").replace(new RegExp("([^\u202f])"+i,"g"),"$1\u202f"+i)}return e},A.prototype.set=function(e,t){var n=c["common/quote"],r=t.settings.left[0],a=t.settings.left[1]||r,i=t.settings.right[0],o=new RegExp("(^|["+this.beforeLeft+"])(["+n+"]+)(?=[^\\s"+d+"])","gim"),n=new RegExp("([^\\s\uf000])(["+n+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(o,function(e,t,n){return t+b(r,n.length)}).replace(n,function(e,t,n){return t+b(i,n.length)}),e=this.setAboveTags(e,t),e=r!==a?this.setInner(e,t.settings):e},A.prototype.setAboveTags=function(i,o){var s=this,u=o.settings.left[0],l=o.settings.right[0];return i.replace(new RegExp("(^|.)(["+c["common/quote"]+"])(.|$)","gm"),function(e,t,n,r,a){return t!==d&&r!==d?e:t===d&&r===d?'"'===n?t+s.getAboveTwoTags(i,a+1,o)+r:e:t===d?(n=-1<s.afterRight.indexOf(r),e=o.safeTags.getPrevTagInfo(o.context,i,a-1),n&&e&&"html"===e.group?t+(e.isClosing?l:u)+r:t+(!r||n?l:u)+r):(e=-1<s.beforeLeft.indexOf(t),n=o.safeTags.getNextTagInfo(o.context,i,a+1),e&&n&&"html"===n.group?t+(n.isClosing?l:u)+r:t+(!t||e?u:l)+r)})},A.prototype.getAboveTwoTags=function(e,t,n){var r=n.safeTags.getPrevTagInfo(n.context,e,t),a=n.safeTags.getNextTagInfo(n.context,e,t);if(r&&"html"===r.group){if(!r.isClosing)return n.settings.left[0];if(a&&a.isClosing&&r.isClosing)return n.settings.right[0]}return e[t]},A.prototype.setInner=function(e,t){for(var n=t.left[0],r=t.right[0],a=this.getMaxLevel(e,n,r,t.left.length),i=0,o="",s=0,u=e.length;s<u;s++){var l=e[s];l===n?(o+=t.left[a-1<i?a-1:i],a<++i&&(i=a)):l===r?(--i<0&&(i=0),o+=t.right[i]):('"'===l&&(i=0),o+=l)}return o},A.prototype.getMaxLevel=function(e,t,n,r){e=this.count(e);return e[t]===e[n]?r:Math.min(r,2)};var ee=new A,te={},T=(a.forEach(function(e){te[e]=y(c[e+"/quote"])}),{name:"common/punctuation/quote",handler:function(e,t,n){t=t[n.prefs.locale[0]];return t?ee.process({context:n,settings:t,safeTags:this.safeTags}):e},settings:te}),q=(E.addRules([q,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,t,n){return"ru"===n.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}},T,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,t,n){var n=this.getSetting("common/punctuation/quote",n.prefs.locale[0]),r=o.getByUtf(n.left[0]),a=o.getByUtf(n.right[0]),i=(i=o.getByUtf(n.left[1]))?"|"+i:"",n=(n=o.getByUtf(n.right[1]))?"|"+n:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+i+")([^]*?)("+a+n+")(</[aA]>)","g");return e.replace(r,"$2$1$3$5$4")}}]),{name:"common/space/beforeBracket",handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(["+n+".!?,;\u2026)])\\(","gi");return e.replace(n,"$1 (")}}),T={name:"common/space/delRepeatN",index:"-1",handler:function(e,t){var t=t.maxConsecutiveLineBreaks,n=new RegExp("\n{".concat(t+1,",}"),"g"),t=b("\n",t);return e.replace(n,t)},settings:{maxConsecutiveLineBreaks:2}},B={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}},ne={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,"")}},re=new RegExp('(\\D):([^)",:.?\\s\\/\\\\\uf000])',"g"),k={name:"common/space/afterColon",handler:function(e){return e.replace(re,"$1: $2")}},L={name:"common/space/afterComma",handler:function(e,t,n){n=n.getData("quote"),n="string"==typeof n?n:n.right;return e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\\uf000'+n+"])","g"),function(e,t,n){return f(t)&&f(n)?e:t+", "+n})}},ae=new RegExp("\\?([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),D={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(ae,"? $1")}},ie=new RegExp("!([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),S={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(ie,"! $1")}},oe=new RegExp(";([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),k=(E.addRules([k,L,D,S,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(oe,"; $1")}},q,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},T,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},B,ne]),{name:"common/symbols/arrow",handler:function(e){return v(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),L=(E.addRules([k,{name:"common/symbols/cf",handler:function(e){var t=new RegExp('(^|[\\s(\\[+\u2248\xb1\u2212\u2014\u2013\\-])(\\d+(?:[.,]\\d+)?)[ \xa0\u2009]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(t,"$1$2\u2009\xb0$3$4")}},{name:"common/symbols/copy",handler:function(e){return v(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}]),{name:"en-US/dash/main",index:"-5",handler:function(e){var t=c["common/dash"],n="[ ".concat("\xa0","]"),r="[ ".concat("\xa0","\n]"),n=new RegExp("".concat(n,"(").concat(t,")(").concat(r,")"),"g");return e.replace(n,"".concat("\xa0").concat("\u2014","$2"))}}),D=(E.addRules([L]),{name:"ru/dash/centuries",handler:function(e,t){var n=new RegExp("(X|I|V)[ |\xa0]?"+("("+c["common/dash"]+")")+"[ |\xa0]?(X|I|V)","g");return e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),S=(E.addRules([D,{name:"ru/dash/daysMonth",handler:function(e,t){var n=new RegExp("(^|\\s)([123]?\\d)("+c["common/dash"]+")([123]?\\d)[ \xa0]("+c["ru/monthGenCase"]+")","g");return e.replace(n,"$1$2"+t.dash+"$4\xa0$5")},settings:{dash:"\u2013"}},{name:"ru/dash/de",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+c["ru/dashAfterDe"],"g");return e.replace(t,"$1-\u0434\u0435")},disabled:!0},{name:"ru/dash/decade",handler:function(e,t){var n=new RegExp("(^|\\s)(\\d{3}|\\d)0("+c["common/dash"]+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(n,"$1$20"+t.dash+"$40$5")},settings:{dash:"\u2013"}},{name:"ru/dash/directSpeech",handler:function(e){var t=c["common/dash"],n=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('.concat(t,")[ |\xa0]"),"g"),r=new RegExp("(^|".concat(d,")(").concat(t,")( |\xa0)"),"gm"),t=new RegExp("([.\u2026?!])[ \xa0](".concat(t,")[ \xa0]"),"g");return e.replace(n,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(t,"$1 \u2014\xa0")}},{name:"ru/dash/izpod",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2\u0437-\u043f\u043e\u0434")}},{name:"ru/dash/izza",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u0437\u0430"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2\u0437-\u0437\u0430")}},{name:"ru/dash/ka",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+c["ru/dashAfter"],"g");return e.replace(t,"$1-\u043a\u0430$2")}},{name:"ru/dash/koe",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var t=new RegExp("([ \xa0])("+c["common/dash"]+")([ \xa0\\n])","g");return e.replace(t,"\xa0\u2014$3")}},{name:"ru/dash/month",handler:function(e,t){var n="("+c["ru/month"]+")",r="("+c["ru/monthPreCase"]+")",a=c["common/dash"],n=new RegExp(n+" ?("+a+") ?"+n,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+t.dash+"$3";return e.replace(n,r).replace(a,r)},settings:{dash:"\u2013"}},{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")}},{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)"+c["ru/dashAfter"],"g");return e.replace(t,"$1-$2")}},{name:"ru/dash/time",handler:function(e,t){var n=new RegExp(c["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+c["common/dash"]+"(\\d?\\d:[0-5]\\d)"+c["ru/dashAfter"],"g");return e.replace(n,"$1$2"+t.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/to",handler:function(e){var t=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041e\u043e]\u0442\u043a\u0443\u0434\u0430|[\u041a\u043a]\u0443\u0434\u0430|[\u0413\u0433]\u0434\u0435|[\u041a\u043a]\u043e\u0433\u0434\u0430|[\u0417\u0437]\u0430\u0447\u0435\u043c|[\u041f\u043f]\u043e\u0447\u0435\u043c\u0443|[\u041a\u043a]\u0430\u043a|[\u041a\u043a]\u0430\u043a\u043e[\u0435\u0439\u043c]|[\u041a\u043a]\u0430\u043a\u0430\u044f|[\u041a\u043a]\u0430\u043a\u0438[\u0435\u043c\u0445]|[\u041a\u043a]\u0430\u043a\u0438\u043c\u0438|[\u041a\u043a]\u0430\u043a\u0443\u044e|[\u0427\u0447]\u0442\u043e|[\u0427\u0447]\u0435\u0433\u043e|[\u0427\u0447]\u0435[\u0439\u043c]|[\u0427\u0447]\u044c\u0438\u043c?|[\u041a\u043a]\u0442\u043e|[\u041a\u043a]\u043e\u0433\u043e|[\u041a\u043a]\u043e\u043c\u0443|[\u041a\u043a]\u0435\u043c)( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+c["ru/dashAfter"],"g");return e.replace(t,function(e,t,n,r,a){r=n+r+a;return"\u043a\u0430\u043a \u0442\u043e"===r||"\u041a\u0430\u043a \u0442\u043e"===r?e:t+n+"-"+a})}},{name:"ru/dash/kakto",handler:function(e){var t=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041a\u043a]\u0430\u043a) \u0442\u043e"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2-\u0442\u043e")}},{name:"ru/dash/weekday",handler:function(e,t){var n="("+c["ru/weekday"]+")",n=new RegExp(n+" ?("+c["common/dash"]+") ?"+n,"gi");return e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/years",handler:function(e,i){var t=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+c["common/dash"]+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(t,function(e,t,n,r,a){return parseInt(n,10)<parseInt(a,10)?t+n+i.dash+a:e})},settings:{dash:"\u2013"}}]),"(-|\\.|\\/)"),q="(-|\\/)",se=new RegExp("(^|\\D)(\\d{4})"+S+"(\\d{2})"+S+"(\\d{2})(\\D|$)","gi"),ue=new RegExp("(^|\\D)(\\d{2})"+q+"(\\d{2})"+q+"(\\d{4})(\\D|$)","gi"),T=(E.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(se,"$1$6.$4.$2$7").replace(ue,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var t=new RegExp("(\\d)( |\xa0)("+c["ru/monthGenCase"]+"),( |\xa0)("+c["ru/weekday"]+")","gi");return e.replace(t,function(e,t,n,r,a,i){return t+n+r.toLowerCase()+","+a+i.toLowerCase()})}}]),{name:"ru/money/currency",handler:function(e){var t="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",n=new RegExp("(^|[\\D]{2})"+t+" ?("+h+"([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),t=new RegExp("(^|[\\D])("+h+") ?"+t,"gm");return e.replace(n,function(e,t,n,r,a,i,o,s){return t+r+(s?"\xa0"+s:"")+"\xa0"+n}).replace(t,"$1$2\xa0$4")},disabled:!0});function le(e,t,n,r){return"\u0434\u0434"===n&&"\u043c\u043c"===r||-1<["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)?e:t+n+".\xa0"+r+"."}E.addRules([T,{name:"ru/money/ruble",handler:function(e){var t="$1\xa0\u20bd",n="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",r=new RegExp("^"+n+"$","g"),a=new RegExp(n+"(?=[!?,:;])","g"),n=new RegExp(n+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(r,t).replace(a,t).replace(n,t+".")},disabled:!0}]);var ce={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""};E.addRules([{name:"ru/nbsp/abbr",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\."),"g");return e.replace(t,le).replace(t,le)}},{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")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var t="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",n=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+t+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),t=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+t+"[ \xa0]","g");return e.replace(n,"$1\xa0$2").replace(t,"$1\xa0$2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var t=c["common/dash"],n="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',a=new RegExp(n+"[ \xa0]?\u0432\\.?"+r,"gm"),n=new RegExp(n+"("+t+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(a,"$1$2\xa0\u0432.").replace(n,"$1$2$3$4\xa0\u0432\u0432.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var t=new RegExp("(\\d{1,2}) ("+c["ru/shortMonth"]+")","gi");return e.replace(t,"$1\xa0$2")}},{name:"ru/nbsp/initials",handler:function(e){var t=new RegExp("(^|[(\xa0\u202f "+c["ru/quote"].left+d+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)',"gm");return e.replace(t,"$1$2.\xa0$3.\xa0$4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var t=new RegExp("(^|[\\s,.\\(\uf000])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s\\).!?,;\uf000]|$)","gm");return e.replace(t,function(e,t,n,r,a,i){return t+n+"\xa0"+r+ce[a||""]+("\xa0"===i?" ":i)})}},{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")}},{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")}},{name:"ru/nbsp/page",handler:function(e){var t=new RegExp("(^|[)\\s\uf000])(\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")}},{name:"ru/nbsp/ps",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? "),"gim");return e.replace(t,function(e,t,n){return t+(n?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}},{name:"ru/nbsp/see",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(t,function(e,t,n,r,a){return("\xa0"===t?" ":t)+n+".\xa0"+r+a})}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var t=new RegExp("(^|\\D)(\\d{4})("+c["common/dash"]+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(t,"$1$2$3$4\xa0\u0433\u0433.")}}]);function I(e,t){t=new RegExp('<span class="('+t.join("|")+')">([^]*?)</span>',"g");return e.replace(t,"$2")}function z(e,t){return e.replace(/<title>[^]*?<\/title>/i,function(e){return I(e,t)})}E.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,t,n){n=n.getData("char"),n=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)(?!["+n+"])","g");return e.replace(n,function(e,t,n){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"}[n]})}}]);var pe=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],B="ru/optalign/bracket",ne={name:B,queue:"start",handler:function(e){return I(e,pe)},htmlAttrs:!1},k={name:B,queue:"end",handler:function(e){return z(e,pe)},htmlAttrs:!1},ge=["typograf-oa-comma","typograf-oa-comma-sp"],L="ru/optalign/comma",D={name:L,queue:"start",handler:function(e){return I(e,ge)},htmlAttrs:!1},S={name:L,queue:"end",handler:function(e){return z(e,ge)},htmlAttrs:!1},he=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],q="ru/optalign/quote",T={name:q,queue:"start",handler:function(e){return I(e,he)},htmlAttrs:!1},fe={name:q,queue:"end",handler:function(e){return z(e,he)},htmlAttrs:!1},C=(E.addRules([{name:B,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},{name:L,handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(["+n+"\\d\u0301]+), ","gi");return e.replace(n,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:q,handler:function(e){var t=this.getSetting("common/punctuation/quote","ru"),t="(["+t.left[0]+(t.left[1]||"")+"])",n=new RegExp("(^|\n\n|\uf000)("+t+")","g"),t=new RegExp("([^\n\uf000])([ \xa0\n])("+t+")","gi");return e.replace(n,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1}]),E.addInnerRules([ne,k,D,S,T,fe]),[]);function de(e){var t,n,r=e[0],a="";if(e.length<8)return me(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;t=!0,e=e.substr(2)}else"8"===r&&(n=!0,e=e.substr(1));for(var i=8;2<=i;i--){var o=+e.substr(0,i);if(-1<C.indexOf(o)){a=e.substr(0,i),e=e.substr(i);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(t?"+7\xa0":"")+(n?"8\xa0":"")+function(e){var t=+e,n=e.length,r=[e],a=!1;if(3<n)switch(n){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 a=900<t&&t<=999||495==t||499==t;n=r.join("-");return a?n:"("+n+")"}(a)+"\xa0"+me(e)}function me(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 $e(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,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,"39131-39179","39190-39199",391,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("-"),n=+t[0];n<=+t[1];n++)C.push(n);else C.push(e)});E.addRules([{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,n,r){return t+n.toLowerCase()+"\u0301"+r})},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var t=new RegExp("(^|,| |\uf000)(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|\uf000|$)","gm");return e.replace(t,function(e,t,n){n=$e(n);return 12===n.length?t+de(n):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,n,r,a){a=$e(a);return 5<=a.length?t+n+r+de(a):e})}}]);var B={name:"ru/punctuation/ano",handler:function(e){var t=new RegExp(["([^\xab\u201e[(!?,:;\\-\u2012\u2013\u2014\\s\uf000])","(?<!([^\u0430-\u044f\u0410-\u042f]+\u043d\u0443|\u041d\u0443))","(\\s+)","(\u0430|\u043d\u043e)","(?= |\xa0|\\n)"].join(""),"g");return e.replace(t,"$1,$3$4")}},be=(E.addRules([B,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var t=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(t,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),E.addRules([{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")}},{name:"ru/space/year",handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+n+"]|$)","g");return e.replace(n,"$1$2 $3$5")}}]),E.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}]),{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"}),xe=Object.keys(be).join("");return E.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var t=new RegExp("(["+xe+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return e.replace(t,function(e,t){for(var n="",r=0;r<t.length;r++)n+=be[t[r]];return n})}}]),E});
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Typograf=t()}(this,function(){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function n(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||((r=r||Array.prototype.slice.call(t,0,a))[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var P=[["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]],e=[["nbsp",160],["thinsp",8201],["ensp",8194],["emsp",8195],["shy",173],["zwnj",8204],["zwj",8205],["lrm",8206],["rlm",8207]];function t(){var t=this;this.entities=this.prepareEntities(n(n([],P,!0),e,!0)),this.entitiesByName={},this.entitiesByNameEntity={},this.entitiesByDigitEntity={},this.entitiesByUtf={},this.entities.forEach(function(e){t.entitiesByName[e.name]=e,t.entitiesByNameEntity[e.nameEntity]=e,t.entitiesByDigitEntity[e.digitEntity]=e,t.entitiesByUtf[e.utf]=e}),this.invisibleEntities=this.prepareEntities(e)}t.prototype.toUtf=function(e){var n=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=n.entitiesByNameEntity[e];return t?t.utf:e}))},t.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))})},t.prototype.restore=function(e){var t=e.prefs.htmlEntity,n=t.type,r=this.entities;"name"!==n&&"digit"!==n||((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,"name"===n?"nameEntity":"digitEntity",r))},t.prototype.getByUtf=function(e,t){var n;switch(t){case"digit":n=this.entitiesByDigitEntity[e];break;case"name":n=this.entitiesByNameEntity[e];break;default:n=e}return n},t.prototype.prepareEntities=function(e){var r=[];return e.forEach(function(e){var t=e[0],e=e[1],n=String.fromCharCode(e);r.push({name:t,nameEntity:"&"+t+";",digitEntity:"&#"+e+";",utf:n,reName:new RegExp("&"+t+";","g"),reUtf:new RegExp(n,"g")})}),r},t.prototype.prepareListParam=function(e){var t=this,n=[];return e.forEach(function(e){e=t.entitiesByName[e];e&&n.push(e)}),n},t.prototype.restoreEntitiesByIndex=function(t,n,e){return e.forEach(function(e){t=t.replace(e.reUtf,e[n])}),t};var o=new t,a=[];function i(e){e=(e||"").split("/")[0];e&&"common"!==e&&!s(e)&&(a.push(e),a.sort())}function s(e){return"common"===e||-1!==a.indexOf(e)}function u(e,t){e=e||t;return e?Array.isArray(e)?e:[e]:[]}function l(e){if(!e.length)throw Error('Not defined the property "locale".');e.forEach(function(e){if(!s(e))throw Error('"'.concat(e,'" is not supported locale.'))})}var c={};function N(e){return c[e]}function p(t){Object.keys(t).forEach(function(e){i(e),c[e]=t[e]})}var j=["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"],g=new RegExp("(https?|file|ftp)://([a-zA-Z0-9/+-=%&:_.~?]+[a-zA-Z0-9#+]*)","g"),h="\\d+([.,]\\d+)?",O=/\d/;function f(e){return-1<e.search(O)}var d="\uf000",m="\uf001",M=($.prototype.add=function(e){this.tags.own.push(this.prepareRegExp(e))},$.prototype.show=function(t,n){for(var e=new RegExp("\uf000tf\\d+\uf000","g"),r=new RegExp("\uf000tf\\d"),a=function(e){return t.safeTags.hidden[n][e]||e},i=0,o=this.tags[n].length;i<o&&(t.text=t.text.replace(e,a),-1!==t.text.search(r));i++);},$.prototype.hide=function(t,e){var n=this,r=(t.safeTags.hidden[e]={},this.pasteLabel.bind(this,t,e));this.tags[e].forEach(function(e){t.text=t.text.replace(n.prepareRegExp(e),r)})},$.prototype.hideHTMLTags=function(e){var t;e.isHTML&&(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))},$.prototype.getPrevLabel=function(e,t){for(var n=t-1;0<=n;n--)if(e[n]===d)return e.slice(n,t+1);return""},$.prototype.getNextLabel=function(e,t){for(var n=t+1;n<e.length;n++)if(e[n]===d)return e.slice(t,n+1);return""},$.prototype.getTagByLabel=function(n,r){var a=null;return this.groups.some(function(e){var t=n.safeTags.hidden[e][r];return a=void 0!==t?{group:e,value:t}:a}),a},$.prototype.getTagInfo=function(e){if(!e)return null;var t={group:e.group};switch(e.group){case"html":t.name=e.value.split(/[<\s>]/)[1],t.isInline=-1<j.indexOf(t.name),t.isClosing=-1<e.value.search(/^<\//);break;case"url":t.isInline=!0;break;case"own":t.isInline=!1}return t},$.prototype.pasteLabel=function(e,t,n){var e=e.safeTags,r="\uf000tf"+e.counter+d;return e.hidden[t][r]=n,e.counter++,r},$.prototype.prepareRegExp=function(e){var t,n;return e instanceof RegExp?e:(t=e[0],n=e[1],e=e[2],new RegExp(t+(void 0===e?"[^]*?":e)+n,"gi"))},$.prototype.getPrevTagInfo=function(e,t,n){t=this.getPrevLabel(t,n-1);if(t){n=this.getTagByLabel(e,t);if(n)return this.getTagInfo(n)}return null},$.prototype.getNextTagInfo=function(e,t,n){t=this.getNextLabel(t,n+1);if(t){n=this.getTagByLabel(e,t);if(n)return this.getTagInfo(n)}return null},$);function $(){this.groups=["own","html","url"],this.hidden={},this.counter=0;var t=[["\x3c!--","--\x3e"],["<!ENTITY",">"],["<!DOCTYPE",">"],["<\\?xml","\\?>"],["<!\\[CDATA\\[","\\]\\]>"]];["code","kbd","object","pre","samp","script","style","var"].forEach(function(e){t.push(["<".concat(e,"(\\s[^>]*?)?>"),"</".concat(e,">")])}),this.tags={own:[],html:t.map(this.prepareRegExp),url:[g]}}function b(e,t){for(var n="";1==(1&t)&&(n+=e),0!=(t>>>=1);)e+=e;return n}function x(e){return e.replace(/\u00A0/g," ")}function v(e,t){for(var n=0;n<t.length;n++)e=e.replace(t[n][0],t[n][1]);return e}function U(e){return-1!==e.search(/(<\/?[a-z]|<!|&[lg]t;)/i)}function y(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}var Q={symbols:110,number:150,space:210,dash:310,punctuation:410,nbsp:510,money:710,date:810,other:910,optalign:1010,typo:1110,html:1210},F=0,H="default",W=[],G=[];function R(){var e=n([],W,!0);return e.sort(function(e,t){return e.index>t.index?1:-1}),e}function X(){return n([],G,!0)}function V(e){var t=e.name.split("/"),n=t[0],r=t[1],t=t[2];return{name:e.name,shortName:t,handler:e.handler,queue:e.queue||H,enabled:!0!==e.disabled,locale:n,group:r,index:"number"==typeof(t=e).index?t.index:(n=t.name.split("/")[1],void 0===(n=Q[n])&&(n=F),"string"==typeof t.index?n+parseInt(t.index,10):n),settings:e.settings,live:e.live,htmlAttrs:e.htmlAttrs}}function K(e){return{type:(null==e?void 0:e.type)||"default",list:null==e?void 0:e.list,onlyInvisible:Boolean(null==e?void 0:e.onlyInvisible)}}function Y(e){return e||"LF"}w.addRule=function(e){i((e=V(e=e)).locale),W.push(e)},w.addRules=function(e){var t=this;e.forEach(function(e){t.addRule(e)})},w.addInnerRule=function(e){G.push(V(e))},w.addInnerRules=function(e){var t=this;e.forEach(function(e){t.addInnerRule(e)})},w.getRule=function(t){var n=null;return R().some(function(e){return e.name===t&&(n=e,!0)}),n},w.getRules=R,w.getInnerRules=X,w.getLocales=function(){return a},w.addLocale=function(e){i(e)},w.hasLocale=s,w.setData=function(e){p(e)},w.getData=function(e){return c[e]},w.prototype.execute=function(e,t){var n;return(e=""+e)?(n=this.prefs,t=t,n=r({},n),t&&("locale"in t&&(n.locale=u(t.locale)),"htmlEntity"in t&&(n.htmlEntity=K(t.htmlEntity)),"lineEnding"in t&&(n.lineEnding=Y(t.lineEnding)),"processingSeparateParts"in t&&(n.processingSeparateParts=t.processingSeparateParts),"ruleFilter"in t)&&(n.ruleFilter=t.ruleFilter),l((t=n).locale),n=this.prepareContext(e,t),this.process(n)):""},w.prototype.getSetting=function(e,t){return this.settings[e]&&this.settings[e][t]},w.prototype.setSetting=function(e,t,n){this.settings[e]=this.settings[e]||{},this.settings[e][t]=n},w.prototype.isEnabledRule=function(e){return!1!==this.enabledRules[e]},w.prototype.isDisabledRule=function(e){return!this.enabledRules[e]},w.prototype.enableRule=function(e){return this.enable(e,!0)},w.prototype.disableRule=function(e){return this.enable(e,!1)},w.prototype.addSafeTag=function(e,t,n){e=e instanceof RegExp?e:[e,t,n];this.safeTags.add(e)},w.prototype.prepareContext=function(e,n){return{text:e,isHTML:U(e),prefs:n,getData:function(t){return"char"===t?n.locale.map(function(e){return c[e+"/"+t]}).join(""):N(n.locale[0]+"/"+t)},safeTags:this.safeTags}},w.prototype.splitBySeparateParts=function(a){var i,e,o;return a.isHTML&&!1!==a.prefs.processingSeparateParts?(i=[],e=new RegExp("<("+this.separatePartsTags.join("|")+")(\\s[^>]*?)?>[^]*?</\\1>","gi"),o=0,a.text.replace(e,function(e,t,n,r){return o!==r&&i.push((o?m:"")+a.text.slice(o,r)+m),i.push(e),o=r+e.length,e}),i.push(o?m+a.text.slice(o,a.text.length):a.text),i):[a.text]},w.prototype.process=function(t){var e,n=this,r=(t.text=t.text.replace(/\r\n?/g,"\n"),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"),t.isHTML),a=new RegExp(m,"g");return t.text=this.splitBySeparateParts(t).map(function(e){return t.text=e,t.isHTML=U(e),n.safeTags.hideHTMLTags(t),n.safeTags.hide(t,"url"),n.executeRules(t,"hide-safe-tags-url"),n.executeRules(t,"hide-safe-tags"),o.toUtf(t),t.prefs.live&&(t.text=x(t.text)),n.executeRules(t,"utf"),n.executeRules(t),o.restore(t),n.executeRules(t,"html-entities"),n.safeTags.show(t,"url"),n.executeRules(t,"show-safe-tags-url"),t.text.replace(a,"")}).join(""),t.isHTML=r,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"),r=t.text,"CRLF"===(e=t.prefs.lineEnding)?r.replace(/\n/g,"\r\n"):"CR"===e?r.replace(/\n/g,"\r"):r},w.prototype.executeRules=function(t,e){var n=this,r=this.rulesByQueues[e=void 0===e?H:e],e=this.innerRulesByQueues[e];e&&e.forEach(function(e){n.ruleIterator(t,e)}),r&&r.forEach(function(e){n.ruleIterator(t,e)})},w.prototype.ruleIterator=function(e,t){!0===e.prefs.live&&!1===t.live||!1===e.prefs.live&&!0===t.live||"common"!==t.locale&&t.locale!==e.prefs.locale[0]||!this.isEnabledRule(t.name)||e.prefs.ruleFilter&&!e.prefs.ruleFilter(t)||(this.onBeforeRule&&this.onBeforeRule(t.name,e),e.text=t.handler.call(this,e.text,this.settings[t.name],e),this.onAfterRule&&this.onAfterRule(t.name,e))},w.prototype.prepareRuleSettings=function(e){this.settings[e.name]=y(e.settings),this.enabledRules[e.name]=e.enabled},w.prototype.enable=function(e,t){var n=this;Array.isArray(e)?e.forEach(function(e){n.enableByMask(e,t)}):this.enableByMask(e,t)},w.prototype.enableByMask=function(e,t){var n,r=this;e&&(-1!==e.search(/\*/)?(n=new RegExp(e.replace(/\//g,"\\/").replace(/\*/g,".*")),this.rules.forEach(function(e){e=e.name;n.test(e)&&(r.enabledRules[e]=t)})):this.enabledRules[e]=t)},w.groups=[],w.titles={},w.version="7.4.1";var E=w;function w(e){var t=this;this.rules=[],this.innerRules=[],this.rulesByQueues={},this.innerRulesByQueues={},this.separatePartsTags=["title","p","h[1-6]","select","legend"],this.prefs={locale:u((e=e).locale),lineEnding:Y(e.lineEnding),live:Boolean(e.live),ruleFilter:e.ruleFilter,enableRule:e.enableRule,disableRule:e.disableRule,processingSeparateParts:e.processingSeparateParts,htmlEntity:K(e.htmlEntity)},l(this.prefs.locale),this.safeTags=new M,this.settings={},this.enabledRules={},this.innerRulesByQueues={},this.innerRules=X(),this.innerRules.forEach(function(e){t.innerRulesByQueues[e.queue]=t.innerRulesByQueues[e.queue]||[],t.innerRulesByQueues[e.queue].push(e)}),this.rulesByQueues={},this.rules=R(),this.rules.forEach(function(e){t.prepareRuleSettings(e),t.rulesByQueues[e.queue]=t.rulesByQueues[e.queue]||[],t.rulesByQueues[e.queue].push(e)}),this.prefs.disableRule&&this.disableRule(this.prefs.disableRule),this.prefs.enableRule&&this.enableRule(this.prefs.enableRule)}[{"common/char":"a-z","common/dash":"--?|\u2012|\u2013|\u2014","common/quote":'\xab\u2039\xbb\u203a\u201e\u201c\u201f\u201d"'},{"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","be/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"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","bg/quote":{left:"\u201e\u2019",right:"\u201c\u2019"}},{"ca/char":"abcdefghijlmnopqrstuvxyz\xe0\xe7\xe8\xe9\xed\xef\xf2\xf3\xfa\xfc","ca/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"cs/char":"a-z\xe1\xe9\xed\xf3\xfa\xfd\u010d\u010f\u011b\u0148\u0159\u0161\u0165\u016f\u017e","cs/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"da/char":"a-z\xe5\xe6\xf8","da/quote":{left:"\xbb\u203a",right:"\xab\u2039"}},{"de/char":"a-z\xdf\xe4\xf6\xfc","de/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"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","el/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"en-GB/char":"a-z","en-GB/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"en-US/char":"a-z","en-US/quote":{left:"\u201c\u2018",right:"\u201d\u2019"},"en-US/shortWord":"a|an|and|as|at|bar|but|by|for|if|in|nor|not|of|off|on|or|out|per|pro|so|the|to|up|via|yet"},{"eo/char":"abcdefghijklmnoprstuvz\u0109\u011d\u0125\u0135\u015d\u016d","eo/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"es/char":"a-z\xe1\xe9\xed\xf1\xf3\xfa\xfc","es/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"et/char":"abdefghijklmnoprstuvz\xe4\xf5\xf6\xfc\u0161\u017e","et/quote":{left:"\u201e\xab",right:"\u201c\xbb"}},{"fi/char":"abcdefghijklmnopqrstuvy\xf6\xe4\xe5","fi/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"fr/char":"a-z\xe0\xe2\xe7\xe8\xe9\xea\xeb\xee\xef\xf4\xfb\xfc\u0153\xe6","fr/quote":{left:"\xab\u2039",right:"\xbb\u203a",spacing:!0}},{"ga/char":"abcdefghilmnoprstuvwxyz\xe1\xe9\xed\xf3\xfa","ga/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"hu/char":"a-z\xe1\xe4\xe9\xed\xf3\xf6\xfa\xfc\u0151\u0171","hu/quote":{left:"\u201e\xbb",right:"\u201d\xab"}},{"it/char":"a-z\xe0\xe9\xe8\xec\xf2\xf9","it/quote":{left:"\xab\u201c",right:"\xbb\u201d"}},{"lv/char":"abcdefghijklmnopqrstuvxz\xe6\u0153","lv/quote":{left:"\xab\u201e",right:"\xbb\u201c"}},{"nl/char":"a-z\xe4\xe7\xe8\xe9\xea\xeb\xee\xef\xf1\xf6\xfb\xfc","nl/quote":{left:"\u2018\u201c",right:"\u2019\u201d"}},{"no/char":"a-z\xe5\xe6\xe8\xe9\xea\xf2\xf3\xf4\xf8","no/quote":{left:"\xab\u2019",right:"\xbb\u2019"}},{"pl/char":"abcdefghijklmnoprstuvwxyz\xf3\u0105\u0107\u0119\u0142\u0144\u015b\u017a\u017c","pl/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ro/char":"abcdefghijklmnoprstuvxz\xee\u0103\u0219\u021b","ro/quote":{left:"\u201e\xab",right:"\u201d\xbb"}},{"ru/char":"\u0430-\u044f\u0451","ru/dashBefore":"(^| |\\n)","ru/dashAfter":"(?=[\xa0 ,.?:!]|$)","ru/dashAfterDe":"(?=[,.?:!]|[\xa0 ][^\u0410-\u042f\u0401]|$)","ru/l":"\u0430-\u044f\u0451a-z","ru/L":"\u0410-\u042f\u0401A-Z","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/quote":{left:"\xab\u201e\u201a",right:"\xbb\u201c\u2018",removeDuplicateQuotes:!0},"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","ru/shortWord":"\u0430|\u0431\u044b|\u0432|\u0432\u043e|\u0434\u0430|\u0434\u043e|\u0436\u0435|\u0437\u0430|\u0438|\u0438\u0437|\u043a|\u043a\u043e|\u043b\u0438|\u043d\u0430|\u043d\u0435|\u043d\u0438|\u043d\u043e|\u043e|\u043e\u0431|\u043e\u0442|\u043f\u043e|\u0441|\u0441\u043e|\u0442\u043e|\u0443","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"},{"sk/char":"abcdefghijklmnoprstuvwxyz\xe1\xe4\xe9\xed\xf3\xf4\xfa\xfd\u010d\u010f\u013e\u0148\u0155\u0161\u0165\u017e","sk/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sl/char":"a-z\u010d\u0161\u017e","sl/quote":{left:"\u201e\u201a",right:"\u201c\u2018"}},{"sr/char":"abcdefghijklmnoprstuvz\u0107\u010d\u0111\u0161\u017e","sr/quote":{left:"\u201e\u2019",right:"\u201d\u2019"}},{"sv/char":"a-z\xe4\xe5\xe9\xf6","sv/quote":{left:"\u201d\u2019",right:"\u201d\u2019"}},{"tr/char":"abcdefghijklmnoprstuvyz\xe2\xe7\xee\xf6\xfb\xfc\u011f\u0131\u015f","tr/quote":{left:"\u201c\u2018",right:"\u201d\u2019"}},{"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","uk/quote":{left:"\xab\u201e",right:"\xbb\u201c"}}].forEach(p);var Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},q={name:"common/html/escape",index:"+100",queue:"end",handler:function(e){return e.replace(/[&<>"'/]/g,function(e){return Z[e]})},disabled:!0},J=new RegExp("<("+["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"].join("|")+")[>\\s]"),q=(E.addRules([{name:"common/html/e-mail",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.replace(/(^|[\s;(])([\w\-.]{2,64})@([\w\-.]{2,64})\.([a-z]{2,64})([)\s.,!?]|$)/gi,'$1<a href="mailto:$2@$3.$4">$2@$3.$4</a>$5')},disabled:!0,htmlAttrs:!1},q,{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},{name:"common/html/p",index:"+5",queue:"end",handler:function(e){e=e.split("\n\n");return e.forEach(function(e,t,n){!e.trim()||J.test(e)||(n[t]=e.replace(/^(\s*)/,"$1<p>").replace(/(\s*)$/,"</p>$1"))}),e.join("\n\n")},disabled:!0,htmlAttrs:!1},{name:"common/html/processingAttrs",queue:"hide-safe-tags-own",handler:function(e,t,n){var o=this,r=new RegExp("(^|\\s)("+t.attrs.join("|")+")=(\"[^\"]*?\"|'[^']*?')","gi"),s=y(n.prefs);return s.ruleFilter=function(e){return!1!==e.htmlAttrs},e.replace(/(<[-\w]+\s)([^>]+?)(?=>)/g,function(e,t,n){return t+n.replace(r,function(e,t,n,r){var a=r[0],i=r[r.length-1],r=r.slice(1,-1);return t+n+"="+a+o.execute(r,s)+i})})},settings:{attrs:["title","placeholder"]},disabled:!0,htmlAttrs:!1},{name:"common/html/quot",queue:"hide-safe-tags",handler:function(e){return e.replace(/&quot;/g,'"')}},{name:"common/html/stripTags",index:"+99",queue:"end",handler:function(e){return e.replace(/<[^>]+>/g,"")},disabled:!0},{name:"common/html/url",queue:"end",handler:function(e,t,n){return n.isHTML?e:e.replace(g,function(e,t,n){n=n.replace(/([^/]+\/?)(\?|#)$/,"$1").replace(/^([^/]+)\/$/,"$1"),"http"===t?n=n.replace(/^([^/]+)(:80)([^\d]|\/|$)/,"$1$3"):"https"===t&&(n=n.replace(/^([^/]+)(:443)([^\d]|\/|$)/,"$1$3"));var r=n,n=t+"://"+n,a='<a href="'+n+'">';return"http"===t||"https"===t?(r=r.replace(/^www\./,""),a+("http"===t?r:t+"://"+r)+"</a>"):a+n+"</a>"})},disabled:!0,htmlAttrs:!1}]),{name:"common/nbsp/afterNumber",handler:function(e,t,n){n=n.getData("char");return e.replace(new RegExp("(^|\\s)(\\d{1,5}) (["+n+"]+)","gi"),"$1$2\xa0$3")},disabled:!0});function _(e,t,n,r){return t+n.replace(/([^\u00A0])\u00A0([^\u00A0])/g,"$1 $2")+r}E.addRules([q,{name:"common/nbsp/afterParagraphMark",handler:function(e){return e.replace(/\xb6 ?(?=\d)/g,"\xb6\xa0")}},{name:"common/nbsp/afterSectionMark",handler:function(e,t,n){n=n.prefs.locale[0];return e.replace(/\xa7[ \u00A0\u2009]?(?=\d|I|V|X)/g,"ru"===n?"\xa7\u202f":"\xa7\xa0")}},{name:"common/nbsp/afterShortWord",handler:function(e,t,n){var r=t.lengthShortWord,t=t.useShortWordList,a=c["common/quote"],i=n.getData("char"),n=n.getData("shortWord"),a=" \xa0(\uf000"+a,t=new RegExp(t&&void 0!==n?"(^|["+a+"])("+n+") ":"(^|["+a+"])(["+i+"]{1,"+r+"}) ","gim");return e.replace(t,"$1$2\xa0").replace(t,"$1$2\xa0")},settings:{lengthShortWord:2,useShortWordList:!1}},{name:"common/nbsp/beforeShortLastNumber",handler:function(e,t,n){var r=n.getData("quote"),n=n.getData("char"),a=n.toUpperCase(),n=new RegExp("(["+n+a+"]) (?=\\d{1,"+t.lengthLastNumber+"}[-+\u2212%'\""+r.right+")]?([.!?\u2026]( ["+a+"]|$)|$))","gm");return e.replace(n,"$1\xa0")},live:!1,settings:{lengthLastNumber:2}},{name:"common/nbsp/beforeShortLastWord",handler:function(e,t,n){var n=n.getData("char"),r=n.toUpperCase(),n=new RegExp("(["+n+"\\d]) (["+n+r+"]{1,"+t.lengthLastWord+"}[.!?\u2026])( ["+r+"]|$)","g");return e.replace(n,"$1\xa0$2$3")},settings:{lengthLastWord:3}},{name:"common/nbsp/dpi",handler:function(e){return e.replace(/(\d) ?(lpi|dpi)(?!\w)/,"$1\xa0$2")}},{name:"common/nbsp/nowrap",queue:"end",handler:function(e){return e.replace(/(<nowrap>)(.*?)(<\/nowrap>)/g,_).replace(/(<nobr>)(.*?)(<\/nobr>)/g,_)}},{name:"common/nbsp/replaceNbsp",queue:"utf",live:!1,handler:x,disabled:!0}]);q={name:"common/number/digitGrouping",index:"310",disabled:!0,handler:function(e,a){return e.replace(new RegExp("(^ ?|\\D |".concat(d,")(\\d{1,3}([ \xa0\u202f\u2009]\\d{3})+)(?! ?[\\d-])"),"gm"),function(e,t,n){return t+n.replace(/\s/g,a.space)}).replace(/(\d{5,}([.,]\d+)?)/g,function(e,t){var n=t.match(/[.,]/),t=n?t.split(n):[t],r=t[0],t=t[1],r=r.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1"+a.space);return n?r+n+t:r})},settings:{space:"\u202f"}},E.addRules([q,{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")}},{name:"common/number/mathSigns",handler:function(e){return v(e,[[/!=/g,"\u2260"],[/<=/g,"\u2264"],[/(^|[^=])>=/g,"$1\u2265"],[/<=>/g,"\u21d4"],[/<</g,"\u226a"],[/>>/g,"\u226b"],[/~=/g,"\u2245"],[/(^|[^+])\+-/g,"$1\xb1"]])}},{name:"common/number/times",handler:function(e){return e.replace(/(\d)[ \u00A0]?[x\u0445][ \u00A0]?(\d)/g,"$1\xd7$2")}}]),E.addRules([{name:"common/other/delBOM",queue:"start",index:-1,handler:function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}},{name:"common/other/repeatWord",handler:function(e,t,n){var r=c["common/quote"],n=n.getData("char"),r="[;:,.?! \n"+r+"]",n=new RegExp("("+r+"|^)(["+n+"]{"+t.min+",}) \\2("+r+"|$)","gi");return e.replace(n,"$1$2$3")},settings:{min:2},disabled:!0}]),q={name:"common/punctuation/apostrophe",handler:function(e,t,n){n="(["+n.getData("char")+"])",n=new RegExp(n+"'"+n,"gi");return e.replace(n,"$1\u2019$2")}};function A(){this.bufferQuotes={left:"\uf005\uf006\uf007",right:"\uf008\uf009\uf0a0"},this.beforeLeft=" \n\t\xa0[(",this.afterRight=" \n\t\xa0!?.:;#*,\u2026)\\]"}A.prototype.process=function(e){var t,n,r=e.context.text;return this.count(r).total&&(t=e.settings,(n=e.settings.left[0]===e.settings.right[0])&&(e.settings=y(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&&(r=this.removeSpacing(r,e.settings)),r=this.set(r,e),e.settings.spacing&&(r=this.setSpacing(r,e.settings)),e.settings.removeDuplicateQuotes&&(r=this.removeDuplicates(r,e.settings)),n)&&(r=this.returnOriginalQuotes(r,t,e.settings),e.settings=t),r},A.prototype.returnOriginalQuotes=function(e,t,n){for(var r={},a=0;a<n.left.length;a++)r[n.left[a]]=t.left[a],r[n.right[a]]=t.right[a];return e.replace(new RegExp("["+n.left+n.right+"]","g"),function(e){return r[e]})},A.prototype.count=function(e){var t={total:0};return e.replace(new RegExp("["+c["common/quote"]+"]","g"),function(e){return t[e]||(t[e]=0),t[e]++,t.total++,e}),t},A.prototype.removeDuplicates=function(e,t){var n=t.left[0],r=t.left[1]||n,t=t.right[0];return n!==r?e:e.replace(new RegExp(n+n,"g"),n).replace(new RegExp(t+t,"g"),t)},A.prototype.removeSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],i=t.right[n];e=e.replace(new RegExp(a+"([ \u202f\xa0])","g"),a).replace(new RegExp("([ \u202f\xa0])"+i,"g"),i)}return e},A.prototype.setSpacing=function(e,t){for(var n=0,r=t.left.length;n<r;n++){var a=t.left[n],i=t.right[n];e=e.replace(new RegExp(a+"([^\u202f])","g"),a+"\u202f$1").replace(new RegExp("([^\u202f])"+i,"g"),"$1\u202f"+i)}return e},A.prototype.set=function(e,t){var n=c["common/quote"],r=t.settings.left[0],a=t.settings.left[1]||r,i=t.settings.right[0],o=new RegExp("(^|["+this.beforeLeft+"])(["+n+"]+)(?=[^\\s"+d+"])","gim"),n=new RegExp("([^\\s\uf000])(["+n+"]+)(?=["+this.afterRight+"]|$)","gim");return e=e.replace(o,function(e,t,n){return t+b(r,n.length)}).replace(n,function(e,t,n){return t+b(i,n.length)}),e=this.setAboveTags(e,t),e=r!==a?this.setInner(e,t.settings):e},A.prototype.setAboveTags=function(i,o){var s=this,u=o.settings.left[0],l=o.settings.right[0];return i.replace(new RegExp("(^|.)(["+c["common/quote"]+"])(.|$)","gm"),function(e,t,n,r,a){return t!==d&&r!==d?e:t===d&&r===d?'"'===n?t+s.getAboveTwoTags(i,a+1,o)+r:e:t===d?(n=-1<s.afterRight.indexOf(r),e=o.safeTags.getPrevTagInfo(o.context,i,a-1),n&&e&&"html"===e.group?t+(e.isClosing?l:u)+r:t+(!r||n?l:u)+r):(e=-1<s.beforeLeft.indexOf(t),n=o.safeTags.getNextTagInfo(o.context,i,a+1),e&&n&&"html"===n.group?t+(n.isClosing?l:u)+r:t+(!t||e?u:l)+r)})},A.prototype.getAboveTwoTags=function(e,t,n){var r=n.safeTags.getPrevTagInfo(n.context,e,t),a=n.safeTags.getNextTagInfo(n.context,e,t);if(r&&"html"===r.group){if(!r.isClosing)return n.settings.left[0];if(a&&a.isClosing&&r.isClosing)return n.settings.right[0]}return e[t]},A.prototype.setInner=function(e,t){for(var n=t.left[0],r=t.right[0],a=this.getMaxLevel(e,n,r,t.left.length),i=0,o="",s=0,u=e.length;s<u;s++){var l=e[s];l===n?(o+=t.left[a-1<i?a-1:i],a<++i&&(i=a)):l===r?(--i<0&&(i=0),o+=t.right[i]):('"'===l&&(i=0),o+=l)}return o},A.prototype.getMaxLevel=function(e,t,n,r){e=this.count(e);return e[t]===e[n]?r:Math.min(r,2)};var ee=new A,te={},T=(a.forEach(function(e){te[e]=y(c[e+"/quote"])}),{name:"common/punctuation/quote",handler:function(e,t,n){t=t[n.prefs.locale[0]];return t?ee.process({context:n,settings:t,safeTags:this.safeTags}):e},settings:te}),q=(E.addRules([q,{name:"common/punctuation/delDoublePunctuation",handler:function(e){return e.replace(/(^|[^,]),,(?!,)/g,"$1,").replace(/(^|[^:])::(?!:)/g,"$1:").replace(/(^|[^!?.])\.\.(?!\.)/g,"$1.").replace(/(^|[^;]);;(?!;)/g,"$1;").replace(/(^|[^?])\?\?(?!\?)/g,"$1?")}},{name:"common/punctuation/hellip",handler:function(e,t,n){return"ru"===n.prefs.locale[0]?e.replace(/(^|[^.])\.{3,4}(?=[^.]|$)/g,"$1\u2026"):e.replace(/(^|[^.])\.{3}(\.?)(?=[^.]|$)/g,"$1\u2026$2")}},T,{name:"common/punctuation/quoteLink",queue:"show-safe-tags-html",index:"+5",handler:function(e,t,n){var n=this.getSetting("common/punctuation/quote",n.prefs.locale[0]),r=o.getByUtf(n.left[0]),a=o.getByUtf(n.right[0]),i=(i=o.getByUtf(n.left[1]))?"|"+i:"",n=(n=o.getByUtf(n.right[1]))?"|"+n:"",r=new RegExp("(<[aA]\\s[^>]*?>)("+r+i+")([^]*?)("+a+n+")(</[aA]>)","g");return e.replace(r,"$2$1$3$5$4")}}]),{name:"common/space/beforeBracket",handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(["+n+".!?,;\u2026)])\\(","gi");return e.replace(n,"$1 (")}}),T={name:"common/space/delRepeatN",index:"-1",handler:function(e,t){var t=t.maxConsecutiveLineBreaks,n=new RegExp("\n{".concat(t+1,",}"),"g"),t=b("\n",t);return e.replace(n,t)},settings:{maxConsecutiveLineBreaks:2}},B={name:"common/space/trimLeft",index:"-4",handler:String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.replace(/^[\s\uFEFF\xA0]+/g,"")}},ne={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,"")}},re=new RegExp('(\\D):([^)",:.?\\s\\/\\\\\uf000])',"g"),k={name:"common/space/afterColon",handler:function(e){return e.replace(re,"$1: $2")}},L={name:"common/space/afterComma",handler:function(e,t,n){n=n.getData("quote"),n="string"==typeof n?n:n.right;return e.replace(new RegExp('(.),([^)",:.?\\s\\/\\\\\uf000'+n+"])","g"),function(e,t,n){return f(t)&&f(n)?e:t+", "+n})}},ae=new RegExp("\\?([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),D={name:"common/space/afterQuestionMark",handler:function(e){return e.replace(ae,"? $1")}},ie=new RegExp("!([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),S={name:"common/space/afterExclamationMark",handler:function(e){return e.replace(ie,"! $1")}},oe=new RegExp(";([^).\u2026!;?\\s[\\])\uf000"+c["common/quote"]+"])","g"),k=(E.addRules([k,L,D,S,{name:"common/space/afterSemicolon",handler:function(e){return e.replace(oe,"; $1")}},q,{name:"common/space/bracket",handler:function(e){return e.replace(/(\() +/g,"(").replace(/ +\)/g,")")}},{name:"common/space/delBeforeDot",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) (\.|\.\.\.)(\s|$)/g,"$1$2$3")}},{name:"common/space/delBeforePercent",handler:function(e){return e.replace(/(\d)( |\u00A0)(%|\u2030|\u2031)/g,"$1$3")}},{name:"common/space/delBeforePunctuation",handler:function(e){return e.replace(/(^|[^!?:;,.\u2026]) ([!?:;,])(?!\))/g,"$1$2")}},{name:"common/space/delBetweenExclamationMarks",handler:function(e){return e.replace(/([!?]) (?=[!?])/g,"$1")}},{name:"common/space/delLeadingBlanks",handler:function(e){return e.replace(/^[ \t]+/gm,"")},disabled:!0},T,{name:"common/space/delRepeatSpace",index:"-1",handler:function(e){return e.replace(/([^\n \t])[ \t]{2,}(?![\n \t])/g,"$1 ")}},{name:"common/space/delTrailingBlanks",index:"-3",handler:function(e){return e.replace(/[ \t]+\n/g,"\n")}},{name:"common/space/insertFinalNewline",queue:"end",handler:function(e){return"\n"===e[e.length-1]?e:e+"\n"},live:!1,disabled:!0},{name:"common/space/replaceTab",index:"-5",handler:function(e){return e.replace(/\t/g," ")}},{name:"common/space/squareBracket",handler:function(e){return e.replace(/(\[) +/g,"[").replace(/ +\]/g,"]")}},B,ne]),{name:"common/symbols/arrow",handler:function(e){return v(e,[[/(^|[^-])->(?!>)/g,"$1\u2192"],[/(^|[^<])<-(?!-)/g,"$1\u2190"]])}}),L=(E.addRules([k,{name:"common/symbols/cf",handler:function(e){var t=new RegExp('(^|[\\s(\\[+\u2248\xb1\u2212\u2014\u2013\\-])(\\d+(?:[.,]\\d+)?)[ \xa0\u2009]?(C|F)([\\W\\s.,:!?")\\]]|$)',"mg");return e.replace(t,"$1$2\u2009\xb0$3$4")}},{name:"common/symbols/copy",handler:function(e){return v(e,[[/\(r\)/gi,"\xae"],[/(copyright )?\((c|\u0441)\)/gi,"\xa9"],[/\(tm\)/gi,"\u2122"]])}}]),{name:"en-US/dash/main",index:"-5",handler:function(e){var t=c["common/dash"],n="[ ".concat("\xa0","]"),r="[ ".concat("\xa0","\n]"),n=new RegExp("".concat(n,"(").concat(t,")(").concat(r,")"),"g");return e.replace(n,"".concat("\xa0").concat("\u2014","$2"))}}),D=(E.addRules([L]),{name:"ru/dash/centuries",handler:function(e,t){var n=new RegExp("(X|I|V)[ |\xa0]?"+("("+c["common/dash"]+")")+"[ |\xa0]?(X|I|V)","g");return e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}}),S=(E.addRules([D,{name:"ru/dash/daysMonth",handler:function(e,t){var n=new RegExp("(^|\\s)([123]?\\d)("+c["common/dash"]+")([123]?\\d)[ \xa0]("+c["ru/monthGenCase"]+")","g");return e.replace(n,"$1$2"+t.dash+"$4\xa0$5")},settings:{dash:"\u2013"}},{name:"ru/dash/de",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u0434\u0435"+c["ru/dashAfterDe"],"g");return e.replace(t,"$1-\u0434\u0435")},disabled:!0},{name:"ru/dash/decade",handler:function(e,t){var n=new RegExp("(^|\\s)(\\d{3}|\\d)0("+c["common/dash"]+")(\\d{3}|\\d)0(-\u0435[ \xa0])(?=\u0433\\.?[ \xa0]?\u0433|\u0433\u043e\u0434)","g");return e.replace(n,"$1$20"+t.dash+"$40$5")},settings:{dash:"\u2013"}},{name:"ru/dash/directSpeech",handler:function(e){var t=c["common/dash"],n=new RegExp('(["\xbb\u2018\u201c,])[ |\xa0]?('.concat(t,")[ |\xa0]"),"g"),r=new RegExp("(^|".concat(d,")(").concat(t,")( |\xa0)"),"gm"),t=new RegExp("([.\u2026?!])[ \xa0](".concat(t,")[ \xa0]"),"g");return e.replace(n,"$1\xa0\u2014 ").replace(r,"$1\u2014\xa0").replace(t,"$1 \u2014\xa0")}},{name:"ru/dash/izpod",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u043f\u043e\u0434"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2\u0437-\u043f\u043e\u0434")}},{name:"ru/dash/izza",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"(\u0418|\u0438)\u0437 \u0437\u0430"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2\u0437-\u0437\u0430")}},{name:"ru/dash/ka",handler:function(e){var t=new RegExp("([a-\u044f\u0451]+) \u043a\u0430(\u0441\u044c)?"+c["ru/dashAfter"],"g");return e.replace(t,"$1-\u043a\u0430$2")}},{name:"ru/dash/koe",handler:function(e){var t=new RegExp(c["ru/dashBefore"]+"([\u041a\u043a]\u043e[\u0435\u0439])\\s([\u0430-\u044f\u0451]{3,})"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2-$3")}},{name:"ru/dash/main",index:"-5",handler:function(e){var t=new RegExp("([ \xa0])("+c["common/dash"]+")([ \xa0\\n])","g");return e.replace(t,"\xa0\u2014$3")}},{name:"ru/dash/month",handler:function(e,t){var n="("+c["ru/month"]+")",r="("+c["ru/monthPreCase"]+")",a=c["common/dash"],n=new RegExp(n+" ?("+a+") ?"+n,"gi"),a=new RegExp(r+" ?("+a+") ?"+r,"gi"),r="$1"+t.dash+"$3";return e.replace(n,r).replace(a,r)},settings:{dash:"\u2013"}},{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")}},{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)"+c["ru/dashAfter"],"g");return e.replace(t,"$1-$2")}},{name:"ru/dash/time",handler:function(e,t){var n=new RegExp(c["ru/dashBefore"]+"(\\d?\\d:[0-5]\\d)"+c["common/dash"]+"(\\d?\\d:[0-5]\\d)"+c["ru/dashAfter"],"g");return e.replace(n,"$1$2"+t.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/to",handler:function(e){var t=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041e\u043e]\u0442\u043a\u0443\u0434\u0430|[\u041a\u043a]\u0443\u0434\u0430|[\u0413\u0433]\u0434\u0435|[\u041a\u043a]\u043e\u0433\u0434\u0430|[\u0417\u0437]\u0430\u0447\u0435\u043c|[\u041f\u043f]\u043e\u0447\u0435\u043c\u0443|[\u041a\u043a]\u0430\u043a|[\u041a\u043a]\u0430\u043a\u043e[\u0435\u0439\u043c]|[\u041a\u043a]\u0430\u043a\u0430\u044f|[\u041a\u043a]\u0430\u043a\u0438[\u0435\u043c\u0445]|[\u041a\u043a]\u0430\u043a\u0438\u043c\u0438|[\u041a\u043a]\u0430\u043a\u0443\u044e|[\u0427\u0447]\u0442\u043e|[\u0427\u0447]\u0435\u0433\u043e|[\u0427\u0447]\u0435[\u0439\u043c]|[\u0427\u0447]\u044c\u0438\u043c?|[\u041a\u043a]\u0442\u043e|[\u041a\u043a]\u043e\u0433\u043e|[\u041a\u043a]\u043e\u043c\u0443|[\u041a\u043a]\u0435\u043c)( | -|- )(\u0442\u043e|\u043b\u0438\u0431\u043e|\u043d\u0438\u0431\u0443\u0434\u044c)"+c["ru/dashAfter"],"g");return e.replace(t,function(e,t,n,r,a){r=n+r+a;return"\u043a\u0430\u043a \u0442\u043e"===r||"\u041a\u0430\u043a \u0442\u043e"===r?e:t+n+"-"+a})}},{name:"ru/dash/kakto",handler:function(e){var t=new RegExp("(^|[^\u0410-\u042f\u0401\u0430-\u044f\u0451\\w])([\u041a\u043a]\u0430\u043a) \u0442\u043e"+c["ru/dashAfter"],"g");return e.replace(t,"$1$2-\u0442\u043e")}},{name:"ru/dash/weekday",handler:function(e,t){var n="("+c["ru/weekday"]+")",n=new RegExp(n+" ?("+c["common/dash"]+") ?"+n,"gi");return e.replace(n,"$1"+t.dash+"$3")},settings:{dash:"\u2013"}},{name:"ru/dash/years",handler:function(e,i){var t=new RegExp("(\\D|^)(\\d{4})[ \xa0]?("+c["common/dash"]+")[ \xa0]?(\\d{4})(?=[ \xa0]?\u0433)","g");return e.replace(t,function(e,t,n,r,a){return parseInt(n,10)<parseInt(a,10)?t+n+i.dash+a:e})},settings:{dash:"\u2013"}}]),"(-|\\.|\\/)"),q="(-|\\/)",se=new RegExp("(^|\\D)(\\d{4})"+S+"(\\d{2})"+S+"(\\d{2})(\\D|$)","gi"),ue=new RegExp("(^|\\D)(\\d{2})"+q+"(\\d{2})"+q+"(\\d{4})(\\D|$)","gi"),T=(E.addRules([{name:"ru/date/fromISO",handler:function(e){return e.replace(se,"$1$6.$4.$2$7").replace(ue,"$1$4.$2.$6$7")}},{name:"ru/date/weekday",handler:function(e){var t=new RegExp("(\\d)( |\xa0)("+c["ru/monthGenCase"]+"),( |\xa0)("+c["ru/weekday"]+")","gi");return e.replace(t,function(e,t,n,r,a,i){return t+n+r.toLowerCase()+","+a+i.toLowerCase()})}}]),{name:"ru/money/currency",handler:function(e){var t="([$\u20ac\xa5\u04b0\xa3\u20a4\u20bd])",n=new RegExp("(^|[\\D]{2})"+t+" ?("+h+"([ \xa0\u2009\u202f]\\d{3})*)([ \xa0\u2009\u202f]?(\u0442\u044b\u0441\\.|\u043c\u043b\u043d|\u043c\u043b\u0440\u0434|\u0442\u0440\u043b\u043d))?","gm"),t=new RegExp("(^|[\\D])("+h+") ?"+t,"gm");return e.replace(n,function(e,t,n,r,a,i,o,s){return t+r+(s?"\xa0"+s:"")+"\xa0"+n}).replace(t,"$1$2\xa0$4")},disabled:!0});function le(e,t,n,r){return"\u0434\u0434"===n&&"\u043c\u043c"===r||-1<["\u0440\u0444","\u0440\u0443","\u0440\u0443\u0441","\u043e\u0440\u0433","\u0443\u043a\u0440","\u0431\u0433","\u0441\u0440\u0431"].indexOf(r)?e:t+n+".\xa0"+r+"."}E.addRules([T,{name:"ru/money/ruble",handler:function(e){var t="$1\xa0\u20bd",n="(\\d+)( |\xa0)?(\u0440|\u0440\u0443\u0431)\\.",r=new RegExp("^"+n+"$","g"),a=new RegExp(n+"(?=[!?,:;])","g"),n=new RegExp(n+"(?=\\s+[A-\u042f\u0401])","g");return e.replace(r,t).replace(a,t).replace(n,t+".")},disabled:!0}]);var ce={2:"\xb2","\xb2":"\xb2",3:"\xb3","\xb3":"\xb3","":""};E.addRules([{name:"ru/nbsp/abbr",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,")([\u0430-\u044f\u0451]{1,3})\\. ?([\u0430-\u044f\u0451]{1,3})\\."),"g");return e.replace(t,le).replace(t,le)}},{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")}},{name:"ru/nbsp/afterNumberSign",handler:function(e){return e.replace(/\u2116[ \u00A0\u2009]?(\d|\u043f\/\u043f)/g,"\u2116\u202f$1")}},{name:"ru/nbsp/beforeParticle",index:"+5",handler:function(e){var t="(\u043b\u0438|\u043b\u044c|\u0436\u0435|\u0436|\u0431\u044b|\u0431)",n=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451]) "+t+'(?=[,;:?!"\u2018\u201c\xbb])',"g"),t=new RegExp("([\u0410-\u042f\u0401\u0430-\u044f\u0451])[ \xa0]"+t+"[ \xa0]","g");return e.replace(n,"$1\xa0$2").replace(t,"$1\xa0$2 ")}},{name:"ru/nbsp/centuries",handler:function(e){var t=c["common/dash"],n="(^|\\s)([VIX]+)",r='(?=[,;:?!"\u2018\u201c\xbb]|$)',a=new RegExp(n+"[ \xa0]?\u0432\\.?"+r,"gm"),n=new RegExp(n+"("+t+")([VIX]+)[ \xa0]?\u0432\\.?([ \xa0]?\u0432\\.?)?"+r,"gm");return e.replace(a,"$1$2\xa0\u0432.").replace(n,"$1$2$3$4\xa0\u0432\u0432.")}},{name:"ru/nbsp/dayMonth",handler:function(e){var t=new RegExp("(\\d{1,2}) ("+c["ru/shortMonth"]+")","gi");return e.replace(t,"$1\xa0$2")}},{name:"ru/nbsp/initials",handler:function(e){var t=new RegExp("(^|[(\xa0\u202f "+c["ru/quote"].left+d+'"])([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401])\\.[\xa0\u202f ]?([\u0410-\u042f\u0401][\u0430-\u044f\u0451]+)',"gm");return e.replace(t,"$1$2.\xa0$3.\xa0$4")}},{name:"ru/nbsp/m",index:"+5",handler:function(e){var t=new RegExp("(^|[\\s,.\\(\uf000])(\\d+)[ \xa0]?(\u043c\u043c?|\u0441\u043c|\u043a\u043c|\u0434\u043c|\u0433\u043c|mm?|km|cm|dm)([23\xb2\xb3])?([\\s\\).!?,;\uf000]|$)","gm");return e.replace(t,function(e,t,n,r,a,i){return t+n+"\xa0"+r+ce[a||""]+("\xa0"===i?" ":i)})}},{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")}},{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")}},{name:"ru/nbsp/page",handler:function(e){var t=new RegExp("(^|[)\\s\uf000])(\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")}},{name:"ru/nbsp/ps",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,")[p\u0437]\\.[ \xa0]?([p\u0437]\\.[ \xa0]?)?[s\u044b]\\.:? "),"gim");return e.replace(t,function(e,t,n){return t+(n?"P.\xa0P.\xa0S. ":"P.\xa0S. ")})}},{name:"ru/nbsp/rubleKopek",handler:function(e){return e.replace(/(\d) ?(?=(\u0440\u0443\u0431|\u043a\u043e\u043f)\.)/g,"$1\xa0")}},{name:"ru/nbsp/see",handler:function(e){var t=new RegExp("(^|\\s|".concat(d,"|\\()(\u0441\u043c|\u0438\u043c)\\.[ \xa0]?([\u0430-\u044f\u04510-9a-z]+)([\\s.,?!]|$)"),"gi");return e.replace(t,function(e,t,n,r,a){return("\xa0"===t?" ":t)+n+".\xa0"+r+a})}},{name:"ru/nbsp/year",handler:function(e){return e.replace(/(^|\D)(\d{4}) ?\u0433([ ,;.\n]|$)/g,"$1$2\xa0\u0433$3")}},{name:"ru/nbsp/years",index:"+5",handler:function(e){var t=new RegExp("(^|\\D)(\\d{4})("+c["common/dash"]+')(\\d{4})[ \xa0]?\u0433\\.?([ \xa0]?\u0433\\.)?(?=[,;:?!"\u2018\u201c\xbb\\s]|$)',"gm");return e.replace(t,"$1$2$3$4\xa0\u0433\u0433.")}}]);function I(e,t){t=new RegExp('<span class="('+t.join("|")+')">([^]*?)</span>',"g");return e.replace(t,"$2")}function z(e,t){return e.replace(/<title>[^]*?<\/title>/i,function(e){return I(e,t)})}E.addRules([{name:"ru/number/comma",handler:function(e){return e.replace(/(^|\s)(\d+)\.(\d+[\u00A0\u2009\u202F ]*?[%\u2030\xb0\xd7x])/gim,"$1$2,$3")}},{name:"ru/number/ordinals",handler:function(e,t,n){n=n.getData("char"),n=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)(?!["+n+"])","g");return e.replace(n,function(e,t,n){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"}[n]})}}]);var pe=["typograf-oa-lbracket","typograf-oa-n-lbracket","typograf-oa-sp-lbracket"],B="ru/optalign/bracket",ne={name:B,queue:"start",handler:function(e){return I(e,pe)},htmlAttrs:!1},k={name:B,queue:"end",handler:function(e){return z(e,pe)},htmlAttrs:!1},ge=["typograf-oa-comma","typograf-oa-comma-sp"],L="ru/optalign/comma",D={name:L,queue:"start",handler:function(e){return I(e,ge)},htmlAttrs:!1},S={name:L,queue:"end",handler:function(e){return z(e,ge)},htmlAttrs:!1},he=["typograf-oa-lquote","typograf-oa-n-lquote","typograf-oa-sp-lquote"],q="ru/optalign/quote",T={name:q,queue:"start",handler:function(e){return I(e,he)},htmlAttrs:!1},fe={name:q,queue:"end",handler:function(e){return z(e,he)},htmlAttrs:!1},C=(E.addRules([{name:B,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},{name:L,handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(["+n+"\\d\u0301]+), ","gi");return e.replace(n,'$1<span class="typograf-oa-comma">,</span><span class="typograf-oa-comma-sp"> </span>')},disabled:!0,htmlAttrs:!1},{name:q,handler:function(e){var t=this.getSetting("common/punctuation/quote","ru"),t="(["+t.left[0]+(t.left[1]||"")+"])",n=new RegExp("(^|\n\n|\uf000)("+t+")","g"),t=new RegExp("([^\n\uf000])([ \xa0\n])("+t+")","gi");return e.replace(n,'$1<span class="typograf-oa-n-lquote">$2</span>').replace(t,'$1<span class="typograf-oa-sp-lquote">$2</span><span class="typograf-oa-lquote">$3</span>')},disabled:!0,htmlAttrs:!1}]),E.addInnerRules([ne,k,D,S,T,fe]),[]);function de(e){var t,n,r=e[0],a="";if(e.length<8)return me(e);if(10<e.length)if("+"===r){if("7"!==e[1])return e;t=!0,e=e.substr(2)}else"8"===r&&(n=!0,e=e.substr(1));for(var i=8;2<=i;i--){var o=+e.substr(0,i);if(-1<C.indexOf(o)){a=e.substr(0,i),e=e.substr(i);break}}return a||(a=e.substr(0,5),e=e.substr(5)),(t?"+7\xa0":"")+(n?"8\xa0":"")+function(e){var t=+e,n=e.length,r=[e],a=!1;if(3<n)switch(n){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 a=900<t&&t<=999||495==t||499==t;n=r.join("-");return a?n:"("+n+")"}(a)+"\xa0"+me(e)}function me(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 $e(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,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,"39131-39179","39190-39199",391,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("-"),n=+t[0];n<=+t[1];n++)C.push(n);else C.push(e)});E.addRules([{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,n,r){return t+n.toLowerCase()+"\u0301"+r})},disabled:!0},{name:"ru/other/phone-number",live:!1,handler:function(e){var t=new RegExp("(^|,| |\uf000)(\\+7[\\d\\(\\) \xa0-]{10,18})(?=,|;|\uf000|$)","gm");return e.replace(t,function(e,t,n){n=$e(n);return 12===n.length?t+de(n):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,n,r,a){a=$e(a);return 5<=a.length?t+n+r+de(a):e})}}]);var B={name:"ru/punctuation/ano",handler:function(e){var t=new RegExp("([^\xab\u201e[(!?,:;\\-\u2012\u2013\u2014\\s\uf000])(\\s+)(\u0430|\u043d\u043e)(?= |\xa0|\\n)","g");return e.replace(t,"$1,$2$3")}},be=(E.addRules([B,{name:"ru/punctuation/exclamation",handler:function(e){return e.replace(/(^|[^!])!{2}($|[^!])/gm,"$1!$2").replace(/(^|[^!])!{4}($|[^!])/gm,"$1!!!$2")},live:!1},{name:"ru/punctuation/exclamationQuestion",index:"+5",handler:function(e){var t=new RegExp("(^|[^!])!\\?([^?]|$)","g");return e.replace(t,"$1?!$2")}},{name:"ru/punctuation/hellipQuestion",handler:function(e){return e.replace(/(^|[^.])(\.\.\.|\u2026),/g,"$1\u2026").replace(/(!|\?)(\.\.\.|\u2026)(?=[^.]|$)/g,"$1..")}}]),E.addRules([{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")}},{name:"ru/space/year",handler:function(e,t,n){n=n.getData("char"),n=new RegExp("(^| |\xa0)(\\d{3,4})(\u0433\u043e\u0434([\u0430\u0443\u0435]|\u043e\u043c)?)([^"+n+"]|$)","g");return e.replace(n,"$1$2 $3$5")}}]),E.addRules([{name:"ru/symbols/NN",handler:function(e){return e.replace(/\u2116\u2116/g,"\u2116")}}]),{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"}),xe=Object.keys(be).join("");return E.addRules([{name:"ru/typo/switchingKeyboardLayout",handler:function(e){var t=new RegExp("(["+xe+"]{1,3})(?=[\u0410-\u042f\u0401\u0430-\u044f\u0451]+?)","g");return e.replace(t,function(e,t){for(var n="",r=0;r<t.length;r++)n+=be[t[r]];return n})}}]),E});
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "7.4.0";
1
+ export declare const PACKAGE_VERSION = "7.4.1";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typograf",
3
3
  "description": "The client and server typography",
4
- "version": "7.4.0",
4
+ "version": "7.4.1",
5
5
  "author": {
6
6
  "name": "Denis Seleznev",
7
7
  "email": "hcodes@yandex.ru",
@@ -40,21 +40,21 @@
40
40
  "devDependencies": {
41
41
  "@rollup/plugin-typescript": "^11.1.6",
42
42
  "@types/jest": "^29.5.12",
43
- "@typescript-eslint/eslint-plugin": "^7.0.2",
44
- "@typescript-eslint/parser": "^7.0.2",
43
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
44
+ "@typescript-eslint/parser": "^7.10.0",
45
45
  "cpy-cli": "^5.0.0",
46
46
  "del-cli": "^5.1.0",
47
- "eslint": "^8.56.0",
47
+ "eslint": "^8.57.0",
48
48
  "jest": "^29.7.0",
49
- "postcss": "^8.4.35",
49
+ "postcss": "^8.4.38",
50
50
  "postcss-cli": "^11.0.0",
51
- "postcss-import": "^16.0.1",
51
+ "postcss-import": "^16.1.0",
52
52
  "postcss-import-ext-glob": "^2.1.1",
53
- "rollup": "^4.12.0",
53
+ "rollup": "^4.18.0",
54
54
  "sort-keys": "^5.0.0",
55
- "ts-jest": "^29.1.1",
55
+ "ts-jest": "^29.1.3",
56
56
  "tslib": "^2.6.2",
57
- "typescript": "^5.3.3",
57
+ "typescript": "^5.4.5",
58
58
  "uglify-js": "^3.17.4"
59
59
  },
60
60
  "scripts": {