!function(){var a,b=function(a,b){return function(){return a.apply(b,arguments)}};window.vtex=window.vtex||{},window.vtex.i18n=window.vtex.i18n||{},a=function(){function a(){this.callCountryCodeCallback=b(this.callCountryCodeCallback,this),this.callLocaleCallback=b(this.callLocaleCallback,this),this.translateHtml=b(this.translateHtml,this),this.getThousandsSeparator=b(this.getThousandsSeparator,this),this.getDecimalSeparator=b(this.getDecimalSeparator,this),this.setCurrency=b(this.setCurrency,this),this.getCurrency=b(this.getCurrency,this),this.setCountryCodeCallback=b(this.setCountryCodeCallback,this),this.setCountryCode=b(this.setCountryCode,this),this.getCountryCode=b(this.getCountryCode,this),this.setLocaleCallback=b(this.setLocaleCallback,this),this.setLocale=b(this.setLocale,this),this.getLocale=b(this.getLocale,this),this.locale=$("html").attr("lang")||$('meta[name="language"]').attr("content")||"pt-BR",this.countryCode=$('meta[name="country"]').attr("content")||"BRA",this.currency=$('meta[name="currency"]').attr("content"),this.currency||(this.currency=function(){switch(this.countryCode){case"BRA":return"R$";case"URY":return"$U";case"PRY":return"Gs";case"PER":return"S/.";case"VEN":return"Bs. F.";default:return"$"}}.call(this))}return a.prototype.getLocale=function(){return this.locale},a.prototype.setLocale=function(a){return this.locale=a,window.i18n&&(window.i18n.setLng(this.locale),$("html").i18n(),$("#vtex-locale-select")[0]&&$("#vtex-locale-select").select2("val",this.locale)),this.callLocaleCallback(this.locale)},a.prototype.setLocaleCallback=function(a){return this.localeCallback=a},a.prototype.getCountryCode=function(){return this.countryCode},a.prototype.setCountryCode=function(a){return this.countryCode=a,this.callCountryCodeCallback(this.countryCode)},a.prototype.setCountryCodeCallback=function(a){return this.countryCodeCallback=a},a.prototype.getCurrency=function(){return this.currency+" "},a.prototype.setCurrency=function(a){return this.currency=a},a.prototype.getDecimalSeparator=function(a){var b;switch(b=a?a:window.vtex.i18n.getCountryCode()){case"USA":return".";case"URY":return".";default:return","}},a.prototype.getThousandsSeparator=function(a){var b;switch(b=a?a:window.vtex.i18n.getCountryCode()){case"USA":return",";default:return"."}},a.prototype.translateHtml=function(a){var b;return null==a&&(a="html"),window.i18n?"function"==typeof(b=$(a)).i18n?b.i18n():void 0:void 0},a.prototype.callLocaleCallback=function(a){return"function"==typeof this.localeCallback?this.localeCallback(a):"string"==typeof this.localeCallback&&window.radio?radio(this.localeCallback).broadcast(a):void 0},a.prototype.callCountryCodeCallback=function(a){return"function"==typeof this.countryCodeCallback?this.countryCodeCallback(a):"string"==typeof this.countryCodeCallback&&window.radio?radio(this.countryCodeCallback).broadcast(a):void 0},a}(),$.extend(window.vtex.i18n,new a),window.vtex.VtexI18n=a,window.vtex.i18n.getCurrencySymbol=window.vtex.i18n.getCurrency}.call(this);