import{d as S,e as L,o as h,f as x,g as le,j as N,k as ta,t as E,l as D,n as Q,m as $,p as ue,q as Ft,s as I,u as We,w as Je,v as Ie,x as ye,F as re,y as aa}from"./vue.esm-bundler-16b759a1.js";const Rt={account:`
			<circle cx="12" cy="7" r="4" />
			<path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
		`,doc:`
			<path d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"/>
		`,vk:`
			<path d="M21.579 6.855c.14-.465 0-.806-.662-.806h-2.193c-.558 0-.813.295-.953.619 0 0-1.115 2.719-2.695 4.482-.51.513-.743.675-1.021.675-.139 0-.341-.162-.341-.627V6.855c0-.558-.161-.806-.626-.806H9.642c-.348 0-.558.258-.558.504 0 .528.79.65.871 2.138v3.228c0 .707-.127.836-.407.836-.743 0-2.551-2.729-3.624-5.853-.209-.607-.42-.852-.98-.852H2.752c-.627 0-.752.295-.752.619 0 .582.743 3.462 3.461 7.271 1.812 2.601 4.363 4.011 6.687 4.011 1.393 0 1.565-.313 1.565-.853v-1.966c0-.626.133-.752.574-.752.324 0 .882.164 2.183 1.417 1.486 1.486 1.732 2.153 2.567 2.153h2.192c.626 0 .939-.313.759-.931-.197-.615-.907-1.51-1.849-2.569-.512-.604-1.277-1.254-1.51-1.579-.325-.419-.231-.604 0-.976.001.001 2.672-3.761 2.95-5.04z"/>
		`,youtube:`
			<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z" />
			<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02" />
		`,video:`
			<polygon points="23 7 16 12 23 17 23 7" />
			<rect x="1" y="5" width="15" height="14" rx="2" ry="2" />
		`,yandex:`
			<path d="m10 24v-7.786l-5.2-13.964h2.616l3.834 10.767 4.41-13.018h2.405l-5.658 16.303v7.697z"/>
		`,menu:`
			<path stroke="none" d="M0 0h24v24H0z"/>
			<line x1="4" y1="6" x2="20" y2="6" />
			<line x1="4" y1="12" x2="20" y2="12" />
			<line x1="4" y1="18" x2="20" y2="18" />
		`,close:`
			<line x1="18" y1="6" x2="6" y2="18" />
			<line x1="6" y1="6" x2="18" y2="18" />
		`,"arrow-down":`
			<path stroke="none" d="M0 0h24v24H0z"/>
			<polyline points="6 9 12 15 18 9" />
		`,car:`
			<path stroke="none" d="M0 0h24v24H0z"/>
			<circle cx="7" cy="17" r="2" />
			<circle cx="17" cy="17" r="2" />
			<path d="M5 17h-2v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0h-6m-6 -6h15m-6 0v-5" />
		`,review:`
			<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
		`,phone:`
			<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" />
		`,circle:`
			<circle cx="12" cy="12" r="10"></circle>
		`,dzen:`
			<path d="M 11.659994,0.01953125 C 5.2952996,0.20519926 0.20563242,5.2947457 0.01953125,11.659552 4.8820049,11.598767 7.6163326,11.265345 9.4411321,9.4406121 11.265931,7.6159232 11.59921,4.8819566 11.659994,0.01953125 Z m 0.719931,0 c 0.06078,4.86242535 0.393207,7.59634815 2.218006,9.42108085 1.824686,1.8245759 4.559692,2.1581249 9.4216,2.2189399 C 23.83343,5.2948697 18.744448,0.20538037 12.379925,0.01953125 Z M 0.01953125,12.37951 C 0.20581298,18.744149 5.2954188,23.833867 11.659994,24.019531 11.59921,19.156885 11.265931,16.422327 9.4411321,14.597594 7.6163326,12.772905 4.8820049,12.440295 0.01953125,12.37951 Z m 23.99999975,0 c -4.861908,0.06081 -7.596914,0.393508 -9.4216,2.218084 -1.8248,1.824733 -2.157222,4.559291 -2.218006,9.421937 6.364403,-0.185846 11.453324,-5.275505 11.639606,-11.640021 z" />
		`,instagram:`
			<path d="m 18.374816,4.4184098 c -0.80327,0 -1.405723,0.6025075 -1.405723,1.4058562 0,0.8033487 0.602453,1.4058562 1.405723,1.4058562 0.803271,0 1.405724,-0.6025075 1.405724,-1.4058562 0,-0.8033487 -0.602453,-1.4058562 -1.405724,-1.4058562 z" />
			<path d="m 12.049062,6.2259403 c -3.3134909,0 -5.9241249,2.7112998 -5.9241249,5.9246867 0,3.213387 2.7110426,5.924686 5.9241249,5.924686 3.213082,0 5.924119,-2.711299 5.924119,-5.924686 0,-3.2133869 -2.610629,-5.9246867 -5.924119,-5.9246867 z m 0,9.7405887 c -2.1085854,0 -3.815535,-1.707118 -3.815535,-3.815902 0,-2.108784 1.7069496,-3.8159024 3.815535,-3.8159024 2.108585,0 3.815534,1.7071184 3.815534,3.8159024 0,2.108784 -1.706949,3.815902 -3.815534,3.815902 z" />
			<path d="M 16.868685,0 H 7.3298474 C 3.2130851,0 0,3.2133868 0,7.2301222 V 16.769878 C 0,20.786613 3.2130851,24 7.2294388,24 h 9.5388362 c 4.016353,0 7.229434,-3.213387 7.229434,-7.230122 V 7.2301222 C 24.098119,3.2133868 20.885037,0 16.868685,0 Z m 4.92003,16.87029 c 0,2.7113 -2.208993,5.020926 -5.02044,5.020926 H 7.2294388 c -2.711045,0 -5.0204482,-2.209205 -5.0204482,-5.020926 V 7.3305428 c 0,-2.7112998 2.2089985,-5.0209173 5.0204482,-5.0209173 h 9.5388362 c 2.711038,0 5.02044,2.2092048 5.02044,5.0209173 z" />
		`,moon:`
			<path d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
		`,sun:`
		<circle cx="12" cy="12" r="5" />
		<line x1="12" y1="1" x2="12" y2="3" />
		<line x1="12" y1="21" x2="12" y2="23" />
		<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
		<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
		<line x1="1" y1="12" x2="3" y2="12" />
		<line x1="21" y1="12" x2="23" y2="12" />
		<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
		<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
	`,edit:`
  	<path d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/>
	`,visibility:`
		<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
		<circle cx="12" cy="12" r="3" />
	`,visibility_off:`
  	<path d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21" />
	`},na={class:"ui-icon"},sa=["fill","innerHTML"],ee=S({__name:"Icon",props:{name:{},fill:{type:Boolean}},setup(a){const e=a,t=L(()=>Rt[e.name]);return(n,s)=>(h(),x("span",na,[(h(),x("svg",{viewBox:"0 0 24 24",fill:n.fill?"currentColor":"none",stroke:"currentColor","stroke-width":"1.2",innerHTML:t.value},null,8,sa))]))}});ee.__docgenInfo={exportName:"default",displayName:"Icon",description:"",tags:{},props:[{name:"name",required:!0,type:{name:"TUiIcon"}},{name:"fill",required:!1,type:{name:"boolean"}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Icon.vue"]};const ra={key:0,class:"ui-alert-close"},ia={key:1,class:"ui-alert-content"},Bt=S({__name:"Alert",props:{color:{},value:{},close:{type:Boolean}},emits:["close"],setup(a,{emit:e}){const t=a;return(n,s)=>(h(),x("div",{class:Q(["ui-alert",t.color])},[t.close?(h(),x("div",ra,[le(ee,{name:"close",onClick:s[0]||(s[0]=r=>e("close"))})])):N("",!0),t.value||n.$slots.default?(h(),x("div",ia,[ta(E(t.value)+" ",1),n.$slots.default?D(n.$slots,"default",{key:0}):N("",!0)])):N("",!0)],2))}});Bt.__docgenInfo={exportName:"default",displayName:"Alert",description:"",tags:{},props:[{name:"color",required:!1,type:{name:"TColor"}},{name:"value",required:!1,type:{name:"string"}},{name:"close",required:!1,type:{name:"boolean"}}],events:[{name:"close"}],slots:[{name:"default"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Alert.vue"]};const oa={key:1,class:"label"},ie=S({__name:"Btn",props:{label:{},type:{},color:{},icon:{},to:{},disabled:{type:Boolean}},emits:["click"],setup(a,{emit:e}){const t=a,n=r=>e("click",r),s=L(()=>{let r={"ui-btn":!0,"ui-btn-icon":t.icon};return t.color&&(r[t.color]=!0),r});return(r,i)=>(h(),$(Ft(t.to?"router-link":"button"),{to:t.to,type:t.type,class:Q(s.value),disabled:t.disabled,onClick:n},{default:ue(()=>[t.icon?(h(),$(ee,{key:0,name:t.icon},null,8,["name"])):N("",!0),t.label?(h(),x("div",oa,E(t.label),1)):N("",!0),r.$slots.default?D(r.$slots,"default",{key:2}):N("",!0)]),_:3},8,["to","type","class","disabled"]))}});ie.__docgenInfo={exportName:"default",displayName:"Btn",description:"",tags:{},props:[{name:"label",required:!1,type:{name:"string"}},{name:"type",required:!1,type:{name:"TUiBtnType"}},{name:"color",required:!1,type:{name:"TColor"}},{name:"icon",required:!1,type:{name:"TIcon"}},{name:"to",required:!1,type:{name:"string"}},{name:"disabled",required:!1,type:{name:"boolean"}}],events:[{name:"click",type:{names:["PointerEvent"]}}],slots:[{name:"default"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Btn.vue"]};const la={class:"ui-card"},da={key:0,class:"ui-card-head"},ca={class:"ui-card-title"},ua={key:1,class:"ui-card-body"},pa={key:2,class:"ui-card-actions"},ma=S({__name:"Card",props:{title:{}},setup(a){const e=a;return(t,n)=>(h(),x("div",la,[e.title?(h(),x("div",da,[I("h3",ca,E(e.title),1)])):N("",!0),t.$slots.default?(h(),x("div",ua,[D(t.$slots,"default")])):N("",!0),t.$slots.actions?(h(),x("div",pa,[D(t.$slots,"actions")])):N("",!0)]))}});ma.__docgenInfo={exportName:"default",displayName:"Card",description:"",tags:{},props:[{name:"title",required:!1,type:{name:"string"}}],slots:[{name:"default"},{name:"actions"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Card.vue"]};const ha=["open"],fa={class:"ui-dialog-window"},ya={key:0,class:"ui-dialog-window-header"},_a={key:1,class:"ui-dialog-window-content"},va=S({__name:"Dialog",props:{title:{},open:{type:Boolean},close:{type:Boolean}},emits:["update:open"],setup(a,{emit:e}){const t=a,n=We(t.open),s=()=>{n.value=!1,e("update:open",!1)},r=i=>{i.target instanceof Element&&i.target.classList.contains("ui-dialog")&&s()};return Je(()=>t.open,i=>n.value=i),(i,o)=>(h(),x("dialog",{class:"ui-dialog",open:n.value,onClick:r},[I("div",fa,[t.title?(h(),x("div",ya,[I("h4",null,E(i.title),1),le(ee,{name:"close",onClick:s,class:"ui-icon-close"})])):N("",!0),i.$slots.default?(h(),x("div",_a,[D(i.$slots,"default")])):N("",!0)])],8,ha))}});va.__docgenInfo={exportName:"default",displayName:"Dialog",description:"",tags:{},props:[{name:"title",required:!1,type:{name:"string"}},{name:"open",required:!1,type:{name:"boolean"}},{name:"close",required:!1,type:{name:"boolean"}}],events:[{name:"update:open",type:{names:["boolean"]}}],slots:[{name:"default"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Dialog.vue"]};const ga=S({__name:"IconVisibility",props:{modelValue:{type:Boolean},color:{type:Boolean},cursor:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:e}){const t=a;return(n,s)=>t.modelValue?(h(),$(ee,{key:0,name:"visibility",class:Q({"text-success":t.color,"cursor-pointer":t.cursor}),onClick:s[0]||(s[0]=r=>e("update:modelValue",!1))},null,8,["class"])):(h(),$(ee,{key:1,name:"visibility_off",class:Q({"cursor-pointer":t.cursor}),onClick:s[1]||(s[1]=r=>e("update:modelValue",!0))},null,8,["class"]))}});ga.__docgenInfo={exportName:"default",displayName:"IconVisibility",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"boolean"}},{name:"color",required:!1,type:{name:"boolean"}},{name:"cursor",required:!1,type:{name:"boolean"}}],events:[{name:"update:modelValue",type:{names:["boolean"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/IconVisibility.vue"]};const ba={class:"ui-toggle-theme"},xa=S({__name:"ToggleTheme",props:{modelValue:{}},emits:["update:modelValue"],setup(a,{emit:e}){const t=a,n=({})=>e("update:modelValue",t.modelValue==="dark"?"light":"dark");return(s,r)=>(h(),x("div",ba,[le(ee,{title:"Переключить тему",name:t.modelValue==="dark"?"moon":"sun",onClick:n},null,8,["name"])]))}});xa.__docgenInfo={exportName:"default",displayName:"ToggleTheme",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"TUiThemeName"}}],events:[{name:"update:modelValue",type:{names:["TUiThemeName"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/ToggleTheme.vue"]};const ka={class:"ui-field-wrap"},wa={key:0,class:"label"},Ta={class:"input"},Na={key:0,class:"description"},Za={key:1,class:"message"},pe=S({__name:"FieldWrapper",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{}},setup(a){const e=a;return(t,n)=>(h(),x("div",{class:Q({"ui-field":!0,error:e.error,disabled:e.disabled,readonly:e.readonly})},[I("div",ka,[e.label?(h(),x("div",wa,E(e.label),1)):N("",!0),I("div",Ta,[D(t.$slots,"default")])]),e.description?(h(),x("div",Na,E(e.description),1)):N("",!0),e.error?(h(),x("div",Za,E(e.error),1)):N("",!0)],2))}});pe.__docgenInfo={exportName:"default",displayName:"FieldWrapper",description:"",tags:{},props:[{name:"label",required:!1,type:{name:"string"}},{name:"error",required:!1,type:{name:"string"}},{name:"disabled",required:!1,type:{name:"boolean"}},{name:"readonly",required:!1,type:{name:"boolean"}},{name:"description",required:!1,type:{name:"string"}}],slots:[{name:"default"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldWrapper.vue"]};const Sa=["type","value","placeholder","disabled","readonly"],me=S({__name:"FieldInput",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=s=>{if(e("input",s),e("update:error"),s.target instanceof HTMLInputElement){const{value:r}=s.target;switch(t.type){case"number":e("update:model-value",Number(r));break;default:e("update:model-value",String(r))}}else e("update:model-value",void 0)};return(s,r)=>(h(),$(pe,{label:t.label,error:t.error,disabled:t.disabled,readonly:t.readonly,description:t.description},{default:ue(()=>[I("input",{type:t.type,value:t.modelValue,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,onInput:n},null,40,Sa)]),_:1},8,["label","error","disabled","readonly","description"]))}});me.__docgenInfo={exportName:"default",displayName:"FieldInput",description:"",tags:{},events:[{name:"input",type:{names:["Event"]}},{name:"update:model-value",type:{names:["union"],elements:[{name:"string"},{name:"number"},{name:"Date"}]}},{name:"update:error",type:{names:["string"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldInput.vue"]};const $a=S({__name:"FieldText",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},setup(a){const e=a;return(t,n)=>(h(),$(me,Ie({...e,...t.$attrs},{type:"text"}),null,16))}});$a.__docgenInfo={exportName:"default",displayName:"FieldText",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldText.vue"]};const Ca=S({__name:"FieldNumber",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},setup(a){const e=a;return(t,n)=>(h(),$(me,Ie({...e,...t.$attrs},{type:"number"}),null,16))}});Ca.__docgenInfo={exportName:"default",displayName:"FieldNumber",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldNumber.vue"]};const Ia=S({__name:"FieldPassword",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},setup(a){const e=a;return(t,n)=>(h(),$(me,Ie({...e,...t.$attrs},{type:"password"}),null,16))}});Ia.__docgenInfo={exportName:"default",displayName:"FieldPassword",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldPassword.vue"]};var Va=Object.defineProperty,ja=(a,e,t)=>e in a?Va(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,j=(a,e,t)=>(ja(a,typeof e!="symbol"?e+"":e,t),t),Lt=(a,e,t)=>{if(!e.has(a))throw TypeError("Cannot "+t)},$t=(a,e,t)=>(Lt(a,e,"read from private field"),t?t.call(a):e.get(a)),Oa=(a,e,t)=>{if(e.has(a))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(a):e.set(a,t)},Pa=(a,e,t,n)=>(Lt(a,e,"write to private field"),n?n.call(a,t):e.set(a,t),t),_e=(a=>(a.man="man",a.woman="woman",a))(_e||{});const He=/^[А-яЁё]+$/,Aa=/^[9]\d{9}$/,Ea=/[\'\"\+\(\)]/g,Ma=/^[a-f\d]{24}$/i,et=a=>{if(a&&(typeof a=="number"&&(a=a.toString()),typeof a=="string"))try{return a=a.replace(/\D/g,"").replace(/^[78]/,"").substring(0,10),Number(a)||void 0}catch{}},Fa=a=>{if(!a)return!1;const e=a.toString();return!(e.length!==10||e.match(Aa)===null)},Ra=(a,e="+7 ")=>{var t;let n=e;const s=(t=et(a))==null?void 0:t.toString().substring(0,10);if(s)for(let r=0;r<s.length;r++){switch(r){case 0:n+="(";break;case 3:n+=") ";break;case 6:n+="-";break;case 8:n+="-";break}n+=s[r]}return n},Ba=a=>{try{if(a){const e=new Date(a),t=e.toLocaleDateString("ru-RU",{day:"2-digit"}),n=e.toLocaleDateString("ru-RU",{month:"2-digit"});return`${e.toLocaleDateString("ru-RU",{year:"numeric"})}-${n}-${t}`}}catch{}return""};class he{constructor(e,t){j(this,"key"),j(this,"type"),j(this,"label"),j(this,"component"),j(this,"hidden"),j(this,"description"),j(this,"readonly"),j(this,"multiple"),j(this,"disabled"),j(this,"cssClass");var n,s,r,i,o,d,l,m,k,B,tt,at,nt,st,rt,it,ot,lt,dt,ct,ut,pt,mt,ht,ft,yt,_t,vt,gt,bt,xt,kt,wt,Tt,Nt,Zt,St;let P={};try{t.description?P=JSON.parse(t.description):P=JSON.parse(((r=(s=(n=t==null?void 0:t._def)==null?void 0:n.innerType)==null?void 0:s._def)==null?void 0:r.description)||"{}")}catch{P={label:t.description||"Unknown"}}switch(this.key=P.key||e.key||"unknown",this.label=P.label||e.label||"Label",this.type=P.type||e.type,!this.type&&t&&((B=(k=(m=(l=(d=(o=(i=t==null?void 0:t._def)==null?void 0:i.innerType)==null?void 0:o._def)==null?void 0:d.innerType)==null?void 0:l._def)==null?void 0:m.schema)==null?void 0:k._def)!=null&&B.typeName&&(this.type=(ot=(it=(rt=(st=(nt=(at=(tt=t==null?void 0:t._def)==null?void 0:tt.innerType)==null?void 0:at._def)==null?void 0:nt.innerType)==null?void 0:st._def)==null?void 0:rt.schema)==null?void 0:it._def)==null?void 0:ot.typeName),(pt=(ut=(ct=(dt=(lt=t._def)==null?void 0:lt.innerType)==null?void 0:dt._def)==null?void 0:ct.innerType)==null?void 0:ut._def)!=null&&pt.typeName&&(this.type=(ft=(ht=(mt=t==null?void 0:t._def)==null?void 0:mt.innerType)==null?void 0:ht._def)==null?void 0:ft.innerType._def.typeName),(gt=(vt=(_t=(yt=t._def.innerType)==null?void 0:yt._def)==null?void 0:_t.schema)==null?void 0:vt._def)!=null&&gt.typeName&&(this.type=(wt=(kt=(xt=(bt=t._def.innerType)==null?void 0:bt._def)==null?void 0:xt.schema)==null?void 0:kt._def)==null?void 0:wt.typeName),(Nt=(Tt=t._def.innerType)==null?void 0:Tt._def)!=null&&Nt.typeName&&(this.type=t._def.innerType._def.typeName),(St=(Zt=t._def.schema)==null?void 0:Zt._def)!=null&&St.typeName&&(this.type=t._def.schema._def.typeName),this.type||(this.type=t._def.typeName)),this.type){case"ZodString":this.type="string";break;case"ZodNumber":this.type="number";break;case"ZodBoolean":this.type="boolean";break;case"ZodArray":this.type="array";break;case"ZodDate":this.type="date";break}if(this.component=P.component||e.component,!this.component)switch(this.type){case"string":this.component="ui-field-text";break;case"number":this.component="ui-field-number";break;case"boolean":this.component="ui-field-checkbox";break;case"date":this.component="ui-field-date";break;default:this.component="ui-field"}this.hidden=P.hidden||e.hidden,this.description=P.description||e.description,this.readonly=P.readonly||e.readonly,this.multiple=P.multiple||e.multiple,this.disabled=P.disabled||e.disabled,this.cssClass=P.cssClass||e.cssClass}static toString(e,t){let n="";try{if(t){const s=JSON.parse(t);e=Object.assign(s,e)}n=JSON.stringify(e)}catch{}return n}}var w;(function(a){a.assertEqual=s=>s;function e(s){}a.assertIs=e;function t(s){throw new Error}a.assertNever=t,a.arrayToEnum=s=>{const r={};for(const i of s)r[i]=i;return r},a.getValidEnumValues=s=>{const r=a.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of r)i[o]=s[o];return a.objectValues(i)},a.objectValues=s=>a.objectKeys(s).map(function(r){return s[r]}),a.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const r=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&r.push(i);return r},a.find=(s,r)=>{for(const i of s)if(r(i))return i},a.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,r=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(r)}a.joinValues=n,a.jsonStringifyReplacer=(s,r)=>typeof r=="bigint"?r.toString():r})(w||(w={}));var Ge;(function(a){a.mergeShapes=(e,t)=>({...e,...t})})(Ge||(Ge={}));const u=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),K=a=>{switch(typeof a){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(a)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(a)?u.array:a===null?u.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?u.promise:typeof Map<"u"&&a instanceof Map?u.map:typeof Set<"u"&&a instanceof Set?u.set:typeof Date<"u"&&a instanceof Date?u.date:u.object;default:return u.unknown}},c=w.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),La=a=>JSON.stringify(a,null,2).replace(/"([^"]+)":/g,"$1:");class M extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(r){return r.message},n={_errors:[]},s=r=>{for(const i of r.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let o=n,d=0;for(;d<i.path.length;){const l=i.path[d];d===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],d++}}};return s(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}M.create=a=>new M(a);const ve=(a,e)=>{let t;switch(a.code){case c.invalid_type:a.received===u.undefined?t="Required":t=`Expected ${a.expected}, received ${a.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(a.expected,w.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${w.joinValues(a.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${w.joinValues(a.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${w.joinValues(a.options)}, received '${a.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof a.validation=="object"?"includes"in a.validation?(t=`Invalid input: must include "${a.validation.includes}"`,typeof a.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${a.validation.position}`)):"startsWith"in a.validation?t=`Invalid input: must start with "${a.validation.startsWith}"`:"endsWith"in a.validation?t=`Invalid input: must end with "${a.validation.endsWith}"`:w.assertNever(a.validation):a.validation!=="regex"?t=`Invalid ${a.validation}`:t="Invalid";break;case c.too_small:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at least":"more than"} ${a.minimum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at least":"over"} ${a.minimum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(a.minimum))}`:t="Invalid input";break;case c.too_big:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at most":"less than"} ${a.maximum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at most":"under"} ${a.maximum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="bigint"?t=`BigInt must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly":a.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(a.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${a.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,w.assertNever(a)}return{message:t}};let Dt=ve;function Da(a){Dt=a}function Ee(){return Dt}const Me=a=>{const{data:e,path:t,errorMaps:n,issueData:s}=a,r=[...t,...s.path||[]],i={...s,path:r};let o="";const d=n.filter(l=>!!l).slice().reverse();for(const l of d)o=l(i,{data:e,defaultError:o}).message;return{...s,path:r,message:s.message||o}},qa=[];function p(a,e){const t=Me({issueData:e,data:a.data,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Ee(),ve].filter(n=>!!n)});a.common.issues.push(t)}class V{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return _;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t)n.push({key:await s.key,value:await s.value});return V.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:r,value:i}=s;if(r.status==="aborted"||i.status==="aborted")return _;r.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[r.value]=i.value)}return{status:e.value,value:n}}}const _=Object.freeze({status:"aborted"}),qt=a=>({status:"dirty",value:a}),O=a=>({status:"valid",value:a}),Ye=a=>a.status==="aborted",Xe=a=>a.status==="dirty",ge=a=>a.status==="valid",Fe=a=>typeof Promise<"u"&&a instanceof Promise;var f;(function(a){a.errToObj=e=>typeof e=="string"?{message:e}:e||{},a.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));class q{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ct=(a,e)=>{if(ge(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new M(a.common.issues);return this._error=t,this._error}}};function v(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=a;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(r,i)=>r.code!=="invalid_type"?{message:i.defaultError}:typeof i.data>"u"?{message:n??i.defaultError}:{message:t??i.defaultError},description:s}}class g{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return K(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:K(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new V,ctx:{common:e.parent.common,data:e.data,parsedType:K(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Fe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:K(e)},r=this._parseSync({data:e,path:s.path,parent:s});return Ct(s,r)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:K(e)},s=this._parse({data:e,path:n.path,parent:n}),r=await(Fe(s)?s:Promise.resolve(s));return Ct(n,r)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,r)=>{const i=e(s),o=()=>r.addIssue({code:c.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(d=>d?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new R({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return U.create(this,this._def)}nullable(){return ne.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F.create(this,this._def)}promise(){return ce.create(this,this._def)}or(e){return we.create([this,e],this._def)}and(e){return Te.create(this,e,this._def)}transform(e){return new R({...v(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Ce({...v(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new Ut({typeName:y.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new De({...v(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ve.create(this,e)}readonly(){return ze.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const za=/^c[^\s-]{8,}$/i,Ua=/^[a-z][a-z0-9]*$/,Ha=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ka=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wa=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ja="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ke;const Ga=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Ya=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Xa=a=>a.precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):a.precision===0?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Qa(a,e){return!!((e==="v4"||!e)&&Ga.test(a)||(e==="v6"||!e)&&Ya.test(a))}class A extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:u.string,received:s.parsedType}),_}const t=new V;let n;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if(s.kind==="length"){const r=e.data.length>s.value,i=e.data.length<s.value;(r||i)&&(n=this._getOrReturnCtx(e,n),r?p(n,{code:c.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&p(n,{code:c.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if(s.kind==="email")Wa.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"email",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="emoji")Ke||(Ke=new RegExp(Ja,"u")),Ke.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"emoji",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="uuid")Ka.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"uuid",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="cuid")za.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="cuid2")Ua.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"cuid2",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="ulid")Ha.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"ulid",code:c.invalid_string,message:s.message}),t.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:"url",code:c.invalid_string,message:s.message}),t.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"regex",code:c.invalid_string,message:s.message}),t.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):s.kind==="datetime"?Xa(s).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:"datetime",message:s.message}),t.dirty()):s.kind==="ip"?Qa(e.data,s.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:"ip",code:c.invalid_string,message:s.message}),t.dirty()):w.assertNever(s);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:c.invalid_string,...f.errToObj(n)})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...f.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...f.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...f.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...f.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...f.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...f.errToObj(t)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new A({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}A.create=a=>{var e;return new A({checks:[],typeName:y.ZodString,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...v(a)})};function en(a,e){const t=(a.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,r=parseInt(a.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return r%i/Math.pow(10,s)}class W extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:u.number,received:s.parsedType}),_}let t;const n=new V;for(const s of this._def.checks)s.kind==="int"?w.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?en(e.data,s.value)!==0&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_finite,message:s.message}),n.dirty()):w.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,n,s){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:f.toString(s)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&w.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}W.create=a=>new W({checks:[],typeName:y.ZodNumber,coerce:(a==null?void 0:a.coerce)||!1,...v(a)});class J extends g{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.bigint){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:u.bigint,received:s.parsedType}),_}let t;const n=new V;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):w.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,n,s){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:f.toString(s)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}J.create=a=>{var e;return new J({checks:[],typeName:y.ZodBigInt,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...v(a)})};class be extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.boolean,received:t.parsedType}),_}return O(e.data)}}be.create=a=>new be({typeName:y.ZodBoolean,coerce:(a==null?void 0:a.coerce)||!1,...v(a)});class te extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:u.date,received:s.parsedType}),_}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_date}),_}const t=new V;let n;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),t.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),t.dirty()):w.assertNever(s);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}te.create=a=>new te({checks:[],coerce:(a==null?void 0:a.coerce)||!1,typeName:y.ZodDate,...v(a)});class Re extends g{_parse(e){if(this._getType(e)!==u.symbol){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.symbol,received:t.parsedType}),_}return O(e.data)}}Re.create=a=>new Re({typeName:y.ZodSymbol,...v(a)});class xe extends g{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.undefined,received:t.parsedType}),_}return O(e.data)}}xe.create=a=>new xe({typeName:y.ZodUndefined,...v(a)});class ke extends g{_parse(e){if(this._getType(e)!==u.null){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.null,received:t.parsedType}),_}return O(e.data)}}ke.create=a=>new ke({typeName:y.ZodNull,...v(a)});class de extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}de.create=a=>new de({typeName:y.ZodAny,...v(a)});class X extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}X.create=a=>new X({typeName:y.ZodUnknown,...v(a)});class H extends g{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),_}}H.create=a=>new H({typeName:y.ZodNever,...v(a)});class Be extends g{_parse(e){if(this._getType(e)!==u.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.void,received:t.parsedType}),_}return O(e.data)}}Be.create=a=>new Be({typeName:y.ZodVoid,...v(a)});class F extends g{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==u.array)return p(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),_;if(s.exactLength!==null){const i=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(i||o)&&(p(t,{code:i?c.too_big:c.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(p(t,{code:c.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(p(t,{code:c.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>s.type._parseAsync(new q(t,i,t.path,o)))).then(i=>V.mergeArray(n,i));const r=[...t.data].map((i,o)=>s.type._parseSync(new q(t,i,t.path,o)));return V.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new F({...this._def,minLength:{value:e,message:f.toString(t)}})}max(e,t){return new F({...this._def,maxLength:{value:e,message:f.toString(t)}})}length(e,t){return new F({...this._def,exactLength:{value:e,message:f.toString(t)}})}nonempty(e){return this.min(1,e)}}F.create=(a,e)=>new F({type:a,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...v(e)});function se(a){if(a instanceof Z){const e={};for(const t in a.shape){const n=a.shape[t];e[t]=U.create(se(n))}return new Z({...a._def,shape:()=>e})}else return a instanceof F?new F({...a._def,type:se(a.element)}):a instanceof U?U.create(se(a.unwrap())):a instanceof ne?ne.create(se(a.unwrap())):a instanceof z?z.create(a.items.map(e=>se(e))):a}class Z extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=w.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){const d=this._getOrReturnCtx(e);return p(d,{code:c.invalid_type,expected:u.object,received:d.parsedType}),_}const{status:t,ctx:n}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof H&&this._def.unknownKeys==="strip"))for(const d in n.data)r.includes(d)||i.push(d);const o=[];for(const d of r){const l=s[d],m=n.data[d];o.push({key:{status:"valid",value:d},value:l._parse(new q(n,m,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof H){const d=this._def.unknownKeys;if(d==="passthrough")for(const l of i)o.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(d==="strict")i.length>0&&(p(n,{code:c.unrecognized_keys,keys:i}),t.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const l of i){const m=n.data[l];o.push({key:{status:"valid",value:l},value:d._parse(new q(n,m,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const d=[];for(const l of o){const m=await l.key;d.push({key:m,value:await l.value,alwaysSet:l.alwaysSet})}return d}).then(d=>V.mergeObjectSync(t,d)):V.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new Z({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var s,r,i,o;const d=(i=(r=(s=this._def).errorMap)===null||r===void 0?void 0:r.call(s,t,n).message)!==null&&i!==void 0?i:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=f.errToObj(e).message)!==null&&o!==void 0?o:d}:{message:d}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){const t={};return w.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Z({...this._def,shape:()=>t})}omit(e){const t={};return w.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Z({...this._def,shape:()=>t})}deepPartial(){return se(this)}partial(e){const t={};return w.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}),new Z({...this._def,shape:()=>t})}required(e){const t={};return w.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof U;)s=s._def.innerType;t[n]=s}}),new Z({...this._def,shape:()=>t})}keyof(){return zt(w.objectKeys(this.shape))}}Z.create=(a,e)=>new Z({shape:()=>a,unknownKeys:"strip",catchall:H.create(),typeName:y.ZodObject,...v(e)});Z.strictCreate=(a,e)=>new Z({shape:()=>a,unknownKeys:"strict",catchall:H.create(),typeName:y.ZodObject,...v(e)});Z.lazycreate=(a,e)=>new Z({shape:a,unknownKeys:"strip",catchall:H.create(),typeName:y.ZodObject,...v(e)});class we extends g{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(r){for(const o of r)if(o.result.status==="valid")return o.result;for(const o of r)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=r.map(o=>new M(o.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:i}),_}if(t.common.async)return Promise.all(n.map(async r=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(s);{let r;const i=[];for(const d of n){const l={...t,common:{...t.common,issues:[]},parent:null},m=d._parseSync({data:t.data,path:t.path,parent:l});if(m.status==="valid")return m;m.status==="dirty"&&!r&&(r={result:m,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const o=i.map(d=>new M(d));return p(t,{code:c.invalid_union,unionErrors:o}),_}}get options(){return this._def.options}}we.create=(a,e)=>new we({options:a,typeName:y.ZodUnion,...v(e)});const Ae=a=>a instanceof Ze?Ae(a.schema):a instanceof R?Ae(a.innerType()):a instanceof Se?[a.value]:a instanceof G?a.options:a instanceof $e?Object.keys(a.enum):a instanceof Ce?Ae(a._def.innerType):a instanceof xe?[void 0]:a instanceof ke?[null]:null;class Ue extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return p(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),_;const n=this.discriminator,s=t.data[n],r=this.optionsMap.get(s);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const r of t){const i=Ae(r.shape[e]);if(!i)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,r)}}return new Ue({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...v(n)})}}function Qe(a,e){const t=K(a),n=K(e);if(a===e)return{valid:!0,data:a};if(t===u.object&&n===u.object){const s=w.objectKeys(e),r=w.objectKeys(a).filter(o=>s.indexOf(o)!==-1),i={...a,...e};for(const o of r){const d=Qe(a[o],e[o]);if(!d.valid)return{valid:!1};i[o]=d.data}return{valid:!0,data:i}}else if(t===u.array&&n===u.array){if(a.length!==e.length)return{valid:!1};const s=[];for(let r=0;r<a.length;r++){const i=a[r],o=e[r],d=Qe(i,o);if(!d.valid)return{valid:!1};s.push(d.data)}return{valid:!0,data:s}}else return t===u.date&&n===u.date&&+a==+e?{valid:!0,data:a}:{valid:!1}}class Te extends g{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=(r,i)=>{if(Ye(r)||Ye(i))return _;const o=Qe(r.value,i.value);return o.valid?((Xe(r)||Xe(i))&&t.dirty(),{status:t.value,value:o.data}):(p(n,{code:c.invalid_intersection_types}),_)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([r,i])=>s(r,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Te.create=(a,e,t)=>new Te({left:a,right:e,typeName:y.ZodIntersection,...v(t)});class z extends g{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.array)return p(n,{code:c.invalid_type,expected:u.array,received:n.parsedType}),_;if(n.data.length<this._def.items.length)return p(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&n.data.length>this._def.items.length&&(p(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((r,i)=>{const o=this._def.items[i]||this._def.rest;return o?o._parse(new q(n,r,n.path,i)):null}).filter(r=>!!r);return n.common.async?Promise.all(s).then(r=>V.mergeArray(t,r)):V.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:a,typeName:y.ZodTuple,rest:null,...v(e)})};class Ne extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.object)return p(n,{code:c.invalid_type,expected:u.object,received:n.parsedType}),_;const s=[],r=this._def.keyType,i=this._def.valueType;for(const o in n.data)s.push({key:r._parse(new q(n,o,n.path,o)),value:i._parse(new q(n,n.data[o],n.path,o))});return n.common.async?V.mergeObjectAsync(t,s):V.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof g?new Ne({keyType:e,valueType:t,typeName:y.ZodRecord,...v(n)}):new Ne({keyType:A.create(),valueType:e,typeName:y.ZodRecord,...v(t)})}}class Le extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.map)return p(n,{code:c.invalid_type,expected:u.map,received:n.parsedType}),_;const s=this._def.keyType,r=this._def.valueType,i=[...n.data.entries()].map(([o,d],l)=>({key:s._parse(new q(n,o,n.path,[l,"key"])),value:r._parse(new q(n,d,n.path,[l,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const d of i){const l=await d.key,m=await d.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(l.value,m.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const d of i){const l=d.key,m=d.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(l.value,m.value)}return{status:t.value,value:o}}}}Le.create=(a,e,t)=>new Le({valueType:e,keyType:a,typeName:y.ZodMap,...v(t)});class ae extends g{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.set)return p(n,{code:c.invalid_type,expected:u.set,received:n.parsedType}),_;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(p(n,{code:c.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(p(n,{code:c.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function i(d){const l=new Set;for(const m of d){if(m.status==="aborted")return _;m.status==="dirty"&&t.dirty(),l.add(m.value)}return{status:t.value,value:l}}const o=[...n.data.values()].map((d,l)=>r._parse(new q(n,d,n.path,l)));return n.common.async?Promise.all(o).then(d=>i(d)):i(o)}min(e,t){return new ae({...this._def,minSize:{value:e,message:f.toString(t)}})}max(e,t){return new ae({...this._def,maxSize:{value:e,message:f.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ae.create=(a,e)=>new ae({valueType:a,minSize:null,maxSize:null,typeName:y.ZodSet,...v(e)});class oe extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return p(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),_;function n(o,d){return Me({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ee(),ve].filter(l=>!!l),issueData:{code:c.invalid_arguments,argumentsError:d}})}function s(o,d){return Me({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ee(),ve].filter(l=>!!l),issueData:{code:c.invalid_return_type,returnTypeError:d}})}const r={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof ce){const o=this;return O(async function(...d){const l=new M([]),m=await o._def.args.parseAsync(d,r).catch(B=>{throw l.addIssue(n(d,B)),l}),k=await Reflect.apply(i,this,m);return await o._def.returns._def.type.parseAsync(k,r).catch(B=>{throw l.addIssue(s(k,B)),l})})}else{const o=this;return O(function(...d){const l=o._def.args.safeParse(d,r);if(!l.success)throw new M([n(d,l.error)]);const m=Reflect.apply(i,this,l.data),k=o._def.returns.safeParse(m,r);if(!k.success)throw new M([s(m,k.error)]);return k.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new oe({...this._def,args:z.create(e).rest(X.create())})}returns(e){return new oe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new oe({args:e||z.create([]).rest(X.create()),returns:t||X.create(),typeName:y.ZodFunction,...v(n)})}}class Ze extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ze.create=(a,e)=>new Ze({getter:a,typeName:y.ZodLazy,...v(e)});class Se extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}Se.create=(a,e)=>new Se({value:a,typeName:y.ZodLiteral,...v(e)});function zt(a,e){return new G({values:a,typeName:y.ZodEnum,...v(e)})}class G extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{expected:w.joinValues(n),received:t.parsedType,code:c.invalid_type}),_}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:n}),_}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return G.create(e)}exclude(e){return G.create(this.options.filter(t=>!e.includes(t)))}}G.create=zt;class $e extends g{_parse(e){const t=w.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.string&&n.parsedType!==u.number){const s=w.objectValues(t);return p(n,{expected:w.joinValues(s),received:n.parsedType,code:c.invalid_type}),_}if(t.indexOf(e.data)===-1){const s=w.objectValues(t);return p(n,{received:n.data,code:c.invalid_enum_value,options:s}),_}return O(e.data)}get enum(){return this._def.values}}$e.create=(a,e)=>new $e({values:a,typeName:y.ZodNativeEnum,...v(e)});class ce extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return p(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),_;const n=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ce.create=(a,e)=>new ce({type:a,typeName:y.ZodPromise,...v(e)});class R extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,r={addIssue:i=>{p(n,i),i.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),s.type==="preprocess"){const i=s.transform(n.data,r);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(i).then(o=>this._def.schema._parseAsync({data:o,path:n.path,parent:n})):this._def.schema._parseSync({data:i,path:n.path,parent:n})}if(s.type==="refinement"){const i=o=>{const d=s.refinement(o,r);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?_:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ge(i))return i;const o=s.transform(i.value,r);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>ge(i)?Promise.resolve(s.transform(i.value,r)).then(o=>({status:t.value,value:o})):i);w.assertNever(s)}}R.create=(a,e,t)=>new R({schema:a,typeName:y.ZodEffects,effect:e,...v(t)});R.createWithPreprocess=(a,e,t)=>new R({schema:e,effect:{type:"preprocess",transform:a},typeName:y.ZodEffects,...v(t)});class U extends g{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(a,e)=>new U({innerType:a,typeName:y.ZodOptional,...v(e)});class ne extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ne.create=(a,e)=>new ne({innerType:a,typeName:y.ZodNullable,...v(e)});class Ce extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===u.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ce.create=(a,e)=>new Ce({innerType:a,typeName:y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class De extends g{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Fe(s)?s.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new M(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new M(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}De.create=(a,e)=>new De({innerType:a,typeName:y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class qe extends g{_parse(e){if(this._getType(e)!==u.nan){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:u.nan,received:t.parsedType}),_}return{status:"valid",value:e.data}}}qe.create=a=>new qe({typeName:y.ZodNaN,...v(a)});const tn=Symbol("zod_brand");class Ut extends g{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ve extends g{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?_:s.status==="dirty"?(t.dirty(),qt(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?_:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new Ve({in:e,out:t,typeName:y.ZodPipeline})}}class ze extends g{_parse(e){const t=this._def.innerType._parse(e);return ge(t)&&(t.value=Object.freeze(t.value)),t}}ze.create=(a,e)=>new ze({innerType:a,typeName:y.ZodReadonly,...v(e)});const Ht=(a,e={},t)=>a?de.create().superRefine((n,s)=>{var r,i;if(!a(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,d=(i=(r=o.fatal)!==null&&r!==void 0?r:t)!==null&&i!==void 0?i:!0,l=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...l,fatal:d})}}):de.create(),an={object:Z.lazycreate};var y;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(y||(y={}));const nn=(a,e={message:`Input not instance of ${a.name}`})=>Ht(t=>t instanceof a,e),Kt=A.create,Wt=W.create,sn=qe.create,rn=J.create,Jt=be.create,on=te.create,ln=Re.create,dn=xe.create,cn=ke.create,un=de.create,pn=X.create,mn=H.create,hn=Be.create,fn=F.create,yn=Z.create,_n=Z.strictCreate,vn=we.create,gn=Ue.create,bn=Te.create,xn=z.create,kn=Ne.create,wn=Le.create,Tn=ae.create,Nn=oe.create,Zn=Ze.create,Sn=Se.create,$n=G.create,Cn=$e.create,In=ce.create,It=R.create,Vn=U.create,jn=ne.create,On=R.createWithPreprocess,Pn=Ve.create,An=()=>Kt().optional(),En=()=>Wt().optional(),Mn=()=>Jt().optional(),Fn={string:a=>A.create({...a,coerce:!0}),number:a=>W.create({...a,coerce:!0}),boolean:a=>be.create({...a,coerce:!0}),bigint:a=>J.create({...a,coerce:!0}),date:a=>te.create({...a,coerce:!0})},Rn=_;var C=Object.freeze({__proto__:null,defaultErrorMap:ve,setErrorMap:Da,getErrorMap:Ee,makeIssue:Me,EMPTY_PATH:qa,addIssueToContext:p,ParseStatus:V,INVALID:_,DIRTY:qt,OK:O,isAborted:Ye,isDirty:Xe,isValid:ge,isAsync:Fe,get util(){return w},get objectUtil(){return Ge},ZodParsedType:u,getParsedType:K,ZodType:g,ZodString:A,ZodNumber:W,ZodBigInt:J,ZodBoolean:be,ZodDate:te,ZodSymbol:Re,ZodUndefined:xe,ZodNull:ke,ZodAny:de,ZodUnknown:X,ZodNever:H,ZodVoid:Be,ZodArray:F,ZodObject:Z,ZodUnion:we,ZodDiscriminatedUnion:Ue,ZodIntersection:Te,ZodTuple:z,ZodRecord:Ne,ZodMap:Le,ZodSet:ae,ZodFunction:oe,ZodLazy:Ze,ZodLiteral:Se,ZodEnum:G,ZodNativeEnum:$e,ZodPromise:ce,ZodEffects:R,ZodTransformer:R,ZodOptional:U,ZodNullable:ne,ZodDefault:Ce,ZodCatch:De,ZodNaN:qe,BRAND:tn,ZodBranded:Ut,ZodPipeline:Ve,ZodReadonly:ze,custom:Ht,Schema:g,ZodSchema:g,late:an,get ZodFirstPartyTypeKind(){return y},coerce:Fn,any:un,array:fn,bigint:rn,boolean:Jt,date:on,discriminatedUnion:gn,effect:It,enum:$n,function:Nn,instanceof:nn,intersection:bn,lazy:Zn,literal:Sn,map:wn,nan:sn,nativeEnum:Cn,never:mn,null:cn,nullable:jn,number:Wt,object:yn,oboolean:Mn,onumber:En,optional:Vn,ostring:An,pipeline:Pn,preprocess:On,promise:In,record:kn,set:Tn,strictObject:_n,string:Kt,symbol:ln,transformer:It,tuple:xn,undefined:dn,union:vn,unknown:pn,void:hn,NEVER:Rn,ZodIssueCode:c,quotelessJson:La,ZodError:M});const b=(a,e={})=>a.describe(he.toString(e,a.description)),T={number:C.preprocess(a=>Number(a),C.number()).describe(he.toString({label:"Номер",type:"number",component:"ui-field-number"})),string:C.string().trim().describe(he.toString({label:"Строка",type:"string",component:"ui-field-text"})),date:C.preprocess(a=>new Date(String(a)),C.date()).describe(he.toString({label:"Дата",type:"date",component:"ui-field-date"})),boolean:C.preprocess(a=>String(a)==="true",C.boolean()).describe(he.toString({label:"Логическое значение",type:"boolean",component:"ui-field-checkbox"}))},Y=C.object({...T,_id:b(T.string.regex(Ma,"Не валидный ID"),{label:"ID"}),dateCreate:b(T.date,{label:"Дата создания"}),dateUpdate:b(T.date,{label:"Дата изменения"}),name:b(T.string,{label:"Название"}),title:b(T.string,{label:"Заголовок"}),comment:b(C.string().trim().min(2).max(1e3),{label:"Комментарий",component:"ui-field-text-area"}),description:b(C.string().trim().min(2).max(1e3),{label:"Описание",component:"ui-field-text-area"}),text:b(C.string().trim().min(2).max(3e3),{label:"Текст",component:"ui-field-text-area"}),login:b(T.string,{label:"Логин"}),email:b(T.string.email(),{label:"Email"}),password:b(T.string.min(6),{label:"Пароль",component:"ui-field-password"}),price:b(C.preprocess(a=>Number(a),C.number().nonnegative()),{label:"Стоимость"}),alias:b(T.string.toLowerCase().regex(/^[a-z-]+$/,'Только латиница и тире "-"'),{label:"Псевдоним"}),published:b(T.boolean,{label:"Опубликован(а)"}),active:b(T.boolean,{label:"Активный(ная)"}),enabled:b(T.boolean,{label:"Включен(а)"}),disabled:b(T.boolean,{label:"Отключен(а)"}),open:b(T.boolean,{label:"Открыт(а)"}),close:b(T.boolean,{label:"Закрыто"}),closed:b(T.boolean,{label:"Закрыт(а)"}),online:b(T.boolean,{label:"Онлайн"}),firstName:b(T.string.regex(He,"Только кириллица"),{label:"Имя"}),middleName:b(T.string.regex(He,"Только кириллица"),{label:"Отчество"}),lastName:b(T.string.regex(He,"Только кириллица"),{label:"Фамилия"}),birthday:b(T.date,{label:"Дата рождения"}),phone:b(C.preprocess(a=>et(a)||0,T.number).refine(a=>Fa(a),{message:"Не вервый формат номера телефона"}),{label:"Телефон",component:"ui-field-phone"}),gender:b(C.enum([_e.man,_e.woman]),{label:"Пол",component:"ui-field-select-gender"}),year:b(T.number,{label:"Год"}),days:b(T.number.array(),{label:"Дни недели",component:"ui-picker-days"}),q:b(C.preprocess(a=>String(a).replace(Ea,""),T.string),{label:"Поиск",component:"ui-field-search"}),page:b(C.preprocess(a=>Math.abs(Number(a)),T.number),{label:"Страница"}),limit:b(C.preprocess(a=>Math.abs(Number(a)),T.number),{label:"Лимит"})}),Bn=Y.pick({page:!0,limit:!0}).extend({total:b(Y.shape.number,{label:"Общее кол-во"}),skip:b(Y.shape.number,{label:"Пропустить"}),pages:b(Y.shape.number,{label:"Кол-во всех страниц"})}).describe("Данные пагинации"),Ln=Bn.pick({page:!0,limit:!0}).partial().describe("Параметры разбиения на страницы"),je={page:1,limit:10,maxLimit:100};var fe;const Dn=class Gt{constructor(e={},t){Oa(this,fe,void 0),j(this,"page",je.page),j(this,"limit",je.limit),j(this,"skip",0),j(this,"total",0),j(this,"pages",0),Pa(this,fe,this.parseArg(t,je.maxLimit)),this.set(e)}static parseArg(e,t){return Math.abs(typeof e=="string"?Number.parseInt(e)||t:e||t)}parseArg(e,t){return Gt.parseArg(e,t)}set(e={}){let t=!1;if(e.page&&e.page!==this.page&&(this.page=this.parseArg(e.page,je.page),t=!0),e.limit&&e.limit!==this.limit&&(this.limit=this.parseArg(e.limit,this.limit),t=!0),this.limit>$t(this,fe)&&(this.limit=$t(this,fe)),e.total&&e.total!==this.total&&(this.total=Math.abs(e.total),this.pages=Math.ceil(this.total/this.limit)),t){let n=0;try{n=(this.page-1)*this.limit}catch{}this.skip=n>0?n:0}return this}toObject(){return{page:this.page,limit:this.limit,total:this.total,skip:this.skip,pages:this.pages}}getQuery(){return{page:this.page,limit:this.limit}}};fe=new WeakMap;let Vt=Dn;Y.pick({q:!0}).extend(Ln.shape).extend({sort:b(T.string.min(1).max(64),{label:"Сортировка"})}).partial().describe("Параметры базового запроса");const qn=S({__name:"FieldPhone",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=L({get:()=>{if(t.modelValue)return Ra(t.modelValue)},set:s=>{e("update:error"),e("update:model-value",et(s))}});return(s,r)=>(h(),$(me,Ie({...t,...s.$attrs},{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=i=>n.value=i)}),null,16,["modelValue"]))}});qn.__docgenInfo={exportName:"default",displayName:"FieldPhone",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldPhone.vue"]};const zn=S({__name:"FieldDate",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},type:{},modelValue:{},placeholder:{}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=L({get:()=>{try{const s=Y.shape.date.parse(t.modelValue);return Ba(s)}catch{}},set:s=>{e("update:error");try{const r=Y.shape.date.parse(s);e("update:model-value",r)}catch{}}});return(s,r)=>(h(),$(me,Ie({...t,...s.$attrs},{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=i=>n.value=i),type:"date"}),null,16,["modelValue"]))}});zn.__docgenInfo={exportName:"default",displayName:"FieldDate",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldDate.vue"]};const Un=["value","disabled"],Hn=S({__name:"FieldTextArea",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},modelValue:{}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=s=>{e("input",s),e("update:error"),s.target instanceof HTMLTextAreaElement&&e("update:model-value",s.target.value)};return(s,r)=>(h(),$(pe,{label:t.label,error:t.error,disabled:t.disabled,readonly:t.readonly,description:t.description,class:"ui-field-textarea"},{default:ue(()=>[I("textarea",{value:t.modelValue,disabled:t.disabled||t.readonly,onInput:n},null,40,Un)]),_:1},8,["label","error","disabled","readonly","description"]))}});Hn.__docgenInfo={exportName:"default",displayName:"FieldTextArea",description:"",tags:{},events:[{name:"input",type:{names:["Event"]}},{name:"update:model-value",type:{names:["union"],elements:[{name:"string"},{name:"number"},{name:"Date"}]}},{name:"update:error",type:{names:["string"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldTextArea.vue"]};const Kn=["multiple","disabled","accept"],Wn=S({__name:"FieldFile",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},modelValue:{},multiple:{type:Boolean},accept:{}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=s=>{e("input",s),e("update:error"),s.target instanceof HTMLInputElement&&s.target.files?e("update:model-value",s.target.files):e("update:model-value")};return(s,r)=>(h(),$(pe,{label:t.label,error:t.error,disabled:t.disabled,readonly:t.readonly,description:t.description},{default:ue(()=>[I("input",{type:"file",multiple:t.multiple,disabled:t.disabled||t.readonly,accept:t.accept,onInput:n},null,40,Kn)]),_:1},8,["label","error","disabled","readonly","description"]))}});Wn.__docgenInfo={exportName:"default",displayName:"FieldFile",description:"",tags:{},events:[{name:"input",type:{names:["Event"]}},{name:"update:model-value",type:{names:["TModelValue"]}},{name:"update:error",type:{names:["string"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldFile.vue"]};const Jn=["checked","disabled"],Yt=S({__name:"FieldCheckbox",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},modelValue:{type:Boolean}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=s=>{e("input",s),e("update:error"),s.target instanceof HTMLInputElement&&e("update:model-value",!t.modelValue)};return(s,r)=>(h(),$(pe,{label:t.label,error:t.error,disabled:t.disabled,readonly:t.readonly,description:t.description,class:"ui-field-checkbox"},{default:ue(()=>[I("input",{type:"checkbox",checked:t.modelValue,disabled:t.disabled||t.readonly,onInput:n},null,40,Jn)]),_:1},8,["label","error","disabled","readonly","description"]))}});Yt.__docgenInfo={exportName:"default",displayName:"FieldCheckbox",description:"",tags:{},events:[{name:"input",type:{names:["Event"]}},{name:"update:model-value",type:{names:["boolean"]}},{name:"update:error",type:{names:["string"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldCheckbox.vue"]};const Gn=["value","multiple","disabled"],Yn=["value"],Xt=S({__name:"FieldSelect",props:{label:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},description:{},modelValue:{},options:{},multiple:{type:Boolean}},emits:["input","update:model-value","update:error"],setup(a,{emit:e}){const t=a,n=s=>{e("input",s),e("update:error"),s.target instanceof HTMLSelectElement?e("update:model-value",s.target.value):e("update:model-value")};return(s,r)=>(h(),$(pe,{label:t.label,error:t.error,disabled:t.disabled,readonly:t.readonly,description:t.description,class:"ui-field-select"},{default:ue(()=>[I("select",{value:t.modelValue,multiple:t.multiple,disabled:t.disabled||t.readonly,onInput:n},[(h(!0),x(re,null,ye(t.options,i=>(h(),x("option",{value:i.value},E(i.text),9,Yn))),256))],40,Gn)]),_:1},8,["label","error","disabled","readonly","description"]))}});Xt.__docgenInfo={exportName:"default",displayName:"FieldSelect",description:"",tags:{},events:[{name:"input",type:{names:["Event"]}},{name:"update:model-value",type:{names:["union"],elements:[{name:"string"},{name:"Array",elements:[{name:"string"}]},{name:"number"},{name:"Array",elements:[{name:"number"}]}]}},{name:"update:error",type:{names:["string"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldSelect.vue"]};const Xn=S({__name:"FieldSelectGender",setup(a){const e=[{text:"Мужской",value:_e.man},{text:"Женский",value:_e.woman}];return(t,n)=>(h(),$(Xt,{options:e}))}});Xn.__docgenInfo={exportName:"default",displayName:"FieldSelectGender",description:"",tags:{},sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/FieldSelectGender.vue"]};const Qn={class:"ui-picker ui-picker-days"},es={key:0,class:"label mb-2"},ts={class:"ui-picker-content flex items-center"},as={key:1,class:"mt-2 text-error"},ns=S({__name:"PickerDays",props:{modelValue:{},label:{},error:{},readonly:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(a,{emit:e}){const t=a,n=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],s=r=>{const i=r+1;let o=t.modelValue||[];o.includes(i)?o=o.filter(d=>d!==i):o.push(i),e("update:modelValue",o.sort())};return(r,i)=>(h(),x("div",Qn,[t.label?(h(),x("div",es,[I("span",null,E(t.label)+":",1)])):N("",!0),I("div",ts,[(h(),x(re,null,ye(n,(o,d)=>{var l;return le(Yt,{class:"mr-4",modelValue:(l=t.modelValue)==null?void 0:l.includes(d+1),label:o,disabled:t.disabled,readonly:t.readonly,onInput:m=>s(d)},null,8,["modelValue","label","disabled","readonly","onInput"])}),64))]),r.error?(h(),x("div",as,E(r.error),1)):N("",!0)]))}});ns.__docgenInfo={exportName:"default",displayName:"PickerDays",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"Array",elements:[{name:"number"}]}},{name:"label",required:!1,type:{name:"string"}},{name:"error",required:!1,type:{name:"string"}},{name:"readonly",required:!1,type:{name:"boolean"}},{name:"disabled",required:!1,type:{name:"boolean"}}],events:[{name:"update:modelValue",type:{names:["Array"],elements:[{name:"number"}]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/PickerDays.vue"]};var Qt=(a=>(a.primary="primary",a.accent="accent",a.info="info",a.success="success",a.warning="warning",a.error="error",a.dark="dark",a.light="light",a))(Qt||{});const ea=Object.keys(Qt),ss=["onSubmit"],rs={key:0,class:"ui-form-header"},is={class:"ui-form-title"},os={key:1,class:"ui-form-messages"},ls={class:"ui-form-body"},ds={key:2,class:"ui-form-actions"},cs=S({__name:"Form",props:{modelValue:{},title:{},noTitle:{type:Boolean},messages:{},noActions:{type:Boolean},disabled:{type:Boolean},load:{type:Boolean},showAll:{type:Boolean},fn:{type:Function}},emits:["submit","failedValid","update:load","fnCompleted"],setup(a,{emit:e}){const t=a,n=L(()=>t.modelValue?t.showAll?t.modelValue.ctrls:t.modelValue.ctrls.filter(l=>!l.hidden):[]),s=L(()=>{var l;if(!t.noTitle)return t.title||((l=t.modelValue)==null?void 0:l.title)}),r=We(!1);Je(r,l=>e("update:load",l));const i=We(t.messages||[]);Je(()=>t.messages,l=>i.value=l||[]);const o=async()=>{if(t.modelValue)if(t.modelValue.isValid()){if(e("submit",t.modelValue),t.fn){r.value=!0,i.value=[];try{const l=await t.fn(t.modelValue.obj);if(e("fnCompleted",l),l!=null&&l.errors&&Array.isArray(l.errors))for(const m of l.errors)m.code&&m.text&&(t.modelValue&&t.modelValue.ctrls.find(k=>k.key===m.code)?t.modelValue.setValidError(m.code,m.text):i.value.push({code:"error",text:m.text}))}catch(l){i.value.push({code:"error",text:l.message})}r.value=!1}}else e("failedValid",t.modelValue);else e("submit")},d=l=>ea.find(m=>m===l.code)??"error";return(l,m)=>(h(),x("form",{onSubmit:aa(o,["prevent"]),class:"ui-form"},[s.value?(h(),x("div",rs,[I("h3",is,E(s.value),1)])):N("",!0),i.value.length?(h(),x("div",os,[(h(!0),x(re,null,ye(i.value,k=>(h(),$(Bt,{value:k.text,color:d(k)},null,8,["value","color"]))),256))])):N("",!0),I("div",ls,[l.$slots.pre?D(l.$slots,"pre",{key:0}):N("",!0),l.$slots.default?D(l.$slots,"default",{key:1}):(h(),x(re,{key:2},[t.modelValue?(h(!0),x(re,{key:0},ye(n.value,k=>(h(),$(Ft(k.component),{label:k.label,modelValue:t.modelValue.obj[k.key],"onUpdate:modelValue":B=>t.modelValue.obj[k.key]=B,error:t.modelValue._errors[k.key],"onUpdate:error":B=>t.modelValue._errors[k.key]=B,readonly:k.readonly,disabled:r.value||t.load||t.disabled||k.disabled,description:k.description,class:Q("ui-field-key-"+k.key)},null,40,["label","modelValue","onUpdate:modelValue","error","onUpdate:error","readonly","disabled","description","class"]))),256)):N("",!0)],64)),l.$slots.post?D(l.$slots,"post",{key:3}):N("",!0)]),t.noActions?N("",!0):(h(),x("div",ds,[l.$slots.actions?D(l.$slots,"actions",{key:0}):(h(),$(ie,{key:1,label:"Отправить",type:"submit",color:"primary",disabled:r.value||t.disabled},null,8,["disabled"]))]))],40,ss))}});cs.__docgenInfo={exportName:"default",displayName:"Form",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"IFormModel",elements:[{name:"T"}]}},{name:"title",required:!1,type:{name:"string"}},{name:"noTitle",required:!1,type:{name:"boolean"}},{name:"messages",required:!1,type:{name:"Array",elements:[{name:"TNotificationItem"}]}},{name:"noActions",required:!1,type:{name:"boolean"}},{name:"disabled",required:!1,type:{name:"boolean"}},{name:"load",required:!1,type:{name:"boolean"}},{name:"showAll",required:!1,type:{name:"boolean"}},{name:"fn",required:!1,type:{name:"TSFunctionType"}}],events:[{name:"submit",type:{names:["IFormModel"],elements:[{name:"T"}]}},{name:"failedValid",type:{names:["IFormModel"],elements:[{name:"T"}]}},{name:"update:load",type:{names:["boolean"]}},{name:"fnCompleted",type:{names:["any"]}}],slots:[{name:"pre"},{name:"default"},{name:"post"},{name:"actions"}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Form.vue"]};const us={key:0,class:"ui-pagination"},ps={class:"pages"},ms={key:0,class:"pages-first"},hs=I("span",{class:"page-separator"},"...",-1),fs={class:"pages-numbers"},ys={key:1,class:"pages-last"},_s=I("span",{class:"page-separator"},"...",-1),vs=S({__name:"Pagination",props:{modelValue:{default:new Vt().toObject()},length:{default:3}},emits:["update:model-value"],setup(a,{emit:e}){const t=a,n=L(()=>t.modelValue.page||1),s=L(()=>{let d=[];const l=t.length;for(let m=1;m<l;m++){const k=n.value-m;if(k<1)break;d.push({value:k})}d=d.reverse(),d.push({value:n.value,active:!0});for(let m=1;m<=l;m++){const k=n.value+m;if(k>(t.modelValue.pages||0))break;d.push({value:k})}return d}),r=d=>{const l=new Vt({...t.modelValue,page:d});e("update:model-value",l.toObject())},i=L(()=>n.value-t.length>0),o=L(()=>t.modelValue.pages&&n.value+t.length<t.modelValue.pages);return(d,l)=>t.modelValue.pages?(h(),x("div",us,[I("div",ps,[i.value?(h(),x("div",ms,[le(ie,{label:"1",class:"page-item",onClick:l[0]||(l[0]=m=>r(1))}),hs])):N("",!0),I("div",fs,[(h(!0),x(re,null,ye(s.value,m=>(h(),$(ie,{label:m.value.toString(),class:Q({"page-item":!0,active:m.active}),disabled:m.active,onClick:k=>r(m.value)},null,8,["label","class","disabled","onClick"]))),256))]),o.value?(h(),x("div",ys,[_s,le(ie,{label:t.modelValue.pages.toString(),onClick:l[1]||(l[1]=m=>r(t.modelValue.pages)),class:"page-item"},null,8,["label"])])):N("",!0)])])):N("",!0)}});vs.__docgenInfo={exportName:"default",displayName:"Pagination",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"TPagination"},defaultValue:{func:!1,value:"new Pagination().toObject()"}},{name:"length",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"3"}}],events:[{name:"update:model-value",type:{names:["TPagination"]}}],sourceFiles:["/home/antoxa/Projects/my/axp/ui/src/components/Pagination.vue"]};const gs=Object.keys(Rt),xs={title:"Example/Button",component:ie,tags:["autodocs"],argTypes:{label:{control:"text"},type:{control:"select",options:["button","submit"]},color:{control:"select",options:ea},icon:{control:"select",options:gs},disabled:{control:"boolean"},onClick:{action:"clicked"}},args:{}},Oe={args:{label:"Button"}},Pe={args:{label:"Accent",color:"accent"}};var jt,Ot,Pt;Oe.parameters={...Oe.parameters,docs:{...(jt=Oe.parameters)==null?void 0:jt.docs,source:{originalSource:`{
  args: {
    label: 'Button'
  }
}`,...(Pt=(Ot=Oe.parameters)==null?void 0:Ot.docs)==null?void 0:Pt.source}}};var At,Et,Mt;Pe.parameters={...Pe.parameters,docs:{...(At=Pe.parameters)==null?void 0:At.docs,source:{originalSource:`{
  args: {
    label: 'Accent',
    color: 'accent'
  }
}`,...(Mt=(Et=Pe.parameters)==null?void 0:Et.docs)==null?void 0:Mt.source}}};const ks=["Default","Accent"];export{Pe as Accent,Oe as Default,ks as __namedExportsOrder,xs as default};
//# sourceMappingURL=Button.stories-2515129b.js.map
