Files
Nexus/web/app/assets/VTextarea-4LBcZFmE.js
T
Your Name 51948469c2 build(frontend): track Vite output in Git for Gitea deploy
- 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>
2026-06-03 00:52:44 +08:00

1 line
5.1 KiB
JavaScript

import{Dr as e,Fr as t,Hn as n,Jn as r,Kn as i,Or as a,Pn as o,Qt as s,Sn as c,Yn as l,Yt as u,_n as d,a as f,cr as p,d as m,dn as h,f as g,g as _,ht as v,i as y,mn as b,o as x,or as S,p as ee,r as te,s as C,sn as w,sr as T,tn as E,tr as D,ur as O,v as k,vn as A,vr as j,xr as M,yr as N}from"./index-D6kmN0iw.js";var P=h({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(),...o(C(),[`direction`]),...g()},`VTextarea`),F=w()({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(o,{attrs:h,emit:g,slots:y}){let C=s(o,`modelValue`),{isFocused:w,focus:P,blur:F}=ee(o),{onIntersect:I}=te(o),L=r(()=>typeof o.counterValue==`function`?o.counterValue(C.value):(C.value||``).toString().length),R=r(()=>{if(h.maxlength)return h.maxlength;if(!(!o.counter||typeof o.counter!=`number`&&typeof o.counter!=`string`))return o.counter}),z=e(),B=e(),V=a(``),H=e(),U=e(0),{platform:W}=u(),G=f(o),K=r(()=>o.persistentPlaceholder||w.value||o.active);function q(){G.isSuppressing.value&&G.update(),H.value!==document.activeElement&&H.value?.focus(),w.value||P()}function J(e){q(),g(`click:control`,e)}function ne(e){g(`mousedown:control`,e)}function re(e){e.stopPropagation(),q(),T(()=>{C.value=``,b(o[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!o.modelModifiers?.trim){C.value=t.value;return}let n=t.value,r=t.selectionStart,i=t.selectionEnd;C.value=n,T(()=>{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=e(),X=e(Number(o.rows)),Z=r(()=>[`plain`,`underlined`].includes(o.variant));N(()=>{o.autoGrow||(X.value=Number(o.rows))});function Q(){T(()=>{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)}),o.autoGrow&&T(()=>{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(o.rows)*i+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=o.maxHeight?parseFloat(o.maxHeight):parseFloat(o.maxRows)*i+n||1/0,c=d(r??0,a,s);X.value=Math.floor((c-n)/i),V.value=A(c)})}O(Q),j(C,Q),j(()=>o.rows,Q),j(()=>o.maxHeight,Q),j(()=>o.maxRows,Q),j(()=>o.density,Q),j(X,e=>{g(`update:rows`,e)});let $;return j(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),p(()=>{$?.disconnect()}),E(()=>{let e=!!(y.counter||o.counter||o.counterValue),r=!!(e||y.details),[a,s]=c(h),{modelValue:u,...d}=x.filterProps(o),f={...m.filterProps(o),"onClick:clear":re};return D(x,S({ref:z,modelValue:C.value,"onUpdate:modelValue":e=>C.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":o.prefix,"v-textarea--suffixed":o.suffix,"v-text-field--prefixed":o.prefix,"v-text-field--suffixed":o.suffix,"v-textarea--auto-grow":o.autoGrow,"v-textarea--no-resize":o.noResize||o.autoGrow,"v-input--plain-underlined":Z.value},o.class],style:[{"--v-textarea-max-height":o.maxHeight?A(o.maxHeight):void 0,"--v-textarea-scroll-bar-width":A(U.value)},o.style]},a,d,{centerAffix:X.value===1&&!Z.value,focused:w.value,indentDetails:o.indentDetails??!Z.value}),{...y,default:({id:e,isDisabled:r,isDirty:a,isReadonly:c,isValid:u,hasDetails:d})=>D(m,S({ref:B,style:{"--v-textarea-control-height":V.value},onClick:J,onMousedown:ne,"onClick:prependInner":o[`onClick:prependInner`],"onClick:appendInner":o[`onClick:appendInner`]},f,{id:e.value,active:K.value||a.value,labelId:`${e.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:a.value||o.dirty,disabled:r.value,focused:w.value,details:d.value,error:u.value===!1}),{...y,default:({props:{class:a,...u},controlRef:d})=>l(i,null,[o.prefix&&l(`span`,{class:`v-text-field__prefix`},[o.prefix]),M(l(`textarea`,S({ref:e=>H.value=d.value=e,class:a,value:C.value,onInput:ie,autofocus:o.autofocus,readonly:c.value,disabled:r.value,placeholder:o.placeholder,rows:o.rows,name:G.fieldName.value,autocomplete:G.fieldAutocomplete.value,onFocus:q,onBlur:F,"aria-labelledby":`${e.value}-label`},u,s),null),[[v,{handler:I},null,{once:!0}]]),o.autoGrow&&M(l(`textarea`,{class:t([a,`v-textarea__sizer`]),id:`${u.id}-sizer`,"onUpdate:modelValue":e=>C.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[n,C.value]]),o.suffix&&l(`span`,{class:`v-text-field__suffix`},[o.suffix])])}),details:r?t=>l(i,null,[y.details?.(t),e&&l(i,null,[l(`span`,null,null),D(_,{active:o.persistentCounter||w.value,value:L.value,max:R.value,disabled:o.disabled},y.counter)])]):void 0})}),k({},z,B,H)}});export{F as t};