Schäfer Tapeten GmbH - DESIGN STUDIO (2023)

",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu});this.menuWrap=$("

").append(this.menu);this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front");this.menuWrap.appendTo(this._appendTo());this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(event,ui){event.preventDefault();that._setSelection();that._select(ui.item.data("ui-selectmenu-item"),event)},focus:function(event,ui){var item=ui.item.data("ui-selectmenu-item");if(that.focusIndex!=null&&item.index!==that.focusIndex){that._trigger("focus",event,{item:item});if(!that.isOpen){that._select(item,event)}}that.focusIndex=item.index;that.button.attr("aria-activedescendant",that.menuItems.eq(item.index).attr("id"))}}).menu("instance");this.menuInstance._off(this.menu,"mouseleave");this.menuInstance._closeOnDocumentClick=function(){return!1};this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu();this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{}));if(this.options.width===null){this._resizeButton()}},_refreshMenu:function(){var item,options=this.element.find("option");this.menu.empty();this._parseOptions(options);this._renderMenu(this.menu,this.items);this.menuInstance.refresh();this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper");this._rendered=!0;if(!options.length){return}item=this._getSelectedItem();this.menuInstance.focus(null,item);this._setAria(item.data("ui-selectmenu-item"));this._setOption("disabled",this.element.prop("disabled"))},open:function(event){if(this.options.disabled){return}if(!this._rendered){this._refreshMenu()}else{this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active");this.menuInstance.focus(null,this._getSelectedItem())}if(!this.menuItems.length){return}this.isOpen=!0;this._toggleAttr();this._resizeMenu();this._position();this._on(this.document,this._documentClick);this._trigger("open",event)},_position:function(){this.menuWrap.position($.extend({of:this.button},this.options.position))},close:function(event){if(!this.isOpen){return}this.isOpen=!1;this._toggleAttr();this.range=null;this._off(this.document);this._trigger("close",event)},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(item){var buttonItem=$("");this._setText(buttonItem,item.label);this._addClass(buttonItem,"ui-selectmenu-text");return buttonItem},_renderMenu:function(ul,items){var that=this,currentOptgroup="";$.each(items,function(index,item){var li;if(item.optgroup!==currentOptgroup){li=$("

  • ",{text:item.optgroup});that._addClass(li,"ui-selectmenu-optgroup","ui-menu-divider"+(item.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""));li.appendTo(ul);currentOptgroup=item.optgroup}that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-selectmenu-item",item)},_renderItem:function(ul,item){var li=$("
  • "),wrapper=$("

    ",{title:item.element.attr("title")});if(item.disabled){this._addClass(li,null,"ui-state-disabled")}this._setText(wrapper,item.label);return li.append(wrapper).appendTo(ul)},_setText:function(element,value){if(value){element.text(value)}else{element.html("")}},_move:function(direction,event){var item,next,filter=".ui-menu-item";if(this.isOpen){item=this.menuItems.eq(this.focusIndex).parent("li")}else{item=this.menuItems.eq(this.element[0].selectedIndex).parent("li");filter+=":not(.ui-state-disabled)"}if(direction==="first"||direction==="last"){next=item[direction==="first"?"prevAll":"nextAll"](filter).eq(-1)}else{next=item[direction+"All"](filter).eq(0)}if(next.length){this.menuInstance.focus(event,next)}},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(event){this[this.isOpen?"close":"open"](event)},_setSelection:function(){var selection;if(!this.range){return}if(window.getSelection){selection=window.getSelection();selection.removeAllRanges();selection.addRange(this.range)}else{this.range.select()}this.button.focus()},_documentClick:{mousedown:function(event){if(!this.isOpen){return}if(!$(event.target).closest(".ui-selectmenu-menu, #"+$.ui.escapeSelector(this.ids.button)).length){this.close(event)}}},_buttonEvents:{mousedown:function(){var selection;if(window.getSelection){selection=window.getSelection();if(selection.rangeCount){this.range=selection.getRangeAt(0)}}else{this.range=document.selection.createRange()}},click:function(event){this._setSelection();this._toggle(event)},keydown:function(event){var preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.TAB:case $.ui.keyCode.ESCAPE:this.close(event);preventDefault=!1;break;case $.ui.keyCode.ENTER:if(this.isOpen){this._selectFocusedItem(event)}break;case $.ui.keyCode.UP:if(event.altKey){this._toggle(event)}else{this._move("prev",event)}break;case $.ui.keyCode.DOWN:if(event.altKey){this._toggle(event)}else{this._move("next",event)}break;case $.ui.keyCode.SPACE:if(this.isOpen){this._selectFocusedItem(event)}else{this._toggle(event)}break;case $.ui.keyCode.LEFT:this._move("prev",event);break;case $.ui.keyCode.RIGHT:this._move("next",event);break;case $.ui.keyCode.HOME:case $.ui.keyCode.PAGE_UP:this._move("first",event);break;case $.ui.keyCode.END:case $.ui.keyCode.PAGE_DOWN:this._move("last",event);break;default:this.menu.trigger(event);preventDefault=!1}if(preventDefault){event.preventDefault()}}},_selectFocusedItem:function(event){var item=this.menuItems.eq(this.focusIndex).parent("li");if(!item.hasClass("ui-state-disabled")){this._select(item.data("ui-selectmenu-item"),event)}},_select:function(item,event){var oldIndex=this.element[0].selectedIndex;this.element[0].selectedIndex=item.index;this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item));this._setAria(item);this._trigger("select",event,{item:item});if(item.index!==oldIndex){this._trigger("change",event,{item:item})}this.close(event)},_setAria:function(item){var id=this.menuItems.eq(item.index).attr("id");this.button.attr({"aria-labelledby":id,"aria-activedescendant":id});this.menu.attr("aria-activedescendant",id)},_setOption:function(key,value){if(key==="icons"){var icon=this.button.find("span.ui-icon");this._removeClass(icon,null,this.options.icons.button)._addClass(icon,null,value.button)}this._super(key,value);if(key==="appendTo"){this.menuWrap.appendTo(this._appendTo())}if(key==="width"){this._resizeButton()}},_setOptionDisabled:function(value){this._super(value);this.menuInstance.option("disabled",value);this.button.attr("aria-disabled",value);this._toggleClass(this.button,null,"ui-state-disabled",value);this.element.prop("disabled",value);if(value){this.button.attr("tabindex",-1);this.close()}else{this.button.attr("tabindex",0)}},_appendTo:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)}if(!element||!element[0]){element=this.element.closest(".ui-front, dialog")}if(!element.length){element=this.document[0].body}return element},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen);this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen);this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var width=this.options.width;if(width===!1){this.button.css("width","");return}if(width===null){width=this.element.show().outerWidth();this.element.hide()}this.button.outerWidth(width)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var options=this._super();options.disabled=this.element.prop("disabled");return options},_parseOptions:function(options){var that=this,data=[];options.each(function(index,item){data.push(that._parseOption($(item),index))});this.items=data},_parseOption:function(option,index){var optgroup=option.parent("optgroup");return{element:option,index:index,value:option.val(),label:option.text(),optgroup:optgroup.attr("label")||"",disabled:optgroup.prop("disabled")||option.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler();this.menuWrap.remove();this.button.remove();this.element.show();this.element.removeUniqueId();this.labels.attr("for",this.ids.element)}}]);/*! * jQuery UI Slider 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */var widgetsSlider=$.widget("ui.slider",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1;this._mouseSliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content");this._refresh();this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle"),handle="",handles=[];handleCount=(options.values&&options.values.length)||1;if(existingHandles.length>handleCount){existingHandles.slice(handleCount).remove();existingHandles=existingHandles.slice(0,handleCount)}for(i=existingHandles.length;i

    ").appendTo(this.element);this._addClass(this.range,"ui-slider-range")}else{this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max");this.range.css({"left":"","bottom":""})}if(options.range==="min"||options.range==="max"){this._addClass(this.range,"ui-slider-range-"+options.range)}}else{if(this.range){this.range.remove()}this.range=null}},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();if(this.range){this.range.remove()}this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;if(o.disabled){return!1}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);distance=this._valueMax()-this._valueMin()+1;this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));if((distance>thisDistance)||(distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))){distance=thisDistance;closestHandle=$(this);index=i}});allowed=this._start(event,index);if(allowed===!1){return!1}this._mouseSliding=!0;this._handleIndex=index;this._addClass(closestHandle,null,"ui-state-active");closestHandle.trigger("focus");offset=closestHandle.offset();mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(event,index,normValue)}this._animateOff=!0;return!0},_mouseStart:function(){return!0},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return!1},_mouseStop:function(event){this._removeClass(this.handles,null,"ui-state-active");this._mouseSliding=!1;this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=!1;return!1},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this._valueMax()-this._valueMin();valueMouse=this._valueMin()+percentMouse*valueTotal;return this._trimAlignValue(valueMouse)},_uiHash:function(index,value,values){var uiHash={handle:this.handles[index],handleIndex:index,value:value!==undefined?value:this.value()};if(this._hasMultipleValues()){uiHash.value=value!==undefined?value:this.values(index);uiHash.values=values||this.values()}return uiHash},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(event,index){return this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var allowed,otherVal,currentValue=this.value(),newValues=this.values();if(this._hasMultipleValues()){otherVal=this.values(index?0:1);currentValue=this.values(index);if(this.options.values.length===2&&this.options.range===!0){newVal=index===0?Math.min(otherVal,newVal):Math.max(otherVal,newVal)}newValues[index]=newVal}if(newVal===currentValue){return}allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));if(allowed===!1){return}if(this._hasMultipleValues()){this.values(index,newVal)}else{this.value(newVal)}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){this._lastChangedValue=index;this._trigger("change",event,this._uiHash(index))}},value:function(newValue){if(arguments.length){this.options.value=this._trimAlignValue(newValue);this._refreshValue();this._change(null,0);return}return this._value()},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1){this.options.values[index]=this._trimAlignValue(newValue);this._refreshValue();this._change(null,index);return}if(arguments.length){if($.isArray(arguments[0])){vals=this.options.values;newValues=arguments[0];for(i=0;i=0;i--){this._change(null,i)}this._animateOff=!1;break;case "step":case "min":case "max":this._animateOff=!0;this._calculateNewMax();this._refreshValue();this._animateOff=!1;break;case "range":this._animateOff=!0;this._refresh();this._animateOff=!1;break}},_setOptionDisabled:function(value){this._super(value);this._toggleClass(null,"ui-state-disabled",!!value)},_value:function(){var val=this.options.value;val=this._trimAlignValue(val);return val},_values:function(index){var val,vals,i;if(arguments.length){val=this.options.values[index];val=this._trimAlignValue(val);return val}else if(this._hasMultipleValues()){vals=this.options.values.slice();for(i=0;i=this._valueMax()){return this._valueMax()}var step=(this.options.step>0)?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=(valModStep>0)?step:(-step)}return parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var max=this.options.max,min=this._valueMin(),step=this.options.step,aboveMin=Math.round((max-min)/step)*step;max=aboveMin+min;if(max>this.options.max){max-=step}this.max=parseFloat(max.toFixed(this._precision()))},_precision:function(){var precision=this._precisionOf(this.options.step);if(this.options.min!==null){precision=Math.max(precision,this._precisionOf(this.options.min))}return precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(orientation){if(orientation==="vertical"){this.range.css({"width":"","left":""})}if(orientation==="horizontal"){this.range.css({"height":"","bottom":""})}},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=(!this._animateOff)?o.animate:!1,_set={};if(this._hasMultipleValues()){this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100;_set[that.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(that.options.range===!0){if(that.orientation==="horizontal"){if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:!1,duration:o.animate})}}else{if(i===0){that.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate)}if(i===1){that.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:!1,duration:o.animate})}}}lastValPercent=valPercent})}else{value=this.value();valueMin=this._valueMin();valueMax=this._valueMax();valPercent=(valueMax!==valueMin)?(value-valueMin)/(valueMax-valueMin)*100:0;_set[this.orientation==="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);if(oRange==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="horizontal"){this.range.stop(1,1)[animate?"animate":"css"]({width:(100-valPercent)+"%"},o.animate)}if(oRange==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate)}if(oRange==="max"&&this.orientation==="vertical"){this.range.stop(1,1)[animate?"animate":"css"]({height:(100-valPercent)+"%"},o.animate)}}},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:event.preventDefault();if(!this._keySliding){this._keySliding=!0;this._addClass($(event.target),null,"ui-state-active");allowed=this._start(event,index);if(allowed===!1){return}}break}step=this.options.step;if(this._hasMultipleValues()){curVal=newVal=this.values(index)}else{curVal=newVal=this.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+((this._valueMax()-this._valueMin())/this.numPages));break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-((this._valueMax()-this._valueMin())/this.numPages));break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax()){return}newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin()){return}newVal=this._trimAlignValue(curVal-step);break}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=!1;this._stop(event,index);this._change(event,index);this._removeClass($(event.target),null,"ui-state-active")}}}});/*! * jQuery UI Sortable 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */var widgetsSortable=$.widget("ui.sortable",$.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(x,reference,size){return(x>=reference)&&(x<(reference+size))},_isFloating:function(item){return(/left|right/).test(item.css("float"))||(/inline|table-cell/).test(item.css("display"))},_create:function(){this.containerCache={};this._addClass("ui-sortable");this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=!0},_setOption:function(key,value){this._super(key,value);if(key==="handle"){this._setHandleClassName()}},_setHandleClassName:function(){var that=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");$.each(this.items,function(){that._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData(this.widgetName+"-item")}return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=!1,that=this;if(this.reverting){return!1}if(this.options.disabled||this.options.type==="static"){return!1}this._refreshItems(event);$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that){currentItem=$(this);return!1}});if($.data(event.target,that.widgetName+"-item")===that){currentItem=$(event.target)}if(!currentItem){return!1}if(this.options.handle&&!overrideHandle){$(this.options.handle,currentItem).find("*").addBack().each(function(){if(this===event.target){validHandle=!0}});if(!validHandle){return!1}}this.currentItem=currentItem;this._removeCurrentsFromItems();return!0},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor&&o.cursor!=="auto"){body=this.document.find("body");this.storedCursor=body.css("cursor");body.css("cursor",o.cursor);this.storedStylesheet=$("" ).appendTo( body );}if ( o.opacity ) { // opacity optionif ( this.helper.css( "opacity" ) ) {this._storedOpacity = this.helper.css( "opacity" );}this.helper.css( "opacity", o.opacity );}if ( o.zIndex ) { // zIndex optionif ( this.helper.css( "zIndex" ) ) {this._storedZIndex = this.helper.css( "zIndex" );}this.helper.css( "zIndex", o.zIndex );}//Prepare scrollingif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&this.scrollParent[ 0 ].tagName !== "HTML" ) {this.overflowOffset = this.scrollParent.offset();}//Call callbacksthis._trigger( "start", event, this._uiHash() );//Recache the helper sizeif ( !this._preserveHelperProportions ) {this._cacheHelperProportions();}//Post "activate" events to possible containersif ( !noActivation ) {for ( i = this.containers.length - 1; i >= 0; i-- ) {this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );}}//Prepare possible droppablesif ( $.ui.ddmanager ) {$.ui.ddmanager.current = this;}if ( $.ui.ddmanager && !o.dropBehaviour ) {$.ui.ddmanager.prepareOffsets( this, event );}this.dragging = true;this._addClass( this.helper, "ui-sortable-helper" );// Execute the drag once - this causes the helper not to be visiblebefore getting its// correct positionthis._mouseDrag( event );return true;},_mouseDrag: function( event ) {var i, item, itemElement, intersection,o = this.options,scrolled = false;//Compute the helpers positionthis.position = this._generatePosition( event );this.positionAbs = this._convertPositionTo( "absolute" );if ( !this.lastPositionAbs ) {this.lastPositionAbs = this.positionAbs;}//Do scrollingif ( this.options.scroll ) {if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&this.scrollParent[ 0 ].tagName !== "HTML" ) {if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -event.pageY < o.scrollSensitivity ) {this.scrollParent[ 0 ].scrollTop =scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {this.scrollParent[ 0 ].scrollTop =scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;}if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -event.pageX < o.scrollSensitivity ) {this.scrollParent[ 0 ].scrollLeft = scrolled =this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {this.scrollParent[ 0 ].scrollLeft = scrolled =this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;}} else {if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <o.scrollSensitivity ) {scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );}if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <o.scrollSensitivity ) {scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);}}if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {$.ui.ddmanager.prepareOffsets( this, event );}}//Regenerate the absolute position used for position checksthis.positionAbs = this._convertPositionTo( "absolute" );//Set the helper positionif ( !this.options.axis || this.options.axis !== "y" ) {this.helper[ 0 ].style.left = this.position.left + "px";}if ( !this.options.axis || this.options.axis !== "x" ) {this.helper[ 0 ].style.top = this.position.top + "px";}//Rearrangefor ( i = this.items.length - 1; i >= 0; i-- ) {//Cache variables and intersection, continue if no intersectionitem = this.items[ i ];itemElement = item.item[ 0 ];intersection = this._intersectsWithPointer( item );if ( !intersection ) {continue;}// Only put the placeholder inside the current Container, skip all// items from other containers. This works because when moving// an item from one container to another the// currentContainer is switched before the placeholder is moved.//// Without this, moving items in "sub-sortables" can cause// the placeholder to jitter between the outer and inner container.if ( item.instance !== this.currentContainer ) {continue;}// Cannot intersect with itself// no useless actions that have been done before// no action if the item moved is the parent of the item checkedif ( itemElement !== this.currentItem[ 0 ] &&this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement &&!$.contains( this.placeholder[ 0 ], itemElement ) &&( this.options.type === "semi-dynamic" ?!$.contains( this.element[ 0 ], itemElement ) :true)) {this.direction = intersection === 1 ? "down" : "up";if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) {this._rearrange( event, item );} else {break;}this._trigger( "change", event, this._uiHash() );break;}}//Post events to containersthis._contactContainers( event );//Interconnect with droppablesif ( $.ui.ddmanager ) {$.ui.ddmanager.drag( this, event );}//Call callbacksthis._trigger( "sort", event, this._uiHash() );this.lastPositionAbs = this.positionAbs;return false;},_mouseStop: function( event, noPropagation ) {if ( !event ) {return;}//If we are using droppables, inform the manager about the dropif ( $.ui.ddmanager && !this.options.dropBehaviour ) {$.ui.ddmanager.drop( this, event );}if ( this.options.revert ) {var that = this,cur = this.placeholder.offset(),axis = this.options.axis,animation = {};if ( !axis || axis === "x" ) {animation.left = cur.left - this.offset.parent.left - this.margins.left +( this.offsetParent[ 0 ] === this.document[ 0 ].body ?0 :this.offsetParent[ 0 ].scrollLeft);}if ( !axis || axis === "y" ) {animation.top = cur.top - this.offset.parent.top - this.margins.top +( this.offsetParent[ 0 ] === this.document[ 0 ].body ?0 :this.offsetParent[ 0 ].scrollTop);}this.reverting = true;$( this.helper ).animate(animation,parseInt( this.options.revert, 10 ) || 500,function() {that._clear( event );});} else {this._clear( event, noPropagation );}return false;},cancel: function() {if ( this.dragging ) {this._mouseUp( new $.Event( "mouseup", { target: null } ) );if ( this.options.helper === "original" ) {this.currentItem.css( this._storedCSS );this._removeClass( this.currentItem, "ui-sortable-helper" );} else {this.currentItem.show();}//Post deactivating events to containersfor ( var i = this.containers.length - 1; i >= 0; i-- ) {this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );if ( this.containers[ i ].containerCache.over ) {this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );this.containers[ i ].containerCache.over = 0;}}}if ( this.placeholder ) {//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,// it unbinds ALL events from the original node!if ( this.placeholder[ 0 ].parentNode ) {this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );}if ( this.options.helper !== "original" && this.helper &&this.helper[ 0 ].parentNode ) {this.helper.remove();}$.extend( this, {helper: null,dragging: false,reverting: false,_noFinalSort: null} );if ( this.domPosition.prev ) {$( this.domPosition.prev ).after( this.currentItem );} else {$( this.domPosition.parent ).prepend( this.currentItem );}}return this;},serialize: function( o ) {var items = this._getItemsAsjQuery( o && o.connected ),str = [];o = o || {};$( items ).each( function() {var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" ).match( o.expression || ( /(.+)[\-=_](.+)/ ) );if ( res ) {str.push(( o.key || res[ 1 ] + "[]" ) +"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );}} );if ( !str.length && o.key ) {str.push( o.key + "=" );}return str.join( "&" );},toArray: function( o ) {var items = this._getItemsAsjQuery( o && o.connected ),ret = [];o = o || {};items.each( function() {ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );} );return ret;},/* Be careful with the following core functions */_intersectsWith: function( item ) {var x1 = this.positionAbs.left,x2 = x1 + this.helperProportions.width,y1 = this.positionAbs.top,y2 = y1 + this.helperProportions.height,l = item.left,r = l + item.width,t = item.top,b = t + item.height,dyClick = this.offset.click.top,dxClick = this.offset.click.left,isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&( y1 + dyClick ) < b ),isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&( x1 + dxClick ) < r ),isOverElement = isOverElementHeight && isOverElementWidth;if ( this.options.tolerance === "pointer" ||this.options.forcePointerForContainers ||( this.options.tolerance !== "pointer" &&this.helperProportions[ this.floating ? "width" : "height" ] >item[ this.floating ? "width" : "height" ] )) {return isOverElement;} else {return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Halfx2 - ( this.helperProportions.width / 2 ) < r && // Left Halft < y1 + ( this.helperProportions.height / 2 ) && // Bottom Halfy2 - ( this.helperProportions.height / 2 ) < b ); // Top Half}},_intersectsWithPointer: function( item ) {var verticalDirection, horizontalDirection,isOverElementHeight = ( this.options.axis === "x" ) ||this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height ),isOverElementWidth = ( this.options.axis === "y" ) ||this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width ),isOverElement = isOverElementHeight && isOverElementWidth;if ( !isOverElement ) {return false;}verticalDirection = this._getDragVerticalDirection();horizontalDirection = this._getDragHorizontalDirection();return this.floating ?( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ): ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );},_intersectsWithSides: function( item ) {var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +this.offset.click.top, item.top + ( item.height / 2 ), item.height ),isOverRightHalf = this._isOverAxis( this.positionAbs.left +this.offset.click.left, item.left + ( item.width / 2 ), item.width ),verticalDirection = this._getDragVerticalDirection(),horizontalDirection = this._getDragHorizontalDirection();if ( this.floating && horizontalDirection ) {return ( ( horizontalDirection === "right" && isOverRightHalf ) ||( horizontalDirection === "left" && !isOverRightHalf ) );} else {return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||( verticalDirection === "up" && !isOverBottomHalf ) );}},_getDragVerticalDirection: function() {var delta = this.positionAbs.top - this.lastPositionAbs.top;return delta !== 0 && ( delta > 0 ? "down" : "up" );},_getDragHorizontalDirection: function() {var delta = this.positionAbs.left - this.lastPositionAbs.left;return delta !== 0 && ( delta > 0 ? "right" : "left" );},refresh: function( event ) {this._refreshItems( event );this._setHandleClassName();this.refreshPositions();return this;},_connectWith: function() {var options = this.options;return options.connectWith.constructor === String ?[ options.connectWith ] :options.connectWith;},_getItemsAsjQuery: function( connected ) {var i, j, cur, inst,items = [],queries = [],connectWith = this._connectWith();if ( connectWith && connected ) {for ( i = connectWith.length - 1; i >= 0; i-- ) {cur = $( connectWith[ i ], this.document[ 0 ] );for ( j = cur.length - 1; j >= 0; j-- ) {inst = $.data( cur[ j ], this.widgetFullName );if ( inst && inst !== this && !inst.options.disabled ) {queries.push( [ $.isFunction( inst.options.items ) ?inst.options.items.call( inst.element ) :$( inst.options.items, inst.element ).not( ".ui-sortable-helper" ).not( ".ui-sortable-placeholder" ), inst ] );}}}}queries.push( [ $.isFunction( this.options.items ) ?this.options.items.call( this.element, null, { options: this.options, item: this.currentItem } ) :$( this.options.items, this.element ).not( ".ui-sortable-helper" ).not( ".ui-sortable-placeholder" ), this ] );function addItems() {items.push( this );}for ( i = queries.length - 1; i >= 0; i-- ) {queries[ i ][ 0 ].each( addItems );}return $( items );},_removeCurrentsFromItems: function() {var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );this.items = $.grep( this.items, function( item ) {for ( var j = 0; j < list.length; j++ ) {if ( list[ j ] === item.item[ 0 ] ) {return false;}}return true;} );},_refreshItems: function( event ) {this.items = [];this.containers = [ this ];var i, j, cur, inst, targetData, _queries, item, queriesLength,items = this.items,queries = [ [ $.isFunction( this.options.items ) ?this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :$( this.options.items, this.element ), this ] ],connectWith = this._connectWith();//Shouldn't be run the first time through due to massive slow-downif ( connectWith && this.ready ) {for ( i = connectWith.length - 1; i >= 0; i-- ) {cur = $( connectWith[ i ], this.document[ 0 ] );for ( j = cur.length - 1; j >= 0; j-- ) {inst = $.data( cur[ j ], this.widgetFullName );if ( inst && inst !== this && !inst.options.disabled ) {queries.push( [ $.isFunction( inst.options.items ) ?inst.options.items.call( inst.element[ 0 ], event, { item: this.currentItem } ) :$( inst.options.items, inst.element ), inst ] );this.containers.push( inst );}}}}for ( i = queries.length - 1; i >= 0; i-- ) {targetData = queries[ i ][ 1 ];_queries = queries[ i ][ 0 ];for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {item = $( _queries[ j ] );// Data for target checking (mouse manager)item.data( this.widgetName + "-item", targetData );items.push( {item: item,instance: targetData,width: 0, height: 0,left: 0, top: 0} );}}},refreshPositions: function( fast ) {// Determine whether items are being displayed horizontallythis.floating = this.items.length ?this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :false;//This has to be redone because due to the item being moved out/into the offsetParent,// the offsetParent's position will changeif ( this.offsetParent && this.helper ) {this.offset.parent = this._getParentOffset();}var i, item, t, p;for ( i = this.items.length - 1; i >= 0; i-- ) {item = this.items[ i ];//We ignore calculating positions of all connected containers when we're not over themif ( item.instance !== this.currentContainer && this.currentContainer &&item.item[ 0 ] !== this.currentItem[ 0 ] ) {continue;}t = this.options.toleranceElement ?$( this.options.toleranceElement, item.item ) :item.item;if ( !fast ) {item.width = t.outerWidth();item.height = t.outerHeight();}p = t.offset();item.left = p.left;item.top = p.top;}if ( this.options.custom && this.options.custom.refreshContainers ) {this.options.custom.refreshContainers.call( this );} else {for ( i = this.containers.length - 1; i >= 0; i-- ) {p = this.containers[ i ].element.offset();this.containers[ i ].containerCache.left = p.left;this.containers[ i ].containerCache.top = p.top;this.containers[ i ].containerCache.width =this.containers[ i ].element.outerWidth();this.containers[ i ].containerCache.height =this.containers[ i ].element.outerHeight();}}return this;},_createPlaceholder: function( that ) {that = that || this;var className,o = that.options;if ( !o.placeholder || o.placeholder.constructor === String ) {className = o.placeholder;o.placeholder = {element: function() {var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),element = $( "<" + nodeName + ">", that.document[ 0 ] );that._addClass( element, "ui-sortable-placeholder",className || that.currentItem[ 0 ].className )._removeClass( element, "ui-sortable-helper" );if ( nodeName === "tbody" ) {that._createTrPlaceholder(that.currentItem.find( "tr" ).eq( 0 ),$( "", that.document[ 0 ] ).appendTo( element ));} else if ( nodeName === "tr" ) {that._createTrPlaceholder( that.currentItem, element );} else if ( nodeName === "img" ) {element.attr( "src", that.currentItem.attr( "src" ) );}if ( !className ) {element.css( "visibility", "hidden" );}return element;},update: function( container, p ) {// 1. If a className is set as 'placeholder option, we don't force sizes -// the class is responsible for that// 2. The option 'forcePlaceholderSize can be enabled to force it even if a// class name is specifiedif ( className && !o.forcePlaceholderSize ) {return;}//If the element doesn't have a actual height by itself (without styles coming// from a stylesheet), it receives the inline height from the dragged itemif ( !p.height() ) {p.height(that.currentItem.innerHeight() -parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );}if ( !p.width() ) {p.width(that.currentItem.innerWidth() -parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );}}};}//Create the placeholderthat.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );//Append it after the actual current itemthat.currentItem.after( that.placeholder );//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)o.placeholder.update( that, that.placeholder );},_createTrPlaceholder: function( sourceTr, targetTr ) {var that = this;sourceTr.children().each( function() {$( "", that.document[ 0 ] ).attr( "colspan", $( this ).attr( "colspan" ) || 1 ).appendTo( targetTr );} );},_contactContainers: function( event ) {var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,floating, axis,innermostContainer = null,innermostIndex = null;// Get innermost container that intersects with itemfor ( i = this.containers.length - 1; i >= 0; i-- ) {// Never consider a container that's located within the item itselfif ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {continue;}if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {// If we've already found a container and it's more "inner" than this, then continueif ( innermostContainer &&$.contains(this.containers[ i ].element[ 0 ],innermostContainer.element[ 0 ] ) ) {continue;}innermostContainer = this.containers[ i ];innermostIndex = i;} else {// container doesn't intersect. trigger "out" event if necessaryif ( this.containers[ i ].containerCache.over ) {this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );this.containers[ i ].containerCache.over = 0;}}}// If no intersecting containers found, returnif ( !innermostContainer ) {return;}// Move the item into the container if it's not there alreadyif ( this.containers.length === 1 ) {if ( !this.containers[ innermostIndex ].containerCache.over ) {this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );this.containers[ innermostIndex ].containerCache.over = 1;}} else {// When entering a new container, we will find the item with the least distance and// append our item near itdist = 10000;itemWithLeastDistance = null;floating = innermostContainer.floating || this._isFloating( this.currentItem );posProperty = floating ? "left" : "top";sizeProperty = floating ? "width" : "height";axis = floating ? "pageX" : "pageY";for ( j = this.items.length - 1; j >= 0; j-- ) {if ( !$.contains(this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )) {continue;}if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {continue;}cur = this.items[ j ].item.offset()[ posProperty ];nearBottom = false;if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {nearBottom = true;}if ( Math.abs( event[ axis ] - cur ) < dist ) {dist = Math.abs( event[ axis ] - cur );itemWithLeastDistance = this.items[ j ];this.direction = nearBottom ? "up" : "down";}}//Check if dropOnEmpty is enabledif ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {return;}if ( this.currentContainer === this.containers[ innermostIndex ] ) {if ( !this.currentContainer.containerCache.over ) {this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );this.currentContainer.containerCache.over = 1;}return;}itemWithLeastDistance ?this._rearrange( event, itemWithLeastDistance, null, true ) :this._rearrange( event, null, this.containers[ innermostIndex ].element, true );this._trigger( "change", event, this._uiHash() );this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );this.currentContainer = this.containers[ innermostIndex ];//Update the placeholderthis.options.placeholder.update( this.currentContainer, this.placeholder );this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );this.containers[ innermostIndex ].containerCache.over = 1;}},_createHelper: function( event ) {var o = this.options,helper = $.isFunction( o.helper ) ?$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );//Add the helper to the DOM if that didn't happen alreadyif ( !helper.parents( "body" ).length ) {$( o.appendTo !== "parent" ?o.appendTo :this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );}if ( helper[ 0 ] === this.currentItem[ 0 ] ) {this._storedCSS = {width: this.currentItem[ 0 ].style.width,height: this.currentItem[ 0 ].style.height,position: this.currentItem.css( "position" ),top: this.currentItem.css( "top" ),left: this.currentItem.css( "left" )};}if ( !helper[ 0 ].style.width || o.forceHelperSize ) {helper.width( this.currentItem.width() );}if ( !helper[ 0 ].style.height || o.forceHelperSize ) {helper.height( this.currentItem.height() );}return helper;},_adjustOffsetFromHelper: function( obj ) {if ( typeof obj === "string" ) {obj = obj.split( " " );}if ( $.isArray( obj ) ) {obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };}if ( "left" in obj ) {this.offset.click.left = obj.left + this.margins.left;}if ( "right" in obj ) {this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;}if ( "top" in obj ) {this.offset.click.top = obj.top + this.margins.top;}if ( "bottom" in obj ) {this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;}},_getParentOffset: function() {//Get the offsetParent and cache its positionthis.offsetParent = this.helper.offsetParent();var po = this.offsetParent.offset();// This is a special case where we need to modify a offset calculated on start, since the// following happened:// 1. The position of the helper is absolute, so it's position is calculated based on the// next positioned parent// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't// the document, which means that the scroll is included in the initial calculation of the// offset of the parent, and never recalculated upon dragif ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {po.left += this.scrollParent.scrollLeft();po.top += this.scrollParent.scrollTop();}// This needs to be actually done for all browsers, since pageX/pageY includes this// information with an ugly IE fixif ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||( this.offsetParent[ 0 ].tagName &&this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {po = { top: 0, left: 0 };}return {top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )};},_getRelativeOffset: function() {if ( this.cssPosition === "relative" ) {var p = this.currentItem.position();return {top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +this.scrollParent.scrollTop(),left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +this.scrollParent.scrollLeft()};} else {return { top: 0, left: 0 };}},_cacheMargins: function() {this.margins = {left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )};},_cacheHelperProportions: function() {this.helperProportions = {width: this.helper.outerWidth(),height: this.helper.outerHeight()};},_setContainment: function() {var ce, co, over,o = this.options;if ( o.containment === "parent" ) {o.containment = this.helper[ 0 ].parentNode;}if ( o.containment === "document" || o.containment === "window" ) {this.containment = [0 - this.offset.relative.left - this.offset.parent.left,0 - this.offset.relative.top - this.offset.parent.top,o.containment === "document" ?this.document.width() :this.window.width() - this.helperProportions.width - this.margins.left,( o.containment === "document" ?( this.document.height() || document.body.parentNode.scrollHeight ) :this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];}if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {ce = $( o.containment )[ 0 ];co = $( o.containment ).offset();over = ( $( ce ).css( "overflow" ) !== "hidden" );this.containment = [co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -this.helperProportions.width - this.margins.left,co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -this.helperProportions.height - this.margins.top];}},_convertPositionTo: function( d, pos ) {if ( !pos ) {pos = this.position;}var mod = d === "absolute" ? 1 : -1,scroll = this.cssPosition === "absolute" &&!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?this.offsetParent :this.scrollParent,scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );return {top: (// The absolute mouse positionpos.top+// Only for relative positioned nodes: Relative offset from element to offset parentthis.offset.relative.top * mod +// The offsetParent's offset without borders (offset + border)this.offset.parent.top * mod -( ( this.cssPosition === "fixed" ?-this.scrollParent.scrollTop() :( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )),left: (// The absolute mouse positionpos.left +// Only for relative positioned nodes: Relative offset from element to offset parentthis.offset.relative.left * mod +// The offsetParent's offset without borders (offset + border)this.offset.parent.left * mod-( ( this.cssPosition === "fixed" ?-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :scroll.scrollLeft() ) * mod ))};},_generatePosition: function( event ) {var top, left,o = this.options,pageX = event.pageX,pageY = event.pageY,scroll = this.cssPosition === "absolute" &&!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?this.offsetParent :this.scrollParent,scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );// This is another very weird special case that only happens for relative elements:// 1. If the css position is relative// 2. and the scroll parent is the document or similar to the offset parent// we have to refresh the relative offset during the scroll so there are no jumpsif ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {this.offset.relative = this._getRelativeOffset();}/** - Position constraining -* Constrain the position to a mix of grid, containment.*/if ( this.originalPosition ) { //If we are not dragging yet, we won't check for optionsif ( this.containment ) {if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {pageX = this.containment[ 0 ] + this.offset.click.left;}if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {pageY = this.containment[ 1 ] + this.offset.click.top;}if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {pageX = this.containment[ 2 ] + this.offset.click.left;}if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {pageY = this.containment[ 3 ] + this.offset.click.top;}}if ( o.grid ) {top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /o.grid[ 1 ] ) * o.grid[ 1 ];pageY = this.containment ?( ( top - this.offset.click.top >= this.containment[ 1 ] &&top - this.offset.click.top <= this.containment[ 3 ] ) ?top :( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :top;left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /o.grid[ 0 ] ) * o.grid[ 0 ];pageX = this.containment ?( ( left - this.offset.click.left >= this.containment[ 0 ] &&left - this.offset.click.left <= this.containment[ 2 ] ) ?left :( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :left;}}return {top: (// The absolute mouse positionpageY -// Click offset (relative to the element)this.offset.click.top -// Only for relative positioned nodes: Relative offset from element to offset parentthis.offset.relative.top -// The offsetParent's offset without borders (offset + border)this.offset.parent.top +( ( this.cssPosition === "fixed" ?-this.scrollParent.scrollTop() :( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )),left: (// The absolute mouse positionpageX -// Click offset (relative to the element)this.offset.click.left -// Only for relative positioned nodes: Relative offset from element to offset parentthis.offset.relative.left -// The offsetParent's offset without borders (offset + border)this.offset.parent.left +( ( this.cssPosition === "fixed" ?-this.scrollParent.scrollLeft() :scrollIsRootNode ? 0 : scroll.scrollLeft() ) ))};},_rearrange: function( event, i, a, hardRefresh ) {a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );//Various things done here to improve the performance:// 1. we create a setTimeout, that calls refreshPositions// 2. on the instance, we have a counter variable, that get's higher after every append// 3. on the local scope, we copy the counter variable, and check in the timeout,// if it's still the same// 4. this lets only the last addition to the timeout stack throughthis.counter = this.counter ? ++this.counter : 1;var counter = this.counter;this._delay( function() {if ( counter === this.counter ) {//Precompute after each DOM insertion, NOT on mousemovethis.refreshPositions( !hardRefresh );}} );},_clear: function( event, noPropagation ) {this.reverting = false;// We delay all events that have to be triggered to after the point where the placeholder// has been removed and everything else normalized againvar i,delayedTriggers = [];// We first have to update the dom position of the actual currentItem// Note: don't do it if the current item is already removed (by a user), or it gets// reappended (see #4088)if ( !this._noFinalSort && this.currentItem.parent().length ) {this.placeholder.before( this.currentItem );}this._noFinalSort = null;if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {for ( i in this._storedCSS ) {if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {this._storedCSS[ i ] = "";}}this.currentItem.css( this._storedCSS );this._removeClass( this.currentItem, "ui-sortable-helper" );} else {this.currentItem.show();}if ( this.fromOutside && !noPropagation ) {delayedTriggers.push( function( event ) {this._trigger( "receive", event, this._uiHash( this.fromOutside ) );} );}if ( ( this.fromOutside ||this.domPosition.prev !==this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {// Trigger update callback if the DOM position has changeddelayedTriggers.push( function( event ) {this._trigger( "update", event, this._uiHash() );} );}// Check if the items Container has Changed and trigger appropriate// events.if ( this !== this.currentContainer ) {if ( !noPropagation ) {delayedTriggers.push( function( event ) {this._trigger( "remove", event, this._uiHash() );} );delayedTriggers.push( ( function( c ) {return function( event ) {c._trigger( "receive", event, this._uiHash( this ) );};} ).call( this, this.currentContainer ) );delayedTriggers.push( ( function( c ) {return function( event ) {c._trigger( "update", event, this._uiHash( this ) );};} ).call( this, this.currentContainer ) );}}//Post events to containersfunction delayEvent( type, instance, container ) {return function( event ) {container._trigger( type, event, instance._uiHash( instance ) );};}for ( i = this.containers.length - 1; i >= 0; i-- ) {if ( !noPropagation ) {delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );}if ( this.containers[ i ].containerCache.over ) {delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );this.containers[ i ].containerCache.over = 0;}}//Do what was originally in pluginsif ( this.storedCursor ) {this.document.find( "body" ).css( "cursor", this.storedCursor );this.storedStylesheet.remove();}if ( this._storedOpacity ) {this.helper.css( "opacity", this._storedOpacity );}if ( this._storedZIndex ) {this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );}this.dragging = false;if ( !noPropagation ) {this._trigger( "beforeStop", event, this._uiHash() );}//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,// it unbinds ALL events from the original node!this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );if ( !this.cancelHelperRemoval ) {if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {this.helper.remove();}this.helper = null;}if ( !noPropagation ) {for ( i = 0; i < delayedTriggers.length; i++ ) {// Trigger all delayed eventsdelayedTriggers[ i ].call( this, event );}this._trigger( "stop", event, this._uiHash() );}this.fromOutside = false;return !this.cancelHelperRemoval;},_trigger: function() {if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {this.cancel();}},_uiHash: function( _inst ) {var inst = _inst || this;return {helper: inst.helper,placeholder: inst.placeholder || $( [] ),position: inst.position,originalPosition: inst.originalPosition,offset: inst.positionAbs,item: inst.currentItem,sender: _inst ? _inst.element : null};}} );/*!* jQuery UI Spinner 1.12.1* http://jqueryui.com** Copyright jQuery Foundation and other contributors* Released under the MIT license.* http://jquery.org/license*///>>label: Spinner//>>group: Widgets//>>description: Displays buttons to easily input numbers via the keyboard or mouse.//>>docs: http://api.jqueryui.com/spinner///>>demos: http://jqueryui.com/spinner///>>css.structure: ../../themes/base/core.css//>>css.structure: ../../themes/base/spinner.css//>>css.theme: ../../themes/base/theme.cssfunction spinnerModifer( fn ) {return function() {var previous = this.element.val();fn.apply( this, arguments );this._refresh();if ( previous !== this.element.val() ) {this._trigger( "change" );}};}$.widget( "ui.spinner", {version: "1.12.1",defaultElement: "",widgetEventPrefix: "spin",options: {classes: {"ui-spinner": "ui-corner-all","ui-spinner-down": "ui-corner-br","ui-spinner-up": "ui-corner-tr"},culture: null,icons: {down: "ui-icon-triangle-1-s",up: "ui-icon-triangle-1-n"},incremental: true,max: null,min: null,numberFormat: null,page: 10,step: 1,change: null,spin: null,start: null,stop: null},_create: function() {// handle string values that need to be parsedthis._setOption( "max", this.options.max );this._setOption( "min", this.options.min );this._setOption( "step", this.options.step );// Only format if there is a value, prevents the field from being marked// as invalid in Firefox, see #9573.if ( this.value() !== "" ) {// Format the value, but don't constrain.this._value( this.element.val(), true );}this._draw();this._on( this._events );this._refresh();// Turning off autocomplete prevents the browser from remembering the// value when navigating through history, so we re-enable autocomplete// if the page is unloaded before the widget is destroyed. #7790this._on( this.window, {beforeunload: function() {this.element.removeAttr( "autocomplete" );}} );},_getCreateOptions: function() {var options = this._super();var element = this.element;$.each( [ "min", "max", "step" ], function( i, option ) {var value = element.attr( option );if ( value != null && value.length ) {options[ option ] = value;}} );return options;},_events: {keydown: function( event ) {if ( this._start( event ) && this._keydown( event ) ) {event.preventDefault();}},keyup: "_stop",focus: function() {this.previous = this.element.val();},blur: function( event ) {if ( this.cancelBlur ) {delete this.cancelBlur;return;}this._stop();this._refresh();if ( this.previous !== this.element.val() ) {this._trigger( "change", event );}},mousewheel: function( event, delta ) {if ( !delta ) {return;}if ( !this.spinning && !this._start( event ) ) {return false;}this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );clearTimeout( this.mousewheelTimer );this.mousewheelTimer = this._delay( function() {if ( this.spinning ) {this._stop( event );}}, 100 );event.preventDefault();},"mousedown .ui-spinner-button": function( event ) {var previous;// We never want the buttons to have focus; whenever the user is// interacting with the spinner, the focus should be on the input.// If the input is focused then this.previous is properly set from// when the input first received focus. If the input is not focused// then we need to set this.previous based on the value before spinning.previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?this.previous : this.element.val();function checkFocus() {var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );if ( !isActive ) {this.element.trigger( "focus" );this.previous = previous;// support: IE// IE sets focus asynchronously, so we need to check if focus// moved off of the input because the user clicked on the button.this._delay( function() {this.previous = previous;} );}}// Ensure focus is on (or stays on) the text fieldevent.preventDefault();checkFocus.call( this );// Support: IE// IE doesn't prevent moving focus even with event.preventDefault()// so we set a flag to know when we should ignore the blur event// and check (again) if focus moved off of the input.this.cancelBlur = true;this._delay( function() {delete this.cancelBlur;checkFocus.call( this );} );if ( this._start( event ) === false ) {return;}this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );},"mouseup .ui-spinner-button": "_stop","mouseenter .ui-spinner-button": function( event ) {// button will add ui-state-active if mouse was down while mouseleave and kept downif ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {return;}if ( this._start( event ) === false ) {return false;}this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );},// TODO: do we really want to consider this a stop?// shouldn't we just stop the repeater and wait until mouseup before// we trigger the stop event?"mouseleave .ui-spinner-button": "_stop"},// Support mobile enhanced option and make backcompat more sane_enhance: function() {this.uiSpinner = this.element.attr( "autocomplete", "off" ).wrap( "" ).parent()// Add buttons.append("");},_draw: function() {this._enhance();this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );this._addClass( "ui-spinner-input" );this.element.attr( "role", "spinbutton" );// Button bindingsthis.buttons = this.uiSpinner.children( "a" ).attr( "tabIndex", -1 ).attr( "aria-hidden", true ).button( {classes: {"ui-button": ""}} );// TODO: Right now button does not support classes this is already updated in button PRthis._removeClass( this.buttons, "ui-corner-all" );this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );this.buttons.first().button( {"icon": this.options.icons.up,"showLabel": false} );this.buttons.last().button( {"icon": this.options.icons.down,"showLabel": false} );// IE 6 doesn't understand height: 50% for the buttons// unless the wrapper has an explicit heightif ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&this.uiSpinner.height() > 0 ) {this.uiSpinner.height( this.uiSpinner.height() );}},_keydown: function( event ) {var options = this.options,keyCode = $.ui.keyCode;switch ( event.keyCode ) {case keyCode.UP:this._repeat( null, 1, event );return true;case keyCode.DOWN:this._repeat( null, -1, event );return true;case keyCode.PAGE_UP:this._repeat( null, options.page, event );return true;case keyCode.PAGE_DOWN:this._repeat( null, -options.page, event );return true;}return false;},_start: function( event ) {if ( !this.spinning && this._trigger( "start", event ) === false ) {return false;}if ( !this.counter ) {this.counter = 1;}this.spinning = true;return true;},_repeat: function( i, steps, event ) {i = i || 500;clearTimeout( this.timer );this.timer = this._delay( function() {this._repeat( 40, steps, event );}, i );this._spin( steps * this.options.step, event );},_spin: function( step, event ) {var value = this.value() || 0;if ( !this.counter ) {this.counter = 1;}value = this._adjustValue( value + step * this._increment( this.counter ) );if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {this._value( value );this.counter++;}},_increment: function( i ) {var incremental = this.options.incremental;if ( incremental ) {return $.isFunction( incremental ) ?incremental( i ) :Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );}return 1;},_precision: function() {var precision = this._precisionOf( this.options.step );if ( this.options.min !== null ) {precision = Math.max( precision, this._precisionOf( this.options.min ) );}return precision;},_precisionOf: function( num ) {var str = num.toString(),decimal = str.indexOf( "." );return decimal === -1 ? 0 : str.length - decimal - 1;},_adjustValue: function( value ) {var base, aboveMin,options = this.options;// Make sure we're at a valid step// - find out where we are relative to the base (min or 0)base = options.min !== null ? options.min : 0;aboveMin = value - base;// - round to the nearest stepaboveMin = Math.round( aboveMin / options.step ) * options.step;// - rounding is based on 0, so adjust back to our basevalue = base + aboveMin;// Fix precision from bad JS floating point mathvalue = parseFloat( value.toFixed( this._precision() ) );// Clamp the valueif ( options.max !== null && value > options.max ) {return options.max;}if ( options.min !== null && value < options.min ) {return options.min;}return value;},_stop: function( event ) {if ( !this.spinning ) {return;}clearTimeout( this.timer );clearTimeout( this.mousewheelTimer );this.counter = 0;this.spinning = false;this._trigger( "stop", event );},_setOption: function( key, value ) {var prevValue, first, last;if ( key === "culture" || key === "numberFormat" ) {prevValue = this._parse( this.element.val() );this.options[ key ] = value;this.element.val( this._format( prevValue ) );return;}if ( key === "max" || key === "min" || key === "step" ) {if ( typeof value === "string" ) {value = this._parse( value );}}if ( key === "icons" ) {first = this.buttons.first().find( ".ui-icon" );this._removeClass( first, null, this.options.icons.up );this._addClass( first, null, value.up );last = this.buttons.last().find( ".ui-icon" );this._removeClass( last, null, this.options.icons.down );this._addClass( last, null, value.down );}this._super( key, value );},_setOptionDisabled: function( value ) {this._super( value );this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );this.element.prop( "disabled", !!value );this.buttons.button( value ? "disable" : "enable" );},_setOptions: spinnerModifer( function( options ) {this._super( options );} ),_parse: function( val ) {if ( typeof val === "string" && val !== "" ) {val = window.Globalize && this.options.numberFormat ?Globalize.parseFloat( val, 10, this.options.culture ) : +val;}return val === "" || isNaN( val ) ? null : val;},_format: function( value ) {if ( value === "" ) {return "";}return window.Globalize && this.options.numberFormat ?Globalize.format( value, this.options.numberFormat, this.options.culture ) :value;},_refresh: function() {this.element.attr( {"aria-valuemin": this.options.min,"aria-valuemax": this.options.max,// TODO: what should we do with values that can't be parsed?"aria-valuenow": this._parse( this.element.val() )} );},isValid: function() {var value = this.value();// Null is invalidif ( value === null ) {return false;}// If value gets adjusted, it's invalidreturn value === this._adjustValue( value );},// Update the value without triggering change_value: function( value, allowAny ) {var parsed;if ( value !== "" ) {parsed = this._parse( value );if ( parsed !== null ) {if ( !allowAny ) {parsed = this._adjustValue( parsed );}value = this._format( parsed );}}this.element.val( value );this._refresh();},_destroy: function() {this.element.prop( "disabled", false ).removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );this.uiSpinner.replaceWith( this.element );},stepUp: spinnerModifer( function( steps ) {this._stepUp( steps );} ),_stepUp: function( steps ) {if ( this._start() ) {this._spin( ( steps || 1 ) * this.options.step );this._stop();}},stepDown: spinnerModifer( function( steps ) {this._stepDown( steps );} ),_stepDown: function( steps ) {if ( this._start() ) {this._spin( ( steps || 1 ) * -this.options.step );this._stop();}},pageUp: spinnerModifer( function( pages ) {this._stepUp( ( pages || 1 ) * this.options.page );} ),pageDown: spinnerModifer( function( pages ) {this._stepDown( ( pages || 1 ) * this.options.page );} ),value: function( newVal ) {if ( !arguments.length ) {return this._parse( this.element.val() );}spinnerModifer( this._value ).call( this, newVal );},widget: function() {return this.uiSpinner;}} );// DEPRECATED// TODO: switch return back to widget declaration at top of file when this is removedif ( $.uiBackCompat !== false ) {// Backcompat for spinner html extension points$.widget( "ui.spinner", $.ui.spinner, {_enhance: function() {this.uiSpinner = this.element.attr( "autocomplete", "off" ).wrap( this._uiSpinnerHtml() ).parent()// Add buttons.append( this._buttonHtml() );},_uiSpinnerHtml: function() {return "";},_buttonHtml: function() {return "";}} );}var widgetsSpinner = $.ui.spinner;/*!* jQuery UI Tabs 1.12.1* http://jqueryui.com** Copyright jQuery Foundation and other contributors* Released under the MIT license.* http://jquery.org/license*///>>label: Tabs//>>group: Widgets//>>description: Transforms a set of container elements into a tab structure.//>>docs: http://api.jqueryui.com/tabs///>>demos: http://jqueryui.com/tabs///>>css.structure: ../../themes/base/core.css//>>css.structure: ../../themes/base/tabs.css//>>css.theme: ../../themes/base/theme.css$.widget( "ui.tabs", {version: "1.12.1",delay: 300,options: {active: null,classes: {"ui-tabs": "ui-corner-all","ui-tabs-nav": "ui-corner-all","ui-tabs-panel": "ui-corner-bottom","ui-tabs-tab": "ui-corner-top"},collapsible: false,event: "click",heightStyle: "content",hide: null,show: null,// Callbacksactivate: null,beforeActivate: null,beforeLoad: null,load: null},_isLocal: ( function() {var rhash = /#.*$/;return function( anchor ) {var anchorUrl, locationUrl;anchorUrl = anchor.href.replace( rhash, "" );locationUrl = location.href.replace( rhash, "" );// Decoding may throw an error if the URL isn't UTF-8 (#9518)try {anchorUrl = decodeURIComponent( anchorUrl );} catch ( error ) {}try {locationUrl = decodeURIComponent( locationUrl );} catch ( error ) {}return anchor.hash.length > 1 && anchorUrl === locationUrl;};} )(),_create: function() {var that = this,options = this.options;this.running = false;this._addClass( "ui-tabs", "ui-widget ui-widget-content" );this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );this._processTabs();options.active = this._initialActive();// Take disabling tabs via class attribute from HTML// into account and update option properly.if ( $.isArray( options.disabled ) ) {options.disabled = $.unique( options.disabled.concat($.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {return that.tabs.index( li );} )) ).sort();}// Check for length avoids error when initializing empty listif ( this.options.active !== false && this.anchors.length ) {this.active = this._findActive( options.active );} else {this.active = $();}this._refresh();if ( this.active.length ) {this.load( options.active );}},_initialActive: function() {var active = this.options.active,collapsible = this.options.collapsible,locationHash = location.hash.substring( 1 );if ( active === null ) {// check the fragment identifier in the URLif ( locationHash ) {this.tabs.each( function( i, tab ) {if ( $( tab ).attr( "aria-controls" ) === locationHash ) {active = i;return false;}} );}// Check for a tab marked active via a classif ( active === null ) {active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );}// No active tab, set to falseif ( active === null || active === -1 ) {active = this.tabs.length ? 0 : false;}}// Handle numbers: negative, out of rangeif ( active !== false ) {active = this.tabs.index( this.tabs.eq( active ) );if ( active === -1 ) {active = collapsible ? false : 0;}}// Don't allow collapsible: false and active: falseif ( !collapsible && active === false && this.anchors.length ) {active = 0;}return active;},_getCreateEventData: function() {return {tab: this.active,panel: !this.active.length ? $() : this._getPanelForTab( this.active )};},_tabKeydown: function( event ) {var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),selectedIndex = this.tabs.index( focusedTab ),goingForward = true;if ( this._handlePageNav( event ) ) {return;}switch ( event.keyCode ) {case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward = false;selectedIndex--;break;case $.ui.keyCode.END:selectedIndex = this.anchors.length - 1;break;case $.ui.keyCode.HOME:selectedIndex = 0;break;case $.ui.keyCode.SPACE:// Activate only, no collapsingevent.preventDefault();clearTimeout( this.activating );this._activate( selectedIndex );return;case $.ui.keyCode.ENTER:// Toggle (cancel delayed activation, allow collapsing)event.preventDefault();clearTimeout( this.activating );// Determine if we should collapse or activatethis._activate( selectedIndex === this.options.active ? false : selectedIndex );return;default:return;}// Focus the appropriate tab, based on which key was pressedevent.preventDefault();clearTimeout( this.activating );selectedIndex = this._focusNextTab( selectedIndex, goingForward );// Navigating with control/command key will prevent automatic activationif ( !event.ctrlKey && !event.metaKey ) {// Update aria-selected immediately so that AT think the tab is already selected.// Otherwise AT may confuse the user by stating that they need to activate the tab,// but the tab will already be activated by the time the announcement finishes.focusedTab.attr( "aria-selected", "false" );this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );this.activating = this._delay( function() {this.option( "active", selectedIndex );}, this.delay );}},_panelKeydown: function( event ) {if ( this._handlePageNav( event ) ) {return;}// Ctrl+up moves focus to the current tabif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {event.preventDefault();this.active.trigger( "focus" );}},// Alt+page up/down moves focus to the previous/next tab (and activates)_handlePageNav: function( event ) {if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {this._activate( this._focusNextTab( this.options.active - 1, false ) );return true;}if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {this._activate( this._focusNextTab( this.options.active + 1, true ) );return true;}},_findNextTab: function( index, goingForward ) {var lastTabIndex = this.tabs.length - 1;function constrain() {if ( index > lastTabIndex ) {index = 0;}if ( index < 0 ) {index = lastTabIndex;}return index;}while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {index = goingForward ? index + 1 : index - 1;}return index;},_focusNextTab: function( index, goingForward ) {index = this._findNextTab( index, goingForward );this.tabs.eq( index ).trigger( "focus" );return index;},_setOption: function( key, value ) {if ( key === "active" ) {// _activate() will handle invalid values and update this.optionsthis._activate( value );return;}this._super( key, value );if ( key === "collapsible" ) {this._toggleClass( "ui-tabs-collapsible", null, value );// Setting collapsible: false while collapsed; open first panelif ( !value && this.options.active === false ) {this._activate( 0 );}}if ( key === "event" ) {this._setupEvents( value );}if ( key === "heightStyle" ) {this._setupHeightStyle( value );}},_sanitizeSelector: function( hash ) {return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";},refresh: function() {var options = this.options,lis = this.tablist.children( ":has(a[href])" );// Get disabled tabs from class attribute from HTML// this will get converted to a boolean if needed in _refresh()options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {return lis.index( tab );} );this._processTabs();// Was collapsed or no tabsif ( options.active === false || !this.anchors.length ) {options.active = false;this.active = $();// was active, but active tab is gone} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {// all remaining tabs are disabledif ( this.tabs.length === options.disabled.length ) {options.active = false;this.active = $();// activate previous tab} else {this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );}// was active, active tab still exists} else {// make sure active index is correctoptions.active = this.tabs.index( this.active );}this._refresh();},_refresh: function() {this._setOptionDisabled( this.options.disabled );this._setupEvents( this.options.event );this._setupHeightStyle( this.options.heightStyle );this.tabs.not( this.active ).attr( {"aria-selected": "false","aria-expanded": "false",tabIndex: -1} );this.panels.not( this._getPanelForTab( this.active ) ).hide().attr( {"aria-hidden": "true"} );// Make sure one tab is in the tab orderif ( !this.active.length ) {this.tabs.eq( 0 ).attr( "tabIndex", 0 );} else {this.active.attr( {"aria-selected": "true","aria-expanded": "true",tabIndex: 0} );this._addClass( this.active, "ui-tabs-active", "ui-state-active" );this._getPanelForTab( this.active ).show().attr( {"aria-hidden": "false"} );}},_processTabs: function() {var that = this,prevTabs = this.tabs,prevAnchors = this.anchors,prevPanels = this.panels;this.tablist = this._getList().attr( "role", "tablist" );this._addClass( this.tablist, "ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header" );// Prevent users from focusing disabled tabs via clickthis.tablist.on( "mousedown" + this.eventNamespace, "> li", function( event ) {if ( $( this ).is( ".ui-state-disabled" ) ) {event.preventDefault();}} )// Support: IE <9// Preventing the default action in mousedown doesn't prevent IE// from focusing the element, so if the anchor gets focused, blur.// We don't have to worry about focusing the previously focused// element since clicking on a non-focusable element should focus// the body anyway..on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {this.blur();}} );this.tabs = this.tablist.find( "> li:has(a[href])" ).attr( {role: "tab",tabIndex: -1} );this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );this.anchors = this.tabs.map( function() {return $( "a", this )[ 0 ];} ).attr( {role: "presentation",tabIndex: -1} );this._addClass( this.anchors, "ui-tabs-anchor" );this.panels = $();this.anchors.each( function( i, anchor ) {var selector, panel, panelId,anchorId = $( anchor ).uniqueId().attr( "id" ),tab = $( anchor ).closest( "li" ),originalAriaControls = tab.attr( "aria-controls" );// Inline tabif ( that._isLocal( anchor ) ) {selector = anchor.hash;panelId = selector.substring( 1 );panel = that.element.find( that._sanitizeSelector( selector ) );// remote tab} else {// If the tab doesn't already have aria-controls,// generate an id by using a throw-away elementpanelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;selector = "#" + panelId;panel = that.element.find( selector );if ( !panel.length ) {panel = that._createPanel( panelId );panel.insertAfter( that.panels[ i - 1 ] || that.tablist );}panel.attr( "aria-live", "polite" );}if ( panel.length ) {that.panels = that.panels.add( panel );}if ( originalAriaControls ) {tab.data( "ui-tabs-aria-controls", originalAriaControls );}tab.attr( {"aria-controls": panelId,"aria-labelledby": anchorId} );panel.attr( "aria-labelledby", anchorId );} );this.panels.attr( "role", "tabpanel" );this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );// Avoid memory leaks (#10056)if ( prevTabs ) {this._off( prevTabs.not( this.tabs ) );this._off( prevAnchors.not( this.anchors ) );this._off( prevPanels.not( this.panels ) );}},// Allow overriding how to find the list for rare usage scenarios (#7715)_getList: function() {return this.tablist || this.element.find( "ol, ul" ).eq( 0 );},_createPanel: function( id ) {return $( "

    " ).attr( "id", id ).data( "ui-tabs-destroy", true );},_setOptionDisabled: function( disabled ) {var currentItem, li, i;if ( $.isArray( disabled ) ) {if ( !disabled.length ) {disabled = false;} else if ( disabled.length === this.anchors.length ) {disabled = true;}}// Disable tabsfor ( i = 0; ( li = this.tabs[ i ] ); i++ ) {currentItem = $( li );if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {currentItem.attr( "aria-disabled", "true" );this._addClass( currentItem, null, "ui-state-disabled" );} else {currentItem.removeAttr( "aria-disabled" );this._removeClass( currentItem, null, "ui-state-disabled" );}}this.options.disabled = disabled;this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,disabled === true );},_setupEvents: function( event ) {var events = {};if ( event ) {$.each( event.split( " " ), function( index, eventName ) {events[ eventName ] = "_eventHandler";} );}this._off( this.anchors.add( this.tabs ).add( this.panels ) );// Always prevent the default action, even when disabledthis._on( true, this.anchors, {click: function( event ) {event.preventDefault();}} );this._on( this.anchors, events );this._on( this.tabs, { keydown: "_tabKeydown" } );this._on( this.panels, { keydown: "_panelKeydown" } );this._focusable( this.tabs );this._hoverable( this.tabs );},_setupHeightStyle: function( heightStyle ) {var maxHeight,parent = this.element.parent();if ( heightStyle === "fill" ) {maxHeight = parent.height();maxHeight -= this.element.outerHeight() - this.element.height();this.element.siblings( ":visible" ).each( function() {var elem = $( this ),position = elem.css( "position" );if ( position === "absolute" || position === "fixed" ) {return;}maxHeight -= elem.outerHeight( true );} );this.element.children().not( this.panels ).each( function() {maxHeight -= $( this ).outerHeight( true );} );this.panels.each( function() {$( this ).height( Math.max( 0, maxHeight -$( this ).innerHeight() + $( this ).height() ) );} ).css( "overflow", "auto" );} else if ( heightStyle === "auto" ) {maxHeight = 0;this.panels.each( function() {maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );} ).height( maxHeight );}},_eventHandler: function( event ) {var options = this.options,active = this.active,anchor = $( event.currentTarget ),tab = anchor.closest( "li" ),clickedIsActive = tab[ 0 ] === active[ 0 ],collapsing = clickedIsActive && options.collapsible,toShow = collapsing ? $() : this._getPanelForTab( tab ),toHide = !active.length ? $() : this._getPanelForTab( active ),eventData = {oldTab: active,oldPanel: toHide,newTab: collapsing ? $() : tab,newPanel: toShow};event.preventDefault();if ( tab.hasClass( "ui-state-disabled" ) ||// tab is already loadingtab.hasClass( "ui-tabs-loading" ) ||// can't switch durning an animationthis.running ||// click on active header, but not collapsible( clickedIsActive && !options.collapsible ) ||// allow canceling activation( this._trigger( "beforeActivate", event, eventData ) === false ) ) {return;}options.active = collapsing ? false : this.tabs.index( tab );this.active = clickedIsActive ? $() : tab;if ( this.xhr ) {this.xhr.abort();}if ( !toHide.length && !toShow.length ) {$.error( "jQuery UI Tabs: Mismatching fragment identifier." );}if ( toShow.length ) {this.load( this.tabs.index( tab ), event );}this._toggle( event, eventData );},// Handles show/hide for selecting tabs_toggle: function( event, eventData ) {var that = this,toShow = eventData.newPanel,toHide = eventData.oldPanel;this.running = true;function complete() {that.running = false;that._trigger( "activate", event, eventData );}function show() {that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );if ( toShow.length && that.options.show ) {that._show( toShow, that.options.show, complete );} else {toShow.show();complete();}}// Start out by hiding, then showing, then completingif ( toHide.length && this.options.hide ) {this._hide( toHide, this.options.hide, function() {that._removeClass( eventData.oldTab.closest( "li" ),"ui-tabs-active", "ui-state-active" );show();} );} else {this._removeClass( eventData.oldTab.closest( "li" ),"ui-tabs-active", "ui-state-active" );toHide.hide();show();}toHide.attr( "aria-hidden", "true" );eventData.oldTab.attr( {"aria-selected": "false","aria-expanded": "false"} );// If we're switching tabs, remove the old tab from the tab order.// If we're opening from collapsed state, remove the previous tab from the tab order.// If we're collapsing, then keep the collapsing tab in the tab order.if ( toShow.length && toHide.length ) {eventData.oldTab.attr( "tabIndex", -1 );} else if ( toShow.length ) {this.tabs.filter( function() {return $( this ).attr( "tabIndex" ) === 0;} ).attr( "tabIndex", -1 );}toShow.attr( "aria-hidden", "false" );eventData.newTab.attr( {"aria-selected": "true","aria-expanded": "true",tabIndex: 0} );},_activate: function( index ) {var anchor,active = this._findActive( index );// Trying to activate the already active panelif ( active[ 0 ] === this.active[ 0 ] ) {return;}// Trying to collapse, simulate a click on the current active headerif ( !active.length ) {active = this.active;}anchor = active.find( ".ui-tabs-anchor" )[ 0 ];this._eventHandler( {target: anchor,currentTarget: anchor,preventDefault: $.noop} );},_findActive: function( index ) {return index === false ? $() : this.tabs.eq( index );},_getIndex: function( index ) {// meta-function to give users option to provide a href string instead of a numerical index.if ( typeof index === "string" ) {index = this.anchors.index( this.anchors.filter( "[href$='" +$.ui.escapeSelector( index ) + "']" ) );}return index;},_destroy: function() {if ( this.xhr ) {this.xhr.abort();}this.tablist.removeAttr( "role" ).off( this.eventNamespace );this.anchors.removeAttr( "role tabIndex" ).removeUniqueId();this.tabs.add( this.panels ).each( function() {if ( $.data( this, "ui-tabs-destroy" ) ) {$( this ).remove();} else {$( this ).removeAttr( "role tabIndex " +"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );}} );this.tabs.each( function() {var li = $( this ),prev = li.data( "ui-tabs-aria-controls" );if ( prev ) {li.attr( "aria-controls", prev ).removeData( "ui-tabs-aria-controls" );} else {li.removeAttr( "aria-controls" );}} );this.panels.show();if ( this.options.heightStyle !== "content" ) {this.panels.css( "height", "" );}},enable: function( index ) {var disabled = this.options.disabled;if ( disabled === false ) {return;}if ( index === undefined ) {disabled = false;} else {index = this._getIndex( index );if ( $.isArray( disabled ) ) {disabled = $.map( disabled, function( num ) {return num !== index ? num : null;} );} else {disabled = $.map( this.tabs, function( li, num ) {return num !== index ? num : null;} );}}this._setOptionDisabled( disabled );},disable: function( index ) {var disabled = this.options.disabled;if ( disabled === true ) {return;}if ( index === undefined ) {disabled = true;} else {index = this._getIndex( index );if ( $.inArray( index, disabled ) !== -1 ) {return;}if ( $.isArray( disabled ) ) {disabled = $.merge( [ index ], disabled ).sort();} else {disabled = [ index ];}}this._setOptionDisabled( disabled );},load: function( index, event ) {index = this._getIndex( index );var that = this,tab = this.tabs.eq( index ),anchor = tab.find( ".ui-tabs-anchor" ),panel = this._getPanelForTab( tab ),eventData = {tab: tab,panel: panel},complete = function( jqXHR, status ) {if ( status === "abort" ) {that.panels.stop( false, true );}that._removeClass( tab, "ui-tabs-loading" );panel.removeAttr( "aria-busy" );if ( jqXHR === that.xhr ) {delete that.xhr;}};// Not remoteif ( this._isLocal( anchor[ 0 ] ) ) {return;}this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );// Support: jQuery <1.8// jQuery <1.8 returns false if the request is canceled in beforeSend,// but as of 1.8, $.ajax() always returns a jqXHR object.if ( this.xhr && this.xhr.statusText !== "canceled" ) {this._addClass( tab, "ui-tabs-loading" );panel.attr( "aria-busy", "true" );this.xhr.done( function( response, status, jqXHR ) {// support: jQuery <1.8// http://bugs.jquery.com/ticket/11778setTimeout( function() {panel.html( response );that._trigger( "load", event, eventData );complete( jqXHR, status );}, 1 );} ).fail( function( jqXHR, status ) {// support: jQuery <1.8// http://bugs.jquery.com/ticket/11778setTimeout( function() {complete( jqXHR, status );}, 1 );} );}},_ajaxSettings: function( anchor, event, eventData ) {var that = this;return {// Support: IE <11 only// Strip any hash that exists to prevent errors with the Ajax requesturl: anchor.attr( "href" ).replace( /#.*$/, "" ),beforeSend: function( jqXHR, settings ) {return that._trigger( "beforeLoad", event,$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );}};},_getPanelForTab: function( tab ) {var id = $( tab ).attr( "aria-controls" );return this.element.find( this._sanitizeSelector( "#" + id ) );}} );// DEPRECATED// TODO: Switch return back to widget declaration at top of file when this is removedif ( $.uiBackCompat !== false ) {// Backcompat for ui-tab class (now ui-tabs-tab)$.widget( "ui.tabs", $.ui.tabs, {_processTabs: function() {this._superApply( arguments );this._addClass( this.tabs, "ui-tab" );}} );}var widgetsTabs = $.ui.tabs;/*!* jQuery UI Tooltip 1.12.1* http://jqueryui.com** Copyright jQuery Foundation and other contributors* Released under the MIT license.* http://jquery.org/license*///>>label: Tooltip//>>group: Widgets//>>description: Shows additional information for any element on hover or focus.//>>docs: http://api.jqueryui.com/tooltip///>>demos: http://jqueryui.com/tooltip///>>css.structure: ../../themes/base/core.css//>>css.structure: ../../themes/base/tooltip.css//>>css.theme: ../../themes/base/theme.css$.widget( "ui.tooltip", {version: "1.12.1",options: {classes: {"ui-tooltip": "ui-corner-all ui-widget-shadow"},content: function() {// support: IE<9, Opera in jQuery <1.7// .text() can't accept undefined, so coerce to a stringvar title = $( this ).attr( "title" ) || "";// Escape title, since we're going from an attribute to raw HTMLreturn $( "

    " ).text( title ).html();},hide: true,// Disabled elements have inconsistent behavior across browsers (#8661)items: "[title]:not([disabled])",position: {my: "left top+15",at: "left bottom",collision: "flipfit flip"},show: true,track: false,// Callbacksclose: null,open: null},_addDescribedBy: function( elem, id ) {var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );describedby.push( id );elem.data( "ui-tooltip-id", id ).attr( "aria-describedby", $.trim( describedby.join( " " ) ) );},_removeDescribedBy: function( elem ) {var id = elem.data( "ui-tooltip-id" ),describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),index = $.inArray( id, describedby );if ( index !== -1 ) {describedby.splice( index, 1 );}elem.removeData( "ui-tooltip-id" );describedby = $.trim( describedby.join( " " ) );if ( describedby ) {elem.attr( "aria-describedby", describedby );} else {elem.removeAttr( "aria-describedby" );}},_create: function() {this._on( {mouseover: "open",focusin: "open"} );// IDs of generated tooltips, needed for destroythis.tooltips = {};// IDs of parent tooltips where we removed the title attributethis.parents = {};// Append the aria-live region so tooltips announce correctlythis.liveRegion = $( "

    " ).attr( {role: "log","aria-live": "assertive","aria-relevant": "additions"} ).appendTo( this.document[ 0 ].body );this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );this.disabledTitles = $( [] );},_setOption: function( key, value ) {var that = this;this._super( key, value );if ( key === "content" ) {$.each( this.tooltips, function( id, tooltipData ) {that._updateContent( tooltipData.element );} );}},_setOptionDisabled: function( value ) {this[ value ? "_disable" : "_enable" ]();},_disable: function() {var that = this;// Close open tooltips$.each( this.tooltips, function( id, tooltipData ) {var event = $.Event( "blur" );event.target = event.currentTarget = tooltipData.element[ 0 ];that.close( event, true );} );// Remove title attributes to prevent native tooltipsthis.disabledTitles = this.disabledTitles.add(this.element.find( this.options.items ).addBack().filter( function() {var element = $( this );if ( element.is( "[title]" ) ) {return element.data( "ui-tooltip-title", element.attr( "title" ) ).removeAttr( "title" );}} ));},_enable: function() {// restore title attributesthis.disabledTitles.each( function() {var element = $( this );if ( element.data( "ui-tooltip-title" ) ) {element.attr( "title", element.data( "ui-tooltip-title" ) );}} );this.disabledTitles = $( [] );},open: function( event ) {var that = this,target = $( event ? event.target : this.element )// we need closest here due to mouseover bubbling,// but always pointing at the same event target.closest( this.options.items );// No element to show a tooltip for or the tooltip is already openif ( !target.length || target.data( "ui-tooltip-id" ) ) {return;}if ( target.attr( "title" ) ) {target.data( "ui-tooltip-title", target.attr( "title" ) );}target.data( "ui-tooltip-open", true );// Kill parent tooltips, custom or native, for hoverif ( event && event.type === "mouseover" ) {target.parents().each( function() {var parent = $( this ),blurEvent;if ( parent.data( "ui-tooltip-open" ) ) {blurEvent = $.Event( "blur" );blurEvent.target = blurEvent.currentTarget = this;that.close( blurEvent, true );}if ( parent.attr( "title" ) ) {parent.uniqueId();that.parents[ this.id ] = {element: this,title: parent.attr( "title" )};parent.attr( "title", "" );}} );}this._registerCloseHandlers( event, target );this._updateContent( target, event );},_updateContent: function( target, event ) {var content,contentOption = this.options.content,that = this,eventType = event ? event.type : null;if ( typeof contentOption === "string" || contentOption.nodeType ||contentOption.jquery ) {return this._open( event, target, contentOption );}content = contentOption.call( target[ 0 ], function( response ) {// IE may instantly serve a cached response for ajax requests// delay this call to _open so the other call to _open runs firstthat._delay( function() {// Ignore async response if tooltip was closed alreadyif ( !target.data( "ui-tooltip-open" ) ) {return;}// JQuery creates a special event for focusin when it doesn't// exist natively. To improve performance, the native event// object is reused and the type is changed. Therefore, we can't// rely on the type being correct after the event finished// bubbling, so we set it back to the previous value. (#8740)if ( event ) {event.type = eventType;}this._open( event, target, response );} );} );if ( content ) {this._open( event, target, content );}},_open: function( event, target, content ) {var tooltipData, tooltip, delayedShow, a11yContent,positionOption = $.extend( {}, this.options.position );if ( !content ) {return;}// Content can be updated multiple times. If the tooltip already// exists, then just update the content and bail.tooltipData = this._find( target );if ( tooltipData ) {tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );return;}// If we have a title, clear it to prevent the native tooltip// we have to check first to avoid defining a title if none exists// (we don't want to cause an element to start matching [title])//// We use removeAttr only for key events, to allow IE to export the correct// accessible attributes. For mouse events, set to empty string to avoid// native tooltip showing up (happens only when removing inside mouseover).if ( target.is( "[title]" ) ) {if ( event && event.type === "mouseover" ) {target.attr( "title", "" );} else {target.removeAttr( "title" );}}tooltipData = this._tooltip( target );tooltip = tooltipData.tooltip;this._addDescribedBy( target, tooltip.attr( "id" ) );tooltip.find( ".ui-tooltip-content" ).html( content );// Support: Voiceover on OS X, JAWS on IE <= 9// JAWS announces deletions even when aria-relevant="additions"// Voiceover will sometimes re-read the entire log region's contents from the beginningthis.liveRegion.children().hide();a11yContent = $( "

    " ).html( tooltip.find( ".ui-tooltip-content" ).html() );a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );a11yContent.appendTo( this.liveRegion );function position( event ) {positionOption.of = event;if ( tooltip.is( ":hidden" ) ) {return;}tooltip.position( positionOption );}if ( this.options.track && event && /^mouse/.test( event.type ) ) {this._on( this.document, {mousemove: position} );// trigger once to override element-relative positioningposition( event );} else {tooltip.position( $.extend( {of: target}, this.options.position ) );}tooltip.hide();this._show( tooltip, this.options.show );// Handle tracking tooltips that are shown with a delay (#8644). As soon// as the tooltip is visible, position the tooltip using the most recent// event.// Adds the check to add the timers only when both delay and track options are set (#14682)if ( this.options.track && this.options.show && this.options.show.delay ) {delayedShow = this.delayedShow = setInterval( function() {if ( tooltip.is( ":visible" ) ) {position( positionOption.of );clearInterval( delayedShow );}}, $.fx.interval );}this._trigger( "open", event, { tooltip: tooltip } );},_registerCloseHandlers: function( event, target ) {var events = {keyup: function( event ) {if ( event.keyCode === $.ui.keyCode.ESCAPE ) {var fakeEvent = $.Event( event );fakeEvent.currentTarget = target[ 0 ];this.close( fakeEvent, true );}}};// Only bind remove handler for delegated targets. Non-delegated// tooltips will handle this in destroy.if ( target[ 0 ] !== this.element[ 0 ] ) {events.remove = function() {this._removeTooltip( this._find( target ).tooltip );};}if ( !event || event.type === "mouseover" ) {events.mouseleave = "close";}if ( !event || event.type === "focusin" ) {events.focusout = "close";}this._on( true, target, events );},close: function( event ) {var tooltip,that = this,target = $( event ? event.currentTarget : this.element ),tooltipData = this._find( target );// The tooltip may already be closedif ( !tooltipData ) {// We set ui-tooltip-open immediately upon open (in open()), but only set the// additional data once there's actually content to show (in _open()). So even if the// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in// the period between open() and _open().target.removeData( "ui-tooltip-open" );return;}tooltip = tooltipData.tooltip;// Disabling closes the tooltip, so we need to track when we're closing// to avoid an infinite loop in case the tooltip becomes disabled on closeif ( tooltipData.closing ) {return;}// Clear the interval for delayed tracking tooltipsclearInterval( this.delayedShow );// Only set title if we had one before (see comment in _open())// If the title attribute has changed since open(), don't restoreif ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {target.attr( "title", target.data( "ui-tooltip-title" ) );}this._removeDescribedBy( target );tooltipData.hiding = true;tooltip.stop( true );this._hide( tooltip, this.options.hide, function() {that._removeTooltip( $( this ) );} );target.removeData( "ui-tooltip-open" );this._off( target, "mouseleave focusout keyup" );// Remove 'remove' binding only on delegated targetsif ( target[ 0 ] !== this.element[ 0 ] ) {this._off( target, "remove" );}this._off( this.document, "mousemove" );if ( event && event.type === "mouseleave" ) {$.each( this.parents, function( id, parent ) {$( parent.element ).attr( "title", parent.title );delete that.parents[ id ];} );}tooltipData.closing = true;this._trigger( "close", event, { tooltip: tooltip } );if ( !tooltipData.hiding ) {tooltipData.closing = false;}},_tooltip: function( element ) {var tooltip = $( "

    " ).attr( "role", "tooltip" ),content = $( "

    " ).appendTo( tooltip ),id = tooltip.uniqueId().attr( "id" );this._addClass( content, "ui-tooltip-content" );this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );tooltip.appendTo( this._appendTo( element ) );return this.tooltips[ id ] = {element: element,tooltip: tooltip};},_find: function( target ) {var id = target.data( "ui-tooltip-id" );return id ? this.tooltips[ id ] : null;},_removeTooltip: function( tooltip ) {tooltip.remove();delete this.tooltips[ tooltip.attr( "id" ) ];},_appendTo: function( target ) {var element = target.closest( ".ui-front, dialog" );if ( !element.length ) {element = this.document[ 0 ].body;}return element;},_destroy: function() {var that = this;// Close open tooltips$.each( this.tooltips, function( id, tooltipData ) {// Delegate to close method to handle common cleanupvar event = $.Event( "blur" ),element = tooltipData.element;event.target = event.currentTarget = element[ 0 ];that.close( event, true );// Remove immediately; destroying an open tooltip doesn't use the// hide animation$( "#" + id ).remove();// Restore the titleif ( element.data( "ui-tooltip-title" ) ) {// If the title attribute has changed since open(), don't restoreif ( !element.attr( "title" ) ) {element.attr( "title", element.data( "ui-tooltip-title" ) );}element.removeData( "ui-tooltip-title" );}} );this.liveRegion.remove();}} );// DEPRECATED// TODO: Switch return back to widget declaration at top of file when this is removedif ( $.uiBackCompat !== false ) {// Backcompat for tooltipClass option$.widget( "ui.tooltip", $.ui.tooltip, {options: {tooltipClass: null},_tooltip: function() {var tooltipData = this._superApply( arguments );if ( this.options.tooltipClass ) {tooltipData.tooltip.addClass( this.options.tooltipClass );}return tooltipData;}} );}var widgetsTooltip = $.ui.tooltip;}));

  • Top Articles
    Latest Posts
    Article information

    Author: Prof. Nancy Dach

    Last Updated: 2023/04/02

    Views: 6169

    Rating: 4.7 / 5 (57 voted)

    Reviews: 80% of readers found this page helpful

    Author information

    Name: Prof. Nancy Dach

    Birthday: 1993-08-23

    Address: 569 Waelchi Ports, South Blainebury, LA 11589

    Phone: +9958996486049

    Job: Sales Manager

    Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

    Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.