<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">define(['jquery','underscore'],function($,_){'use strict';var globalPriceFormat={requiredPrecision:2,integerRequired:1,decimalSymbol:',',groupSymbol:',',groupLength:','};function stringPad(string,times){return new Array(times+1).join(string);}
function formatPriceLocale(amount,format,isShowSign){var s='',precision,pattern,locale,r;format=_.extend(globalPriceFormat,format);precision=isNaN(format.requiredPrecision=Math.abs(format.requiredPrecision))?2:format.requiredPrecision;pattern=format.pattern||'%s';locale=window.LOCALE||'en-US';if(isShowSign===undefined||isShowSign===true){s=amount&lt;0?'-':isShowSign?'+':'';}else if(isShowSign===false){s='';}
pattern=pattern.indexOf('{sign}')&lt;0?s+pattern:pattern.replace('{sign}',s);amount=Number(Math.round(Math.abs(+amount||0)+'e+'+precision)+('e-'+precision));r=amount.toLocaleString(locale,{minimumFractionDigits:precision});return pattern.replace('%s',r).replace(/^\s\s*/,'').replace(/\s\s*$/,'');}
function formatPrice(amount,format,isShowSign){var s='',precision,integerRequired,decimalSymbol,groupSymbol,groupLength,pattern,i,pad,j,re,r,am;format=_.extend(globalPriceFormat,format);precision=isNaN(format.requiredPrecision=Math.abs(format.requiredPrecision))?2:format.requiredPrecision;integerRequired=isNaN(format.integerRequired=Math.abs(format.integerRequired))?1:format.integerRequired;decimalSymbol=format.decimalSymbol===undefined?',':format.decimalSymbol;groupSymbol=format.groupSymbol===undefined?'.':format.groupSymbol;groupLength=format.groupLength===undefined?3:format.groupLength;pattern=format.pattern||'%s';if(isShowSign===undefined||isShowSign===true){s=amount&lt;0?'-':isShowSign?'+':'';}else if(isShowSign===false){s='';}
pattern=pattern.indexOf('{sign}')&lt;0?s+pattern:pattern.replace('{sign}',s);i=parseInt(amount=Number(Math.round(Math.abs(+amount||0)+'e+'+precision)+('e-'+precision)),10)+'';pad=i.length&lt;integerRequired?integerRequired-i.length:0;i=stringPad('0',pad)+i;j=i.length&gt;groupLength?i.length%groupLength:0;re=new RegExp('(\\d{'+groupLength+'})(?=\\d)','g');am=Number(Math.round(Math.abs(amount-i)+'e+'+precision)+('e-'+precision));r=(j?i.substr(0,j)+groupSymbol:'')+
i.substr(j).replace(re,'$1'+groupSymbol)+
(precision?decimalSymbol+am.toFixed(precision).replace(/-/,0).slice(2):'');return pattern.replace('%s',r).replace(/^\s\s*/,'').replace(/\s\s*$/,'');}
function objectDeepClone(obj){return JSON.parse(JSON.stringify(obj));}
function findOptionId(element){var re,id,name;if(!element){return id;}
name=$(element).attr('name');if(name.indexOf('[')!==-1){re=/\[([^\]]+)?\]/;}else{re=/_([^\]]+)?_/;}
id=re.exec(name)&amp;&amp;re.exec(name)[1];if(id){return id;}}
return{formatPriceLocale:formatPriceLocale,formatPrice:formatPrice,deepClone:objectDeepClone,strPad:stringPad,findOptionId:findOptionId};});</pre></body></html>