(window.webpackJsonp=window.webpackJsonp||[]).push([["editobjectdialog"],{KFNk:function(t,e,i){},Kqsj:function(t,e,i){"use strict";(function(t){function o(t,e,i){this._source=t,this._model=e,this._undoCheckpoint=i}var a,n,r,s,l,p,c,d,u,h;i("jgM0"),i("KFNk"),i("pay7"),i("ohga"),a=i("Ss5c").LineDataSource,n=i("GVHu").Study,r=i("qJq3").Series,s=i("fgLi").DataSource,l=i("FQhm"),p=i("bR4N").bindPopupMenu,c=i("QloM"),d=i("GAqT").TVOldDialogs,u=i("PC8g").trackEvent,h=i("CW80").isLineTool,i("PVgW"),o.prototype.hide=function(t){d.destroy(this._dialogTitle,{undoChanges:!!t})},o.prototype._onDestroy=function(t,e){var i,o,a=(e||{}).undoChanges;$(window).unbind("keyup.hidePropertyDialog"),a?(i=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow)&&this._model.undoToCheckpoint(i):this._source.hasAlert.value()&&(o=this._source,setTimeout(function(){o.localAndServerAlersMismatch&&o.synchronizeAlert(!0)})),this._undoCheckpointOnShow&&delete this._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},o.prototype.isVisible=function(){return this._dialog&&this._dialog.is(":visible")},o.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},o.prototype.switchTab=function(t,e){var i,o;if(this._tabs)return i=null,t?t=t.valueOf():null===t&&(t=void 0),"string"==typeof t&&$.each(this._tabs,function(e,o){if(o.name===t)return i=o,!1}),"object"==typeof t&&$.each(this._tabs,function(e,o){if(t===o||$(o.labelObject).is(t)||$(o.wrapperObject).is(t))return i=o,!1}),i||(i=this._tabs[~~t]),!!i&&($.each(this._tabs,function(t,e){var o=e===i;$(e.wrapperObject)[o?"show":"hide"](),$(e.labelObject)[o?"addClass":"removeClass"]("active")}),e&&(o=this.activeTabSettingsName())&&TVSettings.setValue(o,i.name),this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0)},o.prototype.makeScrollable=function(t){var e=t.wrapperObject,i=$(t.objects[0]),o=i.width();e.css({height:$(window).height()/1.4,overflow:"auto"}),i.css("width",o+20),t.isScrollable=!0},o.prototype.appendToTab=function(t,e,i,o,a,n){var r,s;$(t).is("table")&&!$(t).find("tr").size()||(this._tabs||(this._tabs=[]),$.each(this._tabs,function(t,i){if(i.name===e)return r=t,!1}),void 0===r&&(this._tabs.push({name:e,localizedName:$.t(e),objects:$(),displayPriority:0,defaultOpen:0,isButton:!!a,callback:a?n||function(){}:null}),r=this._tabs.length-1),(s=this._tabs[r]).objects=s.objects.add(t),s.displayPriority=Math.max(s.displayPriority||0,i||0),s.defaultOpen=Math.max(s.defaultOpen||0,o||0))},o.prototype.insertTabs=function(){function t(t){a&&a.toLowerCase()===t.name.toLowerCase()&&(t.defaultOpen=Math.max(~~t.defaultOpen,c.TabOpenFrom.UserSave)),(!i||~~i.defaultOpen<~~t.defaultOpen)&&(i=t),t.labelObject=$('').text(t.localizedName).appendTo(e._tabContainer),t.labelObject.on("mousedown",function(t){function i(t){var e;n=n||(e=t,Math.abs(o-e.pageX)>5||Math.abs(a-e.pageY)>5)}var o=t.pageX,a=t.pageY,n=!1,r=this ;$(r).on("mousemove",i),$(r).one("mouseup",function(){n||e.switchTab(r,!0),$(r).off("mousemove",i)})});var o=$('
');t.wrapperObject=$().add(o),t.objects.each(function(e,i){var a=$(i);a.is("table")?(a.data("layout-separated")&&(t.wrapperObject=t.wrapperObject.add('').add(o=$('')),a.removeData("layout-separated")),o.append(a),a.children("tbody").each(function(e,a){if(0!==e&&$(a).data("layout-separated")){t.wrapperObject=t.wrapperObject.add('').add(o=$(''));var n=$(i).clone(!0,!1).appendTo(o);n.children().remove(),n.append(a),$(a).removeData("layout-separated")}})):o.append(a)}),t.wrapperObject.appendTo(e._container)}var e,i,o,a;this._tabs&&(this._tabs.sort(function(t,e){return(e.displayPriority||0)-(t.displayPriority||0)}),e=this,i=null,(o=this.activeTabSettingsName())&&(a=TVSettings.getValue(o)),$.each(this._tabs,function(i,o){var a;o.isButton?((a=o).labelObject=$('').text(a.localizedName).appendTo(e._tabContainer),a.labelObject.bind("click",a.callback)):t(o)}),this.switchTab(i))},o.prototype.activeTabSettingsName=function(){var t=this._source;if(t)return t instanceof r?"properties_dialog.active_tab.chart":t instanceof a?"properties_dialog.active_tab.drawing":t instanceof n?"properties_dialog.active_tab.study":void 0},o.prototype.show=function(e){function o(t,e){g.hide(!!e)}var b,f,_,y,g,m,T,v,w,P,C,S,O,k,D,x,j,I,N,L,B,V,R,F,A;if(t.enabled("property_pages")&&(b=i("kSsA"),f=(e=e||{}).onWidget||!1,_=null,TradingView.isInherited(this._source.constructor,r)&&(_="series-properties-dialog",u("GUI","Series Properties")),TradingView.isInherited(this._source.constructor,n)&&(_="indicator-properties-dialog",y=!this._source.isPine()||this._source.isStandardPine()?this._source.metaInfo().description:"Custom Pine",u("GUI","Study Properties",y)),h(this._source)&&(_="drawing-properties-dialog",u("GUI","Drawing Properties",this._source.name())),TradingView.isInherited(this._source.constructor,s)&&(g=this,this._model.selectionMacro(function(t){t.addSourceToSelection(g._source)})),m=b.createStudyStrategyPropertyPage(this._source,this._model),T=b.createInputsPropertyPage(this._source,this._model),v=b.createStylesPropertyPage(this._source,this._model),w=b.createVisibilitiesPropertyPage(this._source,this._model),P=b.createDisplayPropertyPage(this._source,this._model),T&&!T.widget().is(":empty")||v||m))return g=this,C=null!==T,S=this._source.title(),O=e.ownerDocument||this._model._chartWidget.widget().prop("ownerDocument"),k=d.createDialog(S,{hideTitle:!0,dragHandle:".properties-tabs",ownerDocument:O}).attr("data-dialog-type",_),D=k.find("._tv-dialog-content"),x=$('').appendTo(D),j=[],I=400,this._tabs=j,this._dialog=k,this._dialogTitle=S,this._container=D,this._tabContainer=x,this._undoCheckpointOnShow=this._model.createUndoCheckpoint(), k.on("destroy",function(t,e){e=e||{};T&&T.destroy(),m&&m.destroy(),v&&v.destroy(),P&&P.destroy(),w&&w.destroy(),$("select",D).each(function(){$(this).selectbox("detach")}),g._onDestroy(t,e)}),!this._model.readOnly()&&m&&m.widget().each(function(t,e){var i,o,a=+$(e).data("layout-tab-priority");isNaN(a)&&(a=c.TabPriority.Properties),i=~~$(e).data("layout-tab-open"),void 0===(o=$(e).data("layout-tab"))&&(o=c.TabNames.properties),g.appendToTab(e,o,a,i)}),this._model.readOnly()||!C||T.widget().is(":empty")||T.widget().each(function(t,e){var o,a,n=i("n3Kh"),r=T instanceof n,s=+$(e).data("layout-tab-priority");TradingView.isNaN(s)&&(s=r?c.TabPriority.Coordinates:c.TabPriority.Inputs),o=~~$(e).data("layout-tab-open"),void 0===(a=$(e).data("layout-tab"))&&(a=r?c.TabNames.coordinates:c.TabNames.inputs),g.appendToTab(e,a,s,o)}),v&&v.widget().each(function(t,e){var o,a,n,r=+$(e).data("layout-tab-priority");TradingView.isNaN(r)&&(r=c.TabPriority.Style),o=~~$(e).data("layout-tab-open"),a=i("Yc1q"),!o&&v instanceof a&&(o=c.TabOpenFrom.Default),void 0===(n=$(e).data("layout-tab"))&&(n=c.TabNames.style),g.appendToTab(e,n,r,o)}),P&&P.widget().each(function(t,e){var i,o,a=+$(e).data("layout-tab-priority");TradingView.isNaN(a)&&(a=c.TabPriority.Display),i=~~$(e).data("layout-tab-open"),void 0===(o=$(e).data("layout-tab"))&&(o=c.TabNames.properties),g.appendToTab(e,o,a,i)}),w&&w.widget().each(function(t,e){g.appendToTab(e,c.TabNames.visibility,c.TabPriority.Display,!1)}),this._source instanceof n&&!!this._source.metaInfo().pine&&this._source.metaInfo(),this.insertTabs(),this._helpItemRequired()&&this._createHelp(),B=110,$(".js-dialog").each(function(){var t=parseInt($(this).css("z-index"),10);t>B&&(B=t)}),k.css("z-index",B),N=$('').appendTo(D),L=$('