{"version":3,"file":"distanceMixin-zxg0wk3d.js","sources":["../../src/mixins/distanceMixin.vue"],"sourcesContent":["<script>\nexport default {\n computed: {\n unit() {\n if (this.$fischer.lengthUnit() === 'miles') {\n return this.$dict.get('online-Shop.Global-Labels.Length-Units.Miles');\n }\n\n return this.$dict.get('online-Shop.Global-Labels.Length-Units.Kilometres');\n },\n },\n methods: {\n roundDistance(distance) {\n if (!distance || distance === null) {\n return 0;\n }\n if (distance > 10) {\n return Math.round(distance);\n }\n return distance.toLocaleString(undefined, {\n maximumFractionDigits: 1,\n minimumFractionDigits: 0,\n });\n },\n lengthUnitDistance(distance) {\n // calculate metre distance in unit of length\n if (this.$fischer.lengthUnit() === 'miles') {\n return this.roundDistance(distance * 1609.34);\n }\n\n return distance * 1000;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","distance"],"mappings":"AACK,MAAAA,EAAU,CACb,SAAU,CACR,MAAO,CACL,OAAI,KAAK,SAAS,WAAU,IAAO,QAC1B,KAAK,MAAM,IAAI,8CAA8C,EAG/D,KAAK,MAAM,IAAI,mDAAmD,CAC1E,CACF,EACD,QAAS,CACP,cAAcC,EAAU,CACtB,MAAI,CAACA,GAAYA,IAAa,KACrB,EAELA,EAAW,GACN,KAAK,MAAMA,CAAQ,EAErBA,EAAS,eAAe,OAAW,CACxC,sBAAuB,EACvB,sBAAuB,CACzB,CAAC,CACF,EACD,mBAAmBA,EAAU,CAE3B,OAAI,KAAK,SAAS,WAAU,IAAO,QAC1B,KAAK,cAAcA,EAAW,OAAO,EAGvCA,EAAW,GACnB,CACF,CACH"}