Files
Nexus/web/app/assets/VTextarea-B9RF5b0r.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{$n as e,Gn as t,Jt as n,Kn as r,Nn as i,Sr as a,Vn as o,Zt as s,_n as c,a as l,ar as u,cr as d,d as f,en as p,f as m,g as h,gn as g,gr as _,gt as v,hr as y,i as b,ir as x,kr as S,o as C,on as w,or as ee,p as te,pn as ne,qn as T,r as re,s as E,un as D,vr as O,xn as k,xr as A,y as j}from"./index-CyY9hglL.js";var M=D({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,...b(),...i(E(),[`direction`]),...m()},`VTextarea`),N=w()({name:`VTextarea`,directives:{vIntersect:v},inheritAttrs:!1,props:M(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(i,{attrs:m,emit:b,slots:w}){let E=s(i,`modelValue`),{isFocused:D,focus:M,blur:N}=te(i),{onIntersect:P}=re(i),F=r(()=>typeof i.counterValue==`function`?i.counterValue(E.value):(E.value||``).toString().length),I=r(()=>{if(m.maxlength)return m.maxlength;if(!(!i.counter||typeof i.counter!=`number`&&typeof i.counter!=`string`))return i.counter}),L=A(),R=A(),z=a(``),B=A(),V=A(0),{platform:H}=n(),U=l(i),W=r(()=>i.persistentPlaceholder||D.value||i.active);function G(){U.isSuppressing.value&&U.update(),B.value!==document.activeElement&&B.value?.focus(),D.value||M()}function K(e){G(),b(`click:control`,e)}function q(e){b(`mousedown:control`,e)}function J(e){e.stopPropagation(),G(),u(()=>{E.value=``,ne(i[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!i.modelModifiers?.trim){E.value=t.value;return}let n=t.value,r=t.selectionStart,a=t.selectionEnd;E.value=n,u(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),a!=null&&(t.selectionEnd=a-e)})}let Y=A(),X=A(Number(i.rows)),Z=r(()=>[`plain`,`underlined`].includes(i.variant));_(()=>{i.autoGrow||(X.value=Number(i.rows))});function Q(){u(()=>{if(!B.value)return;if(H.value.firefox){V.value=12;return}let{offsetWidth:e,clientWidth:t}=B.value;V.value=Math.max(0,e-t)}),i.autoGrow&&u(()=>{if(!Y.value||!R.value)return;let e=getComputedStyle(Y.value),t=getComputedStyle(R.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,a=parseFloat(e.lineHeight),o=Math.max(parseFloat(i.rows)*a+n,parseFloat(t.getPropertyValue(`--v-input-control-height`))),s=i.maxHeight?parseFloat(i.maxHeight):parseFloat(i.maxRows)*a+n||1/0,l=g(r??0,o,s);X.value=Math.floor((l-n)/a),z.value=c(l)})}d(Q),y(E,Q),y(()=>i.rows,Q),y(()=>i.maxHeight,Q),y(()=>i.maxRows,Q),y(()=>i.density,Q),y(X,e=>{b(`update:rows`,e)});let $;return y(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),ee(()=>{$?.disconnect()}),p(()=>{let n=!!(w.counter||i.counter||i.counterValue),r=!!(n||w.details),[a,s]=k(m),{modelValue:l,...u}=C.filterProps(i),d={...f.filterProps(i),"onClick:clear":J};return e(C,x({ref:L,modelValue:E.value,"onUpdate:modelValue":e=>E.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":i.prefix,"v-textarea--suffixed":i.suffix,"v-text-field--prefixed":i.prefix,"v-text-field--suffixed":i.suffix,"v-textarea--auto-grow":i.autoGrow,"v-textarea--no-resize":i.noResize||i.autoGrow,"v-input--plain-underlined":Z.value},i.class],style:[{"--v-textarea-max-height":i.maxHeight?c(i.maxHeight):void 0,"--v-textarea-scroll-bar-width":c(V.value)},i.style]},a,u,{centerAffix:X.value===1&&!Z.value,focused:D.value,indentDetails:i.indentDetails??!Z.value}),{...w,default:({id:n,isDisabled:r,isDirty:a,isReadonly:c,isValid:l,hasDetails:u})=>e(f,x({ref:R,style:{"--v-textarea-control-height":z.value},onClick:K,onMousedown:q,"onClick:prependInner":i[`onClick:prependInner`],"onClick:appendInner":i[`onClick:appendInner`]},d,{id:n.value,active:W.value||a.value,labelId:`${n.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:a.value||i.dirty,disabled:r.value,focused:D.value,details:u.value,error:l.value===!1}),{...w,default:({props:{class:e,...a},controlRef:l})=>T(t,null,[i.prefix&&T(`span`,{class:`v-text-field__prefix`},[i.prefix]),O(T(`textarea`,x({ref:e=>B.value=l.value=e,class:e,value:E.value,onInput:ie,autofocus:i.autofocus,readonly:c.value,disabled:r.value,placeholder:i.placeholder,rows:i.rows,name:U.fieldName.value,autocomplete:U.fieldAutocomplete.value,onFocus:G,onBlur:N,"aria-labelledby":`${n.value}-label`},a,s),null),[[v,{handler:P},null,{once:!0}]]),i.autoGrow&&O(T(`textarea`,{class:S([e,`v-textarea__sizer`]),id:`${a.id}-sizer`,"onUpdate:modelValue":e=>E.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[o,E.value]]),i.suffix&&T(`span`,{class:`v-text-field__suffix`},[i.suffix])])}),details:r?r=>T(t,null,[w.details?.(r),n&&T(t,null,[T(`span`,null,null),e(h,{active:i.persistentCounter||D.value,value:F.value,max:I.value,disabled:i.disabled},w.counter)])]):void 0})}),j({},L,R,B)}});export{N as t};