/* Copyright (c) 2017 Davis Marques <dmarques@freshbits.io>. Compiled 2017-02-10 11:02:11 */

"use strict";function FeedbackController($scope,$http,$location){$scope.STATES={READY:0,FORM:1,BUTTON:2,SENT:4,SUCCESS:5,ERROR:6},$scope.data={},$scope.message="",$scope.recaptcha=null,$scope.state=$scope.STATES.READY,$scope.hideForm=function(){$scope.state=$scope.STATES.BUTTON},$scope.setupRecaptcha=function(){window.onRecaptchaCallback=function(){$scope.recaptcha=grecaptcha.render("g-recaptcha",{sitekey:$scope.ctrl.recaptcha})}},$scope.showForm=function(){$scope.state=$scope.STATES.FORM},$scope.submit=function(){var url=($scope.ctrl.method||"post",$scope.ctrl.recaptcha||null,$scope.ctrl.url||"/feedback");$scope.data.referrer=$location.absUrl(),$scope.state=$scope.STATES.SENT,$http.post(url,$scope.data).then(function(){if($scope.recaptcha){var response=grecaptcha.getResponse($scope.recaptcha);response||console.info("failed")}$scope.message="Thanks for your feedback!",$scope.state=$scope.STATES.SUCCESS,setTimeout(function(){$scope.data={},$scope.state=$scope.STATES.BUTTON,$scope.$apply()},5e3)}).catch(function(err){$scope.message="Uh oh, we couldn't send your feedback!",$scope.state=$scope.STATES.ERROR,setTimeout(function(){$scope.state=$scope.STATES.BUTTON,$scope.$apply()},5e3)})}}angular.module("simple-feedback",[]).controller("FeedbackController",["$scope","$http","$location",FeedbackController]).directive("feedbackWidget",[function(){return{bindToController:!0,controller:"FeedbackController",controllerAs:"ctrl",link:function(scope,el,attrs,c){attrs.recaptcha&&scope.setupRecaptcha()},restrict:"A",scope:{method:"=method",recaptcha:"=recaptcha",url:"=url"},template:'<div class="transcluded" ng-transclude></div>',transclude:!0}}]);
//# sourceMappingURL=angular-simple-feedback.min.js.map
/* Copyright (c) 2017 Davis Marques <dmarques@freshbits.io>. Compiled 2017-02-10 11:02:33 */

"use strict";function FeedbackController($scope,$http,$location){$scope.STATES={READY:0,FORM:1,BUTTON:2,SENT:4,SUCCESS:5,ERROR:6},$scope.data={},$scope.message="",$scope.recaptcha=null,$scope.state=$scope.STATES.READY,$scope.hideForm=function(){$scope.state=$scope.STATES.BUTTON},$scope.setupRecaptcha=function(){window.onRecaptchaCallback=function(){$scope.recaptcha=grecaptcha.render("g-recaptcha",{sitekey:$scope.ctrl.recaptcha})}},$scope.showForm=function(){$scope.state=$scope.STATES.FORM},$scope.submit=function(){var url=($scope.ctrl.method||"post",$scope.ctrl.recaptcha||null,$scope.ctrl.url||"/feedback");$scope.data.referrer=$location.absUrl(),$scope.state=$scope.STATES.SENT,$http.post(url,$scope.data).then(function(){if($scope.recaptcha){var response=grecaptcha.getResponse($scope.recaptcha);response||console.info("failed")}$scope.message="Thanks for your feedback!",$scope.state=$scope.STATES.SUCCESS,setTimeout(function(){$scope.data={},$scope.state=$scope.STATES.BUTTON,$scope.$apply()},5e3)}).catch(function(err){$scope.message="Uh oh, we couldn't send your feedback!",$scope.state=$scope.STATES.ERROR,setTimeout(function(){$scope.state=$scope.STATES.BUTTON,$scope.$apply()},5e3)})}}angular.module("simple-feedback",[]).controller("FeedbackController",["$scope","$http","$location",FeedbackController]).directive("feedbackWidget",[function(){return{bindToController:!0,controller:"FeedbackController",controllerAs:"ctrl",link:function(scope,el,attrs,c){attrs.recaptcha&&scope.setupRecaptcha()},restrict:"A",scope:{method:"=method",recaptcha:"=recaptcha",url:"=url"},template:'<div class="transcluded" ng-transclude></div>',transclude:!0}}]);
//# sourceMappingURL=angular-simple-feedback.min.js.map
Update dist files