'),this.$transition=$('
'),this.$loading=null,this.$outer.append(this.$container),this.$container.append(this.$transition),
this._canOrientTabs=!0,this._events={},this._root=null,this._frameList=[],this._floatingList=[],this._modalList=[],this._persistentList=[],this._focusFrame=null,this._placeholderPanel=null,this._contextTimer=0,this._dirty=!1,this._dirtyDontMove=!1,this._splitterList=[],this._tabList=[],this._collapser={},this._dockPanelTypeList=[],this._creatingPanel=!1,this._draggingSplitter=null,this._draggingFrame=null,this._draggingFrameSizer=null,this._draggingFrameTab=null,this._draggingFrameTopper=!1,this._draggingCustomTabFrame=null,this._ghost=null,this._menuTimer=0,this._mouseOrigin={x:0,y:0},this._resizeData={time:-1,timeout:!1,delta:150};var a={themePath:"Themes",theme:"default",loadingClass:"fa fa-spinner fa-pulse",allowContextMenu:!0,hideOnResize:!1,allowCollapse:!0,responseRate:10,moveStartDelay:300,edgeAnchorSize:50,panelAnchorSize:"15%",detachToWidth:"50%",detachToHeight:"50%"};this._options={};for(var r in f)a[r+"Class"]=f[r];for(var r in a)this._options[r]=a[r];for(var r in e)this._options[r]=e[r];this.__init()},themePath:function(t){return void 0!==t&&(this._options.themePath=t),this._options.themePath},theme:function(t){if(void 0!==t){var e=$("#wcTheme"),a=(new Date).getTime(),r=t.indexOf(".css");r>-1&&(t=t.substring(0,r));var o=$('');this._options.theme=t;var i=this;o[0].onload=function(){e.remove(),i.__update()},$("head").append(o)}return this._options.theme},isCollapseEnabled:function(){return this._canOrientTabs&&this._options.allowCollapse},registerPanelType:function(t,e,a){var r=e;"function"==typeof r&&(r={onCreate:e},console.log("WARNING: Passing in the creation function directly to wcDocker.registerPanelType parameter 2 is now deprecated and will be removed in the next version! Please use the preferred options object instead.")),"undefined"!=typeof a&&(r.isPrivate=a,console.log("WARNING: Passing in the isPrivate flag to wcDocker.registerPanelType parameter 3 is now deprecated and will be removed in the next version! Please use the preferred options object instead.")),$.isEmptyObject(r)&&(r=null);for(var o=0;o')),!0},panelTypes:function(t){for(var e=[],a=0;a=d&&h._curTab--,t.__container(this.$transition),t._parent=null,h._panelList.splice(d,1);break}if(!h.isCollapser()&&-1===h._curTab&&h._panelList.length&&(h._curTab=0),h.__updateTabs(),h.collapse(),!h.isCollapser()&&0===h._panelList.length)if(i)this.__addPlaceholder(h);else{var f=this._floatingList.indexOf(h);-1!==f&&this._floatingList.splice(f,1),f=this._frameList.indexOf(h),-1!==f&&this._frameList.splice(f,1);var p=h._parent;if(p&&p.instanceOf("wcSplitter")){p.__removeChild(h);var b;p.pane(0)?(b=p.pane(0),p._pane[0]=null):(b=p.pane(1),p._pane[1]=null),r===p&&(r._shift=b),b.__container(this.$transition),b._parent=null,f=this._splitterList.indexOf(p),-1!==f&&this._splitterList.splice(f,1);var _=p._parent;parentContainer=p.__container(),p.__destroy(),_&&_.instanceOf("wcSplitter")?(_.__removeChild(p),_.pane(0)?_.pane(1,b):_.pane(0,b)):_===this&&(this._root=b,b._parent=this,b.__container(parentContainer)),this.__update()}this._focusFrame===h&&(this._focusFrame=null),h.__destroy()}}t.initSize(l,c),a===e.DOCK.STACKED?this.__addPanelGrouped(t,r,o):this.__addPanelAlone(t,a,r,o),r==this._placeholderPanel&&(this.removePanel(this._placeholderPanel),this._placeholderPanel=null);var v=t._parent;return v&&v.instanceOf("wcFrame")&&1===v._panelList.length&&v.pos(s.left+l/2+20,s.top+c/2+20,!0),this.__update(!0),v&&v.instanceOf("wcFrame")&&u!==v._isFloating&&(v._isFloating?t.__trigger(e.EVENT.DETACHED):t.__trigger(e.EVENT.ATTACHED)),t.__trigger(e.EVENT.MOVED),t},findPanels:function(t){for(var e=[],a=0;a
'),this.$outer.append(this.$loading);var r=$('
');"number"!=typeof e&&(e=.4),r.css("opacity",e),this.$loading.append(r);var o=$('
');if(this.$loading.append(o),t){var i=$('
'+t+"");this.$loading.append(i)}"number"!=typeof a&&(a=1),o.css("opacity",a),i&&i.css("opacity",a)}},finishLoading:function(t){if(this.$loading)if(t>0){var e=this;this.$loading.fadeOut(t,function(){e.$loading.remove(),e.$loading=null})}else this.$loading.remove(),this.$loading=null},on:function(t,e){return t?(this._events[t]||(this._events[t]=[]),-1!==this._events[t].indexOf(e)?!1:(this._events[t].push(e),!0)):!1},off:function(t,e){if("undefined"==typeof t)this._events={};else if(this._events[t])if("undefined"==typeof e)this._events[t]=[];else for(var a=0;a
0&&o.findPanels(d.name).length>=d.options.limit)continue;var f=null,p=null,b=d.name;d.options&&(d.options.faicon&&(p=d.options.faicon),d.options.icon&&(f=d.options.icon),d.options.title&&(b=d.options.title)),u[d.name]={name:b,icon:f,faicon:p,className:"wcMenuCreatePanel"}}}var _=0,v={},m=a;"function"==typeof a&&(m=a(t,i));for(var l=0;l