Release v27.001 (from 3eb6c0e5)

This commit is contained in:
jenkins
2024-02-02 14:52:43 +00:00
parent a0bd039ed4
commit a1585eb225
20 changed files with 315 additions and 299 deletions

View File

@@ -4,6 +4,26 @@
<!-- markdownlint-disable no-emphasis-as-header -->
<!-- markdownlint-disable no-inline-html -->
<!-- markdownlint-disable code-block-style -->
## Version 27.001
*Date: Fri Feb 2 2024*
**Improvements**
- **Custom indicators can now dynamically hide indicator inputs in the legend when plots are hidden.** The `hideWhenPlotsHidden` option has been added for a custom indicator's input. It enables you to hide an input's value in the legend text when the user hides all of the specified plots.
**Bug Fixes**
- **Allow studies that extend the time scale to load historic bars before the leftmost bar of the main series.**
**Documentation**
- **New articles**
- [Context menu](https://www.tradingview.com/charting-library-docs/latest/ui_elements/context-menu)
- [Orders](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/trading-concepts/orders)
- [Snapshots](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Snapshots)
## Version 27
*Date: Wed Jan 17 2024*
@@ -45,6 +65,7 @@ To open this dialog, users should click the _Quick Search_ button on the top too
- **Added ability to show daily change in the chart legend.** New _Last day change values_ option allows users to show/hide the last day change values in the main series legend.
To make this option available in the _Chart Settings_ dialog, use the [`legend_last_day_change`](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets#legend_last_day_change) featureset. [#8193](https://github.com/tradingview/charting_library/issues/8193)
- **Updated drawing icons.** New icons for the _Text_, _Anchored Text_, _Note_, and _Anchored Note_ drawings. [#8181](https://github.com/tradingview/charting_library/issues/8181)
- **Drawings can now be saved separately to the chart layout**. See [Saving Drawings Separately](https://www.tradingview.com/charting-library-docs/latest/saving_loading/saving_drawings_separately) for more details.
**Improvements**
@@ -110,6 +131,7 @@ and [`broker_factory`](https://www.tradingview.com/charting-library-docs/latest/
- **The price source text is visible in the screenshot.**
- **Fix display of price sources in Overlay study.** Price sources for symbols in the Overlay study were not being shown when the main series symbol did not have the same price source
- **Both Trend Strength Index and Linear Regression Slope indicators were missing their zero-based property to properly plot them using a histogram.**
- **onChartReady inconsistency on Safari.** Fixed an issue where `onChartReady` wouldn't reliably get called on specific versions of Safari.
**Documentation**

View File

@@ -13,7 +13,7 @@ const{definition:{id:t,properties:{checked:n,option:i,disabled:r,visible:s},titl
className:Ze.rangePointerWrap},o.createElement("div",{className:c(Ze.pointer,s&&Ze.dragged),style:{[h]:100*p+"%"}}))))}_dragSubscribe(){const e=(0,g.ensureNotNull)(this._container).ownerDocument;e&&(e.addEventListener("mouseup",this._mouseUp),e.addEventListener("mousemove",this._mouseMove))}_dragUnsubscribe(){const e=(0,g.ensureNotNull)(this._container).ownerDocument;e&&(e.removeEventListener("mousemove",this._mouseMove),e.removeEventListener("mouseup",this._mouseUp))}_getNewPosition(e){const{min:t,max:n}=this.props,o=n-t,i=(0,g.ensureNotNull)(this._container),r=(0,g.ensureNotNull)(this._pointer),a=i.getBoundingClientRect(),l=r.offsetWidth;let s=e.clientX-l/2-a.left;return(0,$e.isRtl)()&&(s=a.width-s-l),(0,D.clamp)(s/(a.width-l),0,1)*o+t}_detectPointerMode(e){const{from:t,to:n}=this.props,{pointerDragMode:o}=this.state;if(0!==o)return o;const i=this._getNewPosition(e),r=Math.abs(t-i),a=Math.abs(n-i),l=r===a?i<t?1:2:r<a?1:2;return this.setState({pointerDragMode:l}),l}_handleChange(e,t){const{from:n,to:o,onChange:i}=this.props;e===n&&t===o||i(e,t)}}var Ke=n(90692),qe=n(66586);function Qe(e){const{definition:{id:t,properties:{checked:n,disabled:i,from:r,to:s},title:c,solutionId:u,max:p,min:h},offset:m,disabled:f}=e,[g]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[b]=(0,a.useDefinitionProperty)({property:i,defaultValue:!1}),E=(0,Q.useWatchedValueReadonly)({watchedValue:h,defaultValue:void 0}),D=(0,Q.useWatchedValueReadonly)({watchedValue:p,defaultValue:void 0}),[_,w]=(0,a.useDefinitionProperty)({property:r}),[C,x]=(0,a.useDefinitionProperty)({property:s}),P=v(_)||v(C),T=y(P?"mixed":_,(function(e){if(w(e),v(I)){const e=D||100;B(e),x(e)}})),[V,N,k]=T,M=y(P?"mixed":C,(function(e){if(x(e),v(V)){const e=E||0;N(e),w(e)}})),[I,B,F]=M,A=v(V)||v(I),L=f||v(g)||!g,R={flushed:!1};return o.createElement(l.CommonSection,{id:t,offset:m,checked:n,title:c,disabled:f||b},o.createElement(Z.CellWrap,{className:qe.range},function(){if(!E||!D)return null;return o.createElement(Ke.MatchMedia,{rule:"screen and (max-width: 460px)"},(e=>o.createElement(K,{breakPoint:"Medium"},o.createElement(o.Fragment,null,o.createElement("span",{className:qe.valueInput},o.createElement(S,{className:qe.input,sharedBuffer:T,min:E,max:v(I)?D:I,step:1,disabled:L,name:"from-input",mode:"integer",defaultValue:E}),e?o.createElement("span",{className:qe.rangeSlider},"—"):o.createElement(je,{className:d()(qe.rangeSlider,A&&qe.rangeSlider_mixed),from:A?E:V,to:A?D:I,min:E,max:D,onChange:z,onCommit:W,disabled:L}))),o.createElement(o.Fragment,null,o.createElement("span",{className:qe.valueInput},o.createElement(S,{className:qe.input,sharedBuffer:M,min:v(V)?E:V,max:D,step:1,disabled:L,name:"to-input",mode:"integer",defaultValue:D}),u&&!1)))))}()));function z(e,t){N(Math.round(e)),B(Math.round(t))}function W(){R.flushed||(k(),F(),R.flushed=!0)}}var et=n(86067),tt=n(53424),nt=n(54970);function ot(e){const{definitions:t,name:n,offset:i}=e,r=d()(nt.cell,nt.fragmentCell,t.some((e=>void 0!==e.solutionId))&&nt.largeWidth)
;return o.createElement(Ve.PropertyTable.Row,null,o.createElement(Ve.PropertyTable.Cell,{className:r,offset:i,placement:"first",verticalAlign:"adaptive",colSpan:2,"data-section-name":n,checkableTitle:!0},t.map((e=>o.createElement("div",{className:nt.item,key:e.id,"data-section-name":e.id},o.createElement(rt,{definition:e}))))))}function it(e){const{definition:t,offset:n}=e;return o.createElement(Ve.PropertyTable.Row,null,o.createElement(Ve.PropertyTable.Cell,{className:nt.cell,offset:n,placement:"first",verticalAlign:"adaptive",colSpan:2,checkableTitle:!0},o.createElement(rt,{definition:t})))}function rt(e){const{definition:{id:t,properties:{disabled:n,checked:i,color:r,level:l,width:s,style:c},solutionId:p,title:m,widthValues:f,styleValues:g}}=e,[v]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),[y]=(0,a.useDefinitionProperty)({property:n,defaultValue:!1}),b=y||!v;return o.createElement(o.Fragment,null,o.createElement(tt.CheckableTitle,{name:`is-enabled-${t}`,className:d()(m&&nt.withTitle),title:m&&o.createElement("span",{className:nt.title},m),property:i,disabled:y}),l&&o.createElement(C,{className:d()(nt.input,nt.control),property:l,disabled:b}),r&&o.createElement(R,{className:nt.control,disabled:b,color:r,thickness:s,thicknessItems:f}),c&&o.createElement(h,{id:(0,u.createDomId)(t,"leveled-line-style-select"),className:nt.control,property:c,disabled:b,allowedLineStyles:g}),p&&!1)}var at=n(27394);function lt(e){const{definition:{id:t,properties:{option1:n,option2:i,checked:r,disabled:s},title:c,solutionId:d,optionsItems1:p,optionsItems2:h},offset:m}=e,[f]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),[g]=(0,a.useDefinitionProperty)({property:s,defaultValue:!1}),v=e.disabled||!f;return o.createElement(l.CommonSection,{id:t,offset:m,checked:r,title:c,solutionId:d,disabled:e.disabled||g},o.createElement(K,{className:at.twoOptions},o.createElement(re,{id:(0,u.createDomId)(t,"two-options-dropdown-1"),"data-name":"two-options-dropdown-1",className:at.dropdown,menuClassName:at.menu,property:n,disabled:v,options:p}),o.createElement(re,{id:(0,u.createDomId)(t,"two-options-dropdown-2"),"data-name":"two-options-dropdown-2",className:at.dropdown,menuClassName:at.menu,property:i,disabled:v,options:h})))}var st=n(22332);function ct(e){const{definition:{id:t,properties:{color1:n,color2:i,option:r},options:a,color1Visible:s,color2Visible:c,title:p,noAlpha1:h,noAlpha2:m,solutionId:f},offset:g}=e,v=(0,Q.useWatchedValueReadonly)({watchedValue:s,defaultValue:!1}),y=(0,Q.useWatchedValueReadonly)({watchedValue:c,defaultValue:!1}),b=(0,o.useContext)(ye.ControlCustomWidthContext);return o.createElement(l.CommonSection,{id:t,offset:g,solutionId:f,title:p},o.createElement(Z.CellWrap,{className:st.optionalTwoColors},o.createElement(K,null,o.createElement(re,{id:(0,u.createDomId)(t,"options-dropdown"),"data-name":"options-dropdown",className:d()(st.dropdown,b[t]&&st[b[t]]),menuClassName:d()(st.dropdownMenu,b[t]&&st[b[t]]),property:r,options:a}),o.createElement(o.Fragment,null,v&&E(n,h),y&&E(i,m)))));function E(e,t){
return o.createElement("span",{className:st.colorPicker},o.createElement(R,{color:e,noAlpha:t}))}}var dt=n(39828),ut=n(22497);function pt(e){const{source:t,inputs:n,model:i,inputsTabProperty:r,studyMetaInfo:a}=e.definition;return o.createElement(dt.InputsTabContent,{className:ut.withoutPadding,property:r,model:i,study:t,studyMetaInfo:a,inputs:n})}var ht=n(56840),mt=n(38297),ft=n(83682),gt=n(173);var vt=n(20520),yt=n(37558),bt=n(41590),Et=n(27317),Dt=n(40173);function _t(e){!function(e,t){(0,o.useEffect)((()=>{const n=t||document;return n.addEventListener("scroll",e),()=>n.removeEventListener("scroll",e)}),[e])}(e,document)}var wt=n(12811),Ct=n(24437),St=n(38446);function xt(e){const{children:t,highlight:n,disabled:i,reference:r,...a}=e,l=n?"primary":"default";return o.createElement("div",{...a,ref:r,className:d()(St.wrapper,St[`intent-${l}`],St["border-thin"],St["size-medium"],n&&St.highlight,n&&St.focused,i&&St.disabled),"data-role":"button"},o.createElement("div",{className:d()(St.childrenContainer,i&&St.disabled)},t),n&&o.createElement("span",{className:St.shadow}))}var Pt=n(64104);const Tt=()=>null,Vt=(0,Dt.mergeThemes)(Et.DEFAULT_MENU_THEME,{menuBox:Pt.menuBox});function Nt(e){const{value:t,disabled:n,onSelect:i}=e,r=(0,o.useRef)(null),{current:a}=(0,o.useRef)(ht.getJSON("RecentlyUsedEmojis",[t])),[l,s]=(0,o.useState)(a),[c,d]=(0,o.useState)(!1),u=(0,o.useCallback)((()=>d(!1)),[]);_t(u);const p=(0,o.useCallback)((e=>{const t=Array.from(new Set([e,...l])).slice(0,18);ht.setJSON("RecentlyUsedEmojis",t),s(t),i(e),u()}),[l,i]),h=(m=l,(0,o.useMemo)((()=>(gt.emojiGroups[0].emojis=m,[...gt.emojiGroups])),[m]));var m;return o.createElement(o.Fragment,null,o.createElement(xt,{reference:r,highlight:c,disabled:n,"data-name":"emoji-picker"},o.createElement(ft.EmojiWrap,{emoji:t,onClick:function(){n||d(!0)}})),o.createElement(Ke.MatchMedia,{rule:Ct.DialogBreakpoints.TabletSmall},(e=>c&&o.createElement(yt.DrawerManager,null,e?o.createElement(bt.Drawer,{className:Pt.drawer,position:"Bottom",onClose:u},o.createElement(mt.EmojiList,{emojis:h,onSelect:p,height:378})):o.createElement(vt.PopupMenu,{theme:Vt,isOpened:!0,position:(0,wt.getPopupPositioner)(r.current,{horizontalDropDirection:wt.HorizontalDropDirection.FromLeftToRight,horizontalAttachEdge:wt.HorizontalAttachEdge.Left}),onClickOutside:u,onClose:Tt},o.createElement(mt.EmojiList,{className:Pt.desktopSize,emojis:h,onSelect:p,height:378}))))))}var kt=n(35199);function Mt(e){const{definition:{id:t,title:n,properties:i,solutionId:r},offset:s}=e,{checked:c,emoji:d,backgroundColor:u}=i,[p]=(0,a.useDefinitionProperty)({property:c,defaultValue:!1}),[h,m]=(0,a.useDefinitionProperty)({property:d,defaultValue:"🙂"}),[f,g]=(0,a.useDefinitionProperty)({property:u,defaultValue:ue.colorsPalette["color-tv-blue-a600"]}),[v]=(0,a.useDefinitionProperty)({property:i.disabled,defaultValue:!1}),y=e.disabled||!p;return o.createElement(l.CommonSection,{id:t,offset:s,checked:c,title:n,solutionId:r,disabled:e.disabled||v},o.createElement(Nt,{value:h,disabled:y,onSelect:m
}),o.createElement(A.ColorSelect,{className:kt.colorSelect,disabled:y,color:function(){if("mixed"===f)return f;return(0,F.rgbToHexString)((0,F.parseRgb)(f))}(),opacity:f&&"mixed"!==f?(0,F.parseRgba)(f)[3]:void 0,onColorChange:function(e){const t=f&&"mixed"!==f?(0,L.alphaToTransparency)((0,F.parseRgba)(f)[3]):0;g((0,L.generateColor)(String(e),t,!0))},onOpacityChange:function(e){g((0,L.generateColor)(f,(0,L.alphaToTransparency)(e),!0))}}))}function It(e){const{definition:{id:t,properties:{disabled:n,visible:i},childrenDefinitions:r,title:s},offset:c}=e,[d]=(0,a.useDefinitionProperty)({property:n,defaultValue:!1}),[u]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),p=e.disabled;return u?o.createElement(o.Fragment,null,s&&o.createElement(l.CommonSection,{id:t,offset:c,title:s,disabled:e.disabled||d}),r.map((e=>o.createElement(tn,{key:e.id,disabled:p,definition:e,offset:Boolean(s)})))):null}var Bt=n(38528),Ft=n(36104),At=n(3343),Lt=n(26597),Rt=n(59054),zt=n(50238),Wt=n(16838),Gt=n(16396),Ht=n(15294),Ot=n(54583);function Ut(e){const{isDisabled:t,hint:n,label:i,isChecked:r,checkboxClassName:a,labelClassName:l,indeterminate:s,isActive:d,checkboxTabIndex:u,checkboxReference:p,checkboxDataRole:h,...m}=e;return o.createElement(Gt.PopupMenuItem,{...m,isDisabled:t,shortcut:n,dontClosePopup:!0,labelRowClassName:l,label:o.createElement(Ht.Checkbox,{reference:p,disabled:t,label:i,checked:r,indeterminate:s,className:c(Ot.checkbox,a),tabIndex:u,"data-role":h})})}var Jt=n(81091);function Yt(e){const[t,n]=(0,zt.useRovingTabindexElement)(null);return o.createElement(Ut,{...e,className:Jt.item,checkboxClassName:Jt.checkbox,checkboxReference:t,checkboxTabIndex:n,checkboxDataRole:Wt.PLATFORM_ACCESSIBILITY_ENABLED?"menuitem":void 0,onKeyDown:function(e){if(!Wt.PLATFORM_ACCESSIBILITY_ENABLED)return;const n=(0,At.hashFromEvent)(e);13!==n&&32!==n||(e.preventDefault(),t.current instanceof HTMLElement&&t.current.click())},"aria-disabled":Wt.PLATFORM_ACCESSIBILITY_ENABLED&&e.isDisabled||void 0})}var Xt=n(81261),$t=n(58516);function Zt(e){return!e.readonly&&!e.disabled}function jt(e){const{selectedItems:t,placeholder:n}=e;if(!t.length)return o.createElement("span",null,n);const i=t.map((e=>{var t,n,o;return null!==(n=null!==(t=e.selectedContent)&&void 0!==t?t:e.content)&&void 0!==n?n:null===(o=e.value)||void 0===o?void 0:o.toString()})).reduce(((e,t,n)=>t?(e.push(o.createElement("span",{key:n,className:$t.contentPart},t)),e.push(o.createElement("span",{key:`separator_${n}`},","," ")),e):e),[]);return i.length&&i.splice(-1),o.createElement("span",{className:$t.btnContent},i)}function Kt(e,t){
}),o.createElement(A.ColorSelect,{className:kt.colorSelect,disabled:y,color:function(){if("mixed"===f)return f;return(0,F.rgbToHexString)((0,F.parseRgb)(f))}(),opacity:f&&"mixed"!==f?(0,F.parseRgba)(f)[3]:void 0,onColorChange:function(e){const t=f&&"mixed"!==f?(0,L.alphaToTransparency)((0,F.parseRgba)(f)[3]):0;g((0,L.generateColor)(String(e),t,!0))},onOpacityChange:function(e){g((0,L.generateColor)(f,(0,L.alphaToTransparency)(e),!0))}}))}function It(e){const{definition:{id:t,properties:{disabled:n,visible:i},childrenDefinitions:r,title:s},offset:c}=e,[d]=(0,a.useDefinitionProperty)({property:n,defaultValue:!1}),[u]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),p=e.disabled;return u?o.createElement(o.Fragment,null,s&&o.createElement(l.CommonSection,{id:t,offset:c,title:s,disabled:e.disabled||d}),r.map((e=>o.createElement(tn,{key:e.id,disabled:p,definition:e,offset:Boolean(s)})))):null}var Bt=n(38528),Ft=n(36104),At=n(3343),Lt=n(26597),Rt=n(59054),zt=n(50238),Wt=n(16838),Gt=n(16396),Ht=n(32389),Ot=n(54583);function Ut(e){const{isDisabled:t,hint:n,label:i,isChecked:r,checkboxClassName:a,labelClassName:l,indeterminate:s,isActive:d,checkboxTabIndex:u,checkboxReference:p,checkboxDataRole:h,...m}=e;return o.createElement(Gt.PopupMenuItem,{...m,isDisabled:t,shortcut:n,dontClosePopup:!0,labelRowClassName:l,label:o.createElement(Ht.Checkbox,{reference:p,disabled:t,label:i,checked:r,indeterminate:s,className:c(Ot.checkbox,a),tabIndex:u,"data-role":h})})}var Jt=n(81091);function Yt(e){const[t,n]=(0,zt.useRovingTabindexElement)(null);return o.createElement(Ut,{...e,className:Jt.item,checkboxClassName:Jt.checkbox,checkboxReference:t,checkboxTabIndex:n,checkboxDataRole:Wt.PLATFORM_ACCESSIBILITY_ENABLED?"menuitem":void 0,onKeyDown:function(e){if(!Wt.PLATFORM_ACCESSIBILITY_ENABLED)return;const n=(0,At.hashFromEvent)(e);13!==n&&32!==n||(e.preventDefault(),t.current instanceof HTMLElement&&t.current.click())},"aria-disabled":Wt.PLATFORM_ACCESSIBILITY_ENABLED&&e.isDisabled||void 0})}var Xt=n(81261),$t=n(58516);function Zt(e){return!e.readonly&&!e.disabled}function jt(e){const{selectedItems:t,placeholder:n}=e;if(!t.length)return o.createElement("span",null,n);const i=t.map((e=>{var t,n,o;return null!==(n=null!==(t=e.selectedContent)&&void 0!==t?t:e.content)&&void 0!==n?n:null===(o=e.value)||void 0===o?void 0:o.toString()})).reduce(((e,t,n)=>t?(e.push(o.createElement("span",{key:n,className:$t.contentPart},t)),e.push(o.createElement("span",{key:`separator_${n}`},","," ")),e):e),[]);return i.length&&i.splice(-1),o.createElement("span",{className:$t.btnContent},i)}function Kt(e,t){
const{id:n,items:i,menuClassName:r,menuItemClassName:a,tabIndex:l,disabled:s,highlight:c,intent:d,hideArrowButton:p,placeholder:h,value:m,"aria-labelledby":f,onFocus:g,onBlur:v,onClick:y,onChange:b,onKeyDown:E,openMenuOnEnter:D=!0,"aria-describedby":_,"aria-invalid":w,...C}=e,{listboxId:S,isOpened:x,isFocused:P,buttonTabIndex:T,highlight:V,intent:N,open:k,onOpen:M,close:I,toggle:B,buttonFocusBindings:F,onButtonClick:A,buttonRef:L,listboxRef:R,listboxTabIndex:z,buttonAria:W}=(0,Ft.useControlDisclosure)({id:n,disabled:s,buttonTabIndex:l,intent:d,highlight:c,onFocus:g,onBlur:v,onClick:y}),G=i.filter(Zt).filter((e=>m.some((t=>e.value===t)))),H=(0,u.joinDomIds)(f,n),O=H.length>0?H:void 0,U=(0,o.useMemo)((()=>({role:"listbox","aria-labelledby":f})),[f]),J=(0,Lt.useKeyboardToggle)(B,x||D),Y=(0,Lt.useKeyboardOpen)(x,k),X=(0,Lt.useKeyboardEventHandler)([J,Y]),$=(0,Bt.useMergedRefs)([L,t]);return o.createElement(Rt.ControlDisclosureView,{...C,...W,...F,id:n,role:"button",tabIndex:T,"aria-owns":W["aria-controls"],"aria-haspopup":"listbox","aria-labelledby":O,disabled:s,hideArrowButton:p,isFocused:P,isOpened:x,highlight:V,intent:N,ref:$,onClick:A,onClose:I,onKeyDown:X,onOpen:M,listboxTabIndex:z,listboxId:S,listboxClassName:r,listboxAria:U,"aria-describedby":_,"aria-invalid":w,listboxReference:R,onListboxKeyDown:function(e){switch((0,At.hashFromEvent)(e)){case 27:case 9:return void(x&&(e.preventDefault(),I()))}(0,Xt.handleAccessibleMenuKeyDown)(e)},onListboxFocus:e=>(0,Xt.handleAccessibleMenuFocus)(e,L),buttonChildren:o.createElement(jt,{selectedItems:null!=G?G:null,placeholder:h})},i.map(((e,t)=>{var i,r,l;if(e.readonly)return o.createElement(o.Fragment,{key:`readonly_item_${t}`},e.content);const s=function(e,t){var n;return null!==(n=null==t?void 0:t.id)&&void 0!==n?n:(0,u.createDomId)(e,"item",null==t?void 0:t.value)}(n,e);return o.createElement(Yt,{key:s,id:s,className:a,"aria-selected":m===e.value,isChecked:m.includes(e.value),label:null!==(l=null!==(i=e.content)&&void 0!==i?i:null===(r=e.value)||void 0===r?void 0:r.toString())&&void 0!==l?l:"",onClick:()=>function(e){const t=new Set(m);t.has(e)?t.delete(e):t.add(e);b(Array.from(t))}(e.value),isDisabled:e.disabled})})))}Kt.displayName="Multiselect";const qt=o.forwardRef(Kt);var Qt=n(85357);function en(e){const{definition:t}=e,{checkableListOptions:r,definitions:a}=t,[l,s]=(0,o.useState)(p());(0,o.useEffect)((()=>{const e={},t=()=>{const e=p();s(e)};return t(),r.forEach((n=>{var o;n.properties.checked&&(null===(o=n.properties.checked)||void 0===o||o.subscribe(e,t))})),()=>{r.forEach((n=>{var o;n.properties.checked&&(null===(o=n.properties.checked)||void 0===o||o.unsubscribe(e,t))}))}}),[t]);const c=[],d=[],u=[];return a.value().forEach((e=>{(0,i.isPropertyDefinition)(e)&&((0,i.isColorDefinition)(e)?c.push(e):(0,i.isLineDefinition)(e)?d.push(e):(0,i.isOptionsDefinition)(e)&&u.push(e))})),o.createElement(o.Fragment,null,o.createElement(Ve.PropertyTable.Row,null,o.createElement(Ve.PropertyTable.Cell,{verticalAlign:"topCenter",placement:"first"
},t.title),o.createElement(Ve.PropertyTable.Cell,{placement:"last"},o.createElement("div",{className:Qt.wrap},o.createElement(qt,{className:Qt.select,placeholder:z.t(null,void 0,n(45044)),onChange:function(e){const t=new Set(e);r.forEach((e=>{var n,o;!t.has(e.id)||(null===(n=e.properties.checked)||void 0===n?void 0:n.value())?!t.has(e.id)&&(null===(o=e.properties.checked)||void 0===o?void 0:o.value())&&e.properties.checked.setValue(!1):(0,g.ensureDefined)(e.properties.checked).setValue(!0)}))},value:l,matchButtonAndListboxWidths:!0,items:r.map((e=>({id:e.id,content:(0,g.ensureDefined)(e.title),value:e.id})))}),c.length||d.length?o.createElement("div",{className:Qt.colorsWrap},d.map((e=>o.createElement(R,{key:e.id,color:(0,g.ensureDefined)(e.properties.color),thickness:e.properties.width,thicknessItems:e.widthValues}))),c.map((e=>o.createElement(R,{key:e.id,color:e.properties.color})))):null))),u.map((e=>o.createElement(Ve.PropertyTable.Row,{key:e.id},o.createElement(Ve.PropertyTable.Cell,{placement:"first"}),o.createElement(Ve.PropertyTable.Cell,{placement:"last"},o.createElement(re,{className:Qt.select,property:e.properties.option,options:e.options}))))));function p(){return r.filter((e=>{var t;return(0,g.ensureDefined)(null===(t=e.properties)||void 0===t?void 0:t.checked).value()})).map((e=>e.id))}}function tn(e){const{definition:t,offset:n,disabled:a}=e;if(function(e){(0,o.useEffect)((()=>{if(void 0===e)return;const t={...e.properties};return Object.entries(t).forEach((([n,o])=>{void 0!==o&&o.subscribe(t,(()=>Xe.logger.logNormal(`Property "${n}" in definition "${e.id}" was updated to value "${o.value()}"`)))})),()=>{Object.entries(t).forEach((([,e])=>{null==e||e.unsubscribeAll(t)}))}}),[e])}((0,i.isPropertyDefinitionsGroup)(t)?void 0:t),(0,i.isPropertyDefinitionsGroup)(t))return o.createElement(nn,{definition:t,offset:n,disabled:a});switch(t.propType){case"line":return o.createElement(te,{...e,definition:t});case"checkable":return o.createElement(s,{...e,definition:t});case"color":return o.createElement(ce,{...e,definition:t});case"transparency":return o.createElement(fe,{...e,definition:t});case"twoColors":return o.createElement(ve,{...e,definition:t});case"optionalTwoColors":return o.createElement(ct,{...e,definition:t});case"fourColors":case"soundSelect":case"image":default:return null;case"number":return o.createElement(Ee,{...e,definition:t});case"symbol":return o.createElement(r.SymbolInputsButton,{...e,definition:t});case"text":return o.createElement(Le,{...e,definition:t});case"checkableSet":return o.createElement(De,{...e,definition:t});case"set":return o.createElement(It,{...e,definition:t});case"options":return o.createElement(Ye,{...e,definition:t});case"range":return o.createElement(Qe,{...e,definition:t});case"coordinates":case"selectionCoordinates":return o.createElement(He,{...e,definition:t});case"twoOptions":return o.createElement(lt,{...e,definition:t});case"leveledLine":return o.createElement(it,{...e,definition:t});case"emoji":return o.createElement(Mt,{...e,definition:t});case"studyInputs":
return o.createElement(pt,{...e,definition:t})}}function nn(e){const{definition:t}=e,n=(0,Q.useWatchedValueReadonly)({watchedValue:t.definitions});return(0,Q.useWatchedValueReadonly)({watchedValue:t.visible,defaultValue:!0})?(0,i.isCheckableListOptionsDefinition)(t)?o.createElement(en,{definition:t}):o.createElement(o.Fragment,null,t.title&&o.createElement(et.GroupTitleSection,{title:t.title,name:t.id}),n&&function(e){const t=[];return e.reduce(((e,t)=>{if((0,i.isPropertyDefinitionsGroup)(t)||"leveledLine"!==t.propType)e.push(t);else{const n=e[e.length-1];Array.isArray(n)?n.push(t):e.push([t])}return e}),t)}(n).map((n=>Array.isArray(n)?o.createElement(ot,{key:n[0].id,name:t.id,definitions:n}):o.createElement(tn,{key:n.id,...e,definition:n}))),"general"===t.groupType&&o.createElement(Ve.PropertyTable.GroupSeparator,{size:1})):null}},95711:(e,t,n)=>{"use strict";n.d(t,{PopupContext:()=>o});const o=n(50959).createContext(null)},16181:(e,t,n)=>{"use strict";n.d(t,{PopupDialog:()=>x});var o=n(50959),i=n(97754),r=n(50151),a=n(99663),l=n(67961),s=n(90186),c=n(5734);class d extends o.PureComponent{constructor(){super(...arguments),this._manager=new l.OverlapManager,this._handleSlot=e=>{this._manager.setContainer(e)}}render(){const{rounded:e=!0,shadowed:t=!0,fullscreen:n=!1,darker:r=!1,className:l,backdrop:d,containerTabIndex:u=-1}=this.props,p=i(l,c.dialog,e&&c.rounded,t&&c.shadowed,n&&c.fullscreen,r&&c.darker),h=(0,s.filterDataProps)(this.props),m=this.props.style?{...this._createStyles(),...this.props.style}:this._createStyles();return o.createElement(o.Fragment,null,o.createElement(a.SlotContext.Provider,{value:this._manager},d&&o.createElement("div",{onClick:this.props.onClickBackdrop,className:c.backdrop}),o.createElement("div",{...h,className:p,style:m,ref:this.props.reference,onFocus:this.props.onFocus,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp,onClick:this.props.onClick,onKeyDown:this.props.onKeyDown,tabIndex:u,"aria-label":this.props.containerAriaLabel},this.props.children)),o.createElement(a.Slot,{reference:this._handleSlot}))}_createStyles(){const{bottom:e,left:t,width:n,right:o,top:i,zIndex:r,height:a}=this.props;return{bottom:e,left:t,right:o,top:i,zIndex:r,maxWidth:n,height:a}}}var u=n(86431),p=n(52778),h=n(37160);function m(e,t,n,o){return e+t>o&&(e=o-t),e<n&&(e=n),e}function f(e){return{x:(0,h.clamp)(e.x,20,document.documentElement.clientWidth-20),y:(0,h.clamp)(e.y,20,window.innerHeight-20)}}function g(e){return{x:e.clientX,y:e.clientY}}function v(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}}class y{constructor(e,t,n={boundByScreen:!0}){this._drag=null,this._canBeTouchClick=!1,this._frame=null,this._onMouseDragStart=e=>{if(0!==e.button||this._isTargetNoDraggable(e))return;e.preventDefault(),document.addEventListener("mousemove",this._onMouseDragMove),document.addEventListener("mouseup",this._onMouseDragEnd);const t=f(g(e));this._dragStart(t)},this._onTouchDragStart=e=>{if(this._isTargetNoDraggable(e))return;this._canBeTouchClick=!0,e.preventDefault(),

View File

@@ -2,7 +2,7 @@
dropped:"dropped-PYEOTd6i"}},45350:e=>{e.exports={"nav-button":"nav-button-znwuaSC1",link:"link-znwuaSC1",background:"background-znwuaSC1",icon:"icon-znwuaSC1","flip-icon":"flip-icon-znwuaSC1","size-large":"size-large-znwuaSC1","preserve-paddings":"preserve-paddings-znwuaSC1","size-medium":"size-medium-znwuaSC1","size-small":"size-small-znwuaSC1","size-xsmall":"size-xsmall-znwuaSC1","size-xxsmall":"size-xxsmall-znwuaSC1","visually-hidden":"visually-hidden-znwuaSC1"}},70048:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",box:"box-GZajBGIm",icon:"icon-GZajBGIm",noOutline:"noOutline-GZajBGIm","intent-danger":"intent-danger-GZajBGIm",check:"check-GZajBGIm",dot:"dot-GZajBGIm"}},69789:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},22623:e=>{e.exports={"textarea-container":"textarea-container-x5KHDULU","change-highlight":"change-highlight-x5KHDULU",focused:"focused-x5KHDULU","resize-vertical":"resize-vertical-x5KHDULU","resize-horizontal":"resize-horizontal-x5KHDULU","resize-both":"resize-both-x5KHDULU",textarea:"textarea-x5KHDULU","with-icon":"with-icon-x5KHDULU",endslot:"endslot-x5KHDULU"}},78370:e=>{e.exports={"intent-default":"intent-default-EZuD3gZZ","intent-danger":"intent-danger-EZuD3gZZ","intent-warning":"intent-warning-EZuD3gZZ","intent-success":"intent-success-EZuD3gZZ","icon-wrapper-size-small":"icon-wrapper-size-small-EZuD3gZZ","icon-wrapper-size-medium":"icon-wrapper-size-medium-EZuD3gZZ","icon-wrapper-size-large":"icon-wrapper-size-large-EZuD3gZZ","icon-wrapper":"icon-wrapper-EZuD3gZZ",icon:"icon-EZuD3gZZ"}},88400:e=>{e.exports={radio:"radio-ALqkCUvs",input:"input-ALqkCUvs",box:"box-ALqkCUvs",reverse:"reverse-ALqkCUvs",label:"label-ALqkCUvs",wrapper:"wrapper-ALqkCUvs",noOutline:"noOutline-ALqkCUvs"}},52272:e=>{e.exports={wrap:"wrap-QStmZL8l",thicknessItem:"thicknessItem-QStmZL8l",checked:"checked-QStmZL8l",accessible:"accessible-QStmZL8l",focusVisible:"focusVisible-QStmZL8l",radio:"radio-QStmZL8l",bar:"bar-QStmZL8l"}},12863:e=>{e.exports={innerLabel:"innerLabel-DjbvBF5Y"}},21234:e=>{e.exports={controlWrapper:"controlWrapper-DBTazUk2",hidden:"hidden-DBTazUk2",control:"control-DBTazUk2",controlIncrease:"controlIncrease-DBTazUk2",controlDecrease:"controlDecrease-DBTazUk2",controlIcon:"controlIcon-DBTazUk2",title:"title-DBTazUk2"}},55596:e=>{e.exports={dialog:"dialog-b8SxMnzX",wrapper:"wrapper-b8SxMnzX",separator:"separator-b8SxMnzX",bounded:"bounded-b8SxMnzX"}},69827:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-BZKENkhT",unsetAlign:"unsetAlign-BZKENkhT",title:"title-BZKENkhT",subtitle:"subtitle-BZKENkhT",textWrap:"textWrap-BZKENkhT",ellipsis:"ellipsis-BZKENkhT",close:"close-BZKENkhT",icon:"icon-BZKENkhT"}},60015:e=>{e.exports={wrap:"wrap-ne5qGlZh",icon:"icon-ne5qGlZh",text:"text-ne5qGlZh",disabled:"disabled-ne5qGlZh"}},28685:e=>{e.exports={colorPickerWrap:"colorPickerWrap-Sw_a4qpB",focused:"focused-Sw_a4qpB",readonly:"readonly-Sw_a4qpB",disabled:"disabled-Sw_a4qpB",
"size-small":"size-small-Sw_a4qpB","size-medium":"size-medium-Sw_a4qpB","size-large":"size-large-Sw_a4qpB","font-size-small":"font-size-small-Sw_a4qpB","font-size-medium":"font-size-medium-Sw_a4qpB","font-size-large":"font-size-large-Sw_a4qpB","border-none":"border-none-Sw_a4qpB",shadow:"shadow-Sw_a4qpB","border-thin":"border-thin-Sw_a4qpB","border-thick":"border-thick-Sw_a4qpB","intent-default":"intent-default-Sw_a4qpB","intent-success":"intent-success-Sw_a4qpB","intent-warning":"intent-warning-Sw_a4qpB","intent-danger":"intent-danger-Sw_a4qpB","intent-primary":"intent-primary-Sw_a4qpB","corner-top-left":"corner-top-left-Sw_a4qpB","corner-top-right":"corner-top-right-Sw_a4qpB","corner-bottom-right":"corner-bottom-right-Sw_a4qpB","corner-bottom-left":"corner-bottom-left-Sw_a4qpB",colorPicker:"colorPicker-Sw_a4qpB",swatch:"swatch-Sw_a4qpB",placeholderContainer:"placeholderContainer-Sw_a4qpB",placeholder:"placeholder-Sw_a4qpB",mixedColor:"mixedColor-Sw_a4qpB",white:"white-Sw_a4qpB",opacitySwatch:"opacitySwatch-Sw_a4qpB",colorLine:"colorLine-Sw_a4qpB",multiWidth:"multiWidth-Sw_a4qpB",line:"line-Sw_a4qpB",thicknessContainer:"thicknessContainer-Sw_a4qpB",thicknessTitle:"thicknessTitle-Sw_a4qpB"}},86536:e=>{e.exports={thicknessContainer:"thicknessContainer-C05zSid7",thicknessTitle:"thicknessTitle-C05zSid7"}},69006:e=>{e.exports={hasTooltip:"hasTooltip-DcvaoxPU",uppercase:"uppercase-DcvaoxPU"}},2746:e=>{e.exports={wrap:"wrap-Q2NZ0gvI"}},25679:e=>{e.exports={checkbox:"checkbox-FG0u1J5p",title:"title-FG0u1J5p"}},41125:e=>{e.exports={hintButton:"hintButton-qEI9XsjF"}},69750:e=>{e.exports={titleWrap:"titleWrap-SexRbl__",title:"title-SexRbl__"}},63581:e=>{e.exports={button:"button-HBcDEU4c",accessible:"accessible-HBcDEU4c"}},93402:e=>{e.exports={container:"container-mdcOkvbj",sectionTitle:"sectionTitle-mdcOkvbj",separator:"separator-mdcOkvbj",customButton:"customButton-mdcOkvbj",accessible:"accessible-mdcOkvbj"}},80679:e=>{e.exports={container:"container-iiEYaqPD",form:"form-iiEYaqPD",swatch:"swatch-iiEYaqPD",inputWrap:"inputWrap-iiEYaqPD",inputHash:"inputHash-iiEYaqPD",input:"input-iiEYaqPD",buttonWrap:"buttonWrap-iiEYaqPD",hueSaturationWrap:"hueSaturationWrap-iiEYaqPD",saturation:"saturation-iiEYaqPD",hue:"hue-iiEYaqPD"}},1369:e=>{e.exports={hue:"hue-r4uo5Wn6",pointer:"pointer-r4uo5Wn6",accessible:"accessible-r4uo5Wn6",pointerContainer:"pointerContainer-r4uo5Wn6"}},30099:e=>{e.exports={opacity:"opacity-EnWts7Xu",opacitySlider:"opacitySlider-EnWts7Xu",opacitySliderGradient:"opacitySliderGradient-EnWts7Xu",pointer:"pointer-EnWts7Xu",dragged:"dragged-EnWts7Xu",opacityPointerWrap:"opacityPointerWrap-EnWts7Xu",opacityInputWrap:"opacityInputWrap-EnWts7Xu",opacityInput:"opacityInput-EnWts7Xu",opacityInputPercent:"opacityInputPercent-EnWts7Xu",accessible:"accessible-EnWts7Xu"}},35257:e=>{e.exports={saturation:"saturation-NFNfqP2w",pointer:"pointer-NFNfqP2w",accessible:"accessible-NFNfqP2w"}},87466:e=>{e.exports={swatches:"swatches-sfn7Lezv",swatch:"swatch-sfn7Lezv",hover:"hover-sfn7Lezv",empty:"empty-sfn7Lezv",white:"white-sfn7Lezv",
selected:"selected-sfn7Lezv",contextItem:"contextItem-sfn7Lezv",row:"row-sfn7Lezv"}},66986:e=>{e.exports={button:"button-tFul0OhX","button-children":"button-children-tFul0OhX",hiddenArrow:"hiddenArrow-tFul0OhX",invisibleFocusHandler:"invisibleFocusHandler-tFul0OhX"}},42335:e=>{e.exports={"icon-wrapper":"icon-wrapper-dikdewwx","with-tooltip":"with-tooltip-dikdewwx","no-active-state":"no-active-state-dikdewwx"}},60673:e=>{e.exports={placeholder:"placeholder-V6ceS6BN"}},40191:e=>{e.exports={menuWrap:"menuWrap-Kq3ruQo8",isMeasuring:"isMeasuring-Kq3ruQo8",scrollWrap:"scrollWrap-Kq3ruQo8",momentumBased:"momentumBased-Kq3ruQo8",menuBox:"menuBox-Kq3ruQo8",isHidden:"isHidden-Kq3ruQo8"}},45719:e=>{e.exports={separator:"separator-Pf4rIzEt"}},57340:(e,t,n)=>{"use strict";n.d(t,{CloseButton:()=>d});var o=n(50959),s=n(64388),r=n(17105),i=n(15130),a=n(38822),l=n(63346),c=n(34983);function u(e="large"){switch(e){case"large":return r;case"medium":default:return i;case"small":return a;case"xsmall":return l;case"xxsmall":return c}}const d=o.forwardRef(((e,t)=>o.createElement(s.NavButton,{...e,ref:t,icon:u(e.size)})))},64388:(e,t,n)=>{"use strict";n.d(t,{NavButton:()=>c});var o=n(50959),s=n(97754),r=n(9745),i=n(45350);function a(e){const{size:t="large",preservePaddings:n,isLink:o,flipIconOnRtl:r,className:a}=e;return s(i["nav-button"],i[`size-${t}`],n&&i["preserve-paddings"],r&&i["flip-icon"],o&&i.link,a)}function l(e){const{children:t,icon:n}=e;return o.createElement(o.Fragment,null,o.createElement("span",{className:i.background}),o.createElement(r.Icon,{icon:n,className:i.icon,"aria-hidden":!0}),t&&o.createElement("span",{className:i["visually-hidden"]},t))}const c=(0,o.forwardRef)(((e,t)=>{const{icon:n,type:s="button",preservePaddings:r,flipIconOnRtl:i,size:c,"aria-label":u,...d}=e;return o.createElement("button",{...d,className:a({...e,children:u}),ref:t,type:s},o.createElement(l,{icon:n},u))}));c.displayName="NavButton";var u=n(21593),d=n(53017);(0,o.forwardRef)(((e,t)=>{const{icon:n,renderComponent:s,"aria-label":r,...i}=e,c=null!=s?s:u.CustomComponentDefaultLink;return o.createElement(c,{...i,className:a({...e,children:r,isLink:!0}),reference:(0,d.isomorphicRef)(t)},o.createElement(l,{icon:n},r))})).displayName="NavAnchorButton"},70673:(e,t,n)=>{"use strict";n.d(t,{CheckboxInput:()=>u});var o=n(50959),s=n(97754),r=n(90186),i=n(9745),a=n(65890),l=n(70048),c=n.n(l);function u(e){const t=s(c().box,c()[`intent-${e.intent}`],{[c().check]:!Boolean(e.indeterminate),[c().dot]:Boolean(e.indeterminate),[c().noOutline]:-1===e.tabIndex}),n=s(c().wrapper,e.className);return o.createElement("span",{className:n,title:e.title,style:e.style},o.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:c().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,r.filterDataProps)(e)
}),o.createElement("span",{className:t},o.createElement(i.Icon,{icon:a,className:c().icon})))}},15294:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c});var o=n(50959),s=n(97754),r=n(59416),i=n(70673),a=n(69789),l=n.n(a);class c extends o.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,r=s(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),a=s(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=o.createElement("span",{className:a,title:this.props.title},this.props.label)),o.createElement("label",{className:r},o.createElement(i.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};(0,r.makeSwitchGroupItem)(c)},2568:(e,t,n)=>{"use strict";n.d(t,{Textarea:()=>C});var o,s=n(50959),r=n(97754),i=n(38528),a=n(29202),l=n(48027),c=n(45812),u=n(47201),d=n(48907),p=n(67029),h=n(78274),m=n(22623),v=n.n(m);!function(e){e.None="none",e.Vertical="vertical",e.Horizontal="horizontal",e.Both="both"}(o||(o={}));const f=s.forwardRef(((e,t)=>{const{id:n,title:o,tabIndex:i,containerTabIndex:a,role:l,inputClassName:c,autoComplete:u,autoFocus:d,cols:m,disabled:f,isFocused:g,form:b,maxLength:C,minLength:y,name:E,placeholder:w,readonly:_,required:S,rows:x,value:N,defaultValue:T,wrap:I,containerReference:k,onChange:B,onSelect:P,onFocus:D,onContainerFocus:M,onBlur:O,onPaste:R,"aria-describedby":L,"aria-required":A,"aria-invalid":F,hasIcon:W,endSlot:V,hasAttachImage:z,...q}=e,K={id:n,title:o,tabIndex:i,role:l,autoComplete:u,autoFocus:d,cols:m,disabled:f,form:b,maxLength:C,minLength:y,name:E,placeholder:w,readOnly:_,required:S,rows:x,value:N,defaultValue:T,wrap:I,onChange:B,onSelect:P,onFocus:D,onBlur:O,onPaste:R,"aria-describedby":L,"aria-required":A,"aria-invalid":F};return s.createElement(p.ControlSkeleton,{...q,tabIndex:a,disabled:f,readonly:_,isFocused:g,ref:k,onFocus:M,middleSlot:s.createElement(h.MiddleSlot,null,s.createElement("textarea",{...K,className:r(v().textarea,c,V&&v().endslot),ref:t})),...V&&{endSlot:s.createElement("span",{className:r(!z&&v()["with-icon"])},V)}})}));f.displayName="TextareaView";const g=(e,t,n)=>t?void 0:e?-1:n,b=(e,t,n)=>t?void 0:e?n:-1,C=s.forwardRef(((e,t)=>{e=(0,l.useControl)(e);const{className:n,disabled:p,autoSelectOnFocus:h,tabIndex:m=0,borderStyle:C,highlight:y,resize:E,containerReference:w=null,onFocus:_,onBlur:S,hasIcon:x,...N}=e,T=(0,s.useRef)(null),I=(0,s.useRef)(null),{isMouseDown:k,handleMouseDown:B,handleMouseUp:P}=(0,c.useIsMouseDown)(),[D,M]=(0,a.useFocus)(),O=(0,u.createSafeMulticastEventHandler)(M.onFocus,(function(e){h&&!k.current&&(0,d.selectAllContent)(e.currentTarget)}),_),R=(0,u.createSafeMulticastEventHandler)(M.onBlur,S),L=void 0!==E&&E!==o.None,A=null!=C?C:L?y?"thick":"thin":void 0,F=null!=y?y:!L&&void 0;return s.createElement(f,{...N,className:r(v()["textarea-container"],L&&v()["change-highlight"],E&&E!==o.None&&v()[`resize-${E}`],D&&v().focused,n),disabled:p,isFocused:D,containerTabIndex:g(D,p,m),tabIndex:b(D,p,m),
}),o.createElement("span",{className:t},o.createElement(i.Icon,{icon:a,className:c().icon})))}},32389:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c});var o=n(50959),s=n(97754),r=n(59416),i=n(70673),a=n(69789),l=n.n(a);class c extends o.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,r=s(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),a=s(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=o.createElement("span",{className:a,title:this.props.title},this.props.label)),o.createElement("label",{className:r},o.createElement(i.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};(0,r.makeSwitchGroupItem)(c)},2568:(e,t,n)=>{"use strict";n.d(t,{Textarea:()=>C});var o,s=n(50959),r=n(97754),i=n(38528),a=n(29202),l=n(48027),c=n(45812),u=n(47201),d=n(48907),p=n(67029),h=n(78274),m=n(22623),v=n.n(m);!function(e){e.None="none",e.Vertical="vertical",e.Horizontal="horizontal",e.Both="both"}(o||(o={}));const f=s.forwardRef(((e,t)=>{const{id:n,title:o,tabIndex:i,containerTabIndex:a,role:l,inputClassName:c,autoComplete:u,autoFocus:d,cols:m,disabled:f,isFocused:g,form:b,maxLength:C,minLength:y,name:E,placeholder:w,readonly:_,required:S,rows:x,value:N,defaultValue:T,wrap:I,containerReference:k,onChange:B,onSelect:P,onFocus:D,onContainerFocus:M,onBlur:O,onPaste:R,"aria-describedby":L,"aria-required":A,"aria-invalid":F,hasIcon:W,endSlot:V,hasAttachImage:z,...q}=e,K={id:n,title:o,tabIndex:i,role:l,autoComplete:u,autoFocus:d,cols:m,disabled:f,form:b,maxLength:C,minLength:y,name:E,placeholder:w,readOnly:_,required:S,rows:x,value:N,defaultValue:T,wrap:I,onChange:B,onSelect:P,onFocus:D,onBlur:O,onPaste:R,"aria-describedby":L,"aria-required":A,"aria-invalid":F};return s.createElement(p.ControlSkeleton,{...q,tabIndex:a,disabled:f,readonly:_,isFocused:g,ref:k,onFocus:M,middleSlot:s.createElement(h.MiddleSlot,null,s.createElement("textarea",{...K,className:r(v().textarea,c,V&&v().endslot),ref:t})),...V&&{endSlot:s.createElement("span",{className:r(!z&&v()["with-icon"])},V)}})}));f.displayName="TextareaView";const g=(e,t,n)=>t?void 0:e?-1:n,b=(e,t,n)=>t?void 0:e?n:-1,C=s.forwardRef(((e,t)=>{e=(0,l.useControl)(e);const{className:n,disabled:p,autoSelectOnFocus:h,tabIndex:m=0,borderStyle:C,highlight:y,resize:E,containerReference:w=null,onFocus:_,onBlur:S,hasIcon:x,...N}=e,T=(0,s.useRef)(null),I=(0,s.useRef)(null),{isMouseDown:k,handleMouseDown:B,handleMouseUp:P}=(0,c.useIsMouseDown)(),[D,M]=(0,a.useFocus)(),O=(0,u.createSafeMulticastEventHandler)(M.onFocus,(function(e){h&&!k.current&&(0,d.selectAllContent)(e.currentTarget)}),_),R=(0,u.createSafeMulticastEventHandler)(M.onBlur,S),L=void 0!==E&&E!==o.None,A=null!=C?C:L?y?"thick":"thin":void 0,F=null!=y?y:!L&&void 0;return s.createElement(f,{...N,className:r(v()["textarea-container"],L&&v()["change-highlight"],E&&E!==o.None&&v()[`resize-${E}`],D&&v().focused,n),disabled:p,isFocused:D,containerTabIndex:g(D,p,m),tabIndex:b(D,p,m),
borderStyle:A,highlight:F,onContainerFocus:function(e){I.current===e.target&&null!==T.current&&T.current.focus()},onFocus:O,onBlur:R,onMouseDown:B,onMouseUp:P,ref:function(e){T.current=e,"function"==typeof t?t(e):t&&(t.current=e)},containerReference:(0,i.useMergedRefs)([w,I]),hasIcon:x})}));C.displayName="Textarea"},38952:(e,t,n)=>{"use strict";function o(e){const{reference:t,...n}=e;return{...n,ref:t}}n.d(t,{renameRef:()=>o})},21593:(e,t,n)=>{"use strict";n.d(t,{CustomComponentDefaultLink:()=>r});var o=n(50959),s=n(38952);function r(e){return o.createElement("a",{...(0,s.renameRef)(e)})}o.PureComponent},36104:(e,t,n)=>{"use strict";n.d(t,{useControlDisclosure:()=>s});var o=n(7953);function s(e){const{intent:t,highlight:n,...s}=e,{isFocused:r,...i}=(0,o.useDisclosure)(s);return{...i,isFocused:r,highlight:null!=n?n:r,intent:null!=t?t:r?"primary":"default"}}},36383:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>r});var o=n(50959),s=n(27267);function r(e){const{click:t,mouseDown:n,touchEnd:r,touchStart:i,handler:a,reference:l,ownerDocument:c=document}=e,u=(0,o.useRef)(null),d=(0,o.useRef)(new CustomEvent("timestamp").timeStamp);return(0,o.useLayoutEffect)((()=>{const e={click:t,mouseDown:n,touchEnd:r,touchStart:i},o=l?l.current:u.current;return(0,s.addOutsideEventListener)(d.current,o,a,c,e)}),[t,n,r,i,a]),l||u}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>s});var o=n(50959);const s=o.forwardRef(((e,t)=>{const{icon:n="",...s}=e;return o.createElement("span",{...s,ref:t,dangerouslySetInnerHTML:{__html:n}})}))},83021:(e,t,n)=>{"use strict";n.d(t,{SubmenuContext:()=>s,SubmenuHandler:()=>r});var o=n(50959);const s=o.createContext(null);function r(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(null),i=(0,o.useRef)(new Map);return(0,o.useEffect)((()=>()=>{null!==r.current&&clearTimeout(r.current)}),[]),o.createElement(s.Provider,{value:{current:t,setCurrent:function(e){null!==r.current&&(clearTimeout(r.current),r.current=null);null===t?n(e):r.current=setTimeout((()=>{r.current=null,n(e)}),100)},registerSubmenu:function(e,t){return i.current.set(e,t),()=>{i.current.delete(e)}},isSubmenuNode:function(e){return Array.from(i.current.values()).some((t=>t(e)))}}},e.children)}},99663:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>s,SlotContext:()=>r});var o=n(50959);class s extends o.Component{shouldComponentUpdate(){return!1}render(){return o.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const r=o.createContext(null)},59416:(e,t,n)=>{"use strict";n.d(t,{SwitchGroup:()=>i,makeSwitchGroupItem:()=>a});var o=n(50959),s=n(74786);const r=(0,o.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>s.default,subscribe:s.default,unsubscribe:s.default});class i extends o.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{
getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return o.createElement(r.Provider,{value:this.state.switchGroupContext},this.props.children)}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((n=>t.includes(n)?!e.includes(n):e.includes(n)))}}function a(e){var t;return t=class extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return o.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=r,t}},67961:(e,t,n)=>{"use strict";n.d(t,{OverlapManager:()=>r,getRootOverlapManager:()=>a});var o=n(50151);class s{constructor(){this._storage=[]}add(e){this._storage.push(e)}remove(e){this._storage=this._storage.filter((t=>e!==t))}has(e){return this._storage.includes(e)}getItems(){return this._storage}}class r{constructor(e=document){this._storage=new s,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}setContainer(e){const t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,n),this._container=n}registerWindow(e){this._storage.has(e)||this._storage.add(e)}ensureWindow(e,t={position:"fixed",direction:"normal"}){const n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);const o=this._document.createElement("div");if(o.style.position=t.position,o.style.zIndex=this._index.toString(),o.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(o);else if(t.index<=0)this._container.insertBefore(o,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(o,e)}}else"reverse"===t.direction?this._container.insertBefore(o,this._container.firstChild):this._container.appendChild(o);return this._windows.set(e,o),++this._index,o}unregisterWindow(e){this._storage.remove(e);const t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))}getZindex(e){const t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")}moveToTop(e){if(this.getZindex(e)!==this._index){this.ensureWindow(e).style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const i=new WeakMap;function a(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,o.ensureDefined)(i.get(t));{const t=new r(e),n=function(e){
const t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return i.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}},92399:(e,t,n)=>{"use strict";n.d(t,{NumberInputView:()=>I});var o=n(50959),s=n(32563),r=n(97754),i=n(67029),a=n(78274),l=n(86623),c=n(95263),u=n(1405),d=n(12863);const p={large:i.InputClasses.FontSizeLarge,medium:i.InputClasses.FontSizeMedium},h={attachment:u.anchors.top.attachment,targetAttachment:u.anchors.top.targetAttachment,attachmentOffsetY:-4};function m(e){const{className:t,inputClassName:n,stretch:s=!0,errorMessage:i,fontSizeStyle:u="large",endSlot:m,button:v,error:f,warning:g,innerLabel:b,inputReference:C,children:y,...E}=e,w=f&&void 0!==i?[i]:void 0,_=g&&void 0!==i?[i]:void 0,S=r(d.inputContainer,p[u],t),x=b?o.createElement(a.StartSlot,{className:d.innerLabel,interactive:!1},b):void 0,N=m||v||y?o.createElement(a.EndSlot,null,m,v,y):void 0;return o.createElement(l.FormInput,{...E,className:S,inputClassName:n,errors:w,warnings:_,hasErrors:f,hasWarnings:g,messagesPosition:c.MessagesPosition.Attached,customErrorsAttachment:h,messagesRoot:"document",inheritMessagesWidthFromTarget:!0,disableMessagesRtlStyles:!0,iconHidden:!0,stretch:s,reference:C,startSlot:x,endSlot:N})}var v=n(38528),f=n(11542),g=n(9745),b=n(21861),C=n(2948),y=n(21234);function E(e){const t=r(y.control,y.controlIncrease),s=r(y.control,y.controlDecrease);return o.createElement(o.Fragment,null,void 0!==e.title&&o.createElement("div",{className:y.title},e.title),o.createElement("div",{className:y.controlWrapper},(e.defaultButtonsVisible||e.title)&&o.createElement(o.Fragment,null,o.createElement("button",{type:"button",tabIndex:-1,"aria-label":f.t(null,void 0,n(46812)),className:t,onClick:e.increaseValue,onMouseDown:b.preventDefault},o.createElement(g.Icon,{icon:C,className:y.controlIcon})),o.createElement("button",{type:"button",tabIndex:-1,"aria-label":f.t(null,void 0,n(56095)),className:s,onClick:e.decreaseValue,onMouseDown:b.preventDefault},o.createElement(g.Icon,{icon:C,className:y.controlIcon})))))}var w=n(70412),_=n(29202),S=n(47201),x=n(68335);const N=[38],T=[40];function I(e){const[t,n]=(0,w.useHover)(),[r,i]=(0,_.useFocus)(),a=(0,o.useRef)(null),l=(0,S.createSafeMulticastEventHandler)(i.onFocus,e.onFocus),c=(0,S.createSafeMulticastEventHandler)(i.onBlur,e.onBlur),u=(0,o.useCallback)((t=>{!e.disabled&&r&&(t.preventDefault(),t.deltaY<0?e.onValueByStepChange(1):e.onValueByStepChange(-1))}),[r,e.disabled,e.onValueByStepChange]);return o.createElement(m,{...n,id:e.id,name:e.name,pattern:e.pattern,borderStyle:e.borderStyle,fontSizeStyle:e.fontSizeStyle,value:e.value,className:e.className,inputClassName:e.inputClassName,autoComplete:e.autoComplete,button:function(){const{button:n,forceShowControls:i,disabled:a,title:l}=e,c=!a&&!s.mobiletouch&&(i||r||t);return a?void 0:o.createElement(o.Fragment,null,null!=n?n:o.createElement(E,{increaseValue:d,decreaseValue:p,defaultButtonsVisible:c,title:l}))}(),disabled:e.disabled,
@@ -13,7 +13,7 @@ onFocus:x.onFocus,onBlur:x.onBlur,disabled:b},"function"==typeof t?t(w,S):t),o.c
const{className:t,selectOpacity:n=void 0!==e.opacity,thickness:s,color:i,disabled:a,opacity:l=1,onColorChange:c,onOpacityChange:u,onThicknessChange:d,thicknessItems:p,onPopupClose:h,"data-name":m}=e,[g,b,C]=(0,f.useCustomColors)();return o.createElement(v,{className:t,disabled:a,color:"mixed"!==i?i:null,selectOpacity:n,opacity:l,selectCustom:!0,customColors:g,onColorChange:c,onOpacityChange:i?u:void 0,onAddColor:b,onRemoveCustomColor:C,button:function(e,t){const n=e||t,c=n?"primary":"default";return o.createElement("div",{className:r()(T.colorPickerWrap,T[`intent-${c}`],T["border-thin"],T["size-medium"],n&&T.highlight,n&&T.focused,a&&T.disabled),"data-role":"button","data-name":s?"color-with-thickness-select":"color-select"},o.createElement("div",{className:r()(T.colorPicker,a&&T.disabled)},i&&"mixed"!==i?function(){const e=k(i,l),t=l>=.95&&B(i);return o.createElement("div",{className:T.opacitySwatch},o.createElement("div",{style:{backgroundColor:e},className:r()(T.swatch,t&&T.white)}))}():o.createElement("div",{className:T.placeholderContainer},o.createElement("div",{className:"mixed"===i?T.mixedColor:T.placeholder})),s&&function(){const e=i&&"mixed"!==i?k(i,l):void 0;if("mixed"===s)return o.createElement("div",{className:T.multiWidth},o.createElement("div",{style:{backgroundColor:e},className:T.line}),o.createElement("div",{style:{backgroundColor:e},className:T.line}),o.createElement("div",{style:{backgroundColor:e},className:T.line}));return o.createElement("span",{className:r()(T.colorLine,B(i)&&T.white),style:{height:s,backgroundColor:e}})}()),n&&o.createElement("span",{className:T.shadow}))},onPopupClose:h,"data-name":m},s&&p&&o.createElement(N,{value:s,items:p,onChange:function(e){d&&d(e)}}))}function k(e,t){return e?(0,g.generateColor)(e,(0,g.alphaToTransparency)(t),!0):"#000000"}function B(e){return!!e&&e.toLowerCase()===b.white}},48897:(e,t,n)=>{"use strict";n.d(t,{SymbolInputsButton:()=>x});var o=n(50959),s=n(97754),r=n.n(s),i=n(11542),a=n(50151),l=n(50655),c=n(95711),u=n(14483),d=n(55141),p=n(65106),h=n(1861),m=n(9745),v=n(10600),f=n(60015);function g(e){const{value:t,onClick:n,className:r,startSlot:i,disabled:a=!1}=e;return o.createElement("div",{className:s(f.wrap,a&&f.disabled,r),onClick:n,"data-name":"edit-button"},o.createElement("div",{className:s(f.text,"apply-overflow-tooltip")},void 0!==i&&i,o.createElement("span",null,t)),o.createElement(m.Icon,{icon:v,className:f.icon}))}var b=n(31356),C=n(78260),y=n(44254),E=n(15983),w=n(82708),_=n(69006);function S(e){const{symbol:t,onSymbolChanged:s,disabled:a,className:d}=e,[m,v]=(0,o.useState)(t),f=(0,o.useContext)(l.SlotContext),b=(0,o.useContext)(c.PopupContext);return o.createElement(g,{value:m,onClick:function(){const e=function(e){const t=(0,y.tokenize)(e);return(0,E.isSpread)(t)}(m)?m:(0,w.safeShortName)(m),t=(0,p.getSymbolSearchCompleteOverrideFunction)();(0,h.showSymbolSearchItemsDialog)({onSearchComplete:e=>{t(e[0].symbol,e[0].result).then((e=>{s(e.symbol),v(e.name)}))},dialogTitle:i.t(null,void 0,n(23398)),defaultValue:e,manager:f,onClose:()=>{
b&&b.focus()},showSpreadActions:u.enabled("show_spread_operators")&&u.enabled("studies_symbol_search_spread_operators")})},disabled:a,className:r()(d,u.enabled("uppercase_instrument_names")&&_.uppercase)})}function x(e){if("definition"in e){const{propType:t,properties:n,id:s,title:r="",solutionId:i}=e.definition,l=n[t],c=l.value()||"",u=e=>{l.setValue(e)};return o.createElement(b.CommonSection,{id:s,title:r,solutionId:i},o.createElement(C.CellWrap,null,o.createElement(S,{symbol:(0,a.ensureDefined)(c),onSymbolChanged:u})))}{const{study:t,value:n,input:{id:s,name:i},onChange:l,disabled:c,hasTooltip:u}=e,p=e=>{const n=(0,d.getInternalSymbolName)(e,t);l(n,s,i)};return o.createElement(S,{symbol:(0,a.ensureDefined)(n),onSymbolChanged:p,disabled:c,className:r()(u&&_.hasTooltip)})}}},1861:(e,t,n)=>{"use strict";n.d(t,{showSymbolSearchItemsDialog:()=>l});var o=n(50959),s=n(962),r=n(50655),i=n(51826),a=n(22350);function l(e){const{initialMode:t="symbolSearch",autofocus:n=!0,defaultValue:l,showSpreadActions:c,selectSearchOnInit:u,onSearchComplete:d,dialogTitle:p,placeholder:h,fullscreen:m,initialScreen:v,wrapper:f,dialog:g,contentItem:b,onClose:C,onOpen:y,footer:E,symbolTypes:w,searchInput:_,emptyState:S,hideMarkedListFlag:x,dialogWidth:N="auto",manager:T,shouldReturnFocus:I,onSymbolFiltersParamsChange:k,onEmptyResults:B}=e;if(i.dialogsOpenerManager.isOpened("SymbolSearch")||i.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const P=document.createElement("div"),D=o.createElement(r.SlotContext.Provider,{value:null!=T?T:null},o.createElement(a.SymbolSearchItemsDialog,{onClose:M,initialMode:t,defaultValue:l,showSpreadActions:c,hideMarkedListFlag:x,selectSearchOnInit:u,onSearchComplete:d,dialogTitle:p,placeholder:h,fullscreen:m,initialScreen:v,wrapper:f,dialog:g,contentItem:b,footer:E,symbolTypes:w,searchInput:_,emptyState:S,autofocus:n,dialogWidth:N,shouldReturnFocus:I,onSymbolFiltersParamsChange:k,onEmptyResults:B}));function M(){s.unmountComponentAtNode(P),i.dialogsOpenerManager.setAsClosed("SymbolSearch"),C&&C()}return s.render(D,P),i.dialogsOpenerManager.setAsOpened("SymbolSearch"),y&&y(),{close:M}}},50238:(e,t,n)=>{"use strict";n.d(t,{useRovingTabindexElement:()=>i});var o=n(50959),s=n(39416),r=n(16838);function i(e,t=[]){const[n,i]=(0,o.useState)(!1),a=(0,s.useFunctionalRefObject)(e);return(0,o.useLayoutEffect)((()=>{if(!r.PLATFORM_ACCESSIBILITY_ENABLED)return;const e=a.current;if(null===e)return;const t=e=>{switch(e.type){case"roving-tabindex:main-element":i(!0);break;case"roving-tabindex:secondary-element":i(!1)}};return e.addEventListener("roving-tabindex:main-element",t),e.addEventListener("roving-tabindex:secondary-element",t),()=>{e.removeEventListener("roving-tabindex:main-element",t),e.removeEventListener("roving-tabindex:secondary-element",t)}}),t),[a,r.PLATFORM_ACCESSIBILITY_ENABLED?n?0:-1:void 0]}},59369:(e,t,n)=>{"use strict";n.d(t,{useRowsNavigation:()=>c});var o=n(50959),s=n(50151),r=n(16838),i=n(68335),a=n(71468);const l=[37,39,38,40];function c(e){const t=(0,o.useRef)(null);return(0,
o.useLayoutEffect)((()=>{if(!r.PLATFORM_ACCESSIBILITY_ENABLED)return;const e=(0,s.ensureNotNull)(t.current),n=()=>{const n=(0,r.queryTabbableElements)(e).sort(r.navigationOrderComparator);if(0===n.length||n[0].parentElement&&!p(n[0].parentElement,(0,s.ensureNotNull)(t.current))){const o=function(e){const n=d(e).sort(r.navigationOrderComparator).find((e=>p(e,(0,s.ensureNotNull)(t.current))));if(!n)return null;const o=Array.from(n.children);if(!o.length)return null;return o[0]}(e);if(null===o)return;if((0,a.becomeMainElement)(o),n.length>0)for(const e of n)(0,a.becomeSecondaryElement)(e)}};return window.addEventListener("keyboard-navigation-activation",n),n(),()=>window.removeEventListener("keyboard-navigation-activation",n)}),[]),[t,function(t){if(!r.PLATFORM_ACCESSIBILITY_ENABLED)return;if(t.defaultPrevented)return;const n=(0,i.hashFromEvent)(t);if(!l.includes(n))return;const o=document.activeElement;if(!(o instanceof HTMLElement))return;const s=t.currentTarget;let a,c;if(e){const e=o.parentElement;a=e?Array.from(e.children):[],c=a.indexOf(o)}else a=(p=s,Array.from(p.querySelectorAll("button:not([disabled]):not([aria-disabled])")).filter((0,r.createScopedVisibleElementFilter)(p))).sort(r.navigationOrderComparator),c=a.indexOf(o);var p;if(0===a.length||-1===c)return;const m=(0,r.mapKeyCodeToDirection)(n);switch(m){case"inlinePrev":if(t.preventDefault(),!e&&0===c)break;h(u(a,c,-1));break;case"inlineNext":if(t.preventDefault(),!e&&c===a.length-1)break;h(u(a,c,1));break;case"blockPrev":case"blockNext":(n=>{if(!document.activeElement)return;const o=d(s),r=document.activeElement.parentElement;if(!r)return;const i=Array.from(r.children).indexOf(document.activeElement);if(-1===i)return;const a=o["blockNext"===n?o.indexOf(r)+1:o.indexOf(r)-1];if(!a)return;t.preventDefault();const l=Array.from(a.children);l.length&&(!e&&i<=l.length-1?h(l[i]):h(l[0]))})(m)}}]}function u(e,t,n){return e[(t+e.length+n)%e.length]}function d(e){return Array.from(e.querySelectorAll('[data-role="row"]')).filter((0,r.createScopedVisibleElementFilter)(e))}function p(e,t){const n=(0,s.ensureNotNull)(e.parentElement).offsetTop,o=n+(0,s.ensureNotNull)(e.parentElement).clientHeight,r=t.scrollTop,i=r+t.clientHeight;return n>=r&&o<=i}function h(e){document.activeElement&&(0,a.becomeSecondaryElement)(document.activeElement),(0,a.becomeMainElement)(e),e.focus()}},73146:(e,t,n)=>{"use strict";n.d(t,{createAdapter:()=>r});var o=n(92249),s=n(28853);function r(e){if((0,o.isLineTool)(e))return{isPine:()=>!1,isStandardPine:()=>!1,canOverrideMinTick:()=>!1,resolvedSymbolInfoBySymbol:()=>{throw new TypeError("Only study is supported.")},symbolsResolved:()=>{throw new TypeError("Only study is supported.")},parentSources:()=>{throw new TypeError("Only study is supported.")},getAllChildren:()=>[],sourceId:()=>{throw new TypeError("Only study is supported.")},inputs:()=>({}),parentSourceForInput:()=>{throw new TypeError("Only study is supported.")}};if((0,s.isStudy)(e))return e;if("isInputsStudy"in e)return e;throw new TypeError("Unsupported source type.")}},
45560:(e,t,n)=>{"use strict";n.d(t,{useDefinitionProperty:()=>r});var o=n(50959),s=n(71953);const r=e=>{const t="property"in e?e.property:void 0,n="defaultValue"in e?e.defaultValue:e.property.value(),[r,i]=(0,o.useState)(t?t.value():n);(0,o.useEffect)((()=>{if(t){const n={};return i(t.value()),t.subscribe(n,(t=>{const n=t.value();e.handler&&e.handler(n),i(n)})),()=>{t.unsubscribeAll(n)}}return()=>{}}),[t]);return[r,e=>{if(void 0!==t){const n=t.value();s.logger.logNormal(`Changing property value from "${n}" to "${e}"`),t.setValue(e)}}]}},78260:(e,t,n)=>{"use strict";n.d(t,{CellWrap:()=>a});var o=n(50959),s=n(97754),r=n.n(s),i=n(2746);function a(e){return o.createElement("div",{className:r()(i.wrap,e.className)},e.children)}},53424:(e,t,n)=>{"use strict";n.d(t,{CheckableTitle:()=>c});var o=n(50959),s=n(15294),r=n(45560);function i(e){const{property:t,...n}=e,[i,a]=(0,r.useDefinitionProperty)({property:t}),l="mixed"===i;return o.createElement(s.Checkbox,{...n,name:"toggle-enabled",checked:l||i,indeterminate:l,onChange:function(){a("mixed"===i||!i)}})}var a=n(78260),l=n(25679);function c(e){const{property:t,disabled:n,title:s,className:r,name:c}=e,u=o.createElement("span",{className:l.title},s);return o.createElement(a.CellWrap,{className:r},t?o.createElement(i,{name:c,className:l.checkbox,property:t,disabled:n,label:u,labelAlignBaseline:!0}):u)}},31356:(e,t,n)=>{"use strict";n.d(t,{CommonSection:()=>i});var o=n(50959),s=n(11062),r=n(53424);n(41125);function i(e){const{id:t,offset:n,disabled:i,checked:a,title:l,children:c,solutionId:u}=e;return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:n,"data-section-name":t,colSpan:Boolean(c)?void 0:2,checkableTitle:!0},o.createElement(r.CheckableTitle,{name:`is-enabled-${t}`,title:l,disabled:i,property:a}),u&&!Boolean(c)&&!1),Boolean(c)&&o.createElement(s.PropertyTable.Cell,{placement:"last","data-section-name":t},c,u&&!1))}},86067:(e,t,n)=>{"use strict";n.d(t,{GroupTitleSection:()=>a});var o=n(50959),s=n(11062),r=n(53424),i=n(69750);function a(e){return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{className:i.titleWrap,placement:"first",verticalAlign:"adaptive",colSpan:2,"data-section-name":e.name,checkableTitle:!0},o.createElement(r.CheckableTitle,{title:e.title,name:`is-enabled-${e.name}`,className:i.title})))}},71953:(e,t,n)=>{"use strict";n.d(t,{logger:()=>o});const o=(0,n(59224).getLogger)("Platform.GUI.PropertyDefinitionTrace")},35789:(e,t,n)=>{"use strict";n.d(t,{ColorPicker:()=>U});var o=n(50959),s=n(97754),r=n.n(s),i=n(11542),a=n(16838),l=n(59369),c=n(43688),u=n(93532),d=n(45582),p=Math.ceil,h=Math.max;const m=function(e,t,n){t=(n?(0,u.default)(e,t,n):void 0===t)?1:h((0,d.default)(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,r=0,i=Array(p(o/t));s<o;)i[r++]=(0,c.default)(e,s,s+=t);return i};var v=n(24377),f=n(50151),g=n(49483),b=n(20520),C=n(16396),y=n(6914),E=n(50238),w=n(35149),_=n(87466);function S(e){
45560:(e,t,n)=>{"use strict";n.d(t,{useDefinitionProperty:()=>r});var o=n(50959),s=n(71953);const r=e=>{const t="property"in e?e.property:void 0,n="defaultValue"in e?e.defaultValue:e.property.value(),[r,i]=(0,o.useState)(t?t.value():n);(0,o.useEffect)((()=>{if(t){const n={};return i(t.value()),t.subscribe(n,(t=>{const n=t.value();e.handler&&e.handler(n),i(n)})),()=>{t.unsubscribeAll(n)}}return()=>{}}),[t]);return[r,e=>{if(void 0!==t){const n=t.value();s.logger.logNormal(`Changing property value from "${n}" to "${e}"`),t.setValue(e)}}]}},78260:(e,t,n)=>{"use strict";n.d(t,{CellWrap:()=>a});var o=n(50959),s=n(97754),r=n.n(s),i=n(2746);function a(e){return o.createElement("div",{className:r()(i.wrap,e.className)},e.children)}},53424:(e,t,n)=>{"use strict";n.d(t,{CheckableTitle:()=>c});var o=n(50959),s=n(32389),r=n(45560);function i(e){const{property:t,...n}=e,[i,a]=(0,r.useDefinitionProperty)({property:t}),l="mixed"===i;return o.createElement(s.Checkbox,{...n,name:"toggle-enabled",checked:l||i,indeterminate:l,onChange:function(){a("mixed"===i||!i)}})}var a=n(78260),l=n(25679);function c(e){const{property:t,disabled:n,title:s,className:r,name:c}=e,u=o.createElement("span",{className:l.title},s);return o.createElement(a.CellWrap,{className:r},t?o.createElement(i,{name:c,className:l.checkbox,property:t,disabled:n,label:u,labelAlignBaseline:!0}):u)}},31356:(e,t,n)=>{"use strict";n.d(t,{CommonSection:()=>i});var o=n(50959),s=n(11062),r=n(53424);n(41125);function i(e){const{id:t,offset:n,disabled:i,checked:a,title:l,children:c,solutionId:u}=e;return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:n,"data-section-name":t,colSpan:Boolean(c)?void 0:2,checkableTitle:!0},o.createElement(r.CheckableTitle,{name:`is-enabled-${t}`,title:l,disabled:i,property:a}),u&&!Boolean(c)&&!1),Boolean(c)&&o.createElement(s.PropertyTable.Cell,{placement:"last","data-section-name":t},c,u&&!1))}},86067:(e,t,n)=>{"use strict";n.d(t,{GroupTitleSection:()=>a});var o=n(50959),s=n(11062),r=n(53424),i=n(69750);function a(e){return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{className:i.titleWrap,placement:"first",verticalAlign:"adaptive",colSpan:2,"data-section-name":e.name,checkableTitle:!0},o.createElement(r.CheckableTitle,{title:e.title,name:`is-enabled-${e.name}`,className:i.title})))}},71953:(e,t,n)=>{"use strict";n.d(t,{logger:()=>o});const o=(0,n(59224).getLogger)("Platform.GUI.PropertyDefinitionTrace")},35789:(e,t,n)=>{"use strict";n.d(t,{ColorPicker:()=>U});var o=n(50959),s=n(97754),r=n.n(s),i=n(11542),a=n(16838),l=n(59369),c=n(43688),u=n(93532),d=n(45582),p=Math.ceil,h=Math.max;const m=function(e,t,n){t=(n?(0,u.default)(e,t,n):void 0===t)?1:h((0,d.default)(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,r=0,i=Array(p(o/t));s<o;)i[r++]=(0,c.default)(e,s,s+=t);return i};var v=n(24377),f=n(50151),g=n(49483),b=n(20520),C=n(16396),y=n(6914),E=n(50238),w=n(35149),_=n(87466);function S(e){
const{color:t,selected:r,onSelect:l,onSwatchRemove:c}=e,[u,d]=(0,o.useState)(!1),[p,h]=(0,E.useRovingTabindexElement)(null),m=Boolean(c)&&!g.CheckMobile.any();return o.createElement(o.Fragment,null,o.createElement("button",{ref:p,style:t?{color:t}:void 0,className:s(_.swatch,a.PLATFORM_ACCESSIBILITY_ENABLED&&_.accessible,u&&_.hover,r&&_.selected,!t&&_.empty,String(t).toLowerCase()===y.white&&_.white),onClick:function(){l(t)},onContextMenu:m?v:void 0,tabIndex:h,"data-role":"swatch"}),m&&o.createElement(b.PopupMenu,{isOpened:u,onClose:v,position:function(){const e=(0,f.ensureNotNull)(p.current).getBoundingClientRect();return{x:e.left,y:e.top+e.height+4}},onClickOutside:v},o.createElement(C.PopupMenuItem,{className:_.contextItem,label:i.t(null,void 0,n(54336)),icon:w,onClick:function(){v(),(0,f.ensureDefined)(c)()},dontClosePopup:!0})));function v(){d(!u)}}function x(e){const{colors:t,color:n,children:s,onSelect:r,onRemoveCustomColor:i}=e;if(!t)return null;const a=n?(0,v.parseRgb)(String(n)):void 0,l=m(t,10);return o.createElement("div",{className:_.swatches},l.map(((e,t)=>o.createElement("div",{className:_.row,"data-role":"row",key:t},e.map(((e,n)=>o.createElement(S,{key:String(e)+n,color:e,selected:a&&(0,v.areEqualRgb)(a,(0,v.parseRgb)(String(e))),onSelect:c,onSwatchRemove:i?()=>function(e,t){const n=10*e+t;null==i||i(n)}(t,n):void 0})))))),s);function c(e){r&&r(e)}}var N=n(54368),T=n(94720);function I(e){const t=`Invalid RGB color: ${e}`;if(null===e)throw new Error(t);const n=e.match(/^#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i);if(null===n)throw new Error(t);const[,o,s,r]=n;if(!o||!s||!r)throw new Error(t);const i=parseInt(o,16)/255,a=parseInt(s,16)/255,l=parseInt(r,16)/255,c=Math.max(i,a,l),u=Math.min(i,a,l);let d;const p=c,h=c-u,m=0===c?0:h/c;if(c===u)d=0;else{switch(c){case i:d=(a-l)/h+(a<l?6:0);break;case a:d=(l-i)/h+2;break;case l:d=(i-a)/h+4;break;default:d=0}d/=6}return{h:d,s:m,v:p}}var k=n(43370),B=n(68335),P=n(37160),D=n(35257);const M=[37,39,38,40],O=.01;class R extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=e=>{this._container=e},this._handlePosition=e=>{const{hsv:{h:t},onChange:n}=this.props;if(!n)return;const o=(0,f.ensureNotNull)(this._container).getBoundingClientRect(),s=e.clientX-o.left,r=e.clientY-o.top;n({h:t,s:(0,P.clamp)(s/o.width,0,1),v:(0,P.clamp)(1-r/o.height,0,1)})},this._handleKeyDown=e=>{const{hsv:{h:t,s:n,v:o},onChange:s}=this.props,r=(0,B.hashFromEvent)(e);if(!s||!M.includes(r))return;if(37===r||39===r){return void s({h:t,s:(0,P.clamp)(37===r?n-O:n+O,0,1),v:o})}s({h:t,s:n,v:(0,P.clamp)(40===r?o-O:o+O,0,1)})},this._mouseDown=e=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},this._mouseUp=e=>{window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(e)},this._mouseMove=(0,k.default)(this._handlePosition,100),this._handleTouch=e=>{this._handlePosition(e.nativeEvent.touches[0])}}render(){
const{className:e,hsv:{h:t,s:n,v:s}}=this.props,i=`hsl(${360*t}, 100%, 50%)`;return o.createElement("div",{tabIndex:a.PLATFORM_ACCESSIBILITY_ENABLED?0:-1,className:r()(a.PLATFORM_ACCESSIBILITY_ENABLED&&D.accessible,e),onKeyDown:this._handleKeyDown},o.createElement("div",{className:D.saturation,style:{backgroundColor:i},ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:D.pointer,style:{left:100*n+"%",top:100*(1-s)+"%"}})))}}var L=n(1369);class A extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=e=>{this._container=e},this._handlePosition=e=>{const{hsv:{s:t,v:n},onChange:o}=this.props;if(!o)return;const s=(0,f.ensureNotNull)(this._container).getBoundingClientRect(),r=e.clientY-s.top;o({h:(0,P.clamp)(r/s.height,0,1),s:t,v:n})},this._handleKeyDown=e=>{const{hsv:{h:t,s:n,v:o},onChange:s}=this.props,r=(0,B.hashFromEvent)(e);if(!s||38!==r&&40!==r)return;s({h:(0,P.clamp)(38===r?t-.01:t+.01,0,1),s:n,v:o})},this._mouseDown=e=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},this._mouseUp=e=>{window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(e)},this._mouseMove=(0,k.default)(this._handlePosition,100),this._handleTouch=e=>{this._handlePosition(e.nativeEvent.touches[0])}}render(){const{className:e,hsv:{h:t}}=this.props;return o.createElement("div",{className:r()(L.hue,a.PLATFORM_ACCESSIBILITY_ENABLED&&L.accessible,e),tabIndex:a.PLATFORM_ACCESSIBILITY_ENABLED?0:-1,onKeyDown:this._handleKeyDown},o.createElement("div",{className:L.pointerContainer,ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:L.pointer,style:{top:100*t+"%"}})))}}var F=n(80679);const W="#000000",V=i.t(null,{context:"Color Picker"},n(40276));class z extends o.PureComponent{constructor(e){super(e),this._inputRef=o.createRef(),this._handleHSV=e=>{const t=function(e){const{h:t,s:n,v:o}=e;let s,r,i;const a=Math.floor(6*t),l=6*t-a,c=o*(1-n),u=o*(1-l*n),d=o*(1-(1-l)*n);switch(a%6){case 0:s=o,r=d,i=c;break;case 1:s=u,r=o,i=c;break;case 2:s=c,r=o,i=d;break;case 3:s=c,r=u,i=o;break;case 4:s=d,r=c,i=o;break;case 5:s=o,r=c,i=u;break;default:s=0,r=0,i=0}return"#"+[255*s,255*r,255*i].map((e=>("0"+Math.round(e).toString(16)).replace(/.+?([a-f0-9]{2})$/i,"$1"))).join("")}(e)||W;this.setState({color:t,inputColor:t.replace(/^#/,""),hsv:e}),this.props.onSelect(t)},this._handleInput=e=>{const t=e.currentTarget.value;try{const e=I(t),n=`#${t}`;this.setState({color:n,inputColor:t,hsv:e}),this.props.onSelect(n)}catch(e){this.setState({inputColor:t})}},this._handleAddColor=()=>this.props.onAdd(this.state.color);const t=e.color||W;this.state={color:t,inputColor:t.replace(/^#/,""),hsv:I(t)}}componentDidMount(){var e
;a.PLATFORM_ACCESSIBILITY_ENABLED&&!g.CheckMobile.any()&&(null===(e=this._inputRef.current)||void 0===e||e.focus())}render(){const{color:e,hsv:t,inputColor:n}=this.state;return o.createElement("div",{className:F.container},o.createElement("div",{className:F.form},o.createElement("div",{className:F.swatch,style:{backgroundColor:e}}),o.createElement("div",{className:F.inputWrap},o.createElement("span",{className:F.inputHash},"#"),o.createElement("input",{ref:this._inputRef,type:"text",className:F.input,value:n,onChange:this._handleInput})),o.createElement("div",{className:F.buttonWrap},o.createElement(T.Button,{size:"s",onClick:this._handleAddColor},V))),o.createElement("div",{className:F.hueSaturationWrap},o.createElement(R,{className:F.saturation,hsv:t,onChange:this._handleHSV}),o.createElement(A,{className:F.hue,hsv:t,onChange:this._handleHSV})))}}var q=n(93402);const K=i.t(null,{context:"Color Picker"},n(53585)),H=i.t(null,{context:"Color Picker"},n(81865));function U(e){const{color:t,opacity:n,selectCustom:s,selectOpacity:i,customColors:c,onRemoveCustomColor:u,onToggleCustom:d,onOpacityChange:p,menu:h}=e,[m,v]=(0,o.useState)(!1),f="number"==typeof n?n:1,[g,b]=(0,l.useRowsNavigation)();return(0,o.useLayoutEffect)((()=>{h&&h.update()}),[i,h]),m?o.createElement(z,{color:t,onSelect:C,onAdd:function(t){v(!1),null==d||d(!1);const{onAddColor:n}=e;n&&n(t)}}):o.createElement("div",{className:q.container},o.createElement("div",{ref:g,onKeyDown:b},o.createElement(x,{colors:y.basic,color:t,onSelect:C}),o.createElement(x,{colors:y.extended,color:t,onSelect:C}),o.createElement("div",{className:q.separator}),o.createElement(x,{colors:c,color:t,onSelect:C,onRemoveCustomColor:u},s&&o.createElement(o.Fragment,null,a.PLATFORM_ACCESSIBILITY_ENABLED?(null==c?void 0:c.length)?o.createElement("button",{title:K,onClick:E,className:r()(q.customButton,q.accessible,"apply-common-tooltip"),tabIndex:-1}):o.createElement("div",{"data-role":"row"},o.createElement("button",{title:K,onClick:E,className:r()(q.customButton,q.accessible,"apply-common-tooltip"),tabIndex:-1})):o.createElement("div",{className:r()(q.customButton,"apply-common-tooltip"),onClick:E,title:K,tabIndex:-1})))),i&&o.createElement(o.Fragment,null,o.createElement("div",{className:q.sectionTitle},H),o.createElement(N.Opacity,{color:t,opacity:f,onChange:function(e){p&&p(e)}})));function C(t){const{onColorChange:n}=e;n&&n(t,m)}function E(e){v(!0),null==d||d(!0)}}},54368:(e,t,n)=>{"use strict";n.d(t,{Opacity:()=>u});var o=n(50959),s=n(97754),r=n(50151),i=n(37160),a=n(68335),l=n(16838),c=n(30099);class u extends o.PureComponent{constructor(e){super(e),this._container=null,this._pointer=null,this._raf=null,this._refContainer=e=>{this._container=e},this._refPointer=e=>{this._pointer=e},this._handlePosition=e=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{const t=(0,r.ensureNotNull)(this._container),n=(0,r.ensureNotNull)(this._pointer),o=t.getBoundingClientRect(),s=n.offsetWidth,a=e.clientX-s/2-o.left,l=(0,i.clamp)(a/(o.width-s),0,1);this.setState({
@@ -31,7 +31,7 @@ className:d()(v.input,v.sessionInputContainer),name:"start",value:(0,r.ensureDef
const{input:e,value:t,disabled:r,hasTooltip:i}=this.props,a=A.Interval.parse(void 0===t?e.defval:t),l=a.isValid()?a.value():t,c=W?W.get().filter((e=>!A.Interval.parse(e).isRange())):[],u=(0,F.mergeResolutions)(V,(0,F.isSecondsEnabled)()?z:[],(0,F.isTicksEnabled)()?q:[],c);return u.unshift(""),s.createElement(B.Select,{id:e.id,className:d()(v.input,v.resolution,i&&v.hasTooltip),menuClassName:d()(v.dropdownMenu,v.resolution),items:(p=u,p.map((e=>({value:e,content:""===e?o.t(null,void 0,n(94551)):(0,F.getTranslatedResolutionModel)(e).hint})))),value:l,onChange:this._onChange,disabled:r});var p}}const H=(0,h.bind)(K);var U=n(41552),Z=n(41594);class G extends s.PureComponent{render(){return s.createElement(k.PropertyContext.Consumer,null,(e=>e?this._getColorInputWithContext(e):null))}_getColorInputWithContext(e){var t;const{input:{id:n},disabled:o,hasTooltip:r}=this.props,{model:i,study:a}=e;if("properties"in a||"tempProperties"in a){const e="properties"in a?a.properties().inputs[n]:null===(t=a.tempProperties)||void 0===t?void 0:t.inputs.child(n);return s.createElement(Z.StylePropertyContainer,{model:i,property:e},s.createElement(U.ColorWithThicknessSelect,{className:d()(r&&v.hasTooltip),color:e,disabled:o}))}return null}}var Y=n(85528),$=n(76056),j=n(23935),Q=n(27365),X=n(93071);const J=(0,h.bind)((function(e){const{value:t,onChange:n,input:o,tzName:r,hasTooltip:i}=e,{id:a,name:l,defval:c}=o,u=(0,s.useMemo)((()=>Number(null!=t?t:c)),[t,c]),p=(0,s.useMemo)((()=>(0,Q.getChartTimezoneOffsetMs)(u,r)),[u,r]),h=(0,s.useMemo)((()=>{const e=new Date(u+p+v(u));return e.setSeconds(0),e}),[u,p]),m=(0,s.useMemo)((()=>(0,j.twoDigitsFormat)(h.getHours())+":"+(0,j.twoDigitsFormat)(h.getMinutes())),[h]);return s.createElement("div",{className:d()(X.container,i&&X.hasTooltip)},s.createElement("div",{className:X.datePickerWrapper},s.createElement(Y.DatePicker,{InputComponent:$.DateInput,initial:h,onPick:function(e){if(null===e)return;const t=new Date(h);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),n(f(t),a,l)},revertInvalidData:!0})),s.createElement("div",{className:X.timePickerWrapper},s.createElement(w.TimeInput,{value:m,onChange:function(e){const[t,o]=e.split(":"),s=new Date(h);s.setHours(Number(t)),s.setMinutes(Number(o)),n(f(s),a,l)}})));function v(e){return 60*new Date(e).getTimezoneOffset()*1e3}function f(e){return e.valueOf()-p-v(u)}}));class ee extends s.PureComponent{render(){const{input:e,disabled:t,onChange:n,tzName:o,hasTooltip:r}=this.props;if((0,i.isStudyInputOptionsInfo)(e))return s.createElement(D,{input:e,disabled:t,onChange:n,hasTooltip:r});switch(e.type){case"integer":return s.createElement(a.IntegerInput,{input:e,disabled:t,onChange:n,hasTooltip:r});case"float":case"price":return s.createElement(l.FloatInput,{input:e,disabled:t,onChange:n,hasTooltip:r});case"bool":return s.createElement(c.BoolInput,{input:e,disabled:t,onChange:n,hasTooltip:r});case"text":return s.createElement(b,{input:e,disabled:t,onChange:n,hasTooltip:r});case"symbol":return s.createElement(C.SymbolInput,{input:e,
disabled:t,onChange:n,hasTooltip:r});case"session":return s.createElement(x,{input:e,disabled:t,onChange:n,hasTooltip:r});case"source":return s.createElement(L,{input:e,disabled:t,onChange:n,hasTooltip:r});case"resolution":return s.createElement(H,{input:e,disabled:t,onChange:n,hasTooltip:r});case"time":return s.createElement(J,{input:e,tzName:o,onChange:n,hasTooltip:r});case"color":return s.createElement(G,{input:e,disabled:t,onChange:n,hasTooltip:r});default:return null}}}var te=n(24150),ne=n(76694);class oe extends s.PureComponent{render(){const{label:e,children:t,input:i,disabled:a,onChange:l,labelAlign:c,grouped:u,tooltip:d,solutionId:p,offset:h}=this.props,m=Boolean(d);return s.createElement(y.PropertyTable.Row,null,s.createElement(y.PropertyTable.Cell,{"data-study-input-name":(null==i?void 0:i.id)&&`${i.id}-label`,placement:"first",verticalAlign:c,grouped:u,offset:h},void 0!==e?e:o.t((0,r.ensureDefined)(i).name,{context:"input"},n(88601))),s.createElement(y.PropertyTable.Cell,{"data-study-input-name":(null==i?void 0:i.id)&&`${i.id}-input`,placement:"last",grouped:u},t||s.createElement(ee,{input:(0,r.ensureDefined)(i),onChange:l,disabled:a,hasTooltip:m}),m&&s.createElement(ne.IconGroupWrapper,null,d&&s.createElement(te.InputTooltip,{title:d}),!1)))}}},39828:(e,t,n)=>{"use strict";n.d(t,{InputsTabContent:()=>V});var o,s=n(50959),r=n(50151),i=n(11542),a=n(76917),l=n(11062),c=n(59416),u=n(97754),d=n.n(u),p=n(88400),h=n.n(p);const m=(0,c.makeSwitchGroupItem)(((o=class extends s.PureComponent{constructor(){super(...arguments),this._onChange=()=>{this.props.onChange&&this.props.onChange(this.props.value)}}render(){const e=u(this.props.className,h().radio,{[h().reverse]:Boolean(this.props.labelPositionReverse)}),t=u(h().label,{[h().disabled]:this.props.disabled}),n=u(h().box,{[h().noOutline]:-1===this.props.tabIndex});let o=null;return this.props.label&&(o=s.createElement("span",{className:t},this.props.label)),s.createElement("label",{className:e},s.createElement("span",{className:h().wrapper,title:this.props.title},s.createElement("input",{id:this.props.id,tabIndex:this.props.tabIndex,autoFocus:this.props.autoFocus,role:this.props.role,className:h().input,type:"radio",name:this.props.name,checked:this.props.checked,disabled:this.props.disabled,value:this.props.value,onChange:this._onChange,ref:this.props.reference,"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"]}),s.createElement("span",{className:n})),o)}}).defaultProps={value:"on"},o));var v=n(55141),f=n(83207),g=n(24150),b=n(76694),C=n(27698);function y(e){const{children:t,input:o,disabled:u,onChange:d,grouped:p,tooltip:h,solutionId:y}=e,E=(0,s.useContext)(a.PropertyContext),{values:w,setValue:_}=(0,r.ensureNotNull)(E),S=w[o.id],[x,N]=(0,s.useState)(S?"another-symbol":"main-symbol"),[T,I]=(0,s.useState)(S),k=Boolean(h);return(0,s.useEffect)((()=>{S&&I(S)}),[S]),s.createElement(c.SwitchGroup,{name:`symbol-source-${o.id}`,values:[x],onChange:function(e){N(e),"main-symbol"===e?(0,
f.setter)(_)("",o.id,o.name):"another-symbol"===e&&T&&(0,f.setter)(_,d)(T,o.id,o.name)}},s.createElement(l.PropertyTable.Row,null,s.createElement(l.PropertyTable.Cell,{colSpan:2,placement:"first",grouped:p,"data-study-input-name":(null==o?void 0:o.id)&&`${o.id}-main-symbol`},s.createElement(m,{value:"main-symbol",className:C.checkbox,disabled:u,label:s.createElement("span",{className:C.label},i.t(null,{context:"input"},n(88046)))}))),s.createElement(l.PropertyTable.Row,null,s.createElement(l.PropertyTable.Cell,{placement:"first",grouped:p,"data-study-input-name":(null==o?void 0:o.id)&&`${o.id}-another-symbol-label`},s.createElement(m,{value:"another-symbol",className:C.checkbox,disabled:u,label:s.createElement("span",{className:C.label},i.t(null,{context:"input"},n(73755)))})),s.createElement(l.PropertyTable.Cell,{placement:"last",grouped:p,"data-study-input-name":(null==o?void 0:o.id)&&`${o.id}-another-symbol-input`},t||s.createElement(v.SymbolInput,{input:(0,r.ensureDefined)(o),onChange:d,disabled:u||"main-symbol"===x,hasTooltip:k}),k&&s.createElement(b.IconGroupWrapper,null,h&&s.createElement(g.InputTooltip,{title:h}),!1))))}var E=n(4781);class w extends s.PureComponent{render(){const{label:e,input:t,tooltip:n,solutionId:o}=this.props,r=Boolean(n);return s.createElement(l.PropertyTable.Row,null,s.createElement(l.PropertyTable.Cell,{placement:"first",colSpan:2,"data-study-input-name":(null==t?void 0:t.id)&&`${t.id}-checkbox`},s.createElement(E.BoolInput,{label:e,input:t,hasTooltip:r}),r&&s.createElement(b.IconGroupWrapper,null,n&&s.createElement(g.InputTooltip,{title:n}),!1)))}}var _=n(12949),S=n(2568),x=n(67029),N=n(90009);class T extends s.PureComponent{constructor(){super(...arguments),this._onChange=e=>{const{input:{id:t,name:n},onChange:o}=this.props;o(e.currentTarget.value,t,n)}}render(){const{input:{defval:e},value:t,disabled:n,onBlur:o,onKeyDown:r}=this.props;return s.createElement(S.Textarea,{className:d()(C.input,C.textarea,x.InputClasses.FontSizeMedium),value:void 0===t?e:t,onChange:this._onChange,onBlur:o,onKeyDown:r,disabled:n,maxLength:4096})}}const I=(0,N.debounced)(T),k=(0,f.bind)(I);var B=n(80128);function P(e){const{input:t,label:n,tooltip:o,solutionId:r}=e,i=Boolean(o);return s.createElement(l.PropertyTable.Row,null,s.createElement(l.PropertyTable.Cell,{placement:"first",colSpan:2,className:B.wrap,"data-study-input-name":(null==t?void 0:t.id)&&`${t.id}-textarea`},s.createElement("div",{className:B.labelWrap},s.createElement("span",{className:d()(B.label,i&&B.hasTooltip)},n),i&&s.createElement(b.IconGroupWrapper,null,o&&s.createElement(g.InputTooltip,{title:o}),!1)),s.createElement(k,{input:t})))}function D(e){const{input:t,tooltip:o,solutionId:r}=e;return"symbol"===t.type&&t.optional?s.createElement(y,{input:t,tooltip:o,solutionId:r}):"bool"===t.type?s.createElement(w,{label:i.t(t.name,{context:"input"},n(88601)),input:t,tooltip:o,solutionId:r}):"text_area"===t.type?s.createElement(P,{label:i.t(t.name,{context:"input"},n(88601)),input:t,tooltip:o,solutionId:r}):s.createElement(_.InputRow,{
labelAlign:function(e){switch(e){case"session":return"adaptive";case"time":return"topCenter";default:return}}(t.type),input:t,tooltip:o,solutionId:r})}var M=n(86067),O=n(17611);function R(e){const{content:t}=e;let n;return s.createElement(l.PropertyTable.InlineRowContext.Provider,{value:!0},s.createElement("div",{className:O.inlineRow},t.children.map(((e,o)=>(void 0!==e.tooltip&&(n=e.tooltip),s.createElement(D,{key:e.id,input:e,tooltip:o===t.children.length-1?n:void 0}))))))}var L=n(64420),A=n(26278);function F(e){const{content:t}=e;return(0,L.isGroup)(t)?(0,L.isInputInlines)(t)?s.createElement(R,{content:t}):s.createElement(s.Fragment,null,s.createElement("div",{className:A.titleWrap},s.createElement(M.GroupTitleSection,{title:i.t(t.id,{context:"input"},n(88601)),name:t.id})),t.children.map((e=>(0,L.isGroup)(e)?s.createElement(R,{key:e.id,content:e}):s.createElement(D,{key:e.id,input:e,tooltip:e.tooltip,solutionId:e.solutionId}))),s.createElement("div",{className:A.groupFooter})):s.createElement(D,{input:t,tooltip:t.tooltip,solutionId:t.solutionId})}const W={offset:i.t(null,void 0,n(89298))};class V extends s.PureComponent{render(){const{reference:e,inputs:t,property:n,study:o,studyMetaInfo:i,model:a,onStudyInputChange:c,className:u}=this.props,{offset:d,offsets:p}=n;return s.createElement(l.PropertyTable,{reference:e,className:u},s.createElement(z,{study:o,model:a,property:n.inputs,inputs:t,onStudyInputChange:c}),d&&this._createOffsetSection(d,(0,r.ensureDefined)(i.offset)),p&&p.childNames().map((e=>{var t;const n=p.childs()[e];return this._createOffsetSection(n,(0,r.ensureDefined)(null===(t=i.offsets)||void 0===t?void 0:t[e]))})))}_createOffsetSection(e,t){const n=e.childs();return s.createElement(z,{key:`offset_${t.title}`,study:this.props.study,model:this.props.model,inputs:[q(n,t)],property:e})}}function z(e){const{study:t,model:n,inputs:o,property:r,onStudyInputChange:i}=e,l=o,c=(0,s.useMemo)((()=>(0,L.getInputGroups)(l)),[l]);return s.createElement(a.PropertyContainer,{property:r,study:t,model:n,onStudyInputChange:i},!1,!1,c.map((e=>s.createElement(s.Fragment,{key:e.id},s.createElement(F,{content:e}),!1))))}function q(e,t){return{id:"val",name:t.title||W.offset,defval:e.val.value(),type:"integer",min:t.min,max:t.max}}},4781:(e,t,n)=>{"use strict";n.d(t,{BoolInput:()=>u,BoolInputComponent:()=>c});var o=n(50959),s=n(15294),r=n(97754),i=n.n(r),a=n(83207),l=n(27698);class c extends o.PureComponent{constructor(){super(...arguments),this._onChange=()=>{const{input:{id:e,name:t},value:n,onChange:o}=this.props;o(!n,e,t)}}render(){const{input:{defval:e},value:t,disabled:n,label:r,hasTooltip:a}=this.props,c=void 0===t?e:t;return o.createElement(s.Checkbox,{className:i()(l.checkbox,a&&l.hasTooltip),disabled:n,checked:c,onChange:this._onChange,label:o.createElement("span",{className:l.label},r),labelAlignBaseline:!0})}}const u=(0,a.bind)(c)},90009:(e,t,n)=>{"use strict";n.d(t,{debounced:()=>r});var o=n(50959);const s={blur:0,commit:0,change:1/0};function r(e,t=s){return class extends o.PureComponent{constructor(e){
labelAlign:function(e){switch(e){case"session":return"adaptive";case"time":return"topCenter";default:return}}(t.type),input:t,tooltip:o,solutionId:r})}var M=n(86067),O=n(17611);function R(e){const{content:t}=e;let n;return s.createElement(l.PropertyTable.InlineRowContext.Provider,{value:!0},s.createElement("div",{className:O.inlineRow},t.children.map(((e,o)=>(void 0!==e.tooltip&&(n=e.tooltip),s.createElement(D,{key:e.id,input:e,tooltip:o===t.children.length-1?n:void 0}))))))}var L=n(64420),A=n(26278);function F(e){const{content:t}=e;return(0,L.isGroup)(t)?(0,L.isInputInlines)(t)?s.createElement(R,{content:t}):s.createElement(s.Fragment,null,s.createElement("div",{className:A.titleWrap},s.createElement(M.GroupTitleSection,{title:i.t(t.id,{context:"input"},n(88601)),name:t.id})),t.children.map((e=>(0,L.isGroup)(e)?s.createElement(R,{key:e.id,content:e}):s.createElement(D,{key:e.id,input:e,tooltip:e.tooltip,solutionId:e.solutionId}))),s.createElement("div",{className:A.groupFooter})):s.createElement(D,{input:t,tooltip:t.tooltip,solutionId:t.solutionId})}const W={offset:i.t(null,void 0,n(89298))};class V extends s.PureComponent{render(){const{reference:e,inputs:t,property:n,study:o,studyMetaInfo:i,model:a,onStudyInputChange:c,className:u}=this.props,{offset:d,offsets:p}=n;return s.createElement(l.PropertyTable,{reference:e,className:u},s.createElement(z,{study:o,model:a,property:n.inputs,inputs:t,onStudyInputChange:c}),d&&this._createOffsetSection(d,(0,r.ensureDefined)(i.offset)),p&&p.childNames().map((e=>{var t;const n=p.childs()[e];return this._createOffsetSection(n,(0,r.ensureDefined)(null===(t=i.offsets)||void 0===t?void 0:t[e]))})))}_createOffsetSection(e,t){const n=e.childs();return s.createElement(z,{key:`offset_${t.title}`,study:this.props.study,model:this.props.model,inputs:[q(n,t)],property:e})}}function z(e){const{study:t,model:n,inputs:o,property:r,onStudyInputChange:i}=e,l=o,c=(0,s.useMemo)((()=>(0,L.getInputGroups)(l)),[l]);return s.createElement(a.PropertyContainer,{property:r,study:t,model:n,onStudyInputChange:i},!1,!1,c.map((e=>s.createElement(s.Fragment,{key:e.id},s.createElement(F,{content:e}),!1))))}function q(e,t){return{id:"val",name:t.title||W.offset,defval:e.val.value(),type:"integer",min:t.min,max:t.max}}},4781:(e,t,n)=>{"use strict";n.d(t,{BoolInput:()=>u,BoolInputComponent:()=>c});var o=n(50959),s=n(32389),r=n(97754),i=n.n(r),a=n(83207),l=n(27698);class c extends o.PureComponent{constructor(){super(...arguments),this._onChange=()=>{const{input:{id:e,name:t},value:n,onChange:o}=this.props;o(!n,e,t)}}render(){const{input:{defval:e},value:t,disabled:n,label:r,hasTooltip:a}=this.props,c=void 0===t?e:t;return o.createElement(s.Checkbox,{className:i()(l.checkbox,a&&l.hasTooltip),disabled:n,checked:c,onChange:this._onChange,label:o.createElement("span",{className:l.label},r),labelAlignBaseline:!0})}}const u=(0,a.bind)(c)},90009:(e,t,n)=>{"use strict";n.d(t,{debounced:()=>r});var o=n(50959);const s={blur:0,commit:0,change:1/0};function r(e,t=s){return class extends o.PureComponent{constructor(e){
super(e),this._onChange=(e,n,o)=>{const s=t.change;s?(clearTimeout(this._timeout),this.setState({value:e},(()=>{s!==1/0&&(this._timeout=setTimeout((()=>this._flush()),s))}))):this._flush(e)},this._onBlur=()=>{this._debounce(t.blur);const{onBlur:e}=this.props;e&&e()},this._onKeyDown=e=>{13===e.keyCode&&this._debounce(t.commit)},this.state={prevValue:e.value,value:e.value}}componentWillUnmount(){this._flush()}render(){const{value:t}=this.state;return o.createElement(e,{...this.props,value:t,onChange:this._onChange,onBlur:this._onBlur,onKeyDown:this._onKeyDown})}static getDerivedStateFromProps(e,t){return e.value===t.prevValue?t:{prevValue:e.value,value:e.value}}_debounce(e){e?(clearTimeout(this._timeout),e!==1/0&&(this._timeout=setTimeout((()=>this._flush()),e))):this.setState((e=>{this._flush(e.value)}))}_flush(e){const{input:{id:t,name:n},onChange:o}=this.props,{prevValue:s,value:r}=this.state;clearTimeout(this._timeout);const i=void 0!==e?e:r;void 0!==i&&i!==s&&o(i,t,n)}}}},47510:(e,t,n)=>{"use strict";n.d(t,{FloatInput:()=>p,FloatInputComponent:()=>d});var o=n(50959),s=n(97754),r=n.n(s),i=n(95052),a=n(83207),l=n(90009),c=n(27698);class u extends o.PureComponent{render(){const{hasTooltip:e}=this.props;return o.createElement(i.NumericInput,{...this.props,className:r()(c.input,e&&c.hasTooltip),stretch:!1})}}const d=(0,l.debounced)(u,{change:1/0,commit:0,blur:0}),p=(0,a.bind)(d)},96438:(e,t,n)=>{"use strict";n.d(t,{IntegerInput:()=>p,IntegerInputComponent:()=>d});var o=n(50959),s=n(97754),r=n.n(s),i=n(83207),a=n(90009),l=n(95052),c=n(27698);class u extends o.PureComponent{render(){const{hasTooltip:e}=this.props;return o.createElement(l.NumericInput,{...this.props,mode:"integer",className:r()(c.input,e&&c.hasTooltip),stretch:!1})}}const d=(0,a.debounced)(u,{change:1/0,commit:0,blur:0}),p=(0,i.bind)(d)},95052:(e,t,n)=>{"use strict";n.d(t,{NumericInput:()=>C});var o=n(50959),s=n(50151),r=n(11542),i=n(60521),a=n(49483),l=n(92399),c=n(82161),u=n(38223);var d=n(87663),p=n(37160);const h=new class{constructor(e=" "){this._divider=e}format(e){const t=(0,c.splitThousands)(e,this._divider);return(0,u.isRtl)()?(0,u.startWithLTR)(t):t}parse(e){const t=(0,u.stripLTRMarks)(e).split(this._divider).join(""),n=Number(t);return isNaN(n)||/e/i.test(t)?{res:!1}:{res:!0,value:n,suggest:this.format(n)}}},m=/^-?[0-9]*$/,v=9e15;class f extends o.PureComponent{constructor(e){super(e),this._onFocus=e=>{this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus(e)},this._onBlur=e=>{this.setState({focused:!1}),!1!==this.props.shouldApplyValueOnBlur&&(this.setState({displayValue:g(this.props,this.props.value)}),this.props.errorHandler&&this.props.errorHandler(!1)),this.props.onBlur&&this.props.onBlur(e)},this._onValueChange=e=>{const t=e.target.value;if(void 0!==this.props.onEmptyString&&""===t&&this.props.onEmptyString(),"integer"===this.props.mode&&!m.test(t))return;const n=b(t,this.props.formatter),o=n.res?this._checkValueBoundaries(n.value):{isPassed:!1,msg:void 0
},s=n.res&&!o.isPassed,r=n.res&&n.suggest&&!this.state.focused?n.suggest:t,i=s&&o.msg?o.msg:this._errMsg;this.setState({displayValue:r,errorMsg:i}),n.res&&o.isPassed&&this.props.onValueChange(n.value,"input"),this.props.errorHandler&&this.props.errorHandler(!n.res||s)},this._onValueByStepChange=e=>{const{roundByStep:t=!0,step:n=1,uiStep:o,min:s=n,formatter:r}=this.props,a=b(this.state.displayValue,r),l=null!=o?o:n;let c=n;if(a.res){const o=new i.Big(a.value),r=o.minus(s).mod(n);let u=o.plus(e*l);!r.eq(0)&&t&&(u=u.plus((e>0?0:1)*l).minus(r)),c=u.toNumber()}const{isPassed:u,clampedValue:d}=this._checkValueBoundaries(c);c=u?c:d,this.setState({displayValue:g(this.props,c)}),this.props.onValueChange(c,"step"),this.props.errorHandler&&this.props.errorHandler(!1)};const{value:t}=e;this._errMsg=r.t(null,void 0,n(35563)),this.state={value:t,displayValue:g(e,t),focused:!1,errorMsg:this._errMsg}}render(){var e;return o.createElement(l.NumberInputView,{id:this.props.id,inputMode:null!==(e=this.props.inputMode)&&void 0!==e?e:this.state.inputMode,borderStyle:this.props.borderStyle,fontSizeStyle:this.props.fontSizeStyle,value:this.state.displayValue,forceShowControls:this.props.forceShowControls,className:this.props.className,inputClassName:this.props.inputClassName,button:this.props.button,placeholder:this.props.placeholder,innerLabel:this.props.innerLabel,endSlot:this.props.endSlot,disabled:this.props.disabled,warning:this.props.warning,error:this.props.error,autoComplete:this.props.autoComplete,errorMessage:this.props.errorMessage||this.state.errorMsg,onValueChange:this._onValueChange,onValueByStepChange:this._onValueByStepChange,containerReference:this.props.containerReference,inputReference:this.props.inputReference,onClick:this.props.onClick,onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this.props.onKeyDown,controlDecKeyCodes:this.props.controlDecKeyCodes,controlIncKeyCodes:this.props.controlIncKeyCodes,title:this.props.title,intent:this.props.intent,highlight:this.props.highlight,highlightRemoveRoundBorder:this.props.highlightRemoveRoundBorder,stretch:this.props.stretch,autoSelectOnFocus:!a.CheckMobile.any(),"data-name":this.props["data-name"]})}componentDidMount(){this.setState({inputMode:a.CheckMobile.iOS()?void 0:"numeric"})}getClampedValue(){const{min:e=-1/0,max:t=v}=this.props,n=b(this.state.displayValue,this.props.formatter);return n.res?(0,p.clamp)(n.value,e,t):null}static getDerivedStateFromProps(e,t){const{alwaysUpdateValueFromProps:n,value:o}=e;return t.focused&&!n||t.value===o?null:{value:o,displayValue:g(e,o)}}_checkValueBoundaries(e){var t,o,s,i;const{min:a=-1/0,max:l=v}=this.props,c=function(e,t,n){const o=e>=t,s=e<=n;return{passMin:o,passMax:s,pass:o&&s,clamped:(0,p.clamp)(e,t,n)}}(e,a,l);let u;return c.passMax||(u=null!==(o=null===(t=this.props.boundariesErrorMessages)||void 0===t?void 0:t.greaterThanMax)&&void 0!==o?o:r.t(null,{replace:{max:String(l)}},n(2607))),c.passMin||(u=null!==(i=null===(s=this.props.boundariesErrorMessages)||void 0===s?void 0:s.lessThanMin)&&void 0!==i?i:r.t(null,{replace:{
min:String(a)}},n(53669))),{isPassed:c.pass,msg:u,clampedValue:c.clamped}}}function g(e,t){const{useFormatter:n=!0,formatter:o,mode:s}=e;return n&&"integer"!==s?function(e,t=h){return null!==e?t.format(e):""}(t,o):function(e){if(null===e)return"";return d.NumericFormatter.formatNoE(e)}(t)}function b(e,t=h){return t.parse?t.parse(e):{res:!1,error:"Formatter does not support parse"}}class C extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._handleContainerRef=e=>this._container=e,this._onChange=(e,t)=>{const{input:{id:n,name:o},onChange:s,onBlur:r}=this.props;s(e,n,o),"step"===t&&r&&r()},this._onBlur=e=>{const{onBlur:t}=this.props;if(t){const n=(0,s.ensureNotNull)(this._container);n.contains(document.activeElement)||n.contains(e.relatedTarget)||t()}}}render(){const{input:{defval:e,min:t,max:n,step:s},value:r,disabled:i,onKeyDown:a,className:l,mode:c,stretch:u}=this.props;return o.createElement(f,{className:l,value:Number(void 0===r?e:r),min:t,max:n,step:s,mode:c,onBlur:this._onBlur,onValueChange:this._onChange,onKeyDown:a,disabled:i,containerReference:this._handleContainerRef,fontSizeStyle:"medium",roundByStep:!1,stretch:u})}}},55141:(e,t,n)=>{"use strict";n.d(t,{SymbolInput:()=>d,getInternalSymbolName:()=>c});var o=n(50959),s=n(50151),r=n(76917),i=n(83207),a=n(73146),l=n(48897);function c(e,t){const n=(0,a.createAdapter)(t).resolvedSymbolInfoBySymbol(e);return n&&(n.ticker||n.full_name)?n.ticker||n.full_name:e}function u(e,t){const n=(0,a.createAdapter)(t).resolvedSymbolInfoBySymbol(e);return null===n?e:n.name}const d=(0,i.bind)((function(e){const t=(0,o.useContext)(r.PropertyContext),{study:n}=(0,s.ensureNotNull)(t),{input:{defval:i},value:a}=e;return o.createElement(l.SymbolInputsButton,{...e,value:u(a||i||"",n),study:n})}))},41552:(e,t,n)=>{"use strict";n.d(t,{ColorWithThicknessSelect:()=>f});var o=n(50959),s=n(24377),r=n(11542),i=n(36298),a=n(87095),l=n(41594),c=n(58593),u=n(17948),d=n(51768);const p=new i.TranslatedString("change thickness",r.t(null,void 0,n(95657))),h=new i.TranslatedString("change color",r.t(null,void 0,n(13066))),m=new i.TranslatedString("change opacity",r.t(null,void 0,n(17023))),v=[1,2,3,4];class f extends o.PureComponent{constructor(){super(...arguments),this._trackEventLabel=null,this._getTransparencyValue=()=>{const{transparency:e}=this.props;return e?e.value():0},this._getOpacityValue=()=>{const{color:e}=this.props,t=(0,u.getPropertyValue)(e);if(t)return(0,a.isHexColor)(t)?(0,a.transparencyToAlpha)(this._getTransparencyValue()):(0,s.parseRgba)(t)[3]},this._getColorValueInHex=()=>{const{color:e}=this.props,t=(0,u.getPropertyValue)(e);return t?(0,a.isHexColor)(t)?t:(0,s.rgbToHexString)((0,s.parseRgb)(t)):null},this._onThicknessChange=e=>{const{thickness:t}=this.props;void 0!==t&&this._setProperty(t,e,p)},this._onColorChange=e=>{const{color:t,isPaletteColor:n}=this.props,o=(0,u.getPropertyValue)(t);let r=0;o&&(r=(0,a.isHexColor)(o)?this._getTransparencyValue():(0,a.alphaToTransparency)((0,s.parseRgba)(o)[3])),this._setProperty(t,(0,

View File

@@ -14,14 +14,14 @@ return this._canBeShownValue.readonly()}_onFavoriteAdded(e){this.addWidget(this.
this._containment=e.containment}destroy(){const e=this._source;e.classList.remove("ui-draggable"),e.classList.remove("ui-draggable-dragging");this._handle.classList.remove("ui-draggable-handle"),this._backend.destroy(),null!==this._helper&&(this._helper.raf&&cancelAnimationFrame(this._helper.raf),this._helper=null)}}class g{constructor(e){this._initial=null,this._handlePointerDown=e=>{if(null!==this._initial)return;if(!(e.target instanceof Element&&this._handle.contains(e.target)))return;if(this._initial=e,!this._dispatchEvent(this._createEvent("pointer-drag-start",e)))return void(this._initial=null);e.preventDefault();const t=this._getEventTarget();t.addEventListener("pointermove",this._handlePointerMove),t.addEventListener("pointerup",this._handlePointerUp),t.addEventListener("pointercancel",this._handlePointerUp),t.addEventListener("lostpointercapture",this._handlePointerUp),t.setPointerCapture(e.pointerId)},this._handlePointerMove=e=>{null!==this._initial&&this._initial.pointerId===e.pointerId&&(e.preventDefault(),this._dispatchEvent(this._createEvent("pointer-drag-move",e)))},this._handlePointerUp=e=>{if(null===this._initial||this._initial.pointerId!==e.pointerId)return;e.preventDefault();const t=this._getEventTarget();t.removeEventListener("pointermove",this._handlePointerMove),t.removeEventListener("pointerup",this._handlePointerUp),t.removeEventListener("pointercancel",this._handlePointerUp),t.removeEventListener("lostpointercapture",this._handlePointerUp),t.releasePointerCapture(this._initial.pointerId),this._dispatchEvent(this._createEvent("pointer-drag-stop",e)),this._initial=null};const t=this._handle=e.handle;this._onDragStart=e.onDragStart,this._onDragMove=e.onDragMove,this._onDragStop=e.onDragStop,t.style.touchAction="none";this._getEventTarget().addEventListener("pointerdown",this._handlePointerDown)}destroy(){this._handle.style.touchAction="";const e=this._getEventTarget();e.removeEventListener("pointerdown",this._handlePointerDown),e.removeEventListener("pointermove",this._handlePointerMove),e.removeEventListener("pointerup",this._handlePointerUp),e.removeEventListener("pointercancel",this._handlePointerUp),e.removeEventListener("lostpointercapture",this._handlePointerUp),null!==this._initial&&(e.releasePointerCapture(this._initial.pointerId),this._initial=null)}_getEventTarget(){return p.CheckMobile.iOS()||(0,p.isMac)()&&n.touch?window.document.documentElement:this._handle}_dispatchEvent(e){switch(e.type){case"pointer-drag-start":this._onDragStart(e);break;case"pointer-drag-move":this._onDragMove(e);break;case"pointer-drag-stop":this._onDragStop(e)}return!e.defaultPrevented}_createEvent(e,t){return(0,d.assert)(null!==this._initial),new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:{backend:this,initial:this._initial,current:t}})}}var v=o(70027),_=o(25388);o(19619)
;const w="floating-toolbar-react-widgets",f=`<div class="tv-floating-toolbar i-closed i-hidden"><div class="tv-floating-toolbar__widget-wrapper"><div class="tv-floating-toolbar__drag js-drag">${_}</div><div class="tv-floating-toolbar__content js-content"></div><div class="${w}"></div></div></div>`;class y{constructor(e){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=new l.WatchedValue(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._responsiveResizeFunction=null,this._showTimeStamp=null,this._draggable=null,this._preventClickUntilAnimation=e=>{null!==this._showTimeStamp&&performance.now()-this._showTimeStamp<this.hideDuration()&&e.stopPropagation()},y._toolbars.push(this),this._options=e,this._widget=(0,v.parseHtmlElement)(f),this._content=this._widget.getElementsByClassName("js-content").item(0),this._reactWidgetsContainer=this._widget.getElementsByClassName(w).item(0),this._setZIndex(y._startZIndex+y._toolbars.length-1),this._options.addClass&&(this._widget.className+=` ${this._options.addClass}`),this._options["data-name"]&&(this._widget.dataset.name=this._options["data-name"]),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType()),this._widget.addEventListener("click",this._preventClickUntilAnimation,!0)}destroy(){this.hide(!0),y._toolbars.splice(y._toolbars.indexOf(this),1),this._widget.removeEventListener("click",this._preventClickUntilAnimation,!0),document.body.contains(this._widget)&&document.body.removeChild(this._widget),null!==this._draggable&&this._draggable.destroy(),this._widget.innerHTML="",this._responsiveResizeFunction=null}setResponsiveResizeFunc(e){this._responsiveResizeFunction=e}isVisible(){return this._visibility.value()}visibility(){return this._visibility.readonly()}isVertical(){return this._isVertical}show(){this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),this._showTimeStamp=performance.now(),this._widget.classList.contains("i-hidden")?(this._widget.classList.remove("i-hidden"),setTimeout((()=>{this.isVisible()&&this._widget.classList.remove("i-closed")}))):this._widget.classList.remove("i-closed"),this._onWindowResize())}hide(e=!1){if(!this.isVisible())return;const t=this._widget.classList.contains("i-closed");if(this._widget.classList.add("i-closed"),this._visibility.setValue(!1),e||t)this._setHiddingTimeout(null),this._widget.classList.add("i-hidden");else{const e=setTimeout((()=>{this._setHiddingTimeout(null),this._widget.classList.add("i-hidden")}),this.hideDuration());this._setHiddingTimeout(e)}window.removeEventListener("resize",this._windowResizeListener)}raise(){y._toolbars.length+y._startZIndex!==this._zIndex()&&(y._toolbars.splice(y._toolbars.indexOf(this),1),y._toolbars.push(this),y._updateAllZIndexes())}hideDuration(){
return.75*r.dur}addWidget(e,t={}){const o=this.widgetsCount();if(void 0===t.index&&(t.index=o),t.index<0||t.index>o)throw new Error(`Index must be in [0, ${o}]`);const i=document.createElement("div");i.className="tv-floating-toolbar__widget js-widget",i.appendChild(e);const n=t.index===o?null:this._content.childNodes.item(t.index);this._content.insertBefore(i,n),this._onWindowResize()}getReactWidgetContainer(){return this._reactWidgetsContainer}removeWidget(e){const t=this._findWrapperForWidget(e);t&&(this._content.removeChild(t),this._onWindowResize())}widgetsCount(){return this._content.childNodes.length}showWidget(e){const t=this._findWrapperForWidget(e);t&&t.classList.remove("i-hidden")}hideWidget(e){const t=this._findWrapperForWidget(e);t&&t.classList.add("i-hidden")}removeWidgets(){for(;this._content.firstChild;)this._content.removeChild(this._content.firstChild);this._onWindowResize()}onContextMenu(e){if(n.mobiletouch){(new c).load().then((t=>{const o=new t(this._widget);o.get("press").set({time:500}),o.on("press",(t=>{this._preventWidgetTouchEndEvent(),e(t.srcEvent)}))}))}else this._widget.addEventListener("contextmenu",e)}checkPosition(){const e=this._getCorrectedWidgetRect(),t={left:e.left,top:e.top};this._correctPosition(t),e.left===t.left&&e.top===t.top||(this._widget.style.left=t.left+"px",this._widget.style.top=t.top+"px")}_determineCurrentLayoutVertical(e){const t=this._isVertical?e.height:e.width;return window.innerWidth<t&&window.innerWidth<window.innerHeight}_getWidget(){return this._widget}_findWrapperForWidget(e){const t=this._content.getElementsByClassName("js-widget");for(let o=0;o<t.length;++o){const i=t.item(o);if(i.contains(e))return i}return null}_onVerticalChanged(e,t){}_correctPosition(e){const t=this._getCorrectedWidgetRect(),o=this._getSavedPosition(),i=window.innerWidth-t.right,n=window.innerHeight-t.bottom;i<0?e.left=Math.max(0,window.innerWidth-t.width):o&&o.left>e.left&&(e.left=Math.min(e.left+i,o.left)),n<0?e.top=Math.max(0,window.innerHeight-t.height):o&&o.top>e.top&&(e.top=Math.min(e.top+n,o.top))}_getCorrectedWidgetRect(){const e=this._widget.getBoundingClientRect();if(this._widget.classList.contains("i-closed")){const t=1/.925-1,o=e.width*t,i=e.height*t;return{bottom:e.bottom+i/2,height:e.height+i,left:e.left-o/2,right:e.right+o/2,top:e.top-i/2,width:e.width+o}}return e}_getSavedPosition(){var e;let t;if("device"===this._options.positionStorageType){const e=h.TVLocalStorage.getItem(this._options.positionSettingsKey);t=null!==e?JSON.parse(e):null}else t=null!==(e=(0,s.getJSON)(this._options.positionSettingsKey))&&void 0!==e?e:null;return null!==t&&"top"in t&&"left"in t?t:null}_setHiddingTimeout(e){null!==this._hiddingTimeoutId&&clearTimeout(this._hiddingTimeoutId),this._hiddingTimeoutId=e}_preventWidgetTouchEndEvent(){const e=t=>{t.preventDefault(),this._widget.removeEventListener("touchend",e)};this._widget.addEventListener("touchend",e)}_updateLayoutType(){this._widget.classList.toggle("i-vertical",this._isVertical)}_onWindowResize(){if("auto"===(this._options.layout||"auto")){
const e=this._isVertical,t=this._getCorrectedWidgetRect();this._isVertical=this._determineCurrentLayoutVertical(t),this._updateLayoutType(),e!==this._isVertical&&this._onVerticalChanged(this._isVertical,e)}this.checkPosition(),this._resizeResponsive()}_resizeResponsive(){if(null===this._responsiveResizeFunction)return;let e=this._options.layout||"auto";"auto"===e&&(e=this._isVertical?"vertical":"horizontal");const t="vertical"===e?this._widget.clientHeight:this._widget.clientWidth,o=("vertical"===e?window.innerHeight:window.innerWidth)-t;this._responsiveResizeFunction(t,o,e)}_setZIndex(e){this._widget.style.zIndex=String(e)}_zIndex(){return Number(this._widget.style.zIndex)}_loadPosition(){var e;const t=null!==(e=this._getSavedPosition())&&void 0!==e?e:this._options.defaultPosition;this._widget.style.left=Math.round(t.left)+"px",this._widget.style.top=Math.round(t.top)+"px",this._onWindowResize()}_savePosition(){const e=this._widget.getBoundingClientRect();if("device"===this._options.positionStorageType)try{h.TVLocalStorage.setItem(this._options.positionSettingsKey,JSON.stringify({left:e.left,top:e.top}))}catch(e){}else(0,s.setJSON)(this._options.positionSettingsKey,{left:e.left,top:e.top})}_init(){this._loadPosition(),this._draggable=new m({source:this._widget,containment:"window",handle:".js-drag",start:i.globalCloseMenu,stop:this._savePosition.bind(this)}),this._widget.addEventListener("pointerdown",this.raise.bind(this))}static _updateAllZIndexes(){y._toolbars.forEach(((e,t)=>{e._setZIndex(y._startZIndex+t)}))}}y._startZIndex=20,y._toolbars=[]},44296:(e,t,o)=>{"use strict";o.d(t,{LineToolPropertiesWidgetBase:()=>ye});var i=o(50959),n=o(962),r=o(11542),s=o(36298),l=o(14483),a=o(97145),c=o(1722),h=o(88348),d=o(62513),u=o(68806),p=o(50151),m=o(88640);class g extends m.default{constructor(e,t,o){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=e,this._propertyApplier=t,this._undoText=o}destroy(){this._baseProperty.destroy(),super.destroy()}value(){return this._baseProperty.value()}setValue(e){this._isProcess=!0,this._baseProperty.setValue(e,void 0,{applyValue:(e,t)=>this._propertyApplier.setProperty(e,t,this._undoText)}),this._isProcess=!1,this._listenersMappers.forEach((e=>{e.method.call(e.obj,this,"")}))}subscribe(e,t){const o=o=>{this._isProcess||t.call(e,this,"")},i={obj:e,method:t,callback:o};this._listenersMappers.push(i),this._baseProperty.subscribe(e,o)}unsubscribe(e,t){var o;const i=(0,p.ensureDefined)(null===(o=this._listenersMappers.find((o=>o.obj===e&&o.method===t)))||void 0===o?void 0:o.callback);this._baseProperty.unsubscribe(e,i)}unsubscribeAll(e){this._baseProperty.unsubscribeAll(e)}}var v=o(69152),_=o(97754),w=o.n(_),f=o(84877),y=o(3809),b=o(24437);const T=y.FLOATING_TOOLBAR_REACT_WIDGETS_CLASS+"__button";function C(e){const{templateButton:t,propertyButtons:o,commonButtons:n,isDrawingFinished:r,isToolbarFixed:s,buttonClassName:l,activeChartWidget:a}=e,c=a.hasModel()&&a.model().selection().dataSources();return c&&c.length?i.createElement(f.MatchMediaMap,{rules:{
isSmallWidth:b.DialogBreakpoints.TabletSmall,isSmallHeight:"screen and (max-height: 430px)"}},(({isSmallWidth:e,isSmallHeight:t})=>i.createElement(i.Fragment,null,h(),r&&i.createElement(i.Fragment,null,Boolean(o.length)&&o.map(((o,n)=>i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:w()(T,l),isSmallScreen:e||t,isToolbarFixed:s}))),Boolean(n.length)&&n.map(((o,n)=>{const r=e||t;return r?o.showForSmallScreen?i.createElement(o.component,{...o.props,isSmallScreen:r,key:`${o.props.title}_${n}`,className:w()(T,l)}):null:i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:w()(T,l)})})))))):h();function h(){return null===t?null:i.createElement(t.component,{...t.props,isToolbarFixed:s,isDrawingFinished:r,className:w()(T,l)})}}var x=o(51768),L=o(50813),S=o(61964);function P(e){const{title:t,activeChartWidget:o,className:n}=e;return i.createElement(L.ToolWidgetIconButton,{className:n,icon:S,title:t,onClick:async function(){(0,x.trackEvent)("GUI","Context action on drawings","Settings");const e=o.model().selection().lineDataSources(),t=e.length;1===t?await o.showChartPropertiesForSource(e[0],void 0,{onWidget:o.onWidget()}):t>1&&await o.showChartPropertiesForSources({sources:e})},"data-name":"settings"})}var E=o(43982),A=o(66427),B=o(31188);function M(e){const{className:t,...o}=e;return i.createElement(A.ToolButton,{className:_(t,B.button),tooltipPosition:"horizontal",...o})}var z=o(65186),D=o(91244);function k(e){const{activeChartWidget:t,className:n}=e,s=t.model().selection().lineDataSources();if(0===s.length)return null;const l=s[0].properties().frozen,a=(0,E.useProperty)(l),c=a?{tooltip:r.t(null,void 0,o(15101)),icon:z}:{tooltip:r.t(null,void 0,o(42284)),icon:D};return i.createElement(M,{className:n,isActive:Boolean(a),onClick:function(){(0,x.trackEvent)("GUI","Context action on drawings","Lock"),t.toggleLockSelectedObject()},"data-name":Boolean(a)?"unlock":"lock",...c})}var N=o(35149);function W(e){const{title:t,activeChartWidget:o,className:n}=e;return i.createElement(L.ToolWidgetIconButton,{className:n,icon:N,title:t,"data-name":"remove",onClick:function(){(0,x.trackEvent)("GUI","Context action on drawings","Remove"),o.removeSelectedSources()}})}var I=o(9745),R=o(32563),F=o(8087),V=o(28127),O=o(10643),H=o(24120),K=o(68335),Z=o(4741),j=o(39347),U=o(84959);function $(e,t){const i=[(0,H.createVisualOrderAction)(e,t),(0,H.createChangeIntervalsVisibilitiesAction)(e,t)],n=function(e,t){const i=[],n=K.isMacKeyboard?" +":"",s=t.filter((e=>e.cloneable()));s.length>0&&i.push(new j.Action({actionId:"Chart.LineTool.Clone",options:{name:"clone",icon:o(36296),shortcutHint:K.humanReadableModifiers(Z.Modifiers.Mod)+n+" Drag",label:r.t(null,void 0,o(52977)),onExecute:()=>{e.model().cloneLineTools(s,!1),(0,x.trackEvent)("GUI","Context action on drawings","Clone")}}}));const l=t.filter((e=>e.copiable()));if(l.length>0){const t={name:"copy",label:r.t(null,void 0,o(35216)),shortcutHint:K.humanReadableModifiers(Z.Modifiers.Mod)+n+" C",onExecute:()=>{
e.chartWidgetCollection().clipboard.uiRequestCopy(l)}};i.push(new j.Action({actionId:"Chart.Clipboard.CopyLineTools",options:t,id:"Copy"}))}return function(e,t){return!!(null==e?void 0:e.isMultipleLayout().value())&&t.some((e=>e.isSynchronizable()))}(e,t)?(i.push(...(0,H.createSyncDrawingActions)(e,t)),i):i}(e,t);return n.length&&i.push(new j.Separator,...n),i.push(new j.Separator,function(e){return new j.Action({actionId:"Chart.SelectedObject.Hide",options:{label:r.t(null,void 0,o(31971)),icon:U,onExecute:()=>{e.hideSelectedObject()},name:"hide"}})}(e)),i}var G=o(44996);function q(e){const{title:t,activeChartWidget:o,isSmallScreen:n,className:r}=e,s=o.model().selection().lineDataSources(),[l,a]=(0,i.useState)([]),c=(0,i.useRef)(null),h=(0,i.useMemo)((()=>new H.ActionsProvider(o)),[o]),d=(0,i.useCallback)((()=>h.contextMenuActionsForSources(s)),[h,s]),u=(0,i.useCallback)((()=>{if(n)return;const e=$(o,s);a(Y(e))}),[n,o,s]),p=(0,i.useCallback)((e=>{if(!n){const e=Y($(o,s));return a(e),void O.ContextMenuManager.createMenu(e,{mode:"drawer","data-name":"more-menu"},{menuName:"LineToolFloatingToolbarMoreMenu"})}d().then((t=>{const o=Y(t);window.matchMedia(b.DialogBreakpoints.TabletSmall).matches||a(o),O.ContextMenuManager.showMenu(o,e,{mode:"drawer","data-name":"more-menu"},{menuName:"LineToolFloatingToolbarMoreMenu"})}))}),[n,d]);return(0,i.useEffect)((()=>{var e;l.length&&(null===(e=c.current)||void 0===e||e.update())}),[l]),i.createElement(F.ToolWidgetMenu,{className:r,ref:c,arrow:!1,onOpen:u,onClick:p,title:t,content:i.createElement(I.Icon,{icon:G}),"data-name":"more",menuDataName:"more-menu",closeOnEsc:!0},i.createElement(V.ActionsTable,{parentIsOpened:!0,items:l}))}function Y(e){if(R.touch&&!window.matchMedia("(pointer:fine)").matches){const t=e.filter((e=>"Copy"!==e.id));if(t.length===e.length)return t;const o=[];return t.forEach((e=>{("separator"!==e.type||o.length>0&&"separator"!==o[o.length-1].type)&&o.push(e)})),o}return e}var X=o(95586),J=o(12811),Q=o(501),ee=o(23851),te=o(57740),oe=o(80427);function ie(e){const{property:t,propertyApplier:n,title:s,undoText:l,isToolbarFixed:a,className:c}=e,h=(0,E.useProperty)(t),d=(0,i.useMemo)((()=>[new j.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToSolid",options:{icon:Q,label:r.t(null,void 0,o(1277)),active:X.LineStyle.Solid===h,onExecute:()=>n.setProperty(t,X.LineStyle.Solid,l)}}),new j.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDashed",options:{icon:ee,label:r.t(null,void 0,o(59317)),active:X.LineStyle.Dashed===h,onExecute:()=>n.setProperty(t,X.LineStyle.Dashed,l)}}),new j.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDotted",options:{icon:te,label:r.t(null,void 0,o(42973)),active:X.LineStyle.Dotted===h,onExecute:()=>n.setProperty(t,X.LineStyle.Dotted,l)}})]),[n,t,h]);return i.createElement(F.ToolWidgetMenu,{className:c,arrow:!1,content:i.createElement(I.Icon,{icon:ne(h)}),title:s,"data-name":e["data-name"],menuDataName:`${e["data-name"]}-menu`,verticalDropDirection:a?J.VerticalDropDirection.FromBottomToTop:void 0,
horizontalDropDirection:a?J.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:a?J.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:a?J.VerticalAttachEdge.Top:void 0},i.createElement(V.ActionsTable,{items:d}))}function ne(e){switch(e){case X.LineStyle.Solid:return Q;case X.LineStyle.Dashed:return ee;case X.LineStyle.Dotted:return te;case"mixed":return oe;default:return""}}const re=[10,11,12,14,16,20,24,28,32,40];function se(e){const{property:t,propertyApplier:o,title:n,undoText:r,isToolbarFixed:s,className:l}=e,a=(0,E.useProperty)(t),c=re.map((e=>new j.Action({actionId:"Chart.LineTool.Toolbar.ChangeFontSizeProperty",options:{label:e.toString(),onExecute:()=>o.setProperty(t,e,r),active:e===a}})));return i.createElement(F.ToolWidgetMenu,{arrow:!1,content:a,className:l,title:n,verticalDropDirection:s?J.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:s?J.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:s?J.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:s?J.VerticalAttachEdge.Top:void 0,"data-name":e["data-name"],menuDataName:`${e["data-name"]}-menu`},i.createElement(V.ActionsTable,{items:c}))}var le=o(69774),ae=o(92249),ce=o(15367),he=o(3587),de=o(87919);const ue=new s.TranslatedString("change line tool(s) font size",r.t(null,void 0,o(36819))),pe=new s.TranslatedString("change line tool(s) line style",r.t(null,void 0,o(54769))),me=(new s.TranslatedString("apply drawing template",r.t(null,void 0,o(49037))),new s.TranslatedString("line tool(s) line style",r.t(null,{context:"line tool property name"},o(2443)))),ge=r.t(null,void 0,o(89517)),ve=r.t(null,void 0,o(34596)),_e=r.t(null,void 0,o(41610)),we=r.t(null,void 0,o(32733)),fe=r.t(null,void 0,o(17006));class ye{constructor(e){this._isDrawingFinished=new a.WatchedValue(!0),this._currentTool=null,this._updateVisibilityTimeout=null,this._lineWidthsProperty=null,this._lineColorsProperty=null,this._currentProperties=null,this._floatingContainer=null,this._floatingToolbarRendered=!1,this._toolbarVisible=!1,this._propertiesVisible=!1,this._templatesButton=null,this._propertyButtons=[],this._commonButtons=[],this._handleSourceEdit=e=>{h.isDirectionalMovementActive.value()||(e?this._floatingToolbar.hide(!0):this._floatingToolbarRendered&&this._floatingToolbar.show())},this._chartWidgetCollection=e,this._floatingToolbar=new y.FloatingToolbar({defaultPosition:{top:le.HEADER_TOOLBAR_HEIGHT_EXPANDED+15,left:window.innerWidth/2},positionSettingsKey:"properties_toolbar.position",positionStorageType:"device",layout:"horizontal","data-name":"drawing-toolbar"}),this._floatingContainer=this._floatingToolbar.getReactWidgetContainer(),this._isToolMovingNowSpawn=h.isToolMovingNow.spawn(),this._isToolEditingNowSpawn=h.isToolEditingNow.spawn(),this._toolSpawn=h.tool.spawn(),this._iconToolSpawn=h.iconTool.spawn(),this._emojiToolSpawn=h.emojiTool.spawn(),this._selectedSourcesSpawn=this._chartWidgetCollection.selectedSources.spawn(),this._isToolMovingNowSpawn.subscribe(this._handleSourceEdit),
this._isToolEditingNowSpawn.subscribe(this._handleSourceEdit),this._toolSpawn.subscribe(this._onToolChanged.bind(this),{callWithLast:!0}),this._iconToolSpawn.subscribe((()=>this._onToolChanged(h.tool.value()))),this._emojiToolSpawn.subscribe((()=>this._onToolChanged(h.tool.value()))),this._selectedSourcesSpawn.subscribe((()=>this.onSourceChanged(this.selectedSources()))),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(this,this.destroy,!0)}destroy(){this._isToolMovingNowSpawn.destroy(),this._isToolEditingNowSpawn.destroy(),this._toolSpawn.destroy(),this._iconToolSpawn.destroy(),this._emojiToolSpawn.destroy(),this._selectedSourcesSpawn.destroy()}refresh(){this.onSourceChanged(this.selectedSources())}onSourceChanged(e){if(!(null==e?void 0:e.length))return this._propertiesVisible=!1,this._toolbarVisible=!1,void this.hide();if(this._createCommonButtons(),e.every((t=>t.toolname===e[0].toolname))?this._showTemplatesOf({sources:e}):this._templatesButton&&this._clearTemplatesButton(),1===e.length){const t=e[0];t.isAvailableInFloatingWidget()&&this.activeChartWidget().model().model().dataSourceForId(t.id())?(!t.userEditEnabled()||!(0,ce.isLineDrawnWithPressedButton)(t.toolname)&&this.activeChartWidget().model().lineBeingCreated()||this._isDrawingFinished.setValue(!0),this.showPropertiesOf(t.toolname,t.properties(),!0),this._toolbarVisible=!0):this.hide()}else this._clearProperties(),this._createWidthsButton(void 0,!0),this._createLineStyleButton(),this._createColorsButton(void 0,!0),this._createBackgroundsButton(void 0,!0),this._createTextColorsButton(void 0,!0),this._propertiesVisible=!0;this._updateVisibility()}activeChartWidget(){return this._chartWidgetCollection.activeChartWidget.value()}selectedSources(){return this._chartWidgetCollection.selectedSources.value().filter(ae.isLineTool)}hide(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{(0,ae.unsetNewToolProperties)(),this._floatingToolbar.hide(!0),this._isToolbarRendered()&&this._unmountFloatingToolbar(),this._clearProperties(),this._clearCommonButtons()}),0),delete this._propertyApplier}templatesList(){return this._templatesList}_onToolChanged(e,t){this._currentTool=e;const o=this.selectedSources();this._isDrawingToolExcludingCustomUrlEventTool(e)?(this._isDrawingFinished.setValue(!1),this._updateVisibility()):o&&o.length?(o.length>1&&this._isDrawingFinished.setValue(!0),this.onSourceChanged(this.selectedSources())):this.hide()}_propertyApplierImpl(){return this._propertyApplier||(this._propertyApplier=new de.PropertyApplierWithoutSavingChart((()=>this.activeChartWidget().model()),new a.WatchedValue(false))),this._propertyApplier}_clearProperties(){this._clearPropertyButtons(),this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._currentProperties&&(this._currentProperties=null)}_show(){
this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{this._renderFloatingToolbar(),this._floatingToolbar.show(),this._floatingToolbar.checkPosition()}),0)}_addPropertyButton(e){this._propertyButtons.push(e),this._renderFloatingToolbar()}_addCommonButton(e){this._commonButtons.push(e),this._renderFloatingToolbar()}_addTemplatesButton(e){this._templatesButton=e}_renderFloatingToolbar(){null!==this._floatingContainer&&this.activeChartWidget()&&this.activeChartWidget().hasModel()&&(n.render(i.createElement(C,{templateButton:this._templatesButton,propertyButtons:this._propertyButtons,commonButtons:this._commonButtons,isDrawingFinished:this._isDrawingFinished.value(),activeChartWidget:this.activeChartWidget()}),this._floatingContainer),this._floatingToolbarRendered=!0)}_unmountFloatingToolbar(){null!==this._floatingContainer&&(n.unmountComponentAtNode(this._floatingContainer),this._floatingToolbarRendered=!1)}_clearTemplatesButton(){this._templatesButton=null}_clearPropertyButtons(){this._propertyButtons=[]}_clearCommonButtons(){this._commonButtons=[]}_isToolbarRendered(){return this._floatingToolbarRendered}_createSettingsButton(){const e={component:P,props:{title:ge,activeChartWidget:this.activeChartWidget()}};this._addCommonButton(e)}_createLockButton(){const e={component:k,props:{title:"Lock",activeChartWidget:this.activeChartWidget()}};this._addCommonButton(e)}_createRemoveButton(){const e={component:W,props:{title:ve,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0};this._addCommonButton(e)}_createDotsButton(){this._addCommonButton({component:q,props:{title:_e,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0})}_createAlertButton(){}_createSourceActions(){this._createLockButton()}_createLineStyleButton(e){const t=this.selectedSources().filter(ae.isLineTool);if(!t.length)return!1;let o,i=this._propertyApplierImpl();if(1===t.length){if(o=t[0].properties().linestyle||e,!o)return!1}else{const e=t.map((e=>e.properties().linestyle||e.properties().lineStyle)).filter(c.notUndefined);if(!e.length)return!1;o=new d.CollectiblePropertyUndoWrapper(new u.LineToolCollectedProperty(e),me,this._propertyApplierImpl()),i={...i,setProperty:(e,t)=>e.setValue(t)}}return this._addPropertyButton({component:ie,props:{property:o,title:we,propertyApplier:i,"data-name":"style",undoText:pe}}),!0}_createFontSizeButton(e){const t=this.selectedSources();if(0===t.length)return!1;const o=t[0];if(!(0,he.isDataSource)(o))return!1;const i={component:se,props:{property:o.properties().fontsize||e,title:fe,propertyApplier:this._propertyApplierImpl(),"data-name":"font-size",undoText:ue}};return this._addPropertyButton(i),!0}_createCommonButtons(){this._commonButtons.length&&this._clearCommonButtons(),l.enabled("property_pages")&&this._createSettingsButton(),this._createSourceActions(),this._createRemoveButton(),this._createDotsButton()}_prepareProperties(e){const t=this.selectedSources().filter((t=>t.properties()[e]))
;if(!(t.filter((t=>t.properties()[e].visible())).length<1))return t.map((t=>t.properties()[e])).filter(c.notNull)}_createProperty(e,t,o,i){if(t){const e=this._prepareProperties(o);if(!e)return;return this._isWidthProperty(e[0])?new g(new u.MultipleLineWidthsProperty(e),this._propertyApplierImpl(),i):new v.CollectibleColorPropertyUndoWrapper(new u.MultipleLineColorsProperty(e),this._propertyApplierImpl(),i)}if(e&&e.visible())return this._isWidthProperty(e)?new u.MultipleLineWidthsProperty([e]):new v.CollectibleColorPropertyDirectWrapper(new u.MultipleLineColorsProperty([e]))}_shouldShowBackgroundProperty(e,t){return!t||!t.fillBackground||!!t.fillBackground.value()}_isDrawingToolExcludingCustomUrlEventTool(e){return Boolean(null==e?void 0:e.toLowerCase().includes("linetool"))&&"LineToolTweet"!==e&&"LineToolIdea"!==e&&"LineToolImage"!==e}_updateVisibility(){this._isDrawingFinished.value()&&(this._toolbarVisible||this._propertiesVisible)?this._show():this.hide()}_showTemplatesOf(e){}_isWidthProperty(e){return e instanceof u.LineToolWidthsProperty}}},78036:(e,t,o)=>{"use strict";o.d(t,{lineToolsInfo:()=>f});var i=o(50151),n=o(11542),r=o(61814),s=(o(42053),o(57673)),l=o(87872);const a={SyncDrawing:n.t(null,void 0,o(36551)),arrow:n.t(null,void 0,o(96237)),cursor:n.t(null,void 0,o(29908)),dot:n.t(null,void 0,o(60925)),performance:n.t(null,void 0,o(79165)),drawginmode:n.t(null,void 0,o(49421)),eraser:n.t(null,void 0,o(99289)),group:n.t(null,void 0,o(91977)),hideAllDrawings:n.t(null,void 0,o(17517)),lockAllDrawings:n.t(null,void 0,o(37057)),magnet:n.t(null,void 0,o(37140)),measure:n.t(null,void 0,o(59607)),removeAllDrawingTools:n.t(null,void 0,o(76091)),showObjectsTree:n.t(null,void 0,o(51072)),zoom:n.t(null,void 0,o(38925)),"zoom-out":n.t(null,void 0,o(49895))};var c=o(59656),h=o(68335),d=o(86972);const u=(0,h.humanReadableModifiers)(h.Modifiers.Shift,!1),p=(0,h.humanReadableModifiers)(h.Modifiers.Alt,!1),m=(0,h.humanReadableModifiers)(h.Modifiers.Mod,!1),g={keys:[u],text:n.t(null,void 0,o(40234))},v={keys:[u],text:n.t(null,void 0,o(68125))},_={keys:[u],text:n.t(null,void 0,o(81591))},w={LineTool5PointsPattern:{},LineToolABCD:{},LineToolArc:{},LineToolArrow:{},LineToolArrowMarkDown:{},LineToolArrowMarkLeft:{},LineToolArrowMarkRight:{},LineToolArrowMarkUp:{},LineToolBalloon:{},LineToolComment:{},LineToolBarsPattern:{},LineToolBezierCubic:{},LineToolBezierQuadro:{},LineToolBrush:{},LineToolCallout:{},LineToolCircleLines:{},LineToolCypherPattern:{},LineToolDateAndPriceRange:{},LineToolDateRange:{},LineToolDisjointAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolElliottCorrection:{},LineToolElliottDoubleCombo:{},LineToolElliottImpulse:{},LineToolElliottTriangle:{},LineToolElliottTripleCombo:{},LineToolEllipse:{hotKey:(0,r.hotKeySerialize)(v)},LineToolExtended:{},LineToolFibChannel:{},LineToolFibCircles:{hotKey:(0,r.hotKeySerialize)(v)},LineToolFibRetracement:{},LineToolFibSpeedResistanceArcs:{},LineToolFibSpeedResistanceFan:{hotKey:(0,r.hotKeySerialize)(_)},LineToolFibSpiral:{},LineToolFibTimeZone:{},LineToolFibWedge:{},
LineToolFlagMark:{},LineToolFlatBottom:{hotKey:(0,r.hotKeySerialize)(g)},LineToolAnchoredVWAP:{},LineToolGannComplex:{},LineToolGannFixed:{},LineToolGannFan:{},LineToolGannSquare:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(10289))})},LineToolHeadAndShoulders:{},LineToolHorzLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"H"],text:"{0} + {1}"})},LineToolHorzRay:{},LineToolIcon:{},LineToolEmoji:{},LineToolInsidePitchfork:{},LineToolNote:{},LineToolNoteAbsolute:{},LineToolSignpost:{},LineToolParallelChannel:{hotKey:(0,r.hotKeySerialize)(g)},LineToolPitchfan:{},LineToolPitchfork:{},LineToolPolyline:{},LineToolPath:{},LineToolPrediction:{},LineToolPriceLabel:{},LineToolPriceNote:{hotKey:(0,r.hotKeySerialize)(g)},LineToolArrowMarker:{},LineToolPriceRange:{},LineToolProjection:{},LineToolRay:{},LineToolRectangle:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(81591))})},LineToolCircle:{},LineToolRegressionTrend:{},LineToolRiskRewardLong:{},LineToolRiskRewardShort:{},LineToolFixedRangeVolumeProfile:{},LineToolRotatedRectangle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolSchiffPitchfork:{},LineToolSchiffPitchfork2:{},LineToolSineLine:{},LineToolText:{},LineToolTextAbsolute:{},LineToolThreeDrivers:{},LineToolTimeCycles:{},LineToolTrendAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolTrendBasedFibExtension:{},LineToolTrendBasedFibTime:{},LineToolTrendLine:{hotKey:(0,r.hotKeySerialize)(g)},LineToolInfoLine:{},LineToolTriangle:{},LineToolTrianglePattern:{},LineToolVertLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"V"],text:"{0} + {1}"})},LineToolCrossLine:{},LineToolHighlighter:{},LineToolGhostFeed:{},SyncDrawing:{iconActive:l.drawingToolsIcons.SyncDrawingActive},arrow:{},cursor:{},dot:{},drawginmode:{iconActive:l.drawingToolsIcons.drawginmodeActive},eraser:{},group:{},hideAllDrawings:{iconActive:l.drawingToolsIcons.hideAllDrawingsActive,hotKey:(0,r.hotKeySerialize)({keys:[m,p,"H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{iconActive:l.drawingToolsIcons.lockAllDrawingsActive},magnet:{hotKey:(0,r.hotKeySerialize)({keys:[m],text:"{0}"})},measure:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(32868))})},removeAllDrawingTools:{},showObjectsTree:{},zoom:{},"zoom-out":{}};const f={};Object.entries(w).map((([e,t])=>{var o,n;const r=null!==(o=s.lineToolsIcons[e])&&void 0!==o?o:l.drawingToolsIcons[e];(0,i.assert)(!!r,`Icon is not defined for drawing "${e}"`);const h=null!==(n=c.lineToolsLocalizedNames[e])&&void 0!==n?n:a[e];(0,i.assert)(!!h,`Localized name is not defined for drawing "${e}"`);return{...t,name:e,icon:r,localizedName:h,selectHotkey:d.lineToolsSelectHotkeys[e]}})).forEach((e=>{f[e.name]=e}))},26916:(e,t,o)=>{"use strict";var i=o(36298).TranslatedString,n=o(44296).LineToolPropertiesWidgetBase;const r=o(70114).ColorPickerButton,s=o(61259).LineWidthButton
const e=this._isVertical,t=this._getCorrectedWidgetRect();this._isVertical=this._determineCurrentLayoutVertical(t),this._updateLayoutType(),e!==this._isVertical&&this._onVerticalChanged(this._isVertical,e)}this.checkPosition(),this._resizeResponsive()}_resizeResponsive(){if(null===this._responsiveResizeFunction)return;let e=this._options.layout||"auto";"auto"===e&&(e=this._isVertical?"vertical":"horizontal");const t="vertical"===e?this._widget.clientHeight:this._widget.clientWidth,o=("vertical"===e?window.innerHeight:window.innerWidth)-t;this._responsiveResizeFunction(t,o,e)}_setZIndex(e){this._widget.style.zIndex=String(e)}_zIndex(){return Number(this._widget.style.zIndex)}_loadPosition(){var e;const t=null!==(e=this._getSavedPosition())&&void 0!==e?e:this._options.defaultPosition;this._widget.style.left=Math.round(t.left)+"px",this._widget.style.top=Math.round(t.top)+"px",this._onWindowResize()}_savePosition(){const e=this._widget.getBoundingClientRect();if("device"===this._options.positionStorageType)try{h.TVLocalStorage.setItem(this._options.positionSettingsKey,JSON.stringify({left:e.left,top:e.top}))}catch(e){}else(0,s.setJSON)(this._options.positionSettingsKey,{left:e.left,top:e.top})}_init(){this._loadPosition(),this._draggable=new m({source:this._widget,containment:"window",handle:".js-drag",start:i.globalCloseMenu,stop:this._savePosition.bind(this)}),this._widget.addEventListener("pointerdown",this.raise.bind(this))}static _updateAllZIndexes(){y._toolbars.forEach(((e,t)=>{e._setZIndex(y._startZIndex+t)}))}}y._startZIndex=20,y._toolbars=[]},44296:(e,t,o)=>{"use strict";o.d(t,{LineToolPropertiesWidgetBase:()=>be});var i=o(50959),n=o(962),r=o(11542),s=o(36298),l=o(14483),a=o(97145),c=o(1722),h=o(88348),d=o(62513),u=o(68806),p=o(50151),m=o(88640);class g extends m.default{constructor(e,t,o){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=e,this._propertyApplier=t,this._undoText=o}destroy(){this._baseProperty.destroy(),super.destroy()}value(){return this._baseProperty.value()}setValue(e){this._isProcess=!0,this._baseProperty.setValue(e,void 0,{applyValue:(e,t)=>this._propertyApplier.setProperty(e,t,this._undoText)}),this._isProcess=!1,this._listenersMappers.forEach((e=>{e.method.call(e.obj,this,"")}))}subscribe(e,t){const o=o=>{this._isProcess||t.call(e,this,"")},i={obj:e,method:t,callback:o};this._listenersMappers.push(i),this._baseProperty.subscribe(e,o)}unsubscribe(e,t){var o;const i=(0,p.ensureDefined)(null===(o=this._listenersMappers.find((o=>o.obj===e&&o.method===t)))||void 0===o?void 0:o.callback);this._baseProperty.unsubscribe(e,i)}unsubscribeAll(e){this._baseProperty.unsubscribeAll(e)}}var v=o(69152),_=o(97754),w=o.n(_),f=o(84877),y=o(3809),b=o(24437);const T=y.FLOATING_TOOLBAR_REACT_WIDGETS_CLASS+"__button";function C(e){const{templateButton:t,propertyButtons:o,commonButtons:n,isDrawingFinished:r,isToolbarFixed:s,buttonClassName:l,activeChartWidget:a}=e,c=a.hasModel()&&a.model().selection().dataSources();return c&&c.length?i.createElement(f.MatchMediaMap,{rules:{
isSmallWidth:b.DialogBreakpoints.TabletSmall,isSmallHeight:"screen and (max-height: 430px)"}},(({isSmallWidth:e,isSmallHeight:t})=>i.createElement(i.Fragment,null,h(),r&&i.createElement(i.Fragment,null,Boolean(o.length)&&o.map(((o,n)=>i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:w()(T,l),isSmallScreen:e||t,isToolbarFixed:s}))),Boolean(n.length)&&n.map(((o,n)=>{const r=e||t;return r?o.showForSmallScreen?i.createElement(o.component,{...o.props,isSmallScreen:r,key:`${o.props.title}_${n}`,className:w()(T,l)}):null:i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:w()(T,l)})})))))):h();function h(){return null===t?null:i.createElement(t.component,{...t.props,isToolbarFixed:s,isDrawingFinished:r,className:w()(T,l)})}}var x=o(51768),L=o(50813),S=o(61964);function P(e){const{title:t,activeChartWidget:o,className:n}=e;return i.createElement(L.ToolWidgetIconButton,{className:n,icon:S,title:t,onClick:async function(){(0,x.trackEvent)("GUI","Context action on drawings","Settings");const e=o.model().selection().lineDataSources(),t=e.length;1===t?await o.showChartPropertiesForSource(e[0],void 0,{onWidget:o.onWidget()}):t>1&&await o.showChartPropertiesForSources({sources:e})},"data-name":"settings"})}var E=o(43982),A=o(66427),B=o(31188);function M(e){const{className:t,...o}=e;return i.createElement(A.ToolButton,{className:_(t,B.button),tooltipPosition:"horizontal",...o})}var z=o(65186),D=o(91244);function k(e){const{activeChartWidget:t,className:n}=e,s=t.model().selection().lineDataSources();if(0===s.length)return null;const l=s[0].properties().frozen,a=(0,E.useProperty)(l),c=a?{tooltip:r.t(null,void 0,o(15101)),icon:z}:{tooltip:r.t(null,void 0,o(42284)),icon:D};return i.createElement(M,{className:n,isActive:Boolean(a),onClick:function(){(0,x.trackEvent)("GUI","Context action on drawings","Lock"),t.toggleLockSelectedObject()},"data-name":Boolean(a)?"unlock":"lock",...c})}var N=o(35149);function W(e){const{title:t,activeChartWidget:o,className:n}=e;return i.createElement(L.ToolWidgetIconButton,{className:n,icon:N,title:t,"data-name":"remove",onClick:function(){(0,x.trackEvent)("GUI","Context action on drawings","Remove"),o.removeSelectedSources()}})}var I=o(9745),R=o(5325),F=o(32563),V=o(8087),O=o(28127),H=o(10643),K=o(24120),Z=o(68335),j=o(4741),U=o(39347),$=o(84959);function G(e,t){const i=[(0,K.createVisualOrderAction)(e,t),(0,K.createChangeIntervalsVisibilitiesAction)(e,t)],n=function(e,t){const i=[],n=Z.isMacKeyboard?" +":"",s=t.filter((e=>e.cloneable()));s.length>0&&i.push(new U.Action({actionId:"Chart.LineTool.Clone",options:{name:"clone",icon:o(36296),shortcutHint:Z.humanReadableModifiers(j.Modifiers.Mod)+n+" Drag",label:r.t(null,void 0,o(52977)),onExecute:()=>{e.model().cloneLineTools(s,!1),(0,x.trackEvent)("GUI","Context action on drawings","Clone")}}}));const l=t.filter((e=>e.copiable()));if(l.length>0){const t={name:"copy",label:r.t(null,void 0,o(35216)),shortcutHint:Z.humanReadableModifiers(j.Modifiers.Mod)+n+" C",onExecute:()=>{
e.chartWidgetCollection().clipboard.uiRequestCopy(l)}};i.push(new U.Action({actionId:"Chart.Clipboard.CopyLineTools",options:t,id:"Copy"}))}return function(e,t){return!!(null==e?void 0:e.isMultipleLayout().value())&&t.some((e=>e.isSynchronizable()))}(e,t)?(i.push(...(0,K.createSyncDrawingActions)(e,t)),i):i}(e,t);return n.length&&i.push(new U.Separator,...n),i.push(new U.Separator,function(e){return new U.Action({actionId:"Chart.SelectedObject.Hide",options:{label:r.t(null,void 0,o(31971)),icon:$,onExecute:()=>{e.hideSelectedObject()},name:"hide"}})}(e)),i}var q=o(44996);function Y(e){const{title:t,activeChartWidget:o,isSmallScreen:n,className:r}=e,s=o.model().selection().lineDataSources(),[l,a]=(0,i.useState)([]),c=(0,i.useRef)(null),h=(0,i.useMemo)((()=>new K.ActionsProvider(o)),[o]),d=(0,i.useCallback)((()=>h.contextMenuActionsForSources(s)),[h,s]),u=(0,i.useCallback)((()=>{if(n)return;const e=G(o,s);a(X(e))}),[n,o,s]),p=(0,i.useCallback)((e=>{n&&d().then((t=>{const o=X(t);window.matchMedia(b.DialogBreakpoints.TabletSmall).matches||!R.isAnyMobile?H.ContextMenuManager.showMenu(o,e,{mode:R.isAnyMobile?"drawer":"menu","data-name":"more-menu"},{menuName:"LineToolFloatingToolbarMoreMenu"}):a(o)}))}),[n,d]);return(0,i.useEffect)((()=>{var e;l.length&&(null===(e=c.current)||void 0===e||e.update())}),[l]),i.createElement(V.ToolWidgetMenu,{className:r,ref:c,arrow:!1,onOpen:u,onClick:p,title:t,content:i.createElement(I.Icon,{icon:q}),"data-name":"more",menuDataName:"more-menu",closeOnEsc:!0},i.createElement(O.ActionsTable,{parentIsOpened:!0,items:l}))}function X(e){if(F.touch&&!window.matchMedia("(pointer:fine)").matches){const t=e.filter((e=>"Copy"!==e.id));if(t.length===e.length)return t;const o=[];return t.forEach((e=>{("separator"!==e.type||o.length>0&&"separator"!==o[o.length-1].type)&&o.push(e)})),o}return e}var J=o(95586),Q=o(12811),ee=o(501),te=o(23851),oe=o(57740),ie=o(80427);function ne(e){const{property:t,propertyApplier:n,title:s,undoText:l,isToolbarFixed:a,className:c}=e,h=(0,E.useProperty)(t),d=(0,i.useMemo)((()=>[new U.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToSolid",options:{icon:ee,label:r.t(null,void 0,o(1277)),active:J.LineStyle.Solid===h,onExecute:()=>n.setProperty(t,J.LineStyle.Solid,l)}}),new U.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDashed",options:{icon:te,label:r.t(null,void 0,o(59317)),active:J.LineStyle.Dashed===h,onExecute:()=>n.setProperty(t,J.LineStyle.Dashed,l)}}),new U.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDotted",options:{icon:oe,label:r.t(null,void 0,o(42973)),active:J.LineStyle.Dotted===h,onExecute:()=>n.setProperty(t,J.LineStyle.Dotted,l)}})]),[n,t,h]);return i.createElement(V.ToolWidgetMenu,{className:c,arrow:!1,content:i.createElement(I.Icon,{icon:re(h)}),title:s,"data-name":e["data-name"],menuDataName:`${e["data-name"]}-menu`,verticalDropDirection:a?Q.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:a?Q.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:a?Q.HorizontalAttachEdge.Right:void 0,
verticalAttachEdge:a?Q.VerticalAttachEdge.Top:void 0},i.createElement(O.ActionsTable,{items:d}))}function re(e){switch(e){case J.LineStyle.Solid:return ee;case J.LineStyle.Dashed:return te;case J.LineStyle.Dotted:return oe;case"mixed":return ie;default:return""}}const se=[10,11,12,14,16,20,24,28,32,40];function le(e){const{property:t,propertyApplier:o,title:n,undoText:r,isToolbarFixed:s,className:l}=e,a=(0,E.useProperty)(t),c=se.map((e=>new U.Action({actionId:"Chart.LineTool.Toolbar.ChangeFontSizeProperty",options:{label:e.toString(),onExecute:()=>o.setProperty(t,e,r),active:e===a}})));return i.createElement(V.ToolWidgetMenu,{arrow:!1,content:a,className:l,title:n,verticalDropDirection:s?Q.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:s?Q.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:s?Q.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:s?Q.VerticalAttachEdge.Top:void 0,"data-name":e["data-name"],menuDataName:`${e["data-name"]}-menu`},i.createElement(O.ActionsTable,{items:c}))}var ae=o(69774),ce=o(92249),he=o(15367),de=o(3587),ue=o(87919);const pe=new s.TranslatedString("change line tool(s) font size",r.t(null,void 0,o(36819))),me=new s.TranslatedString("change line tool(s) line style",r.t(null,void 0,o(54769))),ge=(new s.TranslatedString("apply drawing template",r.t(null,void 0,o(49037))),new s.TranslatedString("line tool(s) line style",r.t(null,{context:"line tool property name"},o(2443)))),ve=r.t(null,void 0,o(89517)),_e=r.t(null,void 0,o(34596)),we=r.t(null,void 0,o(41610)),fe=r.t(null,void 0,o(32733)),ye=r.t(null,void 0,o(17006));class be{constructor(e){this._isDrawingFinished=new a.WatchedValue(!0),this._currentTool=null,this._updateVisibilityTimeout=null,this._lineWidthsProperty=null,this._lineColorsProperty=null,this._currentProperties=null,this._floatingContainer=null,this._floatingToolbarRendered=!1,this._toolbarVisible=!1,this._propertiesVisible=!1,this._templatesButton=null,this._propertyButtons=[],this._commonButtons=[],this._handleSourceEdit=e=>{h.isDirectionalMovementActive.value()||(e?this._floatingToolbar.hide(!0):this._floatingToolbarRendered&&this._floatingToolbar.show())},this._chartWidgetCollection=e,this._floatingToolbar=new y.FloatingToolbar({defaultPosition:{top:ae.HEADER_TOOLBAR_HEIGHT_EXPANDED+15,left:window.innerWidth/2},positionSettingsKey:"properties_toolbar.position",positionStorageType:"device",layout:"horizontal","data-name":"drawing-toolbar"}),this._floatingContainer=this._floatingToolbar.getReactWidgetContainer(),this._isToolMovingNowSpawn=h.isToolMovingNow.spawn(),this._isToolEditingNowSpawn=h.isToolEditingNow.spawn(),this._toolSpawn=h.tool.spawn(),this._iconToolSpawn=h.iconTool.spawn(),this._emojiToolSpawn=h.emojiTool.spawn(),this._selectedSourcesSpawn=this._chartWidgetCollection.selectedSources.spawn(),this._isToolMovingNowSpawn.subscribe(this._handleSourceEdit),this._isToolEditingNowSpawn.subscribe(this._handleSourceEdit),this._toolSpawn.subscribe(this._onToolChanged.bind(this),{callWithLast:!0}),
this._iconToolSpawn.subscribe((()=>this._onToolChanged(h.tool.value()))),this._emojiToolSpawn.subscribe((()=>this._onToolChanged(h.tool.value()))),this._selectedSourcesSpawn.subscribe((()=>this.onSourceChanged(this.selectedSources()))),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(this,this.destroy,!0)}destroy(){this._isToolMovingNowSpawn.destroy(),this._isToolEditingNowSpawn.destroy(),this._toolSpawn.destroy(),this._iconToolSpawn.destroy(),this._emojiToolSpawn.destroy(),this._selectedSourcesSpawn.destroy()}refresh(){this.onSourceChanged(this.selectedSources())}onSourceChanged(e){if(!(null==e?void 0:e.length))return this._propertiesVisible=!1,this._toolbarVisible=!1,void this.hide();if(this._createCommonButtons(),e.every((t=>t.toolname===e[0].toolname))?this._showTemplatesOf({sources:e}):this._templatesButton&&this._clearTemplatesButton(),1===e.length){const t=e[0];t.isAvailableInFloatingWidget()&&this.activeChartWidget().model().model().dataSourceForId(t.id())?(!t.userEditEnabled()||!(0,he.isLineDrawnWithPressedButton)(t.toolname)&&this.activeChartWidget().model().lineBeingCreated()||this._isDrawingFinished.setValue(!0),this.showPropertiesOf(t.toolname,t.properties(),!0),this._toolbarVisible=!0):this.hide()}else this._clearProperties(),this._createWidthsButton(void 0,!0),this._createLineStyleButton(),this._createColorsButton(void 0,!0),this._createBackgroundsButton(void 0,!0),this._createTextColorsButton(void 0,!0),this._propertiesVisible=!0;this._updateVisibility()}activeChartWidget(){return this._chartWidgetCollection.activeChartWidget.value()}selectedSources(){return this._chartWidgetCollection.selectedSources.value().filter(ce.isLineTool)}hide(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{(0,ce.unsetNewToolProperties)(),this._floatingToolbar.hide(!0),this._isToolbarRendered()&&this._unmountFloatingToolbar(),this._clearProperties(),this._clearCommonButtons()}),0),delete this._propertyApplier}templatesList(){return this._templatesList}_onToolChanged(e,t){this._currentTool=e;const o=this.selectedSources();this._isDrawingToolExcludingCustomUrlEventTool(e)?(this._isDrawingFinished.setValue(!1),this._updateVisibility()):o&&o.length?(o.length>1&&this._isDrawingFinished.setValue(!0),this.onSourceChanged(this.selectedSources())):this.hide()}_propertyApplierImpl(){return this._propertyApplier||(this._propertyApplier=new ue.PropertyApplierWithoutSavingChart((()=>this.activeChartWidget().model()),new a.WatchedValue(false))),this._propertyApplier}_clearProperties(){this._clearPropertyButtons(),this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._currentProperties&&(this._currentProperties=null)}_show(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{this._renderFloatingToolbar(),this._floatingToolbar.show(),
this._floatingToolbar.checkPosition()}),0)}_addPropertyButton(e){this._propertyButtons.push(e),this._renderFloatingToolbar()}_addCommonButton(e){this._commonButtons.push(e),this._renderFloatingToolbar()}_addTemplatesButton(e){this._templatesButton=e}_renderFloatingToolbar(){null!==this._floatingContainer&&this.activeChartWidget()&&this.activeChartWidget().hasModel()&&(n.render(i.createElement(C,{templateButton:this._templatesButton,propertyButtons:this._propertyButtons,commonButtons:this._commonButtons,isDrawingFinished:this._isDrawingFinished.value(),activeChartWidget:this.activeChartWidget()}),this._floatingContainer),this._floatingToolbarRendered=!0)}_unmountFloatingToolbar(){null!==this._floatingContainer&&(n.unmountComponentAtNode(this._floatingContainer),this._floatingToolbarRendered=!1)}_clearTemplatesButton(){this._templatesButton=null}_clearPropertyButtons(){this._propertyButtons=[]}_clearCommonButtons(){this._commonButtons=[]}_isToolbarRendered(){return this._floatingToolbarRendered}_createSettingsButton(){const e={component:P,props:{title:ve,activeChartWidget:this.activeChartWidget()}};this._addCommonButton(e)}_createLockButton(){const e={component:k,props:{title:"Lock",activeChartWidget:this.activeChartWidget()}};this._addCommonButton(e)}_createRemoveButton(){const e={component:W,props:{title:_e,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0};this._addCommonButton(e)}_createDotsButton(){this._addCommonButton({component:Y,props:{title:we,activeChartWidget:this.activeChartWidget()},showForSmallScreen:!0})}_createAlertButton(){}_createSourceActions(){this._createLockButton()}_createLineStyleButton(e){const t=this.selectedSources().filter(ce.isLineTool);if(!t.length)return!1;let o,i=this._propertyApplierImpl();if(1===t.length){if(o=t[0].properties().linestyle||e,!o)return!1}else{const e=t.map((e=>e.properties().linestyle||e.properties().lineStyle)).filter(c.notUndefined);if(!e.length)return!1;o=new d.CollectiblePropertyUndoWrapper(new u.LineToolCollectedProperty(e),ge,this._propertyApplierImpl()),i={...i,setProperty:(e,t)=>e.setValue(t)}}return this._addPropertyButton({component:ne,props:{property:o,title:fe,propertyApplier:i,"data-name":"style",undoText:me}}),!0}_createFontSizeButton(e){const t=this.selectedSources();if(0===t.length)return!1;const o=t[0];if(!(0,de.isDataSource)(o))return!1;const i={component:le,props:{property:o.properties().fontsize||e,title:ye,propertyApplier:this._propertyApplierImpl(),"data-name":"font-size",undoText:pe}};return this._addPropertyButton(i),!0}_createCommonButtons(){this._commonButtons.length&&this._clearCommonButtons(),l.enabled("property_pages")&&this._createSettingsButton(),this._createSourceActions(),this._createRemoveButton(),this._createDotsButton()}_prepareProperties(e){const t=this.selectedSources().filter((t=>t.properties()[e]));if(!(t.filter((t=>t.properties()[e].visible())).length<1))return t.map((t=>t.properties()[e])).filter(c.notNull)}_createProperty(e,t,o,i){if(t){const e=this._prepareProperties(o);if(!e)return
;return this._isWidthProperty(e[0])?new g(new u.MultipleLineWidthsProperty(e),this._propertyApplierImpl(),i):new v.CollectibleColorPropertyUndoWrapper(new u.MultipleLineColorsProperty(e),this._propertyApplierImpl(),i)}if(e&&e.visible())return this._isWidthProperty(e)?new u.MultipleLineWidthsProperty([e]):new v.CollectibleColorPropertyDirectWrapper(new u.MultipleLineColorsProperty([e]))}_shouldShowBackgroundProperty(e,t){return!t||!t.fillBackground||!!t.fillBackground.value()}_isDrawingToolExcludingCustomUrlEventTool(e){return Boolean(null==e?void 0:e.toLowerCase().includes("linetool"))&&"LineToolTweet"!==e&&"LineToolIdea"!==e&&"LineToolImage"!==e}_updateVisibility(){this._isDrawingFinished.value()&&(this._toolbarVisible||this._propertiesVisible)?this._show():this.hide()}_showTemplatesOf(e){}_isWidthProperty(e){return e instanceof u.LineToolWidthsProperty}}},78036:(e,t,o)=>{"use strict";o.d(t,{lineToolsInfo:()=>f});var i=o(50151),n=o(11542),r=o(61814),s=(o(42053),o(57673)),l=o(87872);const a={SyncDrawing:n.t(null,void 0,o(36551)),arrow:n.t(null,void 0,o(96237)),cursor:n.t(null,void 0,o(29908)),dot:n.t(null,void 0,o(60925)),performance:n.t(null,void 0,o(79165)),drawginmode:n.t(null,void 0,o(49421)),eraser:n.t(null,void 0,o(99289)),group:n.t(null,void 0,o(91977)),hideAllDrawings:n.t(null,void 0,o(17517)),lockAllDrawings:n.t(null,void 0,o(37057)),magnet:n.t(null,void 0,o(37140)),measure:n.t(null,void 0,o(59607)),removeAllDrawingTools:n.t(null,void 0,o(76091)),showObjectsTree:n.t(null,void 0,o(51072)),zoom:n.t(null,void 0,o(38925)),"zoom-out":n.t(null,void 0,o(49895))};var c=o(59656),h=o(68335),d=o(86972);const u=(0,h.humanReadableModifiers)(h.Modifiers.Shift,!1),p=(0,h.humanReadableModifiers)(h.Modifiers.Alt,!1),m=(0,h.humanReadableModifiers)(h.Modifiers.Mod,!1),g={keys:[u],text:n.t(null,void 0,o(40234))},v={keys:[u],text:n.t(null,void 0,o(68125))},_={keys:[u],text:n.t(null,void 0,o(81591))},w={LineTool5PointsPattern:{},LineToolABCD:{},LineToolArc:{},LineToolArrow:{},LineToolArrowMarkDown:{},LineToolArrowMarkLeft:{},LineToolArrowMarkRight:{},LineToolArrowMarkUp:{},LineToolBalloon:{},LineToolComment:{},LineToolBarsPattern:{},LineToolBezierCubic:{},LineToolBezierQuadro:{},LineToolBrush:{},LineToolCallout:{},LineToolCircleLines:{},LineToolCypherPattern:{},LineToolDateAndPriceRange:{},LineToolDateRange:{},LineToolDisjointAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolElliottCorrection:{},LineToolElliottDoubleCombo:{},LineToolElliottImpulse:{},LineToolElliottTriangle:{},LineToolElliottTripleCombo:{},LineToolEllipse:{hotKey:(0,r.hotKeySerialize)(v)},LineToolExtended:{},LineToolFibChannel:{},LineToolFibCircles:{hotKey:(0,r.hotKeySerialize)(v)},LineToolFibRetracement:{},LineToolFibSpeedResistanceArcs:{},LineToolFibSpeedResistanceFan:{hotKey:(0,r.hotKeySerialize)(_)},LineToolFibSpiral:{},LineToolFibTimeZone:{},LineToolFibWedge:{},LineToolFlagMark:{},LineToolFlatBottom:{hotKey:(0,r.hotKeySerialize)(g)},LineToolAnchoredVWAP:{},LineToolGannComplex:{},LineToolGannFixed:{},LineToolGannFan:{},LineToolGannSquare:{hotKey:(0,
r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(10289))})},LineToolHeadAndShoulders:{},LineToolHorzLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"H"],text:"{0} + {1}"})},LineToolHorzRay:{},LineToolIcon:{},LineToolEmoji:{},LineToolInsidePitchfork:{},LineToolNote:{},LineToolNoteAbsolute:{},LineToolSignpost:{},LineToolParallelChannel:{hotKey:(0,r.hotKeySerialize)(g)},LineToolPitchfan:{},LineToolPitchfork:{},LineToolPolyline:{},LineToolPath:{},LineToolPrediction:{},LineToolPriceLabel:{},LineToolPriceNote:{hotKey:(0,r.hotKeySerialize)(g)},LineToolArrowMarker:{},LineToolPriceRange:{},LineToolProjection:{},LineToolRay:{},LineToolRectangle:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(81591))})},LineToolCircle:{},LineToolRegressionTrend:{},LineToolRiskRewardLong:{},LineToolRiskRewardShort:{},LineToolFixedRangeVolumeProfile:{},LineToolRotatedRectangle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolSchiffPitchfork:{},LineToolSchiffPitchfork2:{},LineToolSineLine:{},LineToolText:{},LineToolTextAbsolute:{},LineToolThreeDrivers:{},LineToolTimeCycles:{},LineToolTrendAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolTrendBasedFibExtension:{},LineToolTrendBasedFibTime:{},LineToolTrendLine:{hotKey:(0,r.hotKeySerialize)(g)},LineToolInfoLine:{},LineToolTriangle:{},LineToolTrianglePattern:{},LineToolVertLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"V"],text:"{0} + {1}"})},LineToolCrossLine:{},LineToolHighlighter:{},LineToolGhostFeed:{},SyncDrawing:{iconActive:l.drawingToolsIcons.SyncDrawingActive},arrow:{},cursor:{},dot:{},drawginmode:{iconActive:l.drawingToolsIcons.drawginmodeActive},eraser:{},group:{},hideAllDrawings:{iconActive:l.drawingToolsIcons.hideAllDrawingsActive,hotKey:(0,r.hotKeySerialize)({keys:[m,p,"H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{iconActive:l.drawingToolsIcons.lockAllDrawingsActive},magnet:{hotKey:(0,r.hotKeySerialize)({keys:[m],text:"{0}"})},measure:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(32868))})},removeAllDrawingTools:{},showObjectsTree:{},zoom:{},"zoom-out":{}};const f={};Object.entries(w).map((([e,t])=>{var o,n;const r=null!==(o=s.lineToolsIcons[e])&&void 0!==o?o:l.drawingToolsIcons[e];(0,i.assert)(!!r,`Icon is not defined for drawing "${e}"`);const h=null!==(n=c.lineToolsLocalizedNames[e])&&void 0!==n?n:a[e];(0,i.assert)(!!h,`Localized name is not defined for drawing "${e}"`);return{...t,name:e,icon:r,localizedName:h,selectHotkey:d.lineToolsSelectHotkeys[e]}})).forEach((e=>{f[e.name]=e}))},26916:(e,t,o)=>{"use strict";var i=o(36298).TranslatedString,n=o(44296).LineToolPropertiesWidgetBase;const r=o(70114).ColorPickerButton,s=o(61259).LineWidthButton
;var l=o(94071),a=o(21065),c=o(89103),h=new i("change line tool(s) color",o.tf(null,void 0,o(68519))),d=new i("change line tool(s) background color",o.tf(null,void 0,o(74350))),u=new i("change line tool(s) text color",o.tf(null,void 0,o(16631))),p=new i("change line tool(s) line width",o.tf(null,void 0,o(41648))),m=o.tf(null,void 0,o(40054)),g=o.tf(null,void 0,o(12928)),v=o.tf(null,void 0,o(19221)),_=o.tf(null,void 0,o(21327)),w=o.tf(null,void 0,o(38455)),f=o.tf(null,void 0,o(71845)),y=o.tf(null,void 0,o(32733)),b=o.tf(null,void 0,o(23886)),T=o.tf(null,void 0,o(86327)),C=o.tf(null,void 0,o(47059)),x=o.tf(null,void 0,o(36785)),L=o.tf(null,void 0,o(49593)),S=o.tf(null,void 0,o(67455)),P=o.tf(null,void 0,o(79964)),E=o.tf(null,void 0,o(45320));class A extends n{constructor(e){super(e),this._templatesButton=null}_createWidthsButton(e,t){if(this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineWidthsProperty=this._createProperty(e,t,"linesWidths",p),!this._lineWidthsProperty)return!0;var o=T;t&&(1!==this.selectedSources().filter((e=>e.properties().linesWidths)).length&&(o=C));return this._addPropertyButton({component:s,props:{title:o,multipleProperty:this._lineWidthsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-width",undoText:p}}),!0}_createColorsButton(e,t){return this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._lineColorsProperty=this._createProperty(e,t,"linesColors",h),!this._lineColorsProperty||(this._addPropertyButton({component:r,props:{icon:l,title:g,property:this._lineColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-color",undoText:h}}),!0)}_createBackgroundsButton(e,t){return this._backgroundsProperty&&(this._backgroundsProperty.destroy(),this._backgroundsProperty=null),this._backgroundsProperty=this._createProperty(e,t,"backgroundsColors",d),!this._backgroundsProperty||(this._addPropertyButton({component:r,props:{icon:a,title:f,property:this._backgroundsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"background-color",undoText:d}}),!0)}_createTextColorsButton(e,t){return this._textColorsProperty&&(this._textColorsProperty.destroy(),this._textColorsProperty=null),this._textColorsProperty=this._createProperty(e,t,"textsColors",u),!this._textColorsProperty||(this._addPropertyButton({component:r,props:{icon:c,title:_,property:this._textColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"text-color",undoText:u}}),!0)}_getPossibleProperty(e){for(var t=[],o=this._defaultToolProperties(),i=0;i<o.length;i++){var n=o[i];n.name in e&&t.push(n)}return t}showPropertiesOf(e,t,o){this._toolExceptionCases||(this._toolExceptionCases=this._createToolExceptionCases());var i=this._toolExceptionCases[e]||this._getPossibleProperty(t);if(this._clearProperties(),this._propertiesVisible=!1,i.length){for(var n={},s=0;s<i.length;s++){for(var l=i[s],a=t,c=l.name.split("."),h=0;h<c.length;++h)a=a&&a[c[h]];var d=l.showIf
;if("function"!=typeof d||d(a,t)){var u=l.factory;if(u&&u.call(this,a,o))continue;if(!a)continue;if(this._propertiesVisible=!0,"combobox"!==l.inputType){const e={component:r,props:{icon:l.iconSvgCode,title:l.title,"data-name":l.dataName,property:a,propertyApplier:this._propertyApplierImpl(),undoText:l.undoText}};this._addPropertyButton(e);continue}n[l.name]=a}}this._currentProperties=n}}_defaultToolProperties(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:l,title:m,factory:A.prototype._createColorsButton,dataName:"line-tool-color"},{name:"backgroundsColors",inputType:"colorPicker",iconSvgCode:a,title:w,factory:A.prototype._createBackgroundsButton,dataName:"background-color",showIf:this._shouldShowBackgroundProperty},{name:"textsColors",title:v,inputType:"colorPicker",iconSvgCode:c,factory:A.prototype._createTextColorsButton,dataName:"text-color"},{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton},{name:"linestyle",title:y,inputType:"combobox",factory:A.prototype._createLineStyleButton}]}_regressionToolExceptionCases(){return[{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton}]}_pathExceptionCases(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:l,title:m,factory:A.prototype._createColorsButton,dataName:"line-tool-color"},{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton},{name:"lineStyle",title:y,inputType:"combobox",factory:A.prototype._createLineStyleButton}]}_riskPropertiesExceptionCases(){return[{name:"textcolor",title:v,inputType:"colorPicker",iconSvgCode:c,dataName:"text-color",undoText:u},{name:"profitBackground",title:x,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",undoText:d},{name:"stopBackground",title:L,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",undoText:d}]}_rangeExceptionCases(){return[{name:"linecolor",inputType:"colorPicker",iconSvgCode:l,title:m,dataName:"line-tool-color",undoText:h},{name:"backgroundColor",inputType:"colorPicker",iconSvgCode:a,title:w,dataName:"background-color",showIf:this._shouldShowBackgroundProperty,undoText:d},{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton}]}_brushPropertiesExceptionCase(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:l,title:m,factory:A.prototype._createColorsButton,dataName:"line-tool-color"},{name:"backgroundsColors",inputType:"colorPicker",iconSvgCode:a,title:w,dataName:"background-color",factory:A.prototype._createBackgroundsButton},{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton}]}_bezierPropertiesExceptionCases(){return[{name:"linesColors",inputType:"colorPicker",iconSvgCode:l,title:m,factory:A.prototype._createColorsButton,dataName:"line-tool-color"},{name:"backgroundsColors",inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",title:w,factory:A.prototype._createBackgroundsButton,showIf:this._shouldShowBackgroundProperty},{name:"linesWidths",inputType:"combobox",
factory:A.prototype._createWidthsButton},{name:"linestyle",title:y,inputType:"combobox",factory:A.prototype._createLineStyleButton}]}_textPropertiesExceptionCases(){return[{name:"color",title:v,inputType:"colorPicker",iconSvgCode:c,dataName:"text-color",undoText:u},{name:"backgroundColor",title:w,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",showIf:this._shouldShowBackgroundProperty,undoText:d},{name:"fontsize",title:b,inputType:"combobox",factory:A.prototype._createFontSizeButton}]}_notePropertiesExceptionCases(){return[{name:"markerColor",title:S,inputType:"colorPicker",iconSvgCode:l,dataName:"line-tool-color",undoText:h},{name:"textColor",title:v,inputType:"colorPicker",iconSvgCode:c,dataName:"text-color",undoText:u},{name:"fontSize",title:b,inputType:"combobox",factory:A.prototype._createFontSizeButton}]}_createToolExceptionCases(){return{LineToolBrush:A.prototype._brushPropertiesExceptionCase(),LineToolBezierQuadro:A.prototype._bezierPropertiesExceptionCases(),LineToolBezierCubic:A.prototype._bezierPropertiesExceptionCases(),LineToolText:A.prototype._textPropertiesExceptionCases(),LineToolTextAbsolute:A.prototype._textPropertiesExceptionCases(),LineToolBalloon:A.prototype._textPropertiesExceptionCases(),LineToolComment:A.prototype._textPropertiesExceptionCases(),LineToolCallout:A.prototype._textPropertiesExceptionCases(),LineToolPriceLabel:A.prototype._textPropertiesExceptionCases(),LineToolDateRange:A.prototype._rangeExceptionCases(),LineToolPriceRange:A.prototype._rangeExceptionCases(),LineToolDateAndPriceRange:A.prototype._rangeExceptionCases(),LineToolNote:A.prototype._notePropertiesExceptionCases(),LineToolNoteAbsolute:A.prototype._notePropertiesExceptionCases(),LineToolRiskRewardLong:A.prototype._riskPropertiesExceptionCases(),LineToolRiskRewardShort:A.prototype._riskPropertiesExceptionCases(),LineToolPath:A.prototype._pathExceptionCases(),LineToolRegressionTrend:A.prototype._regressionToolExceptionCases(),LineToolBarsPattern:[{name:"color",title:m,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",undoText:h}],LineToolProjection:[{name:"color1",title:P,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",undoText:d},{name:"color2",title:E,inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",undoText:d},{name:"linesWidths",inputType:"combobox",factory:A.prototype._createWidthsButton}],LineToolSignpost:[{name:"linesColors",inputType:"colorPicker",iconSvgCode:a,dataName:"background-color",title:m,factory:A.prototype._createBackgroundsButton,showIf:function(e,t){return t&&t.showImage.value()}},{name:"fontSize",title:b,inputType:"combobox",factory:A.prototype._createFontSizeButton}]}}}e.exports=A},69152:(e,t,o)=>{"use strict";o.d(t,{CollectibleColorPropertyDirectWrapper:()=>l,CollectibleColorPropertyUndoWrapper:()=>s});var i=o(50151),n=o(88640);class r extends n.default{constructor(e){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=e}destroy(){this._baseProperty.destroy(),super.destroy()}value(){

View File

@@ -1,6 +1,6 @@
(()=>{"use strict";var e,a,d,c,t,f={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var d=b[e]={id:e,loaded:!1,exports:{}};return f[e].call(d.exports,d,d.exports,r),d.loaded=!0,d.exports}r.m=f,r.c=b,e=[],r.O=(a,d,c,t)=>{if(!d){var f=1/0;for(i=0;i<e.length;i++){for(var[d,c,t]=e[i],b=!0,n=0;n<d.length;n++)(!1&t||f>=t)&&Object.keys(r.O).every((e=>r.O[e](d[n])))?d.splice(n--,1):(b=!1,t<f&&(f=t));if(b){e.splice(i--,1);var o=c();void 0!==o&&(a=o)}}return a}t=t||0;for(var i=e.length;i>0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[d,c,t]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var t=Object.create(null);r.r(t);var f={};a=a||[null,d({}),d([]),d(d)];for(var b=2&c&&e;"object"==typeof b&&!~a.indexOf(b);b=d(b))Object.getOwnPropertyNames(b).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,r.d(t,f),t},r.d=(e,a)=>{for(var d in a)r.o(a,d)&&!r.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,d)=>(r.f[d](e,a),a)),[])),r.u=e=>9417===e?"__LANG__.9417.7ff64779d43389a1bb41.js":3175===e?"__LANG__.3175.e0a2c845c5cba23f42fb.js":3951===e?"__LANG__.3951.babac9be598102fb0d92.js":5362===e?"__LANG__.5362.311bfba5d2c84b13ec2b.js":2578===e?"__LANG__.2578.ab3178e0160c259eac53.js":2547===e?"__LANG__.2547.28b713bedf796244795d.js":2285===e?"__LANG__.2285.1268ecef367debd2960b.js":344===e?"__LANG__.344.a9e566fa1091368f40c7.js":178===e?"__LANG__.178.dd03c0163a8373c0fc5b.js":6306===e?"__LANG__.6306.b88dcc3f0d7db89ebfc1.js":3236===e?"__LANG__.3236.e12bb9a536432e97ec0c.js":({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2616:"svg-renderer",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5516:"restricted-toolset",5551:"favorite-drawings-api",5565:"ichart-storage",5598:"lt-stickers-atlas",6124:"chart-storage-library-http",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7129:"line-tools-synchronizer",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8313:"chart-storage-external-adapter",
8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl",9498:"export-data",9685:"series-icons-map",9754:"global-search-dialog"}[e]||e)+"."+{6:"a03a8ff024d47ed075c6",92:"795900ef9e075c847a64",139:"83ba0cba4c0538851e0a",507:"51d0897ba74454ec3423",524:"2b350163c328ac8dce2e",607:"1d3c58ff151a9c7c19a3",731:"5039a5ac2f3556b18cb1",750:"e16edadfacd60574d861",826:"906374d84a8e6c40c6e8",855:"61db310932f8af2c5989",898:"b63568700f1380e37b1a",956:"a325fc0a9a24da09a622",962:"9f54d549868e21286372",1033:"bb804c64fe58de0bace7",1109:"845f0f111ff830ab93c8",1553:"c076714f5e24887f0b94",1583:"077de067da0763f84cb2",1584:"4170e3d150582097504c",1702:"5f8ccee744105adf029e",1740:"4c61de525e940eee4f3c",1754:"e5850d7e02343ee54c52",1762:"9511e5b410d7d629bc49",1803:"5799aa316db71b2f13e5",1859:"851f6bf2bf36fe8fbac4",1890:"ecc8d3a4af49afed6b6d",2052:"e9d07fdfb896fca26166",2077:"ebdeefbf84f9e033ed5b",2109:"291fa715b6ded706c3dd",2183:"6caf467f12b1d6ee408a",2191:"2197cc1b66a1db8969cc",2260:"95dc0a20b147b6b2eeed",2306:"d32b5098422df02a6688",2377:"6e30e0c48af40bf2f6c0",2443:"66f44a8bfe8d49aaeaee",2486:"2b718a16270e4168ea54",2544:"225f38946afc6ad55a35",2587:"615babc52637decdb6e2",2616:"f065beaf6b5b37da27d9",2639:"a55d77a7912be54f7b9d",2666:"d28c0fa0a323b8118f22",2676:"a9a5ede4d514162164fa",2704:"8bac01cc43d3f2cbf903",2731:"55eed17fefac5e82c077",2846:"fbbd62afe04b4f9387f2",2878:"37a00c1b0c7a68cc1d44",3005:"df1a95078c18a5da785c",3030:"5ce0d1c060e0d28cde15",3066:"8b1d2ceb22d9fedde67b",3263:"238cd2d620e004adee5a",3353:"de1d5e3e034ab68aa9fc",3502:"1985af3fa836c4248178",3596:"e4f9354142134a911ace",3610:"c79c6bddd919cb78428a",3717:"6f65e91a870250a6e450",3780:"ef366b87d104534e68d8",3842:"8758110ab553b5368121",3896:"14d9e7509c300245c219",3914:"33b17e48eb923e015932",3939:"2ee1e71dbe0bc0d85625",3980:"9d7eeb2bacce45c508b3",3986:"b50fcad4f1b77533bda7",4013:"1aa54900370f7317d3f0",4015:"9b6607a6f543f077c5a5",4062:"9229fac3ef3db26fd5bc",4079:"d3299bca6e9fad2c340a",4102:"67b3d1107a6ec8d571eb",4215:"8934b190aaed2663c300",4370:"18ca7d93e5073f0446c0",4389:"600804a9c180df6a83b1",4403:"bf44a542113a4440984b",4648:"7172f75bb866b3438c6f",4665:"d7331dbca4a2aa0909e7",4713:"8582f5ea3328f2cbdfae",4781:"e8294ba5c7c6aef1fce7",4788:"d3e8ad5f514051fcc835",4862:"0b6cab4cb55e2cef2c40",4894:"035fecc664874bb752b0",4987:"a23484dfcca6d5fae195",5009:"9a37c608b4849a6f8a11",5057:"5382614553878fcf337d",5093:"75a373be3b6816e8b55a",5128:"57de9f218989cee8119d",5145:"da831552b3b54ca47682",5163:"953e65e04ed31b0ea0b3",5164:"a45b25a7ca6a0c16f810",5166:"979eb8cba5281ffcb38b",5516:"78732f5a01aa118efb81",5551:"340e60e2342b0d93ebe7",5565:"1144e5a1b4f8503ee572",5598:"52ad6e6d7d7b134ab0ba",5649:"5c1e55c9dad604880876",5664:"87e81959e880fa8ba65d",5866:"039e25226b82968cca61",5940:"c058b0e0ef421f740684",5983:"3c0ae13972f5d3433a77",5993:"0e5f49179c6a516963de",6025:"d669a0315da9d6fda6b3",6036:"5b373caaaa6e1ba4495f",6106:"1d31df88e63bf542ea7b",6124:"f1f53155460ee314f062",6166:"9fb712c61440c609af69",
6214:"5a578175aab923a979dc",6221:"56c4d15c823c019ddb39",6265:"b3553940c9159e24d8aa",6408:"e58aaf98d9306e8d9b77",6456:"b04732ea1491ac587015",6494:"7f264af8142cb9910c06",6625:"364cf21fe24d7e675de8",6631:"711ba6ae5b343ace8691",6639:"a1bd5bf1d51c681561a1",6747:"ae7a7ec28d22057d6d0d",6752:"912872ffa56a7243d664",6780:"3b96f58f66e0caa61b15",6884:"07642217627127113fb0",6918:"c8f3265e9286a784038b",6925:"665969c4af4481df0691",6949:"f50051a55eaa8dd5e780",6985:"8d289318ce5fe6dc7763",7051:"ba50ecafb4527628fb40",7078:"cddce4ed266fd9e0629e",7111:"4716f3208dc337521c10",7129:"0bc2d3617dda7143f094",7149:"d450e8145ad7e6fbd67f",7194:"098c1a8da1ddbbda98f6",7260:"6826612f0a41ab0fc35c",7271:"f7e796a37129a93179ee",7350:"aa555ff9e17c4029aedd",7391:"c63bd39c42093cc4130c",7413:"3a52b91975b98e6fe8e4",7550:"087936b2aa6ea51cd6bf",7555:"ea682716c26bc13db765",7648:"02c87d9b20f743b5cf16",7663:"6fabc58c7ddf7c2b076f",7807:"6adfcf6c0792dc9c9363",7871:"df6a9177c293c0c53e80",7987:"5d7c9d668ac98bd5bce1",8020:"71213c4f755723965a80",8056:"c06a1c8fb4a1f18cf217",8149:"9fb525d10e5c8ba95701",8167:"3edae41386acc976c9f8",8287:"7a7977ba76726177fb3c",8313:"9c1267d07e48b8d8f53f",8450:"757d38443ea38bd0165f",8537:"ae758430950906d90d11",8643:"3a92633d0497afb5344c",8882:"9838a8b1e0e6766b6408",8890:"6a6e7744cd3263ce2887",8904:"87e94e93ade13962a48f",9039:"19bbb3fc39665da2e3e6",9138:"f516266ddcf6ca8c7064",9327:"0c38440ca52f144413ac",9374:"6ef1056ef156ddb4caf1",9403:"61498701a4dae3f700c2",9465:"ca5284cff2560957cdd6",9498:"f43b3c60275506b2198a",9685:"f25fb7b89b7e831b726c",9754:"91018047180ff0d9e40b",9789:"458feb5c8c0263b0618b",9842:"581808dd4a8651b16779",9916:"0c2cb2d12479a20efce1"}[e]+".js",r.miniCssF=e=>e+"."+{6:"362fa6a7ab1f3e3b06c4",524:"ef662c4bc3e57dd91171",826:"2effba57f47544e58368",855:"56a5e53c97d91a9f96f7",898:"f909d7c1efc95f635922",956:"1e89775cfd644d656c56",1033:"5197f9f8b8500206d06c",1109:"b1ced88f4a839badfff1",1762:"7ff6b353c441db2276da",1803:"4653bb65d2b0d594d6af",2109:"4d5de3fbde1cd7dc5e9f",2191:"bb0aa12f5e562fd483f3",2260:"b98824e4829a1aa9b444",2486:"82c7dba4839761a57f28",2587:"1f1100dc01693edfe269",2639:"7b1d42eef7b89e0e96d3",2666:"fbb750fd312778403036",2676:"2d3cabbd39a3b0d6e9ea",2731:"ec19f123cabf8efd03a4",3066:"58a325f25b087530293d",3353:"860146c59230ab4bd938",3502:"c49903f7222870ff8aca",3610:"11b7ad14e26429fdfa5d",3717:"856421c70a4dff35762a",3780:"a289557f2e0bcabcc4ca",3842:"8cf6b523fd5a5b6fb022",3896:"96db838d3467bcf68051",3914:"d2b6c577f350629b6837",3939:"4d0187960a564ff5a557",3980:"b2ff45a2d8bb6a131d7c",4015:"1d0e3a62a59d173c81f3",4102:"4abd8542fa3aa3e7fd5d",4215:"d24836a292b1969ab4bb",4781:"cf1365a3bf51d9989978",4788:"3cff897925f7a8dbc837",4894:"99d4c2794da9feef3c70",4987:"ca5d16a7e990d39bfb0e",5145:"a2b224fd27ab2941c565",5163:"950dd1d584f76da1ed3b",5166:"a12c50ad6225ca6de843",5649:"b60ed09c5ea8c55827d4",5866:"f164dd2a584ab0f493cf",5940:"aedc1bdbd324e6042b17",5993:"4705829d0834140ee3f2",6025:"263b457b1a7f9ca139b2",6036:"3b493a9f0ab052e6447c",6106:"f01163745d787b60c86c",6214:"65b7dbf8be6cca5ac143",6221:"bc53670dfb8f982908a2",
6494:"4c212043f24336e170d5",6625:"0ed88fc3a989c98408cc",6639:"885b5577e3fb71ee2bea",6747:"c7d403ae692f88568278",6752:"207eb3cc75b3ed2c6754",6884:"bb7d30a7bbbe5af36556",6925:"a3a09d7303a96edb77cb",6949:"19355e81a60b640ea097",6985:"2cd225354e2fd236e8e9",7111:"b16b4eb739a7e8577559",7149:"12adbb19fdefe9b66b18",7194:"e04f69c8933166966874",7350:"00632eec360f0cf2d9a0",7391:"9c809fa91ed0c8f75bc0",7413:"f830ad1ad6ee6f9b1cb3",7555:"8c1e3939e7666b0f8c69",7807:"8577632fdab29ee53ddf",7871:"fff454908cba03863eb7",8056:"1f54f717d8e522c55c89",8149:"21f2b01074a4d082e268",8287:"2b6f71ec5c0064590ffd",8450:"f75ab24e1ecb22d29183",8904:"a302177fe7e3ccd50cb0",9138:"03b8fbcfabcae851949a",9327:"97be240031495a68333f",9403:"db9859ab09623682562c",9465:"fd61e82b3c912f2e9fad",9789:"cb5ad20bc727d3820b6c",9842:"ceaeabba258d065497c8",9916:"60c48148a54dba9504a0"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},t="tradingview:",r.l=(e,a,d,f)=>{if(c[e])c[e].push(a);else{var b,n;if(void 0!==d)for(var o=document.getElementsByTagName("script"),i=0;i<o.length;i++){var l=o[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==t+d){b=l;break}}b||(n=!0,(b=document.createElement("script")).charset="utf-8",b.timeout=120,r.nc&&b.setAttribute("nonce",r.nc),b.setAttribute("data-webpack",t+d),b.src=e,0!==b.src.indexOf(window.location.origin+"/")&&(b.crossOrigin="anonymous")),c[e]=[a];var s=(a,d)=>{b.onerror=b.onload=null,clearTimeout(u);var t=c[e];if(delete c[e],b.parentNode&&b.parentNode.removeChild(b),t&&t.forEach((e=>e(d))),a)return a(d)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=s.bind(null,b.onerror),b.onload=s.bind(null,b.onload),n&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var a=r.g.document;if(!e&&a&&(a.currentScript&&(e=a.currentScript.src),!e)){var d=a.getElementsByTagName("script");d.length&&(e=d[d.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.g.location&&r.p.startsWith(r.g.location.origin)&&(r.p=r.p.slice(r.g.location.origin.length)),(()=>{const e=r.u;r.u=a=>e(a).replace("__LANG__",r.g.language)})(),(()=>{const e={ca_ES:(e=1)=>+(1!=e),cs:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),el:(e=1)=>+(1!=e),da_DK:(e=1)=>+(1!=e),en:(e=1)=>+(1!=e),et_EE:(e=1)=>+(1!=e),fa:(e=1)=>0,hu_HU:(e=1)=>0,id_ID:(e=1)=>0,it:(e=1)=>+(1!=e),ms_MY:(e=1)=>0,
no:(e=1)=>+(1!=e),nl_NL:(e=1)=>+(1!=e),ro:(e=1)=>+(1==e?0:e%100>19||e%100==0&&0!=e?2:1),sk_SK:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),sv:(e=1)=>+(1!=e),zh:(e=1)=>0,zh_TW:(e=1)=>0,de:(e=1)=>+(1!=e),es:(e=1)=>+(1!=e),fr:(e=1)=>+(e>1),he_IL:(e=1)=>+(1==e?0:2==e?1:e>10&&e%10==0?2:3),ko:(e=1)=>0,ja:(e=1)=>0,pl:(e=1)=>+(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),pt:(e=1)=>+(1!=e),tr:(e=1)=>+(1!=e),vi:(e=1)=>0,ar:(e=1)=>+(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5),ru:(e=1)=>+(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),th:(e=1)=>0};r.tf=(a,d={},c)=>{if(null===a){if(Array.isArray(c)){if(r.g.customTranslateFunction){const e=r.g.customTranslateFunction(c[0],d.plural?{...d,plural:c.length>2?c.slice(1):c[1]}:d,!0);if(null!==e)return e}return(c[e[r.g.language](d.count)]||c[0]).replace(/{(\w+)}/g,((e,a)=>void 0!==(d.replace||d)[a]?(d.replace||d)[a]:e))}return"object"==typeof c?r.tf(null,d,c[r.g.language||"en"]):r.tf(c,d)}if(c&&a){const e=`${a}${d.context?`_${d.context}`:""}`;if(c[e])return r.tf(null,d,c[e])}if("number"==typeof a)return a.toString();if("string"!=typeof a)return"";if(r.g.customTranslateFunction){const e=r.g.customTranslateFunction(a,d,!1);if(null!==e)return e}return(d.plural&&1!=+d.count?d.plural:a).replace(/{(\w+)}/g,((e,a)=>void 0!==(d.replace||d)[a]?(d.replace||d)[a]:e))}})(),r.p=r.g.WEBPACK_PUBLIC_PATH||r.p;var n=r.e,o=Object.create(null);function i(e,a){return n(e).catch((function(){return new Promise((function(d){var c=function(){self.removeEventListener("online",c,!1),!1===navigator.onLine?self.addEventListener("online",c,!1):d(a<2?i(e,a+1):n(e))};setTimeout(c,a*a*1e3)}))}))}r.e=function(e){if(!o[e]){o[e]=i(e,0);var a=function(){delete o[e]};o[e].then(a,a)}return o[e]},(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((a,d)=>{var c=r.miniCssF(e),t=r.p+c;if(((e,a)=>{for(var d=document.getElementsByTagName("link"),c=0;c<d.length;c++){var t=(b=d[c]).getAttribute("data-href")||b.getAttribute("href");if("stylesheet"===b.rel&&(t===e||t===a))return b}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){var b;if((t=(b=f[c]).getAttribute("data-href"))===e||t===a)return b}})(c,t))return a();((e,a,d,c,t)=>{var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onerror=f.onload=d=>{if(f.onerror=f.onload=null,"load"===d.type)c();else{var b=d&&("load"===d.type?"missing":d.type),r=d&&d.target&&d.target.href||a,n=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");n.code="CSS_CHUNK_LOAD_FAILED",n.type=b,n.request=r,f.parentNode&&f.parentNode.removeChild(f),t(n)}},f.href=a,0!==f.href.indexOf(window.location.origin+"/")&&(f.crossOrigin="anonymous"),d?d.parentNode.insertBefore(f,d.nextSibling):document.head.appendChild(f)})(e,t,null,a,d)})),a={3666:0};r.f.miniCss=(d,c)=>{a[d]?c.push(a[d]):0!==a[d]&&{6:1,524:1,826:1,855:1,898:1,956:1,1033:1,1109:1,1762:1,1803:1,2109:1,2191:1,2260:1,2486:1,2587:1,2639:1,2666:1,2676:1,2731:1,3066:1,3353:1,3502:1,3610:1,3717:1,3780:1,3842:1,3896:1,3914:1,3939:1,3980:1,4015:1,4102:1,4215:1,4781:1,
4788:1,4894:1,4987:1,5145:1,5163:1,5166:1,5649:1,5866:1,5940:1,5993:1,6025:1,6036:1,6106:1,6214:1,6221:1,6494:1,6625:1,6639:1,6747:1,6752:1,6884:1,6925:1,6949:1,6985:1,7111:1,7149:1,7194:1,7350:1,7391:1,7413:1,7555:1,7807:1,7871:1,8056:1,8149:1,8287:1,8450:1,8904:1,9138:1,9327:1,9403:1,9465:1,9789:1,9842:1,9916:1}[d]&&c.push(a[d]=e(d).then((()=>{a[d]=0}),(e=>{throw delete a[d],e})))}}})(),(()=>{var e={3666:0,6150:0};r.f.j=(a,d)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(/^(1(033|109|762|803)|2(6(39|66|76)|109|191|260|486|587|731)|3(9(14|39|80)|(06|66|89)6|353|502|610|717|780|842)|4(78[18]|[02]15|102|894|987)|5(1(45|63|66)|24|649|866|940|993)|6(9(25|49|85)|[06]25|(21|49|88)4||036|106|150|221|639|747|752)|7(1(11|49|94)|350|391|413|555|807|871)|8(056|149|26|287|450|55|904|98)|9(138|327|403|465|56|789|842|916))$/.test(a))e[a]=0;else{var t=new Promise(((d,t)=>c=e[a]=[d,t]));d.push(c[2]=t);var f=r.p+r.u(a),b=new Error;r.l(f,(d=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var t=d&&("load"===d.type?"missing":d.type),f=d&&d.target&&d.target.src;b.message="Loading chunk "+a+" failed.\n("+t+": "+f+")",b.name="ChunkLoadError",b.type=t,b.request=f,c[1](b)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,d)=>{var c,t,[f,b,n]=d,o=0;if(f.some((a=>0!==e[a]))){for(c in b)r.o(b,c)&&(r.m[c]=b[c]);if(n)var i=n(r)}for(a&&a(d);o<f.length;o++)t=f[o],r.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return r.O(i)},d=self.webpackChunktradingview=self.webpackChunktradingview||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})(),(()=>{const{miniCssF:e}=r;r.miniCssF=a=>self.document&&"rtl"===self.document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();
(()=>{"use strict";var e,a,d,c,f,t={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var d=b[e]={id:e,loaded:!1,exports:{}};return t[e].call(d.exports,d,d.exports,r),d.loaded=!0,d.exports}r.m=t,r.c=b,e=[],r.O=(a,d,c,f)=>{if(!d){var t=1/0;for(i=0;i<e.length;i++){for(var[d,c,f]=e[i],b=!0,n=0;n<d.length;n++)(!1&f||t>=f)&&Object.keys(r.O).every((e=>r.O[e](d[n])))?d.splice(n--,1):(b=!1,f<t&&(t=f));if(b){e.splice(i--,1);var o=c();void 0!==o&&(a=o)}}return a}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[d,c,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var t={};a=a||[null,d({}),d([]),d(d)];for(var b=2&c&&e;"object"==typeof b&&!~a.indexOf(b);b=d(b))Object.getOwnPropertyNames(b).forEach((a=>t[a]=()=>e[a]));return t.default=()=>e,r.d(f,t),f},r.d=(e,a)=>{for(var d in a)r.o(a,d)&&!r.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,d)=>(r.f[d](e,a),a)),[])),r.u=e=>9417===e?"__LANG__.9417.7ff64779d43389a1bb41.js":3175===e?"__LANG__.3175.e0a2c845c5cba23f42fb.js":3951===e?"__LANG__.3951.babac9be598102fb0d92.js":5362===e?"__LANG__.5362.311bfba5d2c84b13ec2b.js":2578===e?"__LANG__.2578.ab3178e0160c259eac53.js":2547===e?"__LANG__.2547.28b713bedf796244795d.js":2285===e?"__LANG__.2285.1268ecef367debd2960b.js":344===e?"__LANG__.344.a9e566fa1091368f40c7.js":178===e?"__LANG__.178.dd03c0163a8373c0fc5b.js":6306===e?"__LANG__.6306.b88dcc3f0d7db89ebfc1.js":3236===e?"__LANG__.3236.e12bb9a536432e97ec0c.js":({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2616:"svg-renderer",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5516:"restricted-toolset",5551:"favorite-drawings-api",5565:"ichart-storage",5598:"lt-stickers-atlas",6124:"chart-storage-library-http",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7129:"line-tools-synchronizer",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8313:"chart-storage-external-adapter",
8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl",9498:"export-data",9685:"series-icons-map",9754:"global-search-dialog"}[e]||e)+"."+{6:"a03a8ff024d47ed075c6",92:"795900ef9e075c847a64",139:"83ba0cba4c0538851e0a",507:"51d0897ba74454ec3423",524:"2b350163c328ac8dce2e",607:"1d3c58ff151a9c7c19a3",731:"5039a5ac2f3556b18cb1",750:"e16edadfacd60574d861",826:"906374d84a8e6c40c6e8",855:"61db310932f8af2c5989",898:"b63568700f1380e37b1a",956:"a325fc0a9a24da09a622",962:"9f54d549868e21286372",1033:"bb804c64fe58de0bace7",1109:"845f0f111ff830ab93c8",1553:"c076714f5e24887f0b94",1583:"077de067da0763f84cb2",1584:"4170e3d150582097504c",1702:"5f8ccee744105adf029e",1740:"4c61de525e940eee4f3c",1754:"e5850d7e02343ee54c52",1762:"9511e5b410d7d629bc49",1803:"5799aa316db71b2f13e5",1859:"851f6bf2bf36fe8fbac4",1890:"ecc8d3a4af49afed6b6d",2052:"e9d07fdfb896fca26166",2077:"ebdeefbf84f9e033ed5b",2109:"291fa715b6ded706c3dd",2183:"6caf467f12b1d6ee408a",2191:"2197cc1b66a1db8969cc",2260:"95dc0a20b147b6b2eeed",2306:"96ac7a46b7738535bc92",2377:"6e30e0c48af40bf2f6c0",2443:"66f44a8bfe8d49aaeaee",2486:"2b718a16270e4168ea54",2544:"225f38946afc6ad55a35",2587:"615babc52637decdb6e2",2616:"f065beaf6b5b37da27d9",2639:"a55d77a7912be54f7b9d",2666:"d28c0fa0a323b8118f22",2676:"a9a5ede4d514162164fa",2704:"8bac01cc43d3f2cbf903",2731:"55eed17fefac5e82c077",2846:"fbbd62afe04b4f9387f2",2878:"37a00c1b0c7a68cc1d44",3005:"df1a95078c18a5da785c",3030:"5ce0d1c060e0d28cde15",3066:"8b1d2ceb22d9fedde67b",3263:"238cd2d620e004adee5a",3353:"de1d5e3e034ab68aa9fc",3502:"1985af3fa836c4248178",3596:"e4f9354142134a911ace",3610:"c79c6bddd919cb78428a",3717:"6f65e91a870250a6e450",3780:"ef366b87d104534e68d8",3842:"8758110ab553b5368121",3896:"14d9e7509c300245c219",3914:"33b17e48eb923e015932",3939:"2ee1e71dbe0bc0d85625",3980:"9d7eeb2bacce45c508b3",3986:"b50fcad4f1b77533bda7",4013:"1aa54900370f7317d3f0",4015:"9b6607a6f543f077c5a5",4062:"9229fac3ef3db26fd5bc",4079:"d3299bca6e9fad2c340a",4102:"67b3d1107a6ec8d571eb",4215:"8934b190aaed2663c300",4370:"18ca7d93e5073f0446c0",4389:"600804a9c180df6a83b1",4403:"bf44a542113a4440984b",4648:"af8e7c4b04b18b9156b0",4665:"d7331dbca4a2aa0909e7",4713:"8582f5ea3328f2cbdfae",4781:"e8294ba5c7c6aef1fce7",4788:"d3e8ad5f514051fcc835",4862:"0b6cab4cb55e2cef2c40",4894:"035fecc664874bb752b0",4987:"a23484dfcca6d5fae195",5009:"9a37c608b4849a6f8a11",5057:"5382614553878fcf337d",5093:"75a373be3b6816e8b55a",5128:"57de9f218989cee8119d",5145:"da831552b3b54ca47682",5163:"953e65e04ed31b0ea0b3",5164:"a45b25a7ca6a0c16f810",5166:"979eb8cba5281ffcb38b",5516:"78732f5a01aa118efb81",5551:"340e60e2342b0d93ebe7",5565:"1144e5a1b4f8503ee572",5598:"52ad6e6d7d7b134ab0ba",5649:"5c1e55c9dad604880876",5664:"87e81959e880fa8ba65d",5866:"039e25226b82968cca61",5940:"c058b0e0ef421f740684",5983:"3c0ae13972f5d3433a77",5993:"0e5f49179c6a516963de",6025:"d669a0315da9d6fda6b3",6036:"5b373caaaa6e1ba4495f",6106:"1d31df88e63bf542ea7b",6124:"f1f53155460ee314f062",6166:"9fb712c61440c609af69",
6214:"5a578175aab923a979dc",6221:"56c4d15c823c019ddb39",6265:"b3553940c9159e24d8aa",6408:"e58aaf98d9306e8d9b77",6456:"b04732ea1491ac587015",6494:"7f264af8142cb9910c06",6625:"364cf21fe24d7e675de8",6631:"45bca887c7f2c0d84601",6639:"a1bd5bf1d51c681561a1",6747:"ae7a7ec28d22057d6d0d",6752:"912872ffa56a7243d664",6780:"3b96f58f66e0caa61b15",6884:"07642217627127113fb0",6918:"c8f3265e9286a784038b",6925:"665969c4af4481df0691",6949:"f50051a55eaa8dd5e780",6985:"8d289318ce5fe6dc7763",7051:"cff4509091dbd0706ebe",7078:"cddce4ed266fd9e0629e",7111:"4716f3208dc337521c10",7129:"0bc2d3617dda7143f094",7149:"d450e8145ad7e6fbd67f",7194:"098c1a8da1ddbbda98f6",7260:"6826612f0a41ab0fc35c",7271:"f7e796a37129a93179ee",7350:"aa555ff9e17c4029aedd",7391:"c63bd39c42093cc4130c",7413:"3a52b91975b98e6fe8e4",7550:"087936b2aa6ea51cd6bf",7555:"ea682716c26bc13db765",7648:"02c87d9b20f743b5cf16",7663:"6fabc58c7ddf7c2b076f",7807:"6adfcf6c0792dc9c9363",7871:"df6a9177c293c0c53e80",7987:"5d7c9d668ac98bd5bce1",8020:"71213c4f755723965a80",8056:"c06a1c8fb4a1f18cf217",8149:"9fb525d10e5c8ba95701",8167:"3edae41386acc976c9f8",8287:"7a7977ba76726177fb3c",8313:"9c1267d07e48b8d8f53f",8450:"757d38443ea38bd0165f",8537:"ae758430950906d90d11",8643:"3a92633d0497afb5344c",8882:"9838a8b1e0e6766b6408",8890:"6a6e7744cd3263ce2887",8904:"87e94e93ade13962a48f",9039:"19bbb3fc39665da2e3e6",9138:"f516266ddcf6ca8c7064",9327:"0c38440ca52f144413ac",9374:"6ef1056ef156ddb4caf1",9403:"61498701a4dae3f700c2",9465:"ca5284cff2560957cdd6",9498:"f43b3c60275506b2198a",9685:"f25fb7b89b7e831b726c",9754:"91018047180ff0d9e40b",9789:"458feb5c8c0263b0618b",9842:"581808dd4a8651b16779",9916:"0c2cb2d12479a20efce1"}[e]+".js",r.miniCssF=e=>e+"."+{6:"362fa6a7ab1f3e3b06c4",524:"ef662c4bc3e57dd91171",826:"2effba57f47544e58368",855:"56a5e53c97d91a9f96f7",898:"f909d7c1efc95f635922",956:"1e89775cfd644d656c56",1033:"5197f9f8b8500206d06c",1109:"b1ced88f4a839badfff1",1762:"7ff6b353c441db2276da",1803:"4653bb65d2b0d594d6af",2109:"4d5de3fbde1cd7dc5e9f",2191:"bb0aa12f5e562fd483f3",2260:"b98824e4829a1aa9b444",2486:"82c7dba4839761a57f28",2587:"1f1100dc01693edfe269",2639:"7b1d42eef7b89e0e96d3",2666:"fbb750fd312778403036",2676:"2d3cabbd39a3b0d6e9ea",2731:"ec19f123cabf8efd03a4",3066:"58a325f25b087530293d",3353:"860146c59230ab4bd938",3502:"c49903f7222870ff8aca",3610:"11b7ad14e26429fdfa5d",3717:"856421c70a4dff35762a",3780:"a289557f2e0bcabcc4ca",3842:"8cf6b523fd5a5b6fb022",3896:"96db838d3467bcf68051",3914:"d2b6c577f350629b6837",3939:"4d0187960a564ff5a557",3980:"b2ff45a2d8bb6a131d7c",4015:"1d0e3a62a59d173c81f3",4102:"4abd8542fa3aa3e7fd5d",4215:"d24836a292b1969ab4bb",4781:"cf1365a3bf51d9989978",4788:"3cff897925f7a8dbc837",4894:"99d4c2794da9feef3c70",4987:"ca5d16a7e990d39bfb0e",5145:"a2b224fd27ab2941c565",5163:"950dd1d584f76da1ed3b",5166:"a12c50ad6225ca6de843",5649:"b60ed09c5ea8c55827d4",5866:"f164dd2a584ab0f493cf",5940:"aedc1bdbd324e6042b17",5993:"4705829d0834140ee3f2",6025:"263b457b1a7f9ca139b2",6036:"3b493a9f0ab052e6447c",6106:"f01163745d787b60c86c",6214:"65b7dbf8be6cca5ac143",6221:"bc53670dfb8f982908a2",
6494:"4c212043f24336e170d5",6625:"0ed88fc3a989c98408cc",6639:"885b5577e3fb71ee2bea",6747:"c7d403ae692f88568278",6752:"207eb3cc75b3ed2c6754",6884:"bb7d30a7bbbe5af36556",6925:"a3a09d7303a96edb77cb",6949:"19355e81a60b640ea097",6985:"2cd225354e2fd236e8e9",7111:"b16b4eb739a7e8577559",7149:"12adbb19fdefe9b66b18",7194:"e04f69c8933166966874",7350:"00632eec360f0cf2d9a0",7391:"9c809fa91ed0c8f75bc0",7413:"f830ad1ad6ee6f9b1cb3",7555:"8c1e3939e7666b0f8c69",7807:"8577632fdab29ee53ddf",7871:"fff454908cba03863eb7",8056:"1f54f717d8e522c55c89",8149:"21f2b01074a4d082e268",8287:"2b6f71ec5c0064590ffd",8450:"f75ab24e1ecb22d29183",8904:"a302177fe7e3ccd50cb0",9138:"03b8fbcfabcae851949a",9327:"97be240031495a68333f",9403:"db9859ab09623682562c",9465:"fd61e82b3c912f2e9fad",9789:"cb5ad20bc727d3820b6c",9842:"ceaeabba258d065497c8",9916:"60c48148a54dba9504a0"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},f="tradingview:",r.l=(e,a,d,t)=>{if(c[e])c[e].push(a);else{var b,n;if(void 0!==d)for(var o=document.getElementsByTagName("script"),i=0;i<o.length;i++){var l=o[i];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==f+d){b=l;break}}b||(n=!0,(b=document.createElement("script")).charset="utf-8",b.timeout=120,r.nc&&b.setAttribute("nonce",r.nc),b.setAttribute("data-webpack",f+d),b.src=e,0!==b.src.indexOf(window.location.origin+"/")&&(b.crossOrigin="anonymous")),c[e]=[a];var s=(a,d)=>{b.onerror=b.onload=null,clearTimeout(u);var f=c[e];if(delete c[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(d))),a)return a(d)},u=setTimeout(s.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=s.bind(null,b.onerror),b.onload=s.bind(null,b.onload),n&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var a=r.g.document;if(!e&&a&&(a.currentScript&&(e=a.currentScript.src),!e)){var d=a.getElementsByTagName("script");d.length&&(e=d[d.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.g.location&&r.p.startsWith(r.g.location.origin)&&(r.p=r.p.slice(r.g.location.origin.length)),(()=>{const e=r.u;r.u=a=>e(a).replace("__LANG__",r.g.language)})(),(()=>{const e={ca_ES:(e=1)=>+(1!=e),cs:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),el:(e=1)=>+(1!=e),da_DK:(e=1)=>+(1!=e),en:(e=1)=>+(1!=e),et_EE:(e=1)=>+(1!=e),fa:(e=1)=>0,hu_HU:(e=1)=>0,id_ID:(e=1)=>0,it:(e=1)=>+(1!=e),ms_MY:(e=1)=>0,
no:(e=1)=>+(1!=e),nl_NL:(e=1)=>+(1!=e),ro:(e=1)=>+(1==e?0:e%100>19||e%100==0&&0!=e?2:1),sk_SK:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),sv:(e=1)=>+(1!=e),zh:(e=1)=>0,zh_TW:(e=1)=>0,de:(e=1)=>+(1!=e),es:(e=1)=>+(1!=e),fr:(e=1)=>+(e>1),he_IL:(e=1)=>+(1==e?0:2==e?1:e>10&&e%10==0?2:3),ko:(e=1)=>0,ja:(e=1)=>0,pl:(e=1)=>+(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),pt:(e=1)=>+(1!=e),tr:(e=1)=>+(1!=e),vi:(e=1)=>0,ar:(e=1)=>+(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5),ru:(e=1)=>+(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),th:(e=1)=>0};r.tf=(a,d={},c)=>{if(null===a){if(Array.isArray(c)){if(r.g.customTranslateFunction){const e=r.g.customTranslateFunction(c[0],d.plural?{...d,plural:c.length>2?c.slice(1):c[1]}:d,!0);if(null!==e)return e}return(c[e[r.g.language](d.count)]||c[0]).replace(/{(\w+)}/g,((e,a)=>void 0!==(d.replace||d)[a]?(d.replace||d)[a]:e))}return"object"==typeof c?r.tf(null,d,c[r.g.language||"en"]):r.tf(c,d)}if(c&&a){const e=`${a}${d.context?`_${d.context}`:""}`;if(c[e])return r.tf(null,d,c[e])}if("number"==typeof a)return a.toString();if("string"!=typeof a)return"";if(r.g.customTranslateFunction){const e=r.g.customTranslateFunction(a,d,!1);if(null!==e)return e}return(d.plural&&1!=+d.count?d.plural:a).replace(/{(\w+)}/g,((e,a)=>void 0!==(d.replace||d)[a]?(d.replace||d)[a]:e))}})(),r.p=r.g.WEBPACK_PUBLIC_PATH||r.p;var n=r.e,o=Object.create(null);function i(e,a){return n(e).catch((function(){return new Promise((function(d){var c=function(){self.removeEventListener("online",c,!1),!1===navigator.onLine?self.addEventListener("online",c,!1):d(a<2?i(e,a+1):n(e))};setTimeout(c,a*a*1e3)}))}))}r.e=function(e){if(!o[e]){o[e]=i(e,0);var a=function(){delete o[e]};o[e].then(a,a)}return o[e]},(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((a,d)=>{var c=r.miniCssF(e),f=r.p+c;if(((e,a)=>{for(var d=document.getElementsByTagName("link"),c=0;c<d.length;c++){var f=(b=d[c]).getAttribute("data-href")||b.getAttribute("href");if("stylesheet"===b.rel&&(f===e||f===a))return b}var t=document.getElementsByTagName("style");for(c=0;c<t.length;c++){var b;if((f=(b=t[c]).getAttribute("data-href"))===e||f===a)return b}})(c,f))return a();((e,a,d,c,f)=>{var t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.onerror=t.onload=d=>{if(t.onerror=t.onload=null,"load"===d.type)c();else{var b=d&&("load"===d.type?"missing":d.type),r=d&&d.target&&d.target.href||a,n=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");n.code="CSS_CHUNK_LOAD_FAILED",n.type=b,n.request=r,t.parentNode&&t.parentNode.removeChild(t),f(n)}},t.href=a,0!==t.href.indexOf(window.location.origin+"/")&&(t.crossOrigin="anonymous"),d?d.parentNode.insertBefore(t,d.nextSibling):document.head.appendChild(t)})(e,f,null,a,d)})),a={3666:0};r.f.miniCss=(d,c)=>{a[d]?c.push(a[d]):0!==a[d]&&{6:1,524:1,826:1,855:1,898:1,956:1,1033:1,1109:1,1762:1,1803:1,2109:1,2191:1,2260:1,2486:1,2587:1,2639:1,2666:1,2676:1,2731:1,3066:1,3353:1,3502:1,3610:1,3717:1,3780:1,3842:1,3896:1,3914:1,3939:1,3980:1,4015:1,4102:1,4215:1,4781:1,
4788:1,4894:1,4987:1,5145:1,5163:1,5166:1,5649:1,5866:1,5940:1,5993:1,6025:1,6036:1,6106:1,6214:1,6221:1,6494:1,6625:1,6639:1,6747:1,6752:1,6884:1,6925:1,6949:1,6985:1,7111:1,7149:1,7194:1,7350:1,7391:1,7413:1,7555:1,7807:1,7871:1,8056:1,8149:1,8287:1,8450:1,8904:1,9138:1,9327:1,9403:1,9465:1,9789:1,9842:1,9916:1}[d]&&c.push(a[d]=e(d).then((()=>{a[d]=0}),(e=>{throw delete a[d],e})))}}})(),(()=>{var e={3666:0,6150:0};r.f.j=(a,d)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(/^(1(033|109|762|803)|2(6(39|66|76)|109|191|260|486|587|731)|3(9(14|39|80)|(06|66|89)6|353|502|610|717|780|842)|4(78[18]|[02]15|102|894|987)|5(1(45|63|66)|24|649|866|940|993)|6(9(25|49|85)|[06]25|(21|49|88)4||036|106|150|221|639|747|752)|7(1(11|49|94)|350|391|413|555|807|871)|8(056|149|26|287|450|55|904|98)|9(138|327|403|465|56|789|842|916))$/.test(a))e[a]=0;else{var f=new Promise(((d,f)=>c=e[a]=[d,f]));d.push(c[2]=f);var t=r.p+r.u(a),b=new Error;r.l(t,(d=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var f=d&&("load"===d.type?"missing":d.type),t=d&&d.target&&d.target.src;b.message="Loading chunk "+a+" failed.\n("+f+": "+t+")",b.name="ChunkLoadError",b.type=f,b.request=t,c[1](b)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,d)=>{var c,f,[t,b,n]=d,o=0;if(t.some((a=>0!==e[a]))){for(c in b)r.o(b,c)&&(r.m[c]=b[c]);if(n)var i=n(r)}for(a&&a(d);o<t.length;o++)f=t[o],r.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return r.O(i)},d=self.webpackChunktradingview=self.webpackChunktradingview||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})(),(()=>{const{miniCssF:e}=r;r.miniCssF=a=>self.document&&"rtl"===self.document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})();

View File

@@ -1,6 +1,6 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6631],{74786:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});const n=function(){}},70048:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",box:"box-GZajBGIm",icon:"icon-GZajBGIm",noOutline:"noOutline-GZajBGIm","intent-danger":"intent-danger-GZajBGIm",check:"check-GZajBGIm",dot:"dot-GZajBGIm"}},69789:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},83073:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},70673:(e,t,a)=>{"use strict";a.d(t,{CheckboxInput:()=>c});var n=a(50959),i=a(97754),l=a(90186),s=a(9745),o=a(65890),r=a(70048),m=a.n(r);function c(e){const t=i(m().box,m()[`intent-${e.intent}`],{[m().check]:!Boolean(e.indeterminate),[m().dot]:Boolean(e.indeterminate),[m().noOutline]:-1===e.tabIndex}),a=i(m().wrapper,e.className);return n.createElement("span",{className:a,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:m().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,l.filterDataProps)(e)}),n.createElement("span",{className:t},n.createElement(s.Icon,{icon:o,className:m().icon})))}},15294:(e,t,a)=>{"use strict";a.d(t,{Checkbox:()=>m});var n=a(50959),i=a(97754),l=a(59416),s=a(70673),o=a(69789),r=a.n(o);class m extends n.PureComponent{render(){const{inputClassName:e,labelClassName:t,...a}=this.props,l=i(this.props.className,r().checkbox,{[r().reverse]:Boolean(this.props.labelPositionReverse),[r().baseline]:Boolean(this.props.labelAlignBaseline)}),o=i(r().label,t,{[r().disabled]:this.props.disabled});let m=null;return this.props.label&&(m=n.createElement("span",{className:o,title:this.props.title},this.props.label)),n.createElement("label",{className:l},n.createElement(s.CheckboxInput,{...a,className:e}),m)}}m.defaultProps={value:"on"};(0,l.makeSwitchGroupItem)(m)},59416:(e,t,a)=>{"use strict";a.d(t,{SwitchGroup:()=>s,makeSwitchGroupItem:()=>o});var n=a(50959),i=a(74786);const l=(0,n.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>i.default,subscribe:i.default,unsubscribe:i.default});class s extends n.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return n.createElement(l.Provider,{value:this.state.switchGroupContext},this.props.children)
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6631],{74786:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});const n=function(){}},70048:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",box:"box-GZajBGIm",icon:"icon-GZajBGIm",noOutline:"noOutline-GZajBGIm","intent-danger":"intent-danger-GZajBGIm",check:"check-GZajBGIm",dot:"dot-GZajBGIm"}},69789:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},83073:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},70673:(e,t,a)=>{"use strict";a.d(t,{CheckboxInput:()=>c});var n=a(50959),i=a(97754),l=a(90186),s=a(9745),o=a(65890),r=a(70048),m=a.n(r);function c(e){const t=i(m().box,m()[`intent-${e.intent}`],{[m().check]:!Boolean(e.indeterminate),[m().dot]:Boolean(e.indeterminate),[m().noOutline]:-1===e.tabIndex}),a=i(m().wrapper,e.className);return n.createElement("span",{className:a,title:e.title,style:e.style},n.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:m().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,l.filterDataProps)(e)}),n.createElement("span",{className:t},n.createElement(s.Icon,{icon:o,className:m().icon})))}},32389:(e,t,a)=>{"use strict";a.d(t,{Checkbox:()=>m});var n=a(50959),i=a(97754),l=a(59416),s=a(70673),o=a(69789),r=a.n(o);class m extends n.PureComponent{render(){const{inputClassName:e,labelClassName:t,...a}=this.props,l=i(this.props.className,r().checkbox,{[r().reverse]:Boolean(this.props.labelPositionReverse),[r().baseline]:Boolean(this.props.labelAlignBaseline)}),o=i(r().label,t,{[r().disabled]:this.props.disabled});let m=null;return this.props.label&&(m=n.createElement("span",{className:o,title:this.props.title},this.props.label)),n.createElement("label",{className:l},n.createElement(s.CheckboxInput,{...a,className:e}),m)}}m.defaultProps={value:"on"};(0,l.makeSwitchGroupItem)(m)},59416:(e,t,a)=>{"use strict";a.d(t,{SwitchGroup:()=>s,makeSwitchGroupItem:()=>o});var n=a(50959),i=a(74786);const l=(0,n.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>i.default,subscribe:i.default,unsubscribe:i.default});class s extends n.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return n.createElement(l.Provider,{value:this.state.switchGroupContext},this.props.children)
}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((a=>t.includes(a)?!e.includes(a):e.includes(a)))}}function o(e){var t;return t=class extends n.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return n.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=l,t}},50182:(e,t,a)=>{"use strict";a.d(t,{AdaptiveConfirmDialog:()=>d});var n=a(50959),i=a(97754),l=a.n(i),s=a(94720),o=a(50151),r=a(11542),m=a(68335),c=a(35057),u=a(83073);class d extends n.PureComponent{constructor(){super(...arguments),this._dialogRef=n.createRef(),this._handleClose=()=>{const{defaultActionOnClose:e,onSubmit:t,onCancel:a,onClose:n}=this.props;switch(e){case"submit":t();break;case"cancel":a()}n()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=e=>{const{onSubmit:t,submitButtonDisabled:a,submitOnEnterKey:n}=this.props;13===(0,m.hashFromEvent)(e)&&n&&(e.preventDefault(),a||t())}}render(){const{render:e,onClose:t,onSubmit:a,onCancel:i,footerLeftRenderer:l,submitButtonText:s,submitButtonDisabled:o,defaultActionOnClose:r,submitOnEnterKey:m,...u}=this.props;return n.createElement(c.AdaptivePopupDialog,{...u,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,o.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return e=>{const{render:t,footerLeftRenderer:i,additionalButtons:o,submitButtonText:m,submitButtonDisabled:c,onSubmit:d,cancelButtonText:h,showCancelButton:p=!0,submitButtonClassName:b,cancelButtonClassName:v,buttonsWrapperClassName:g}=this.props;return n.createElement(n.Fragment,null,t(e),n.createElement("div",{className:u.footer},i&&i(e.isSmallWidth),n.createElement("div",{className:l()(u.buttons,g)},o,p&&n.createElement(s.Button,{className:v,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=h?h:r.t(null,void 0,a(20036))),n.createElement("span",{className:u.submitButton},n.createElement(s.Button,{className:b,disabled:c,name:"submit",onClick:d,"data-name":"submit-button"},null!=m?m:r.t(null,void 0,a(68988)))))))}}}d.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},92297:e=>{e.exports={loading:"loading-BPaLXf0z"}},15747:e=>{e.exports={container:"container-CD9TBN7D",withSuggestions:"withSuggestions-CD9TBN7D",title:"title-CD9TBN7D",autocomplete:"autocomplete-CD9TBN7D",saveSymbol:"saveSymbol-CD9TBN7D",saveInterval:"saveInterval-CD9TBN7D",indicators:"indicators-CD9TBN7D",hintLabel:"hintLabel-CD9TBN7D",hintMark:"hintMark-CD9TBN7D",
hidden:"hidden-CD9TBN7D"}},13932:(e,t,a)=>{"use strict";a.r(t),a.d(t,{StudyTemplateSaver:()=>A});var n=a(50151),i=a(11542),l=a(50959),s=a(962),o=(a(42053),a(97754)),r=a(15294),m=a(21788),c=a(9745),u=a(50182),d=a(50655),h=a(26996),p=a(92297);function b(e){const{isLoading:t}=e;return l.createElement("span",{className:t?p.loading:void 0},i.t(null,void 0,a(85520)),t&&l.createElement(h.Loader,{color:"white"}))}class v extends l.PureComponent{constructor(e){super(e),this._dialogRef=l.createRef(),this._manager=null,this._handleSubmit=()=>{this.setState({isLoading:!0}),this.props.onSubmit(this)},this.state={isLoading:!1}}render(){const{isOpened:e,saveDisabled:t,title:a,onClose:n}=this.props;return l.createElement(u.AdaptiveConfirmDialog,{ref:this._dialogRef,onClose:n,onSubmit:this._handleSubmit,onCancel:n,onClickOutside:n,isOpened:e,title:a,dataName:"save-rename-dialog",render:this._renderDialogBody(),defaultActionOnClose:"none",submitButtonText:l.createElement(b,{isLoading:this.state.isLoading}),submitButtonDisabled:t})}focus(){(0,n.ensureNotNull)(this._dialogRef.current).focus()}manager(){return this._manager}submit(){this.props.onSubmit(this)}close(){this.props.onClose()}dropLoading(){this.setState({isLoading:!1})}_renderDialogBody(){return()=>l.createElement(d.SlotContext.Consumer,null,(e=>(this._manager=e,this.props.children)))}}var g=a(33547),S=a(85508),_=a(15747),y=a(49483);const f=i.t(null,void 0,a(50912)),w=i.t(null,void 0,a(40898)),C=i.t(null,void 0,a(33455)),N=i.t(null,void 0,a(63135)),k=[_.hintMark,"apply-common-tooltip"];function x(e){const{title:t,saveSymbolHintText:a,saveIntervalHintText:i,indicatorsText:s,source:u,onClose:d,onSubmit:h}=e,[p,b]=(0,l.useState)(""),[y,x]=(0,l.useState)(!1),[I,T]=(0,l.useState)(!1),[D,E]=(0,l.useState)(!1),L=(0,l.useRef)(null),B=(0,l.useRef)(null);return(0,l.useEffect)((()=>{(0,n.ensureNotNull)(B.current).focus()}),[]),l.createElement(v,{ref:L,isOpened:!0,saveDisabled:!p,title:t,onClose:d,onSubmit:function(e){h({title:p,saveSymbol:y,saveInterval:I},e)}},l.createElement("div",{className:o(_.container,D&&_.withSuggestions)},l.createElement("div",{className:_.title},f),l.createElement("div",{className:_.autocomplete},l.createElement(m.Autocomplete,{maxLength:64,value:p,onChange:b,onBlur:function(){(0,n.ensureNotNull)(L.current).focus()},source:u,allowUserDefinedValues:!0,preventOnFocusOpen:!0,noEmptyText:!0,preventSearchOnEmptyQuery:!0,filter:g.autocompleteFilter,setupHTMLInput:function(e){B.current=e},onSuggestionsOpen:function(){E(!0)},onSuggestionsClose:function(){E(!1)}})),l.createElement("div",{className:_.saveSymbol},l.createElement(r.Checkbox,{label:l.createElement("span",{className:_.hintLabel},C,l.createElement(c.Icon,{icon:S,className:o(k),title:a})),onChange:function(){x(!y),(0,n.ensureNotNull)(L.current).focus()},checked:y})),l.createElement("div",{className:_.saveInterval},l.createElement(r.Checkbox,{label:l.createElement("span",{className:_.hintLabel},N,l.createElement(c.Icon,{icon:S,className:o(k),title:i})),onChange:function(){T(!I),(0,
hidden:"hidden-CD9TBN7D"}},13932:(e,t,a)=>{"use strict";a.r(t),a.d(t,{StudyTemplateSaver:()=>A});var n=a(50151),i=a(11542),l=a(50959),s=a(962),o=(a(42053),a(97754)),r=a(32389),m=a(21788),c=a(9745),u=a(50182),d=a(50655),h=a(26996),p=a(92297);function b(e){const{isLoading:t}=e;return l.createElement("span",{className:t?p.loading:void 0},i.t(null,void 0,a(85520)),t&&l.createElement(h.Loader,{color:"white"}))}class v extends l.PureComponent{constructor(e){super(e),this._dialogRef=l.createRef(),this._manager=null,this._handleSubmit=()=>{this.setState({isLoading:!0}),this.props.onSubmit(this)},this.state={isLoading:!1}}render(){const{isOpened:e,saveDisabled:t,title:a,onClose:n}=this.props;return l.createElement(u.AdaptiveConfirmDialog,{ref:this._dialogRef,onClose:n,onSubmit:this._handleSubmit,onCancel:n,onClickOutside:n,isOpened:e,title:a,dataName:"save-rename-dialog",render:this._renderDialogBody(),defaultActionOnClose:"none",submitButtonText:l.createElement(b,{isLoading:this.state.isLoading}),submitButtonDisabled:t})}focus(){(0,n.ensureNotNull)(this._dialogRef.current).focus()}manager(){return this._manager}submit(){this.props.onSubmit(this)}close(){this.props.onClose()}dropLoading(){this.setState({isLoading:!1})}_renderDialogBody(){return()=>l.createElement(d.SlotContext.Consumer,null,(e=>(this._manager=e,this.props.children)))}}var g=a(33547),S=a(85508),_=a(15747),y=a(49483);const f=i.t(null,void 0,a(50912)),w=i.t(null,void 0,a(40898)),C=i.t(null,void 0,a(33455)),N=i.t(null,void 0,a(63135)),k=[_.hintMark,"apply-common-tooltip"];function x(e){const{title:t,saveSymbolHintText:a,saveIntervalHintText:i,indicatorsText:s,source:u,onClose:d,onSubmit:h}=e,[p,b]=(0,l.useState)(""),[y,x]=(0,l.useState)(!1),[I,T]=(0,l.useState)(!1),[D,E]=(0,l.useState)(!1),L=(0,l.useRef)(null),B=(0,l.useRef)(null);return(0,l.useEffect)((()=>{(0,n.ensureNotNull)(B.current).focus()}),[]),l.createElement(v,{ref:L,isOpened:!0,saveDisabled:!p,title:t,onClose:d,onSubmit:function(e){h({title:p,saveSymbol:y,saveInterval:I},e)}},l.createElement("div",{className:o(_.container,D&&_.withSuggestions)},l.createElement("div",{className:_.title},f),l.createElement("div",{className:_.autocomplete},l.createElement(m.Autocomplete,{maxLength:64,value:p,onChange:b,onBlur:function(){(0,n.ensureNotNull)(L.current).focus()},source:u,allowUserDefinedValues:!0,preventOnFocusOpen:!0,noEmptyText:!0,preventSearchOnEmptyQuery:!0,filter:g.autocompleteFilter,setupHTMLInput:function(e){B.current=e},onSuggestionsOpen:function(){E(!0)},onSuggestionsClose:function(){E(!1)}})),l.createElement("div",{className:_.saveSymbol},l.createElement(r.Checkbox,{label:l.createElement("span",{className:_.hintLabel},C,l.createElement(c.Icon,{icon:S,className:o(k),title:a})),onChange:function(){x(!y),(0,n.ensureNotNull)(L.current).focus()},checked:y})),l.createElement("div",{className:_.saveInterval},l.createElement(r.Checkbox,{label:l.createElement("span",{className:_.hintLabel},N,l.createElement(c.Icon,{icon:S,className:o(k),title:i})),onChange:function(){T(!I),(0,
n.ensureNotNull)(L.current).focus()},checked:I})),l.createElement("div",{className:_.title},w),l.createElement("div",{className:o(_.indicators,D&&_.withSuggestions)},s)))}y.CheckMobile.any()&&k.push(_.hidden);var I=a(76422),T=a(52092);class D{constructor(e){this._container=document.createElement("div"),this.close=()=>{this.unmount(),this._onClose&&this._onClose()},this.unmount=()=>{I.unsubscribe(T.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null),s.unmountComponentAtNode(this._container)},this._title=e.title,this._saveSymbolHintText=e.saveSymbolHintText,this._saveIntervalHintText=e.saveIntervalHintText,this._indicatorsText=e.indicatorsText,this._source=e.source,this._onSubmit=e.onSubmit,this._onClose=e.onClose,I.subscribe(T.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this.unmount,null)}mount(){s.render(l.createElement(x,{title:this._title,saveSymbolHintText:this._saveSymbolHintText,saveIntervalHintText:this._saveIntervalHintText,indicatorsText:this._indicatorsText,source:this._source,onClose:this.close,onSubmit:this._onSubmit}),this._container)}destroy(){this.unmount()}show(){this.mount()}}var E=a(61595),L=a(3615),B=a(11321),z=a(39344),M=a(39080);const j=i.t(null,void 0,a(21939)),O=i.t(null,void 0,a(61422)),R=i.t(null,void 0,a(30858)),P=i.t(null,void 0,a(83081));function G(e,t,a){const n=()=>{E.backend.invalidateStudyTemplatesList(),E.backend.getStudyTemplatesList().then(t)};E.backend.saveStudyTemplate(e).then(n)}class A{constructor(e){this._dialog=null,this._onSave=e=>{this._options.onSave(e),this._close()},this._showSaveDialog=async()=>{const e=this._controller.model().mainSeries().symbol(),t=this._controller.model().mainSeries().interval(),a=await this._getActualTemplateList();await this._showTemplateSaveRenameDialog(a,e,t)},this._close=()=>{this._dialog&&(this._dialog.destroy(),this._dialog=null)},this._options=e,this._controller=e.controller}show(){(0,M.runOrSigninWithFeature)(this._showSaveDialog,{feature:"customIndicators",source:"Study templates save as",sourceMeta:"Chart"})}_prepareData(e,t,a){const n=this._controller.model().studyTemplate(t,a);return{name:e,content:JSON.stringify(n),meta_info:(0,z.createStudyTemplateMetaInfo)(this._controller,n.interval)}}_doSave(e,t,a){const{title:n,saveSymbol:i,saveInterval:l}=t;if(!n)return;const s=a.manager()||void 0,o=this._prepareData(n,i,l);if(e.find((e=>e.name===n))){const e=e=>{e?G(o,this._onSave):(a.focus(),a.dropLoading())};(function(e,t){return new Promise((a=>(0,L.showConfirm)({text:P.format({templateName:e}),onConfirm:({dialogClose:e})=>{a(!0),e()},onClose:()=>a(!1)},t)))})(n,s).then(e)}else{G(o,this._onSave)}}_getActualTemplateList(){return E.backend.invalidateStudyTemplatesList(),E.backend.getStudyTemplatesList()}_showTemplateSaveRenameDialog(e,t,a){const n=(0,z.createStudyTemplateMetaInfo)(this._controller);(this._dialog=new D({source:e.map((e=>e.name)),title:j,saveSymbolHintText:O.format({symbol:t}),saveIntervalHintText:R.format({interval:(0,B.translatedIntervalString)(a)}),indicatorsText:(0,z.descriptionString)(n.indicators),onSubmit:(t,a)=>this._doSave(e,t,a),
onClose:this._close})).show()}}},39344:(e,t,a)=>{"use strict";a.d(t,{createStudyTemplateMetaInfo:()=>l,descriptionString:()=>s});var n=a(28853),i=a(37591);function l(e,t){return{indicators:e.orderedDataSources(!0).filter((e=>(0,n.isStudy)(e)&&!0)).map((e=>({id:e.metaInfo().id,description:e.title(i.TitleDisplayTarget.StatusLine,!0,void 0,!0)}))),interval:t}}function s(e){const t=new Map;return e.forEach((e=>{const[a,n]=t.get(e.id)||[e.description,0];t.set(e.id,[a,n+1])})),Array.from(t.values()).map((([e,t])=>`${e}${t>1?` x ${t}`:""}`)).join(", ")}},33547:(e,t,a)=>{"use strict";function n(e,t){return Boolean(""===e||e&&-1!==t.toLowerCase().indexOf(e.toLowerCase()))}a.d(t,{autocompleteFilter:()=>n})},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},85508:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 8.5h1.5V14"/><circle fill="currentColor" cx="9" cy="5" r="1"/><path stroke="currentColor" d="M16.5 9a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0z"/></svg>'},80395:e=>{e.exports={ar:["إغلاق القائمة"],ca_ES:"Close menu",cs:"Close menu",de:["Menü schließen"],el:"Close menu",en:"Close menu",es:["Cerrar menú"],fa:"Close menu",fr:["Fermer le menu"],he_IL:["סגור תפריט"],hu_HU:"Close menu",id_ID:["Pilih menu"],it:["Chiudere menù"],ja:["メニューを閉じる"],ko:["메뉴 닫기"],ms_MY:["Tutup menu"],nl_NL:"Close menu",pl:["Zamknij menu"],pt:["Fechar menu"],ro:"Close menu",ru:["Закрыть меню"],sv:["Stäng menyn"],th:["ปิดเมนู"],tr:["Menüyü kapat"],vi:["Đóng menu"],zh:["关闭菜单"],zh_TW:["關閉選單"]}},21939:e=>{e.exports={ar:["حفظ قالب المؤشر"],ca_ES:"Save Indicator Template",cs:"Save Indicator Template",de:["Indikatorvorlage speichern"],el:"Save Indicator Template",en:"Save Indicator Template",es:["Guardar plantilla de indicadores"],fa:"Save Indicator Template",fr:["Sauver le modèle d'indicateur"],he_IL:["שמור תבנית אינדיקטור"],hu_HU:"Save Indicator Template",id_ID:["Simpan Template Indikator"],it:["Salva modello indicatore"],ja:["インジケーターテンプレートを保存"],ko:["인디케이터 템플릿 세이브"],ms_MY:["Simpan Templat Penunjuk"],nl_NL:"Save Indicator Template",pl:["Zapisz szablon wskaźnika"],pt:["Salvar Conjunto de Indicadores"],ro:"Save Indicator Template",ru:["Сохранить шаблон индикаторов"],sv:["Spara indikatormall"],th:["บันทึกรูปแบบอินดิเคเตอร์"],tr:["Gösterge Şablonu Kaydet"],vi:["Lưu mẫu chỉ báo"],zh:["保存指标模板"],zh_TW:["儲存指標範本為"]}},40898:e=>{e.exports={ar:["المؤشرات المحفوظة"],ca_ES:"Saved indicators",cs:"Saved indicators",de:["Gespeicherte Indikatoren"],el:"Saved indicators",en:"Saved indicators",es:["Indicadores guardados"],fa:"Saved indicators",fr:["Indicateurs sauvegardés"],he_IL:["אינדיקטורים שמורים"],hu_HU:"Saved indicators",id_ID:["Indikator tersimpan"],it:["Indicatori salvati"],ja:["保存されたインジケーター"],ko:["세이브된 인디케이터"],ms_MY:["Petunjuk yang disimpan"],nl_NL:"Saved indicators",pl:["Zapisane wskaźniki"],pt:["Indicadores salvos"],ro:"Saved indicators",
ru:["Сохранённые индикаторы"],sv:["Sparade indikatorer"],th:["อินดิเคเตอร์ที่เซฟไว้"],tr:["Kaydedilmiş göstergeler"],vi:["Chỉ báo đã được lưu"],zh:["已存指标"],zh_TW:["已存指標"]}},30858:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الفاصل الزمني‎{interval} على الرسم البياني عند تطبيق هذا القالب"],ca_ES:"Selecting this option will set the {interval} interval on the chart when this template is applied",cs:"Selecting this option will set the {interval} interval on the chart when this template is applied",de:["Durch Auswahl dieser Option wird das {interval}-Intervall im Chart festgelegt, wenn diese Vorlage angewendet wird"],el:"Selecting this option will set the {interval} interval on the chart when this template is applied",en:"Selecting this option will set the {interval} interval on the chart when this template is applied",es:["Al seleccionar esta opción se establecerá el intervalo {interval} en el gráfico cuando se aplique esta plantilla"],fa:"Selecting this option will set the {interval} interval on the chart when this template is applied",fr:["En sélectionnant cette option, l'intervalle {interval} sera placé sur le graphique lorsque ce modèle est appliqué"],he_IL:["בחירת אפשרות זו תגדיר את האינטרוול {interval} בגרף כאשר מיושמת תבנית זו"],hu_HU:"Selecting this option will set the {interval} interval on the chart when this template is applied",id_ID:["Memilih opsi ini akan mengatur interval {interval} pada chart saat template ini diterapkan"],it:["Selezionando questa opzione, il modello viene applicato cambiando il timeframe in {interval}"],ja:["この項目を選択すると、テンプレートが適用された時にチャートの時間足が{interval}に設定されます"],ko:["이 옵션을 고르면 이 템플릿이 적용될 때 차트에 {interval} 을 세팅하게 됩니다."],ms_MY:["Memilih pilihan ini akan menetapkan selang masa {interval} pada carta apabila templat ini digunakan"],nl_NL:"Selecting this option will set the {interval} interval on the chart when this template is applied",pl:["Wybór tej opcji spowoduje ustawienie na wykresie interwału {interval} po zastosowaniu tego szablonu"],pt:["Selecionar esta opção definirá o intervalo {interval} no gráfico quando este modelo for aplicado"],ro:"Selecting this option will set the {interval} interval on the chart when this template is applied",ru:["Включите, чтобы установить на графике интервал {interval}, когда этот шаблон применён"],sv:["Om du väljer detta alternativ ställer du in intervallet {interval} i diagrammet när den här mallen används"],th:["การเลือกตัวเลือกนี้จะเป็นการกำหนดช่วงเวลา {interval} บนชาร์ต เมื่อเทมเพลตนี้ถูกใช้งาน"],tr:["Bu seçeneğin belirlenmesi ile, bu taslak uygulandığında grafikte {interval} aralığı ayarlanır"],vi:["Chọn tùy chọn này sẽ đặt khoảng thời gian {interval} trên biểu đồ khi mẫu này được áp dụng"],zh:["套用此模板时,选择此选项将在图表上设置{interval}周期"],zh_TW:["套用此模板時,選擇此選項將在圖表上設置{interval}周期"]}},61422:e=>{e.exports={ar:["سيؤدي تحديد هذا الخيار إلى تعيين الرمز {symbol} على الرسم البياني عند تطبيق هذا القالب"],ca_ES:"Selecting this option will set the {symbol} symbol on the chart when this template is applied",

File diff suppressed because one or more lines are too long

View File

@@ -3971,7 +3971,7 @@ export interface ChartingLibraryWidgetOptions {
*/
overrides?: Partial<WidgetOverrides>;
/**
* This URL is used to send a POST request with binary chart snapshots when a user presses the snapshot button.
* This URL is used to send a POST request with binary chart snapshots when a user presses the [snapshot](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Snapshots.md) button.
* This POST request contains `multipart/form-data` with the field `preparedImage` that represents binary data of the snapshot image in `image/png` format.
*
* This endpoint should return the full URL of the saved image in the response.
@@ -4143,7 +4143,7 @@ export interface ChartingLibraryWidgetOptions {
*/
header_widget_buttons_mode?: HeaderWidgetButtonsMode;
/**
* You could use this object to override context menu. You can also change the menu on the fly using the {@link IChartingLibraryWidget.onContextMenu} method.
* Use this property to override the [context menu](https://www.tradingview.com/charting-library-docs/latest/ui_elements/context-menu.md). You can also change the menu on the fly using the {@link IChartingLibraryWidget.onContextMenu} method.
*/
context_menu?: ContextMenuOptions;
/**
@@ -4523,6 +4523,7 @@ export interface ContextMenuItem {
/** Callback event when menu item is clicked */
click: EmptyCallback;
}
/** Use this interface to override the [context menu](https://www.tradingview.com/charting-library-docs/latest/ui_elements/context-menu.md). */
export interface ContextMenuOptions {
/**
* Provide this function if you want to change the set of actions being displayed in the context menu.
@@ -4553,8 +4554,7 @@ export interface ContextMenuOptions {
*/
items_processor?: ContextMenuItemsProcessor;
/**
* **Note:** This API is experimental and might be changed significantly in the future releases.
* By providing this function you could override the default renderer for context menu.
* Provide this function to override the default renderer for context menu so you can adjust existing menu items.
*/
renderer_factory?: ContextMenuRendererFactory;
}
@@ -4753,9 +4753,8 @@ export interface CreateShapeOptions<TOverrides extends object> extends CreateSha
*/
shape?: "arrow_up" | "arrow_down" | "flag" | "vertical_line" | "horizontal_line" | "long_position" | "short_position" | "icon" | "emoji" | "sticker" | "anchored_text" | "anchored_note";
/**
* An optional study ID to be attached to the owner study.
* It does not mean that both the owner and all possible associated IDs will behave in tandem.
* Their behavior will be independent.
* The ID of an indicator that the drawing is attached to.
* For more information, refer to the [Attach drawing to indicator](https://www.tradingview.com/charting-library-docs/latest/ui_elements/drawings/drawings-api.md#attach-drawing-to-indicator) section.
*/
ownerStudyId?: EntityId;
}
@@ -4776,7 +4775,7 @@ export interface CreateShapeOptionsBase<TOverrides extends object> {
*/
disableSave?: boolean;
/**
* Disable/enable undoing the creation of the drawing.
* If `true`, users cannot cancel the drawing creation in the UI. However, users can still click the _Undo_ button to cancel previous actions.
*/
disableUndo?: boolean;
/**
@@ -4792,7 +4791,7 @@ export interface CreateShapeOptionsBase<TOverrides extends object> {
*/
showInObjectsTree?: boolean;
/**
* An entity ID that can be used to associate the drawing with a study.
* The ID of an indicator that the drawing is attached to. For more information, refer to the [Attach drawing to indicator](https://www.tradingview.com/charting-library-docs/latest/ui_elements/drawings/drawings-api.md#attach-drawing-to-indicator) section.
*/
ownerStudyId?: EntityId;
/**
@@ -9980,6 +9979,7 @@ export interface IChartWidgetApi {
setScrollEnabled(enabled: boolean): void;
/**
* Get an API object for interacting with groups of drawings.
* Refer to the [Drawings API](https://www.tradingview.com/charting-library-docs/latest/ui_elements/drawings/drawings-api.md#drawing-groups-api) article for more information.
*
* **Example**
* ```javascript
@@ -10549,6 +10549,7 @@ export interface IChartingLibraryWidget {
takeScreenshot(): void;
/**
* Create a snapshot of the chart and return it as a canvas.
* Use this method to [implement your logic](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Snapshots.md#implement-your-logic) for taking snapshots.
*
* @param options An optional object that customizes the returned snapshot.
* @returns A promise containing a `HTMLCanvasElement` of the snapshot.
@@ -12461,7 +12462,7 @@ export interface ISettingsAdapter {
removeValue(key: string): void;
}
/**
* Drawing Groups API.
* Drawing Groups API. Refer to the [Drawings API](https://www.tradingview.com/charting-library-docs/latest/ui_elements/drawings/drawings-api.md#drawing-groups-api) article for more information.
*/
export interface IShapesGroupControllerApi {
/**
@@ -12804,9 +12805,9 @@ export interface ISymbolInstrument {
/** Ticker ID */
tickerid: string;
/** Currency Code */
currencyCode?: string;
currencyCode?: string | null;
/** Unit ID */
unitId?: string;
unitId?: string | null;
/** Bar resolution */
period: ResolutionString;
/** Index */
@@ -13806,13 +13807,9 @@ export interface LibrarySymbolInfo {
* Symbol Name
* It's the name of the symbol. It is a string that your users will be able to see.
* Also, it will be used for data requests if you are not using tickers.
* It should not contain the exchange name.
*/
name: string;
/**
* The full name of the symbol (contains name and exchange)
* Example: `BTCE:BTCUSD`
*/
full_name: string;
/**
* Array of base symbols
* Example: for `AAPL*MSFT` it is `['NASDAQ:AAPL', 'NASDAQ:MSFT']`
@@ -13824,6 +13821,7 @@ export interface LibrarySymbolInfo {
* Unique symbol id
* It's an unique identifier for this particular symbol in your symbology.
* If you specify this property then its value will be used for all data requests for this symbol. ticker will be treated the same as {@link LibrarySymbolInfo.name} if not specified explicitly.
* It should not contain the exchange name.
*/
ticker?: string;
/**
@@ -19083,6 +19081,8 @@ export interface StudyInputBaseInfo {
readonly isHidden?: boolean;
/** Is the input visible */
readonly visible?: string;
/** An array of plot ids, upon the hiding of which, this input should also be hidden within the legend */
readonly hideWhenPlotsHidden?: string[];
}
/**
* A description of a study input.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -390,13 +390,9 @@ export interface LibrarySymbolInfo {
* Symbol Name
* It's the name of the symbol. It is a string that your users will be able to see.
* Also, it will be used for data requests if you are not using tickers.
* It should not contain the exchange name.
*/
name: string;
/**
* The full name of the symbol (contains name and exchange)
* Example: `BTCE:BTCUSD`
*/
full_name: string;
/**
* Array of base symbols
* Example: for `AAPL*MSFT` it is `['NASDAQ:AAPL', 'NASDAQ:MSFT']`
@@ -408,6 +404,7 @@ export interface LibrarySymbolInfo {
* Unique symbol id
* It's an unique identifier for this particular symbol in your symbology.
* If you specify this property then its value will be used for all data requests for this symbol. ticker will be treated the same as {@link LibrarySymbolInfo.name} if not specified explicitly.
* It should not contain the exchange name.
*/
ticker?: string;
/**

View File

@@ -1,6 +1,6 @@
{
"private": true,
"description": "CL v27.000 (internal id 0d3d8bbd @ 2024-01-17T14:12:04.769Z)",
"description": "CL v27.001 (internal id 3eb6c0e5 @ 2024-02-02T14:43:45.314Z)",
"type": "module",
"main": "charting_library.cjs.js",
"module": "charting_library.esm.js",

File diff suppressed because one or more lines are too long

View File

@@ -68,7 +68,7 @@ export class SymbolsStorage {
const symbolInfo = item.symbolInfo;
return {
symbol: symbolInfo.name,
full_name: symbolInfo.full_name,
full_name: `${symbolInfo.exchange}:${symbolInfo.name}`,
description: symbolInfo.description,
exchange: symbolInfo.exchange,
params: [],
@@ -131,7 +131,6 @@ export class SymbolsStorage {
ticker: ticker,
name: symbolName,
base_name: [listedExchange + ':' + symbolName],
full_name: fullName,
listed_exchange: listedExchange,
exchange: tradedExchange,
currency_code: currencyCode,

View File

@@ -182,7 +182,7 @@ export class UDFCompatibleDatafeedBase {
}
this._send('symbols', params)
.then((response) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
if (response.s !== undefined) {
onError('unknown_symbol');
}
@@ -190,32 +190,31 @@ export class UDFCompatibleDatafeedBase {
const symbol = response.name;
const listedExchange = (_a = response.listed_exchange) !== null && _a !== void 0 ? _a : response['exchange-listed'];
const tradedExchange = (_b = response.exchange) !== null && _b !== void 0 ? _b : response['exchange-traded'];
const fullName = (_c = response.full_name) !== null && _c !== void 0 ? _c : `${tradedExchange}:${symbol}`;
const result = {
...response,
name: symbol,
base_name: [listedExchange + ':' + symbol],
full_name: fullName,
listed_exchange: listedExchange,
exchange: tradedExchange,
currency_code: (_d = response.currency_code) !== null && _d !== void 0 ? _d : response['currency-code'],
original_currency_code: (_e = response.original_currency_code) !== null && _e !== void 0 ? _e : response['original-currency-code'],
unit_id: (_f = response.unit_id) !== null && _f !== void 0 ? _f : response['unit-id'],
original_unit_id: (_g = response.original_unit_id) !== null && _g !== void 0 ? _g : response['original-unit-id'],
unit_conversion_types: (_h = response.unit_conversion_types) !== null && _h !== void 0 ? _h : response['unit-conversion-types'],
has_intraday: (_k = (_j = response.has_intraday) !== null && _j !== void 0 ? _j : response['has-intraday']) !== null && _k !== void 0 ? _k : false,
visible_plots_set: (_l = response.visible_plots_set) !== null && _l !== void 0 ? _l : response['visible-plots-set'],
minmov: (_o = (_m = response.minmovement) !== null && _m !== void 0 ? _m : response.minmov) !== null && _o !== void 0 ? _o : 0,
minmove2: (_p = response.minmovement2) !== null && _p !== void 0 ? _p : response.minmove2,
session: (_q = response.session) !== null && _q !== void 0 ? _q : response['session-regular'],
session_holidays: (_r = response.session_holidays) !== null && _r !== void 0 ? _r : response['session-holidays'],
supported_resolutions: (_u = (_t = (_s = response.supported_resolutions) !== null && _s !== void 0 ? _s : response['supported-resolutions']) !== null && _t !== void 0 ? _t : this._configuration.supported_resolutions) !== null && _u !== void 0 ? _u : [],
has_daily: (_w = (_v = response.has_daily) !== null && _v !== void 0 ? _v : response['has-daily']) !== null && _w !== void 0 ? _w : true,
intraday_multipliers: (_y = (_x = response.intraday_multipliers) !== null && _x !== void 0 ? _x : response['intraday-multipliers']) !== null && _y !== void 0 ? _y : ['1', '5', '15', '30', '60'],
has_weekly_and_monthly: (_z = response.has_weekly_and_monthly) !== null && _z !== void 0 ? _z : response['has-weekly-and-monthly'],
has_empty_bars: (_0 = response.has_empty_bars) !== null && _0 !== void 0 ? _0 : response['has-empty-bars'],
volume_precision: (_1 = response.volume_precision) !== null && _1 !== void 0 ? _1 : response['volume-precision'],
format: (_2 = response.format) !== null && _2 !== void 0 ? _2 : 'price',
ticker: response.ticker,
currency_code: (_c = response.currency_code) !== null && _c !== void 0 ? _c : response['currency-code'],
original_currency_code: (_d = response.original_currency_code) !== null && _d !== void 0 ? _d : response['original-currency-code'],
unit_id: (_e = response.unit_id) !== null && _e !== void 0 ? _e : response['unit-id'],
original_unit_id: (_f = response.original_unit_id) !== null && _f !== void 0 ? _f : response['original-unit-id'],
unit_conversion_types: (_g = response.unit_conversion_types) !== null && _g !== void 0 ? _g : response['unit-conversion-types'],
has_intraday: (_j = (_h = response.has_intraday) !== null && _h !== void 0 ? _h : response['has-intraday']) !== null && _j !== void 0 ? _j : false,
visible_plots_set: (_k = response.visible_plots_set) !== null && _k !== void 0 ? _k : response['visible-plots-set'],
minmov: (_m = (_l = response.minmovement) !== null && _l !== void 0 ? _l : response.minmov) !== null && _m !== void 0 ? _m : 0,
minmove2: (_o = response.minmovement2) !== null && _o !== void 0 ? _o : response.minmove2,
session: (_p = response.session) !== null && _p !== void 0 ? _p : response['session-regular'],
session_holidays: (_q = response.session_holidays) !== null && _q !== void 0 ? _q : response['session-holidays'],
supported_resolutions: (_t = (_s = (_r = response.supported_resolutions) !== null && _r !== void 0 ? _r : response['supported-resolutions']) !== null && _s !== void 0 ? _s : this._configuration.supported_resolutions) !== null && _t !== void 0 ? _t : [],
has_daily: (_v = (_u = response.has_daily) !== null && _u !== void 0 ? _u : response['has-daily']) !== null && _v !== void 0 ? _v : true,
intraday_multipliers: (_x = (_w = response.intraday_multipliers) !== null && _w !== void 0 ? _w : response['intraday-multipliers']) !== null && _x !== void 0 ? _x : ['1', '5', '15', '30', '60'],
has_weekly_and_monthly: (_y = response.has_weekly_and_monthly) !== null && _y !== void 0 ? _y : response['has-weekly-and-monthly'],
has_empty_bars: (_z = response.has_empty_bars) !== null && _z !== void 0 ? _z : response['has-empty-bars'],
volume_precision: (_0 = response.volume_precision) !== null && _0 !== void 0 ? _0 : response['volume-precision'],
format: (_1 = response.format) !== null && _1 !== void 0 ? _1 : 'price',
};
onResultReady(result);
}

View File

@@ -170,7 +170,7 @@ export class SymbolsStorage {
const symbolInfo = item.symbolInfo;
return {
symbol: symbolInfo.name,
full_name: symbolInfo.full_name,
full_name: `${symbolInfo.exchange}:${symbolInfo.name}`,
description: symbolInfo.description,
exchange: symbolInfo.exchange,
params: [],
@@ -248,7 +248,6 @@ export class SymbolsStorage {
ticker: ticker,
name: symbolName,
base_name: [listedExchange + ':' + symbolName],
full_name: fullName,
listed_exchange: listedExchange,
exchange: tradedExchange,
currency_code: currencyCode,

View File

@@ -331,15 +331,14 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
const symbol = response.name;
const listedExchange = response.listed_exchange ?? response['exchange-listed'];
const tradedExchange = response.exchange ?? response['exchange-traded'];
const fullName = response.full_name ?? `${tradedExchange}:${symbol}`;
const result: LibrarySymbolInfo = {
...response,
name: symbol,
base_name: [listedExchange + ':' + symbol],
full_name: fullName,
listed_exchange: listedExchange,
exchange: tradedExchange,
ticker: response.ticker,
currency_code: response.currency_code ?? response['currency-code'],
original_currency_code: response.original_currency_code ?? response['original-currency-code'],
unit_id: response.unit_id ?? response['unit-id'],

View File

@@ -23,6 +23,6 @@
},
"homepage": "https://www.tradingview.com/charting-library-docs",
"name": "charting_library",
"version": "27.000",
"version": "27.001",
"types": "charting_library.d.ts"
}