{"version":3,"sources":["webpack:///./node_modules/jquery-validation/dist/jquery.validate.js","webpack:///./node_modules/@nathanvda/cocoon/cocoon.js"],"names":["$","extend","fn","validate","options","this","length","validator","data","attr","settings","onsubmit","on","event","submitButton","currentTarget","hasClass","cancelSubmit","undefined","handle","hidden","result","submitHandler","formSubmitted","name","val","appendTo","currentForm","debug","call","remove","preventDefault","form","pendingRequest","focusInvalid","window","console","warn","valid","errorList","is","each","element","concat","rules","command","argument","staticRules","existingRules","param","filtered","isContentEditable","closest","normalizeRule","messages","split","index","method","normalizeRules","classRules","attributeRules","dataRules","required","remote","called","trim","str","replace","expr","pseudos","blank","a","filled","unchecked","prop","defaults","init","format","source","params","arguments","args","makeArray","unshift","apply","constructor","Array","slice","i","n","RegExp","groups","errorClass","pendingClass","validClass","errorElement","focusCleanup","errorContainer","errorLabelContainer","ignore","ignoreTitle","onfocusin","lastActive","unhighlight","hideThese","errorsFor","onfocusout","checkable","submitted","optional","onkeyup","excludedKeys","which","elementValue","inArray","keyCode","invalid","onclick","parentNode","highlight","type","findByName","addClass","removeClass","setDefaults","email","url","date","dateISO","number","digits","equalTo","maxlength","minlength","rangelength","range","max","min","step","autoCreateRanges","prototype","labelContainer","errorContext","containers","add","valueCache","pending","reset","delegate","eventType","key","value","invalidHandler","checkForm","errorMap","triggerHandler","showErrors","prepareForm","elements","currentElements","check","rs","group","cleanElement","clean","checkElement","validationTargetFor","v","prepareElement","testgroup","push","numberOfInvalids","toHide","errors","map","message","successList","grep","defaultShowErrors","resetForm","hideErrors","removeData","removeAttr","resetElements","objectLength","obj","count","not","text","addWrapper","hide","size","findLastActive","filter","trigger","e","rulesCache","find","error","selector","join","resetInternals","toShow","idx","$element","validity","badInput","substr","lastIndexOf","rule","normalizer","rulesCount","dependencyMismatch","parameters","methods","formatAndAdd","log","id","TypeError","customDataMessage","charAt","toUpperCase","substring","toLowerCase","customMessage","m","String","findDefined","defaultMessage","title","theregex","test","toToggle","wrapper","parent","showLabel","success","validElements","show","invalidElements","place","errorID","elementID","idOrName","describedBy","html","wrap","append","errorPlacement","insertAfter","parents","escapeCssMeta","match","describer","string","getLength","nodeName","depend","dependTypes","startRequest","stopRequest","submit","previousValue","old","destroy","off","classRuleSettings","creditcard","addClassRules","className","classes","normalizeAttributeRule","Number","isNaN","getAttribute","depends","keepRule","parameter","isFunction","parts","isArray","transformed","addMethod","Date","toString","decimals","errorMessage","supportedTypes","re","decimalPlaces","num","toInt","Math","round","pow","Error","target","optionDataString","previous","originalMessage","ajax","mode","port","dataType","context","response","pendingRequests","ajaxPrefilter","_","xhr","abort","ajaxSettings","cocoon_element_counter","create_new_id","newcontent_braced","newcontent_underscord","getTime","jQuery","document","stopPropagation","$this","assoc","assocs","content","insertionMethod","insertionNode","insertionTraversal","parseInt","regexp_braced","regexp_underscord","new_id","new_content","new_contents","originalEvent","insertionNodeElem","getInsertionNodeElem","node","contentNode","before_insert","Event","isDefaultPrevented","wrapper_class","node_to_delete","trigger_node","before_remove","timeout","setTimeout","detach","prev"],"mappings":";4EAAA,UAUI,EAAO,CAAC,MAAW,EAMpB,SAAUA,GACXA,EAAEC,OAAOD,EAAEE,GAAI,CAEbC,SAAU,SAAUC,GAElB,GAAKC,KAAKC,OAAV,CAQA,IAAIC,EAAYP,EAAEQ,KAAKH,KAAK,GAAI,aAChC,OAAIE,IAKJF,KAAKI,KAAK,aAAc,cACxBF,EAAY,IAAIP,EAAEO,UAAUH,EAASC,KAAK,IAC1CL,EAAEQ,KAAKH,KAAK,GAAI,YAAaE,GACzBA,EAAUG,SAASC,WACrBN,KAAKO,GAAG,iBAAkB,WAAW,SAAUC,GAG7CN,EAAUO,aAAeD,EAAME,cAG3Bf,EAAEK,MAAMW,SAAS,YACnBT,EAAUU,cAAe,QAIYC,IAAnClB,EAAEK,MAAMI,KAAK,oBACfF,EAAUU,cAAe,EAE7B,IAGAZ,KAAKO,GAAG,mBAAmB,SAAUC,GAKnC,SAASM,IACP,IAAIC,EAAQC,EAUZ,OAHId,EAAUO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zV,EAAE8T,UAAUlT,GAAG,mCAAmC,WAChDZ,EAAE,qCAAqCyC,MAAK,SAAU+C,EAAGiG,GACvD,IAAIuI,EAAQhU,EAAEK,MACZgV,EAAgBrB,EAAMxT,KAAK,kBAAoB,gBACjDwT,EAAM5Q,QAAQ,IAAMiS,GAAevJ,MACrC,GACF,G","file":"js/vendors~course_search~result_submission-49d5f7c50d795db8361e.chunk.js","sourcesContent":["/*!\r\n * jQuery Validation Plugin v1.19.2\r\n *\r\n * https://jqueryvalidation.org/\r\n *\r\n * Copyright (c) 2020 Jörn Zaefferer\r\n * Released under the MIT license\r\n */\n(function (factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"jquery\"], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory(require(\"jquery\"));\n } else {\n factory(jQuery);\n }\n})(function ($) {\n $.extend($.fn, {\n // https://jqueryvalidation.org/validate/\n validate: function (options) {\n // If nothing is selected, return nothing; can't chain anyway\n if (!this.length) {\n if (options && options.debug && window.console) {\n console.warn(\"Nothing selected, can't validate, returning nothing.\");\n }\n return;\n }\n\n // Check if a validator for this form was already created\n var validator = $.data(this[0], \"validator\");\n if (validator) {\n return validator;\n }\n\n // Add novalidate tag if HTML5.\n this.attr(\"novalidate\", \"novalidate\");\n validator = new $.validator(options, this[0]);\n $.data(this[0], \"validator\", validator);\n if (validator.settings.onsubmit) {\n this.on(\"click.validate\", \":submit\", function (event) {\n // Track the used submit button to properly handle scripted\n // submits later.\n validator.submitButton = event.currentTarget;\n\n // Allow suppressing validation by adding a cancel class to the submit button\n if ($(this).hasClass(\"cancel\")) {\n validator.cancelSubmit = true;\n }\n\n // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n if ($(this).attr(\"formnovalidate\") !== undefined) {\n validator.cancelSubmit = true;\n }\n });\n\n // Validate the form on submit\n this.on(\"submit.validate\", function (event) {\n if (validator.settings.debug) {\n // Prevent form submit to be able to see console output\n event.preventDefault();\n }\n function handle() {\n var hidden, result;\n\n // Insert a hidden input as a replacement for the missing submit button\n // The hidden input is inserted in two cases:\n // - A user defined a `submitHandler`\n // - There was a pending request due to `remote` method and `stopRequest()`\n // was called to submit the form in case it's valid\n if (validator.submitButton && (validator.settings.submitHandler || validator.formSubmitted)) {\n hidden = $(\"\").attr(\"name\", validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);\n }\n if (validator.settings.submitHandler && !validator.settings.debug) {\n result = validator.settings.submitHandler.call(validator, validator.currentForm, event);\n if (hidden) {\n // And clean up afterwards; thanks to no-block-scope, hidden can be referenced\n hidden.remove();\n }\n if (result !== undefined) {\n return result;\n }\n return false;\n }\n return true;\n }\n\n // Prevent submit for invalid forms or custom submit handlers\n if (validator.cancelSubmit) {\n validator.cancelSubmit = false;\n return handle();\n }\n if (validator.form()) {\n if (validator.pendingRequest) {\n validator.formSubmitted = true;\n return false;\n }\n return handle();\n } else {\n validator.focusInvalid();\n return false;\n }\n });\n }\n return validator;\n },\n // https://jqueryvalidation.org/valid/\n valid: function () {\n var valid, validator, errorList;\n if ($(this[0]).is(\"form\")) {\n valid = this.validate().form();\n } else {\n errorList = [];\n valid = true;\n validator = $(this[0].form).validate();\n this.each(function () {\n valid = validator.element(this) && valid;\n if (!valid) {\n errorList = errorList.concat(validator.errorList);\n }\n });\n validator.errorList = errorList;\n }\n return valid;\n },\n // https://jqueryvalidation.org/rules/\n rules: function (command, argument) {\n var element = this[0],\n isContentEditable = typeof this.attr(\"contenteditable\") !== \"undefined\" && this.attr(\"contenteditable\") !== \"false\",\n settings,\n staticRules,\n existingRules,\n data,\n param,\n filtered;\n\n // If nothing is selected, return empty object; can't chain anyway\n if (element == null) {\n return;\n }\n if (!element.form && isContentEditable) {\n element.form = this.closest(\"form\")[0];\n element.name = this.attr(\"name\");\n }\n if (element.form == null) {\n return;\n }\n if (command) {\n settings = $.data(element.form, \"validator\").settings;\n staticRules = settings.rules;\n existingRules = $.validator.staticRules(element);\n switch (command) {\n case \"add\":\n $.extend(existingRules, $.validator.normalizeRule(argument));\n\n // Remove messages from rules, but allow them to be set separately\n delete existingRules.messages;\n staticRules[element.name] = existingRules;\n if (argument.messages) {\n settings.messages[element.name] = $.extend(settings.messages[element.name], argument.messages);\n }\n break;\n case \"remove\":\n if (!argument) {\n delete staticRules[element.name];\n return existingRules;\n }\n filtered = {};\n $.each(argument.split(/\\s/), function (index, method) {\n filtered[method] = existingRules[method];\n delete existingRules[method];\n });\n return filtered;\n }\n }\n data = $.validator.normalizeRules($.extend({}, $.validator.classRules(element), $.validator.attributeRules(element), $.validator.dataRules(element), $.validator.staticRules(element)), element);\n\n // Make sure required is at front\n if (data.required) {\n param = data.required;\n delete data.required;\n data = $.extend({\n required: param\n }, data);\n }\n\n // Make sure remote is at back\n if (data.remote) {\n param = data.remote;\n delete data.remote;\n data = $.extend(data, {\n remote: param\n });\n }\n return data;\n }\n });\n\n // JQuery trim is deprecated, provide a trim method based on String.prototype.trim\n var trim = function (str) {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\n };\n\n // Custom selectors\n $.extend($.expr.pseudos || $.expr[\":\"], {\n // '|| $.expr[ \":\" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support\n\n // https://jqueryvalidation.org/blank-selector/\n blank: function (a) {\n return !trim(\"\" + $(a).val());\n },\n // https://jqueryvalidation.org/filled-selector/\n filled: function (a) {\n var val = $(a).val();\n return val !== null && !!trim(\"\" + val);\n },\n // https://jqueryvalidation.org/unchecked-selector/\n unchecked: function (a) {\n return !$(a).prop(\"checked\");\n }\n });\n\n // Constructor for validator\n $.validator = function (options, form) {\n this.settings = $.extend(true, {}, $.validator.defaults, options);\n this.currentForm = form;\n this.init();\n };\n\n // https://jqueryvalidation.org/jQuery.validator.format/\n $.validator.format = function (source, params) {\n if (arguments.length === 1) {\n return function () {\n var args = $.makeArray(arguments);\n args.unshift(source);\n return $.validator.format.apply(this, args);\n };\n }\n if (params === undefined) {\n return source;\n }\n if (arguments.length > 2 && params.constructor !== Array) {\n params = $.makeArray(arguments).slice(1);\n }\n if (params.constructor !== Array) {\n params = [params];\n }\n $.each(params, function (i, n) {\n source = source.replace(new RegExp(\"\\\\{\" + i + \"\\\\}\", \"g\"), function () {\n return n;\n });\n });\n return source;\n };\n $.extend($.validator, {\n defaults: {\n messages: {},\n groups: {},\n rules: {},\n errorClass: \"error\",\n pendingClass: \"pending\",\n validClass: \"valid\",\n errorElement: \"label\",\n focusCleanup: false,\n focusInvalid: true,\n errorContainer: $([]),\n errorLabelContainer: $([]),\n onsubmit: true,\n ignore: \":hidden\",\n ignoreTitle: false,\n onfocusin: function (element) {\n this.lastActive = element;\n\n // Hide error label and remove error class on focus if enabled\n if (this.settings.focusCleanup) {\n if (this.settings.unhighlight) {\n this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass);\n }\n this.hideThese(this.errorsFor(element));\n }\n },\n onfocusout: function (element) {\n if (!this.checkable(element) && (element.name in this.submitted || !this.optional(element))) {\n this.element(element);\n }\n },\n onkeyup: function (element, event) {\n // Avoid revalidate the field when pressing one of the following keys\n // Shift => 16\n // Ctrl => 17\n // Alt => 18\n // Caps lock => 20\n // End => 35\n // Home => 36\n // Left arrow => 37\n // Up arrow => 38\n // Right arrow => 39\n // Down arrow => 40\n // Insert => 45\n // Num lock => 144\n // AltGr key => 225\n var excludedKeys = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225];\n if (event.which === 9 && this.elementValue(element) === \"\" || $.inArray(event.keyCode, excludedKeys) !== -1) {\n return;\n } else if (element.name in this.submitted || element.name in this.invalid) {\n this.element(element);\n }\n },\n onclick: function (element) {\n // Click on selects, radiobuttons and checkboxes\n if (element.name in this.submitted) {\n this.element(element);\n\n // Or option elements, check parent select in that case\n } else if (element.parentNode.name in this.submitted) {\n this.element(element.parentNode);\n }\n },\n highlight: function (element, errorClass, validClass) {\n if (element.type === \"radio\") {\n this.findByName(element.name).addClass(errorClass).removeClass(validClass);\n } else {\n $(element).addClass(errorClass).removeClass(validClass);\n }\n },\n unhighlight: function (element, errorClass, validClass) {\n if (element.type === \"radio\") {\n this.findByName(element.name).removeClass(errorClass).addClass(validClass);\n } else {\n $(element).removeClass(errorClass).addClass(validClass);\n }\n }\n },\n // https://jqueryvalidation.org/jQuery.validator.setDefaults/\n setDefaults: function (settings) {\n $.extend($.validator.defaults, settings);\n },\n messages: {\n required: \"This field is required.\",\n remote: \"Please fix this field.\",\n email: \"Please enter a valid email address.\",\n url: \"Please enter a valid URL.\",\n date: \"Please enter a valid date.\",\n dateISO: \"Please enter a valid date (ISO).\",\n number: \"Please enter a valid number.\",\n digits: \"Please enter only digits.\",\n equalTo: \"Please enter the same value again.\",\n maxlength: $.validator.format(\"Please enter no more than {0} characters.\"),\n minlength: $.validator.format(\"Please enter at least {0} characters.\"),\n rangelength: $.validator.format(\"Please enter a value between {0} and {1} characters long.\"),\n range: $.validator.format(\"Please enter a value between {0} and {1}.\"),\n max: $.validator.format(\"Please enter a value less than or equal to {0}.\"),\n min: $.validator.format(\"Please enter a value greater than or equal to {0}.\"),\n step: $.validator.format(\"Please enter a multiple of {0}.\")\n },\n autoCreateRanges: false,\n prototype: {\n init: function () {\n this.labelContainer = $(this.settings.errorLabelContainer);\n this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);\n this.containers = $(this.settings.errorContainer).add(this.settings.errorLabelContainer);\n this.submitted = {};\n this.valueCache = {};\n this.pendingRequest = 0;\n this.pending = {};\n this.invalid = {};\n this.reset();\n var currentForm = this.currentForm,\n groups = this.groups = {},\n rules;\n $.each(this.settings.groups, function (key, value) {\n if (typeof value === \"string\") {\n value = value.split(/\\s/);\n }\n $.each(value, function (index, name) {\n groups[name] = key;\n });\n });\n rules = this.settings.rules;\n $.each(rules, function (key, value) {\n rules[key] = $.validator.normalizeRule(value);\n });\n function delegate(event) {\n var isContentEditable = typeof $(this).attr(\"contenteditable\") !== \"undefined\" && $(this).attr(\"contenteditable\") !== \"false\";\n\n // Set form expando on contenteditable\n if (!this.form && isContentEditable) {\n this.form = $(this).closest(\"form\")[0];\n this.name = $(this).attr(\"name\");\n }\n\n // Ignore the element if it belongs to another form. This will happen mainly\n // when setting the `form` attribute of an input to the id of another form.\n if (currentForm !== this.form) {\n return;\n }\n var validator = $.data(this.form, \"validator\"),\n eventType = \"on\" + event.type.replace(/^validate/, \"\"),\n settings = validator.settings;\n if (settings[eventType] && !$(this).is(settings.ignore)) {\n settings[eventType].call(validator, this, event);\n }\n }\n $(this.currentForm).on(\"focusin.validate focusout.validate keyup.validate\", \":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" + \"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" + \"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" + \"[type='radio'], [type='checkbox'], [contenteditable], [type='button']\", delegate)\n\n // Support: Chrome, oldIE\n // \"select\" is provided as event.target when clicking a option\n .on(\"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate);\n if (this.settings.invalidHandler) {\n $(this.currentForm).on(\"invalid-form.validate\", this.settings.invalidHandler);\n }\n },\n // https://jqueryvalidation.org/Validator.form/\n form: function () {\n this.checkForm();\n $.extend(this.submitted, this.errorMap);\n this.invalid = $.extend({}, this.errorMap);\n if (!this.valid()) {\n $(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n }\n this.showErrors();\n return this.valid();\n },\n checkForm: function () {\n this.prepareForm();\n for (var i = 0, elements = this.currentElements = this.elements(); elements[i]; i++) {\n this.check(elements[i]);\n }\n return this.valid();\n },\n // https://jqueryvalidation.org/Validator.element/\n element: function (element) {\n var cleanElement = this.clean(element),\n checkElement = this.validationTargetFor(cleanElement),\n v = this,\n result = true,\n rs,\n group;\n if (checkElement === undefined) {\n delete this.invalid[cleanElement.name];\n } else {\n this.prepareElement(checkElement);\n this.currentElements = $(checkElement);\n\n // If this element is grouped, then validate all group elements already\n // containing a value\n group = this.groups[checkElement.name];\n if (group) {\n $.each(this.groups, function (name, testgroup) {\n if (testgroup === group && name !== checkElement.name) {\n cleanElement = v.validationTargetFor(v.clean(v.findByName(name)));\n if (cleanElement && cleanElement.name in v.invalid) {\n v.currentElements.push(cleanElement);\n result = v.check(cleanElement) && result;\n }\n }\n });\n }\n rs = this.check(checkElement) !== false;\n result = result && rs;\n if (rs) {\n this.invalid[checkElement.name] = false;\n } else {\n this.invalid[checkElement.name] = true;\n }\n if (!this.numberOfInvalids()) {\n // Hide error containers on last error\n this.toHide = this.toHide.add(this.containers);\n }\n this.showErrors();\n\n // Add aria-invalid status for screen readers\n $(element).attr(\"aria-invalid\", !rs);\n }\n return result;\n },\n // https://jqueryvalidation.org/Validator.showErrors/\n showErrors: function (errors) {\n if (errors) {\n var validator = this;\n\n // Add items to error list and map\n $.extend(this.errorMap, errors);\n this.errorList = $.map(this.errorMap, function (message, name) {\n return {\n message: message,\n element: validator.findByName(name)[0]\n };\n });\n\n // Remove items from success list\n this.successList = $.grep(this.successList, function (element) {\n return !(element.name in errors);\n });\n }\n if (this.settings.showErrors) {\n this.settings.showErrors.call(this, this.errorMap, this.errorList);\n } else {\n this.defaultShowErrors();\n }\n },\n // https://jqueryvalidation.org/Validator.resetForm/\n resetForm: function () {\n if ($.fn.resetForm) {\n $(this.currentForm).resetForm();\n }\n this.invalid = {};\n this.submitted = {};\n this.prepareForm();\n this.hideErrors();\n var elements = this.elements().removeData(\"previousValue\").removeAttr(\"aria-invalid\");\n this.resetElements(elements);\n },\n resetElements: function (elements) {\n var i;\n if (this.settings.unhighlight) {\n for (i = 0; elements[i]; i++) {\n this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, \"\");\n this.findByName(elements[i].name).removeClass(this.settings.validClass);\n }\n } else {\n elements.removeClass(this.settings.errorClass).removeClass(this.settings.validClass);\n }\n },\n numberOfInvalids: function () {\n return this.objectLength(this.invalid);\n },\n objectLength: function (obj) {\n /* jshint unused: false */\n var count = 0,\n i;\n for (i in obj) {\n // This check allows counting elements with empty error\n // message as invalid elements\n if (obj[i] !== undefined && obj[i] !== null && obj[i] !== false) {\n count++;\n }\n }\n return count;\n },\n hideErrors: function () {\n this.hideThese(this.toHide);\n },\n hideThese: function (errors) {\n errors.not(this.containers).text(\"\");\n this.addWrapper(errors).hide();\n },\n valid: function () {\n return this.size() === 0;\n },\n size: function () {\n return this.errorList.length;\n },\n focusInvalid: function () {\n if (this.settings.focusInvalid) {\n try {\n $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(\":visible\").trigger(\"focus\")\n\n // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n .trigger(\"focusin\");\n } catch (e) {\n\n // Ignore IE throwing errors when focusing hidden elements\n }\n }\n },\n findLastActive: function () {\n var lastActive = this.lastActive;\n return lastActive && $.grep(this.errorList, function (n) {\n return n.element.name === lastActive.name;\n }).length === 1 && lastActive;\n },\n elements: function () {\n var validator = this,\n rulesCache = {};\n\n // Select all valid inputs inside the form (no submit or reset buttons)\n return $(this.currentForm).find(\"input, select, textarea, [contenteditable]\").not(\":submit, :reset, :image, :disabled\").not(this.settings.ignore).filter(function () {\n var name = this.name || $(this).attr(\"name\"); // For contenteditable\n var isContentEditable = typeof $(this).attr(\"contenteditable\") !== \"undefined\" && $(this).attr(\"contenteditable\") !== \"false\";\n if (!name && validator.settings.debug && window.console) {\n console.error(\"%o has no name assigned\", this);\n }\n\n // Set form expando on contenteditable\n if (isContentEditable) {\n this.form = $(this).closest(\"form\")[0];\n this.name = name;\n }\n\n // Ignore elements that belong to other/nested forms\n if (this.form !== validator.currentForm) {\n return false;\n }\n\n // Select only the first element for each name, and only those with rules specified\n if (name in rulesCache || !validator.objectLength($(this).rules())) {\n return false;\n }\n rulesCache[name] = true;\n return true;\n });\n },\n clean: function (selector) {\n return $(selector)[0];\n },\n errors: function () {\n var errorClass = this.settings.errorClass.split(\" \").join(\".\");\n return $(this.settings.errorElement + \".\" + errorClass, this.errorContext);\n },\n resetInternals: function () {\n this.successList = [];\n this.errorList = [];\n this.errorMap = {};\n this.toShow = $([]);\n this.toHide = $([]);\n },\n reset: function () {\n this.resetInternals();\n this.currentElements = $([]);\n },\n prepareForm: function () {\n this.reset();\n this.toHide = this.errors().add(this.containers);\n },\n prepareElement: function (element) {\n this.reset();\n this.toHide = this.errorsFor(element);\n },\n elementValue: function (element) {\n var $element = $(element),\n type = element.type,\n isContentEditable = typeof $element.attr(\"contenteditable\") !== \"undefined\" && $element.attr(\"contenteditable\") !== \"false\",\n val,\n idx;\n if (type === \"radio\" || type === \"checkbox\") {\n return this.findByName(element.name).filter(\":checked\").val();\n } else if (type === \"number\" && typeof element.validity !== \"undefined\") {\n return element.validity.badInput ? \"NaN\" : $element.val();\n }\n if (isContentEditable) {\n val = $element.text();\n } else {\n val = $element.val();\n }\n if (type === \"file\") {\n // Modern browser (chrome & safari)\n if (val.substr(0, 12) === \"C:\\\\fakepath\\\\\") {\n return val.substr(12);\n }\n\n // Legacy browsers\n // Unix-based path\n idx = val.lastIndexOf(\"/\");\n if (idx >= 0) {\n return val.substr(idx + 1);\n }\n\n // Windows-based path\n idx = val.lastIndexOf(\"\\\\\");\n if (idx >= 0) {\n return val.substr(idx + 1);\n }\n\n // Just the file name\n return val;\n }\n if (typeof val === \"string\") {\n return val.replace(/\\r/g, \"\");\n }\n return val;\n },\n check: function (element) {\n element = this.validationTargetFor(this.clean(element));\n var rules = $(element).rules(),\n rulesCount = $.map(rules, function (n, i) {\n return i;\n }).length,\n dependencyMismatch = false,\n val = this.elementValue(element),\n result,\n method,\n rule,\n normalizer;\n\n // Prioritize the local normalizer defined for this element over the global one\n // if the former exists, otherwise user the global one in case it exists.\n if (typeof rules.normalizer === \"function\") {\n normalizer = rules.normalizer;\n } else if (typeof this.settings.normalizer === \"function\") {\n normalizer = this.settings.normalizer;\n }\n\n // If normalizer is defined, then call it to retreive the changed value instead\n // of using the real one.\n // Note that `this` in the normalizer is `element`.\n if (normalizer) {\n val = normalizer.call(element, val);\n\n // Delete the normalizer from rules to avoid treating it as a pre-defined method.\n delete rules.normalizer;\n }\n for (method in rules) {\n rule = {\n method: method,\n parameters: rules[method]\n };\n try {\n result = $.validator.methods[method].call(this, val, element, rule.parameters);\n\n // If a method indicates that the field is optional and therefore valid,\n // don't mark it as valid when there are no other rules\n if (result === \"dependency-mismatch\" && rulesCount === 1) {\n dependencyMismatch = true;\n continue;\n }\n dependencyMismatch = false;\n if (result === \"pending\") {\n this.toHide = this.toHide.not(this.errorsFor(element));\n return;\n }\n if (!result) {\n this.formatAndAdd(element, rule);\n return false;\n }\n } catch (e) {\n if (this.settings.debug && window.console) {\n console.log(\"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e);\n }\n if (e instanceof TypeError) {\n e.message += \". Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\n }\n throw e;\n }\n }\n if (dependencyMismatch) {\n return;\n }\n if (this.objectLength(rules)) {\n this.successList.push(element);\n }\n return true;\n },\n // Return the custom message for the given element and validation method\n // specified in the element's HTML5 data attribute\n // return the generic message if present and no method specific message is present\n customDataMessage: function (element, method) {\n return $(element).data(\"msg\" + method.charAt(0).toUpperCase() + method.substring(1).toLowerCase()) || $(element).data(\"msg\");\n },\n // Return the custom message for the given element name and validation method\n customMessage: function (name, method) {\n var m = this.settings.messages[name];\n return m && (m.constructor === String ? m : m[method]);\n },\n // Return the first defined argument, allowing empty strings\n findDefined: function () {\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[i] !== undefined) {\n return arguments[i];\n }\n }\n return undefined;\n },\n // The second parameter 'rule' used to be a string, and extended to an object literal\n // of the following form:\n // rule = {\n // method: \"method name\",\n // parameters: \"the given method parameters\"\n // }\n //\n // The old behavior still supported, kept to maintain backward compatibility with\n // old code, and will be removed in the next major release.\n defaultMessage: function (element, rule) {\n if (typeof rule === \"string\") {\n rule = {\n method: rule\n };\n }\n var message = this.findDefined(this.customMessage(element.name, rule.method), this.customDataMessage(element, rule.method),\n // 'title' is never undefined, so handle empty string as undefined\n !this.settings.ignoreTitle && element.title || undefined, $.validator.messages[rule.method], \"Warning: No message defined for \" + element.name + \"\"),\n theregex = /\\$?\\{(\\d+)\\}/g;\n if (typeof message === \"function\") {\n message = message.call(this, rule.parameters, element);\n } else if (theregex.test(message)) {\n message = $.validator.format(message.replace(theregex, \"{$1}\"), rule.parameters);\n }\n return message;\n },\n formatAndAdd: function (element, rule) {\n var message = this.defaultMessage(element, rule);\n this.errorList.push({\n message: message,\n element: element,\n method: rule.method\n });\n this.errorMap[element.name] = message;\n this.submitted[element.name] = message;\n },\n addWrapper: function (toToggle) {\n if (this.settings.wrapper) {\n toToggle = toToggle.add(toToggle.parent(this.settings.wrapper));\n }\n return toToggle;\n },\n defaultShowErrors: function () {\n var i, elements, error;\n for (i = 0; this.errorList[i]; i++) {\n error = this.errorList[i];\n if (this.settings.highlight) {\n this.settings.highlight.call(this, error.element, this.settings.errorClass, this.settings.validClass);\n }\n this.showLabel(error.element, error.message);\n }\n if (this.errorList.length) {\n this.toShow = this.toShow.add(this.containers);\n }\n if (this.settings.success) {\n for (i = 0; this.successList[i]; i++) {\n this.showLabel(this.successList[i]);\n }\n }\n if (this.settings.unhighlight) {\n for (i = 0, elements = this.validElements(); elements[i]; i++) {\n this.settings.unhighlight.call(this, elements[i], this.settings.errorClass, this.settings.validClass);\n }\n }\n this.toHide = this.toHide.not(this.toShow);\n this.hideErrors();\n this.addWrapper(this.toShow).show();\n },\n validElements: function () {\n return this.currentElements.not(this.invalidElements());\n },\n invalidElements: function () {\n return $(this.errorList).map(function () {\n return this.element;\n });\n },\n showLabel: function (element, message) {\n var place,\n group,\n errorID,\n v,\n error = this.errorsFor(element),\n elementID = this.idOrName(element),\n describedBy = $(element).attr(\"aria-describedby\");\n if (error.length) {\n // Refresh error/success class\n error.removeClass(this.settings.validClass).addClass(this.settings.errorClass);\n\n // Replace message on existing label\n error.html(message);\n } else {\n // Create error element\n error = $(\"<\" + this.settings.errorElement + \">\").attr(\"id\", elementID + \"-error\").addClass(this.settings.errorClass).html(message || \"\");\n\n // Maintain reference to the element to be placed into the DOM\n place = error;\n if (this.settings.wrapper) {\n // Make sure the element is visible, even in IE\n // actually showing the wrapped element is handled elsewhere\n place = error.hide().show().wrap(\"<\" + this.settings.wrapper + \"/>\").parent();\n }\n if (this.labelContainer.length) {\n this.labelContainer.append(place);\n } else if (this.settings.errorPlacement) {\n this.settings.errorPlacement.call(this, place, $(element));\n } else {\n place.insertAfter(element);\n }\n\n // Link error back to the element\n if (error.is(\"label\")) {\n // If the error is a label, then associate using 'for'\n error.attr(\"for\", elementID);\n\n // If the element is not a child of an associated label, then it's necessary\n // to explicitly apply aria-describedby\n } else if (error.parents(\"label[for='\" + this.escapeCssMeta(elementID) + \"']\").length === 0) {\n errorID = error.attr(\"id\");\n\n // Respect existing non-error aria-describedby\n if (!describedBy) {\n describedBy = errorID;\n } else if (!describedBy.match(new RegExp(\"\\\\b\" + this.escapeCssMeta(errorID) + \"\\\\b\"))) {\n // Add to end of list if not already present\n describedBy += \" \" + errorID;\n }\n $(element).attr(\"aria-describedby\", describedBy);\n\n // If this element is grouped, then assign to all elements in the same group\n group = this.groups[element.name];\n if (group) {\n v = this;\n $.each(v.groups, function (name, testgroup) {\n if (testgroup === group) {\n $(\"[name='\" + v.escapeCssMeta(name) + \"']\", v.currentForm).attr(\"aria-describedby\", error.attr(\"id\"));\n }\n });\n }\n }\n }\n if (!message && this.settings.success) {\n error.text(\"\");\n if (typeof this.settings.success === \"string\") {\n error.addClass(this.settings.success);\n } else {\n this.settings.success(error, element);\n }\n }\n this.toShow = this.toShow.add(error);\n },\n errorsFor: function (element) {\n var name = this.escapeCssMeta(this.idOrName(element)),\n describer = $(element).attr(\"aria-describedby\"),\n selector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\n\n // 'aria-describedby' should directly reference the error element\n if (describer) {\n selector = selector + \", #\" + this.escapeCssMeta(describer).replace(/\\s+/g, \", #\");\n }\n return this.errors().filter(selector);\n },\n // See https://api.jquery.com/category/selectors/, for CSS\n // meta-characters that should be escaped in order to be used with JQuery\n // as a literal part of a name/id or any selector.\n escapeCssMeta: function (string) {\n return string.replace(/([\\\\!\"#$%&'()*+,./:;<=>?@\\[\\]^`{|}~])/g, \"\\\\$1\");\n },\n idOrName: function (element) {\n return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);\n },\n validationTargetFor: function (element) {\n // If radio/checkbox, validate first element in group instead\n if (this.checkable(element)) {\n element = this.findByName(element.name);\n }\n\n // Always apply ignore filter\n return $(element).not(this.settings.ignore)[0];\n },\n checkable: function (element) {\n return /radio|checkbox/i.test(element.type);\n },\n findByName: function (name) {\n return $(this.currentForm).find(\"[name='\" + this.escapeCssMeta(name) + \"']\");\n },\n getLength: function (value, element) {\n switch (element.nodeName.toLowerCase()) {\n case \"select\":\n return $(\"option:selected\", element).length;\n case \"input\":\n if (this.checkable(element)) {\n return this.findByName(element.name).filter(\":checked\").length;\n }\n }\n return value.length;\n },\n depend: function (param, element) {\n return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;\n },\n dependTypes: {\n \"boolean\": function (param) {\n return param;\n },\n \"string\": function (param, element) {\n return !!$(param, element.form).length;\n },\n \"function\": function (param, element) {\n return param(element);\n }\n },\n optional: function (element) {\n var val = this.elementValue(element);\n return !$.validator.methods.required.call(this, val, element) && \"dependency-mismatch\";\n },\n startRequest: function (element) {\n if (!this.pending[element.name]) {\n this.pendingRequest++;\n $(element).addClass(this.settings.pendingClass);\n this.pending[element.name] = true;\n }\n },\n stopRequest: function (element, valid) {\n this.pendingRequest--;\n\n // Sometimes synchronization fails, make sure pendingRequest is never < 0\n if (this.pendingRequest < 0) {\n this.pendingRequest = 0;\n }\n delete this.pending[element.name];\n $(element).removeClass(this.settings.pendingClass);\n if (valid && this.pendingRequest === 0 && this.formSubmitted && this.form()) {\n $(this.currentForm).submit();\n\n // Remove the hidden input that was used as a replacement for the\n // missing submit button. The hidden input is added by `handle()`\n // to ensure that the value of the used submit button is passed on\n // for scripted submits triggered by this method\n if (this.submitButton) {\n $(\"input:hidden[name='\" + this.submitButton.name + \"']\", this.currentForm).remove();\n }\n this.formSubmitted = false;\n } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {\n $(this.currentForm).triggerHandler(\"invalid-form\", [this]);\n this.formSubmitted = false;\n }\n },\n previousValue: function (element, method) {\n method = typeof method === \"string\" && method || \"remote\";\n return $.data(element, \"previousValue\") || $.data(element, \"previousValue\", {\n old: null,\n valid: true,\n message: this.defaultMessage(element, {\n method: method\n })\n });\n },\n // Cleans up all forms and elements, removes validator-specific events\n destroy: function () {\n this.resetForm();\n $(this.currentForm).off(\".validate\").removeData(\"validator\").find(\".validate-equalTo-blur\").off(\".validate-equalTo\").removeClass(\"validate-equalTo-blur\").find(\".validate-lessThan-blur\").off(\".validate-lessThan\").removeClass(\"validate-lessThan-blur\").find(\".validate-lessThanEqual-blur\").off(\".validate-lessThanEqual\").removeClass(\"validate-lessThanEqual-blur\").find(\".validate-greaterThanEqual-blur\").off(\".validate-greaterThanEqual\").removeClass(\"validate-greaterThanEqual-blur\").find(\".validate-greaterThan-blur\").off(\".validate-greaterThan\").removeClass(\"validate-greaterThan-blur\");\n }\n },\n classRuleSettings: {\n required: {\n required: true\n },\n email: {\n email: true\n },\n url: {\n url: true\n },\n date: {\n date: true\n },\n dateISO: {\n dateISO: true\n },\n number: {\n number: true\n },\n digits: {\n digits: true\n },\n creditcard: {\n creditcard: true\n }\n },\n addClassRules: function (className, rules) {\n if (className.constructor === String) {\n this.classRuleSettings[className] = rules;\n } else {\n $.extend(this.classRuleSettings, className);\n }\n },\n classRules: function (element) {\n var rules = {},\n classes = $(element).attr(\"class\");\n if (classes) {\n $.each(classes.split(\" \"), function () {\n if (this in $.validator.classRuleSettings) {\n $.extend(rules, $.validator.classRuleSettings[this]);\n }\n });\n }\n return rules;\n },\n normalizeAttributeRule: function (rules, type, method, value) {\n // Convert the value to a number for number inputs, and for text for backwards compability\n // allows type=\"date\" and others to be compared as strings\n if (/min|max|step/.test(method) && (type === null || /number|range|text/.test(type))) {\n value = Number(value);\n\n // Support Opera Mini, which returns NaN for undefined minlength\n if (isNaN(value)) {\n value = undefined;\n }\n }\n if (value || value === 0) {\n rules[method] = value;\n } else if (type === method && type !== \"range\") {\n // Exception: the jquery validate 'range' method\n // does not test for the html5 'range' type\n rules[method] = true;\n }\n },\n attributeRules: function (element) {\n var rules = {},\n $element = $(element),\n type = element.getAttribute(\"type\"),\n method,\n value;\n for (method in $.validator.methods) {\n // Support for in both html5 and older browsers\n if (method === \"required\") {\n value = element.getAttribute(method);\n\n // Some browsers return an empty string for the required attribute\n // and non-HTML5 browsers might have required=\"\" markup\n if (value === \"\") {\n value = true;\n }\n\n // Force non-HTML5 browsers to return bool\n value = !!value;\n } else {\n value = $element.attr(method);\n }\n this.normalizeAttributeRule(rules, type, method, value);\n }\n\n // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {\n delete rules.maxlength;\n }\n return rules;\n },\n dataRules: function (element) {\n var rules = {},\n $element = $(element),\n type = element.getAttribute(\"type\"),\n method,\n value;\n for (method in $.validator.methods) {\n value = $element.data(\"rule\" + method.charAt(0).toUpperCase() + method.substring(1).toLowerCase());\n\n // Cast empty attributes like `data-rule-required` to `true`\n if (value === \"\") {\n value = true;\n }\n this.normalizeAttributeRule(rules, type, method, value);\n }\n return rules;\n },\n staticRules: function (element) {\n var rules = {},\n validator = $.data(element.form, \"validator\");\n if (validator.settings.rules) {\n rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};\n }\n return rules;\n },\n normalizeRules: function (rules, element) {\n // Handle dependency check\n $.each(rules, function (prop, val) {\n // Ignore rule when param is explicitly false, eg. required:false\n if (val === false) {\n delete rules[prop];\n return;\n }\n if (val.param || val.depends) {\n var keepRule = true;\n switch (typeof val.depends) {\n case \"string\":\n keepRule = !!$(val.depends, element.form).length;\n break;\n case \"function\":\n keepRule = val.depends.call(element, element);\n break;\n }\n if (keepRule) {\n rules[prop] = val.param !== undefined ? val.param : true;\n } else {\n $.data(element.form, \"validator\").resetElements($(element));\n delete rules[prop];\n }\n }\n });\n\n // Evaluate parameters\n $.each(rules, function (rule, parameter) {\n rules[rule] = $.isFunction(parameter) && rule !== \"normalizer\" ? parameter(element) : parameter;\n });\n\n // Clean number parameters\n $.each([\"minlength\", \"maxlength\"], function () {\n if (rules[this]) {\n rules[this] = Number(rules[this]);\n }\n });\n $.each([\"rangelength\", \"range\"], function () {\n var parts;\n if (rules[this]) {\n if ($.isArray(rules[this])) {\n rules[this] = [Number(rules[this][0]), Number(rules[this][1])];\n } else if (typeof rules[this] === \"string\") {\n parts = rules[this].replace(/[\\[\\]]/g, \"\").split(/[\\s,]+/);\n rules[this] = [Number(parts[0]), Number(parts[1])];\n }\n }\n });\n if ($.validator.autoCreateRanges) {\n // Auto-create ranges\n if (rules.min != null && rules.max != null) {\n rules.range = [rules.min, rules.max];\n delete rules.min;\n delete rules.max;\n }\n if (rules.minlength != null && rules.maxlength != null) {\n rules.rangelength = [rules.minlength, rules.maxlength];\n delete rules.minlength;\n delete rules.maxlength;\n }\n }\n return rules;\n },\n // Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n normalizeRule: function (data) {\n if (typeof data === \"string\") {\n var transformed = {};\n $.each(data.split(/\\s/), function () {\n transformed[this] = true;\n });\n data = transformed;\n }\n return data;\n },\n // https://jqueryvalidation.org/jQuery.validator.addMethod/\n addMethod: function (name, method, message) {\n $.validator.methods[name] = method;\n $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];\n if (method.length < 3) {\n $.validator.addClassRules(name, $.validator.normalizeRule(name));\n }\n },\n // https://jqueryvalidation.org/jQuery.validator.methods/\n methods: {\n // https://jqueryvalidation.org/required-method/\n required: function (value, element, param) {\n // Check if dependency is met\n if (!this.depend(param, element)) {\n return \"dependency-mismatch\";\n }\n if (element.nodeName.toLowerCase() === \"select\") {\n // Could be an array for select-multiple or a string, both are fine this way\n var val = $(element).val();\n return val && val.length > 0;\n }\n if (this.checkable(element)) {\n return this.getLength(value, element) > 0;\n }\n return value !== undefined && value !== null && value.length > 0;\n },\n // https://jqueryvalidation.org/email-method/\n email: function (value, element) {\n // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n // Retrieved 2014-01-14\n // If you have a problem with this implementation, report a bug against the above spec\n // Or use custom methods to implement your own email validation\n return this.optional(element) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value);\n },\n // https://jqueryvalidation.org/url-method/\n url: function (value, element) {\n // Copyright (c) 2010-2013 Diego Perini, MIT licensed\n // https://gist.github.com/dperini/729294\n // see also https://mathiasbynens.be/demo/url-regex\n // modified to allow protocol-relative URLs\n return this.optional(element) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})).?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test(value);\n },\n // https://jqueryvalidation.org/date-method/\n date: function () {\n var called = false;\n return function (value, element) {\n if (!called) {\n called = true;\n if (this.settings.debug && window.console) {\n console.warn(\"The `date` method is deprecated and will be removed in version '2.0.0'.\\n\" + \"Please don't use it, since it relies on the Date constructor, which\\n\" + \"behaves very differently across browsers and locales. Use `dateISO`\\n\" + \"instead or one of the locale specific methods in `localizations/`\\n\" + \"and `additional-methods.js`.\");\n }\n }\n return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());\n };\n }(),\n // https://jqueryvalidation.org/dateISO-method/\n dateISO: function (value, element) {\n return this.optional(element) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);\n },\n // https://jqueryvalidation.org/number-method/\n number: function (value, element) {\n return this.optional(element) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test(value);\n },\n // https://jqueryvalidation.org/digits-method/\n digits: function (value, element) {\n return this.optional(element) || /^\\d+$/.test(value);\n },\n // https://jqueryvalidation.org/minlength-method/\n minlength: function (value, element, param) {\n var length = $.isArray(value) ? value.length : this.getLength(value, element);\n return this.optional(element) || length >= param;\n },\n // https://jqueryvalidation.org/maxlength-method/\n maxlength: function (value, element, param) {\n var length = $.isArray(value) ? value.length : this.getLength(value, element);\n return this.optional(element) || length <= param;\n },\n // https://jqueryvalidation.org/rangelength-method/\n rangelength: function (value, element, param) {\n var length = $.isArray(value) ? value.length : this.getLength(value, element);\n return this.optional(element) || length >= param[0] && length <= param[1];\n },\n // https://jqueryvalidation.org/min-method/\n min: function (value, element, param) {\n return this.optional(element) || value >= param;\n },\n // https://jqueryvalidation.org/max-method/\n max: function (value, element, param) {\n return this.optional(element) || value <= param;\n },\n // https://jqueryvalidation.org/range-method/\n range: function (value, element, param) {\n return this.optional(element) || value >= param[0] && value <= param[1];\n },\n // https://jqueryvalidation.org/step-method/\n step: function (value, element, param) {\n var type = $(element).attr(\"type\"),\n errorMessage = \"Step attribute on input type \" + type + \" is not supported.\",\n supportedTypes = [\"text\", \"number\", \"range\"],\n re = new RegExp(\"\\\\b\" + type + \"\\\\b\"),\n notSupported = type && !re.test(supportedTypes.join()),\n decimalPlaces = function (num) {\n var match = (\"\" + num).match(/(?:\\.(\\d+))?$/);\n if (!match) {\n return 0;\n }\n\n // Number of digits right of decimal point.\n return match[1] ? match[1].length : 0;\n },\n toInt = function (num) {\n return Math.round(num * Math.pow(10, decimals));\n },\n valid = true,\n decimals;\n\n // Works only for text, number and range input types\n // TODO find a way to support input types date, datetime, datetime-local, month, time and week\n if (notSupported) {\n throw new Error(errorMessage);\n }\n decimals = decimalPlaces(param);\n\n // Value can't have too many decimals\n if (decimalPlaces(value) > decimals || toInt(value) % toInt(param) !== 0) {\n valid = false;\n }\n return this.optional(element) || valid;\n },\n // https://jqueryvalidation.org/equalTo-method/\n equalTo: function (value, element, param) {\n // Bind to the blur event of the target in order to revalidate whenever the target field is updated\n var target = $(param);\n if (this.settings.onfocusout && target.not(\".validate-equalTo-blur\").length) {\n target.addClass(\"validate-equalTo-blur\").on(\"blur.validate-equalTo\", function () {\n $(element).valid();\n });\n }\n return value === target.val();\n },\n // https://jqueryvalidation.org/remote-method/\n remote: function (value, element, param, method) {\n if (this.optional(element)) {\n return \"dependency-mismatch\";\n }\n method = typeof method === \"string\" && method || \"remote\";\n var previous = this.previousValue(element, method),\n validator,\n data,\n optionDataString;\n if (!this.settings.messages[element.name]) {\n this.settings.messages[element.name] = {};\n }\n previous.originalMessage = previous.originalMessage || this.settings.messages[element.name][method];\n this.settings.messages[element.name][method] = previous.message;\n param = typeof param === \"string\" && {\n url: param\n } || param;\n optionDataString = $.param($.extend({\n data: value\n }, param.data));\n if (previous.old === optionDataString) {\n return previous.valid;\n }\n previous.old = optionDataString;\n validator = this;\n this.startRequest(element);\n data = {};\n data[element.name] = value;\n $.ajax($.extend(true, {\n mode: \"abort\",\n port: \"validate\" + element.name,\n dataType: \"json\",\n data: data,\n context: validator.currentForm,\n success: function (response) {\n var valid = response === true || response === \"true\",\n errors,\n message,\n submitted;\n validator.settings.messages[element.name][method] = previous.originalMessage;\n if (valid) {\n submitted = validator.formSubmitted;\n validator.resetInternals();\n validator.toHide = validator.errorsFor(element);\n validator.formSubmitted = submitted;\n validator.successList.push(element);\n validator.invalid[element.name] = false;\n validator.showErrors();\n } else {\n errors = {};\n message = response || validator.defaultMessage(element, {\n method: method,\n parameters: value\n });\n errors[element.name] = previous.message = message;\n validator.invalid[element.name] = true;\n validator.showErrors(errors);\n }\n previous.valid = valid;\n validator.stopRequest(element, valid);\n }\n }, param));\n return \"pending\";\n }\n }\n });\n\n // Ajax mode: abort\n // usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n // if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\n var pendingRequests = {},\n ajax;\n\n // Use a prefilter if available (1.5+)\n if ($.ajaxPrefilter) {\n $.ajaxPrefilter(function (settings, _, xhr) {\n var port = settings.port;\n if (settings.mode === \"abort\") {\n if (pendingRequests[port]) {\n pendingRequests[port].abort();\n }\n pendingRequests[port] = xhr;\n }\n });\n } else {\n // Proxy ajax\n ajax = $.ajax;\n $.ajax = function (settings) {\n var mode = (\"mode\" in settings ? settings : $.ajaxSettings).mode,\n port = (\"port\" in settings ? settings : $.ajaxSettings).port;\n if (mode === \"abort\") {\n if (pendingRequests[port]) {\n pendingRequests[port].abort();\n }\n pendingRequests[port] = ajax.apply(this, arguments);\n return pendingRequests[port];\n }\n return ajax.apply(this, arguments);\n };\n }\n return $;\n});","(function ($) {\n var cocoon_element_counter = 0;\n var create_new_id = function () {\n return new Date().getTime() + cocoon_element_counter++;\n };\n var newcontent_braced = function (id) {\n return '[' + id + ']$1';\n };\n var newcontent_underscord = function (id) {\n return '_' + id + '_$1';\n };\n var getInsertionNodeElem = function (insertionNode, insertionTraversal, $this) {\n if (!insertionNode) {\n return $this.parent();\n }\n if (typeof insertionNode == 'function') {\n if (insertionTraversal) {\n console.warn('association-insertion-traversal is ignored, because association-insertion-node is given as a function.');\n }\n return insertionNode($this);\n }\n if (typeof insertionNode == 'string') {\n if (insertionTraversal) {\n return $this[insertionTraversal](insertionNode);\n } else {\n return insertionNode == \"this\" ? $this : $(insertionNode);\n }\n }\n };\n $(document).on('click', '.add_fields', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $this = $(this),\n assoc = $this.data('association'),\n assocs = $this.data('associations'),\n content = $this.data('association-insertion-template'),\n insertionMethod = $this.data('association-insertion-method') || $this.data('association-insertion-position') || 'before',\n insertionNode = $this.data('association-insertion-node'),\n insertionTraversal = $this.data('association-insertion-traversal'),\n count = parseInt($this.data('count'), 10),\n regexp_braced = new RegExp('\\\\[new_' + assoc + '\\\\](.*?\\\\s)', 'g'),\n regexp_underscord = new RegExp('_new_' + assoc + '_(\\\\w*)', 'g'),\n new_id = create_new_id(),\n new_content = content.replace(regexp_braced, newcontent_braced(new_id)),\n new_contents = [],\n originalEvent = e;\n if (new_content == content) {\n regexp_braced = new RegExp('\\\\[new_' + assocs + '\\\\](.*?\\\\s)', 'g');\n regexp_underscord = new RegExp('_new_' + assocs + '_(\\\\w*)', 'g');\n new_content = content.replace(regexp_braced, newcontent_braced(new_id));\n }\n new_content = new_content.replace(regexp_underscord, newcontent_underscord(new_id));\n new_contents = [new_content];\n count = isNaN(count) ? 1 : Math.max(count, 1);\n count -= 1;\n while (count) {\n new_id = create_new_id();\n new_content = content.replace(regexp_braced, newcontent_braced(new_id));\n new_content = new_content.replace(regexp_underscord, newcontent_underscord(new_id));\n new_contents.push(new_content);\n count -= 1;\n }\n var insertionNodeElem = getInsertionNodeElem(insertionNode, insertionTraversal, $this);\n if (!insertionNodeElem || insertionNodeElem.length == 0) {\n console.warn(\"Couldn't find the element to insert the template. Make sure your `data-association-insertion-*` on `link_to_add_association` is correct.\");\n }\n $.each(new_contents, function (i, node) {\n var contentNode = $(node);\n var before_insert = jQuery.Event('cocoon:before-insert');\n insertionNodeElem.trigger(before_insert, [contentNode, originalEvent]);\n if (!before_insert.isDefaultPrevented()) {\n // allow any of the jquery dom manipulation methods (after, before, append, prepend, etc)\n // to be called on the node. allows the insertion node to be the parent of the inserted\n // code and doesn't force it to be a sibling like after/before does. default: 'before'\n var addedContent = insertionNodeElem[insertionMethod](contentNode);\n insertionNodeElem.trigger('cocoon:after-insert', [contentNode, originalEvent]);\n }\n });\n });\n $(document).on('click', '.remove_fields.dynamic, .remove_fields.existing', function (e) {\n var $this = $(this),\n wrapper_class = $this.data('wrapper-class') || 'nested-fields',\n node_to_delete = $this.closest('.' + wrapper_class),\n trigger_node = node_to_delete.parent(),\n originalEvent = e;\n e.preventDefault();\n e.stopPropagation();\n var before_remove = jQuery.Event('cocoon:before-remove');\n trigger_node.trigger(before_remove, [node_to_delete, originalEvent]);\n if (!before_remove.isDefaultPrevented()) {\n var timeout = trigger_node.data('remove-timeout') || 0;\n setTimeout(function () {\n if ($this.hasClass('dynamic')) {\n node_to_delete.detach();\n } else {\n $this.prev(\"input[type=hidden]\").val(\"1\");\n node_to_delete.hide();\n }\n trigger_node.trigger('cocoon:after-remove', [node_to_delete, originalEvent]);\n }, timeout);\n }\n });\n $(document).on(\"ready page:load turbolinks:load\", function () {\n $('.remove_fields.existing.destroyed').each(function (i, obj) {\n var $this = $(this),\n wrapper_class = $this.data('wrapper-class') || 'nested-fields';\n $this.closest('.' + wrapper_class).hide();\n });\n });\n})(jQuery);"],"sourceRoot":""}