"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../_util/props-util/index.js"),u=e=>e!=null&&(Array.isArray(e)?f.filterEmpty(e).length:!0);function o(e){return u(e.prefix)||u(e.suffix)||u(e.allowClear)}function a(e){return u(e.addonBefore)||u(e.addonAfter)}function d(e){return typeof e>"u"||e===null?"":String(e)}function l(e,i,t,n){if(!t)return;const r=i;if(i.type==="click"){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0});const c=e.cloneNode(!0);r.target=c,r.currentTarget=c,c.value="",t(r);return}if(n!==void 0){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0}),r.target=e,r.currentTarget=e,e.value=n,t(r);return}t(r)}function s(e,i){if(!e)return;e.focus(i);const{cursor:t}=i||{};if(t){const n=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}exports.fixControlledValue=d;exports.hasAddon=a;exports.hasPrefixSuffix=o;exports.resolveOnChange=l;exports.triggerFocus=s;
