1import{defineComponent as R,useModel as F,toRef as $,ref as k,computed as g,watch as c,onMounted as D,onActivated as E,openBlock as V,createBlock as N,unref as f,createSlots as A,withCtx as r,createVNode as W,createElementVNode as x,normalizeClass as z,renderSlot as B,mergeModels as p}from"vue";import{u as G}from"./component3-composition-Cx3jgoEb.js";import{B as Z,a as j}from"./control-DnbWcEGV.js";import{ar as q,O as M,aP as H,Z as J}from"./logger-B4OCWT-4.js";const K=["id","data-testid","placeholder","type","inputmode","autocomplete","disabled"],L=R({__name:"mask-input",props:p({disabled:{type:Boolean},testId:{},status:{},label:{},clearable:{type:Boolean},hint:{},errorMessage:{},withDivider:{type:Boolean},autocomplete:{default:"off"},type:{default:"text"},inputmode:{},placeholder:{},alignCenter:{type:Boolean},autofocus:{type:Boolean},isPatternPlaceholder:{type:Boolean},maskOptions:{},maskModel:{type:Boolean},showStatusWhenFocused:{type:Boolean}},{modelValue:{default:""},modelModifiers:{}}),emits:p(["focus","blur"],["update:modelValue"]),setup(e,{expose:S,emit:w}){const i=e,v=w,s=F(e,"modelValue"),h=$(()=>i.maskOptions),{el:t,masked:n,unmasked:b}=G(h),l=k(!1),P=g(()=>!!n.value),m=g(()=>i.maskModel?n.value:b.value),o=k(0),y=()=>{t.value?.focus()};S({focus:y,select:()=>{t.value?.select()},isFocused:l,blur:()=>{t.value?.blur()},setSelectionRange:(a,u)=>{t.value?.setSelectionRange(a,u)},cursorPosition:o});const C=()=>{n.value=""},I=()=>{l.value=!0,v("focus")},O=()=>{l.value=!1,v("blur")};c(m,()=>{o.value=t.value?.selectionStart||0,s.value=m.value}),c(s,()=>{s.value!==m.value&&(i.maskModel?n.value=s.value:b.value=s.value)},{immediate:!0}),c(h,()=>{t.value&&t.value.setSelectionRange(o.value,o.value)}),c(l,()=>{t.value&&l.value&&t.value.setSelectionRange(o.value,o.value)});for(const a of[D,E])a(()=>{const u=q();i.autofocus&&u!==M.IOS&&u!==M.ANDROID&&!H()&&y()});return(a,u)=>(V(),N(f(Z),{"test-id":e.testId,disabled:e.disabled,status:e.status,"show-status-when-focused":e.showStatusWhenFocused,hint:e.hint,"error-message":e.errorMessage,label:e.label,filled:P.value,clearable:e.clearable,"with-divider":e.withDivider,focused:l.value,onClear:C},A({default:r(({id:d})=>[W(f(j),{"pattern-placeholder":e.isPatternPlaceholder?e.placeholder:void 0,value:f(n),"has-label":!!e.label,"align-center":e.alignCenter},{default:r(()=>[x("input",{id:d,ref_key:"el",ref:t,class:z(a.$style.input),"data-testid":e.testId,placeholder:e.isPatternPlaceholder?void 0:e.placeholder,type:e.type,inputmode:e.inputmode,autocomplete:e.autocomplete,disabled:e.disabled,onFocus:I,onBlur:O},null,42,K)]),_:2},1032,["pattern-placeholder","value","has-label","align-center"])]),_:2},[a.$slots.iconStart?{name:"iconStart",fn:r(({iconSize:d})=>[B(a.$slots,"iconStart",{iconSize:d})]),key:"0"}:void 0,a.$slots.iconEnd?{name:"iconEnd",fn:r(({iconSize:d})=>[B(a.$slots,"iconEnd",{iconSize:d})]),key:"1"}:void 0]),1032,["test-id","disabled","status","show-status-when-focused","hint","error-message","label","filled","clearable","with-divider","focused"]))}}),Q="mask-input_input-GDetI",T={input:Q},U={$style:T},oe=J(L,[["__cssModules",U]]);export{oe as M}; 2(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".mask-input_input-GDetI[autocomplete=off]::-webkit-contacts-auto-fill-button{visibility:hidden;width:0;height:0;display:none}[dir=rtl] .mask-input_input-GDetI{text-align:right}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
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.