text: define("Lib/Control/BaseCompatible/BaseCompatible",["View/Runner","Lib/Control/AreaAbstract/AreaAbstract.compatible","Lib/Control/Control.compatible","Core/Abstract.compatible","Env/Event","Core/helpers/Function/shallowClone","Core/core-hash","Core/CommandDispatcher","Core/WindowManager","Core/core-instance","Core/helpers/Function/forAliveOnly","Env/Env","Core/ParallelDeferred","Core/Deferred","Core/markup/parse","Core/helpers/Hcontrol/configStorage","Core/ContextBinder","Core/helpers/Number/randomId","Vdom/Vdom","Core/core-extend-initializer","Core/helpers/Hcontrol/replaceContainer","Core/helpers/Hcontrol/getChildContainers","View/Executor/Expressions","Core/core-extend","Core/core-simpleExtend","Core/ControlBatchUpdater","Core/Context"],function(a,n,e,s,u,h,l,o,_,i,r,C,c,t,g,p,m,b,d,f,v,y,O){"use strict";var w,x;if("undefined"!==typeof jQuery)(x=jQuery).fn.wsControl=function(){var t=null,i;try{i=this[0];while(i){if(i.wsControl){t=i.wsControl;break}i=i.parentNode}}catch(t){}return t};function I(t,i){var e=t.getAttribute("__config"),n;if(t.children)for(n=0;n<t.children.length;n++)I(t.children[n],true);if(e){if(i){var s=e.split(",");for(n=0;n<s.length;n++){var o=p.getValue(s[n]);if(o._template&&"function"===typeof o.destroy&&!o._destroyed)o.destroy();p.deleteKey(s[n])}}t.removeAttribute("__config")}}return w={_useNativeAsMain:true,iWantVDOM:true,_doNotSetDirty:false,_isSyncClasses:false,childControls:null,isBuildVDom:function(){return this.iWantVDOM&&window&&this.isGoodContainer()},_getMarkup:function(t,i,e,n){if(!this._template.stable)return C.IoC.resolve("ILogger").error(this._moduleName,"Check what you put in _template"),"";this.repairOptions();var s=w._prepareDecOptions.call(this,i),o=false;if(this._getDecOptions&&!O.Attr.checkAttr(this._getDecOptions()))o=true,s=this._getDecOptions();else if(O.Attr.checkAttr(s))s={};if(!O.Attr.checkAttr(e))s=O.Attr.processMergeAttributes(e,s),e=null;delete s.title,delete s.disabled;var r=e&&e.attributes||s;if(!this._options._logicParent||!this._options._logicParent._template){if(!r.hasOwnProperty("attr:data-component")&&r["data-component"])r["attr:data-component"]=r["data-component"],delete r["data-component"];if(!r.hasOwnProperty("attr:config")&&r["config"])r["attr:config"]=r["config"],delete r["config"];if(!r.hasOwnProperty("attr:hasMarkup")&&r["hasMarkup"])r["attr:hasMarkup"]=r["hasMarkup"],delete r["hasMarkup"]}return this._template(this,e||{attributes:r},t,n,{isSetts:true,fullContext:this.__$$__fullContext},a.Run)},_prepareDecOptions:function(t){var i=this._container?O.Decorate.createRootDecoratorObject(this.getAttr("config")||this._options.__$config||this._options.id,true,this.getAttr("data-component")||t&&this._moduleName,{}):{},e={},n="data-component";if(this._options.__$fixDecOptions)i=this._options.__$fixDecOptions,this._options.__$fixDecOptions=null;i["config"]=i["config"]||this._options.__$config;var s=this._container?this._container.attributes||(this._container.length>0?this._container[0].attributes:{}):{};for(var o in s)if(s.hasOwnProperty(o)){var r=s[o]&&s[o].name?s[o].name:o,a=s[o]&&s[o].value||s[o];if(void 0===a)continue;if("parent"===r||r.indexOf("on:")>-1)continue;i[r]=e[r]=a}if(!(this._isSyncClasses&&this.iWantVDOM)){var h=this._options["class"]||"";if(e["class"]&&"string"===typeof e["class"]){var l;e["class"]=e["class"].replace("ws-enabled","").replace("ws-disabled","").replace("ws-hidden","").replace("controls-Button__primary","").replace("controls-Button__default","").replace("controls-Click__active","").replace("controls-IconButton__doneBorder","").replace("controls-IconButton__errorBorder",""),e["class"].split(" ").forEach(function(t){if(-1===h.indexOf(t))h+=t+" "})}this._options["class"]=h,this._isSyncClasses=true}if(i["class"]=this._options["class"],this._options["__$config"]=i["config"],this._decOptions){if(i[n])this._decOptions[n]=i[i];for(var _ in i)if(!this._decOptions[_])this._decOptions[_]=i[_]}return O.Attr.checkAttr(i)?{}:i},_showExtendedTooltipCompatible:function(){var t=this;if(t._isCanShowExtendedTooltip())t._showExtendedTooltip(true)},_hideExtendedTooltipCompatible:function(){var i=this;if(i._isCanShowExtendedTooltip())this._getInfobox(function(t){if(t.isCurrentTarget(i._getExtendedTooltipTarget()))t.hide(t.HIDE_TIMEOUT)})},_getInfobox:function(i){var t="Lib/Control/Infobox/Infobox";if(requirejs.defined(t))return i(requirejs(t));else requirejs([t],function(t){return i(t)})},rebuildMarkup:function(){w._setDirty.call(this)},containerIsComponent:function(){return window&&this._container&&this._container.length>0&&"COMPONENT"===this._container[0].tagName},render:function(t,i,e){if(!this._template.stable)return C.IoC.resolve("ILogger").error(this._moduleName,"Check what you put in _template"),"";this.repairOptions(),this._onceRendered=true;var n=this._prepareDecOptions(),s;if(n=this._getDecOptions?this._getDecOptions():n,this.isBuildVDom()){if(!this.VDOMReady)this.VDOMReady=true,this.mountedFromBC=true,d.Synchronizer.mountControlToDOM(this,this.constructor.prototype,this._options,this._container),this._pathContainer(),this._finalInit();s=""}else{if(i&&i.__wasOldControl)n=O.Attr.checkAttr(n)?i:n;else n=O.Attr.checkAttr(n)||O.Attr.checkAttr(i)?i:n;if(s=this._template(this,n,this._compatContext,false,e),this.containerIsComponent())t=true}if(t&&window&&this.isGoodContainer()&&!this.isBuildVDom())this._container[0].className="",this.destroyChildControls(),v(this._container,s),this.setContainer(this._container);else if(window){if(!this.isGoodContainer()){var o=$('[config="'+this._options.__$config+'"]');if(o.length>0)this._container=o}if(this.isBuildVDom())if(!this.VDOMReady)this.VDOMReady=true,this.mountedFromBC=true,d.Synchronizer.mountControlToDOM(this,this.constructor.prototype,this._options,this._container),this._pathContainer(),this._finalInit();this.setContainer(this._container)}return s},_pathContainer:function(){if("undefined"!==typeof window&&window.$)this._container=$(this._container);this._container[0].wsControl=this},_finalInit:function(){if(!this._isInitComplete)this.init&&this.init(),this._initComplete&&this._initComplete(),this._isInitialized=true,this._allowEvents&&this._allowEvents(),this._constructionDone&&this._constructionDone(),this._isInitComplete=true,this._notify("onInit")},setContainer:function(t){if(!t)return;if(window)this._container=$(t);if(window&&this.isGoodContainer()){if(this.iWantVDOM){if(!this.VDOMReady){if(this.VDOMReady=true,!this._decOptions["ws-creates-context"])this._decOptions["ws-creates-context"]="true";if(!this._decOptions["ws-delegates-tabfocus"])this._decOptions["ws-delegates-tabfocus"]="true";this.mountedFromBC=true,I(this._container[0]),d.Synchronizer.mountControlToDOM(this,this.constructor.prototype,this._options,this._container,this._decOptions),this._pathContainer(),this._finalInit()}return}if(this._container.unbind(),(this._container[0].wsControl=this)._initKeyboardMonitor(),this._subscribeOnReady(),this._parent||!this._waitWhileSetParent)this.reviveSuperOldControls(),this._initInnerAction(this._container),this._finalInit()}},reviveComponents:function(){return(new t).callback()},destroyChildControls:function(){for(var t=y(this._container,"[data-component]"),i=0,e=t.length;i<e;i++)if(t[i].wsControl)t[i].wsControl.destroy()},_forceUpdate:function(t){this._notify("onPropertyChange")},findParentFromContainer:function(t){var i=false;while(!i){if(0===(t=$(t).parent()).length)return null;if(t[0].wsControl)return t[0].wsControl;else if(t[0].controlNodes&&t[0].controlNodes[0]&&t[0].controlNodes[0].control)return t[0].controlNodes[0].control}},reviveSuperOldControls:function(){this._container=$(this._container);var t=this._container.find("[data-component]"),i,e,n,s,o,r,a=null,h,l;try{for(var _=0,c=t.length;_<c;_++){if((i=t[_]).controlNodes&&!i.wsControl)i.wsControl=i.controlNodes[0].control;if(i.wsControl)continue;if(!document.body.contains(i))continue;if(o=i.getAttribute("data-component"),r=i.getAttribute("data-component"),h=i.getAttribute("config"),r){if(!h)h=i.getAttribute("newconfig")||b("cfg-"),i.setAttribute("config",h);if(n=g(i,null),e=r,""===(s=require(e)))C.IoC.resolve("ILogger").info("BaseCompatible",'Модуль "'+e+'" отсутствует в списке загруженных');if(!n.element)n.element=$(i);if(n.linkedContext=this.getLinkedContext(),n.parent=n._options&&n._options.parent?n._options.parent:this,n.logicParent=n._options&&n._options.logicParent?n._options.logicParent:this,n.logicParent&&n.logicParent._children[n.name]&&n.logicParent._children[n.name].isDestroyed&&!n.logicParent._children[n.name].isDestroyed())n.logicParent._children[n.name].setContainer(n.element);else if(!n._thisIsInstance){if(n.eventBusId=b(),n.name)u.Bus.channel(n.eventBusId,{waitForPermit:true});else n.name=b("name-");var p;n.parent=this.findParentFromContainer(n.element),n.logicParent=n.parent;var d=new s(n=(p=m.initBinderForControlConfig(n)).getConstructorOptions(this.getLinkedContext(),s,n));if(d._template)d.setContext(this.getLinkedContext());if(d._options.__vdomOptions&&d._options.__vdomOptions.controlNode)d._options.__vdomOptions.controlNode.instance=d;var f=O.Subscriber.getEventsListFromOptions(n);O.Subscriber.applyEvents(d,n.parent,f),p.bindControl(d,this.getLinkedContext(),"syncControl")}else{if(n._container=window?$(n.element):n.element,(a=n).setParent(this),a.reviveSuperOldControls(),a._template)a.setContext(this.getLinkedContext());var p;n=a._options,(p=m.initBinderForControlConfig(n)).bindControl(a,this.getLinkedContext(),"syncControl")}}}if(!this._cleanupMarkupDataBinding)this._markupDataBinding(true)}catch(t){throw C.IoC.resolve("ILogger").error("Revive compound control in VDom","Component with name: "+this.getName(),t),t}if((this._container&&this._container[0]||this._container).parentNode===document)this.reviveSuperOldControls=function(){}},_compatContext:null,setContext:function(t){var i;this._compatContext.setPrevious(t),m.initBinderForControlConfig(this._options).bindControl(this,this.getLinkedContext(),"syncControl")},getLinkedContext:function(){return this._compatContext},getContext:function(){return this.getLinkedContext()},_initInnerAction:function(t){if("function"===typeof this._containerReady)this._containerReady(t)},getAttr:function(t){if(!window)return this._container.attributes&&this._container.attributes[t]?this._container.attributes[t].value:"";else if(this._container[0]&&this._container[0].startTag)return this._container[0].attributes[t];else return $(this._container).attr(t)},setIdProperty:function(){},fixIcon:function(){if(this._options.icon&&this._options.icon.indexOf(":")>-1)this._options.icon=this._options.icon.split(":")[1]},isReady:function(){return true},_initSeparatedTypeOptions:function(t){if(!t)if(!this._options.parent||!this._options.parent._template){if(void 0===this._options.enabled)this._options.enabled=true;if(void 0===this._options.visible)this._options.visible=true}},initOptions:function(){if(!this._options)this._options={};if(!this._options.eventBusId)this._options.eventBusId=b("ev-");if(!this._options.owner)this._options.owner=null;if(!this._options.primary)this._options.primary=false;if(void 0===this._options.allowChangeEnable)this._options.allowChangeEnable=true;if(!this._options.caption)this._options.caption="";if(!this._options.tooltip)this._options.tooltip="";if(!this._options.icon)this._options.icon="";if(!this._options.text)this._options.text="";if(void 0===this._options.extendedTooltip)this._options.extendedTooltip=false;if(!this._options.name)this._options.name=this.getId();if(void 0===this._options.validateIfHidden)this._options.validateIfHidden=false;if(!this._options.focusOnActivatedOnMobiles)this._options.focusOnActivatedOnMobiles=false;if(void 0===this._options.isRelativeTemplate)this._options.isRelativeTemplate=true;if(void 0===this._baseTabIndex)this._baseTabIndex=this._options.tabindex||0;if(void 0===this._options.tabindex)this._options.tabindex=-1;if(void 0===this._options.commandArgs)this._options.commandArgs=[];if("minHeight"in this._options===false)this._options.minHeight=0;if("minWidth"in this._options===false)this._options.minWidth=0;if("autoHeight"in this._options===false)this._options.autoHeight=true;if("autoWidth"in this._options===false)this._options.autoWidth=false;if(void 0===this._options.alwaysShowExtendedTooltip)this._options.alwaysShowExtendedTooltip=true;var t=(this._options["class"]?this._options["class"]+" ":"")+(this._options["className"]?this._options["className"]+" ":"")+(this._options["cssClassName"]?this._options["cssClassName"]+" ":"");this._options["class"]=t},isGoodContainer:function(){return this._container&&"function"===typeof this._container.attr&&this._container[0]&&!this._container[0].startTag},_repairingStep1:function(t){if(!this._options.name&&this._options.container&&this._options.container.getAttribute){var i=t.container.getAttribute("data-id");this._options.name=i,this._options.sbisname=i,this._options.id=t.id||i}if(this._id)this._options.id=this._id;else{if(!this._options.id)this._options.id=b("cnt-");this._id=this._options.id}},repairOptions:function(){if(this.__$config_back)this._options.__$config=this.__$config_back;this._repairingStep1(this._options),this.fixIcon(),this.initOptions(),this._initSeparatedTypeOptions(this._isSeparatedOptions)},deprecatedContr:function(t){if(this._subscriptions=this._subscriptions||[],this._subDestroyControls=this._subDestroyControls||[],!t.__$config)t.__$config=b("cfg-");if(this._decOptions=this._decOptions||{},!O.Attr.checkAttr(t)){if(t["class"]||t["className"])this._decOptions["class"]=(t["class"]?t["class"]+" ":"")+(t["className"]?t["className"]:"");if(t["style"])this._decOptions["style"]=t["style"];if(t["data-component"])this._decOptions["data-component"]=t["data-component"];if(t["__$config"])this._decOptions["config"]=t["__$config"]}var e=this.saveFullContext;if(this.saveFullContext=function t(i){e.call(this,i),this.__$$__fullContext=i},this._thisIsInstance=true,this._isSeparatedOptions=t._isSeparatedOptions,this._initFakeConstructor)this._initFakeConstructor();if(this._parent=null,this._compatContext=null,this._$independentContext=false,this._$contextRestriction="",this._$record=false,this._$modal=false,this._$validateIfHidden=false,this._$handleFocusCatch=false,this._$ignoreTabCycles=true,this._$groups={},this._$currentTemplate="",this._$isRelativeTemplate=false,this._$children=[],this._$_doGridCalculation=false,this._horizontalAlignment="Left",this._pending=[],this._pendingTrace=[],this._waiting=[],this._groupInstances={},this._activeChildControl=-1,this._activatedWithTabindex=true,this._childControls=[],this._childNonControls=[],this._childsMapName={},this._childsMapId={},this._childsMapNameCache={},this._childsMapIdCache={},this._childContainers=[],this._childsTabindex=false,this._childsSizes={},this._maxTabindex=0,this._keysWeHandle=[C.constants.key.tab,C.constants.key.enter],this._dChildReady=new c,this._dChildReady.done(),this._isInitialized=true,this._isReady=true,this._resizer=null,this._toolbarCount={top:0,right:0,bottom:0,left:0},this._defaultButton=null,this._activationIndex=0,this._opener=void 0,this._isModal=false,this._waitersByName={},this._waitersById={},this._onDestroyOpener=null,this._isInitComplete=false,this._prevEnabled=true,!t.__$config)t.__$config=b("cfg-"),this.__$config_back=t.__$config;var i=this.constructor,n=f.call(i);if(this._options=f.getInstanceOptionsByDefaults(i,t,{_options:this._options}),t.element&&t.element[0]){var s=t.element.attr("class");if(s)this._options.className=this._options.className?this._options.className+" "+s:s,this._decOptions.class=this._decOptions.class?this._decOptions.class+" "+s:s}if(this._handlers=this._handlers||(t&&t.handlers&&"object"==typeof t.handlers?h(t.handlers):{}),this._subscriptions=this._subscriptions||[],this._subDestroyControls=this._subDestroyControls||[],this._isDestroyed=false,this._childControls=[],this._childContainers=[],this._childsMapId={},this._childsMapName={},this._repairingStep1(t),this.childControls={},!this._children)this._children={};if(this._logicParent=this._options.logicParent||this._options.parent||this._options._logicParent,!this._options.logicParent&&!this._options.parent&&this._options._logicParent)this._$wasabyChild=true;if(this._logicParent&&this._logicParent._template){if(!this._logicParent.allChilds)this._logicParent.allChilds=[];this._logicParent.allChilds.push(this)}if(window)this._container=$(t.container||t.element||'[config="'+t.__$config+'"]');else this._container=t.container||t.element;if(this.fixIcon(),this.initOptions(),this._initSeparatedTypeOptions(t._isSeparatedOptions),this.applyOptions&&this.applyOptions(),this._applyOptions&&this._applyOptions(),this.publishEvents(),!C.constants.isBuildOnServer)this.initCompatibleFunc();if(this._keysWeHandle=l(this._keysWeHandle),this._isVisible=this._options.visible,C.constants.isBuildOnServer)this._compatContext=this._options.context||this._options.linkedContext||null;else{_.addWindow(this);var o=this._createContext(this._options);this._compatContext=o.context,this._allowEvents()}if(this._options.parent&&!this._options.doNotSetParent){if(this.setParent(this._options.parent),true===this._options.primary)this._registerDefaultButton()}else if(true===this._options.primary)this._needRegistWhenParent=true;var r=this._options._fromBootupMin&&this.isBuildVDom();if(this.isGoodContainer()&&"true"!==this._container.attr("hasMarkup")&&!r)this.render(true,this._decOptions);else this._onceRendered=true;if(!this._options.doNotSetParent&&!r)this.setContainer(this._container)},init:function(){},saveOptions:function(){if("undefined"!==typeof window&&window.$)this._container=$(this._container)},publishEvents:function(){this._publish("onInit","onInitComplete","onReady","onDestroy"),this._publish("onChange","onKeyPressed","onClick","onFocusIn","onFocusOut","onStateChanged","onTooltipContentRequest","onPropertyChanged","onPropertiesChanged","onCommandCatch"),this._publish("onResize","onActivate","onBeforeShow","onAfterShow","onBeforeLoad","onAfterLoad","onBeforeControlsLoad","onBatchFinished")},changeClass:function(t,i,e){var n,s;if(!t)n=[];else n=t.split(/\s+/);if(s=n.indexOf(i),e&&-1===s)n.push(i);else if(-1!==s)n.splice(s,1);else return n.join(" ");return n.join(" ")},initCompatibleFunc:function(){this._addClassCompatible=function(t){return this._options.class=this.changeClass(this._options.class,t,true),this._decOptions.class=this.changeClass(this._decOptions.class,t,true),w._setDirty.call(this),this._container}.bind(this),this._removeClassCompatible=function(t){return this._options.class=this.changeClass(this._options.class,t,false),this._decOptions.class=this.changeClass(this._decOptions.class,t,false),w._setDirty.call(this),this._container}.bind(this),this._mouseEnterCompatible=function(e){return this.subscribe("onMouseEnter",function(t,i){e({currentTarget:this._container})}),this._container}.bind(this),this._mouseLeaveCompatible=function(e){return this.subscribe("onMouseLeave",function(t,i){e({currentTarget:this._container})}),this._container}.bind(this),this._toggleClassCompatible=function(t,i){var e=this._options.class&&-1!==this._options.class.indexOf(t);if(!e&&false!==i)this._addClassCompatible(t);else if(e&&true!==i)this._removeClassCompatible(t);return this._container}.bind(this)},_addClassCompatible:null,_removeClassCompatible:null,_mouseEnterCompatible:null,_mouseLeaveCompatible:null,getContainer:function(){if(this._container=$(this._container),this.iWantVDOM&&this._container&&this._decOptions)this._container.mouseenter=this._mouseEnterCompatible,this._container.mouseleave=this._mouseLeaveCompatible,this._container.addClass=this._addClassCompatible,this._container.removeClass=this._removeClassCompatible,this._container.toggleClass=this._toggleClassCompatible;return this._container},setClassName:function(t){if(!this._options)this._options={};this._options["class"]=t,w._setDirty.call(this)},clearInformationOnParent:function(){delete this._parent._childControls[this._parent._childsMapId[this._options.id]],delete this._parent._childContainers[this._parent._childsMapId[this._options.id]],delete this._parent._childsMapId[this._options.id],delete this._parent._childsMapName[this._options.name],delete this._parent._childsTabindex[this._options.tabindex]},destroy:function(){if(this._parent&&this._parent._rebuildMarkupOrigin)this._parent.rebuildMarkup=this._parent._rebuildMarkupOrigin;if(this.allChilds)for(var t=0;t<this.allChilds.length;t++)if(!this.allChilds[t].isDestroyed())this.allChilds[t].destroy();if(this.allChilds=null,this._options.__$config){var i={};i[this._options.__$config]=void 0,p.merge(i)}if(this._compatContext)this._compatContext.destroy();if(this._invalidateParentCache(),n.destroy.call(this),s.destroy.call(this),this.isActive())this._isControlActive=false,this._notify("onFocusOut",true);if(this._isDestroyed=true,this._mounted)d.Synchronizer.unMountControlFromDOM(this,this._container);if(window&&this._container&&this._container[0])d.Synchronizer.cleanControlDomLink(this._container),this._container[0].wsControl=void 0;if(window&&this._container&&!this.__$destroyFromDirtyChecking)$(this._container).remove();if(o.deleteCommandsForObject(this),this._dChildReady=void 0,this._options.parent&&this._options.parent._childsMapId&&(0===this._options.parent._childsMapId[this._options.id]||this._options.parent._childsMapId[this._options.id]))this.clearInformationOnParent();if(this._parent){var e=this._parent._childContainers;if(e)this.cleanControlFromArray(e);if(e=this._parent._childControls)this.cleanControlFromArray(e);if(delete this._parent._childsMapId[this._options.id],this._options.name)delete this._parent._childsMapName[this._options.name];delete this._parent._childsTabindex[this._options.tabindex]}if(this._getEnvironment()&&this._container&&this._container[0]===this._getEnvironment()._rootDOMNode&&this._getEnvironment()._canDestroy(this))this._getEnvironment().destroy()},cleanControlFromArray:function(t){for(var i=0;i<t.length;i++)if(t[i]===this){delete t[i];break}},setEnabled:function(t){if(void 0===this._options.allowChangeEnable)this._options.allowChangeEnable=true;if(false===this._options.allowChangeEnable)return;if(this._doNotSetDirty)e.setEnabled.apply(this,arguments),this._childControls.forEach(this._setupChildByAreaEnabled,this);else{var i=this._options.enabled;if(this._options.enabled=t,this._options.enabled!==i)w._setDirty.call(this)}this._prevEnabled=true},_setEnabled:function(t){if(this._doNotSetDirty)e._setEnabled.apply(this,arguments);else this.setEnabled(t)},isVisible:function(){return void 0===this._options.visible?true:this._options.visible},setVisible:function(t){var i=this._options.visible;if(this._options.visible=t,this._doNotSetDirty)e._setVisibility.call(this,t);else if(i!==this._options.visible)w._setDirty.call(this);if(!this._doNotSetDirty)this._notify("onAfterVisibilityChange",t)},_setVisibility:function(t){this.setVisible(t)},setCaption:function(t){var i=this._options.caption;if(this._options.caption=t||"",this._options.caption!==i)w._setDirty.call(this)},setIcon:function(t){var i=this.getIcon();if(this._options.icon=t,this.fixIcon(),i!==this.getIcon())w._setDirty.call(this)},_getInternalOption:function(t){return this._options[t]},_setInternalOption:function(t,i){if(-1===t.toString().indexOf("__dirtyCheckingVars_"))this._options[t]=i},_setInternalOptions:function(t){if(void 0===this._logicParent||this._$wasabyChild){var i=this._logicParent&&this._logicParent.allChilds||[],e=t.logicParent||t.parent||this._logicParent;if(this._logicParent===e)i=[];else this._logicParent=e;if(this._logicParent&&!this._logicParent.allChilds&&this._logicParent._template)this._logicParent.allChilds=[];if(this._logicParent&&this._logicParent.allChilds)this._logicParent.allChilds=this._logicParent.allChilds.concat(i);if(t.parent&&!this._options.doNotSetParent){if(this.setParent(t.parent),true===this._options.primary)this._registerDefaultButton()}else if(true===this._options.primary)this._needRegistWhenParent=true}},_setDirty:function(){if(this._onceRendered&&!this.iWantVDOM)this.render(true);if(this.iWantVDOM)if(this._mounted)this._forceUpdate()},setPrimary:function(t){var i=this._options.primary;if(this._options.primary=!!t,this._options.primary!==i)w._setDirty.call(this)},isPrimary:function(){return this._options.primary},_registerToParent:function(t){if(!t._childControls)return;var i=t._childControls.length,e=this.getId(),n=this.getTabindex();if("number"!==typeof t._childsMapId[e]){if(false!==t._doNotSetDirty){var s=this,o=function(t,i){if(void 0===s._options.visible)s.setVisible(i),s._options.visible=void 0;else s._notify("onAfterVisibilityChange",i)};t.subscribe("onAfterVisibilityChange",o),s.subscribe("onDestroy",function(){t.unsubscribe("onAfterVisibilityChange",o)})}if(n&&!t.iWantVDOM){var r=parseInt(n,10);if(-1==r||void 0!==t._childsTabindex[r])r=t._maxTabindex+1,this.setTabindex(r,true);if(r>0){if(t._maxTabindex=Math.max(t._maxTabindex,r),!t._childsTabindex)t._childsTabindex={};t._childsTabindex[r]=i}}t._childsMapId[this.getId()]=i,t._childsMapName[this.getName()]=i,t._childControls.push(this),t._childContainers.push(this),this._notifyToParentAboutChild(this);for(var a=this.getChildControls(),h=0;h<a.length;h++)if(a[h])this._notifyToParentAboutChild(a[h])}if(this._logicParent.registerToChildMap)this._logicParent.registerToChildMap(this)},_notifyToParentAboutChild:function(t){var i=this.getParent();while(i)i._checkWaiters(t),i=i.getParent()},recalcSelfTabindex:function(){if(this._parent&&void 0===this._baseTabIndex&&!this.iWantVDOM)this.clearInformationOnParent(),this._options.tabindex=this._baseTabIndex,this._registerToParent(this._parent)},getParent:function(){return this._parent||this._options.parent||null},registerToChildMap:function(t){var i=this;if(i._children[t.getName()]=t,!C.constants.isBuildOnServer)t.once("onDestroy",function(){delete i._children[t.getName()]})},finalRegToParent:function(){this._registerToParent(this._parent);var t=this.getTopParent();if(t)if(t.isReady())this.getOwner(true);else if(!C.constants.isBuildOnServer)t.subscribe("onReady",r(this.getOwner,this))},_publish:function(){if(!C.constants.isBuildOnServer)s._publish.apply(this,arguments)},setNewRebuildMarkup:function(){if(this._parent&&this._parent.rebuildMarkup){this._parent._rebuildMarkupOrigin=this._parent.rebuildMarkup;var t=this;this._parent.rebuildMarkup=function(){t.destroy(),t._parent._rebuildMarkupOrigin.apply(t._parent,arguments)}}},setParent:function(t){if(void 0===this._options.allowChangeEnable)this._options.allowChangeEnable=true;if(!this._parent&&false!==this._options.allowChangeEnable&&void 0!==this._options.parentEnabled&&t&&(!this.isEnabled||this.isEnabled())===this._options.parentEnabled)this._options.enabled=!!t.isEnabled&&!t.isEnabled(),this.setEnabled(!t.isEnabled||t.isEnabled());if(this._parent&&this._parent._rebuildMarkupOrigin)this._parent.rebuildMarkup=this._parent._rebuildMarkupOrigin;if(this._options.parent=t,this._parent=t,this._logicParent=this._logicParent||t,this.setNewRebuildMarkup(),false!==this._options.allowChangeEnable&&this._parent&&!!this._parent.isEnabled&&!this._parent.isEnabled()&&!this._parent._template)this._options.enabled=true,this.setEnabled(false);if(this.setContainer(this._container),this._parent)this.finalRegToParent();if(this._needRegistWhenParent){if(this._needRegistWhenParent=false,i.instanceOfModule(t,"Lib/Control/SwitchableArea/SwitchableAreaItem"))t._shouldRegisterButton=this;this._registerDefaultButton()}},setTooltip:function(t){var i=this._options.tooltip;if(this._options.tooltip=t,this._doNotSetDirty)this.getContainer().attr("title",this._options.tooltip);else if(i!==this._options.tooltip)w._setDirty.call(this)},getCaption:function(){return this._options.caption},getIcon:function(){return this._options.icon?"sprite:"+this._options.icon:this._options.icon},_applyChangedOptions:function(i){Object.getOwnPropertyNames(i).forEach(function(t){this._options[t]=i[t]},this)},_getOption:function(t){if("enabled"===t)if(void 0===this._options.enabled)return false!==this._getInternalOption("parentEnabled");else return this._options.enabled;else if("visible"===t)if(void 0===this._options.visible)return this._options.parentVisible;else return this._options.visible;if(s._hasOption.call(this,t))return s._getOption.call(this,t)},_setOption:function(t,i,e){if("enabled"===t||"visible"===t)return void(this._options[t]=i);return s._setOption.call(this,t,i,e)},_restoreSize:function(){},_needResizer:function(){return false},_notify:function(){s._notify.apply(this,arguments)},_keyboardHover:function(t){if(!this.iWantVDOM)return this._oldKeyboardHover.apply(this,arguments);if(t.which in this._keysWeHandle)if(t.which==C.constants.key.enter)if(!(t.altKey||t.shiftKey)&&(t.ctrlKey||t.metaKey)){if(!this._defaultAction)return true;return this._defaultAction(t)}return true},activateFirstControl:function(t){if(!t||!O.Focus.closest(document.activeElement,this._container[0]))return this._oldActivateFirstControl.apply(this,arguments)},activateLastControl:function(t){if(!t||!O.Focus.closest(document.activeElement,this._container[0]))return this._oldActivateLastControl.apply(this,arguments)},detectNextActiveChildControl:function(t,i,e){function n(t){while(t){var i=t._getEnvironment();if(i)return i;t=t._logicParent}if(C.constants.compat)throw new Error("environment не был найден среди предков")}if(!this.iWantVDOM)return this._oldDetectNextActiveChildControl.apply(this,arguments);var s;if(false===t&&-1===i)s=this._container[0];else if(true===t&&i===(this._maxTabindex>0?this._maxTabindex+1:this._childControls.length))s=this._container[0];else s=document.activeElement;var o=false,r=n(this);if(!r)return true;var a=r._rootDOMNode,h=d.TabIndex.getElementProps,l=d.TabIndex.findWithContexts(a,s,t,h);if(l){var _=t?"vdom-focus-out":"vdom-focus-in",c=t?"vdom-focus-in":"vdom-focus-out";if(l.classList.contains(_))l=d.TabIndex.findWithContexts(a,l,t,h);if(l.classList.contains(c))l=null}if(r._isTabPressed={isShiftKey:t},setTimeout(function(){r._isTabPressed=null},0),l)if(l.wsControl&&l.wsControl.setActive&&l!==a)l.wsControl.setActive(true,void 0,e),o=true;else{if(!e)$(l).focus();o=true}return o},_isCanShowExtendedTooltip:function(){return false}}});