import{$ as e,E as t,L as n,N as r,O as i,Q as ee,R as a,Rt as o,S as s,T as c,X as l,Z as u,_t as d,b as f,d as p,dt as m,ft as te,kt as h,mt as g,n as ne,ot as _,p as v,q as y,r as b,u as x,x as S,y as C}from"./vue-i18n-Bp4YYb-2.js";import{Ct as w,D as re,F as T,It as E,Lt as ie,M as D,Nt as O,O as k,P as A,T as j,U as M,V as N,_t as P,at as F,f as I,lt as L,p as R,sr as ae,z}from"./index-BOiiIZox.js";var B={name:`EyeIcon`,extends:z};function V(e){return G(e)||W(e)||U(e)||H()}function H(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U(e,t){if(e){if(typeof e==`string`)return K(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function W(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function G(e){if(Array.isArray(e))return K(e)}function K(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t,r,i,ee,a){return y(),s(`svg`,n({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),V(t[0]||(t[0]=[C(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z`,fill:`currentColor`},null,-1)])),16)}B.render=q;var J={name:`EyeSlashIcon`,extends:z};function oe(e){return ue(e)||le(e)||ce(e)||se()}function se(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){if(e){if(typeof e==`string`)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}function le(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ue(e){if(Array.isArray(e))return Y(e)}function Y(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function de(e,t,r,i,ee,a){return y(),s(`svg`,n({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),oe(t[0]||(t[0]=[C(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z`,fill:`currentColor`},null,-1)])),16)}J.render=de;var fe=N.extend({name:`password`,style:`
    .p-password {
        display: inline-flex;
        position: relative;
    }

    .p-password .p-password-overlay {
        min-width: 100%;
    }

    .p-password-meter {
        height: dt('password.meter.height');
        background: dt('password.meter.background');
        border-radius: dt('password.meter.border.radius');
    }

    .p-password-meter-label {
        height: 100%;
        width: 0;
        transition: width 1s ease-in-out;
        border-radius: dt('password.meter.border.radius');
    }

    .p-password-meter-weak {
        background: dt('password.strength.weak.background');
    }

    .p-password-meter-medium {
        background: dt('password.strength.medium.background');
    }

    .p-password-meter-strong {
        background: dt('password.strength.strong.background');
    }

    .p-password-fluid {
        display: flex;
    }

    .p-password-fluid .p-password-input {
        width: 100%;
    }

    .p-password-input::-ms-reveal,
    .p-password-input::-ms-clear {
        display: none;
    }

    .p-password-overlay {
        padding: dt('password.overlay.padding');
        background: dt('password.overlay.background');
        color: dt('password.overlay.color');
        border: 1px solid dt('password.overlay.border.color');
        box-shadow: dt('password.overlay.shadow');
        border-radius: dt('password.overlay.border.radius');
    }

    .p-password-content {
        display: flex;
        flex-direction: column;
        gap: dt('password.content.gap');
    }

    .p-password-toggle-mask-icon {
        inset-inline-end: dt('form.field.padding.x');
        color: dt('password.icon.color');
        position: absolute;
        top: 50%;
        margin-top: calc(-1 * calc(dt('icon.size') / 2));
        width: dt('icon.size');
        height: dt('icon.size');
    }

    .p-password-clear-icon {
        position: absolute;
        top: 50%;
        margin-top: -0.5rem;
        cursor: pointer;
        inset-inline-end: dt('form.field.padding.x');
        color: dt('form.field.icon.color');
    }

    .p-password:has(.p-password-toggle-mask-icon) .p-password-input {
        padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
    }

    .p-password:has(.p-password-toggle-mask-icon) .p-password-clear-icon {
        inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
    }

    .p-password:has(.p-password-clear-icon) .p-password-input {
        padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
    }

    .p-password:has(.p-password-clear-icon):has(.p-password-toggle-mask-icon)  .p-password-input {
        padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
    }

`,classes:{root:function(e){var t=e.instance;return[`p-password p-component p-inputwrapper`,{"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":t.focused,"p-password-fluid":t.$fluid}]},pcInputText:`p-password-input`,maskIcon:`p-password-toggle-mask-icon p-password-mask-icon`,unmaskIcon:`p-password-toggle-mask-icon p-password-unmask-icon`,clearIcon:`p-password-clear-icon`,overlay:`p-password-overlay p-component`,content:`p-password-content`,meter:`p-password-meter`,meterLabel:function(e){var t=e.instance;return`p-password-meter-label ${t.meter?`p-password-meter-`+t.meter.strength:``}`},meterText:`p-password-meter-text`},inlineStyles:{root:function(e){return{position:e.props.appendTo===`self`?`relative`:void 0}}}}),pe={name:`BasePassword`,extends:k,props:{promptLabel:{type:String,default:null},mediumRegex:{type:[String,RegExp],default:`^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})`},strongRegex:{type:[String,RegExp],default:`^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})`},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:`body`},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},maskIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},unmaskIcon:{type:String,default:void 0},showClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},overlayId:{type:String,default:null},overlayClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},autofocus:{type:Boolean,default:null}},style:fe,provide:function(){return{$pcPassword:this,$parentInstance:this}}};function X(e){"@babel/helpers - typeof";return X=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},X(e)}function me(e,t,n){return(t=he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){var t=ge(e,`string`);return X(t)==`symbol`?t:t+``}function ge(e,t){if(X(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(X(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Z={name:`Password`,extends:pe,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`invalid`],inject:{$pcFluid:{default:null}},data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(M.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){M.set(`overlay`,e,this.$primevue.config.zIndex.overlay),P(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``)},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){M.clear(e)},alignOverlay:function(){this.appendTo===`self`?L(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=O(this.$refs.input.$el)+`px`,F(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.writeValue(e.target.value,e),this.$emit(`change`,e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.d_value),this.overlayVisible=!0),this.$emit(`focus`,e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit(`blur`,e)},onKeyUp:function(e){if(this.feedback){var t=e.target.value,n=this.checkPasswordStrength(t),r=n.meter,i=n.label;if(this.meter=r,this.infoText=i,e.code===`Escape`){this.overlayVisible&&(this.overlayVisible=!1);return}this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(!this.d_value){this.meter=null,this.infoText=this.promptText;return}var e=this.checkPasswordStrength(this.d_value),t=e.meter,n=e.label;this.meter=t,this.infoText=n,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:`weak`,width:`33.33%`};break;case 2:t=this.mediumText,n={strength:`medium`,width:`66.66%`};break;case 3:t=this.strongText,n={strength:`strong`,width:`100%`};break;default:t=this.promptText,n=null;break}return{label:t,meter:n}},onInvalid:function(e){this.$emit(`invalid`,e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new R(this.$refs.input.$el,function(){e.overlayVisible&&(e.overlayVisible=!1)})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!w()&&(e.overlayVisible=!1)},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener(`resize`,this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onClearClick:function(e){this.writeValue(null,{})},onOverlayClick:function(e){I.emit(`overlay-click`,{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?`text`:`password`},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},isClearIconVisible:function(){return this.showClear&&this.$filled&&!this.disabled},overlayUniqueId:function(){return this.$id+`_overlay`},containerDataP:function(){return E({fluid:this.$fluid})},meterDataP:function(){return E(me({},this.meter?.strength,this.meter?.strength))},overlayDataP:function(){return E(me({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},components:{InputText:re,Portal:A,EyeSlashIcon:J,EyeIcon:B,TimesIcon:D}};function Q(e){"@babel/helpers - typeof";return Q=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Q(e)}function _e(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){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_e(Object(n),!0).forEach(function(t){ve(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ve(e,t,n){return(t=ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e){var t=be(e,`string`);return Q(t)==`symbol`?t:t+``}function be(e,t){if(Q(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Q(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var xe=[`data-p`],Se=[`id`,`data-p`],Ce=[`data-p`];function we(r,i,ee,a,o,c){var p=u(`InputText`),te=u(`TimesIcon`),h=u(`Portal`);return y(),s(`div`,n({class:r.cx(`root`),style:r.sx(`root`),"data-p":c.containerDataP},r.ptmi(`root`)),[t(p,n({ref:`input`,id:r.inputId,type:c.inputType,class:[r.cx(`pcInputText`),r.inputClass],style:r.inputStyle,defaultValue:r.d_value,name:r.$formName,"aria-labelledby":r.ariaLabelledby,"aria-label":r.ariaLabel,"aria-expanded":o.overlayVisible,"aria-controls":o.overlayVisible?r.overlayProps&&r.overlayProps.id||r.overlayId||r.panelProps&&r.panelProps.id||r.panelId||c.overlayUniqueId:void 0,"aria-haspopup":!0,placeholder:r.placeholder,required:r.required,fluid:r.fluid,disabled:r.disabled,variant:r.variant,invalid:r.invalid,size:r.size,autofocus:r.autofocus,onInput:c.onInput,onFocus:c.onFocus,onBlur:c.onBlur,onKeyup:c.onKeyUp,onInvalid:c.onInvalid},r.inputProps,{"data-p-has-e-icon":r.toggleMask,pt:r.ptm(`pcInputText`),unstyled:r.unstyled}),null,16,`id.type.class.style.defaultValue.name.aria-labelledby.aria-label.aria-expanded.aria-controls.placeholder.required.fluid.disabled.variant.invalid.size.autofocus.onInput.onFocus.onBlur.onKeyup.onInvalid.data-p-has-e-icon.pt.unstyled`.split(`.`)),r.toggleMask&&o.unmasked?l(r.$slots,r.$slots.maskicon?`maskicon`:`hideicon`,n({key:0,toggleCallback:c.onMaskToggle,class:[r.cx(`maskIcon`),r.maskIcon]},r.ptm(`maskIcon`)),function(){return[(y(),f(e(r.maskIcon?`i`:`EyeSlashIcon`),n({class:[r.cx(`maskIcon`),r.maskIcon],onClick:c.onMaskToggle},r.ptm(`maskIcon`)),null,16,[`class`,`onClick`]))]}):S(``,!0),r.toggleMask&&!o.unmasked?l(r.$slots,r.$slots.unmaskicon?`unmaskicon`:`showicon`,n({key:1,toggleCallback:c.onMaskToggle,class:[r.cx(`unmaskIcon`)]},r.ptm(`unmaskIcon`)),function(){return[(y(),f(e(r.unmaskIcon?`i`:`EyeIcon`),n({class:[r.cx(`unmaskIcon`),r.unmaskIcon],onClick:c.onMaskToggle},r.ptm(`unmaskIcon`)),null,16,[`class`,`onClick`]))]}):S(``,!0),c.isClearIconVisible?l(r.$slots,`clearicon`,n({key:2,class:r.cx(`clearIcon`),clearCallback:c.onClearClick},r.ptm(`clearIcon`)),function(){return[t(te,n({class:[r.cx(`clearIcon`)],onClick:c.onClearClick},r.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):S(``,!0),C(`span`,n({class:`p-hidden-accessible`,"aria-live":`polite`},r.ptm(`hiddenAccesible`),{"data-p-hidden-accessible":!0}),d(o.infoText),17),t(h,{appendTo:r.appendTo},{default:m(function(){return[t(b,n({name:`p-connected-overlay`,onEnter:c.onOverlayEnter,onLeave:c.onOverlayLeave,onAfterLeave:c.onOverlayAfterLeave},r.ptm(`transition`)),{default:m(function(){return[o.overlayVisible?(y(),s(`div`,n({key:0,ref:c.overlayRef,id:r.overlayId||r.panelId||c.overlayUniqueId,class:[r.cx(`overlay`),r.panelClass,r.overlayClass],style:[r.overlayStyle,r.panelStyle],onClick:i[0]||(i[0]=function(){return c.onOverlayClick&&c.onOverlayClick.apply(c,arguments)}),"data-p":c.overlayDataP,role:`dialog`,"aria-live":`polite`},$($($({},r.panelProps),r.overlayProps),r.ptm(`overlay`))),[l(r.$slots,`header`),l(r.$slots,`content`,{},function(){return[C(`div`,n({class:r.cx(`content`)},r.ptm(`content`)),[C(`div`,n({class:r.cx(`meter`)},r.ptm(`meter`)),[C(`div`,n({class:r.cx(`meterLabel`),style:{width:o.meter?o.meter.width:``},"data-p":c.meterDataP},r.ptm(`meterLabel`)),null,16,Ce)],16),C(`div`,n({class:r.cx(`meterText`)},r.ptm(`meterText`)),d(o.infoText),17)],16)]}),l(r.$slots,`footer`)],16,Se)):S(``,!0)]}),_:3},16,[`onEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,xe)}Z.render=we;var Te={key:0,class:`mb-12 w-64 text-text-color whitespace-pre-line`},Ee={key:1,class:`text-text-color-secondary text-sm text-center mb-4`},De={for:`current-password`},Oe={class:`min-h-[1.2rem] flex items-center gap-1 mb-16`},ke={key:0,class:`pi pi-times-circle text-red text-xs`},Ae=[`for`],je={class:`min-h-[1.2rem] flex items-center gap-1`},Me={key:0,class:`pi pi-times-circle text-red text-xs`},Ne={for:`confirm-password`},Pe={key:1,class:`min-h-[1.2rem] flex items-center gap-1 mb-16`},Fe={key:0,class:`pi pi-times-circle text-red text-xs`},Ie={class:`text-red text-xs`},Le={key:4,class:`text-red text-sm text-center mb-2 mt-[-2.5rem]`},Re={class:`flex flex-col items-center place-content-between mt-4`},ze=[`onKeydown`],Be={key:4,class:`w-full mt-3 flex flex-col gap-2`},Ve={class:`text-text-color-secondary text-sm`},He={class:`flex items-center gap-2 bg-bg-two border border-border-one rounded px-2 py-1`},Ue=`sudo coolercontrold --reset-password`,We=i({__name:`PasswordDialog`,setup(e){let n=r(`dialogRef`),{t:i}=ne(),l=ae(),u=ie(),b=h(!1),w=()=>{b.value=!b.value},re=async()=>{try{await navigator.clipboard.writeText(Ue),l.add({severity:`success`,summary:i(`components.password.forgotPasswordCommandCopied`),life:1500})}catch{}},E=()=>{u.reloadUI(!0)},D=n.value.data.setPasswd,O=n.value.data.promptMessage,k=!!n.value.data.currentPasswd,A=h(n.value.data.currentPasswd||``),M=h(``),N=h(``),P=h(D&&!k?1:2),F=h(null),I=h(!1),L=h(k),R=h(!1),z=h(!1);_(A,()=>{L.value=!0}),_(M,()=>{R.value=!0}),_(N,()=>{z.value=!0});let B=e=>e==null||e.trim().length===0,V=()=>D&&M.value!==N.value,H=()=>D?B(A.value)||B(M.value)||B(N.value)||V():B(M.value),U=async()=>{if(L.value=!0,R.value=!0,z.value=!0,H())return;let e=n.value.data.onSubmit;if(e){F.value=null,I.value=!0;let t=await e(A.value,M.value);if(I.value=!1,t!=null){F.value=t;return}n.value.close({currentPasswd:A.value,passwd:M.value})}else n.value.close({passwd:M.value})},W=h(),G=h(),K=h(),q=n.value.data.onVerifyCurrentPassword,J=async()=>{if(L.value=!0,!B(A.value)){if(q){F.value=null,I.value=!0;let e=await q(A.value);if(I.value=!1,e!=null){F.value=e;return}}P.value=2,a(()=>G.value.$el.children[0].focus())}},oe=()=>{P.value=1,F.value=null,a(()=>W.value.$el.children[0].focus())},se=()=>{B(M.value)||a(()=>K.value.$el.children[0].focus())};return a(async()=>{await new Promise(e=>setTimeout(e,300)),P.value===1?W.value.$el.children[0].focus():G.value.$el.children[0].focus()}),(e,n)=>{let r=ee(`tooltip`);return y(),s(`form`,{onSubmit:n[4]||(n[4]=p(()=>{},[`prevent`]))},[o(O)?(y(),s(`p`,Te,d(o(O)),1)):S(``,!0),o(D)&&!k?(y(),s(`div`,Ee,d(P.value)+` / 2 `,1)):S(``,!0),P.value===1?(y(),s(v,{key:2},[n[5]||(n[5]=C(`input`,{type:`text`,autocomplete:`username`,value:`CCAdmin`,hidden:``,"aria-hidden":`true`},null,-1)),t(o(j),{class:`mt-6 mb-1`},{default:m(()=>[t(o(Z),{ref_key:`currentPasswdInputArea`,ref:W,class:g({filled:!B(A.value)}),id:`current-password`,modelValue:A.value,"onUpdate:modelValue":n[0]||(n[0]=e=>A.value=e),invalid:L.value&&B(A.value),feedback:!1,pt:{pcInputText:{root:{autocomplete:`current-password`}}},"toggle-mask":``,required:``,onKeydown:x(J,[`enter`])},null,8,[`class`,`modelValue`,`invalid`]),C(`label`,De,d(o(i)(`common.currentPassword`)),1)]),_:1}),C(`div`,Oe,[L.value&&B(A.value)?(y(),s(`i`,ke)):S(``,!0)])],64)):S(``,!0),P.value===2?(y(),s(v,{key:3},[n[7]||(n[7]=C(`input`,{type:`text`,autocomplete:`username`,value:`CCAdmin`,hidden:``,"aria-hidden":`true`},null,-1)),t(o(j),{class:`mt-6 mb-1`},{default:m(()=>[t(o(Z),{ref_key:`passwdInputArea`,ref:G,class:g({filled:!B(M.value)}),id:o(D)?`new-password`:`password`,modelValue:M.value,"onUpdate:modelValue":n[1]||(n[1]=e=>M.value=e),invalid:R.value&&B(M.value),feedback:o(D),pt:{pcInputText:{root:{autocomplete:o(D)?`new-password`:`current-password`}}},"toggle-mask":``,required:``,onKeydown:n[2]||(n[2]=x(e=>o(D)?se():U(),[`enter`])),"prompt-label":o(i)(`common.passwordPrompt`),"weak-label":o(i)(`common.passwordWeak`),"medium-label":o(i)(`common.passwordMedium`),"strong-label":o(i)(`common.passwordStrong`)},null,8,[`class`,`id`,`modelValue`,`invalid`,`feedback`,`pt`,`prompt-label`,`weak-label`,`medium-label`,`strong-label`]),C(`label`,{for:o(D)?`new-password`:`password`},d(o(D)?o(i)(`common.newPassword`):o(i)(`common.password`)),9,Ae)]),_:1}),C(`div`,je,[R.value&&B(M.value)?(y(),s(`i`,Me)):S(``,!0)]),o(D)?(y(),f(o(j),{key:0,class:`mt-2 mb-1`},{default:m(()=>[t(o(Z),{ref_key:`confirmPasswdInputArea`,ref:K,class:g({filled:!B(N.value)}),id:`confirm-password`,modelValue:N.value,"onUpdate:modelValue":n[3]||(n[3]=e=>N.value=e),invalid:z.value&&(B(N.value)||V()),feedback:!1,pt:{pcInputText:{root:{autocomplete:`new-password`}}},"toggle-mask":``,required:``,bellow:``,onKeydown:x(U,[`enter`])},null,8,[`class`,`modelValue`,`invalid`]),C(`label`,Ne,d(o(i)(`common.confirmPassword`)),1)]),_:1})):S(``,!0),o(D)?(y(),s(`div`,Pe,[z.value?(y(),s(v,{key:0},[B(N.value)?(y(),s(`i`,Fe)):V()?(y(),s(v,{key:1},[n[6]||(n[6]=C(`i`,{class:`pi pi-times-circle text-red text-xs`},null,-1)),C(`span`,Ie,d(o(i)(`components.password.passwordMismatch`)),1)],64)):S(``,!0)],64)):S(``,!0)])):S(``,!0)],64)):S(``,!0),F.value?(y(),s(`p`,Le,d(F.value),1)):S(``,!0),C(`footer`,Re,[P.value===1?(y(),f(o(T),{key:0,class:`bg-accent/80 hover:!bg-accent/100 w-full`,onClick:J,disabled:B(A.value)||I.value,loading:I.value},{default:m(()=>[c(d(o(i)(`components.password.continueButton`)),1)]),_:1},8,[`disabled`,`loading`])):S(``,!0),P.value===2?(y(),f(o(T),{key:1,class:`bg-accent/80 hover:!bg-accent/100 w-full`,onClick:U,disabled:H()||I.value,loading:I.value},{default:m(()=>[c(d(o(D)?o(i)(`common.savePassword`):o(i)(`common.ok`)),1)]),_:1},8,[`disabled`,`loading`])):S(``,!0),P.value===2&&o(D)&&!k?(y(),f(o(T),{key:2,text:``,class:`mt-2 text-text-color-secondary`,onClick:oe},{default:m(()=>[c(` ← `+d(o(i)(`components.password.backButton`)),1)]),_:1})):S(``,!0),n[8]||(n[8]=C(`br`,null,null,-1)),k?S(``,!0):(y(),s(`span`,{key:3,class:`text-text-color-secondary text-sm underline underline-offset-2 select-none cursor-pointer`,role:`button`,tabindex:`0`,onClick:w,onKeydown:[x(p(w,[`prevent`]),[`enter`]),x(p(w,[`prevent`]),[`space`])]},d(o(i)(`components.password.forgotPassword`)),41,ze)),b.value&&!k?(y(),s(`div`,Be,[C(`p`,Ve,d(o(i)(`components.password.forgotPasswordHelpIntro`)),1),C(`div`,He,[C(`code`,{class:`flex-1 font-mono text-sm select-all break-all`},d(Ue)),te(t(o(T),{text:``,size:`small`,icon:`pi pi-copy`,"aria-label":o(i)(`components.password.forgotPasswordCopyCommand`),onClick:re},null,8,[`aria-label`]),[[r,o(i)(`components.password.forgotPasswordCopyCommand`),void 0,{top:!0}]])]),t(o(T),{class:`bg-accent/80 hover:!bg-accent/100 mt-1`,onClick:E},{default:m(()=>[c(d(o(i)(`components.password.forgotPasswordReloadButton`)),1)]),_:1})])):S(``,!0)])],32)}}});export{We as default};