PageSourceSearch

https://www.sorelfootwear.de/on/demandware.static/Sites-Sorel_DE-S…/de_DE/v1791424054643/js/passwordChecker.js

js sorelfootwear.de collected 2026-10-08 06:53:57 UTC 9,163 bytes, 216 lines download raw bytes

vendor: 3,639 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./.tmp/app_sor_eu_core/js/passwordChecker.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./.tmp/app_sor_eu_core/js/components/processInclude.js":
90/*!**************************************************************!*\
91  !*** ./.tmp/app_sor_eu_core/js/components/processInclude.js ***!
92  \**************************************************************/
93/*! no static exports found */
94/***/ (function(module, exports, __webpack_require__) {
95
96"use strict";
97
98
99function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
100module.exports = function (include) {
101  if (typeof include === 'function') {
102    include();
103  } else if (_typeof(include) === 'object') {
104    Object.keys(include).forEach(function (key) {
105      if (typeof include[key] === 'function') {
106        include[key]();
107      }
108    });
109  }
110};
111
112/***/ }),
113
114/***/ "./.tmp/app_sor_eu_core/js/passwordChecker.js":
115/*!****************************************************!*\
116  !*** ./.tmp/app_sor_eu_core/js/passwordChecker.js ***!
117  \****************************************************/
118/*! no static exports found */
119/***/ (function(module, exports, __webpack_require__) {
120
121"use strict";
122
123
124var processInclude = __webpack_require__(/*! ./components/processInclude */ "./.tmp/app_sor_eu_core/js/components/processInclude.js");
125$(document).ready(function () {
126  processInclude(__webpack_require__(/*! ./passwordChecker/passwordChecker */ "./.tmp/app_sor_eu_core/js/passwordChecker/passwordChecker.js"));
127});
128
129/***/ }),
130
131/***/ "./.tmp/app_sor_eu_core/js/passwordChecker/passwordChecker.js":
132/*!********************************************************************!*\
133  !*** ./.tmp/app_sor_eu_core/js/passwordChecker/passwordChecker.js ***!
134  \********************************************************************/
135/*! no static exports found */
136/***/ (function(module, exports, __webpack_require__) {
137
138"use strict";
139
140
141/**
142 * Takes the current password value and tests each constraint against the appropriate regex expression
143 * If regex criteria is met, it will add isValid
144 * @param {string} passwordValue - current value in the password field
145 * @param {string} constraintField - selector of the constraint
146 * @param {string} regexPattern - pattern that will be used to test against
147 * @return {boolean} - true if constraint is met, false otherwise
148 */
149function showPasswordConstraint(passwordValue, constraintField, regexPattern) {
150  // Regex Pattern will not exist if we do not enforce mixed case, min number or min special character requirements
151  var constraintMet = true;
152  if (regexPattern) {
153    var $constraintField = $(constraintField);
154    var regex = new RegExp(regexPattern);
155    if (regex.test(passwordValue)) {
156      $constraintField.addClass('isValid');
157    } else {
158      $constraintField.removeClass('isValid');
159      constraintMet = false;
160    }
161  }
162  return constraintMet;
163}
164
165/**
166 * Takes the current password value and tests each constraint against the appropriate regex expression
167 * If regex criteria is met, it will add isValid
168 * @param {string} $passwordField - current value in the password field
169 * @return {boolean} - true if constraint is met, false otherwise
170 */
171function checkPasswordValidity($passwordField) {
172  var isValid = true;
173  if ($passwordField) {
174    var passwordValue = $passwordField.val();
175    var $constraintField = $passwordField.parents('.form-group').find('.constraintRegex');
176    var $invalidPasswordField = $passwordField.parents('.form-group').find('.invalid-password');
177    var hideConstraints = $passwordField.parents('form').data('hide-constraints');
178    var allowEmpty = $constraintField.data('allow-empty');
179    var constraintsMet;
180    if (!hideConstraints) {
181      var constraintsJSON = $constraintField.data('pass-regex');
182      var minCharConstraint = showPasswordConstraint(passwordValue, '.min-char-constraint', constraintsJSON.minLengthRegex);
183      var lowerCaseConstraint = showPasswordConstraint(passwordValue, '.lower-case-constraint', constraintsJSON.lowerCaseRegex);
184      var upperCaseConstraint = showPasswordConstraint(passwordValue, '.upper-case-constraint', constraintsJSON.upperCaseRegex);
185      var minNumberConstraint = showPasswordConstraint(passwordValue, '.min-number-constraint', constraintsJSON.numberRegex);
186      var minSpecialCharConstraint = showPasswordConstraint(passwordValue, '.min-specialChar-constraint', constraintsJSON.specialCharRegex);
187      if (minCharConstraint && lowerCaseConstraint && upperCaseConstraint && minNumberConstraint && minSpecialCharConstraint || allowEmpty && !passwordValue.length) {
188        constraintsMet = true;
189      }
190    }
191    if (constraintsMet || hideConstraints) {
192      $invalidPasswordField.addClass('d-none');
193      $passwordField.removeClass('is-invalid');
194      $passwordField.parent().removeClass('is-invalid');
195    } else {
196      // Password field is only invalid if focus is lost before input is valid
197      isValid = false;
198    }
199  }
200  return isValid;
201}
202module.exports = {
203  init: function init() {
204    $('body').off('keyup change', '.js-password-checker').on('keyup change', '.js-password-checker', function (e) {
205      e.preventDefault();
206      var $passwordField = $(this);
207      checkPasswordValidity($passwordField);
208    });
209  },
210  checkPasswordValidity: checkPasswordValidity
211};
212
213/***/ })
213
214
215/******/ });
216//# sourceMappingURL=passwordChecker.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.