text: I18n.setPluralRule('en', function (n) { if (n === 1) { return 'one'; } else { return 'other'; } });I18n.configure({"locale":"en_US","country":"US","translations":{"js":{"modules":{"browse":{"presenters":{"all_deals_category_id":"all-deals","all_deals_friendly_name":"All Deals","back_to_top":"Back to Top","local_deals_friendly_name":"Local Deals","featured_deal_category_id":"featured-deal","featured_deal_friendly_name":"Featured Deal","new_deals_category_id":"new-deals","new_deals_friendly_name":"New Deals","rewards_friendly_name":"Rewards","view_deal_button":"View","error_message":{"message_header":"Oops!","message_content_p1":"We hoped you wouldn't see us like this. {{aOpen}}Try refreshing the page{{aClose}}.","message_content_p2":"If that doesn't work, try using the search bar or tabs above to {{breakline}}help you find what you're looking for."},"page_header":{"query_message":"\"{{query}}\" deals","results_for_query_message":"results for \"{{query}}\"","all_no_deals_title":"No Deals Found","all_no_deals_message":"Our deal searchers couldn't find any nearby deals at the moment."},"pagination":{"previous":"Previous","next":"Next","results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} of {{totalDealCount}} results","limited_results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} results"},"deals_footer_see_more":"See {{nextPageSize}} More Deal{{pluralCharacter}}","deals_footer_see_more_pages":{"one":"See {{count}} More Deal","other":"See {{count}} More Deals"},"deals_footer_showing_count":"Showing {{fetchedDealCount}} of {{totalDealCount}}"}},"desktop":{"error_message":{"message_header":"Oops!","message_content_p1":"We hoped you wouldn't see us like this. {{aOpen}}Try refreshing the page{{aClose}}.","message_content_p2":"If that doesn't work, try using the search bar or tabs above to {{breakline}}help you find what you're looking for."}},"mobile":{"searchPlaceholders":{"local":"All Local Deals","travel":"All Getaways Deals","goods":"All Goods Deals","all":"All Deals"},"header":{"map":"Map","mapList":"List","resultsMessage":{"zero":"No Results","one":"{{countOpen}}One{{countOpen}} Result","two":"{{countOpen}}Two{{countClose}} Results","other":"{{countOpen}}{{count}}{{countClose}} Results"}},"load_more":"Show {{pageSize}} more deals"},"page_header":{"presenters":{"all_no_deals_message":"Our deal searchers couldn't find any nearby deals at the moment.","all_no_deals_title":"No Deals Found","local_deals_friendly_name":"Local Deals","results_for_query_message":"results for '{{query}}'","results_for_query":"results for"}},"pagination":{"presenters":{"previous":"Previous","next":"Next","results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} of {{totalDealCount}} results","limited_results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} results","previousShort":"Prev"}},"touch":{"presenters":{"all_deals":"All Deals","nearby_heading":{"current_location":"Current Location"},"nearby_pane":{"cancel":"Cancel"},"quantity_bought":"{{soldQuantityMessage}} bought","free_event":"Free Event","in_store_pick_up":"In-Store Pickup"}},"breadcrumb":{"presenters":{"local_friendly_name":"Local","page_title_format":"{{categoryText}} in {{locationText}}"}},"legacy":{"presenters":{"all_deals_category_id":"all-deals","all_deals_friendly_name":"All Deals","back_to_top":"Back to Top","deals_footer_see_more":"See {{nextPageSize}} More Deal{{pluralCharacter}}","deals_footer_see_more_pages":{"one":"See {{count}} More Deal","other":"See {{count}} More Deals"},"deals_footer_showing_count":"Showing {{fetchedDealCount}} of {{totalDealCount}}","error_message":{"message_content_p1":"We hoped you wouldn't see us like this. {{aOpen}}Try refreshing the page{{aClose}}.","message_content_p2":"If that doesn't work, try using the search bar or tabs above to {{breakline}}help you find what you're looking for.","message_header":"Oops!"},"featured_deal_category_id":"featured-deal","featured_deal_friendly_name":"Featured Deal","local_deals_friendly_name":"Local Deals","new_deals_category_id":"new-deals","new_deals_friendly_name":"New Deals","page_header":{"all_no_deals_message":"Our deal searchers couldn't find any nearby deals at the moment.","all_no_deals_title":"No Deals Found","query_message":"\"{{query}}\" deals","results_for_query_message":"results for \"{{query}}\""},"pagination":{"limited_results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} results","next":"Next","previous":"Previous","results":"{{strongOpen}}{{startingIndex}} - {{endingIndex}}{{strongClose}} of {{totalDealCount}} results"},"rewards_friendly_name":"Rewards","view_deal_button":"View"}},"map":{"presenters":{"maximize":"Expand Map","minimize":"Collapse Map","sold_out":"Sold Out","zoom_in":"Zoom In","zoom_out":"Zoom Out"}},"personalize_wizard":{"place":{"errors":{"required":"Location can't be blank"}},"places_step":{"errors":{"not_done_yet":"Not done yet!","required":"Location can't be blank"}}},"quickview":{"error_message":{"header":"Oops!","line1_sentence1":"We hoped you wouldn't see us like this.","line1_sentence2":"Try refreshing Quick View.","line2":"Or {{aOpen}}view the full details for this deal.{{aClose}}"}},"refinement_bar":{"all":"All","interests_title":"Interests","location_title":"Location","showmore_modal":{"apply_button":"Apply","cities_title":"Cities"}},"seo":{"section_headings":{"nearby_deals":"Nearby Deals"}},"subscribe_drawer":{"email_error_message":"A valid email address is required.","generic_error_message":"There was a problem. Please try again later."}}},"number":{"symbols":{"decimal":".","group":",","list":";","percentSign":"%","plusSign":"+","minusSign":"-","exponential":"E","superscriptingExponent":"×","perMille":"‰","infinity":"∞","nan":"NaN","currency":{"EUR":"€","XCD":"EC$","ARS":"$","USD":"$","AUD":"A$","BBD":"$","BDT":"৳","XOF":"CFA","BMD":"$","BND":"$","BRL":"R$","BSD":"$","BYR":"р.","BZD":"$","CAD":"C$","XAF":"FCFA","NZD":"NZ$","CLP":"$","CNY":"CN¥","COP":"$","CRC":"₡","CUP":"$","DOP":"$","FJD":"$","GBP":"£","GHS":"₵","GIP":"£","GYD":"$","HKD":"HK$","ILS":"₪","INR":"₹","JMD":"$","JPY":"¥","KHR":"៛","KRW":"₩","KYD":"$","KZT":"₸","LAK":"₭","LRD":"$","MNT":"₮","MXN":"MX$","NAD":"$","XPF":"CFPF","NGN":"₦","PHP":"₱","PLN":"zł","PYG":"₲","SBD":"$","SGD":"$","SRD":"$","SSP":"£","THB":"฿","TRY":"₺","TTD":"$","TWD":"NT$","UAH":"₴","UYU":"$","VND":"₫"}},"formats":{"scientific":"#E0","decimal":"#,##0.###","currency":"¤#,##0.00","percent":"#,##0%"},"defaultCurrency":"USD"}},"scope":"js"});I18n.mixin=function (viewCtx, _i18n) { var HTML_ESCAPE, HTML_ESCAPE_REGEXP, PLACEHOLDER, TRANSLATED_ATTRIBUTES, isNumber, ref, version; TRANSLATED_ATTRIBUTES = { alt: true, height: true, width: true }; PLACEHOLDER = /(?:\{\{|%\{)\s*(.*?)\s*(?:\}\}?)/gm; HTML_ESCAPE = { '"': '&quot;', '<': '&lt;', '>': '&gt;' }; HTML_ESCAPE_REGEXP = /["<>]/g; isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); }; if (viewCtx == null) { viewCtx = {}; } if ((_i18n == null) && (typeof I18n !== "undefined" && I18n !== null)) { _i18n = I18n; } viewCtx.locale = _i18n.locale; viewCtx.country = _i18n.country; viewCtx.lang = _i18n.lang; version = (ref = _i18n.translations) != null ? ref.$checksum : void 0; viewCtx.clientSideTranslationQueryString = (version != null ? "country=" + _i18n.country + "&locale=" + _i18n.locale + "&version=" + (version.substr(0, 10)) : "country=" + _i18n.country + "&locale=" + _i18n.locale); viewCtx.translate = viewCtx.t = function() { return function(text) { var args, err, key, opts; args = text.split(','); key = args.shift().replace(/\s+/g, ''); if (args.length) { args = args.join(',').trim().replace(PLACEHOLDER, (function(_this) { return function(_, keyPath) { var value; value = _this; keyPath.split('.').forEach(function(keyPart) { if (!((value != null) && 'object' === typeof value)) { return null; } return value = value[keyPart]; }); return JSON.stringify(value != null ? value : null); }; })(this)); try { opts = JSON.parse(args.replace(/^\s*([^{\s][\S\s]*[^\s])\s*$/, '{$1}')); } catch (error) { err = error; err.message += " in translate-options for key " + key; throw err; } } return _i18n.t(key, opts != null ? opts : {}); }; }; viewCtx.translateimg = function() { return function(json) { var hash, imgAttrs, key, value; imgAttrs = []; hash = JSON.parse(json); for (key in hash) { value = hash[key]; if (TRANSLATED_ATTRIBUTES[key]) { if (!isNumber(value)) { value = _i18n.t(value).toString().replace(HTML_ESCAPE_REGEXP, function(specialChar) { return HTML_ESCAPE[specialChar]; }); } } else if (key === 'src') { value = "/images/" + _i18n.locale + "/" + value; } imgAttrs.push(key + "=\"" + value + "\""); } imgAttrs = imgAttrs.join(' '); return "<img " + imgAttrs + "/>"; }; }; return viewCtx; }