text: /**
   * skylark-widgets-tabs - The skylark tabs widgets library
   * @author Hudaokeji, Inc.
   * @version v0.9.0
   * @link https://github.com/skylark-widgets/skylark-widgets-tabs/
   * @license MIT
   */
  define(["skylark-devices-points/mouse","skylark-widgets-base/dnd/drag-buffer","skylark-widgets-base/widget","../tabs","../tab-element","../tab-group"],function(t,e,s,i,o,l){"use strict";var n=s.inherit({klassName:"TabButtonSplit",_construct:function(i,a){s.prototype._construct.call(this,i,"div");var r=this;this._elm.draggable=!0,this._elm.style.cursor="pointer",this._elm.style.boxSizing="border-box";var h=this.getSkin();this._elm.style.backgroundColor=h.buttonColor,this.tab=a,this.icon=document.createElement("img"),this.icon.style.pointerEvents="none",this.icon.style.position="absolute",this.icon.src=a.icon,this._elm.appendChild(this.icon),this.text=document.createElement("div"),this.text.style.position="absolute",this.text.style.overflow="hidden",this.text.style.textAlign="center",this.text.style.pointerEvents="none",this.text.style.textOverflow="ellipsis",this.text.style.whiteSpace="nowrap",this.text.style.color=Editor.theme.textColor,this._elm.appendChild(this.text),this.title=document.createTextNode(a.title),this.text.appendChild(this.title),this.close=document.createElement("img"),this.close.draggable=!1,this.close.style.position="absolute",this.close.style.opacity=.5,this.close.style.display=a.closeable?"block":"none",this.close.src=Global.FILE_PATH+"icons/misc/close.png",this._elm.appendChild(this.close),this.close.onmouseenter=function(){this.style.opacity=1},this.close.onmouseleave=function(){this.style.opacity=.5},this.close.onclick=function(){r.tab.close()};var c=n.NONE;this._elm.ondragstart=function(t){t.dataTransfer.setData("uuid",r.tab.uuid),e.push(r.tab),t.dataTransfer.setData("tab",r.tab.index),c=n.NONE},this._elm.ondrop=function(t){t.preventDefault(),this.style.borderLeft=null,this.style.borderRight=null,this.style.borderBottom=null,this.style.borderTop=null;var s=t.dataTransfer.getData("uuid"),i=e.get(s);if(i instanceof o)if(i.container===r.tab.container){var l=t.dataTransfer.getData("tab");(l=parseInt(l))!==r.tab.index&&(c===n.PREVIOUS?r.tab.container.moveTabIndex(l,l<r.tab.index?r.tab.index-1:r.tab.index):c===n.NEXT&&r.tab.container.moveTabIndex(l,l<r.tab.index?r.tab.index:r.tab.index+1),e.pop(s))}else c===n.PREVIOUS?r.tab.container.attachTab(i,r.tab.index):c===n.NEXT&&r.tab.container.attachTab(i,r.tab.index+1),e.pop(s)},this._elm.ondragover=function(t){r.tab.container.placement===l.TOP||r.tab.container.placement===l.BOTTOM?t.layerX>.8*r.size.x||t.target!==this?c!==n.NEXT&&(c=n.NEXT,this.style.borderLeft=null,this.style.borderRight="thick solid #999999"):t.layerX<.2*r.size.x?c!==n.PREVIOUS&&(c=n.PREVIOUS,this.style.borderRight=null,this.style.borderLeft="thick solid #999999"):c!==n.NONE&&(c=n.NONE,this.style.borderLeft=null,this.style.borderRight=null):t.layerY>.7*r.size.y||t.target!==this?c!==n.NEXT&&(c=n.NEXT,this.style.borderTop=null,this.style.borderBottom="solid #999999"):t.layerY<.3*r.size.y?c!==n.PREVIOUS&&(c=n.PREVIOUS,this.style.borderBottom=null,this.style.borderTop="solid #999999"):c!==n.NONE&&(c=n.NONE,this.style.borderBottom=null,this.style.borderTop=null)},this._elm.ondragend=function(t){t.preventDefault(),e.pop(r.tab.uuid),c=n.NONE,this.style.borderLeft=null,this.style.borderRight=null,this.style.borderBottom=null,this.style.borderTop=null},this._elm.ondragleave=function(t){t.preventDefault(),c=n.NONE,this.style.borderLeft=null,this.style.borderRight=null,this.style.borderBottom=null,this.style.borderTop=null},this._elm.onmousedown=function(e){e.which;t.isLeftMouseButton(e)?r.tab.container.selectTab(r.tab):a.closeable&&t.isMiddleMouseButton(e)&&r.tab.container.removeTab(r.tab)},this._elm.onmouseenter=function(){this.style.backgroundColor=h.buttonOverColor},this._elm.onmouseleave=function(){a.isSelected()?this.style.backgroundColor=h.buttonOverColor:this.style.backgroundColor=h.buttonColor}},setIcon:function(t){this.tab.icon=t,this.icon.src=t},setName:function(t){this.tab.title=t,this.title.data=t},updateSelection:function(){var t=this.getSkin();this._elm.style.backgroundColor=this.tab.isSelected()?t.buttonOverColor:t.buttonColor},updateSize:function(){s.prototype.updateSize.call(this),this.icon.style.top=.2*this.size.y+"px",this.icon.style.left=.2*this.size.y+"px",this.icon.style.width=.6*this.size.y+"px",this.icon.style.height=.6*this.size.y+"px",this.text.style.left=this.size.y+"px",this.text.style.top=(this.size.y-12)/2+"px",this.text.style.width=this.size.x-2*this.size.y+"px",this.text.style.height=this.size.y+"px",!0===this.tab.closeable?(this.close.style.width=.4*this.size.y+"px",this.close.style.height=.4*this.size.y+"px",this.close.style.top=.3*this.size.y+"px",this.close.style.right=.3*this.size.y+"px",this.close.style.display="block"):this.close.style.display="none",this.updateSelection()}});return n.NONE=0,n.PREVIOUS=1,n.NEXT=2,i.splittable.TabButtonSplit=n});
  //# sourceMappingURL=../sourcemaps/splittable/tab-button-split.js.map
  