"use strict";app.controller("WizardCtrl",["$scope","toaster",function(e,n){e.currentStep=1,e.form={next:function(n){if(e.toTheTop(),n.$valid)t();else{var r=null,o=null;for(r in n)"$"!=r[0]&&(null!==o||n[r].$valid||(o=n[r].$name),n[r].$pristine&&(n[r].$dirty=!0));angular.element(".ng-invalid[name="+o+"]").focus(),i()}},prev:function(n){e.toTheTop(),r()},goTo:function(n,t){parseInt(e.currentStep)>parseInt(t)?(e.toTheTop(),o(t)):n.$valid?(e.toTheTop(),o(t)):i()},submit:function(){},reset:function(){}};var t=function(){e.currentStep++},r=function(){e.currentStep--},o=function(n){e.currentStep=n},i=function(e){n.pop("error","Error","please complete the form in this step before proceeding")}}]);