2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
this.primereact=this.primereact||{},this.primereact.password=function(e,t,n,r,i,o,s,l,a){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=p(t),c=p(s);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var x=function(e){m(L,e);var p,v,b,O,w,x=(p=L,v=R(),function(){var e,t=k(p);if(v){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function L(e){var n;return f(this,L),(n=x.call(this,e)).state={overlayVisible:!1,meter:null,infoText:n.promptLabel(),focused:!1,unmasked:!1},n.onFocus=n.onFocus.bind(y(n)),n.onBlur=n.onBlur.bind(y(n)),n.onKeyup=n.onKeyup.bind(y(n)),n.onInput=n.onInput.bind(y(n)),n.onMaskToggle=n.onMaskToggle.bind(y(n)),n.onOverlayEnter=n.onOverlayEnter.bind(y(n)),n.onOverlayEntered=n.onOverlayEntered.bind(y(n)),n.onOverlayExit=n.onOverlayExit.bind(y(n)),n.onOverlayExited=n.onOverlayExited.bind(y(n)),n.onPanelClick=n.onPanelClick.bind(y(n)),n.overlayRef=t.createRef(),n.inputRef=t.createRef(n.props.inputRef),n.mediumCheckRegExp=new RegExp(n.props.mediumRegex),n.strongCheckRegExp=new RegExp(n.props.strongRegex),n}return b=L,(O=[{key:"promptLabel",value:function(){return this.props.promptLabel||s.localeOption("passwordPrompt")}},{key:"weakLabel",value:function(){return this.props.weakLabel||s.localeOption("weak")}},{key:"mediumLabel",value:function(){return this.props.mediumLabel||s.localeOption("medium")}},{key:"strongLabel",value:function(){return this.props.strongLabel||s.localeOption("strong")}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toStrin
|