PageSourceSearch

https://coolconversion.com/includes/javascript-functions.min.js?v=7.12

js coolconversion.com collected 2026-09-25 14:25:43 UTC 18,173 bytes, 1 lines download raw bytes

1function digitsAfter(e){var t=(e=e.toString()).indexOf(".");return-1==t?0:e.length-t-1}function bestFmt(e,t,r){return t=void 0!==t?t:6,0==e||""==e?0:exactFraction((e=frac2dec(e))-parseInt(e),r)?float2rat_p(e,1e-6):Math.abs(e)<=1e7&&Math.abs(e)>=1e-4?sigFig(e,t):engNotation(e,t)}function bestFmtPlainText(e,t,r){return t=void 0!==t?t:6,0==e||""==e?"0":exactFraction((e=frac2dec(e))-parseInt(e),r)?float2rat_p_aux(e,1e-6):Math.abs(e)<=1e7&&Math.abs(e)>=1e-4?sigFig(e,t):engNotation(e,t).replace(/<[^>]*>/g,"")}function frac2dec(e){var t,r,a,o;return e=(e=(e=e.toString().trim().replace(". ",".").replace(" .",".")).replace(", ",",").replace(" ,",",")).replace(",","."),isNaN(e)?(a=1,0==e.indexOf("-")&&(a=-1,e=e.replace("-","")),1===(r=e.split("-")).length&&(r=e.split(" ")),r.length>1&&-1!==e.indexOf("/")?(t=parseFloat(r[0]),""!=(o=r[1].split("/"))[1]&&1*(parseFloat(o[0])/parseFloat(o[1])+t)*a):-1!==e.indexOf("/")&&(""!=(o=e.split("/"))[1]&&1*(parseFloat(o[0])/parseFloat(o[1]))*a)):1*e}function engNotation(e,t){if(t=void 0!==t?t:6,e=e.toString().replace(/[^0-9Ee.\-\/]/,""),0==(e=(e*=1).toString())||""==e)return 0;if(t<0)return 0;if((e=convertToEng(e=e.replace("E","e"))).indexOf("e")>-1){var r=e.toString().split("e"),a=roundDec(r[0],t),o=r[1];return"+"==o.substring(0,1)&&(o=o.substring(1,2)),a+" × 10<sup>"+o+"</sup>"}return sigFig(e,t)}function convertToEng(e){if(0==(e*=1)||""==e)return 0;e=frac2dec(e);var t=Math.floor(Math.log10(Math.abs(e)));return e/Math.pow(10,t)*1+"e"+t}function GCD(e,t){if("number"!=typeof e||"number"!=typeof t)return!1;for(e=Math.abs(e),t=Math.abs(t);t;){var r=t;t=e%t,e=r}return e}function reduce(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=function e(t,r){return r?e(r,t%r):t};return[e/(r=r(e,t)),t/r]}function exactFraction(e,t){var r,a="";(e=parseFloat(e))<0&&(e*=-1,a="-");var o,n,i=1e-6,c=float2rat_p(e,i),s=1,l=0,u=0,p=1,m=e;do{var f=Math.floor(m),d=s;s=f*s+l,l=d,d=u,u=f*u+p,p=d,m!==f&&(m=1/(m-f))}while(Math.abs(e-s/u)>i);r=Math.floor(s/u),s%u!==0&&(c=r>0?a+r+"&nbsp;<sup>"+s%u+"</sup>/<sub>"+u+"</sub>":a+"<sup>"+s+"</sup>/<sub>"+u+"</sub>");for(var h=(t||"").toLowerCase(),g=["inch","foot","feet","yard","mile","ounce","pound","stone","fluid ounce","cup","pint","quart","gallon","acre","square foot","square feet","square inch","square yard","cubic foot","cubic feet","cubic inch","cubic yard"],b=["meter","metre","kilometer","kilometre","centimeter","centimetre","millimeter","millimetre","gram","kilogram","tonne","metric ton","liter","litre","milliliter","millilitre","hectare","are","square meter","square metre","square kilometer","square kilometre","cubic meter","cubic metre"],k=!1,v=!1,q=0;q<g.length;q++)if(h.indexOf(g[q])>-1){k=!0;break}if(!k)for(q=0;q<b.length;q++)if(h.indexOf(b[q])>-1){v=!0;break}k?(o=["2","3","4","8","16","32"],n=["1/3","2/3","1/12","1/14"]):v?(o=["2","3","4"],n=["1/3","2/3"]):(o=["2","3","4","8","16","32"],n=["1/3","2/3","1/12","1/14"]);var y=o.indexOf(u.toString()),x=s%u+"/"+u,w=n.indexOf(x);return(y>-1||w>-1)&&c}function float2rat_p(e,t){t=void 0!==t?t:1e-6;var r="",a=1,o=0,n=0,i=1,c=e=parseFloat(e);do{var s=Math.floor(c),l=a;a=s*a+o,o=l,l=n,n=s*n+i,i=l,c=1/(c-s)}while(Math.abs(e-a/n)>t);var u=Math.floor(a/n);return r=a/n,a%n!==0&&(r=u>0?u+' <span class="fraction"><span class="top">'+a%n+'</span><span class="bottom">'+n+"</span></span>":'<span class="fraction"><span class="top">'+a+'</span><span class="bottom">'+n+"</span></span>"),r}function float2rat_p_aux(e,t){t=void 0!==t?t:1e-6;var r,a="",o=1,n=0,i=0,c=1,s=e=parseFloat(e);do{var l=Math.floor(s),u=o;o=l*o+n,n=u,u=i,i=l*i+c,c=u,s=1/(s-l)}while(Math.abs(e-o/i)>t);return r=Math.floor(o/i),a=o/i,o%i!==0&&(a=r>0?r+" "+o%i+"/"+i:o+"/"+i),a}function float2rat_p_error(x,tol){tol=void 0!==tol?tol:1e-6;var y=parseFloat(x),rat=float2rat_p_aux(x,tol),temp_arr="";temp_arr=rat.toString().indexOf(" ")>-1?rat.toString().split(" "):[0,rat];var integ=parseFloat(temp_arr[0]),frac=parseFloat(eval(temp_arr[1])),f=integ+frac,erro=Math.ceil(100*(f-y)/y*1e12)/1e12;return Math.ceil(f-y!==0)&&Math.abs(erro)>=1e-12?erro.toPrecision(2):0}function splitFraction(e){var t=0,r=e.split("/"),a=parseFloat(r[0]),o=parseFloat(r[1]);return t=isNaN(a)||isNaN(o)?isNaN(a)?isNaN(o)?"Please check the input":o:a:a/o,isNaN(t)?"NaN":t}function decToUsableFracion(e,t){if(Number.isInteger(e))return"";for(var r=Math.floor(e),a=Math.round((e-r)/(1/t)),o="";a%2==0&&t%2==0;)a/=2,t/=2;var n=reduce(a,t);return a=n[0],t=n[1],1==a&&1==t&&(r+=1),o=r>0?r:"",a>0&&1!=t?(r>0&&(o+="&nbsp;"),o+="<sup>"+a+"</sup>/<sub>"+t+"</sub>"):0}function decToUsableFracionPError(e,t){var r=e-Math.floor(e),a=Math.round(r*t)/t,o=Math.abs(100*(a-r)/r);return(o=o.toFixed(2))<1e-12?0:o}function printFraction(e,t){var r=Math.abs(e),a=Math.abs(t);return isNaN(r)||isNaN(a)?'<span class="fraction"><span class="top">'+e+'</span><span class="bottom">'+t+"</span></span>":e>=0&&t<0||e<=0&&t>0?'<span class="fraction"><span class="top">-'+r+'</span><span class="bottom">'+a+"</span></span>":'<span class="fraction"><span class="top">'+r+'</span><span class="bottom">'+a+"</span></span>"}function conversionFactorTxt(e){var t,r=float2rat_p(e,1e-6).toString().replace(/(<([^>]+)>)/gi,"").split("/"),a=r[0],o=r[1];if("1"==a&&null!=o)t="<span class='fraction'><span class='top'>1</span><span class='bottom'>"+o+"</span></span>";else if(Math.abs(e)<1e-4&&0!==e)t=engNotation(e,3);else{var n=e,i=1e-5,c=Math.max(.001,Math.abs(e)*i),s=Math.round(e);if(Math.abs(e-s)<=c)n=s;else for(var l=[2,3,4,5,6,8,10,12,16,32],u=0;u<l.length;u++){var p=l[u],m=e*p,f=Math.round(m),d=Math.max(.001,Math.abs(m)*i);if(Math.abs(m-f)<=d){n=f/p;break}}t=sigFig(n,6)}return t}function commaSeparatedToArray(e){for(var t=e.split(","),r=[],a=t.length,o=0,n=0;n<a;n++)isNaN(t[n])||""===t[n]||(r[o]=parseInt(t[n]),o++);return r}Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e});var toArr=commaSeparatedToArray;function factors(e){var t,r=[];for(t=1;t<=Math.floor(Math.sqrt(e));t+=1)e%t===0&&(r.push(t),e/t!==t&&r.push(e/t));return r.sort(function(e,t){return e-t}),r}function GCD(e){var t,r,a=commaSeparatedToArray(e),o=a.length,n=Math.abs(a[0]);for(t=1;t<o;t++){for(r=Math.abs(a[t]);n&&r;)n>r?n%=r:r%=n;n+=r}return n}function gcd(e,t){if(e<0&&(e=-e),t<0&&(t=-t),t>e){var r=e;e=t,t=r}for(;;){if(0==t)return e;if(0==(e%=t))return t;t%=e}}function lcm(e,t){return e*t/gcd(e,t)}function improperFractionToMixedNumber(e,t){var r=parseInt(e/t);return[r,reduceFraction(e-=r*t,t)]}function isReduced(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=function e(t,r){return r?e(r,t%r):t};return 1==(r=r(e,t))}function multiples(e,t){var r="";if(e>0&&t>0){for(var a=t/e,o=t.toString().length,n=[],i=1;i<=a&&o<35;i++){var c=e*i;
1n.push(c),o+=c.toString().length,o+=2}c!=t&&(n.push(t),n[n.length-2]="..."),r+=n.join(", ")}return r}function onlyNumbersOrFractions(e){return e=(e=(e=(e=e.replace(/[ ]+/g,"").trim()).replace(/[A-Z]+/g,"").trim()).replace(/[a-z]+/g,"").trim()).replace(/[!@=#$%¨&*()_+>:?}{;.}]+/g,"").trim(),document.getElementById("arrIn").value=e,e}function reduceFraction(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=function e(t,r){return r?e(r,t%r):t};return[e/(r=r(e,t)),t/r]}function simplify(e,t){for(var r=1,a=2,o=Math.min(e,t);a<=o;){for(;!(e%a+t%a);)e/=a,t/=a,r*=a;2==a&&a--,a+=2}return r}var quickSelectData={"square foot|acre":[100,500,1e3,5e3,1e4,2e4,43560],"acre|square foot":[.1,.25,.5,1,2,5,10,100],"square foot|square meter":[10,50,100,200,500,1e3,2e3],"square meter|square foot":[10,20,50,100,200,500,1e3],"square foot|hectare":[100,500,1e3,5e3,1e4,5e4],"hectare|square foot":[.1,.5,1,2,5,10,50],"acre|hectare":[1,2,5,10,50,100,500],"hectare|acre":[1,2,5,10,50,100,500],"square meter|acre":[100,500,1e3,4e3,1e4,4e4],"acre|square meter":[.1,.5,1,2,5,10,50],"square kilometer|square mile":[1,5,10,50,100,500,1e3],"square mile|square kilometer":[1,5,10,50,100,500],"square inch|square centimeter":[1,5,10,25,50,100],"square centimeter|square inch":[1,6.45,10,50,100,500],"hectare|are":[.1,.5,1,2,5,10,50],"are|hectare":[10,50,100,200,500,1e3],"are|square meter":[1,5,10,20,50,100],"square meter|are":[10,50,100,200,500,1e3,1e4],"acre|are":[1,2,5,10,50],"are|acre":[10,20,40,100,400],"square yard|square foot":[1,2,5,10,50,100],"square foot|square yard":[9,27,90,450,900],"square yard|square meter":[1,5,10,50,100,500],"square meter|square yard":[1.2,6,12,60,120,600],"square yard|acre":[1e3,4840,1e4,48400],"acre|square yard":[.1,.5,1,5,10],"square kilometer|square meter":[.001,.01,.1,.5,1],"square meter|square kilometer":[1e3,1e4,1e5,1e6],"square kilometer|hectare":[.1,.5,1,5,10,50],"hectare|square kilometer":[.01,.1,1,10,100],"square kilometer|acre":[.1,.5,1,5,10],"acre|square kilometer":[100,250,500,1e3,2500],"square mile|acre":[1,10,100,640],"acre|square mile":[640,1280,6400,64e3],"square mile|square meter":[.001,.01,.1,1],"square meter|square mile":[1e5,1e6,259e4],"square mile|hectare":[.1,1,10,100,259],"hectare|square mile":[100,259,1e3,2590],"kilogram|pound":[.5,1,2,5,10,20,50,70,100],"pound|kilogram":[1,5,10,20,50,100,150,200],"kilogram|ounce":[.1,.5,1,2,5,10],"ounce|kilogram":[1,2,4,8,16,32],"ounce|gram":[1,2,4,8,16,32],"gram|ounce":[10,50,100,250,500,1e3],"pound|ounce":[.5,1,2,5,10,20],"ounce|pound":[1,2,4,8,16,32],"kilogram|gram":[.001,.01,.1,.5,1,2,5],"gram|kilogram":[100,250,500,1e3,2500,5e3],"ton (short, us)|kilogram":[.5,1,2,5,10,20],"kilogram|ton (short, us)":[100,500,1e3,2e3,5e3],"ton (long, uk)|kilogram":[.5,1,2,5,10,20],"kilogram|ton (long, uk)":[100,500,1e3,2e3,5e3],"tonne|kilogram":[.1,.5,1,2,5,10],"kilogram|tonne":[100,500,1e3,2e3,5e3,1e4],"stone|pound":[1,2,5,10,15,20],"pound|stone":[14,28,70,140,210],"stone|kilogram":[1,2,5,10,15,20],"kilogram|stone":[6.35,12.7,31.75,63.5,127],"meter|foot":[1,2,5,10,20,50,100],"foot|meter":[1,3,5,10,20,50,100],"centimeter|inch":[1,2.54,5,10,20,30,50,100],"inch|centimeter":[1,6,12,24,36,48],"meter|centimeter":[.01,.1,.5,1,2,5],"centimeter|meter":[10,50,100,200,500,1e3],"meter|kilometer":[100,500,1e3,5e3,1e4],"kilometer|meter":[.001,.01,.1,.5,1,5,10],"kilometer|mile":[1,5,10,50,100,500,1e3],"mile|kilometer":[1,5,10,26.2,50,100],"foot|inch":[.5,1,2,5,10,20,50],"inch|foot":[6,12,24,36,48,72],"yard|foot":[1,2,5,10,50,100],"foot|yard":[3,6,30,100,300],"yard|meter":[1,2,5,10,50,100],"meter|yard":[.9144,1.8,4.5,9,45,91],"mile|foot":[.1,.5,1,5,10],"foot|mile":[1e3,2640,5280,1e4],"millimeter|inch":[1,10,25,50,100,250],"inch|millimeter":[.5,1,2,6,12,24],"millimeter|centimeter":[1,5,10,50,100,500],"centimeter|millimeter":[.1,1,2,5,10,50],"liter|gallon [liquid]":[1,2,5,10,20,50,100],"gallon [liquid]|liter":[1,5,10,20,50,100],"liter|milliliter":[.001,.01,.1,.5,1,2],"milliliter|liter":[10,50,100,500,1e3,2e3],"milliliter|ounce":[10,50,100,250,500,1e3],"ounce|milliliter":[1,2,4,8,16,32],"cubic meter|liter":[.001,.01,.1,.5,1,5],"liter|cubic meter":[100,500,1e3,5e3,1e4],"cubic meter|cubic foot":[1,5,10,50,100],"cubic foot|cubic meter":[10,50,100,500,1e3],"gallon [liquid]|ounce"
1:[.125,.25,.5,1,2,5],"ounce|gallon [liquid]":[8,16,32,64,128],"pint|ounce":[.5,1,2,4,8],"ounce|pint":[16,32,64,128],"quart|pint":[.5,1,2,4,8],"pint|quart":[2,4,8,16],"cup|ounce":[1,2,4,8],"ounce|cup":[8,16,32,64],"celsius|fahrenheit":[-40,-20,0,10,20,25,30,37,100],"fahrenheit|celsius":[-40,0,32,50,75,98.6,100,212],"celsius|kelvin":[-273.15,-40,0,20,25,100],"kelvin|celsius":[0,273.15,293.15,300,373.15],"fahrenheit|kelvin":[-40,0,32,70,100,212],"kelvin|fahrenheit":[255,273,293,310,373],"pascal|psi":[1e3,1e4,1e5,2e5,5e5],"psi|pascal":[1,10,14.7,20,50,100],"bar|psi":[.5,1,1.5,2,3,5,10],"psi|bar":[14.7,30,50,100,200],"bar|pascal":[.001,.01,.1,.5,1,2],"pascal|bar":[100,1e3,1e4,1e5,5e5],"kilopascal|psi":[10,50,100,200,500,1e3],"psi|kilopascal":[1,10,20,50,100],"bar|kilopascal":[.1,.5,1,2,5,10],"kilopascal|bar":[10,50,100,200,500,1e3],"megapascal|psi":[.1,.5,1,5,10],"psi|megapascal":[100,500,1e3,5e3,1e4],"bar|atmosphere [standard]":[.5,1,2,5,10,20],"atmosphere [standard]|bar":[1.01,2,5,10,20],"psi|kgf/cm2":[1,10,14.7,50,100],"kgf/cm2|psi":[1.03,5,10,50,100],"kilometer per hour|mile per hour":[10,20,50,60,80,100,120],"mile per hour|kilometer per hour":[10,20,30,55,60,70,100],"meter per second|kilometer per hour":[1,5,10,20,50,100],"kilometer per hour|meter per second":[10,36,60,100,120],"meter per second|mile per hour":[1,10,20,50,100],"mile per hour|meter per second":[10,30,55,65,100],"meter per second|foot per second":[1,5,10,20,50,100],"foot per second|meter per second":[1,10,30,100,300],"kilometer per hour|foot per second":[10,30,50,100,120],"foot per second|kilometer per hour":[1,10,30,88,300],"knot|kilometer per hour":[1,5,10,20,50,100],"kilometer per hour|knot":[5,18.5,50,100,185],"knot|mile per hour":[1,5,10,20,50,100],"mile per hour|knot":[5,10,30,60,100],"watt|horsepower (electric)":[100,500,746,1e3,5e3,1e4],"horsepower (electric)|watt":[.5,1,2,5,10,50,100],"kilowatt|horsepower (electric)":[1,5,10,50,100,500],"horsepower (electric)|kilowatt":[1,5,10,50,100,200],"watt|kilowatt":[100,500,1e3,5e3,1e4],"kilowatt|watt":[.001,.01,.1,1,10],"megawatt|kilowatt":[.001,.01,.1,1,10],"kilowatt|megawatt":[100,500,1e3,5e3,1e4],"watt|btu/hour":[10,50,100,500,1e3],"btu/hour|watt":[3.41,10,34,100,341],"joule|calorie (thermochemical)":[1e3,4184,1e4,5e4],"calorie (thermochemical)|joule":[1,10,100,500,1e3],"kilowatt-hour|joule":[.001,.01,.1,1,10],"joule|kilowatt-hour":[1e3,3600,1e4,1e5],"watt-hour|btu":[1,10,100,500,1e3],"btu|watt-hour":[.29,3,29,100,293],"kilowatt-hour|btu":[.001,.01,.1,1,10],"btu|kilowatt-hour":[1e3,3412,1e4,34120],"microfarad|picofarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"picofarad|microfarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"microfarad|nanofarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"nanofarad|microfarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"nanofarad|picofarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"picofarad|nanofarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"farad|microfarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"microfarad|farad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"farad|millifarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"millifarad|farad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"millifarad|microfarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"microfarad|millifarad":[1,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2],"degree|radian":[0,30,45,60,90,180,270,360],"radian|degree":[0,.5,1,1.5708,3.1416,6.2832],"degree|gradian":[45,90,180,270,360],"gradian|degree":[50,100,200,300,400],"hour|minute":[.5,1,2,4,8,12,24],"minute|hour":[15,30,60,120,240,480],"minute|second":[1,5,10,30,60],"second|minute":[60,120,300,600,1800,3600],"hour|second":[.5,1,2,4,8],"second|hour":[1800,3600,7200,14400,28800],"day|hour":[.5,1,2,7,30],"hour|day":[24,48,168,720],"week|day":[1,2,4,8,12],"day|week":[7,14,28,84,365]};function updateQuickSelect(e,t,r){r=r||"quick-select";var a=document.getElementById(r);if(a){e=(e||"").replace(/\s*\[.*?\]\s*$/,"").trim().toLowerCase(),t=(t||"").replace(/\s*\[.*?\]\s*$/,"").trim().toLowerCase();for(var o=quickSelectData[e+"|"+t];a.options.length>1;)a.remove(1);o&&0!==o.length||(o=[1,2,5,10,20,50,100,500,1e3]),o.forEach(function(e){var t=document.createElement("option");t.value=e,t.textContent=e,a.appendChild(t)}),a.style.display="",a.hidden=!1,a.selectedIndex=0}}
1function onQuickSelectValue(e,t,r){if(e&&""!==e){t=t||"input1";var a=document.getElementById(t);if(a){a.value=e,window.matchMedia("(max-width: 768px)").matches||a.focus();var o=new Event("input",{bubbles:!0});a.dispatchEvent(o),"function"==typeof r&&r()}var n=document.getElementById("quick-select");n&&(n.selectedIndex=0)}}function initQuickSelect(e,t,r,a,o){e=e||"quick-select",t=t||"input1",r=r||"unitMenuA",a=a||"unitMenuB";var n=document.getElementById(e),i=document.getElementById(r),c=document.getElementById(a);if(n){var s=n.cloneNode(!0);n.parentNode.replaceChild(s,n),(n=s).addEventListener("change",function(){onQuickSelectValue(this.value,t,o)});var l=function(){setTimeout(function(){updateQuickSelect(i.options[i.selectedIndex].text,c?c.options[c.selectedIndex].text:"",e)},100)},u=function(){setTimeout(function(){updateQuickSelect(i?i.options[i.selectedIndex].text:"",c.options[c.selectedIndex].text,e)},100)};i&&(i._quickSelectHandler&&i.removeEventListener("change",i._quickSelectHandler),i._quickSelectHandler=l,i.addEventListener("change",l)),c&&(c._quickSelectHandler&&c.removeEventListener("change",c._quickSelectHandler),c._quickSelectHandler=u,c.addEventListener("change",u)),setTimeout(function(){i&&c&&updateQuickSelect(i.options[i.selectedIndex].text,c.options[c.selectedIndex].text,e)},500)}}function plural(e,t){t=void 0!==t?t:2,t=parseFloat(t);var r=Math.abs(t);if(r>=.875&&r<=1.125)return e;if(0===t)return e;var a={is:"are","there is":"there are",foot:"feet",inch:"inches",was:"were"};return a[e.toLowerCase()]?a[e.toLowerCase()]:e.match(/[^aeiou]y$/i)?e.slice(0,-1)+"ies":e.match(/(s|x|ch|sh)$/i)?e+"es":e+"s"}function copyToClipboard(e,t,r,a,o){return a=a||"Copied!",o=o||"Copy",navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(function(){showCopyFeedback(t,r,a,o)}).catch(function(n){console.error("Clipboard API failed:",n),fallbackCopy(e,t,r,a,o)}):(fallbackCopy(e,t,r,a,o),Promise.resolve())}function fallbackCopy(e,t,r,a,o){var n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0",document.body.appendChild(n),n.select();try{document.execCommand("copy"),showCopyFeedback(t,r,a,o)}catch(e){console.error("Fallback copy failed:",e)}document.body.removeChild(n)}function showCopyFeedback(e,t,r,a){if(e){var o=e.textContent;e.textContent=r,t&&t.classList.add("copied"),setTimeout(function(){e.textContent=a||o,t&&t.classList.remove("copied")},2e3)}}function shareViaWhatsApp(e){var t="https://wa.me/?text="+encodeURIComponent(e);window.open(t,"_blank")}function copyCurrentUrl(e){copyToClipboard(window.location.href,e,null,"Link copied!","")}function debounce(e,t){var r;return function(){var a=this,o=arguments;clearTimeout(r),r=setTimeout(function(){r=null,e.apply(a,o)},t)}}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.