PageSourceSearch

https://surn-wrdler.hf.space/static/js/index.DYKCsDvl.js

js surn-wrdler.hf.space collected 2026-10-03 10:23:57 UTC 3,281 bytes, 1 lines download raw bytes

1import{m as W,aA as _,x as q,r as i,f as G,g as K,aa as H,l as $,j as u,ab as M,T as N,P as J,ac as Q,ae as X}from"./index.CqTPbV5Y.js";import{I as Y}from"./InputInstructions.2R3tBtW9.js";import{u as Z}from"./useBasicWidgetState.DA3_qaXD.js";import{u as tt,a as et,b as ot}from"./useUpdateUiValue.DOxWBNiI.js";import{u as at,T as it}from"./useTextInputAutoExpand.ytEW5QmA.js";import{u as st}from"./uniqueId.B27POWT6.js";import"./FormClearHelper.-9RbsnV0.js";import"./inputUtils.CptNuJwn.js";import"./base-input.BXTqYbyG.js";const rt=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===_.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},lt=q("div",{target:"e1r0q00f0"})({height:"100%",display:"flex",flexDirection:"column"}),S=(e,t)=>e.getStringValue(t)??t.default??null,nt=e=>e.default??null,dt=e=>e.value??null,ut=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ct=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(st("text_area_")).current,{width:y,elementRef:I}=G(),[r,g]=i.useState(!1),[V,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,A=l.heightConfig?.useStretch??!1,v=rt(l,t),C=i.useRef(null),[d,p]=i.useState(()=>S(a,t)??null),F=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Z({getStateFromWidgetMgr:S,getDefaultStateFromProto:nt,getCurrStateFromProto:dt,updateWidgetMgrState:ut,element:t,widgetMgr:a,fragmentId:s,onFormCleared:F});tt(R,d,p,r);const o=K(),{height:L,maxHeight:P,updateScrollHeight:T}=at({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),k=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),z=i.useCallback(()=>{x(!0)},[]),B=i.useCallback(()=>{n&&T()},[n,T]),D=et({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:B}),E=ot(t.formId,m,r,a,s,!0),{placeholder:U,formId:b}=t,j=H({formId:b})?a.allowFormEnterToSubmit(b):r,w=V&&y>o.breakpoints.hideWidgetDetails;return $(lt,{className:"stTextArea","data-testid":"stTextArea",ref:I,children:[u(Q,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&u(M,{children:u(N,{content:t.help,placement:J.TOP_RIGHT})})}),u(it,{inputRef:n?C:void 0,value:d??"",placeholder:U,onBlur:k,onFocus:z,onChange:D,onKeyDown:E,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?L:v,maxHeight:n?P:"",minHeight:o.sizes.largestElementHeight,resize:A?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:O})=>{const c=X(o.colors,O);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c,flexGrow:1}}}}}),w&&u(Y,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:H({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ct);export{Ht as default};

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.