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ASuF,KAAK,oBAAoB2D,SAElD9D,KAAKrF,MAAM0H,WAAW,kBAAmBqB,GACrCC,GACFD,EAAM9I,QAAQ,SAASuF,KAAK,eAAeP,KAAK+D,KAEnD,yBAED,SAAYD,GACV1D,KAAKrF,MAAM0H,WAAW,qBAAsBqB,KAC7C,kBAED,SAAKxD,GACH,OAAOzF,EAAEsJ,KAAK/D,KAAKoC,IAAK,CACtB4B,OAAQ,OACRzD,KAAK,GAAD,OAAKP,KAAKrF,MAAMsJ,YAAW,sBAAcjE,KAAKkE,UAAUhE,W,8EA7F/D,EAJkC,GCFrCzF,GAAE,WACA0E,OAAOC,QAAUD,OAAOC,SAAW,GACnCD,OAAOC,QAAQ+E,iBAAmB,IAAIhC,EAAiB1H,EAAE,4BACzD0E,OAAOC,QAAQ+E,iBAAiBjC,U,SCGlCkC,EAAAA,O","sources":["webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/src/decidim/friendly_signup/setup_confirmations.js","webpack://decidim_monterrey//usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/images|sync|/^\\.\\/.*$/","webpack://decidim_monterrey/webpack/bootstrap","webpack://decidim_monterrey/webpack/runtime/hasOwnProperty shorthand","webpack://decidim_monterrey/webpack/runtime/publicPath","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-core-0.26.3/app/packs/src/decidim/icon.js","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/src/decidim/friendly_signup/lib/password_toggler.js","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/src/decidim/friendly_signup/setup_password.js","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/src/decidim/friendly_signup/lib/instant_validator.js","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/src/decidim/friendly_signup/setup_validations.js","webpack://decidim_monterrey/../usr/local/bundle/gems/decidim-friendly_signup-0.4.2/app/packs/entrypoints/decidim_friendly_signup.js"],"sourcesContent":["$(() => {\n const $inputs = $('.confirmation-code-inputs input[type=\"number\"]');\n const $form = $inputs.closest(\"form\");\n const intRegex = /^\\d+$/;\n let disableManual = false;\n\n // Parses the individual digits into the individual boxes.\n const pasteValues = (element, $first) => {\n const values = element.split(\"\");\n let $inputBox = $first;\n\n $(values).each((index) => {\n $inputBox.val(values[index]);\n $inputBox = $inputBox.next('input[type=\"number\"]');\n if ($inputBox.length === 0) {\n $form.submit();\n }\n });\n };\n\n $inputs.on(\"focus\", (e) => {\n $(e.target).select();\n });\n\n // Prevents user from manually entering non-digits.\n $inputs.on(\"input.fromManual\", (e) => {\n if (disableManual) {\n return;\n }\n const $this = $(e.target);\n if (intRegex.test($this.val())) {\n pasteValues($this.val(), $this);\n $this.next('input[type=\"number\"]').focus();\n } else {\n $this.val(\"\");\n }\n });\n\n $inputs.on(\"paste\", (evt) => {\n const $this = $(evt.target);\n const originalValue = $this.val();\n $this.val(\"\");\n disableManual = true;\n $this.one(\"input.fromPaste\", (e) => {\n const $currentInputBox = $(e.target);\n\n const pastedValue = $currentInputBox.val();\n if (intRegex.test(pastedValue)) {\n pasteValues(pastedValue, $inputs.eq(0));\n }\n else {\n $this.val(originalValue);\n }\n disableManual = false;\n });\n });\n});\n","var map = {\n\t\"./decidim/friendly_signup/icon.svg\": 35187\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 97833;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","__webpack_require__.p = \"/decidim-packs/\";","const DEFAULT_ATTRIBUTES = {\n role: \"img\",\n \"aria-hidden\": \"true\"\n};\n\n/**\n * Generates a Decidim icon element and returns it as a string.\n * @param {String} iconKey - the key of the icon to be generated\n * @param {Object} attributes - extra attributes to define for the icon SVG\n * @param {int} wait - number of milliseconds to wait before executing the function.\n * @private\n * @returns {Void} - Returns nothing.\n */\nexport default function icon(iconKey, attributes = {}) {\n const iconAttributes = $.extend(DEFAULT_ATTRIBUTES, attributes);\n const title = iconAttributes.title || iconAttributes.ariaLabel;\n Reflect.deleteProperty(iconAttributes, \"title\");\n\n const htmlAttributes = {\n \"class\": `icon icon--${iconKey}`\n };\n Object.keys(iconAttributes).forEach((key) => {\n // Convert the key to dash-format.\n const newKey = key.replace(/([A-Z])/g, (ucw) => `-${ucw[0].toLowerCase()}`);\n if (typeof htmlAttributes[key] === \"undefined\") {\n htmlAttributes[newKey] = iconAttributes[key];\n } else {\n htmlAttributes[newKey] = `${htmlAttributes[newKey]} ${iconAttributes[key]}`;\n }\n });\n\n const iconsPath = window.Decidim.config.get(\"icons_path\");\n const elHtml = ``;\n const $el = $(elHtml);\n if (title) {\n $el.prepend(`${title}`);\n } else {\n // This keeps accessibility audit tools happy\n $el.prepend(`${iconKey}`);\n // Force hidden if title is not defined\n htmlAttributes[\"aria-hidden\"] = \"true\";\n }\n $el.attr(htmlAttributes);\n\n return $(\"
\").append($el).html();\n}\n","import icon from \"src/decidim/icon\"\n\nexport default class PasswordToggler {\n constructor($password, $confirmation) {\n this.$password = $password.first();\n this.$confirmation = $confirmation.first();\n this.$input = this.$password.find('input[type=\"password\"]');\n this.$inputConfirmation = this.$confirmation.find('input[type=\"password\"]');\n this.$form = this.$input.closest(\"form\");\n this.texts = {\n showPassword: this.$password.data(\"showPassword\") || \"Show password\",\n hidePassword: this.$password.data(\"hidePassword\") || \"Hide password\",\n hiddenPassword: this.$password.data(\"hiddenPassword\") || \"Your password is hidden\",\n shownPassword: this.$password.data(\"shownPassword\") || \"Your password is shown\"\n }\n this.icons = {\n show: icon(\"eye\", {title: this.texts.showPassword})\n }\n }\n\n // Call init() to hide the password confirmation and add a \"view password\" inline button\n init() {\n this.createControls();\n this.$confirmation.hide();\n this.$button.on(\"click.password_toggler\", (evt) => this.toggleVisibiliy(evt));\n this.$input.on(\"change.password_toggler\", () => {\n this.$inputConfirmation.val(this.$input.val());\n });\n // to prevent browsers trying to use autocomplete, turn the type back to password before submitting\n this.$form.on(\"submit.password_toggler\", () => {\n this.$inputConfirmation.val(this.$input.val());\n this.hidePassword();\n });\n }\n\n // Call destroy() to switch back to the original password/password confirmation boxes\n destroy() {\n this.$button.off(\"click.password_toggler\");\n this.$input.off(\"change.password_toggler\");\n this.$form.off(\"submit.password_toggler\");\n const $input = this.$input.detach();\n this.$inputGroup.replaceWith($input);\n this.$confirmation.show();\n }\n\n createControls() {\n this.$button = $(``);\n this.$buttonGroup = $('');\n this.$statusText = $(`${this.texts.hiddenPassword}`);\n // ensure error message is handled by foundation abide\n this.$input.next(\".form-error\").attr(\"data-form-error-for\", this.$input.attr(\"id\"));\n this.$buttonGroup.html(this.$button);\n this.$input.wrap('').\n after(this.$statusText).\n after(this.$buttonGroup);\n this.$inputGroup = this.$input.parent();\n }\n\n toggleVisibiliy(evt) {\n evt.preventDefault();\n if (this.isText()) {\n this.hidePassword();\n } else {\n this.showPassword();\n }\n }\n\n showPassword() {\n this.$statusText.text(this.texts.shownPassword);\n this.$button.attr(\"aria-label\", this.texts.hidePassword).addClass(\"crossed\");\n this.$input.attr(\"type\", \"text\");\n }\n\n hidePassword() {\n this.$statusText.text(this.texts.hiddenPassword);\n this.$button.attr(\"aria-label\", this.texts.showPassword).removeClass(\"crossed\")\n this.$input.attr(\"type\", \"password\");\n }\n\n isText() {\n return this.$input.attr(\"type\") === \"text\"\n }\n}\n","import PasswordToggler from \"src/decidim/friendly_signup/lib/password_toggler\";\n\n$(() => {\n window.Decidim = window.Decidim || {};\n window.Decidim.passwordToggler = new PasswordToggler($(\".user-password\"), $(\".user-password-confirmation\"));\n window.Decidim.passwordToggler.init();\n});\n","/* eslint-disable line-comment-position, no-ternary, no-inline-comments */\n\n// Instant, server-side validation\n// compatible with abide classes https://get.foundation/sites/docs/abide.html\nexport default class InstantValidator {\n // ms before xhr check\n static get TIMEOUT() {\n return 150;\n }\n\n constructor($form) {\n this.$form = $form;\n this.$inputs = $form.find(\"[data-instant-attribute]\");\n this.url = this.$form.data(\"validationUrl\");\n }\n\n init() {\n if (!this.url || !this.$form.length) {\n return;\n }\n this.$form.foundation(\"disableValidation\");\n // this final validation prevents abide from resetting the field when user loses focus\n this.$inputs.on(\"blur\", (evt) => {\n this.validate($(evt.currentTarget));\n });\n this.$inputs.on(\"keyup\", (evt) => {\n let $input = $(evt.currentTarget);\n let checkTimeout = $input.data(\"checkTimeout\");\n // Trigger live validation with a delay to avoid throttling\n if (checkTimeout) {\n clearTimeout(checkTimeout);\n }\n $input.data(\"checkTimeout\", setTimeout(() => {\n this.validate($input);\n }, this.TIMEOUT)\n );\n });\n }\n\n value($input) {\n return $input.val().trim();\n }\n\n attribute($input) {\n return $input.data(\"instantAttribute\");\n }\n\n target($input) {\n const $target = this.$form.find($input.data(\"instantTarget\"));\n return $target.length\n ? $target\n : $input;\n }\n\n validate($input) {\n let $recheck = $($input.data(\"instantRecheck\"));\n this.tamper($input);\n this.post($input).done((response) => {\n this.setFeedback(response, $input);\n });\n\n if ($recheck.length && this.isTampered($recheck)) {\n this.validate($recheck)\n }\n }\n\n setFeedback(data, $input) {\n if (data.valid) {\n this.clearErrors($input);\n } else {\n this.addErrors(this.target($input), data.error);\n }\n }\n\n tamper($dest) {\n $dest.data(\"tampered\", $dest.val().trim() !== \"\");\n }\n\n isTampered($dest) {\n return $dest.data(\"tampered\");\n }\n\n addErrors($dest, msg) {\n console.log(\"$dest\", $dest, \"%form\", this.$form)\n if ($dest.closest(\"label\").find(\".form-error\").length > 1) {\n // Decidim may add and additional error class that does not play well with abide\n $dest.closest(\"label\").find(\".form-error:last\").remove();\n }\n this.$form.foundation(\"addErrorClasses\", $dest);\n if (msg) {\n $dest.closest(\"label\").find(\".form-error\").html(msg);\n }\n }\n\n clearErrors($dest) {\n this.$form.foundation(\"removeErrorClasses\", $dest);\n }\n\n post($input) {\n return $.ajax(this.url, {\n method: \"POST\",\n data: `${this.$form.serialize()}&attribute=${this.attribute($input)}`\n });\n }\n}\n","import InstantValidator from \"src/decidim/friendly_signup/lib/instant_validator\";\n\n$(() => {\n window.Decidim = window.Decidim || {};\n window.Decidim.instantValidator = new InstantValidator($(\"form.instant-validation\"));\n window.Decidim.instantValidator.init();\n});\n","import \"src/decidim/friendly_signup/setup_password\"\nimport \"src/decidim/friendly_signup/setup_validations\"\nimport \"src/decidim/friendly_signup/setup_confirmations\"\n\n// CSS\nimport \"entrypoints/decidim_friendly_signup.scss\";\n\n// Images\nrequire.context(\"../images\", true)\n"],"names":["$","$inputs","$form","closest","intRegex","disableManual","pasteValues","element","$first","values","split","$inputBox","each","index","val","next","length","submit","on","e","target","select","$this","test","focus","evt","originalValue","one","pastedValue","eq","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","Error","code","keys","Object","resolve","module","exports","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","obj","prop","prototype","hasOwnProperty","call","p","DEFAULT_ATTRIBUTES","role","icon","iconKey","attributes","iconAttributes","extend","title","ariaLabel","Reflect","deleteProperty","htmlAttributes","forEach","key","newKey","replace","ucw","toLowerCase","iconsPath","window","Decidim","config","get","elHtml","$el","prepend","attr","append","html","PasswordToggler","$password","$confirmation","this","first","$input","find","$inputConfirmation","texts","showPassword","data","hidePassword","hiddenPassword","shownPassword","icons","show","_createClass","createControls","hide","$button","_this","toggleVisibiliy","off","detach","$inputGroup","replaceWith","$buttonGroup","$statusText","wrap","after","parent","preventDefault","isText","text","addClass","removeClass","passwordToggler","init","InstantValidator","url","foundation","validate","currentTarget","checkTimeout","clearTimeout","setTimeout","TIMEOUT","trim","$target","$recheck","tamper","post","done","response","_this2","setFeedback","isTampered","valid","clearErrors","addErrors","error","$dest","msg","console","log","remove","ajax","method","serialize","attribute","instantValidator","require"],"sourceRoot":""}