{"version":3,"sources":["webpack:///webpack/bootstrap 4b14b2fe0d2f00fd3acc?6fbb****************************************************","webpack:///./cartridges/app_bata_sfra/cartridge/client/default/js/registrationPhoneProcess.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","id","loaded","modules","call","m","c","p","$","document","ready","submit","e","preventDefault","url","this","attr","data","phoneNumber","val","csrf_token","removeClass","spinner","start","ajax","type","dataType","success","stop","modal","find","text","error","addClass","err","otpCode","location","redirectUrl"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAC,WACAE,GAAAH,EACAI,QAAA,GAUA,OANAC,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,QAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,GAGAV,EAAA,mBCtCA,aA8FAW,EAAEC,UAAUC,OAvFRF,EAAE,uCAAuCG,OAAO,SAAUC,GACtDA,EAAEC,iBACF,IAAIC,EAAMN,EAAEO,MAAMC,KAAK,aACnBC,GACAC,YAAaV,EAAE,8CAA8CW,MAC7DC,WAAYZ,EAAE,6CAA6CW,OAG/DX,EAAE,8CAA8Ca,YAAY,cAC5Db,EAAEO,MAAMO,UAAUC,QAElBf,EAAEgB,MACEV,IAAKA,EACLW,KAAM,OACNC,SAAU,OACVT,KAAMA,EACNU,QAAS,SAAUV,GACXA,EAAKU,SACLnB,EAAEO,MAAMO,UAAUM,OAClBpB,EAAE,uCAAuCqB,MAAM,QAC/CrB,EAAE,+CAA+CW,IAAIF,EAAKC,aAC1DV,EAAE,wCAAwCqB,MAAM,UAEhDrB,EAAE,wCAAwCsB,KAAK,oBAAoBC,KAAKd,EAAKe,OAC7ExB,EAAE,8CAA8CyB,SAAS,cACzDzB,EAAEO,MAAMO,UAAUM,SAG1BI,MAAO,SAAUE,GACb1B,EAAE,yCAAyCsB,KAAK,oBAAoBC,KAAKd,EAAKe,OAC9ExB,EAAE,8CAA8CyB,SAAS,cACzDzB,EAAEO,MAAMO,UAAUM,iBAW9BpB,EAAE,wCAAwCG,OAAO,SAAUC,GACvDA,EAAEC,iBACF,IAAIC,EAAMN,EAAEO,MAAMC,KAAK,aACnBC,GACAkB,QAAS3B,EAAE,2CAA2CW,MACtDD,YAAaV,EAAE,+CAA+CW,MAC9DC,WAAYZ,EAAE,8CAA8CW,OAGhEX,EAAE,2CAA2Ca,YAAY,cACzDb,EAAEO,MAAMO,UAAUC,QAElBf,EAAEgB,MACEV,IAAKA,EACLW,KAAM,OACNC,SAAU,OACVT,KAAMA,EACNU,QAAS,SAAUV,GACXA,EAAKU,SACLnB,EAAEO,MAAMO,UAAUM,OAClBpB,EAAE,wCAAwCqB,MAAM,QAChDrB,EAAE4B,UAAUpB,KAAK,OAAQC,EAAKoB,eAE9B7B,EAAE,yCAAyCsB,KAAK,oBAAoBC,KAAKd,EAAKe,OAC9ExB,EAAE,2CAA2CyB,SAAS,cACtDzB,EAAEO,MAAMO,UAAUM,SAG1BI,MAAO,SAAUE,GACb1B,EAAE,yCAAyCsB,KAAK,oBAAoBC,KAAKd,EAAKe,OAC9ExB,EAAE,2CAA2CyB,SAAS,cACtDzB,EAAEO,MAAMO,UAAUM","file":"registrationPhoneProcess.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4b14b2fe0d2f00fd3acc","'use strict';\n\n/**\n * Ajax script that allows to start registration process with phone using forms that are refreshed as modals\n * STEP 1: phone verification and OTP send\n */\nfunction registrationPhoneVerification() {\n $('#registrationPhoneVerification-form').submit(function (e) {\n e.preventDefault();\n var url = $(this).attr('actionurl');\n var data = {\n phoneNumber: $('#registrationPhoneVerification-phoneNumber').val(),\n csrf_token: $('#registrationPhoneVerification-csrf_token').val()\n };\n\n $('#registrationPhoneVerification-phoneNumber').removeClass('is-invalid');\n $(this).spinner().start();\n\n $.ajax({\n url: url,\n type: 'POST',\n dataType: 'json',\n data: data,\n success: function (data) {\n if (data.success) {\n $(this).spinner().stop();\n $('#registrationPhoneVerificationModal').modal('hide');\n $('#registrationPhoneOTPValidation-phoneNumber').val(data.phoneNumber);\n $('#registrationPhoneOTPValidationModal').modal('show');\n } else {\n $('#registrationPhoneVerification-error').find('.cc-text-message').text(data.error);\n $('#registrationPhoneVerification-phoneNumber').addClass('is-invalid');\n $(this).spinner().stop();\n }\n },\n error: function (err) {\n $('#registrationPhoneOTPValidation-error').find('.cc-text-message').text(data.error);\n $('#registrationPhoneVerification-phoneNumber').addClass('is-invalid');\n $(this).spinner().stop();\n }\n });\n });\n}\n\n/**\n * Ajax script that allows to start registration process with phone using forms that are refreshed as modals\n * STEP 2: OTP validation against previously submitted phone number\n */\nfunction registrationPhoneOTPValidation() {\n $('#registrationPhoneOTPValidation-form').submit(function (e) {\n e.preventDefault();\n var url = $(this).attr('actionurl');\n var data = {\n otpCode: $('#registrationPhoneOTPValidation-otpCode').val(),\n phoneNumber: $('#registrationPhoneOTPValidation-phoneNumber').val(),\n csrf_token: $('#registrationPhoneOTPValidation-csrf_token').val()\n };\n\n $('#registrationPhoneOTPValidation-otpCode').removeClass('is-invalid');\n $(this).spinner().start();\n\n $.ajax({\n url: url,\n type: 'POST',\n dataType: 'json',\n data: data,\n success: function (data) {\n if (data.success) {\n $(this).spinner().stop();\n $('#registrationPhoneOTPValidationModal').modal('hide');\n $(location).attr('href', data.redirectUrl);\n } else {\n $('#registrationPhoneOTPValidation-error').find('.cc-text-message').text(data.error);\n $('#registrationPhoneOTPValidation-otpCode').addClass('is-invalid');\n $(this).spinner().stop();\n }\n },\n error: function (err) {\n $('#registrationPhoneOTPValidation-error').find('.cc-text-message').text(data.error);\n $('#registrationPhoneOTPValidation-otpCode').addClass('is-invalid');\n $(this).spinner().stop();\n }\n });\n });\n}\n\nfunction registrationPhoneProcess() {\n registrationPhoneVerification();\n registrationPhoneOTPValidation();\n}\n\n/**\n * Ajax script for the registration process with phone using forms that are refreshed as modals\n */\n$(document).ready(registrationPhoneProcess());\n\n\n// WEBPACK FOOTER //\n// ./cartridges/app_bata_sfra/cartridge/client/default/js/registrationPhoneProcess.js"],"sourceRoot":""}