!function(){function t(n,e,r){function o(u,a){if(!e[u]){if(!n[u]){var c="function"==typeof require&&require;if(!a&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var s=e[u]={exports:{}};n[u][0].call(s.exports,function(t){var e=n[u][1][t];return o(e||t)},s,s.exports,t,n,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u0)return r.get("products_rates",{codes:t,store_id:this.storeId},function(t){return function(n){return t.products.attachRates(n.products_rates,n.features)}}(this))},t.prototype.fillComponents=function(){return this.fillRates()},t}()},{"./api.coffee":1,"./products.coffee":8}],3:[function(t,n,e){var r,o,i,u,a,c,f,s=[].slice;a=t("./production.coffee"),c=t("./staging.coffee"),i=t("./dev.coffee"),f=t("./test-with-staging.coffee"),r=t("../util.coffee"),o=u=function(){var t,n,e,r,o,i,u;for(t=arguments[0],i=2<=arguments.length?s.call(arguments,1):[],n=0,r=i.length;n0?ga(function(){return i.forEach(function(t){return ga(t.get("name")+".send","event",e,n,r)})}):ga("send","event",e,n,r)),"undefined"!=typeof _gat&&"undefined"!=typeof _gat._getTrackers)return o.each(_gat._getTrackers(),function(t){return t._trackEvent(e,n,r)})},t}()},{underscore:17}],7:[function(require,module,exports){var ProductCodes;module.exports=ProductCodes=function(){function ProductCodes(){}var dataAttribute;return dataAttribute="trustvox-product-code",ProductCodes.prototype.all=function(){var t,n,e,r;return e=function(){var e,r;e=this.fetchJs(),r=[];for(t in e)n=e[t],r.push(t);return r}.call(this),r=function(){var e,r;e=this.fetchNormal(),r=[];for(t in e)n=e[t],r.push(t);return r}.call(this),r.concat(e)},ProductCodes.prototype.containers=function(t){return this.fetchNormal()[t]||this.fetchJs()[t]||[]},ProductCodes.prototype.fetchJs=function(){var code,element,elements,i,len,ref,result;for(elements=document.querySelectorAll("[data-"+dataAttribute+"-js]"),result={},ref=this.removeFullContainers(elements),i=0,len=ref.length;i0&&o.push(n);return o},ProductCodes}()},{}],8:[function(t,n,e){var r,o,i,u,a;o=t("./product-codes.coffee"),r=t("./google-analytics.coffee"),u=t("./templates/rate.coffee"),a=t("./templates/rate-with-schema.coffee"),n.exports=i=function(){function t(t){this.minimumOpinionsToShow=t,this.productCodes=new o}var n,e,i;return e="trustvox-should-skip-filter",i="trustvox-display-rate-schema",t.prototype.attachRates=function(t,e){var o,i,u,a,c,f,s,l,p;for(a=null!=e?e.hide_empty:void 0,l=[],c=0,f=t.length;c=this.minimumOpinionsToShow||this._emptyRate(s),u=this._shouldDisplaySchema(o),p=n(s,u),o.insertAdjacentHTML("beforeEnd",p),c.push(r.addEvent(s));return c}.call(this));return l},n=function(t,n){return n?a(t):u(t)},t.prototype.fetchAllCodes=function(){var t;return t=this.productCodes.all()},t.prototype._dontRender=function(t,n,e){return!!t&&(!this._shouldSkipFilter(e)&&!this._hasMinimumOpinions(n))},t.prototype._shouldSkipFilter=function(t){return this._isTrue(t,e)},t.prototype._shouldDisplaySchema=function(t){return this._isTrue(t,i)},t.prototype._isTrue=function(t,n){return"true"===t.getAttribute("data-"+n)},t.prototype._hasMinimumOpinions=function(t){return 0!==t.count&&(!this.minimumOpinionsToShow||t.count>=this.minimumOpinionsToShow)},t.prototype._emptyRate=function(t){if(t.count<=2&&t.average<=2)return t.average=0,t.count=0},t}()},{"./google-analytics.coffee":6,"./product-codes.coffee":7,"./templates/rate-with-schema.coffee":10,"./templates/rate.coffee":11}],9:[function(t,n,e){var r,o;o=t("./config/app.coffee"),new(r=function(){function t(){var t;t=document.createElement("link"),t.type="text/css",t.rel="stylesheet",t.href=o.assetHost+"/widget.css",document.getElementsByTagName("head")[0].appendChild(t)}return t}())},{"./config/app.coffee":3}],10:[function(t,n,e){var r;r=t("../view-helpers.coffee"),n.exports=function(t){return'
\n
\n \n "+t.average+' de 5\n \n
\n \n
\n
\n \n ('+t.count+")\n \n
\n
"}},{"../view-helpers.coffee":13}],11:[function(t,n,e){var r;r=t("../view-helpers.coffee"),n.exports=function(t){return'
\n
\n
\n
\n
\n \n ('+t.count+")\n \n
\n
"}},{"../view-helpers.coffee":13}],12:[function(t,n,e){var r,o=[].slice;n.exports=r=function(){function t(){}return t.isArray=Array.isArray||function(t){return"[object Array]"==={}.toString.call(t)},t.extend=function(){var t,n,e,r,i,u,a;for(t=arguments[0],u=2<=arguments.length?o.call(arguments,1):[],n=0,r=u.length;n0?"ts-shelf-rate-enabled":"ts-shelf-rate-disabled"},t}()},{}],14:[function(t,n,e){(function(n){var e,r,o;o=t("domready"),e=t("./application.coffee"),r=t("./dom-change-event.coffee"),t("./stylesheet-loader.coffee"),o(function(){var t,o,i,u,a,c;if(_trustvox_shelf_rate)return i=function(){var t,n,e;for(e=[],t=0,n=_trustvox_shelf_rate.length;t=0&&n<=k};y.each=y.forEach=function(t,n,e){n=m(n,e);var r,o;if(S(t))for(r=0,o=t.length;r0?0:u-1;for(o||(r=n[i?i[a]:a],a+=t);a>=0&&a=3;return n(t,m(e,o,4),r,i)}};y.reduce=y.foldl=y.inject=O(1),y.reduceRight=y.foldr=O(-1),y.find=y.detect=function(t,n,e){var r=S(t)?y.findIndex:y.findKey,o=r(t,n,e);if(void 0!==o&&o!==-1)return t[o]},y.filter=y.select=function(t,n,e){var r=[];return n=b(n,e),y.each(t,function(t,e,o){n(t,e,o)&&r.push(t)}),r},y.reject=function(t,n,e){return y.filter(t,y.negate(b(n)),e)},y.every=y.all=function(t,n,e){n=b(n,e);for(var r=!S(t)&&y.keys(t),o=(r||t).length,i=0;i=0},y.invoke=_(function(t,n,e){var r,o;return y.isFunction(n)?o=n:y.isArray(n)&&(r=n.slice(0,-1),n=n[n.length-1]),y.map(t,function(t){var i=o;if(!i){if(r&&r.length&&(t=A(t,r)),null==t)return;i=t[n]}return null==i?i:i.apply(t,e)})}),y.pluck=function(t,n){return y.map(t,y.property(n))},y.where=function(t,n){return y.filter(t,y.matcher(n))},y.findWhere=function(t,n){return y.find(t,y.matcher(n))},y.max=function(t,n,e){var r,o,i=-(1/0),u=-(1/0);if(null==n||"number"==typeof n&&"object"!=typeof t[0]&&null!=t){t=S(t)?t:y.values(t);for(var a=0,c=t.length;ai&&(i=r)}else n=b(n,e),y.each(t,function(t,e,r){o=n(t,e,r),(o>u||o===-(1/0)&&i===-(1/0))&&(i=t,u=o)});return i},y.min=function(t,n,e){var r,o,i=1/0,u=1/0;if(null==n||"number"==typeof n&&"object"!=typeof t[0]&&null!=t){t=S(t)?t:y.values(t);for(var a=0,c=t.length;ar||void 0===e)return 1;if(e0?0:o-1;i>=0&&i0?u=i>=0?i:Math.max(i+a,u):a=i>=0?Math.min(i+1,a):i+a+1;else if(e&&i&&a)return i=e(r,o),r[i]===o?i:-1;if(o!==o)return i=n(f.call(r,u,a),y.isNaN),i>=0?i+u:-1;for(i=t>0?u:a-1;i>=0&&in?(r&&(clearTimeout(r),r=null),a=f,u=t.apply(o,i),r||(o=i=null)):r||e.trailing===!1||(r=setTimeout(c,s)),u};return f.cancel=function(){clearTimeout(r),a=0,r=o=i=null},f},y.debounce=function(t,n,e){var r,o,i=function(n,e){r=null,e&&(o=t.apply(n,e))},u=_(function(u){if(r&&clearTimeout(r),e){var a=!r;r=setTimeout(i,n),a&&(o=t.apply(this,u))}else r=y.delay(i,n,this,u);return o});return u.cancel=function(){clearTimeout(r),r=null},u},y.wrap=function(t,n){return y.partial(n,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,n=t.length-1;return function(){for(var e=n,r=t[n].apply(this,arguments);e--;)r=t[e].call(this,r);return r}},y.after=function(t,n){return function(){if(--t<1)return n.apply(this,arguments)}},y.before=function(t,n){var e;return function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=null),e}},y.once=y.partial(y.before,2),y.restArguments=_;var I=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],q=function(t,n){var e=P.length,r=t.constructor,o=y.isFunction(r)&&r.prototype||u,i="constructor";for(j(t,i)&&!y.contains(n,i)&&n.push(i);e--;)i=P[e],i in t&&t[i]!==o[i]&&!y.contains(n,i)&&n.push(i)};y.keys=function(t){if(!y.isObject(t))return[];if(d)return d(t);var n=[];for(var e in t)j(t,e)&&n.push(e);return I&&q(t,n),n},y.allKeys=function(t){if(!y.isObject(t))return[];var n=[];for(var e in t)n.push(e);return I&&q(t,n),n},y.values=function(t){for(var n=y.keys(t),e=n.length,r=Array(e),o=0;o1&&(r=m(r,n[1])),n=y.allKeys(t)):(r=L,n=M(n,!1,!1),t=Object(t));for(var o=0,i=n.length;o1&&(e=n[1])):(n=y.map(M(n,!1,!1),String),r=function(t,e){return!y.contains(n,e)}),y.pick(t,r,e)}),y.defaults=B(y.allKeys,!0),y.create=function(t,n){var e=w(t);return n&&y.extendOwn(e,n),e},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,n){return n(t),t},y.isMatch=function(t,n){var e=y.keys(n),r=e.length;if(null==t)return!r;for(var o=Object(t),i=0;i":">",'"':""","'":"'","`":"`"},U=y.invert(H),J=function(t){var n=function(n){return t[n]},e="(?:"+y.keys(t).join("|")+")",r=RegExp(e),o=RegExp(e,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,n):t}};y.escape=J(H),y.unescape=J(U),y.result=function(t,n,e){y.isArray(n)||(n=[n]);var r=n.length;if(!r)return y.isFunction(e)?e.call(t):e;for(var o=0;o/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},G=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(t){return"\\"+$[t]};y.template=function(t,n,e){!n&&e&&(n=e),n=y.defaults({},n,y.templateSettings);var r=RegExp([(n.escape||V).source,(n.interpolate||V).source,(n.evaluate||V).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(r,function(n,e,r,u,a){return i+=t.slice(o,a).replace(G,Q),o=a+n.length,e?i+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":r?i+="'+\n((__t=("+r+"))==null?'':__t)+\n'":u&&(i+="';\n"+u+"\n__p+='"),n}),i+="';\n",n.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";var u;try{u=new Function(n.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(t){return u.call(this,t,y)},f=n.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},y.chain=function(t){var n=y(t);return n._chain=!0,n};var X=function(t,n){return t._chain?y(n).chain():n};y.mixin=function(t){return y.each(y.functions(t),function(n){var e=y[n]=t[n];y.prototype[n]=function(){var t=[this._wrapped];return c.apply(t,arguments),X(this,e.apply(y,t))}}),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var n=i[t];y.prototype[t]=function(){var e=this._wrapped;return n.apply(e,arguments),"shift"!==t&&"splice"!==t||0!==e.length||delete e[0],X(this,e)}}),y.each(["concat","join","slice"],function(t){var n=i[t];y.prototype[t]=function(){return X(this,n.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[14]);