(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2264],{68976:t=>{t.exports={button:"button-D4RPB3ZC",content:"content-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",link:"link-D4RPB3ZC",brand:"brand-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC","black-friday":"black-friday-D4RPB3ZC","cyber-monday":"cyber-monday-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",startIconWrap:"startIconWrap-D4RPB3ZC",endIconWrap:"endIconWrap-D4RPB3ZC",withStartIcon:"withStartIcon-D4RPB3ZC",withEndIcon:"withEndIcon-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",animated:"animated-D4RPB3ZC",stretch:"stretch-D4RPB3ZC",grouped:"grouped-D4RPB3ZC",adjustPosition:"adjustPosition-D4RPB3ZC",firstRow:"firstRow-D4RPB3ZC",firstCol:"firstCol-D4RPB3ZC","no-corner-top-left":"no-corner-top-left-D4RPB3ZC","no-corner-top-right":"no-corner-top-right-D4RPB3ZC","no-corner-bottom-right":"no-corner-bottom-right-D4RPB3ZC","no-corner-bottom-left":"no-corner-bottom-left-D4RPB3ZC",textWrap:"textWrap-D4RPB3ZC",multilineContent:"multilineContent-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC",primaryText:"primaryText-D4RPB3ZC"}},74581:t=>{t.exports={container:"container-WDZ0PRNh","container-xxsmall":"container-xxsmall-WDZ0PRNh","container-xsmall":"container-xsmall-WDZ0PRNh","container-small":"container-small-WDZ0PRNh","container-medium":"container-medium-WDZ0PRNh","container-large":"container-large-WDZ0PRNh","intent-default":"intent-default-WDZ0PRNh",focused:"focused-WDZ0PRNh",readonly:"readonly-WDZ0PRNh",disabled:"disabled-WDZ0PRNh","with-highlight":"with-highlight-WDZ0PRNh",grouped:"grouped-WDZ0PRNh","adjust-position":"adjust-position-WDZ0PRNh","first-row":"first-row-WDZ0PRNh","first-col":"first-col-WDZ0PRNh",stretch:"stretch-WDZ0PRNh","font-size-medium":"font-size-medium-WDZ0PRNh","font-size-large":"font-size-large-WDZ0PRNh","no-corner-top-left":"no-corner-top-left-WDZ0PRNh","no-corner-top-right":"no-corner-top-right-WDZ0PRNh","no-corner-bottom-right":"no-corner-bottom-right-WDZ0PRNh","no-corner-bottom-left":"no-corner-bottom-left-WDZ0PRNh","size-xxsmall":"size-xxsmall-WDZ0PRNh","size-xsmall":"size-xsmall-WDZ0PRNh","size-small":"size-small-WDZ0PRNh","size-medium":"size-medium-WDZ0PRNh","size-large":"size-large-WDZ0PRNh","intent-success":"intent-success-WDZ0PRNh","intent-warning":"intent-warning-WDZ0PRNh","intent-danger":"intent-danger-WDZ0PRNh","intent-primary":"intent-primary-WDZ0PRNh","border-none":"border-none-WDZ0PRNh","border-thin":"border-thin-WDZ0PRNh","border-thick":"border-thick-WDZ0PRNh",highlight:"highlight-WDZ0PRNh",shown:"shown-WDZ0PRNh"}},81329:t=>{t.exports={"inner-slot":"inner-slot-W53jtLjw",interactive:"interactive-W53jtLjw",icon:"icon-W53jtLjw","inner-middle-slot":"inner-middle-slot-W53jtLjw","before-slot":"before-slot-W53jtLjw","after-slot":"after-slot-W53jtLjw"}},55315:t=>{t.exports={input:"input-RUSovanF","size-xxsmall":"size-xxsmall-RUSovanF",
"size-xsmall":"size-xsmall-RUSovanF","size-small":"size-small-RUSovanF","size-medium":"size-medium-RUSovanF","size-large":"size-large-RUSovanF","with-start-slot":"with-start-slot-RUSovanF","with-end-slot":"with-end-slot-RUSovanF"}},60903:t=>{t.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},1255:t=>{t.exports={errors:"errors-UKx97h9K",show:"show-UKx97h9K",error:"error-UKx97h9K","visually-hidden":"visually-hidden-UKx97h9K"}},84847:t=>{t.exports={"error-icon":"error-icon-UhKAouIg","intent-danger":"intent-danger-UhKAouIg","intent-warning":"intent-warning-UhKAouIg"}},3378:t=>{t.exports={"static-messages":"static-messages-cF4vS9J8",errors:"errors-cF4vS9J8",warnings:"warnings-cF4vS9J8","success-mesages":"success-mesages-cF4vS9J8","input-description":"input-description-cF4vS9J8",message:"message-cF4vS9J8"}},94720:(t,e,n)=>{"use strict";var r,o,s;function a(t="default"){switch(t){case"default":return"primary";case"stroke":return"secondary"}}function i(t="primary"){switch(t){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function l(t="m"){switch(t){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}n.d(e,{Button:()=>D}),function(t){t.Primary="primary",t.Success="success",t.Default="default",t.Danger="danger"}(r||(r={})),function(t){t.Small="s",t.Medium="m",t.Large="l"}(o||(o={})),function(t){t.Default="default",t.Stroke="stroke"}(s||(s={}));var c=n(50959),u=n(97754),h=n(95604),d=n(9745),m=n(68976),p=n.n(m);const g="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function f(t){const{color:e="brand",size:n="medium",variant:r="primary",stretch:o=!1,icon:s,startIcon:a,endIcon:i,iconOnly:l=!1,className:c,isGrouped:d,cellState:m,disablePositionAdjustment:f=!1,primaryText:b,secondaryText:v,isAnchor:R=!1}=t,w=function(t){let e="";return 0!==t&&(1&t&&(e=u(e,p()["no-corner-top-left"])),2&t&&(e=u(e,p()["no-corner-top-right"])),4&t&&(e=u(e,p()["no-corner-bottom-right"])),8&t&&(e=u(e,p()["no-corner-bottom-left"]))),e}((0,h.getGroupCellRemoveRoundBorders)(m));return u(c,p().button,p()[n],p()[e],p()[r],o&&p().stretch,(s||a)&&p().withStartIcon,i&&p().withEndIcon,l&&p().iconOnly,w,d&&p().grouped,d&&!f&&p().adjustPosition,d&&m.isTop&&p().firstRow,d&&m.isLeft&&p().firstCol,b&&v&&p().multilineContent,R&&p().link,g)}function b(t){const{startIcon:e,icon:n,iconOnly:r,children:o,endIcon:s,primaryText:a,secondaryText:i}=t,l=null!=e?e:n,h=!(e||n||s||r)&&!o&&a&&i;return c.createElement(c.Fragment,null,l&&c.createElement(d.Icon,{icon:l,className:p().startIconWrap}),o&&c.createElement("span",{className:p().content},o),s&&!r&&c.createElement(d.Icon,{icon:s,className:p().endIconWrap}),h&&function(t){return t.primaryText&&t.secondaryText&&c.createElement("div",{className:u(p().textWrap,g)},c.createElement("span",{className:p().primaryText
}," ",t.primaryText," "),"string"==typeof t.secondaryText?c.createElement("span",{className:p().secondaryText}," ",t.secondaryText," "):c.createElement("span",{className:p().secondaryText},c.createElement("span",null,t.secondaryText.firstLine),c.createElement("span",null,t.secondaryText.secondLine)))}(t))}var v=n(34094),R=n(86332),w=n(90186);function C(t){const{className:e,color:n,variant:r,size:o,stretch:s,animated:a,icon:i,iconOnly:l,startIcon:c,endIcon:u,primaryText:h,secondaryText:d,...m}=t;return{...m,...(0,w.filterDataProps)(t),...(0,w.filterAriaProps)(t)}}function P(t){const{reference:e,tooltipText:n,...r}=t,{isGrouped:o,cellState:s,disablePositionAdjustment:a}=(0,c.useContext)(R.ControlGroupContext),i=f({...r,isGrouped:o,cellState:s,disablePositionAdjustment:a});return c.createElement("button",{...C(r),className:i,ref:e,"data-overflow-tooltip-text":null!=n?n:t.primaryText?[t.primaryText,t.secondaryText].join(" "):(0,v.getTextForTooltip)(t.children)},c.createElement(b,{...r}))}n(78572);function y(t){const{intent:e,size:n,appearance:r,useFullWidth:o,icon:s,...c}=t;return{...c,color:i(e),size:l(n),variant:a(r),stretch:o,startIcon:s}}function D(t){return c.createElement(P,{...y(t)})}},95604:(t,e,n)=>{"use strict";function r(t){let e=0;return t.isTop&&t.isLeft||(e+=1),t.isTop&&t.isRight||(e+=2),t.isBottom&&t.isLeft||(e+=8),t.isBottom&&t.isRight||(e+=4),e}n.d(e,{getGroupCellRemoveRoundBorders:()=>r})},67029:(t,e,n)=>{"use strict";n.d(e,{ControlSkeleton:()=>v,InputClasses:()=>g});var r=n(50959),o=n(97754),s=n(50151),a=n(38528),i=n(90186),l=n(86332),c=n(95604);var u=n(74581),h=n.n(u);function d(t){let e="";return 0!==t&&(1&t&&(e=o(e,h()["no-corner-top-left"])),2&t&&(e=o(e,h()["no-corner-top-right"])),4&t&&(e=o(e,h()["no-corner-bottom-right"])),8&t&&(e=o(e,h()["no-corner-bottom-left"]))),e}function m(t,e,n,r){const{removeRoundBorder:s,className:a,intent:i="default",borderStyle:l="thin",size:u,highlight:m,disabled:p,readonly:g,stretch:f,noReadonlyStyles:b,isFocused:v}=t,R=d(null!=s?s:(0,c.getGroupCellRemoveRoundBorders)(n));return o(h().container,h()[`container-${u}`],h()[`intent-${i}`],h()[`border-${l}`],u&&h()[`size-${u}`],R,m&&h()["with-highlight"],p&&h().disabled,g&&!b&&h().readonly,v&&h().focused,f&&h().stretch,e&&h().grouped,!r&&h()["adjust-position"],n.isTop&&h()["first-row"],n.isLeft&&h()["first-col"],a)}function p(t,e,n){const{highlight:r,highlightRemoveRoundBorder:s}=t;if(!r)return h().highlight;const a=d(null!=s?s:(0,c.getGroupCellRemoveRoundBorders)(e));return o(h().highlight,h().shown,h()[`size-${n}`],a)}const g={FontSizeMedium:(0,s.ensureDefined)(h()["font-size-medium"]),FontSizeLarge:(0,s.ensureDefined)(h()["font-size-large"])},f={passive:!1};function b(t,e){const{style:n,id:o,role:s,onFocus:c,onBlur:u,onMouseOver:h,onMouseOut:d,onMouseDown:g,onMouseUp:b,onKeyDown:v,onClick:R,tabIndex:w,startSlot:C,middleSlot:P,endSlot:y,onWheel:D,onWheelNoPassive:x=null,size:E}=t,{isGrouped:S,cellState:B,disablePositionAdjustment:W=!1}=(0,r.useContext)(l.ControlGroupContext),N=function(t,e=null,n){const o=(0,
r.useRef)(null),s=(0,r.useRef)(null),a=(0,r.useCallback)((()=>{if(null===o.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&o.current.addEventListener(t,e,n)}),[]),i=(0,r.useCallback)((()=>{if(null===o.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&o.current.removeEventListener(t,e,n)}),[]),l=(0,r.useCallback)((t=>{i(),o.current=t,a()}),[]);return(0,r.useEffect)((()=>(s.current=[t,e,n],a(),i)),[t,e,n]),l}("wheel",x,f);return r.createElement("span",{style:n,id:o,role:s,className:m(t,S,B,W),tabIndex:w,ref:(0,a.useMergedRefs)([e,N]),onFocus:c,onBlur:u,onMouseOver:h,onMouseOut:d,onMouseDown:g,onMouseUp:b,onKeyDown:v,onClick:R,onWheel:D,...(0,i.filterDataProps)(t),...(0,i.filterAriaProps)(t)},C,P,y,r.createElement("span",{className:p(t,B,E)}))}b.displayName="ControlSkeleton";const v=r.forwardRef(b)},78274:(t,e,n)=>{"use strict";n.d(e,{AfterSlot:()=>u,EndSlot:()=>c,MiddleSlot:()=>l,StartSlot:()=>i});var r=n(50959),o=n(97754),s=n(81329),a=n.n(s);function i(t){const{className:e,interactive:n=!0,icon:s=!1,children:i}=t;return r.createElement("span",{className:o(a()["inner-slot"],n&&a().interactive,s&&a().icon,e)},i)}function l(t){const{className:e,children:n}=t;return r.createElement("span",{className:o(a()["inner-slot"],a()["inner-middle-slot"],e)},n)}function c(t){const{className:e,interactive:n=!0,icon:s=!1,children:i}=t;return r.createElement("span",{className:o(a()["inner-slot"],n&&a().interactive,s&&a().icon,e)},i)}function u(t){const{className:e,children:n}=t;return r.createElement("span",{className:o(a()["after-slot"],e)},n)}},31261:(t,e,n)=>{"use strict";n.d(e,{InputControl:()=>v});var r=n(50959),o=n(97754),s=n(90186),a=n(47201),i=n(48907),l=n(38528),c=n(48027),u=n(29202),h=n(45812),d=n(67029),m=n(78274),p=n(55315),g=n.n(p);function f(t){return!(0,s.isAriaAttribute)(t)&&!(0,s.isDataAttribute)(t)}function b(t){const{id:e,title:n,role:a,tabIndex:i,placeholder:l,name:c,type:u,value:h,defaultValue:p,draggable:b,autoComplete:v,autoFocus:R,maxLength:w,min:C,max:P,step:y,pattern:D,inputMode:x,onSelect:E,onFocus:S,onBlur:B,onKeyDown:W,onKeyUp:N,onKeyPress:M,onChange:Z,onDragStart:A,size:I="small",className:F,inputClassName:k,disabled:T,readonly:z,containerTabIndex:_,startSlot:O,endSlot:L,reference:j,containerReference:K,onContainerFocus:U,...H}=t,G=(0,s.filterProps)(H,f),Y={...(0,s.filterAriaProps)(H),...(0,s.filterDataProps)(H),id:e,title:n,role:a,tabIndex:i,placeholder:l,name:c,type:u,value:h,defaultValue:p,draggable:b,autoComplete:v,autoFocus:R,maxLength:w,min:C,max:P,step:y,pattern:D,inputMode:x,onSelect:E,onFocus:S,onBlur:B,onKeyDown:W,onKeyUp:N,onKeyPress:M,onChange:Z,onDragStart:A};return r.createElement(d.ControlSkeleton,{...G,disabled:T,readonly:z,tabIndex:_,className:o(g().container,F),size:I,ref:K,onFocus:U,startSlot:O,middleSlot:r.createElement(m.MiddleSlot,null,r.createElement("input",{...Y,className:o(g().input,g()[`size-${I}`],k,O&&g()["with-start-slot"],L&&g()["with-end-slot"]),disabled:T,readOnly:z,ref:j})),endSlot:L})}function v(t){t=(0,c.useControl)(t)
;const{disabled:e,autoSelectOnFocus:n,tabIndex:o=0,onFocus:s,onBlur:d,reference:m,containerReference:p=null}=t,g=(0,r.useRef)(null),f=(0,r.useRef)(null),[v,R]=(0,u.useFocus)(),w=e?void 0:v?-1:o,C=e?void 0:v?o:-1,{isMouseDown:P,handleMouseDown:y,handleMouseUp:D}=(0,h.useIsMouseDown)(),x=(0,a.createSafeMulticastEventHandler)(R.onFocus,(function(t){n&&!P.current&&(0,i.selectAllContent)(t.currentTarget)}),s),E=(0,a.createSafeMulticastEventHandler)(R.onBlur,d),S=(0,r.useCallback)((t=>{g.current=t,m&&("function"==typeof m&&m(t),"object"==typeof m&&(m.current=t))}),[g,m]);return r.createElement(b,{...t,isFocused:v,containerTabIndex:w,tabIndex:C,onContainerFocus:function(t){f.current===t.target&&null!==g.current&&g.current.focus()},onFocus:x,onBlur:E,reference:S,containerReference:(0,l.useMergedRefs)([f,p]),onMouseDown:y,onMouseUp:D})}},48027:(t,e,n)=>{"use strict";n.d(e,{useControl:()=>s});var r=n(47201),o=n(29202);function s(t){const{onFocus:e,onBlur:n,intent:s,highlight:a,disabled:i}=t,[l,c]=(0,o.useFocus)(void 0,i),u=(0,r.createSafeMulticastEventHandler)(i?void 0:c.onFocus,e),h=(0,r.createSafeMulticastEventHandler)(i?void 0:c.onBlur,n);return{...t,intent:s||(l?"primary":"default"),highlight:null!=a?a:l,onFocus:u,onBlur:h}}},45812:(t,e,n)=>{"use strict";n.d(e,{useIsMouseDown:()=>o});var r=n(50959);function o(){const t=(0,r.useRef)(!1),e=(0,r.useCallback)((()=>{t.current=!0}),[t]),n=(0,r.useCallback)((()=>{t.current=!1}),[t]);return{isMouseDown:t,handleMouseDown:e,handleMouseUp:n}}},48907:(t,e,n)=>{"use strict";function r(t){null!==t&&t.setSelectionRange(0,t.value.length)}n.d(e,{selectAllContent:()=>r})},50182:(t,e,n)=>{"use strict";n.d(e,{AdaptiveConfirmDialog:()=>m});var r,o=n(50959),s=n(97754),a=n.n(s),i=n(94720),l=n(50151),c=n(11542),u=n(68335),h=n(79418),d=n(60903);!function(t){t.Submit="submit",t.Cancel="cancel",t.None="none"}(r||(r={}));class m extends o.PureComponent{constructor(){super(...arguments),this._dialogRef=o.createRef(),this._handleClose=()=>{const{defaultActionOnClose:t,onSubmit:e,onCancel:n,onClose:r}=this.props;switch(t){case"submit":e();break;case"cancel":n()}r()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=t=>{const{onSubmit:e,submitButtonDisabled:n,submitOnEnterKey:r}=this.props;13===(0,u.hashFromEvent)(t)&&r&&(t.preventDefault(),n||e())}}render(){const{render:t,onClose:e,onSubmit:n,onCancel:r,footerLeftRenderer:s,submitButtonText:a,submitButtonDisabled:i,defaultActionOnClose:l,submitOnEnterKey:c,...u}=this.props;return o.createElement(h.AdaptivePopupDialog,{...u,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,l.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return t=>{const{render:e,footerLeftRenderer:r,additionalButtons:s,submitButtonText:l,submitButtonDisabled:u,onSubmit:h,cancelButtonText:m,showCancelButton:p=!0,showSubmitButton:g=!0,submitButtonClassName:f,cancelButtonClassName:b,buttonsWrapperClassName:v}=this.props
;return o.createElement(o.Fragment,null,e(t),o.createElement("div",{className:d.footer},r&&r(t.isSmallWidth),o.createElement("div",{className:a()(d.buttons,v)},s,p&&o.createElement(i.Button,{className:b,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=m?m:c.t(null,void 0,n(4543))),g&&o.createElement("span",{className:d.submitButton},o.createElement(i.Button,{className:f,disabled:u,name:"submit",onClick:h,"data-name":"submit-button"},null!=l?l:c.t(null,void 0,n(19295)))))))}}}m.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},1405:(t,e,n)=>{"use strict";n.d(e,{anchors:()=>o});var r;n(50959);!function(t){t.Top="top",t.Bottom="bottom",t.TopRight="topRight"}(r||(r={}));const o={bottom:{attachment:{horizontal:"left",vertical:"top"},targetAttachment:{horizontal:"left",vertical:"bottom"}},top:{attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},topRight:{attachment:{horizontal:"right",vertical:"bottom"},targetAttachment:{horizontal:"right",vertical:"top"}},bottomRight:{attachment:{horizontal:"right",vertical:"top"},targetAttachment:{horizontal:"right",vertical:"bottom"}}}},86623:(t,e,n)=>{"use strict";n.d(e,{FormInput:()=>c});var r=n(50959),o=n(31261),s=n(1140),a=n(78274),i=n(47201),l=n(38528);function c(t){var e;const{intent:n,onFocus:c,onBlur:u,onMouseOver:h,onMouseOut:d,containerReference:m=null,endSlot:p,hasErrors:g,hasWarnings:f,hasSuccessMessages:b,errors:v,warnings:R,successMessages:w,alwaysShowAttachedErrors:C,iconHidden:P,messagesPosition:y,messagesAttachment:D,customErrorsAttachment:x,messagesRoot:E,inheritMessagesWidthFromTarget:S,disableMessagesRtlStyles:B,"aria-required":W,"aria-invalid":N,"aria-label":M,inputDescription:Z,...A}=t,I=(0,s.useControlValidationLayout)({hasErrors:g,hasWarnings:f,hasSuccessMessages:b,errors:v,warnings:R,successMessages:w,alwaysShowAttachedErrors:C,iconHidden:P,messagesPosition:y,messagesAttachment:D,customErrorsAttachment:x,messagesRoot:E,inheritMessagesWidthFromTarget:S,disableMessagesRtlStyles:B,inputDescription:Z}),F=(0,i.createSafeMulticastEventHandler)(c,I.onFocus),k=(0,i.createSafeMulticastEventHandler)(u,I.onBlur),T=(0,i.createSafeMulticastEventHandler)(h,I.onMouseOver),z=(0,i.createSafeMulticastEventHandler)(d,I.onMouseOut);return r.createElement(r.Fragment,null,r.createElement(o.InputControl,{...A,intent:null!==(e=I.intent)&&void 0!==e?e:n,onFocus:F,onBlur:k,onMouseOver:T,onMouseOut:z,containerReference:(0,l.useMergedRefs)([m,I.containerReference]),endSlot:r.createElement(r.Fragment,null,I.icon&&r.createElement(a.EndSlot,{icon:!0},I.icon),p),"aria-required":W,"aria-invalid":N,"aria-describedby":I.ariaIds,"aria-label":M}),I.renderedErrors)}},1140:(t,e,n)=>{"use strict";n.d(e,{MessagesPosition:()=>D,useControlValidationLayout:()=>A});var r=n(50959),o=n(97754);function s(t,e){(0,r.useEffect)((()=>(e&&e(t),()=>{e&&e(t)})),[])}var a=n(29202),i=n(70412),l=n(78274),c=n(1405),u=n(86431),h=n(32227);var d=n(1255),m=n(63273);class p extends r.PureComponent{render(){
const{children:t=[],show:e=!1,customErrorClass:n,disableRtlStyles:s,messageIdCallback:a}=this.props,i=o(d.errors,{[d.show]:e},n),l=t.map(((t,e)=>r.createElement(v,{key:e,messageIdCallback:a},t)));let c={position:"absolute",top:this.props.top,width:this.props.width,height:this.props.height,bottom:void 0!==this.props.bottom?this.props.bottom:"100%",right:void 0!==this.props.right?this.props.right:0,left:this.props.left,zIndex:this.props.zIndex,maxWidth:this.props.maxWidth};if((0,m.isRtl)()&&!s){const{left:t,right:e}=c;c={...c,left:e,right:t}}return r.createElement("div",{style:c,className:i},l)}}const g=(0,u.makeOverlapable)((f=p,(b=class extends r.PureComponent{constructor(t){super(t),this._getComponentInstance=t=>{this._instance=t},this._throttleCalcProps=()=>{requestAnimationFrame((()=>this.setState(this._calcProps(this.props))))},this.state=this._getStateFromProps()}componentDidMount(){this._instanceElem=h.findDOMNode(this._instance),this.props.attachOnce||this._subscribe(),this.setState(this._calcProps(this.props))}componentDidUpdate(t){t.children===this.props.children&&t.top===this.props.top&&t.left===this.props.left&&t.width===this.props.width||this.setState(this._getStateFromProps(),(()=>this.setState(this._calcProps(this.props))))}render(){return r.createElement("div",{style:{position:"absolute",width:"100%",top:0,left:0}},r.createElement(f,{...this.props,ref:this._getComponentInstance,top:this.state.top,bottom:void 0!==this.state.bottom?this.state.bottom:"auto",right:void 0!==this.state.right?this.state.right:"auto",left:this.state.left,width:this.state.width,maxWidth:this.state.maxWidth},this.props.children))}componentWillUnmount(){this._unsubsribe()}_getStateFromProps(){return{bottom:this.props.bottom,left:this.props.left,right:this.props.right,top:void 0!==this.props.top?this.props.top:-1e4,width:this.props.inheritWidthFromTarget?this.props.target&&this.props.target.getBoundingClientRect().width:this.props.width,maxWidth:this.props.inheritMaxWidthFromTarget&&this.props.target&&this.props.target.getBoundingClientRect().width}}_calcProps(t){if(t.target&&t.attachment&&t.targetAttachment){const e=this._calcTargetProps(t.target,t.attachment,t.targetAttachment);if(null===e)return{};const{width:n,inheritWidthFromTarget:r=!0,inheritMaxWidthFromTarget:o=!1}=this.props,s={width:r?e.width:n,maxWidth:o?e.width:void 0};switch(t.attachment.vertical){case"bottom":case"middle":s.top=e.y;break;default:s[t.attachment.vertical]=e.y}switch(t.attachment.horizontal){case"right":case"center":s.left=e.x;break;default:s[t.attachment.horizontal]=e.x}return s}return{}}_calcTargetProps(t,e,n){const r=t.getBoundingClientRect(),o=this._instanceElem.getBoundingClientRect(),s="parent"===this.props.root?this._getCoordsRelToParentEl(t,r):this._getCoordsRelToDocument(r);if(null===s)return null;const a=this._getDimensions(o),i=this._getDimensions(r).width;let l=0,c=0;switch(e.vertical){case"top":c=s[n.vertical];break;case"bottom":c=s[n.vertical]-a.height;break;case"middle":c=s[n.vertical]-a.height/2}switch(e.horizontal){case"left":
l=s[n.horizontal];break;case"right":l=s[n.horizontal]-a.width;break;case"center":l=s[n.horizontal]-a.width/2}return"number"==typeof this.props.attachmentOffsetY&&(c+=this.props.attachmentOffsetY),"number"==typeof this.props.attachmentOffsetX&&(l+=this.props.attachmentOffsetX),{x:l,y:c,width:i}}_getCoordsRelToDocument(t){const e=pageYOffset,n=pageXOffset,r=t.top+e,o=t.bottom+e,s=t.left+n;return{top:r,bottom:o,left:s,right:t.right+n,middle:(r+t.height)/2,center:s+t.width/2}}_getCoordsRelToParentEl(t,e){const n=t.offsetParent;if(null===n)return null;const r=n.scrollTop,o=n.scrollLeft,s=t.offsetTop+r,a=t.offsetLeft+o,i=e.width+a;return{top:s,bottom:e.height+s,left:a,right:i,middle:(s+e.height)/2,center:(a+e.width)/2}}_getDimensions(t){return{height:t.height,width:t.width}}_subscribe(){"document"===this.props.root&&(window.addEventListener("scroll",this._throttleCalcProps,!0),window.addEventListener("resize",this._throttleCalcProps))}_unsubsribe(){window.removeEventListener("scroll",this._throttleCalcProps,!0),window.removeEventListener("resize",this._throttleCalcProps)}}).displayName="Attachable Component",b));var f,b;function v(t){const{children:e,messageIdCallback:n,...o}=t;return r.createElement("div",{...o,className:d.error},e)}function R(t){const{children:e,messageIdCallback:n,...o}=t,a=r.useId();return s(a,n),r.createElement("span",{...o,className:d["visually-hidden"],id:a},e)}var w=n(9745),C=n(16658),P=n(84847);function y(t){const{intent:e="danger"}=t;return r.createElement(w.Icon,{icon:C,className:o(P["error-icon"],P[`intent-${e}`])})}var D,x,E=n(3378);!function(t){t[t.Attached=0]="Attached",t[t.Static=1]="Static",t[t.Hidden=2]="Hidden"}(D||(D={})),function(t){t.Top="top",t.Bottom="bottom"}(x||(x={}));const S={top:{attachment:c.anchors.topRight.attachment,targetAttachment:c.anchors.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:c.anchors.bottomRight.attachment,targetAttachment:c.anchors.bottomRight.targetAttachment,attachmentOffsetY:4}};function B(t){const{isOpened:e,target:n,errorAttachment:o=x.Top,customErrorsAttachment:s,root:a="parent",inheritWidthFromTarget:i=!1,disableRtlStyles:l,children:c,messageIdCallback:u}=t,{attachment:h,targetAttachment:d,attachmentOffsetY:m}=null!=s?s:S[o];return r.createElement(r.Fragment,null,r.createElement(g,{isOpened:e,target:n,root:a,inheritWidthFromTarget:i,attachment:h,targetAttachment:d,attachmentOffsetY:m,disableRtlStyles:l,messageIdCallback:u,inheritMaxWidthFromTarget:!0,show:!0},c),r.createElement(R,{messageIdCallback:u},c))}function W(t,e){return Boolean(t)&&void 0!==e&&e.length>0}function N(t,e,n){return t===D.Attached&&W(e,n)}function M(t,e,n){return t===D.Static&&W(e,n)}function Z(t,e,n){const{hasErrors:r,hasWarnings:o,hasSuccessMessages:s,alwaysShowAttachedErrors:a,iconHidden:i,errors:l,warnings:c,successMessages:u,messagesPosition:h=D.Static}=t,d=N(h,r,l),m=N(h,o,c),p=d&&(e||n||Boolean(a)),g=!p&&m&&(e||n),f=M(h,r,l),b=!f&&M(h,o,c),v=!f&&!b&&M(h,s,u),R=!i&&Boolean(r),w=!i&&!R&&Boolean(o),C=function(t,e,n){
return Boolean(n)?"success":Boolean(t)?"danger":Boolean(e)?"warning":void 0}(r,o,s);return{hasAttachedErrorMessages:d,hasAttachedWarningMessages:m,showAttachedErrorMessages:p,showAttachedWarningMessages:g,showStaticErrorMessages:f,showStaticWarningMessages:b,showStaticSuccessMessages:v,showErrorIcon:R,showWarningIcon:w,intent:C}}function A(t){var e,n,s,c;const{errors:u,warnings:h,successMessages:d,messagesAttachment:m,customErrorsAttachment:p,messagesRoot:g,inheritMessagesWidthFromTarget:f,disableMessagesRtlStyles:b,inputDescription:v}=t,[R,w]=(0,a.useFocus)(),[C,P]=(0,i.useHover)(),D=(0,r.useRef)(null),[x,S]=r.useState(void 0),W=(0,r.useRef)(new Map),N=r.useCallback((t=>{if(!t)return;const e=W.current;e.has(t)?e.delete(t):e.set(t,t),0!==e.size?S(Array.from(e.keys()).join(" ")):S(void 0)}),[S,W.current]),{hasAttachedErrorMessages:M,hasAttachedWarningMessages:A,showAttachedErrorMessages:F,showAttachedWarningMessages:k,showStaticErrorMessages:T,showStaticWarningMessages:z,showStaticSuccessMessages:_,showErrorIcon:O,showWarningIcon:L,intent:j}=Z(t,R,C),K=O||L?r.createElement(y,{intent:O?"danger":"warning"}):void 0,U=M?r.createElement(B,{errorAttachment:m,customErrorsAttachment:p,isOpened:F,target:D.current,root:g,inheritWidthFromTarget:f,disableRtlStyles:b,children:u,messageIdCallback:N}):void 0,H=A?r.createElement(B,{errorAttachment:m,isOpened:k,target:D.current,root:g,inheritWidthFromTarget:f,disableRtlStyles:b,children:h,messageIdCallback:N}):void 0,G=T?r.createElement(l.AfterSlot,{className:o(E["static-messages"],E.errors)},null==u?void 0:u.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:N},t)))):void 0,Y=z?r.createElement(l.AfterSlot,{className:o(E["static-messages"],E.warnings)},null==h?void 0:h.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:N},t)))):void 0,$=_?r.createElement(l.AfterSlot,{className:o(E["static-messages"],E["success-mesages"])},null==d?void 0:d.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:N},t)))):void 0,J=!T&&!z&&!_&&v?r.createElement(l.AfterSlot,{className:o(E["static-messages"],E["input-description"])},r.createElement(I,{messageIdCallback:N},v)):void 0;return{ariaIds:x,icon:K,renderedErrors:null!==(c=null!==(s=null!==(n=null!==(e=null!=U?U:H)&&void 0!==e?e:G)&&void 0!==n?n:Y)&&void 0!==s?s:$)&&void 0!==c?c:J,containerReference:D,intent:j,...w,...P}}function I(t){const{children:e,messageIdCallback:n,...o}=t,a=r.useId();return s(a,n),r.createElement("span",{...o,className:E.message,"aria-live":"assertive",id:a},e)}},16658:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" d="M9 16A7 7 0 1 0 9 2a7 7 0 0 0 0 14Zm0 1A8 8 0 1 0 9 1a8 8 0 0 0 0 16ZM8 5a1 1 0 0 1 2 0v4a1 1 0 1 1-2 0V5Zm1 7a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>'}}]);