1import{_ as m,q as d,e as a,R as _,f as u,j as I,y as V,l as h,F as k,t as w,n as g,i as C,J as f,S as $,M as v,N as q,k as G}from"./entry.3e24fff4.js";import"./index.90e2068c.js";function H(e,n){const t=n.split(":")[0],r=n.split(":")[1]??null;switch(t){case"array":return Array.isArray(e);case"required":return!!e;case"email":const o=/^[\w.!?#$%&'=~|{}`+*^][\w\-.!?#$%&'=~|{}`+*^]*@((xn--)?[\w]+([-][\w]+)*\.)+[a-z]{2,}$/i,l=e&&!e.includes("@gnail")&&!e.includes("@gmai.");return e&&o.test(e)&&l;case"date":return new Date(e)!=="Invalid Date"&&!isNaN(new Date(e));case"string":return typeof e=="string";case"phone":return/^(84|19|0[2|3|5|7|8|9])\d{8}$/g.test(e);case"in":const c=r.split(",");return Array.isArray(e)?e.every(y=>c.includes(y.toString())):e&&c.includes(e.toString());case"integer":return!isNaN(e);case"min":return e.length>=parseInt(r);case"max":return e.length<=parseInt(r);default:return!0}}function K(e,n){let t={};for(const r of Object.entries(e))F(r[1],n[r[0]])||(t[r[0]]="");return t}function F(e,n){if(n===void 0)return!0;let t=!0;for(const r of n.split("|"))if(!H(e,r)){t=!1;break}return t}const Q={emits:["update:modelValue"],props:["modelValue","field"],methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{fieldAttrs(){return this.field.attrs||{}},fieldType(){return this.field.type||"text"},fieldReadonly(){return this.field.readonly||!1},fieldPlaceholder(){return this.field.placeholder||`Nháºp ${this.field.label.toLowerCase()}`}}},W=["id","name","type","value","readonly","placeholder"];function X(e,n,t,r,o,l){return d(),a("input",_({class:"input",id:t.field.name,name:t.field.name,onInput:n[0]||(n[0]=(...s)=>l.onInput&&l.onInput(...s)),type:l.fieldType,value:t.modelValue,autocomplete:"off",readonly:l.fieldReadonly,placeholder:l.fieldPlaceholder},l.fieldAttrs),null,16,W)}const p=m(Q,[["render",X]]),Y={},Z={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"16",fill:"none",class:"input-action default-state",viewBox:"0 0 24 16"},ee=u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 1.25C4.5 1.25 1.5 8 1.5 8s3 6.75 10.5 6.75S22.5 8 22.5 8s-3-6.75-10.5-6.75z"},null,-1),te=u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 11.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5z"},null,-1),le=[ee,te];function ne(e,n){return d(),a("svg",Z,le)}const S=m(Y,[["render",ne]]),de={},ie={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"20",fill:"none",class:"input-action action-state",viewBox:"0 0 24 20"},oe=u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 3.25C4.5 3.25 1.5 10 1.5 10s3 6.75 10.5 6.75S22.5 10 22.5 10s-3-6.75-10.5-6.75z"},null,-1),se=u("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 13.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5z"},null,-1),ae=u("path",{stroke:"currentColor",d:"M3.627 19.667l17-19"},null,-1),re=[oe,se,ae];function ue(e,n){return d(),a("svg",ie,re)}const B=m(de,[["render",ue]]),ce={props:["field","modelValue"],emits:["update:modelValue","update:togglePassword"],components:{JFieldText:p,JIconEyeOpen:S,JIconEyeClose:B},data(){return{type:"password"}}
1,computed:{fieldCustom(){return{...this.field,type:this.type}}},methods:{toggleValue(){this.type==="password"?this.type="text":this.type="password"}}};function fe(e,n,t,r,o,l){const s=p;return d(),a(k,null,[I(s,{field:l.fieldCustom,modelValue:t.modelValue,"onUpdate:modelValue":n[0]||(n[0]=i=>e.$emit("update:modelValue",i))},null,8,["field","modelValue"]),l.fieldCustom.toggleMask?(d(),a("div",{key:0,class:"fieldset-password-toggle-mask",onClick:n[1]||(n[1]=i=>l.toggleValue())},[V(e.$slots,"password-icon",{type:o.type})])):h("",!0)],64)}const J=m(ce,[["render",fe]]),me={},he={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"9",viewBox:"0 0 12 9",fill:"none"},_e=u("path",{d:"M10.6666 1.5L4.24992 7.91667L1.33325 5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),pe=[_e];function ye(e,n){return d(),a("svg",he,pe)}const U=m(me,[["render",ye]]),Ve={components:{JIconTickCheckbox:U},props:["field","modelValue","disabled"],emits:["update:modelValue"],computed:{fieldAttrs(){return this.field.attrs||{}},fieldId(){return"ID"+Math.random().toString(36).substr(2,9).toUpperCase()}},methods:{onInput(e){let n=e.target.value;(n.toString()==="false"||n.toString()==="true"||this.modelValue===void 0||this.modelValue===null)&&(n=e.target.checked),this.$emit("update:modelValue",n)}}},ke=["for"],we=["id","value","checked"],ge={class:"checkmark"},xe={key:2,class:"help"};function be(e,n,t,r,o,l){const s=U;return d(),a("div",{class:g(["checkbox",{"is-disabled":t.disabled}])},[u("label",{class:"label",for:l.fieldId},[u("input",_({type:"checkbox",class:"input",id:l.fieldId,value:t.modelValue,onInput:n[0]||(n[0]=(...i)=>l.onInput&&l.onInput(...i)),checked:t.modelValue},l.fieldAttrs),null,16,we),e.$slots.checkmark?V(e.$slots,"checkmark",{key:0,label:t.field.label}):(d(),a(k,{key:1},[u("div",ge,[I(s)]),u("span",null,w(t.field.label),1)],64)),t.field.help?(d(),a("p",xe,w(t.field.help),1)):h("",!0)],8,ke)],2)}const x=m(Ve,[["render",be]]),ve={emits:["update:modelValue"],props:["modelValue","field"],methods:{onInputFile(e){let n=e.target.files[0];if(!n)return;const t=n.name.split(".").pop(),r=["doc","docx","pdf"].includes(t);let o=0,l=n.size,s=new Array("Bytes","KB","MB","GB");for(;l>900;)l/=1024,o++;const i=Math.round(l*100)/100,c=i+" "+s[o],y=c.includes("Bytes")||c.includes("KB")||c.includes("MB")&&i<=5;if(!r||!y){alert(this.field.help);return}this.$emit("update:modelValue",n)}},computed:{fieldAttrs(){return this.field.attrs||{}},fieldPlaceholder(){return this.modelValue?this.modelValue.name||this.field.placeholder:this.field.placeholder}}},Ie={class:"cursor-pointer pointer-events-none"},Ce=["placeholder"],Fe=["id","name"];function Se(e,n,t,r,o,l){return d(),a(k,null,[u("div",Ie,[u("input",{class:"input",type:"text",autocomplete:"off",readonly:!0,placeholder:l.fieldPlaceholder},null,8,Ce)]),u("input",_({type:"file",onInput:n[0]||(n[0]=(...s)=>l.onInputFile&&l.onInputFile(...s)),class:"hidden",id:t.field.name,name:t.field.name},l.fieldAttrs),null,16,Fe)],64)}const E=m(ve,[["render",Se]]),Be={props:["field"],data(){return{items:{}}},computed:{labelBy(){return this.field.labelBy||"name"},keyBy(){return this.field.keyBy||"id"}},methods:{onChange(e,n){const t=n[this.keyBy];e?this.items[t]=n[this.keyBy]:delete this.items[t],this.$emit("update:modelValue",Object.keys(this.items))}}},Je={class:"multi-checkbox"};function Ue(e,n,t,r,o,l){const s=x;return d(),a("div",Je,[(d(!0),a(k,null,C(t.field.options,i=>(d(),f(s,{modelValue:i.active,"onUpdate:modelValue":[c=>i.active=c,c=>l.onChange(c,i)],field:{label:i[l.labelBy]}},null,8,["modelValue","onUpdate:modelValue","field"]))),256))])}const A=m(Be,[["render",Ue]]),Ee={emits:["update:modelValue"],props:["modelValue","field"],components:{JFieldText:p}};function Ae(e,n,t,r,o,l){const s=p;return d(),f(s,_({field:t.field,inputmode:"numeric",modelValue:t.modelValue,"onUpdate:modelValue":n[0]||(n[0]=i=>e.$emit("update:modelValue",i)),onkeypress:"return event.charCode >= 48 && event.charCode =< 57",onkeydown:"return event.keyCode !== 69 && event.keyCode !== 190"},{...e.$attrs}),null,16,["field","modelValue"])}const M=m(Ee,[["render",Ae]]),Me={emits:["update:modelValue"],props:["modelValue","field"],methods:{onInput(e){/^[0-9]+$/.test(e.target.value)||e.target.value===""?this.$emit("update:modelValue",e.target.value):e.target.value=this.modelValue}},computed:{fieldAttrs(){return this.field.attrs||{}},fieldReadonly(){return this.field.readonly||!1},fieldPlaceholder(){return this.field.placeholder||`Nháºp ${this.field.label.toLowerCase()}`}}},Te=["id","name","value","readonly","placeholder"];function Ne(e,n,t,r,o,l){return d(),a("input",_({type:"text",class:"input",inputmode:"numeric",id:t.field.name,name:t.field.name,onInput:n[0]||(n[0]=(...s)=>l.onInput&&l.onInput(...s)),value:t.modelValue,readonly:l.fieldReadonly,placeholder:l.fieldPlaceholder,autocomplete:"off"},l.fieldAttrs),null,16,Te)}const Pe=m(Me,[["render",Ne]]),Le={emits:["update:modelValue"],props:["modelValue","field"],computed:{keyBy(){return this.field.keyBy||"id"},labelBy(){return this.field.labelBy||"name"},selectedOption(){const e=this.field.options.find(n=>this.modelValue===n[this.keyBy]);return e?e[this.labelBy]:null},fieldPlaceholder(){return this.field.placeholder||`Chá»n ${this.field.label.toLowerCase()}`},fieldAttrs(){return this.field.attrs||{}}},directives:{"click-outside":{beforeMount:(e,n)=>{e.clickOutsideEvent=t=>
1{e==t.target||e.contains(t.target)||n.value()},document.addEventListener("click",e.clickOutsideEvent)},unmounted:e=>{document.removeEventListener("click",e.clickOutsideEvent)}}},data(){return{isShow:!1}},methods:{onToggle(){this.isShow=!this.isShow},onSelect(e){this.$emit("update:modelValue",e),this.isShow=!1},closeMenuDropdown(){this.isShow=!1}}},Oe=["name","value","placeholder"],je={class:"dropdown-content"},De={class:"dropdown-items"},ze=["onClick"];function Re(e,n,t,r,o,l){const s=$("click-outside");return v((d(),a("div",{class:g(["dropdown",o.isShow?"active":""])},[u("input",_({type:"text",class:"input",readonly:!0,name:t.field.name,onClick:n[0]||(n[0]=(...i)=>l.onToggle&&l.onToggle(...i)),value:l.selectedOption,placeholder:l.fieldPlaceholder},l.fieldAttrs),null,16,Oe),v(u("div",je,[u("ul",De,[(d(!0),a(k,null,C(t.field.options,i=>(d(),a("li",{class:g(["dropdown-item",{active:t.modelValue&&t.modelValue.toString()===i[l.keyBy].toString()}]),onClick:c=>l.onSelect(i[l.keyBy])},w(i[l.labelBy]),11,ze))),256))])],512),[[q,o.isShow&&t.field.options&&t.field.options.length>0]])],2)),[[s,l.closeMenuDropdown]])}const T=m(Le,[["render",Re]]),$e={emits:["update:modelValue"],props:["modelValue","field"],methods:{onInput(e){this.$emit("update:modelValue",e.target.value)}},computed:{fieldPlaceholder(){return this.field.placeholder||`Nháºp ${this.field.label.toLowerCase()}`},fieldReadonly(){return this.field.readonly||!1},fieldRows(){return this.field.rows||3},fieldAttrs(){return this.field.attrs||{}}}},qe=["rows","id","name","value","readonly","placeholder"];function Ge(e,n,t,r,o,l){return d(),a("textarea",_({class:"input",rows:l.fieldRows,id:t.field.name,name:t.field.name,value:t.modelValue,onInput:n[0]||(n[0]=(...s)=>l.onInput&&l.onInput(...s)),type:"textarea",autocomplete:"off",readonly:l.fieldReadonly,placeholder:l.fieldPlaceholder},l.fieldAttrs),null,16,qe)}const N=m($e,[["render",Ge]]);function He({value:e,rule:n}){return F(e,n)}function nt({form:e={},rules:n={}}={}){return K(e,n)}const Ke={components:{JFieldText:p,JFieldNumber:M,JFieldDropdown:T,JFieldTextarea:N,JFieldUploadFile:E,JFieldCheckbox:x,JFieldCheckboxMultiple:A,JFieldPassword:J},emits:["update:modelValue"],props:{modelValue:{type:[Object,String,Number]},field:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},errors:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},data(){return{isError:!1,isSuccess:!1}},computed:{fieldLabel(){var e;return this.field.label+`${(e=this.rules[this.field.name])!=null&&e.includes("required")?'<span class="required">*</span>':""}`},message(){return(Array.isArray(this.errors[this.field.name])?this.errors[this.field.name][0]:null)||this.field.error||`${this.field.label} không hợp lá»`}},watch:{modelValue(e){!e&&this.isSuccess&&(this.isSuccess=!1)},errors(e){this.isError=e.hasOwnProperty(this.field.name)}},methods:{onInput(e){this.$emit("update:modelValue",e);const n=He({value:e,rule:this.rules[this.field.name]||""});this.isError=!n,e&&n?this.isSuccess=!0:this.isSuccess=!1}}},Qe=["for"],We=["innerHTML"],Xe={key:0,class:"prefix"},Ye={key:10,class:"suffix"},Ze={key:11,class:"help"};function et(e,n,t,r,o,l){const s=p,i=S,c=B,y=J,P=x,L=E,O=A,j=M,D=Pe,z=T,R=N;return d(),a("fieldset",null,[u("label",{for:t.field.name},[t.field.label?(d(),a("span",{key:0,class:"label",innerHTML:l.fieldLabel},null,8,We)):h("",!0),u("div",{class:g(["field",{"is-disabled":!!t.disabled,"is-error":!!o.isError,"is-success":o.isSuccess,"has-prefix":!!e.$slots.prefix,"has-suffix":!!e.$slots.suffix}])},[e.$slots.prefix?(d(),a("div",Xe,[V(e.$slots,"prefix")])):h("",!0),!t.field.type||t.field.type==="text"||t.field.type==="email"?(d(),f(s,{key:1,field:t.field,modelValue:t.modelValue,"onUpdate:modelValue":l.onInput},null,8,["field","modelValue","onUpdate:modelValue"])):t.field.type==="password"?(d(),f(y,{key:2,field:t.field,modelValue:t.modelValue,"onUpdate:modelValue":l.onInput},{"password-icon":G(({type:b})=>[V(e.$slots,"password-icon",{type:b},()=>[b==="password"?(d(),f(i,{key:0})):(d(),f(c,{key:1}))])]),_:3},8,["field","modelValue","onUpdate:modelValue"])):t.field.type==="checkbox"?(d(),f(P,{key:3,modelValue:t.modelValue,field:t.field,"onUpdate:modelValue":l.onInput},null,8,["modelValue","field","onUpdate:modelValue"])):t.field.type==="upload_file"?(d(),f(L,{key:4,modelValue:t.modelValue,field:t.field,"onUpdate:modelValue":l.onInput},null,8,["modelValue","field","onUpdate:modelValue"])):t.field.type==="checkbox_multiple"?(
1d(),f(O,{key:5,modelValue:t.modelValue,field:t.field,"onUpdate:modelValue":l.onInput},null,8,["modelValue","field","onUpdate:modelValue"])):t.field.type==="number"?(d(),f(j,{key:6,modelValue:t.modelValue,field:t.field,"onUpdate:modelValue":l.onInput},null,8,["modelValue","field","onUpdate:modelValue"])):t.field.type==="phone"?(d(),f(D,{key:7,modelValue:t.modelValue,field:t.field,"onUpdate:modelValue":l.onInput},null,8,["modelValue","field","onUpdate:modelValue"])):t.field.type==="dropdown"?(d(),f(z,{key:8,field:t.field,modelValue:t.modelValue,"onUpdate:modelValue":l.onInput},null,8,["field","modelValue","onUpdate:modelValue"])):t.field.type==="textarea"?(d(),f(R,{key:9,field:t.field,modelValue:t.modelValue,"onUpdate:modelValue":l.onInput},null,8,["field","modelValue","onUpdate:modelValue"])):h("",!0),e.$slots.suffix?(d(),a("div",Ye,[V(e.$slots,"suffix")])):h("",!0),t.field.help||o.isError?(d(),a("small",Ze,w(o.isError?l.message:t.field.help),1)):h("",!0)],2)],8,Qe)])}const dt=m(Ke,[["render",et]]),it=""+globalThis.__publicAssetsURL("images/contact/success.png");export{dt as _,it as a,nt as u};
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.