51948469c2
- Stop ignoring web/app/index.html and web/app/assets/ - Bundle index-DBKIQT7H.js from current vite build (~101MB assets) Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
import{Gn as e,Kn as t,Kt as n,Or as r,Qn as i,Qt as a,Un as o,Yt as s,_r as c,a as l,ar as u,br as d,cn as f,d as p,dn as m,f as h,g as ee,hn as g,hr as _,ht as v,i as y,in as b,ir as x,jn as S,mn as te,mr as C,o as w,p as T,r as E,rr as D,s as O,sr as k,v as A,xr as j,yn as M,zn as N}from"./index-Brwv1ztr.js";var P=f({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...y(),...S(O(),[`direction`]),...h()},`VTextarea`),F=b()({name:`VTextarea`,directives:{vIntersect:v},inheritAttrs:!1,props:P(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(f,{attrs:h,emit:y,slots:b}){let S=s(f,`modelValue`),{isFocused:O,focus:P,blur:F}=T(f),{onIntersect:I}=E(f),L=e(()=>typeof f.counterValue==`function`?f.counterValue(S.value):(S.value||``).toString().length),R=e(()=>{if(h.maxlength)return h.maxlength;if(!(!f.counter||typeof f.counter!=`number`&&typeof f.counter!=`string`))return f.counter}),z=d(),B=d(),V=j(``),H=d(),U=d(0),{platform:W}=n(),G=l(f),K=e(()=>f.persistentPlaceholder||O.value||f.active);function q(){G.isSuppressing.value&&G.update(),H.value!==document.activeElement&&H.value?.focus(),O.value||P()}function J(e){q(),y(`click:control`,e)}function ne(e){y(`mousedown:control`,e)}function re(e){e.stopPropagation(),q(),x(()=>{S.value=``,m(f[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!f.modelModifiers?.trim){S.value=t.value;return}let n=t.value,r=t.selectionStart,i=t.selectionEnd;S.value=n,x(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),i!=null&&(t.selectionEnd=i-e)})}let Y=d(),X=d(Number(f.rows)),Z=e(()=>[`plain`,`underlined`].includes(f.variant));_(()=>{f.autoGrow||(X.value=Number(f.rows))});function Q(){x(()=>{if(!H.value)return;if(W.value.firefox){U.value=12;return}let{offsetWidth:e,clientWidth:t}=H.value;U.value=Math.max(0,e-t)}),f.autoGrow&&x(()=>{if(!Y.value||!B.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(B.value.$el),n=parseFloat(e.getPropertyValue(`--v-field-padding-top`))+parseFloat(e.getPropertyValue(`--v-input-padding-top`))+parseFloat(e.getPropertyValue(`--v-field-padding-bottom`)),r=Y.value.scrollHeight,i=parseFloat(e.lineHeight),a=Math.max(parseFloat(f.rows)*i+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),o=f.maxHeight?parseFloat(f.maxHeight):parseFloat(f.maxRows)*i+n||1/0,s=te(r??0,a,o);X.value=Math.floor((s-n)/i),V.value=g(s)})}k(Q),C(S,Q),C(()=>f.rows,Q),C(()=>f.maxHeight,Q),C(()=>f.maxRows,Q),C(()=>f.density,Q),C(X,e=>{y(`update:rows`,e)});let $;return C(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),u(()=>{$?.disconnect()}),a(()=>{let e=!!(b.counter||f.counter||f.counterValue),n=!!(e||b.details),[a,s]=M(h),{modelValue:l,...u}=w.filterProps(f),d={...p.filterProps(f),"onClick:clear":re};return i(w,D({ref:z,modelValue:S.value,"onUpdate:modelValue":e=>S.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":f.prefix,"v-textarea--suffixed":f.suffix,"v-text-field--prefixed":f.prefix,"v-text-field--suffixed":f.suffix,"v-textarea--auto-grow":f.autoGrow,"v-textarea--no-resize":f.noResize||f.autoGrow,"v-input--plain-underlined":Z.value},f.class],style:[{"--v-textarea-max-height":f.maxHeight?g(f.maxHeight):void 0,"--v-textarea-scroll-bar-width":g(U.value)},f.style]},a,u,{centerAffix:X.value===1&&!Z.value,focused:O.value,indentDetails:f.indentDetails??!Z.value}),{...b,default:({id:e,isDisabled:n,isDirty:a,isReadonly:l,isValid:u,hasDetails:m})=>i(p,D({ref:B,style:{"--v-textarea-control-height":V.value},onClick:J,onMousedown:ne,"onClick:prependInner":f[`onClick:prependInner`],"onClick:appendInner":f[`onClick:appendInner`]},d,{id:e.value,active:K.value||a.value,labelId:`${e.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:a.value||f.dirty,disabled:n.value,focused:O.value,details:m.value,error:u.value===!1}),{...b,default:({props:{class:i,...a},controlRef:u})=>t(o,null,[f.prefix&&t(`span`,{class:`v-text-field__prefix`},[f.prefix]),c(t(`textarea`,D({ref:e=>H.value=u.value=e,class:i,value:S.value,onInput:ie,autofocus:f.autofocus,readonly:l.value,disabled:n.value,placeholder:f.placeholder,rows:f.rows,name:G.fieldName.value,autocomplete:G.fieldAutocomplete.value,onFocus:q,onBlur:F,"aria-labelledby":`${e.value}-label`},a,s),null),[[v,{handler:I},null,{once:!0}]]),f.autoGrow&&c(t(`textarea`,{class:r([i,`v-textarea__sizer`]),id:`${a.id}-sizer`,"onUpdate:modelValue":e=>S.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[N,S.value]]),f.suffix&&t(`span`,{class:`v-text-field__suffix`},[f.suffix])])}),details:n?n=>t(o,null,[b.details?.(n),e&&t(o,null,[t(`span`,null,null),i(ee,{active:f.persistentCounter||O.value,value:L.value,max:R.value,disabled:f.disabled},b.counter)])]):void 0})}),A({},z,B,H)}});export{F as t}; |