From 300663fe07cfbda2e5df9ecc339ff08b481ad661 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Wed, 10 Jan 2024 11:01:53 +0100 Subject: [PATCH 01/18] Bump expensify-common version & update patch file (#114) --- parser/package-lock.json | 32 ++-- parser/package.json | 2 +- parser/patches/expensify-common+1.0.0.patch | 191 ++------------------ parser/react-native-live-markdown-parser.js | 2 +- 4 files changed, 31 insertions(+), 196 deletions(-) diff --git a/parser/package-lock.json b/parser/package-lock.json index 52131faf..89cac52c 100644 --- a/parser/package-lock.json +++ b/parser/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "ISC", "dependencies": { - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#c6bb3cfa56d12af9fa02e2bfc729646f5b64ef44", + "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#039f4c584655cb4b5e933c9058b84ead7c8c6aee", "patch-package": "^8.0.0", "underscore": "^1.13.6" }, @@ -1912,9 +1912,9 @@ "dev": true }, "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" }, "node_modules/clipboard": { "version": "2.0.11", @@ -2353,11 +2353,11 @@ }, "node_modules/expensify-common": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/Expensify/expensify-common.git#c6bb3cfa56d12af9fa02e2bfc729646f5b64ef44", - "integrity": "sha512-a/UBkrerB57nB9xbBrFIeJG3IN0lVZV+/JWNbGMfT0FHxtg8/4sGWdC+AHqR3Bm01gwt67dd2csFferlZmTIsg==", + "resolved": "git+ssh://git@github.com/Expensify/expensify-common.git#039f4c584655cb4b5e933c9058b84ead7c8c6aee", + "integrity": "sha512-943niy7zdTfW3I8yT5rI+sm6xSqHUQ/CILCosbGcNzaCcZInpQGp1Qx+a8f64NF/8hxP9z/dX+dkSLqHJ3XR1A==", "license": "MIT", "dependencies": { - "classnames": "2.3.1", + "classnames": "2.3.2", "clipboard": "2.0.11", "html-entities": "^2.4.0", "jquery": "3.6.0", @@ -2369,7 +2369,7 @@ "semver": "^7.5.2", "simply-deferred": "git+https://github.com/Expensify/simply-deferred.git#77a08a95754660c7bd6e0b6979fdf84e8e831bf5", "string.prototype.replaceall": "^1.0.8", - "ua-parser-js": "^1.0.35", + "ua-parser-js": "^1.0.37", "underscore": "1.13.6" } }, @@ -6508,9 +6508,9 @@ "dev": true }, "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" }, "clipboard": { "version": "2.0.11", @@ -6840,11 +6840,11 @@ } }, "expensify-common": { - "version": "git+ssh://git@github.com/Expensify/expensify-common.git#c6bb3cfa56d12af9fa02e2bfc729646f5b64ef44", - "integrity": "sha512-a/UBkrerB57nB9xbBrFIeJG3IN0lVZV+/JWNbGMfT0FHxtg8/4sGWdC+AHqR3Bm01gwt67dd2csFferlZmTIsg==", - "from": "expensify-common@git+ssh://git@github.com/Expensify/expensify-common.git#c6bb3cfa56d12af9fa02e2bfc729646f5b64ef44", + "version": "git+ssh://git@github.com/Expensify/expensify-common.git#039f4c584655cb4b5e933c9058b84ead7c8c6aee", + "integrity": "sha512-943niy7zdTfW3I8yT5rI+sm6xSqHUQ/CILCosbGcNzaCcZInpQGp1Qx+a8f64NF/8hxP9z/dX+dkSLqHJ3XR1A==", + "from": "expensify-common@git+ssh://git@github.com/Expensify/expensify-common.git#039f4c584655cb4b5e933c9058b84ead7c8c6aee", "requires": { - "classnames": "2.3.1", + "classnames": "2.3.2", "clipboard": "2.0.11", "html-entities": "^2.4.0", "jquery": "3.6.0", @@ -6856,7 +6856,7 @@ "semver": "^7.5.2", "simply-deferred": "git+https://github.com/Expensify/simply-deferred.git#77a08a95754660c7bd6e0b6979fdf84e8e831bf5", "string.prototype.replaceall": "^1.0.8", - "ua-parser-js": "^1.0.35", + "ua-parser-js": "^1.0.37", "underscore": "1.13.6" } }, diff --git a/parser/package.json b/parser/package.json index f3c77527..73a197ff 100644 --- a/parser/package.json +++ b/parser/package.json @@ -20,7 +20,7 @@ "typescript": "^5.3.3" }, "dependencies": { - "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#c6bb3cfa56d12af9fa02e2bfc729646f5b64ef44", + "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#039f4c584655cb4b5e933c9058b84ead7c8c6aee", "patch-package": "^8.0.0", "underscore": "^1.13.6" } diff --git a/parser/patches/expensify-common+1.0.0.patch b/parser/patches/expensify-common+1.0.0.patch index af9195bd..92923bfd 100644 --- a/parser/patches/expensify-common+1.0.0.patch +++ b/parser/patches/expensify-common+1.0.0.patch @@ -12,7 +12,7 @@ index 4225717..0ae0962 100644 REPORT: { diff --git a/node_modules/expensify-common/lib/ExpensiMark.js b/node_modules/expensify-common/lib/ExpensiMark.js -index 6b198e2..90ec211 100644 +index 4e149ca..c94b383 100644 --- a/node_modules/expensify-common/lib/ExpensiMark.js +++ b/node_modules/expensify-common/lib/ExpensiMark.js @@ -7,8 +7,8 @@ const MARKDOWN_LINK_REGEX = new RegExp(`\\[([^\\][]*(?:\\[[^\\][]*][^\\][]*)*)]\ @@ -26,119 +26,7 @@ index 6b198e2..90ec211 100644 /** * The list of regex replacements to do on a comment. Check the link regex is first so links are processed * before other delimiters -@@ -36,6 +36,11 @@ export default class ExpensiMark { - const group = textWithinFences.replace(/(?:(?![\n\r])\s)/g, ' '); - return `
${group}
`; - }, -+ rawInputReplacement: (match, __, textWithinFences) => { -+ const withinFences = match.replace(/(?:```)([\s\S]*?)(?:```)/g, '$1'); -+ const group = textWithinFences.replace(/(?:(?![\n\r])\s)/g, ' '); -+ return `
${group}
`; -+ } - }, - - /** -@@ -59,11 +64,11 @@ export default class ExpensiMark { - */ - { - name: 'email', -- process: (textToProcess, replacement) => { -+ process: (textToProcess, replacement, shouldKeepRawInput) => { - const regex = new RegExp( - `(?!\\[\\s*\\])\\[([^[\\]]*)]\\((mailto:)?${CONST.REG_EXP.MARKDOWN_EMAIL}\\)`, 'gim' - ); -- return this.modifyTextForEmailLinks(regex, textToProcess, replacement); -+ return this.modifyTextForEmailLinks(regex, textToProcess, replacement, shouldKeepRawInput); - }, - replacement: (match, g1, g2) => { - if (g1.match(CONST.REG_EXP.EMOJIS) || !g1.trim()) { -@@ -74,12 +79,21 @@ export default class ExpensiMark { - const formattedLabel = label === href ? g2 : label; - return `${formattedLabel}`; - }, -+ rawInputReplacement: (match, g1, g2, g3) => { -+ if (g1.match(CONST.REG_EXP.EMOJIS) || !g1.trim()) { -+ return match; -+ } -+ -+ const dataRawHref = g2 ? g2 + g3 : g3; -+ const href = `mailto:${g3}`; -+ return `${g1}`; -+ } - }, - - { - name: 'heading1', -- process: (textToProcess, replacement, shouldKeepWhitespace = false) => { -- const regexp = shouldKeepWhitespace ? /^# ( *(?! )(?:(?!
|\n|\r\n).)+)/gm : /^# +(?! )((?:(?!
|\n|\r\n).)+)/gm;
-+                process: (textToProcess, replacement, shouldKeepRawInput = false) => {
-+                    const regexp = shouldKeepRawInput ? /^# ( *(?! )(?:(?!
|\n|\r\n).)+)/gm : /^# +(?! )((?:(?!
|\n|\r\n).)+)/gm;
-                     return textToProcess.replace(regexp, replacement);
-                 },
-                 replacement: '

$1

', -@@ -100,6 +114,12 @@ export default class ExpensiMark { - } - return `${g1.trim()}`; - }, -+ rawInputReplacement: (match, g1, g2) => { -+ if (g1.match(CONST.REG_EXP.EMOJIS) || !g1.trim()) { -+ return match; -+ } -+ return `${g1.trim()}`; -+ } - }, - - /** -@@ -162,6 +182,10 @@ export default class ExpensiMark { - const href = Str.sanitizeURL(g2); - return `${g1}${g2}${g1}`; - }, -+ rawInputReplacement: (_match, g1, g2) => { -+ const href = Str.sanitizeURL(g2); -+ return `${g1}${g2}${g1}`; -+ } - }, - - { -@@ -170,16 +194,16 @@ export default class ExpensiMark { - // We also want to capture a blank line before or after the quote so that we do not add extra spaces. - // block quotes naturally appear on their own line. Blockquotes should not appear in code fences or - // inline code blocks. A single prepending space should be stripped if it exists -- process: (textToProcess, replacement, shouldKeepWhitespace = false) => { -+ process: (textToProcess, replacement, shouldKeepRawInput = false) => { - const regex = new RegExp( - /^> *(?! )(?![^<]*(?:<\/pre>|<\/code>))([^\v\n\r]+)/gm, - ); -- if (shouldKeepWhitespace) { -- return textToProcess.replace(regex, g1 => replacement(g1, shouldKeepWhitespace)); -+ if (shouldKeepRawInput) { -+ return textToProcess.replace(regex, g1 => replacement(g1, shouldKeepRawInput)); - } - return this.modifyTextForQuote(regex, textToProcess, replacement); - }, -- replacement: (g1, shouldKeepWhitespace = false) => { -+ replacement: (g1, shouldKeepRawInput = false) => { - // We want to enable 2 options of nested heading inside the blockquote: "># heading" and "> # heading". - // To do this we need to parse body of the quote without first space - let isStartingWithSpace = false; -@@ -187,7 +211,7 @@ export default class ExpensiMark { - isStartingWithSpace = !!g2; - return ''; - }); -- const replacedText = this.replace(textToReplace, {filterRules: ['heading1'], shouldEscapeText: false, shouldKeepWhitespace}); -+ const replacedText = this.replace(textToReplace, {filterRules: ['heading1'], shouldEscapeText: false, shouldKeepRawInput}); - return `
${isStartingWithSpace ? ' ' : ''}${replacedText}
`; - }, - }, -@@ -228,6 +252,7 @@ export default class ExpensiMark { - 'gim', - ), - replacement: '$1$2', -+ rawInputReplacement: '$1$2', - }, - - { -@@ -424,7 +449,7 @@ export default class ExpensiMark { +@@ -457,7 +457,7 @@ export default class ExpensiMark { * @type {Object[]} */ this.shouldKeepWhitespaceRules = this.rules.filter(rule => !this.whitespaceRulesToDisable.includes(rule.name)).map(rule => rule.name); @@ -147,35 +35,7 @@ index 6b198e2..90ec211 100644 /** * Replaces markdown with html elements -@@ -437,10 +462,10 @@ export default class ExpensiMark { - * - * @returns {String} - */ -- replace(text, {filterRules = [], shouldEscapeText = true, shouldKeepWhitespace = false} = {}) { -+ replace(text, {filterRules = [], shouldEscapeText = true, shouldKeepRawInput = false} = {}) { - // This ensures that any html the user puts into the comment field shows as raw html - let replacedText = shouldEscapeText ? _.escape(text) : text; -- const excludeRules = shouldKeepWhitespace ? _.union(this.shouldKeepWhitespaceRules, filterRules) : filterRules; -+ const excludeRules = shouldKeepRawInput ? _.union(this.shouldKeepWhitespaceRules, filterRules) : filterRules; - const rules = _.isEmpty(excludeRules) ? this.rules : _.filter(this.rules, rule => _.contains(excludeRules, rule.name)); - - try { -@@ -449,11 +474,11 @@ export default class ExpensiMark { - if (rule.pre) { - replacedText = rule.pre(replacedText); - } -- -+ const replacementFunction = shouldKeepRawInput && rule.rawInputReplacement ? rule.rawInputReplacement : rule.replacement; - if (rule.process) { -- replacedText = rule.process(replacedText, rule.replacement, shouldKeepWhitespace); -+ replacedText = rule.process(replacedText, replacementFunction, shouldKeepRawInput); - } else { -- replacedText = replacedText.replace(rule.regex, rule.replacement); -+ replacedText = replacedText.replace(rule.regex, replacementFunction); - } - - // Post-process text after applying regex -@@ -470,7 +495,7 @@ export default class ExpensiMark { +@@ -503,7 +503,7 @@ export default class ExpensiMark { } return replacedText; @@ -184,7 +44,7 @@ index 6b198e2..90ec211 100644 /** * Checks matched URLs for validity and replace valid links with html elements -@@ -577,7 +602,7 @@ export default class ExpensiMark { +@@ -610,7 +610,7 @@ export default class ExpensiMark { } return replacedText; @@ -193,32 +53,7 @@ index 6b198e2..90ec211 100644 /** * Checks matched Emails for validity and replace valid links with html elements -@@ -585,10 +610,11 @@ export default class ExpensiMark { - * @param {RegExp} regex - * @param {String} textToCheck - * @param {Function} replacement -+ * @param {Boolean} shouldKeepRawInput - * - * @returns {String} - */ -- modifyTextForEmailLinks(regex, textToCheck, replacement) { -+ modifyTextForEmailLinks(regex, textToCheck, replacement, shouldKeepRawInput) { - let match = regex.exec(textToCheck); - let replacedText = ''; - let startIndex = 0; -@@ -602,7 +628,10 @@ export default class ExpensiMark { - filterRules: ['bold', 'strikethrough', 'italic'], - shouldEscapeText: false, - }); -- replacedText = replacedText.concat(replacement(match[0], linkText, match[3])); -+ -+ // rawInputReplacment needs to be called with additional parameters from match -+ const replacedMatch = shouldKeepRawInput ? replacement(match[0], linkText, match[2], match[3]) : replacement(match[0], linkText, match[3]); -+ replacedText = replacedText.concat(replacedMatch); - startIndex = match.index + (match[0].length); - - // Now we move to the next match that the js regex found in the text -@@ -612,7 +641,7 @@ export default class ExpensiMark { +@@ -649,7 +649,7 @@ export default class ExpensiMark { replacedText = replacedText.concat(textToCheck.substr(startIndex)); } return replacedText; @@ -227,7 +62,7 @@ index 6b198e2..90ec211 100644 /** * replace block element with '\n' if : -@@ -652,7 +681,7 @@ export default class ExpensiMark { +@@ -689,7 +689,7 @@ export default class ExpensiMark { }); return joinedText; @@ -236,7 +71,7 @@ index 6b198e2..90ec211 100644 /** * Replaces HTML with markdown -@@ -679,7 +708,7 @@ export default class ExpensiMark { +@@ -716,7 +716,7 @@ export default class ExpensiMark { generatedMarkdown = generatedMarkdown.replace(rule.regex, rule.replacement); }); return Str.htmlDecode(this.replaceBlockElementWithNewLine(generatedMarkdown)); @@ -245,7 +80,7 @@ index 6b198e2..90ec211 100644 /** * Convert HTML to text -@@ -698,7 +727,7 @@ export default class ExpensiMark { +@@ -735,7 +735,7 @@ export default class ExpensiMark { // We use 'htmlDecode' instead of 'unescape' to replace entities like ' ' replacedText = Str.htmlDecode(replacedText); return replacedText; @@ -254,7 +89,7 @@ index 6b198e2..90ec211 100644 /** * Modify text for Quotes replacing chevrons with html elements -@@ -761,7 +790,7 @@ export default class ExpensiMark { +@@ -798,7 +798,7 @@ export default class ExpensiMark { replacedText = textToCheck; } return replacedText; @@ -263,7 +98,7 @@ index 6b198e2..90ec211 100644 /** * Format the content of blockquote if the text matches the regex or else just return the original text -@@ -782,7 +811,7 @@ export default class ExpensiMark { +@@ -819,7 +819,7 @@ export default class ExpensiMark { return replacement(textToFormat); } return textToCheck; @@ -272,7 +107,7 @@ index 6b198e2..90ec211 100644 /** * Check if the input text includes only the open or the close tag of an element. -@@ -821,7 +850,7 @@ export default class ExpensiMark { +@@ -858,7 +858,7 @@ export default class ExpensiMark { // If there are any tags left in the stack, they're unclosed return tagStack.length !== 0; @@ -281,7 +116,7 @@ index 6b198e2..90ec211 100644 /** * @param {String} comment -@@ -843,7 +872,7 @@ export default class ExpensiMark { +@@ -880,7 +880,7 @@ export default class ExpensiMark { console.warn('Error parsing url in ExpensiMark.extractLinksInMarkdownComment', {error: e}); return undefined; } @@ -290,7 +125,7 @@ index 6b198e2..90ec211 100644 /** * Compares two markdown comments and returns a list of the links removed in a new comment. -@@ -858,3 +887,5 @@ export default class ExpensiMark { +@@ -895,3 +895,5 @@ export default class ExpensiMark { return linksInOld === undefined || linksInNew === undefined ? [] : _.difference(linksInOld, linksInNew); } } diff --git a/parser/react-native-live-markdown-parser.js b/parser/react-native-live-markdown-parser.js index 882707b7..a0feb61c 100644 --- a/parser/react-native-live-markdown-parser.js +++ b/parser/react-native-live-markdown-parser.js @@ -14,7 +14,7 @@ __p+='`),c}),n+=`'; `,i="obj";n=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; `+n+`return __p; `;var s;try{s=new Function(i,"_",n)}catch(c){throw c.source=n,c}var l=function(c){return s.call(this,c,d)};return l.source="function("+i+`){ -`+n+"}",l}function io(r,e,t){e=W(e);var o=e.length;if(!o)return S(t)?t.call(r):t;for(var a=0;a1)_(s,e-1,t,o),a=o.length;else for(var l=0,c=s.length;le?(o&&(clearTimeout(o),o=null),s=p,i=r.apply(a,n),o||(a=n=null)):!o&&t.trailing!==!1&&(o=setTimeout(l,u)),i};return c.cancel=function(){clearTimeout(o),s=0,o=a=n=null},c}function fo(r,e,t){var o,a,n,i,s,l=function(){var p=er()-a;e>p?o=setTimeout(l,e-p):(o=null,t||(i=r.apply(s,n)),o||(n=s=null))},c=v(function(p){return s=this,n=p,a=er(),o||(o=setTimeout(l,e),t&&(i=r.apply(s,n))),i});return c.cancel=function(){clearTimeout(o),o=n=s=null},c}function mo(r,e){return tr(e,r)}function dr(r){return function(){return!r.apply(this,arguments)}}function go(){var r=arguments,e=r.length-1;return function(){for(var t=e,o=r[e].apply(this,arguments);t--;)o=r[t].call(this,o);return o}}function ho(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function pe(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}var hn=tr(pe,2);function fe(r,e,t){e=y(e,t);for(var o=h(r),a,n=0,i=o.length;n0?0:a-1;n>=0&&n0?i=n>=0?n:Math.max(n+s,i):s=n>=0?Math.min(n+1,s):n+s+1;else if(t&&n&&s)return n=t(o,a),o[n]===a?n:-1;if(a!==a)return n=e(J.call(o,i,s),Qr),n>=0?n+i:-1;for(n=r>0?i:s-1;n>=0&&n0?0:s-1;for(n||(a=t[i?i[l]:l],l+=r);l>=0&&l=3;return e(t,z(o,n,4),a,i)}}var et=he(1);var Ao=he(-1);function Y(r,e,t){var o=[];return e=y(e,t),M(r,function(a,n,i){e(a,n,i)&&o.push(a)}),o}function yo(r,e,t){return Y(r,dr(y(e)),t)}function tt(r,e,t){e=y(e,t);for(var o=!R(r)&&h(r),a=(o||r).length,n=0;n=0}var An=v(function(r,e,t){var o,a;return S(e)?a=e:(e=W(e),o=e.slice(0,-1),e=e[e.length-1]),F(r,function(n){var i=a;if(!i){if(o&&o.length&&(n=fr(n,o)),n==null)return;i=n[e]}return i==null?i:i.apply(n,t)})});function hr(r,e){return F(r,gr(e))}function vo(r,e){return Y(r,Z(e))}function Ee(r,e,t){var o=-1/0,a=-1/0,n,i;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=R(r)?r:H(r);for(var s=0,l=r.length;so&&(o=n)}else e=y(e,t),M(r,function(c,p,u){i=e(c,p,u),(i>a||i===-1/0&&o===-1/0)&&(o=c,a=i)});return o}function So(r,e,t){var o=1/0,a=1/0,n,i;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=R(r)?r:H(r);for(var s=0,l=r.length;ss||i===void 0)return 1;if(i1&&(o=z(o,e[1])),e=K(r)):(o=Ro,e=_(e,!1,!1),r=Object(r));for(var a=0,n=e.length;a1&&(o=e[1])):(e=F(_(e,!1,!1),String),t=function(a,n){return!B(e,n)}),at(r,t,o)});function ve(r,e,t){return J.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function Se(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:ve(r,r.length-e)}function Er(r,e,t){return J.call(r,e==null||t?1:e)}function To(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:Er(r,Math.max(0,r.length-e))}function bo(r){return Y(r,Boolean)}function xo(r,e){return _(r,e,!1)}var nt=v(function(r,e){return e=_(e,!0,!0),Y(r,function(t){return!B(e,t)})});var In=v(function(r,e){return nt(r,e)});function Mr(r,e,t,o){Zr(e)||(o=t,t=e,e=!1),t!=null&&(t=y(t,o));for(var a=[],n=[],i=0,s=I(r);inew Date(2019,1,1)?.545:.58,MAX_TRIAL_BONUS_DAYS:42,COUNTRY:{US:"US",AU:"AU",UK:"UK",NZ:"NZ"},CURRENCIES:{US:"USD",AU:"AUD",UK:"GBP",NZ:"NZD"},STATES:{AK:{stateISO:"AK",stateName:"Alaska"},AL:{stateISO:"AL",stateName:"Alabama"},AR:{stateISO:"AR",stateName:"Arkansas"},AZ:{stateISO:"AZ",stateName:"Arizona"},CA:{stateISO:"CA",stateName:"California"},CO:{stateISO:"CO",stateName:"Colorado"},CT:{stateISO:"CT",stateName:"Connecticut"},DE:{stateISO:"DE",stateName:"Delaware"},FL:{stateISO:"FL",stateName:"Florida"},GA:{stateISO:"GA",stateName:"Georgia"},HI:{stateISO:"HI",stateName:"Hawaii"},IA:{stateISO:"IA",stateName:"Iowa"},ID:{stateISO:"ID",stateName:"Idaho"},IL:{stateISO:"IL",stateName:"Illinois"},IN:{stateISO:"IN",stateName:"Indiana"},KS:{stateISO:"KS",stateName:"Kansas"},KY:{stateISO:"KY",stateName:"Kentucky"},LA:{stateISO:"LA",stateName:"Louisiana"},MA:{stateISO:"MA",stateName:"Massachusetts"},MD:{stateISO:"MD",stateName:"Maryland"},ME:{stateISO:"ME",stateName:"Maine"},MI:{stateISO:"MI",stateName:"Michigan"},MN:{stateISO:"MN",stateName:"Minnesota"},MO:{stateISO:"MO",stateName:"Missouri"},MS:{stateISO:"MS",stateName:"Mississippi"},MT:{stateISO:"MT",stateName:"Montana"},NC:{stateISO:"NC",stateName:"North Carolina"},ND:{stateISO:"ND",stateName:"North Dakota"},NE:{stateISO:"NE",stateName:"Nebraska"},NH:{stateISO:"NH",stateName:"New Hampshire"},NJ:{stateISO:"NJ",stateName:"New Jersey"},NM:{stateISO:"NM",stateName:"New Mexico"},NV:{stateISO:"NV",stateName:"Nevada"},NY:{stateISO:"NY",stateName:"New York"},OH:{stateISO:"OH",stateName:"Ohio"},OK:{stateISO:"OK",stateName:"Oklahoma"},OR:{stateISO:"OR",stateName:"Oregon"},PA:{stateISO:"PA",stateName:"Pennsylvania"},PR:{stateISO:"PR",stateName:"Puerto Rico"},RI:{stateISO:"RI",stateName:"Rhode Island"},SC:{stateISO:"SC",stateName:"South Carolina"},SD:{stateISO:"SD",stateName:"South Dakota"},TN:{stateISO:"TN",stateName:"Tennessee"},TX:{stateISO:"TX",stateName:"Texas"},UT:{stateISO:"UT",stateName:"Utah"},VA:{stateISO:"VA",stateName:"Virginia"},VT:{stateISO:"VT",stateName:"Vermont"},WA:{stateISO:"WA",stateName:"Washington"},WI:{stateISO:"WI",stateName:"Wisconsin"},WV:{stateISO:"WV",stateName:"West Virginia"},WY:{stateISO:"WY",stateName:"Wyoming"},DC:{stateISO:"DC",stateName:"District Of Columbia"}},SPECIAL_CHARS_TO_REMOVE:"$*.+!(,=",REG_EXP:{DOMAIN:/^[\w-\.]*\.\w{2,}$/,EMAIL_PART:Pe,FREE_NAME:/^[^\r\n\t]{1,256}$/,MASKED_CARD:/^\d{0,6}[X]+\d{4,7}$/,EMAIL:new RegExp(`^${Pe}$`,"i"),EXTRACT_EMAIL:new RegExp(Pe,"gi"),EMAIL_SEARCH:new RegExp(Pe,"gi"),HYPERLINK:new RegExp("^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$","i"),MARKDOWN_EMAIL:Pe,EMOJIS:/[\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu},REPORT:{LIMIT_PRINT_PDF:250,ACH_LIMIT:2e6,ACH_DEFAULT_DAYS:4,TITLE_FORMULA:"{report:title}",MAX_AGE_SAME_COMMENT:300,SMARTREPORT_AGENT_EMAIL:"smartreports@expensify.com"},URL:{FORUM_ROOT:"https://community.expensify.com/",RECEIPTS:{DEVELOPMENT:"https://www.expensify.com.dev/receipts/",STAGING:"https://staging.expensify.com/receipts/",PRODUCTION:"https://www.expensify.com/receipts/"},CLOUDFRONT:"https://d2k5nsl2zxldvw.cloudfront.net",CLOUDFRONT_IMG:"https://d2k5nsl2zxldvw.cloudfront.net/images/",CLOUDFRONT_FILES:"https://d2k5nsl2zxldvw.cloudfront.net/files/",EXPENSIFY_SYNC_MANAGER:"quickbooksdesktop/Expensify_QuickBooksDesktop_Setup_2300802.exe",USEDOT_ROOT:"https://use.expensify.com/",ITUNES_SUBSCRIPTION:"https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions"},DATE:{FORMAT_STRING:"yyyy-MM-dd",FORMAT_STRING_PRETTY:"MMM d, yyyy",MOMENT_FORMAT_STRING:Up,MOMENT_DATE_TIME:"YYYY-MM-DD HH:mm",MOMENT_DATE_TIME_PRETTY:"MMM DD YYYY h:mma",MOMENT_DATE_TIME_TIMEZONE:"YYYY-MM-DDTHH:mm:ssZ",MOMENT_US_DATE:"MMM D, YYYY",MOMENT_US_DATE_LONG:"MMMM D, YYYY",MOMENT_US_MONTH_YEAR_LONG:"MMMM YYYY",TIMEZONE_OFFSET_MS:new Date().getTimezoneOffset()*6e4,SHORT_MONTH_SHORT_DAY:"MMM d",LONG_YEAR_MONTH_DAY_24_TIME:"yyyy-MM-dd HH:mm:ss",SHORT_MONTH_DAY_LOCAL_TIME:"MMM D [at] LT",SHORT_MONTH_DAY_YEAR_LOCAL_TIME:"MMM D, YYYY [at] LT"},FUNC_DIE_MESSAGE:"Aborting JavaScript execution",EMAIL_DELIVERY_FAILURE_VALIDITY:1209600,BILL_PROCESSING_PARTNER_NAME:"expensify.cash",BILL_PROCESSING_EMAIL_DOMAIN:"expensify.cash",BANK_IMPORT:{BANK_STATUS_BROKEN:2},BANK_ACCOUNT:{VERIFICATION_MAX_ATTEMPTS:7},EXPENSIFY_EMAILS:["concierge@expensify.com","help@expensify.com","receipts@expensify.com","chronos@expensify.com","qa@expensify.com","contributors@expensify.com","firstresponders@expensify.com","qa+travisreceipts@expensify.com","bills@expensify.com","studentambassadors@expensify.com","accounting@expensify.com","payroll@expensify.com","svfg@expensify.com","integrationtestingcreds@expensify.com","admin@expensify.com"],INVALID_APPROVER_AND_SHAREE_EMAILS:["concierge@expensify.com","help@expensify.com","receipts@expensify.com","chronos@expensify.com","qa@expensify.com","contributors@expensify.com","firstresponders@expensify.com","qa+travisreceipts@expensify.com","bills@expensify.com","admin@expensify.com"],SMART_SCAN:{COST:20,FREE_NUMBER:25},SMS:{DOMAIN:"expensify.sms",E164_REGEX:/^\+?[1-9]\d{1,14}$/},PASSWORD_COMPLEXITY_REGEX_STRING:"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,}$",INTEGRATIONS:{DATA_MAPPING:{NONE:"NONE",TAG:"TAG",REPORT_FIELD:"REPORT_FIELD",DEFAULT:"DEFAULT"},EXPORT_DATE:{LAST_EXPENSE:"LAST_EXPENSE",REPORT_EXPORTED:"REPORT_EXPORTED",REPORT_SUBMITTED:"REPORT_SUBMITTED"},XERO_HQ_CONNECTION_NAME:"xerohq",EXPENSIFY_SYNC_MANAGER_VERSION:"23.0.802.0"},INTEGRATION_TYPES:{ACCOUNTING:"accounting",HR:"hr"},DIRECT_INTEGRATIONS:{zenefits:{value:"zenefits",text:"Zenefits",image:`${g}icons/export-icons/zenefit.svg`,gray_image:`${g}icons/export-icons/zenefit_gray.svg`,alert_image:`${g}icons/export-icons/zenefit_alert.svg`,types:["hr"],isCorporateOnly:!1},gusto:{value:"gusto",text:"Gusto",image:`${g}icons/export-icons/gusto.svg`,gray_image:`${g}icons/export-icons/gusto_gray.svg`,alert_image:`${g}icons/export-icons/gusto_alert.svg`,types:["hr"],isCorporateOnly:!1},quickbooksOnline:{value:"quickbooksOnline",text:"QuickBooks Online",image:`${g}icons/export-icons/quickbooks.svg`,gray_image:`${g}icons/export-icons/quickbooks_gray.svg`,alert_image:`${g}icons/export-icons/quickbooks_alert.svg`,types:["hr","accounting"],isCorporateOnly:!1},xero:{value:"xero",text:"Xero",image:`${g}icons/export-icons/xero.svg`,gray_image:`${g}icons/export-icons/xero_gray.svg`,alert_image:`${g}icons/export-icons/xero_alert.svg`,types:["accounting"],isCorporateOnly:!1},netsuite:{value:"netsuite",text:"NetSuite",image:`${g}icons/export-icons/netsuite.svg`,gray_image:`${g}icons/export-icons/netsuite_gray.svg`,alert_image:`${g}icons/export-icons/netsuite_alert.svg`,types:["hr","accounting"],isCorporateOnly:!0},quickbooksDesktop:{value:"qbd",text:"QuickBooks Desktop",image:`${g}icons/export-icons/quickbooks.svg`,gray_image:`${g}icons/export-icons/quickbooks_gray.svg`,alert_image:`${g}icons/export-icons/quickbooks_alert.svg`,types:["accounting"],isCorporateOnly:!1},intacct:{value:"intacct",text:"Sage Intacct",image:`${g}icons/export-icons/sage.svg`,gray_image:`${g}icons/export-icons/sage_gray.svg`,alert_image:`${g}icons/export-icons/sage_alert.svg`,types:["hr","accounting"],isCorporateOnly:!0},financialforce:{value:"financialforce",text:"FinancialForce",image:`${g}icons/export-icons/financialforce.svg`,gray_image:`${g}icons/export-icons/financialforce_gray.svg`,alert_image:`${g}icons/export-icons/financialforce_alert.svg`,types:["accounting"],isCorporateOnly:!0}},INDIRECT_INTEGRATIONS:{microsoft_dynamics:{value:"microsoft_dynamics",text:"Microsoft Dynamics",image:`${g}icons/export-icons/microsoft_dynamics.svg`,gray_image:`${g}icons/export-icons/microsoft_dynamics_gray.svg`,types:["accounting"],isCorporateOnly:!0},oracle:{value:"oracle",text:"Oracle",image:`${g}icons/export-icons/oracle.svg`,gray_image:`${g}icons/export-icons/oracle_gray.svg`,types:["hr","accounting"],isCorporateOnly:!0},sage:{value:"sage",text:"Sage",image:`${g}icons/export-icons/sage.svg`,gray_image:`${g}icons/export-icons/sage_gray.svg`,types:["accounting"],isCorporateOnly:!0},sap:{value:"sap",text:"SAP",image:`${g}icons/export-icons/sap.svg`,gray_image:`${g}icons/export-icons/sap_gray.svg`,types:["accounting"],isCorporateOnly:!0},myob:{value:"myob",text:"MYOB",image:`${g}icons/export-icons/myob.svg`,gray_image:`${g}icons/export-icons/myob_gray.svg`,types:["accounting"],isCorporateOnly:!0},workday:{value:"workday",text:"Workday",image:`${g}icons/export-icons/workday.svg`,gray_image:`${g}icons/export-icons/workday_gray.svg`,types:["hr"],isCorporateOnly:!0},adp:{value:"adp",text:"ADP",image:`${g}icons/export-icons/adp.svg`,types:["hr"],isCorporateOnly:!0},generic_indirect_connection:{value:"generic_indirect_connection",text:"Other",image:`${g}icons/accounting-other--blue.svg`,types:["hr","accounting"]}},DEFAULT_IS_TEMPLATES:{default:{value:"default_template",text:"Basic Export",image:`${g}icons/accounting-other--blue.svg`},tag:{value:"tag_template",text:"Tag Export",image:`${g}icons/accounting-other--blue.svg`},category:{value:"category_template",text:"Category Export",image:`${g}icons/accounting-other--blue.svg`},detailed:{value:"detailed_export",text:"All Data - Expense Level Export",image:`${g}icons/accounting-other--blue.svg`},report:{value:"report_level_export",text:"All Data - Report Level Export",image:`${g}icons/accounting-other--blue.svg`},tax:{value:"multiple_tax_export",text:"Canadian Multiple Tax Export",image:`${g}icons/accounting-other--blue.svg`},perdiem:{value:"per_diem_export",text:"Per Diem Export",image:`${g}icons/accounting-other--blue.svg`},attendees:{value:"attendee_audit_export",text:"Attendee Audit Export",image:`${g}icons/accounting-other--blue.svg`}},NVP:{DISMISSED_VIOLATIONS:"dismissedViolations"},FILESIZE:{BYTES_IN_MEGABYTE:1e6,MAX:1e7},PARTNER_NAMES:{IPHONE:"iphone",ANDROID:"android",CHAT:"chat-expensify-com"},LOGIN_TYPES:{WEB:"login",MOBILE:"device"},EXPENSIFY_CARD:{FEED_NAME:"Expensify Card",FRAUD_STATES:{NONE:0,DOMAIN_CARDS_REIMBURSEMENTS_INVESTIGATION:1,DOMAIN_CARDS_RAPID_INCREASE_INVESTIGATION:2,DOMAIN_CARDS_RAPID_INCREASE_CLEARED:3,DOMAIN_CARDS_RAPID_INCREASE_CONFIRMED:4,INDIVIDUAL_CARD_RAPID_INCREASE_INVESTIGATION:5,INDIVIDUAL_CARD_RAPID_INCREASE_CLEARED:6,INDIVIDUAL_CARD_RAPID_INCREASE_CONFIRMED:7,SUSPICIOUS_PAN_ENTRY:8,SUSPICIOUS_PAN_ENTRY_CLEARED:9,SUSPICIOUS_PAN_ENTRY_CONFIRMED:10}},TRAVEL_BOOKING:{OPTIONS:{shortFlightFare:{economy:"Economy",premiumEconomy:"Premium Economy",business:"Business",first:"First"},longFlightFare:{economy:"Economy",premiumEconomy:"Premium Economy",business:"Business",first:"First"},hotelStar:{oneStar:"1",twoStars:"2",threeStars:"3",fourStars:"4",fiveStars:"5"}},DEFAULT_OPTIONS:{shortFlightFare:"economy",longFlightFare:"economy",hotelStar:"fourStars"}},EXPENSIFY_DOMAINS:["expensify.com","expensifail.com","expensicorp.com"],SUBSCRIPTION_CHANGE_REASONS:{TOO_LIMITED:{id:"tooLimited",label:"Functionality needs improvement",prompt:"What software are you migrating to and what led to this decision?"},TOO_EXPENSIVE:{id:"tooExpensive",label:"Too expensive",prompt:"What software are you migrating to and what led to this decision?"},INADEQUATE_SUPPORT:{id:"inadequateSupport",label:"Inadequate customer support",prompt:"What software are you migrating to and what led to this decision?"},BUSINESS_CLOSING:{id:"businessClosing",label:"Company closing, downsizing, or acquired",prompt:"What software are you migrating to and what led to this decision?"}}};var Fp="XN--VERMGENSBERATUNG-PWB|XN--VERMGENSBERATER-CTB|XN--CLCHC0EA0B2G2A9GCD|XN--W4R85EL8FHU5DNRA|TRAVELERSINSURANCE|NORTHWESTERNMUTUAL|XN--XKC2DL3A5EE0H|XN--MGBERP4A5D4AR|XN--MGBAI9AZGQP6J|XN--MGBAH1A3HJKRD|XN--BCK1B9A5DRE4C|XN--5SU34J936BGSG|XN--3OQ18VL8PN36A|XN--XKC2AL3HYE2A|XN--MGBCPQ6GPA1A|XN--MGBA7C0BBN0A|XN--FZYS8D69UVGM|XN--NQV7FS00EMA|XN--MGBC0A9AZCG|XN--MGBAAKC7DVF|XN--MGBA3A4F16A|XN--LGBBAT1AD8J|XN--KCRX77D1X4A|XN--I1B6B1A6A2E|SANDVIKCOROMANT|KERRYPROPERTIES|AMERICANEXPRESS|XN--RVC1E0AM3E|XN--MGBX4CD0AB|XN--MGBI4ECEXP|XN--MGBCA7DZDO|XN--MGBBH1A71E|XN--MGBAYH7GPA|XN--MGBAAM7A8H|XN--MGBA3A3EJT|XN--JLQ61U9W7B|XN--JLQ480N2RG|XN--H2BREG3EVE|XN--FIQ228C5HS|XN--B4W605FERD|XN--80AQECDR1A|XN--6QQ986B3XL|XN--54B7FTA0CC|WEATHERCHANNEL|KERRYLOGISTICS|COOKINGCHANNEL|CANCERRESEARCH|BANANAREPUBLIC|AMERICANFAMILY|AFAMILYCOMPANY|XN--YGBI2AMMX|XN--YFRO4I67O|XN--TIQ49XQYJ|XN--H2BRJ9C8C|XN--FZC2C9E2C|XN--FPCRJ9C3D|XN--ECKVDTC9D|XN--CCKWCXETD|WOLTERSKLUWER|TRAVELCHANNEL|SPREADBETTING|LIFEINSURANCE|INTERNATIONAL|XN--QCKA1PMC|XN--OGBPF8FL|XN--NGBE9E0A|XN--NGBC5AZD|XN--MK1BU44C|XN--MGBT3DHD|XN--MGBPL2FH|XN--MGBGU82A|XN--MGBAB2BD|XN--MGB9AWBF|XN--GCKR3F0F|XN--8Y0A063A|XN--80ASEHDB|XN--80ADXHKS|XN--4DBRK0CE|XN--45BR5CYL|XN--3E0B707E|VERSICHERUNG|SCHOLARSHIPS|LPLFINANCIAL|CONSTRUCTION|XN--ZFR164B|XN--XHQ521B|XN--W4RS40L|XN--VUQ861B|XN--T60B56A|XN--SES554G|XN--S9BRJ9C|XN--ROVU88B|XN--RHQV96G|XN--Q9JYB4C|XN--PGBS0DH|XN--OTU796D|XN--NYQY26A|XN--MIX891F|XN--MGBTX2B|XN--MGBBH1A|XN--KPRY57D|XN--KPRW13D|XN--JVR189M|XN--J6W193G|XN--IMR513N|XN--HXT814E|XN--H2BRJ9C|XN--GK3AT1E|XN--GECRJ9C|XN--G2XX48C|XN--FLW351E|XN--FJQ720A|XN--FCT429K|XN--EFVY88H|XN--D1ACJ3B|XN--CZR694B|XN--CCK2B3B|XN--9KRT00A|XN--80AO21A|XN--6FRZ82G|XN--55QW42G|XN--45BRJ9C|XN--42C2D9A|XN--3HCRJ9C|XN--3DS443G|XN--3BST00M|XN--2SCRJ9C|XN--1QQW23A|XN--1CK2E1B|XN--11B4C3D|WILLIAMHILL|REDUMBRELLA|PROGRESSIVE|PRODUCTIONS|PLAYSTATION|PHOTOGRAPHY|OLAYANGROUP|MOTORCYCLES|LAMBORGHINI|KERRYHOTELS|INVESTMENTS|FOODNETWORK|ENTERPRISES|ENGINEERING|CREDITUNION|CONTRACTORS|CALVINKLEIN|BRIDGESTONE|BLOCKBUSTER|BLACKFRIDAY|BARCLAYCARD|ACCOUNTANTS|XN--Y9A3AQ|XN--WGBL6A|XN--WGBH1C|XN--UNUP4Y|XN--Q7CE6A|XN--PSSY2U|XN--O3CW4H|XN--MXTQ1M|XN--KPUT3I|XN--IO0A7I|XN--FIQZ9S|XN--FIQS8S|XN--FIQ64B|XN--CZRU2D|XN--CZRS0T|XN--CG4BKI|XN--C2BR7G|XN--9ET52U|XN--9DBQ2A|XN--90A3AC|XN--80ASWG|XN--5TZM5G|XN--55QX5D|XN--4GBRIM|XN--45Q11C|XN--3PXU8K|XN--30RR7Y|VOLKSWAGEN|VLAANDEREN|UNIVERSITY|TECHNOLOGY|TATAMOTORS|SWIFTCOVER|SCHAEFFLER|RESTAURANT|REPUBLICAN|REALESTATE|PRUDENTIAL|PROTECTION|PROPERTIES|ONYOURSIDE|NEXTDIRECT|NATIONWIDE|MITSUBISHI|MANAGEMENT|INDUSTRIES|IMMOBILIEN|HEALTHCARE|FOUNDATION|EXTRASPACE|EUROVISION|CUISINELLA|CREDITCARD|CONSULTING|CAPITALONE|BOEHRINGER|BNPPARIBAS|BASKETBALL|ASSOCIATES|APARTMENTS|ACCOUNTANT|YODOBASHI|XN--VHQUV|XN--TCKWE|XN--QXA6A|XN--P1ACF|XN--NQV7F|XN--NGBRX|XN--L1ACC|XN--J1AMH|XN--J1AEF|XN--FHBEI|XN--E1A4C|XN--D1ALF|XN--C1AVG|XN--90AIS|VACATIONS|TRAVELERS|STOCKHOLM|STATEFARM|STATEBANK|SOLUTIONS|SHANGRILA|SCJOHNSON|RICHARDLI|PRAMERICA|PASSAGENS|PANASONIC|MICROSOFT|MELBOURNE|MARSHALLS|MARKETING|LIFESTYLE|LANDROVER|LANCASTER|KUOKGROUP|INSURANCE|INSTITUTE|HOMESENSE|HOMEGOODS|HOMEDEPOT|HISAMITSU|GOLDPOINT|FURNITURE|FUJIXEROX|FRONTDOOR|FRESENIUS|FIRESTONE|FINANCIAL|FAIRWINDS|EQUIPMENT|EDUCATION|DIRECTORY|COMMUNITY|CHRISTMAS|BLOOMBERG|BARCELONA|AQUARELLE|ANALYTICS|AMSTERDAM|ALLFINANZ|ALFAROMEO|ACCENTURE|YOKOHAMA|XN--QXAM|XN--P1AI|XN--NODE|XN--90AE|WOODSIDE|VERISIGN|VENTURES|VANGUARD|TRAINING|SUPPLIES|STCGROUP|SOFTWARE|SOFTBANK|SHOWTIME|SHOPPING|SERVICES|SECURITY|SAMSCLUB|SAARLAND|RELIANCE|REDSTONE|PROPERTY|PLUMBING|PICTURES|PHARMACY|PARTNERS|OBSERVER|MORTGAGE|MERCKMSD|MEMORIAL|MCKINSEY|MASERATI|MARRIOTT|LUNDBECK|LIGHTING|JPMORGAN|ISTANBUL|IPIRANGA|INFINITI|HOSPITAL|HOLDINGS|HELSINKI|HDFCBANK|GUARDIAN|GRAPHICS|GRAINGER|GOODYEAR|FRONTIER|FOOTBALL|FIRMDALE|FIDELITY|FEEDBACK|EXCHANGE|ETISALAT|ERICSSON|ENGINEER|DOWNLOAD|DISCOVER|DISCOUNT|DIAMONDS|DEMOCRAT|DELOITTE|DELIVERY|COMPUTER|COMMBANK|CLOTHING|CLINIQUE|CLEANING|CITYEATS|CIPRIANI|CATHOLIC|CATERING|CAPETOWN|BUSINESS|BUILDERS|BUDAPEST|BRUSSELS|BROADWAY|BRADESCO|BOUTIQUE|BASEBALL|BARGAINS|BAREFOOT|BARCLAYS|ATTORNEY|ALLSTATE|AIRFORCE|ABUDHABI|ZUERICH|YOUTUBE|YAMAXUN|XFINITY|WINNERS|WINDOWS|WHOSWHO|WEDDING|WEBSITE|WEATHER|WATCHES|WANGGOU|WALMART|TRADING|TOSHIBA|TIFFANY|TICKETS|THEATRE|THEATER|TEMASEK|SYSTEMS|SURGERY|SUPPORT|STORAGE|STAPLES|SINGLES|SHIKSHA|SCIENCE|SCHWARZ|SCHMIDT|SANDVIK|SAMSUNG|REXROTH|REVIEWS|RENTALS|RECIPES|REALTOR|POLITIE|PIONEER|PHILIPS|ORIGINS|ORGANIC|OLDNAVY|OKINAWA|NEUSTAR|NETWORK|NETFLIX|NETBANK|MONSTER|MARKETS|LINCOLN|LIMITED|LECLERC|LATROBE|LASALLE|LANXESS|LACAIXA|KOMATSU|KITCHEN|JUNIPER|JEWELRY|ISMAILI|HYUNDAI|HOTMAIL|HOTELES|HOSTING|HOLIDAY|HITACHI|HANGOUT|HAMBURG|GUITARS|GROCERY|GODADDY|GENTING|GALLERY|FUJITSU|FROGANS|FORSALE|FLOWERS|FLORIST|FLIGHTS|FITNESS|FISHING|FINANCE|FERRERO|FERRARI|FASHION|FARMERS|EXPRESS|EXPOSED|DOMAINS|DIGITAL|DENTIST|CRUISES|CRICKET|COURSES|COUPONS|COUNTRY|CORSICA|COOKING|CONTACT|COMPARE|COMPANY|COMCAST|COLOGNE|COLLEGE|CLUBMED|CITADEL|CHINTAI|CHARITY|CHANNEL|CAREERS|CARAVAN|CAPITAL|BUGATTI|BROTHER|BOOKING|BESTBUY|BENTLEY|BAUHAUS|BANAMEX|AVIANCA|AUSPOST|AUDIBLE|AUCTION|ATHLETA|ANDROID|ALIBABA|AGAKHAN|ACADEMY|ABOGADO|ZAPPOS|YANDEX|YACHTS|XIHUAN|WEBCAM|WALTER|VUELOS|VOYAGE|VOTING|VISION|VIRGIN|VILLAS|VIKING|VIAJES|UNICOM|TRAVEL|TOYOTA|TKMAXX|TJMAXX|TIENDA|TENNIS|TATTOO|TARGET|TAOBAO|TAIPEI|SYDNEY|SWATCH|SUZUKI|SUPPLY|STUDIO|STREAM|SOCIAL|SOCCER|SHOUJI|SELECT|SECURE|SEARCH|SCHULE|SCHOOL|SANOFI|SAKURA|SAFETY|RYUKYU|ROGERS|ROCHER|REVIEW|REPORT|REPAIR|REISEN|REALTY|RACING|QUEBEC|PICTET|PHYSIO|PHOTOS|PFIZER|OTSUKA|ORANGE|ORACLE|ONLINE|OLAYAN|OFFICE|NOWRUZ|NORTON|NISSAY|NISSAN|NATURA|NAGOYA|MUTUAL|MUSEUM|MOSCOW|MORMON|MONASH|MOBILE|MATTEL|MARKET|MAKEUP|MAISON|MADRID|LUXURY|LONDON|LOCKER|LIVING|LEFRAK|LAWYER|LATINO|LANCIA|KOSHER|KINDLE|KINDER|KAUFEN|JUEGOS|JOBURG|JAGUAR|INTUIT|INSURE|IMAMAT|HUGHES|HOTELS|HOCKEY|HIPHOP|HERMES|HEALTH|GRATIS|GOOGLE|GLOBAL|GIVING|GEORGE|GARDEN|GALLUP|FUTBOL|FLICKR|FAMILY|EXPERT|EVENTS|ESTATE|ENERGY|EMERCK|DURBAN|DUPONT|DUNLOP|DOCTOR|DIRECT|DESIGN|DENTAL|DEGREE|DEALER|DATSUN|DATING|CRUISE|CREDIT|COUPON|CONDOS|COMSEC|COFFEE|CLINIC|CLAIMS|CIRCLE|CHURCH|CHROME|CHANEL|CENTER|CASINO|CAREER|CAMERA|BROKER|BOSTON|BOSTIK|BHARTI|BERLIN|BEAUTY|BAYERN|AUTHOR|ARAMCO|ANQUAN|AMAZON|ALSTOM|ALSACE|ALIPAY|AIRTEL|AIRBUS|AGENCY|AFRICA|ABBVIE|ABBOTT|ABARTH|YAHOO|XEROX|WORLD|WORKS|WEIBO|WEBER|WATCH|WALES|VOLVO|VODKA|VIDEO|VEGAS|UBANK|TUSHU|TUNES|TRUST|TRADE|TOURS|TOTAL|TORAY|TOOLS|TOKYO|TODAY|TMALL|TIROL|TIRES|TATAR|SWISS|SUCKS|STYLE|STUDY|STORE|STADA|SPORT|SPACE|SOLAR|SMILE|SMART|SLING|SKYPE|SHOES|SHELL|SHARP|SEVEN|SENER|SALON|RUGBY|RODEO|ROCKS|RICOH|REISE|REHAB|RADIO|QUEST|PROMO|PRIME|PRESS|PRAXI|POKER|PLACE|PIZZA|PHOTO|PHONE|PARTY|PARTS|PARIS|OSAKA|OMEGA|NOWTV|NOKIA|NINJA|NIKON|NEXUS|MOVIE|MONEY|MIAMI|MEDIA|MANGO|MACYS|LOTTO|LOTTE|LOCUS|LOANS|LIXIL|LIPSY|LINDE|LILLY|LEXUS|LEGAL|LEASE|LAMER|KYOTO|KOELN|JETZT|IVECO|IRISH|IKANO|HYATT|HOUSE|HORSE|HONDA|HOMES|GUIDE|GUCCI|GROUP|GRIPE|GREEN|GMAIL|GLOBO|GLASS|GLADE|GIVES|GIFTS|GAMES|GALLO|FORUM|FOREX|FINAL|FEDEX|FAITH|EPSON|EMAIL|EDEKA|EARTH|DUBAI|DRIVE|DELTA|DEALS|DANCE|DABUR|CYMRU|CROWN|CODES|COACH|CLOUD|CLICK|CITIC|CISCO|CHEAP|CHASE|CARDS|CANON|BUILD|BOSCH|BOATS|BLACK|BINGO|BIBLE|BEATS|BAIDU|AZURE|AUTOS|AUDIO|ARCHI|APPLE|AMICA|AMFAM|AETNA|ADULT|ACTOR|ZONE|ZERO|ZARA|YOGA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tt}?`,Tt),kp=`${Tt}([a-z0-9](?:[-a-z0-9]*[a-z0-9])?\\.)*(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)(?:\\:${gl}|\\b|(?=_))`,qa=`((${kp})${dl}(?:${hl}|${El})*)`,bt=`(${qa}|${Yr})`;var Hp=new RegExp(`@${C.SMS.DOMAIN}`,"gi"),Xp={endsWith(r,e){return!r||!e?!1:r.substr(-e.length)===e},fromUSDToNumber(r,e){let t=String(r).replace(/[^\d.\-()]+/g,"");return t.match(/\(.*\)/)&&(t=`-${t.replace(/[()]/g,"")}`),t=Number(t)*100,t=Math.round(t*1e3)/1e3,e?t:Math.round(t)},truncateInMiddle(r,e){if(r.length<=e)return r;let t="...",o=(e-t.length)/2,a=r.substr(0,Math.ceil(o)),n=r.substr(r.length-Math.floor(o));return a+t+n},nl2br(r){return r.replace(/\n/g,"
")},htmlDecode(r){return typeof jQuery<"u"?jQuery("