1import{bd as D,d as G,G as M,Y as E,r as J,U as P,V as w,be as Y,c as a,e as r,n as m,a4 as n,N as l,g as u,k as S,t as B,f as O,F as z,L as A,M as c,w as p,O as y,a0 as q,bf as h,h as H,I as K,S as Q}from"./Bq54d-VJ.js";import{_ as W,a as X,b as Z,c as ee,d as te}from"./DN5G0kkF.js";import{_ as ne}from"./BWwgjjyu.js";const oe=D("/logo.png"),ae=O("img",{class:"h-[60px] w-[60px] rounded-full",src:oe,alt:"TTSOpen logo"},null,-1),re=G({inheritAttrs:!1,__name:"AuthForm2",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},icon:{type:String,default:void 0},align:{type:String,default:"bottom"},loading:{type:Boolean,default:!1},fields:{type:Array,default:()=>[]},providers:{type:Array,default:()=>[]},submitButton:{type:Object,default:()=>({})},schema:{type:Object,default:void 0},validate:{type:[Function,Array],default:void 0},validateOn:{type:Array,default:()=>["submit"]},divider:{type:String,default:"or"},class:{type:[String,Object,Array],default:void 0},ui:{type:Object,default:()=>({})}},emits:["submit"],setup(o,{expose:C}){const f=o,F=M(()=>({wrapper:"w-full max-w-sm space-y-6",base:"",container:E("gap-y-6 flex flex-col",f.align==="top"&&"flex-col-reverse"),title:"text-2xl text-gray-900 dark:text-white font-bold",description:"text-gray-500 dark:text-gray-400 mt-1",icon:{wrapper:"mb-2 pointer-events-none",base:"w-8 h-8 flex-shrink-0 text-gray-900 dark:text-white"},providers:"space-y-3",form:"space-y-6",footer:"text-sm text-gray-500 dark:text-gray-400 mt-2",default:{submitButton:{label:"Continue"}}})),v=J(),{ui:s,attrs:_}=P("auth.form",w(f,"ui"),F,w(f,"class"),!0),i=Y(Object.values(f.fields).reduce((t,{name:b,value:g})=>(t[b]=g,t),{}));return C({formRef:v,state:i}),(t,b)=>{var $,U,V,x;const g=K,k=Q,j=W,N=X,R=Z,I=ee,L=ne,T=te;return a(),r("div",y({class:n(s).wrapper},n(_)),[o.icon||t.$slots.icon||o.title||t.$slots.title||o.description||t.$slots.description?(a(),r("div",{key:0,class:m(n(s).base)},[o.icon||t.$slots.icon?(a(),r("div",{key:0,class:m([n(s).icon.wrapper,"flex flex-col items-center"])},[l(t.$slots,"icon",{},()=>[ae])],2)):u("",!0),o.title||t.$slots.title?(a(),r("p",{key:1,class:m([n(s).title,"mb-8"])},[l(t.$slots,"title",{},()=>[S(B(o.title),1)])],2)):u("",!0),o.description||t.$slots.description?(a(),r("div",{key:2,class:m(n(s).description)},[l(t.$slots,"description",{},()=>[S(B(o.description),1)])],2)):u("",!0)],2)):u("",!0),O("div",{class:m(n(s).container)},[($=o.providers)!=null&&$.length?(a(),r("div",{key:0,class:m(n(s).providers)},[(a(!0),r(z,null,A(o.providers,(e,d)=>(a(),c(k,y({key:d,ref_for:!0},e,{block:"",onClick:e.click}),{leading:p(()=>[e.type=="google"?(a(),c(g,{key:0,src:"/google.svg",size:"2xs"})):u("",!0)]),_:2},1040,["onClick"]))),128))],2)):u("",!0),(U=o.providers)!=null&&U.length&&((V=o.fields)!=null&&V.length)?(a(),c(j,{key:1,label:o.divider},null,8,["label"])):u("",!0),(x=o.fields)!=null&&x.length?(a(),c(T,{key:2,ref_key:"formRef",ref:v,state:n(i),schema:o.schema,validate:o.validate,"validate-on":o.validateOn,class:m(n(s).form),onSubmit:b[0]||(b[0]=e=>t.$emit("submit",e.data))},{default:p(()=>[(a(!0),r(z,null,A(o.fields,e=>(a(),c(L,{key:e.name,label:e.type==="checkbox"?"":e.label??"",description:e.description,help:e.help,hint:e.hint,name:e.name,size:e.size},q({default:p(()=>[l(t.$slots,`${e.name}-field`,y({ref_for:!0},{state:n(i),field:n(h)(e,["description","help","hint","size"])}),()=>[e.type==="checkbox"?(a(),c(N,y({key:0,modelValue:n(i)[e.name],"onUpdate:modelValue":d=>n(i)[e.name]=d,ref_for:!0},n(h)(e,["description","help","hint","size"])),null,16,["modelValue","onUpdate:modelValue"])):e.type==="select"?(a(),c(R,y({key:1,modelValue:n(i)[e.name],"onUpdate:modelValue":d=>n(i)[e.name]=d,ref_for:!0},n(h)(e,["description","help","hint","size"])),null,16,["modelValue","onUpdate:modelValue"])):(a(),c(I,y({key:2,modelValue:n(i)[e.name],"onUpdate:modelValue":d=>n(i)[e.name]=d,ref_for:!0},n(h)(e,["label","description","help","hint","size"])),null,16,["modelValue","onUpdate:modelValue"]))])]),_:2},[t.$slots[`${e.name}-label`]?{name:"label",fn:p(()=>[l(t.$slots,`${e.name}-label`)]),key:"0"}:void 0,t.$slots[`${e.name}-description`]?{name:"description",fn:p(()=>[l(t.$slots,`${e.name}-description`)]),key:"1"}:void 0,t.$slots[`${e.name}-hint`]?{name:"hint",fn:p(()=>[l(t.$slots,`${e.name}-hint`)]),key:"2"}:void 0,t.$slots[`${e.name}-help`]?{name:"help",fn:p(()=>[l(t.$slots,`${e.name}-help`)]),key:"3"}:void 0]),1032,["label","description","help","hint","name","size"]))),128)),l(t.$slots,"validation"),H(k,y({type:"submit",block:"",loading:o.loading},{...n(s).default.submitButton,...o.submitButton}),null,16,["loading"])]),_:3},8,["state","schema","validate","validate-on","class"])):u("",!0)],2),t.$slots.footer?(a(),r("p",{key:1,class:m(n(s).footer)},[l(t.$slots,"footer")],2)):u("",!0)],16)}}});
1export{re as _};
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.