e(outputSize, 0);
					canvasCtx.scale(-1, 1);
				}
				canvasCtx.drawImage(img, (imageWidth - imageHeight) / 2, 0, imageHeight, imageHeight, 0, 0, outputSize, outputSize);
				canvasCtx.restore();
				const dataURL = canvasElement.toDataURL();
				previewElement.src = dataURL;
				resizeOutput();
				document.querySelectorAll('.step-download').forEach(show);
				document.querySelectorAll('.step-capture').forEach(hide);
				canvasContainer.style.backgroundImage = 'none';
				stopCamera();
				downloadFn = 