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I,GAAA,IAAAI,EAAAL,EAAA0H,MAAA9H,EAAAD,GAAA,SAAAgI,EAAA3H,GAAA4F,EAAAvF,EAAAR,EAAAI,EAAA0H,EAAAC,EAAA,OAAA5H,EAAA,UAAA4H,EAAA5H,GAAA4F,EAAAvF,EAAAR,EAAAI,EAAA0H,EAAAC,EAAA,QAAA5H,EAAA,CAAA2H,OAAA,QA8BS,gBAAAE,GAAA,OAAAlB,EAAAe,MAAA,KAAAhJ,UAAA,EAdqD,GAe1D,GAGJ","sources":["webpack://floordepot/./wwwroot/tenant/floordepot/app/val.ts","webpack://floordepot/./wwwroot/tenant/floordepot/app/pages/trade/join.ts"],"sourcesContent":["//var $ = require('jquery');\n//var validation = require('jquery-validation');\n//var unobtrusiveValidation = require('jquery-validation-unobtrusive');\n//var gritter = require('gritter');\n//var ladda = require('ladda');\n\nexport default class Val {\n\n public static displayErrors(responseText:any, validationSummarySelector = null) {\n if (responseText === \"\")\n return;\n\n var error = '';\n var focusOnId = '';\n \n // we probably have already parsed json into JS objects from axios\n if (typeof responseText === 'object' && !Array.isArray(responseText) && responseText !== null)\n {\n for (var prop in responseText) {\n // important check that this is objects own property \n // not from prototype prop inherited\n if (responseText.hasOwnProperty(prop)) {\n if (index === 0)\n focusOnId = prop;\n \n error += responseText[prop] + \"<br />\";\n \n $(\"#\" + prop).addClass('invalid is-invalid').removeClass('valid is-valid');\n\n $('[data-valmsg-for=\"' + prop + '\"]')\n .removeClass('field-validation-valid')\n .addClass('field-validation-invalid')\n .html(responseText[prop][0]);\n \n index++;\n }\n }\n }\n\n if (error !== '') {\n $(validationSummarySelector ?? \".display-errors\").html(error).removeClass('d-none');\n \n if (focusOnId !== '') {\n $(\"#\" + focusOnId).trigger('focus');\n } else {\n //$('html, body').animate({ scrollTop: 0 }, 'slow');\n }\n }\n \n return;\n \n var data = JSON.parse(responseText); // parse the response into a JavaScript object\n\n \n \n\n if (!$.isEmptyObject(data.Errors)) {\n var index = 0;\n for (var prop in data.Errors) {\n // important check that this is objects own property \n // not from prototype prop inherited\n if (data.Errors.hasOwnProperty(prop)) {\n if (index === 0)\n focusOnId = prop;\n error += data.Errors[prop] + \"<br />\";\n index++;\n }\n }\n } else if (!$.isEmptyObject(data.modelState)) {\n var index = 0;\n for (var prop in data.modelState) {\n if (data.modelState.hasOwnProperty(prop)) {\n var errors = data.modelState[prop].Errors;\n for (var prop2 in errors) {\n if (errors.hasOwnProperty(prop2)) {\n error += data.modelState[prop].Errors[prop2] + \"<br />\";\n }\n }\n }\n index++;\n }\n } else {\n\n // for cases where model state errors are returned from api controllers.\n if (!$.isEmptyObject(data.ModelState)) {\n for (var prop in data.ModelState) {\n // important check that this is objects own property \n // not from prototype prop inherited\n if (data.ModelState.hasOwnProperty(prop)) {\n error += data.ModelState[prop] + \"<br />\";\n }\n }\n } else if (data.ExceptionMessage) {\n error = data.ExceptionMessage;\n //} else if (data.Message) {\n // error = data.Message;\n // // cases where a message/exceptionMessage is passed\n } else if (!$.isEmptyObject(data)) {\n var index = 0;\n\n // THIS IS JUST A STOP GAP UNTIL CLIENT SIDE VALIDATION IS WORKING FOR FLUENT VALIDATION IN .NET CORE\n \n // clear out any errors we displayed previously - they may have turned valid now\n $(\".invalid\").removeClass('invalid');\n $('.field-validation-invalid').removeClass('field-validation-invalid').html('');\n\n for (var prop in data) {\n if (prop === '') {\n error += \"<li>\" + data[prop][0] + \"</li>\";\n } else {\n if (index === 0)\n focusOnId = prop;\n // important check that this is objects own property \n // not from prototype prop inherited\n if (data.hasOwnProperty(prop)) {\n $(\"#\" + prop).addClass('invalid is-invalid').removeClass('valid is-valid');\n\n $('[data-valmsg-for=\"' + prop + '\"]')\n .removeClass('field-validation-valid')\n .addClass('field-validation-invalid')\n .html(data[prop][0]);\n error += data[prop][0] + \"<br /><br />\";\n }\n index++;\n }\n }\n\n if (focusOnId !== '') {\n $(\"#\" + focusOnId).focus();\n } else {\n //$('html, body').animate({ scrollTop: 0 }, 'slow');\n }\n }\n }\n\n if (error !== '') {\n $(validationSummarySelector ?? \".display-errors\").html(error).removeClass('d-none');\n // show the error\n //$.gritter.add({\n // title: 'Error',\n // text: error,\n // class_name: 'gritter-error'\n //});\n\n if (focusOnId !== '') {\n $(\"#\" + focusOnId).focus();\n } else {\n //$('html, body').animate({ scrollTop: 0 }, 'slow');\n }\n }\n }\n}","import axios from \"axios\";\n\ndeclare var grecaptcha: any;\nimport val from '../../val';\nimport * as Ladda from 'ladda';\n\n$(\"#tradeform\").on('submit', function(e) {\n \n e.preventDefault();\n var form = $(this);\n\n var l = Ladda.create(document.querySelector('#btn-signup'));\n l.start();\n \n var apiKey = $(this).attr('data-gapikey');\n\n grecaptcha.ready(function() {\n grecaptcha.execute(apiKey, { action: 'contact' }).then(async function(token) {\n $('#RecaptchaToken').val(token);\n\n // submit\n var data = form.serialize();\n \n try {\n var result = await axios.post('/trade/join', data);\n window.location.href = '/trade/done';\n }\n catch(err) {\n val.displayErrors(err.response.data);\n l.stop();\n }\n });\n });\n\n\n})"],"names":["Val","_classCallCheck","key","value","responseText","validationSummarySelector","arguments","length","undefined","index","error","focusOnId","_typeof","Array","isArray","prop","hasOwnProperty","$","addClass","removeClass","html","trigger","_regeneratorRuntime","e","t","r","Object","prototype","n","o","defineProperty","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","on","preventDefault","form","this","Ladda","document","querySelector","start","apiKey","attr","grecaptcha","ready","execute","action","_ref","_callee","token","data","_context","val","serialize","axios","post","window","location","href","t0","displayErrors","response","apply","_next","_throw","_x"],"sourceRoot":""}