"use strict";(self.webpackChunkreact_typescript_webpack=self.webpackChunkreact_typescript_webpack||[]).push([[4944],{44944:(e,t,n)=>{n.d(t,{A:()=>c});var I=n(50394),r=n(39248),o=n(49587),i=n(17437),P=n(92921),A=n(92479),D=n(2445);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H={container:function(e){return(0,i.AH)("position:relative;display:flex;& input{",o.I.body(),";}",((null==e?void 0:e.rightInput)||(null==e?void 0:e.leftInput))&&(0,i.AH)(":focus-within{box-shadow:",r.r7.inputFocus,";border-radius:",r.Vq[5],";z-index:",r.fE.header,";input{border-radius:",r.Vq[5],";}};label:container;")," ",!(null!=e&&e.rightInput||null!=e&&e.leftInput)&&(0,i.AH)(":focus-within{box-shadow:",r.r7.inputFocus,";border-radius:",r.Vq[5],";};label:container;"),";;label:container;")},clearButton:(0,i.AH)("position:absolute;right:",r.YK[4],";top:",r.YK[6],";width:26px;height:26px;border-radius:",r.Vq[2],";background:'transparent';&:hover{background:",r.nm.surface.hover,";};label:clearButton;")};const c=function(e){var t,n,r=e.label,o=e.type,i=void 0===o?"text":o,l=e.maxLimit,a=e.field,u=e.fieldState,c=e.disabled,p=e.readOnly,d=e.loading,b=e.placeholder,s=e.helpText,f=e.onChange,y=e.onBlur,h=e.onKeyDown,v=e.isHidden,g=e.isClearable,m=void 0!==g&&g,O=e.selectOnClick,w=void 0!==O&&O,j=e.tabIndex,k=void 0===j?-1:j,x=e.customInput,C=void 0===x?{rightInput:!1,leftInput:!1}:x,S=null!==(t=a.value)&&void 0!==t?t:"";return"number"===i&&(S="".concat(S).replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1")),l&&(n={maxLimit:l,inputCharacter:S.toString().length}),(0,D.Y)(A.A,{label:r,field:a,fieldState:u,disabled:c,readOnly:p,loading:d,placeholder:b,helpText:s,isHidden:v,characterCount:n,customInput:C,children:function(e){return(0,D.Y)(D.FK,{children:(0,D.FD)("div",{css:H.container(C),children:[(0,D.Y)("input",Y(Y(Y({},a),e),{},{type:"text",value:S,tabIndex:k,disabled:c||d,onChange:function(e){var t=e.target.value,n="number"===i?t.replace(/[^0-9.]/g,"").replace(/(\..*)\./g,"$1"):t;a.onChange(n),f&&f(n)},onKeyDown:function(e){h&&h(e.key)},onBlur:function(e){y&&y(e.target.value)},autoComplete:"off",onClick:function(e){w?e.currentTarget.select():e.preventDefault()}})),m&&!!a.value&&(0,D.Y)("div",{css:H.clearButton,children:(0,D.Y)(I.Ay,{variant:I.Ak.plain,onClick:function(){return a.onChange(null)},children:(0,D.Y)(P.A,{name:"times"})})})]})})}})}}}]);