(function(){SS.entities.Currency=function(G,E,F,D,B,C,A){this.id=G;this.symbol=E;this.thousandsSeparator=(F||",").replace("&apos;","'");this.decimalSeparator=(D||".").replace("&apos;","'");this.symbolOnLeft=B==null?true:B;this.spaceBetweenAmountAndSymbol=C==null?false:C;this.roundingCoefficient=A||new Number(1/100)};SS.entities.Currency.getCurrencyFromJsonObject=function(C){var B=C.currency,A=new SS.entities.Currency(B.id,B.symbol,B.thousandsSeparator,B.decimalSeparator,B.symbolOnLeft,B.spaceBetweenAmountAndSymbol,B.roundingCoefficient/1000);return A};SS.entities.Currency.prototype={formatPrice:function(B,C,D,A){this.formatPrice(B,C,D,A,true)},formatPrice:function(H,A,C,K,E){var B="";if(!K){if(isNaN(H)||H==null||typeof (H)=="undefined"||isNaN(parseFloat(H))){return(H)}}var I=this.symbol||"";var D;if(!K){D=SS.util.roundByCoefficient(H,this.roundingCoefficient);B=SS.util.formatThousands(Math.floor(D))}else{B=H}if(!K){if(A>0){B+="."+SS.util.pad0(Math.round((D-Math.floor(D))*100)).substring(0,A)}B=B.replace(/\,/g,"!").replace(/\./g,"#").replace(/\!/g,this.thousandsSeparator).replace(/\#/g,this.decimalSeparator)}var G=(this.spaceBetweenAmountAndSymbol?" ":""),F=0;if(E){for(;F<5;F++){B=B.replace(" ","\u00a0");G=G.replace(" ","\u00a0")}}var J;if(this.symbolOnLeft){J=I+""+G}else{J=G+I}if(J!=""&&C){J='<span class="symbol">'+J+"</span>"}if(this.symbolOnLeft){B=J+B}else{B=B+J}return(B)}}})();