{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"jQuery\"","webpack:///./public/js/theme.js","webpack:///./public/js/common.js","webpack:///(webpack)/buildin/global.js","webpack:///./public/js/registration.js","webpack:///./public/js/subscription.js","webpack:///./public/js/dashboard.js","webpack:///./public/js/app.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","4","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","r","value","n","__esModule","default","object","property","p","jsonpArray","window","webpackJsonp","oldJsonpFunction","bind","slice","jQuery","$","click","e","stopPropagation","preventDefault","this","parent","toggleClass","siblings","t","g","Function","eval","registrationForm","validate","ignore","highlight","element","closest","removeClass","addClass","success","submitHandler","form","event","find","val","email","password","tos","recaptcha","reCaptchaToken","ajax","type","url","attr","response","ga","location","href","alert","errors","join","grecaptcha","reset","console","debug","error","dataType","subscriptionForm","log","NEW_CARD","paymentMethod","newCardForm","stripe","Stripe","stripeKey","card","elements","locale","create","iconStyle","style","base","iconColor","fontWeight","fontFamily","fontSize","fontSmoothing","color","::placeholder",":-webkit-autofill","invalid","mount","on","show","hide","errorField","text","message","validator","addMethod","param","selectedPaymentMethod","methods","required","format","rules","address","city","state","country","Array","forEach","input","setAttribute","address1","zip","additionalData","address_line1","address_city","address_state","address_zip","address_country","createToken","then","token","submitToBackend","removeAttribute","id","plan","prop","modal","apiKeyForm","submitButton","relatedTarget","showApiKeyModal","target","parents","key","activeGroup","isNew","active","submit","is","reload","Symbol","iterator","constructor","_typeof","onerror","file","lineNumber","exDescription","err","document","exFatal"],"mappings":"aACA,SAAAA,EAAAC,GAOA,IANA,IAKAC,EAAAC,EALAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAGAM,EAAA,EAAAC,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B,EAAA,GAAAA,EAAA,IAAAA,EAAA,IAAAA,EAAA,QAAAP,EAAA,mBAAAkJ,QAAA,iBAAAA,OAAAC,SAAA,SAAA7H,GAAA,cAAAA,GAAA,SAAAA,GAAA,OAAAA,GAAA,mBAAA4H,QAAA5H,EAAA8H,cAAAF,QAAA5H,IAAA4H,OAAA7K,UAAA,gBAAAiD,GCU8B,WAA1B+H,EAAOvI,OAAOwI,UAA2C,OAAnBxI,OAAOwI,UAC7CxI,OAAOwI,QAAU,SAASnD,EAASoD,EAAMC,GACnB,YAAd,oBAAO/F,GAAP,YAAA4F,EAAO5F,MACPA,GAAG,OAAO,YAAa,YAEfgG,cAAiBC,IAAIvD,QAAU,UAAYwD,SAASjG,SAASC,KAAO,UAAY4F,EAAO,WAAaC,EACpGI","file":"app.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t4: 0\n \t};\n\n \tvar deferredModules = [];\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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([19,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports = jQuery;","(function () {\n // prevent dropdown link click to hide dropdown\n $('.navbar-nav .dropdown-item').click(function (e) {\n e.stopPropagation();\n });\n \n // toggle for dropdown submenus\n $('.dropdown-submenu .dropdown-toggle').click(function (e) {\n e.preventDefault();\n $(this).parent().toggleClass('show');\n $(this).siblings('.dropdown-menu').toggleClass('show');\n });\n})();","// include our styles\nimport \"../scss/theme.scss\"\n\n// make jQuery accessible using $, used by the integration tests\n// require(\"expose-loader?$!jquery\");\n\n// bootstrap js\nimport 'bootstrap';\n\n// base js\nimport \"jquery-validation\";\nimport \"./theme.js\";","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","/* global ga: false */\n(function () {\n 'use strict';\n const registrationForm = $(\"#registrationForm\");\n if (!registrationForm.length) {\n return;\n }\n \n registrationForm.validate({\n ignore: \".ignore\",\n highlight: function (element) {\n $(element).closest('.form-group').removeClass('success').addClass('error');\n },\n success: function (element) {\n element.addClass('valid').closest('.form-group').removeClass('error').addClass('success');\n },\n submitHandler: function(form, event) {\n event.preventDefault();\n const data = {\n name: registrationForm.find(\"input[name=name]\").val(),\n email: registrationForm.find(\"input[name=email]\").val(),\n password: registrationForm.find(\"input[name=password]\").val(),\n tos: registrationForm.find(\"input[name=tos]\").val(),\n recaptcha: reCaptchaToken\n };\n $.ajax({\n type: \"POST\",\n url: registrationForm.attr(\"action\"),\n data: data,\n success: function (response) {\n if (response.success) {\n try {\n ga('send', 'event', 'Registration', 'finished');\n } catch(e) {\n }\n // TODO: on success continue on with a happy modal or something\n window.location.href = \"/\";\n } else {\n try {\n ga('send', 'event', 'Registration', 'error');\n } catch(e) {\n }\n alert(response.errors.join(\" \"));\n try {\n grecaptcha.reset();\n } catch(e) {\n console.debug(e);\n }\n }\n },\n error: function(response) {\n try {\n ga('send', 'event', 'Registration', 'serverError');\n } catch(e) {\n }\n alert(response.errors.join(\" \"));\n try {\n grecaptcha.reset();\n } catch(e) {\n console.debug(e);\n }\n },\n dataType: \"json\"\n });\n }\n });\n})();\n","/* global stripeKey: false, Stripe: false */\n(function () {\n 'use strict';\n var subscriptionForm = $(\"#subscription-form\");\n if (subscriptionForm.length === 0) {\n return;\n }\n \n console.log(\"Loading subscr form\");\n \n // constants\n var NEW_CARD = \"_new\";\n var CARD_CONFIG = {\n iconStyle: \"solid\",\n style: {\n base: {\n iconColor: \"#fff\",\n // color: \"#fff\",\n fontWeight: 400,\n fontFamily: \"Helvetica Neue, Helvetica, Arial, sans-serif\",\n fontSize: \"15px\",\n fontSmoothing: \"antialiased\",\n color: \"#32325D\",\n \n \"::placeholder\": {\n color: \"#CFD7DF\"\n },\n \":-webkit-autofill\": {\n color: \"#CFD7DF\"\n }\n },\n invalid: {\n color: \"#E25950\"\n }\n }\n };\n var paymentMethod = subscriptionForm.find(\"input[name=paymentmethod]\");\n var newCardForm = $(\"#payment-method-form\");\n var stripe = new Stripe(stripeKey);\n var elements = stripe.elements({\n // let stripe detect the locale\n locale: 'auto'\n });\n /**\n * Card Element\n */\n var card = elements.create(\"card\", CARD_CONFIG);\n card.mount(\"#card\");\n subscriptionForm.find(\"input[name=paymentmethod]\").on(\"change\", function () {\n if (this.value === NEW_CARD) {\n newCardForm.show();\n } else {\n newCardForm.hide();\n }\n });\n var errorField = newCardForm.find('.invalid-feedback');\n \n // Listen for errors from each Element, and show error messages in the UI.\n card.on('change', function (event) {\n if (event.error) {\n errorField.addClass('visible');\n errorField.text(event.error.message);\n $(\"#card-group\").addClass(\"has-danger\");\n $(\"#card\").addClass(\"is-invalid\");\n } else {\n errorField.removeClass('visible');\n $(\"#card-group\").removeClass(\"is-invalid\");\n $(\"#card\").removeClass(\"form-control-danger\");\n }\n });\n \n $.validator.addMethod(\"conditionalRequired\", function (value, element, param) {\n if(selectedPaymentMethod() === NEW_CARD) {\n return true;\n } else {\n return $.validator.methods.required(value, element, param);\n }\n }, jQuery.validator.format(\"{1} is required.\"));\n \n // bind the form validation on submit\n subscriptionForm.validate({\n rules: {\n \"name\": \"conditionalRequired\",\n \"address\": \"conditionalRequired\",\n \"city\": \"conditionalRequired\",\n \"state\": \"conditionalRequired\",\n \"country\": \"conditionalRequired\"\n },\n highlight: function (element) {\n $(element).closest('.form-group').removeClass('success').addClass('error');\n },\n success: function (element) {\n element.addClass('valid').closest('.form-group').removeClass('error').addClass('success');\n },\n submitHandler: validFormSubmit\n });\n \n function validFormSubmit() {\n // Disable all inputs.\n disableInputs();\n \n // check if we have to create a new card or not \n if (selectedPaymentMethod() === NEW_CARD) {\n console.log(\"Selected new card, calling Stripe\");\n getStripeToken();\n } else {\n console.log(\"Selected existing card, submitting\");\n submitToBackend();\n }\n }\n \n function getStripeToken() {\n console.log(\"Get stripe token\");\n // TODO: show loading screen\n // Gather additional customer data we may have collected in our form.\n var name = $('#name');\n var address1 = $('#address');\n var city = $('#city');\n var state = $('#state');\n var zip = $('#zip');\n var country = $('#country');\n var additionalData = {\n name: name ? name.val() : undefined,\n address_line1: address1 ? address1.val() : undefined,\n address_city: city ? city.val() : undefined,\n address_state: state ? state.val() : undefined,\n address_zip: zip ? zip.val() : undefined,\n address_country: country ? country.val() : undefined\n };\n \n // Use Stripe.js to create a token. We only need to pass in one Element\n // from the Element group in order to create a token. We can also pass\n // in the additional customer data we collected in our form.\n stripe.createToken(card, additionalData).then(function (result) {\n console.log(\"Stripe response: \", result);\n // TODO: remove loading screen\n if (result.token) {\n // If we received a token, grab the token id and submit the form to the server\n submitToBackend(result.token);\n } else {\n // Otherwise, re-enable inputs and Stripe errors will show\n enableInputs();\n }\n });\n }\n \n /**\n * On a successful Stripe payment method registration, submit the form, excluding Stripe, to the backend.\n * @param token\n */\n function submitToBackend(token) {\n var data = {\n token: token ? token.id : null,\n plan: $(\"#plan\").val(),\n paymentMethod: selectedPaymentMethod()\n };\n console.log(data);\n $.ajax({\n type: \"POST\",\n url: newCardForm.attr(\"action\"),\n data: data,\n success: function (response) {\n // TODO: on success continue on with a happy modal or something\n if (response.success) {\n window.location.href = \"/account\";\n } else {\n alert(response.errors.join(\", \"));\n }\n },\n dataType: \"json\"\n });\n }\n \n function selectedPaymentMethod() {\n if (paymentMethod.prop(\"type\") === \"hidden\") {\n return NEW_CARD;\n } else {\n return subscriptionForm.find(\"input[name=paymentmethod]:checked\").val();\n }\n }\n \n function enableInputs() {\n Array.prototype.forEach.call(\n $(newCardForm).find(\"input[type='text'], input[type='email'], input[type='tel'], select\"),\n function (input) {\n input.removeAttribute('disabled');\n }\n );\n }\n \n function disableInputs() {\n Array.prototype.forEach.call(\n $(newCardForm).find(\"input[type='text'], input[type='email'], input[type='tel'], select\"),\n function (input) {\n input.setAttribute('disabled', 'true');\n }\n );\n }\n})();","(function () {\n 'use strict';\n\n var modal = $(\"#apikeymodal\");\n var apiKeyForm = modal.find(\"form\");\n var submitButton = $(\"#submit-api-form\");\n\n\n modal.on(\"show.bs.modal\", function(e) {\n if(e.relatedTarget.id === \"add-api-key\" ) {\n showApiKeyModal(true, e.relatedTarget);\n } else {\n showApiKeyModal(false, e.relatedTarget);\n }\n });\n\n var delModal = $(\"#deleteuploadmodal\");\n delModal.on(\"show.bs.modal\", function(e) {\n showDeleteUploadModal(e.relatedTarget);\n });\n \n var activeGroup = $(\"#active-group\");\n function showApiKeyModal(isNew, target) {\n if(isNew) {\n modal.find(\"h5\").text(\"Create new API key\");\n modal.find(\"input[name=key]\").val(\"\");\n modal.find(\"input[name=name]\").val(\"\");\n submitButton.text(\"Create key\");\n activeGroup.hide();\n apiKeyForm.attr('action', '/account/api_keys');\n } else {\n modal.find(\"h5\").text(\"Edit API key\");\n var data = $(target).parents(\"tr\").data();\n modal.find(\"input[name=key]\").val(data.key);\n modal.find(\"input[name=name]\").val(data.name);\n modal.find(\"input[name=active]\").prop('checked', data.active);\n submitButton.text(\"Save changes\");\n activeGroup.show();\n apiKeyForm.attr('action', '/account/api_keys/' + data.key);\n }\n }\n\n function showDeleteUploadModal(target) {\n var data = $(target).parents(\"tr\").data();\n $(\"#delete-upload-desc\").text(\"Do you really want to delete the CSV upload \" + data.name + \"? Please make sure you download the results first, as you can't undo this action!\");\n $(\"#upload-id-field\").val(data.key);\n }\n\n apiKeyForm.submit(function (e) {\n e.preventDefault();\n var data = {\n key: apiKeyForm.find(\"input[name=key]\").val(),\n name: apiKeyForm.find(\"input[name=name]\").val(),\n active: apiKeyForm.find(\"input[name=active]\").is(':checked')\n };\n $.ajax({\n type: \"POST\",\n url: apiKeyForm.attr(\"action\"),\n data: data,\n success: function (response) {\n if (response.success) {\n window.location.reload();\n modal.modal('hide');\n } else {\n alert(response.error);\n }\n },\n dataType: \"json\"\n });\n });\n})();","import './common';\n\n// signed in pages\nimport \"./dashboard.js\";\nimport \"./subscription.js\";\n\n// public pages\nimport \"./registration.js\";\n\n/* global ga: false */\nif (typeof window.onerror === 'object' && window.onerror === null) { // Checks if this seat is taken/exists\n window.onerror = function(message, file, lineNumber) {\n if (typeof ga === 'object') { // Detects Universal Analytics\n ga('send','exception', 'JS Error',\n {\n 'exDescription': err.message + \", URL: \" + document.location.href + \", file:\" + file + '| Line: ' + lineNumber,\n 'exFatal': false\n }\n );\n }\n }\n}"],"sourceRoot":""}