window.employee_form=function(e){function t(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=321)}({18:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&t[o].name){var s=this._createOptionGroup(t[o].name);for(var r in t[o].children)t[o].children[r].name&&s.append(this._createOption(t[o].children[r].name,t[o].children[r].id_tab));n.append(s)}else t[o].name&&n.append(this._createOption(t[o].name,t[o].id_tab))}},{key:"_toggleShopTree",value:function(){var t=e(this.employeeProfileSelector),n=t.data("admin-profile");e(this.shopChoiceTreeSelector).closest(".form-group").toggleClass("d-none",t.val()==n)}},{key:"_createOptionGroup",value:function(t){return e('')}},{key:"_createOption",value:function(t,n){return e('")}}]),t}();t.default=f}).call(t,n(4))},303:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return o(this,e),this.minLength=s.minLength||8,this.$feedbackContainer=r(t),{watchPasswordStrength:function(e){return n.watchPasswordStrength(e)},generatePassword:function(e){return n.generatePassword(e)}}}return s(e,[{key:"watchPasswordStrength",value:function(e){var t=this;r.passy.requirements.length.min=this.minLength,r.passy.requirements.characters="DIGIT",e.each(function(e,n){var o=r("");o.insertAfter(r(n)),r(n).passy(function(e,n){t._displayFeedback(o,e,n)})})}},{key:"generatePassword",value:function(e){e.passy("generate",this.minLength)}},{key:"_displayFeedback",value:function(e,t,n){var o=this._getPasswordStrengthFeedback(t);e.text(o.message),e.removeClass("text-danger text-warning text-success"),e.addClass(o.elementClass),e.toggleClass("d-none",!n)}},{key:"_getPasswordStrengthFeedback",value:function(e){switch(e){case r.passy.strength.LOW:return{message:this.$feedbackContainer.find(".strength-low").text(),elementClass:"text-danger"};case r.passy.strength.MEDIUM:return{message:this.$feedbackContainer.find(".strength-medium").text(),elementClass:"text-warning"};case r.passy.strength.HIGH:return{message:this.$feedbackContainer.find(".strength-high").text(),elementClass:"text-success"};case r.passy.strength.EXTREME:return{message:this.$feedbackContainer.find(".strength-extreme").text(),elementClass:"text-success"}}throw"Invalid password strength indicator."}}]),e}();t.default=a},305:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,e),this.newPasswordInput=document.querySelector(t),this.confirmPasswordInput=document.querySelector(n),this.minPasswordLength=s.minPasswordLength||8,this.maxPasswordLength=s.maxPasswordLength||255}return s(e,[{key:"isPasswordValid",value:function(){return!(this.confirmPasswordInput&&!this.isPasswordMatchingConfirmation())&&this.isPasswordLengthValid()}},{key:"isPasswordLengthValid",value:function(){return!this.isPasswordTooShort()&&!this.isPasswordTooLong()}},{key:"isPasswordMatchingConfirmation",value:function(){if(!this.confirmPasswordInput)throw"Confirm password input is not provided for the password validator.";return""===this.confirmPasswordInput.value||this.newPasswordInput.value===this.confirmPasswordInput.value}},{key:"isPasswordTooShort",value:function(){return this.newPasswordInput.value.lengththis.maxPasswordLength}}]),e}();t.default=r},320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),/** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ t.default={shopChoiceTree:"#employee_shop_association",profileSelect:"#employee_profile",defaultPageSelect:"#employee_default_page",addonsConnectForm:"#addons-connect-form",addonsLoginButton:"#addons_login_btn",changePasswordInputsBlock:".js-change-password-block",showChangePasswordBlockButton:".js-change-password",hideChangePasswordBlockButton:".js-change-password-cancel",generatePasswordButton:"#employee_change_password_generate_password_button",oldPasswordInput:"#employee_change_password_old_password",newPasswordInput:"#employee_change_password_new_password_first",confirmNewPasswordInput:"#employee_change_password_new_password_second",generatedPasswordDisplayInput:"#employee_change_password_generated_password",passwordStrengthFeedbackContainer:".js-password-strength-feedback"}},321:function(e,t,n){"use strict";(function(e){var t=n(254),o=function(e){return e&&e.__esModule?e:{default:e}}(t);e(function(){new o.default})}).call(t,n(4))},4:function(e,t){!function(){e.exports=window.jQuery}()}});