(function($,_1){
$.ui=$.ui||{};
if($.ui.version){
return;
}
$.extend($.ui,{version:"1.8.16",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});
$.fn.extend({propAttr:$.fn.prop||$.fn.attr,_focus:$.fn.focus,focus:function(_2,fn){
return typeof _2==="number"?this.each(function(){
var _3=this;
setTimeout(function(){
$(_3).focus();
if(fn){
fn.call(_3);
}
},_2);
}):this._focus.apply(this,arguments);
},scrollParent:function(){
var _4;
if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){
_4=this.parents().filter(function(){
return (/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1));
}).eq(0);
}else{
_4=this.parents().filter(function(){
return (/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1));
}).eq(0);
}
return (/fixed/).test(this.css("position"))||!_4.length?$(document):_4;
},zIndex:function(_5){
if(_5!==_1){
return this.css("zIndex",_5);
}
if(this.length){
var _6=$(this[0]),_7,_8;
while(_6.length&&_6[0]!==document){
_7=_6.css("position");
if(_7==="absolute"||_7==="relative"||_7==="fixed"){
_8=parseInt(_6.css("zIndex"),10);
if(!isNaN(_8)&&_8!==0){
return _8;
}
}
_6=_6.parent();
}
}
return 0;
},disableSelection:function(){
return this.bind(($.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(_9){
_9.preventDefault();
});
},enableSelection:function(){
return this.unbind(".ui-disableSelection");
}});
$.each(["Width","Height"],function(i,_a){
var _b=_a==="Width"?["Left","Right"]:["Top","Bottom"],_c=_a.toLowerCase(),_d={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};
function _e(_f,_10,_11,_12){
$.each(_b,function(){
_10-=parseFloat($.curCSS(_f,"padding"+this,true))||0;
if(_11){
_10-=parseFloat($.curCSS(_f,"border"+this+"Width",true))||0;
}
if(_12){
_10-=parseFloat($.curCSS(_f,"margin"+this,true))||0;
}
});
return _10;
};
$.fn["inner"+_a]=function(_13){
if(_13===_1){
return _d["inner"+_a].call(this);
}
return this.each(function(){
$(this).css(_c,_e(this,_13)+"px");
});
};
$.fn["outer"+_a]=function(_14,_15){
if(typeof _14!=="number"){
return _d["outer"+_a].call(this,_14);
}
return this.each(function(){
$(this).css(_c,_e(this,_14,true,_15)+"px");
});
};
});
function _16(_17,_18){
var _19=_17.nodeName.toLowerCase();
if("area"===_19){
var map=_17.parentNode,_1a=map.name,img;
if(!_17.href||!_1a||map.nodeName.toLowerCase()!=="map"){
return false;
}
img=$("img[usemap=#"+_1a+"]")[0];
return !!img&&_1b(img);
}
return (/input|select|textarea|button|object/.test(_19)?!_17.disabled:"a"==_19?_17.href||_18:_18)&&_1b(_17);
};
function _1b(_1c){
return !$(_1c).parents().andSelf().filter(function(){
return $.curCSS(this,"visibility")==="hidden"||$.expr.filters.hidden(this);
}).length;
};
$.extend($.expr[":"],{data:function(_1d,i,_1e){
return !!$.data(_1d,_1e[3]);
},focusable:function(_1f){
return _16(_1f,!isNaN($.attr(_1f,"tabindex")));
},tabbable:function(_20){
var _21=$.attr(_20,"tabindex"),_22=isNaN(_21);
return (_22||_21>=0)&&_16(_20,!_22);
}});
$(function(){
var _23=document.body,div=_23.appendChild(div=document.createElement("div"));
$.extend(div.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});
$.support.minHeight=div.offsetHeight===100;
$.support.selectstart="onselectstart" in div;
_23.removeChild(div).style.display="none";
});
$.extend($.ui,{plugin:{add:function(_24,_25,set){
var _26=$.ui[_24].prototype;
for(var i in set){
_26.plugins[i]=_26.plugins[i]||[];
_26.plugins[i].push([_25,set[i]]);
}
},call:function(_27,_28,_29){
var set=_27.plugins[_28];
if(!set||!_27.element[0].parentNode){
return;
}
for(var i=0;i<set.length;i++){
if(_27.options[set[i][0]]){
set[i][1].apply(_27.element,_29);
}
}
}},contains:function(a,b){
return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);
},hasScroll:function(el,a){
if($(el).css("overflow")==="hidden"){
return false;
}
var _2a=(a&&a==="left")?"scrollLeft":"scrollTop",has=false;
if(el[_2a]>0){
return true;
}
el[_2a]=1;
has=(el[_2a]>0);
el[_2a]=0;
return has;
},isOverAxis:function(x,_2b,_2c){
return (x>_2b)&&(x<(_2b+_2c));
},isOver:function(y,x,top,_2d,_2e,_2f){
return $.ui.isOverAxis(y,top,_2e)&&$.ui.isOverAxis(x,_2d,_2f);
}});
})(jQueryCS144);
(function($,_30){
if($.cleanData){
var _31=$.cleanData;
$.cleanData=function(_32){
for(var i=0,_33;(_33=_32[i])!=null;i++){
try{
$(_33).triggerHandler("remove");
}
catch(e){
}
}
_31(_32);
};
}else{
var _34=$.fn.remove;
$.fn.remove=function(_35,_36){
return this.each(function(){
if(!_36){
if(!_35||$.filter(_35,[this]).length){
$("*",this).add([this]).each(function(){
try{
$(this).triggerHandler("remove");
}
catch(e){
}
});
}
}
return _34.call($(this),_35,_36);
});
};
}
$.widget=function(_37,_38,_39){
var _3a=_37.split(".")[0],_3b;
_37=_37.split(".")[1];
_3b=_3a+"-"+_37;
if(!_39){
_39=_38;
_38=$.Widget;
}
$.expr[":"][_3b]=function(_3c){
return !!$.data(_3c,_37);
};
$[_3a]=$[_3a]||{};
$[_3a][_37]=function(_3d,_3e){
if(arguments.length){
this._createWidget(_3d,_3e);
}
};
var _3f=new _38();
_3f.options=$.extend(true,{},_3f.options);
$[_3a][_37].prototype=$.extend(true,_3f,{namespace:_3a,widgetName:_37,widgetEventPrefix:$[_3a][_37].prototype.widgetEventPrefix||_37,widgetBaseClass:_3b},_39);
$.widget.bridge(_37,$[_3a][_37]);
};
$.widget.bridge=function(_40,_41){
$.fn[_40]=function(_42){
var _43=typeof _42==="string",_44=Array.prototype.slice.call(arguments,1),_45=this;
_42=!_43&&_44.length?$.extend.apply(null,[true,_42].concat(_44)):_42;
if(_43&&_42.charAt(0)==="_"){
return _45;
}
if(_43){
this.each(function(){
var _46=$.data(this,_40),_47=_46&&$.isFunction(_46[_42])?_46[_42].apply(_46,_44):_46;
if(_47!==_46&&_47!==_30){
_45=_47;
return false;
}
});
}else{
this.each(function(){
var _48=$.data(this,_40);
if(_48){
_48.option(_42||{})._init();
}else{
$.data(this,_40,new _41(_42,this));
}
});
}
return _45;
};
};
$.Widget=function(_49,_4a){
if(arguments.length){
this._createWidget(_49,_4a);
}
};
$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(_4b,_4c){
$.data(_4c,this.widgetName,this);
this.element=$(_4c);
this.options=$.extend(true,{},this.options,this._getCreateOptions(),_4b);
var _4d=this;
this.element.bind("remove."+this.widgetName,function(){
_4d.destroy();
});
this._create();
this._trigger("create");
this._init();
},_getCreateOptions:function(){
return $.metadata&&$.metadata.get(this.element[0])[this.widgetName];
},_create:function(){
},_init:function(){
},destroy:function(){
this.element.unbind("."+this.widgetName).removeData(this.widgetName);
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled");
},widget:function(){
return this.element;
},option:function(key,_4e){
var _4f=key;
if(arguments.length===0){
return $.extend({},this.options);
}
if(typeof key==="string"){
if(_4e===_30){
return this.options[key];
}
_4f={};
_4f[key]=_4e;
}
this._setOptions(_4f);
return this;
},_setOptions:function(_50){
var _51=this;
$.each(_50,function(key,_52){
_51._setOption(key,_52);
});
return this;
},_setOption:function(key,_53){
this.options[key]=_53;
if(key==="disabled"){
this.widget()[_53?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",_53);
}
return this;
},enable:function(){
return this._setOption("disabled",false);
},disable:function(){
return this._setOption("disabled",true);
},_trigger:function(_54,_55,_56){
var _57=this.options[_54];
_55=$.Event(_55);
_55.type=(_54===this.widgetEventPrefix?_54:this.widgetEventPrefix+_54).toLowerCase();
_56=_56||{};
if(_55.originalEvent){
for(var i=$.event.props.length,_58;i;){
_58=$.event.props[--i];
_55[_58]=_55.originalEvent[_58];
}
}
this.element.trigger(_55,_56);
return !($.isFunction(_57)&&_57.call(this.element[0],_55,_56)===false||_55.isDefaultPrevented());
}};
})(jQueryCS144);
(function($,_59){
var _5a=false;
$(document).mouseup(function(e){
_5a=false;
});
$.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){
var _5b=this;
this.element.bind("mousedown."+this.widgetName,function(_5c){
return _5b._mouseDown(_5c);
}).bind("click."+this.widgetName,function(_5d){
if(true===$.data(_5d.target,_5b.widgetName+".preventClickEvent")){
$.removeData(_5d.target,_5b.widgetName+".preventClickEvent");
_5d.stopImmediatePropagation();
return false;
}
});
this.started=false;
},_mouseDestroy:function(){
this.element.unbind("."+this.widgetName);
},_mouseDown:function(_5e){
if(_5a){
return;
}
(this._mouseStarted&&this._mouseUp(_5e));
this._mouseDownEvent=_5e;
var _5f=this,_60=(_5e.which==1),_61=(typeof this.options.cancel=="string"&&_5e.target.nodeName?$(_5e.target).closest(this.options.cancel).length:false);
if(!_60||_61||!this._mouseCapture(_5e)){
return true;
}
this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){
this._mouseDelayTimer=setTimeout(function(){
_5f.mouseDelayMet=true;
},this.options.delay);
}
if(this._mouseDistanceMet(_5e)&&this._mouseDelayMet(_5e)){
this._mouseStarted=(this._mouseStart(_5e)!==false);
if(!this._mouseStarted){
_5e.preventDefault();
return true;
}
}
if(true===$.data(_5e.target,this.widgetName+".preventClickEvent")){
$.removeData(_5e.target,this.widgetName+".preventClickEvent");
}
this._mouseMoveDelegate=function(_62){
return _5f._mouseMove(_62);
};
this._mouseUpDelegate=function(_63){
return _5f._mouseUp(_63);
};
$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
_5e.preventDefault();
_5a=true;
return true;
},_mouseMove:function(_64){
if($.browser.msie&&!(document.documentMode>=9)&&!_64.button){
return this._mouseUp(_64);
}
if(this._mouseStarted){
this._mouseDrag(_64);
return _64.preventDefault();
}
if(this._mouseDistanceMet(_64)&&this._mouseDelayMet(_64)){
this._mouseStarted=(this._mouseStart(this._mouseDownEvent,_64)!==false);
(this._mouseStarted?this._mouseDrag(_64):this._mouseUp(_64));
}
return !this._mouseStarted;
},_mouseUp:function(_65){
$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){
this._mouseStarted=false;
if(_65.target==this._mouseDownEvent.target){
$.data(_65.target,this.widgetName+".preventClickEvent",true);
}
this._mouseStop(_65);
}
return false;
},_mouseDistanceMet:function(_66){
return (Math.max(Math.abs(this._mouseDownEvent.pageX-_66.pageX),Math.abs(this._mouseDownEvent.pageY-_66.pageY))>=this.options.distance);
},_mouseDelayMet:function(_67){
return this.mouseDelayMet;
},_mouseStart:function(_68){
},_mouseDrag:function(_69){
},_mouseStop:function(_6a){
},_mouseCapture:function(_6b){
return true;
}});
})(jQueryCS144);
(function($,_6c){
$.ui=$.ui||{};
var _6d=/left|center|right/,_6e=/top|center|bottom/,_6f="center",_70=$.fn.position,_71=$.fn.offset;
$.fn.position=function(_72){
if(!_72||!_72.of){
return _70.apply(this,arguments);
}
_72=$.extend({},_72);
var _73=$(_72.of),_74=_73[0],_75=(_72.collision||"flip").split(" "),_76=_72.offset?_72.offset.split(" "):[0,0],_77,_78,_79;
if(_74.nodeType===9){
_77=_73.width();
_78=_73.height();
_79={top:0,left:0};
}else{
if(_74.setTimeout){
_77=_73.width();
_78=_73.height();
_79={top:_73.scrollTop(),left:_73.scrollLeft()};
}else{
if(_74.preventDefault){
_72.at="left top";
_77=_78=0;
_79={top:_72.of.pageY,left:_72.of.pageX};
}else{
_77=_73.outerWidth();
_78=_73.outerHeight();
_79=_73.offset();
}
}
}
$.each(["my","at"],function(){
var pos=(_72[this]||"").split(" ");
if(pos.length===1){
pos=_6d.test(pos[0])?pos.concat([_6f]):_6e.test(pos[0])?[_6f].concat(pos):[_6f,_6f];
}
pos[0]=_6d.test(pos[0])?pos[0]:_6f;
pos[1]=_6e.test(pos[1])?pos[1]:_6f;
_72[this]=pos;
});
if(_75.length===1){
_75[1]=_75[0];
}
_76[0]=parseInt(_76[0],10)||0;
if(_76.length===1){
_76[1]=_76[0];
}
_76[1]=parseInt(_76[1],10)||0;
if(_72.at[0]==="right"){
_79.left+=_77;
}else{
if(_72.at[0]===_6f){
_79.left+=_77/2;
}
}
if(_72.at[1]==="bottom"){
_79.top+=_78;
}else{
if(_72.at[1]===_6f){
_79.top+=_78/2;
}
}
_79.left+=_76[0];
_79.top+=_76[1];
return this.each(function(){
var _7a=$(this),_7b=_7a.outerWidth(),_7c=_7a.outerHeight(),_7d=parseInt($.curCSS(this,"marginLeft",true))||0,_7e=parseInt($.curCSS(this,"marginTop",true))||0,_7f=_7b+_7d+(parseInt($.curCSS(this,"marginRight",true))||0),_80=_7c+_7e+(parseInt($.curCSS(this,"marginBottom",true))||0),_81=$.extend({},_79),_82;
if(_72.my[0]==="right"){
_81.left-=_7b;
}else{
if(_72.my[0]===_6f){
_81.left-=_7b/2;
}
}
if(_72.my[1]==="bottom"){
_81.top-=_7c;
}else{
if(_72.my[1]===_6f){
_81.top-=_7c/2;
}
}
_81.left=Math.round(_81.left);
_81.top=Math.round(_81.top);
_82={left:_81.left-_7d,top:_81.top-_7e};
$.each(["left","top"],function(i,dir){
if($.ui.position[_75[i]]){
$.ui.position[_75[i]][dir](_81,{targetWidth:_77,targetHeight:_78,elemWidth:_7b,elemHeight:_7c,collisionPosition:_82,collisionWidth:_7f,collisionHeight:_80,offset:_76,my:_72.my,at:_72.at});
}
});
if($.fn.bgiframe){
_7a.bgiframe();
}
_7a.offset($.extend(_81,{using:_72.using}));
});
};
$.ui.position={fit:{left:function(_83,_84){
var win=$(window),_85=_84.collisionPosition.left+_84.collisionWidth-win.width()-win.scrollLeft();
_83.left=_85>0?_83.left-_85:Math.max(_83.left-_84.collisionPosition.left,_83.left);
},top:function(_86,_87){
var win=$(window),_88=_87.collisionPosition.top+_87.collisionHeight-win.height()-win.scrollTop();
_86.top=_88>0?_86.top-_88:Math.max(_86.top-_87.collisionPosition.top,_86.top);
}},flip:{left:function(_89,_8a){
if(_8a.at[0]===_6f){
return;
}
var win=$(window),_8b=_8a.collisionPosition.left+_8a.collisionWidth-win.width()-win.scrollLeft(),_8c=_8a.my[0]==="left"?-_8a.elemWidth:_8a.my[0]==="right"?_8a.elemWidth:0,_8d=_8a.at[0]==="left"?_8a.targetWidth:-_8a.targetWidth,_8e=-2*_8a.offset[0];
_89.left+=_8a.collisionPosition.left<0?_8c+_8d+_8e:_8b>0?_8c+_8d+_8e:0;
},top:function(_8f,_90){
if(_90.at[1]===_6f){
return;
}
var win=$(window),_91=_90.collisionPosition.top+_90.collisionHeight-win.height()-win.scrollTop(),_92=_90.my[1]==="top"?-_90.elemHeight:_90.my[1]==="bottom"?_90.elemHeight:0,_93=_90.at[1]==="top"?_90.targetHeight:-_90.targetHeight,_94=-2*_90.offset[1];
_8f.top+=_90.collisionPosition.top<0?_92+_93+_94:_91>0?_92+_93+_94:0;
}}};
if(!$.offset.setOffset){
$.offset.setOffset=function(_95,_96){
if(/static/.test($.curCSS(_95,"position"))){
_95.style.position="relative";
}
var _97=$(_95),_98=_97.offset(),_99=parseInt($.curCSS(_95,"top",true),10)||0,_9a=parseInt($.curCSS(_95,"left",true),10)||0,_9b={top:(_96.top-_98.top)+_99,left:(_96.left-_98.left)+_9a};
if("using" in _96){
_96.using.call(_95,_9b);
}else{
_97.css(_9b);
}
};
$.fn.offset=function(_9c){
var _9d=this[0];
if(!_9d||!_9d.ownerDocument){
return null;
}
if(_9c){
return this.each(function(){
$.offset.setOffset(this,_9c);
});
}
return _71.call(this);
};
}
}(jQueryCS144));
(function($,_9e){
$.widget("ui.draggable",$.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){
if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){
this.element[0].style.position="relative";
}
(this.options.addClasses&&this.element.addClass("ui-draggable"));
(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));
this._mouseInit();
},destroy:function(){
if(!this.element.data("draggable")){
return;
}
this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable"+" ui-draggable-dragging"+" ui-draggable-disabled");
this._mouseDestroy();
return this;
},_mouseCapture:function(_9f){
var o=this.options;
if(this.helper||o.disabled||$(_9f.target).is(".ui-resizable-handle")){
return false;
}
this.handle=this._getHandle(_9f);
if(!this.handle){
return false;
}
if(o.iframeFix){
$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){
$("<div class=\"ui-draggable-iframeFix\" style=\"background: #fff;\"></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");
});
}
return true;
},_mouseStart:function(_a0){
var o=this.options;
this.helper=this._createHelper(_a0);
this._cacheHelperProportions();
if($.ui.ddmanager){
$.ui.ddmanager.current=this;
}
this._cacheMargins();
this.cssPosition=this.helper.css("position");
this.scrollParent=this.helper.scrollParent();
this.offset=this.positionAbs=this.element.offset();
this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};
$.extend(this.offset,{click:{left:_a0.pageX-this.offset.left,top:_a0.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(_a0);
this.originalPageX=_a0.pageX;
this.originalPageY=_a0.pageY;
(o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt));
if(o.containment){
this._setContainment();
}
if(this._trigger("start",_a0)===false){
this._clear();
return false;
}
this._cacheHelperProportions();
if($.ui.ddmanager&&!o.dropBehaviour){
$.ui.ddmanager.prepareOffsets(this,_a0);
}
this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(_a0,true);
if($.ui.ddmanager){
$.ui.ddmanager.dragStart(this,_a0);
}
return true;
},_mouseDrag:function(_a1,_a2){
this.position=this._generatePosition(_a1);
this.positionAbs=this._convertPositionTo("absolute");
if(!_a2){
var ui=this._uiHash();
if(this._trigger("drag",_a1,ui)===false){
this._mouseUp({});
return false;
}
this.position=ui.position;
}
if(!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";
}
if($.ui.ddmanager){
$.ui.ddmanager.drag(this,_a1);
}
return false;
},_mouseStop:function(_a3){
var _a4=false;
if($.ui.ddmanager&&!this.options.dropBehaviour){
_a4=$.ui.ddmanager.drop(this,_a3);
}
if(this.dropped){
_a4=this.dropped;
this.dropped=false;
}
if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){
return false;
}
if((this.options.revert=="invalid"&&!_a4)||(this.options.revert=="valid"&&_a4)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,_a4))){
var _a5=this;
$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){
if(_a5._trigger("stop",_a3)!==false){
_a5._clear();
}
});
}else{
if(this._trigger("stop",_a3)!==false){
this._clear();
}
}
return false;
},_mouseUp:function(_a6){
if(this.options.iframeFix===true){
$("div.ui-draggable-iframeFix").each(function(){
this.parentNode.removeChild(this);
});
}
if($.ui.ddmanager){
$.ui.ddmanager.dragStop(this,_a6);
}
return $.ui.mouse.prototype._mouseUp.call(this,_a6);
},cancel:function(){
if(this.helper.is(".ui-draggable-dragging")){
this._mouseUp({});
}else{
this._clear();
}
return this;
},_getHandle:function(_a7){
var _a8=!this.options.handle||!$(this.options.handle,this.element).length?true:false;
$(this.options.handle,this.element).find("*").andSelf().each(function(){
if(this==_a7.target){
_a8=true;
}
});
return _a8;
},_createHelper:function(_a9){
var o=this.options;
var _aa=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[_a9])):(o.helper=="clone"?this.element.clone().removeAttr("id"):this.element);
if(!_aa.parents("body").length){
_aa.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo));
}
if(_aa[0]!=this.element[0]&&!(/(fixed|absolute)/).test(_aa.css("position"))){
_aa.css("position","absolute");
}
return _aa;
},_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(){
this.offsetParent=this.helper.offsetParent();
var po=this.offsetParent.offset();
if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){
po.left+=this.scrollParent.scrollLeft();
po.top+=this.scrollParent.scrollTop();
}
if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){
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.element.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.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)};
},_cacheHelperProportions:function(){
this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};
},_setContainment:function(){
var o=this.options;
if(o.containment=="parent"){
o.containment=this.helper[0].parentNode;
}
if(o.containment=="document"||o.containment=="window"){
this.containment=[o.containment=="document"?0:$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,o.containment=="document"?0:$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(o.containment=="document"?0:$(window).scrollLeft())+$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(o.containment=="document"?0:$(window).scrollTop())+($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];
}
if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){
var c=$(o.containment);
var ce=c[0];
if(!ce){
return;
}
var co=c.offset();
var _ab=($(ce).css("overflow")!="hidden");
this.containment=[(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0),(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0),(_ab?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-this.margins.right,(_ab?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-this.margins.bottom];
this.relative_container=c;
}else{
if(o.containment.constructor==Array){
this.containment=o.containment;
}
}
},_convertPositionTo:function(d,pos){
if(!pos){
pos=this.position;
}
var mod=d=="absolute"?1:-1;
var o=this.options,_ac=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,_ad=(/(html|body)/i).test(_ac[0].tagName);
return {top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&$.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(_ad?0:_ac.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&$.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():_ad?0:_ac.scrollLeft())*mod))};
},_generatePosition:function(_ae){
var o=this.options,_af=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,_b0=(/(html|body)/i).test(_af[0].tagName);
var _b1=_ae.pageX;
var _b2=_ae.pageY;
if(this.originalPosition){
var _b3;
if(this.containment){
if(this.relative_container){
var co=this.relative_container.offset();
_b3=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top];
}else{
_b3=this.containment;
}
if(_ae.pageX-this.offset.click.left<_b3[0]){
_b1=_b3[0]+this.offset.click.left;
}
if(_ae.pageY-this.offset.click.top<_b3[1]){
_b2=_b3[1]+this.offset.click.top;
}
if(_ae.pageX-this.offset.click.left>_b3[2]){
_b1=_b3[2]+this.offset.click.left;
}
if(_ae.pageY-this.offset.click.top>_b3[3]){
_b2=_b3[3]+this.offset.click.top;
}
}
if(o.grid){
var top=o.grid[1]?this.originalPageY+Math.round((_b2-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY;
_b2=_b3?(!(top-this.offset.click.top<_b3[1]||top-this.offset.click.top>_b3[3])?top:(!(top-this.offset.click.top<_b3[1])?top-o.grid[1]:top+o.grid[1])):top;
var _b4=o.grid[0]?this.originalPageX+Math.round((_b1-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX;
_b1=_b3?(!(_b4-this.offset.click.left<_b3[0]||_b4-this.offset.click.left>_b3[2])?_b4:(!(_b4-this.offset.click.left<_b3[0])?_b4-o.grid[0]:_b4+o.grid[0])):_b4;
}
}
return {top:(_b2-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&$.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(_b0?0:_af.scrollTop())))),left:(_b1-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&$.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():_b0?0:_af.scrollLeft())))};
},_clear:function(){
this.helper.removeClass("ui-draggable-dragging");
if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){
this.helper.remove();
}
this.helper=null;
this.cancelHelperRemoval=false;
},_trigger:function(_b5,_b6,ui){
ui=ui||this._uiHash();
$.ui.plugin.call(this,_b5,[_b6,ui]);
if(_b5=="drag"){
this.positionAbs=this._convertPositionTo("absolute");
}
return $.Widget.prototype._trigger.call(this,_b5,_b6,ui);
},plugins:{},_uiHash:function(_b7){
return {helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs};
}});
$.extend($.ui.draggable,{version:"1.8.16"});
$.ui.plugin.add("draggable","connectToSortable",{start:function(_b8,ui){
var _b9=$(this).data("draggable"),o=_b9.options,_ba=$.extend({},ui,{item:_b9.element});
_b9.sortables=[];
$(o.connectToSortable).each(function(){
var _bb=$.data(this,"sortable");
if(_bb&&!_bb.options.disabled){
_b9.sortables.push({instance:_bb,shouldRevert:_bb.options.revert});
_bb.refreshPositions();
_bb._trigger("activate",_b8,_ba);
}
});
},stop:function(_bc,ui){
var _bd=$(this).data("draggable"),_be=$.extend({},ui,{item:_bd.element});
$.each(_bd.sortables,function(){
if(this.instance.isOver){
this.instance.isOver=0;
_bd.cancelHelperRemoval=true;
this.instance.cancelHelperRemoval=false;
if(this.shouldRevert){
this.instance.options.revert=true;
}
this.instance._mouseStop(_bc);
this.instance.options.helper=this.instance.options._helper;
if(_bd.options.helper=="original"){
this.instance.currentItem.css({top:"auto",left:"auto"});
}
}else{
this.instance.cancelHelperRemoval=false;
this.instance._trigger("deactivate",_bc,_be);
}
});
},drag:function(_bf,ui){
var _c0=$(this).data("draggable"),_c1=this;
var _c2=function(o){
var _c3=this.offset.click.top,_c4=this.offset.click.left;
var _c5=this.positionAbs.top,_c6=this.positionAbs.left;
var _c7=o.height,_c8=o.width;
var _c9=o.top,_ca=o.left;
return $.ui.isOver(_c5+_c3,_c6+_c4,_c9,_ca,_c7,_c8);
};
$.each(_c0.sortables,function(i){
this.instance.positionAbs=_c0.positionAbs;
this.instance.helperProportions=_c0.helperProportions;
this.instance.offset.click=_c0.offset.click;
if(this.instance._intersectsWith(this.instance.containerCache)){
if(!this.instance.isOver){
this.instance.isOver=1;
this.instance.currentItem=$(_c1).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
this.instance.options._helper=this.instance.options.helper;
this.instance.options.helper=function(){
return ui.helper[0];
};
_bf.target=this.instance.currentItem[0];
this.instance._mouseCapture(_bf,true);
this.instance._mouseStart(_bf,true,true);
this.instance.offset.click.top=_c0.offset.click.top;
this.instance.offset.click.left=_c0.offset.click.left;
this.instance.offset.parent.left-=_c0.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=_c0.offset.parent.top-this.instance.offset.parent.top;
_c0._trigger("toSortable",_bf);
_c0.dropped=this.instance.element;
_c0.currentItem=_c0.element;
this.instance.fromOutside=_c0;
}
if(this.instance.currentItem){
this.instance._mouseDrag(_bf);
}
}else{
if(this.instance.isOver){
this.instance.isOver=0;
this.instance.cancelHelperRemoval=true;
this.instance.options.revert=false;
this.instance._trigger("out",_bf,this.instance._uiHash(this.instance));
this.instance._mouseStop(_bf,true);
this.instance.options.helper=this.instance.options._helper;
this.instance.currentItem.remove();
if(this.instance.placeholder){
this.instance.placeholder.remove();
}
_c0._trigger("fromSortable",_bf);
_c0.dropped=false;
}
}
});
}});
$.ui.plugin.add("draggable","cursor",{start:function(_cb,ui){
var t=$("body"),o=$(this).data("draggable").options;
if(t.css("cursor")){
o._cursor=t.css("cursor");
}
t.css("cursor",o.cursor);
},stop:function(_cc,ui){
var o=$(this).data("draggable").options;
if(o._cursor){
$("body").css("cursor",o._cursor);
}
}});
$.ui.plugin.add("draggable","opacity",{start:function(_cd,ui){
var t=$(ui.helper),o=$(this).data("draggable").options;
if(t.css("opacity")){
o._opacity=t.css("opacity");
}
t.css("opacity",o.opacity);
},stop:function(_ce,ui){
var o=$(this).data("draggable").options;
if(o._opacity){
$(ui.helper).css("opacity",o._opacity);
}
}});
$.ui.plugin.add("draggable","scroll",{start:function(_cf,ui){
var i=$(this).data("draggable");
if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){
i.overflowOffset=i.scrollParent.offset();
}
},drag:function(_d0,ui){
var i=$(this).data("draggable"),o=i.options,_d1=false;
if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){
if(!o.axis||o.axis!="x"){
if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-_d0.pageY<o.scrollSensitivity){
i.scrollParent[0].scrollTop=_d1=i.scrollParent[0].scrollTop+o.scrollSpeed;
}else{
if(_d0.pageY-i.overflowOffset.top<o.scrollSensitivity){
i.scrollParent[0].scrollTop=_d1=i.scrollParent[0].scrollTop-o.scrollSpeed;
}
}
}
if(!o.axis||o.axis!="y"){
if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-_d0.pageX<o.scrollSensitivity){
i.scrollParent[0].scrollLeft=_d1=i.scrollParent[0].scrollLeft+o.scrollSpeed;
}else{
if(_d0.pageX-i.overflowOffset.left<o.scrollSensitivity){
i.scrollParent[0].scrollLeft=_d1=i.scrollParent[0].scrollLeft-o.scrollSpeed;
}
}
}
}else{
if(!o.axis||o.axis!="x"){
if(_d0.pageY-$(document).scrollTop()<o.scrollSensitivity){
_d1=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);
}else{
if($(window).height()-(_d0.pageY-$(document).scrollTop())<o.scrollSensitivity){
_d1=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);
}
}
}
if(!o.axis||o.axis!="y"){
if(_d0.pageX-$(document).scrollLeft()<o.scrollSensitivity){
_d1=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);
}else{
if($(window).width()-(_d0.pageX-$(document).scrollLeft())<o.scrollSensitivity){
_d1=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);
}
}
}
}
if(_d1!==false&&$.ui.ddmanager&&!o.dropBehaviour){
$.ui.ddmanager.prepareOffsets(i,_d0);
}
}});
$.ui.plugin.add("draggable","snap",{start:function(_d2,ui){
var i=$(this).data("draggable"),o=i.options;
i.snapElements=[];
$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){
var $t=$(this);
var $o=$t.offset();
if(this!=i.element[0]){
i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});
}
});
},drag:function(_d3,ui){
var _d4=$(this).data("draggable"),o=_d4.options;
var d=o.snapTolerance;
var x1=ui.offset.left,x2=x1+_d4.helperProportions.width,y1=ui.offset.top,y2=y1+_d4.helperProportions.height;
for(var i=_d4.snapElements.length-1;i>=0;i--){
var l=_d4.snapElements[i].left,r=l+_d4.snapElements[i].width,t=_d4.snapElements[i].top,b=t+_d4.snapElements[i].height;
if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){
if(_d4.snapElements[i].snapping){
(_d4.options.snap.release&&_d4.options.snap.release.call(_d4.element,_d3,$.extend(_d4._uiHash(),{snapItem:_d4.snapElements[i].item})));
}
_d4.snapElements[i].snapping=false;
continue;
}
if(o.snapMode!="inner"){
var ts=Math.abs(t-y2)<=d;
var bs=Math.abs(b-y1)<=d;
var ls=Math.abs(l-x2)<=d;
var rs=Math.abs(r-x1)<=d;
if(ts){
ui.position.top=_d4._convertPositionTo("relative",{top:t-_d4.helperProportions.height,left:0}).top-_d4.margins.top;
}
if(bs){
ui.position.top=_d4._convertPositionTo("relative",{top:b,left:0}).top-_d4.margins.top;
}
if(ls){
ui.position.left=_d4._convertPositionTo("relative",{top:0,left:l-_d4.helperProportions.width}).left-_d4.margins.left;
}
if(rs){
ui.position.left=_d4._convertPositionTo("relative",{top:0,left:r}).left-_d4.margins.left;
}
}
var _d5=(ts||bs||ls||rs);
if(o.snapMode!="outer"){
var ts=Math.abs(t-y1)<=d;
var bs=Math.abs(b-y2)<=d;
var ls=Math.abs(l-x1)<=d;
var rs=Math.abs(r-x2)<=d;
if(ts){
ui.position.top=_d4._convertPositionTo("relative",{top:t,left:0}).top-_d4.margins.top;
}
if(bs){
ui.position.top=_d4._convertPositionTo("relative",{top:b-_d4.helperProportions.height,left:0}).top-_d4.margins.top;
}
if(ls){
ui.position.left=_d4._convertPositionTo("relative",{top:0,left:l}).left-_d4.margins.left;
}
if(rs){
ui.position.left=_d4._convertPositionTo("relative",{top:0,left:r-_d4.helperProportions.width}).left-_d4.margins.left;
}
}
if(!_d4.snapElements[i].snapping&&(ts||bs||ls||rs||_d5)){
(_d4.options.snap.snap&&_d4.options.snap.snap.call(_d4.element,_d3,$.extend(_d4._uiHash(),{snapItem:_d4.snapElements[i].item})));
}
_d4.snapElements[i].snapping=(ts||bs||ls||rs||_d5);
}
}});
$.ui.plugin.add("draggable","stack",{start:function(_d6,ui){
var o=$(this).data("draggable").options;
var _d7=$.makeArray($(o.stack)).sort(function(a,b){
return (parseInt($(a).css("zIndex"),10)||0)-(parseInt($(b).css("zIndex"),10)||0);
});
if(!_d7.length){
return;
}
var min=parseInt(_d7[0].style.zIndex)||0;
$(_d7).each(function(i){
this.style.zIndex=min+i;
});
this[0].style.zIndex=min+_d7.length;
}});
$.ui.plugin.add("draggable","zIndex",{start:function(_d8,ui){
var t=$(ui.helper),o=$(this).data("draggable").options;
if(t.css("zIndex")){
o._zIndex=t.css("zIndex");
}
t.css("zIndex",o.zIndex);
},stop:function(_d9,ui){
var o=$(this).data("draggable").options;
if(o._zIndex){
$(ui.helper).css("zIndex",o._zIndex);
}
}});
})(jQueryCS144);
(function($,_da){
$.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){
var o=this.options,_db=o.accept;
this.isover=0;
this.isout=1;
this.accept=$.isFunction(_db)?_db:function(d){
return d.is(_db);
};
this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};
$.ui.ddmanager.droppables[o.scope]=$.ui.ddmanager.droppables[o.scope]||[];
$.ui.ddmanager.droppables[o.scope].push(this);
(o.addClasses&&this.element.addClass("ui-droppable"));
},destroy:function(){
var _dc=$.ui.ddmanager.droppables[this.options.scope];
for(var i=0;i<_dc.length;i++){
if(_dc[i]==this){
_dc.splice(i,1);
}
}
this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");
return this;
},_setOption:function(key,_dd){
if(key=="accept"){
this.accept=$.isFunction(_dd)?_dd:function(d){
return d.is(_dd);
};
}
$.Widget.prototype._setOption.apply(this,arguments);
},_activate:function(_de){
var _df=$.ui.ddmanager.current;
if(this.options.activeClass){
this.element.addClass(this.options.activeClass);
}
(_df&&this._trigger("activate",_de,this.ui(_df)));
},_deactivate:function(_e0){
var _e1=$.ui.ddmanager.current;
if(this.options.activeClass){
this.element.removeClass(this.options.activeClass);
}
(_e1&&this._trigger("deactivate",_e0,this.ui(_e1)));
},_over:function(_e2){
var _e3=$.ui.ddmanager.current;
if(!_e3||(_e3.currentItem||_e3.element)[0]==this.element[0]){
return;
}
if(this.accept.call(this.element[0],(_e3.currentItem||_e3.element))){
if(this.options.hoverClass){
this.element.addClass(this.options.hoverClass);
}
this._trigger("over",_e2,this.ui(_e3));
}
},_out:function(_e4){
var _e5=$.ui.ddmanager.current;
if(!_e5||(_e5.currentItem||_e5.element)[0]==this.element[0]){
return;
}
if(this.accept.call(this.element[0],(_e5.currentItem||_e5.element))){
if(this.options.hoverClass){
this.element.removeClass(this.options.hoverClass);
}
this._trigger("out",_e4,this.ui(_e5));
}
},_drop:function(_e6,_e7){
var _e8=_e7||$.ui.ddmanager.current;
if(!_e8||(_e8.currentItem||_e8.element)[0]==this.element[0]){
return false;
}
var _e9=false;
this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){
var _ea=$.data(this,"droppable");
if(_ea.options.greedy&&!_ea.options.disabled&&_ea.options.scope==_e8.options.scope&&_ea.accept.call(_ea.element[0],(_e8.currentItem||_e8.element))&&$.ui.intersect(_e8,$.extend(_ea,{offset:_ea.element.offset()}),_ea.options.tolerance)){
_e9=true;
return false;
}
});
if(_e9){
return false;
}
if(this.accept.call(this.element[0],(_e8.currentItem||_e8.element))){
if(this.options.activeClass){
this.element.removeClass(this.options.activeClass);
}
if(this.options.hoverClass){
this.element.removeClass(this.options.hoverClass);
}
this._trigger("drop",_e6,this.ui(_e8));
return this.element;
}
return false;
},ui:function(c){
return {draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,offset:c.positionAbs};
}});
$.extend($.ui.droppable,{version:"1.8.16"});
$.ui.intersect=function(_eb,_ec,_ed){
if(!_ec.offset){
return false;
}
var x1=(_eb.positionAbs||_eb.position.absolute).left,x2=x1+_eb.helperProportions.width,y1=(_eb.positionAbs||_eb.position.absolute).top,y2=y1+_eb.helperProportions.height;
var l=_ec.offset.left,r=l+_ec.proportions.width,t=_ec.offset.top,b=t+_ec.proportions.height;
switch(_ed){
case "fit":
return (l<=x1&&x2<=r&&t<=y1&&y2<=b);
break;
case "intersect":
return (l<x1+(_eb.helperProportions.width/2)&&x2-(_eb.helperProportions.width/2)<r&&t<y1+(_eb.helperProportions.height/2)&&y2-(_eb.helperProportions.height/2)<b);
break;
case "pointer":
var _ee=((_eb.positionAbs||_eb.position.absolute).left+(_eb.clickOffset||_eb.offset.click).left),_ef=((_eb.positionAbs||_eb.position.absolute).top+(_eb.clickOffset||_eb.offset.click).top),_f0=$.ui.isOver(_ef,_ee,t,l,_ec.proportions.height,_ec.proportions.width);
return _f0;
break;
case "touch":
return ((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));
break;
default:
return false;
break;
}
};
$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,_f1){
var m=$.ui.ddmanager.droppables[t.options.scope]||[];
var _f2=_f1?_f1.type:null;
var _f3=(t.currentItem||t.element).find(":data(droppable)").andSelf();
droppablesLoop:
for(var i=0;i<m.length;i++){
if(m[i].options.disabled||(t&&!m[i].accept.call(m[i].element[0],(t.currentItem||t.element)))){
continue;
}
for(var j=0;j<_f3.length;j++){
if(_f3[j]==m[i].element[0]){
m[i].proportions.height=0;
continue droppablesLoop;
}
}
m[i].visible=m[i].element.css("display")!="none";
if(!m[i].visible){
continue;
}
if(_f2=="mousedown"){
m[i]._activate.call(m[i],_f1);
}
m[i].offset=m[i].element.offset();
m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};
}
},drop:function(_f4,_f5){
var _f6=false;
$.each($.ui.ddmanager.droppables[_f4.options.scope]||[],function(){
if(!this.options){
return;
}
if(!this.options.disabled&&this.visible&&$.ui.intersect(_f4,this,this.options.tolerance)){
_f6=_f6||this._drop.call(this,_f5);
}
if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(_f4.currentItem||_f4.element))){
this.isout=1;
this.isover=0;
this._deactivate.call(this,_f5);
}
});
return _f6;
},dragStart:function(_f7,_f8){
_f7.element.parents(":not(body,html)").bind("scroll.droppable",function(){
if(!_f7.options.refreshPositions){
$.ui.ddmanager.prepareOffsets(_f7,_f8);
}
});
},drag:function(_f9,_fa){
if(_f9.options.refreshPositions){
$.ui.ddmanager.prepareOffsets(_f9,_fa);
}
$.each($.ui.ddmanager.droppables[_f9.options.scope]||[],function(){
if(this.options.disabled||this.greedyChild||!this.visible){
return;
}
var _fb=$.ui.intersect(_f9,this,this.options.tolerance);
var c=!_fb&&this.isover==1?"isout":(_fb&&this.isover==0?"isover":null);
if(!c){
return;
}
var _fc;
if(this.options.greedy){
var _fd=this.element.parents(":data(droppable):eq(0)");
if(_fd.length){
_fc=$.data(_fd[0],"droppable");
_fc.greedyChild=(c=="isover"?1:0);
}
}
if(_fc&&c=="isover"){
_fc["isover"]=0;
_fc["isout"]=1;
_fc._out.call(_fc,_fa);
}
this[c]=1;
this[c=="isout"?"isover":"isout"]=0;
this[c=="isover"?"_over":"_out"].call(this,_fa);
if(_fc&&c=="isout"){
_fc["isout"]=0;
_fc["isover"]=1;
_fc._over.call(_fc,_fa);
}
});
},dragStop:function(_fe,_ff){
_fe.element.parents(":not(body,html)").unbind("scroll.droppable");
if(!_fe.options.refreshPositions){
$.ui.ddmanager.prepareOffsets(_fe,_ff);
}
}};
})(jQueryCS144);
(function($,_100){
$.widget("ui.resizable",$.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){
var self=this,o=this.options;
this.element.addClass("ui-resizable");
$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){
if(/relative/.test(this.element.css("position"))&&$.browser.opera){
this.element.css({position:"relative",top:"auto",left:"auto"});
}
this.element.wrap($("<div class=\"ui-wrapper\" style=\"overflow: hidden;\"></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));
this.element=this.element.parent().data("resizable",this.element.data("resizable"));
this.elementIsWrapper=true;
this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});
this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});
this.originalResizeStyle=this.originalElement.css("resize");
this.originalElement.css("resize","none");
this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));
this.originalElement.css({margin:this.originalElement.css("margin")});
this._proportionallyResize();
}
this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});
if(this.handles.constructor==String){
if(this.handles=="all"){
this.handles="n,e,s,w,se,sw,ne,nw";
}
var n=this.handles.split(",");
this.handles={};
for(var i=0;i<n.length;i++){
var _101=$.trim(n[i]),_102="ui-resizable-"+_101;
var axis=$("<div class=\"ui-resizable-handle "+_102+"\"></div>");
if(/sw|se|ne|nw/.test(_101)){
axis.css({zIndex:++o.zIndex});
}
if("se"==_101){
axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
}
this.handles[_101]=".ui-resizable-"+_101;
this.element.append(axis);
}
}
this._renderAxis=function(_103){
_103=_103||this.element;
for(var i in this.handles){
if(this.handles[i].constructor==String){
this.handles[i]=$(this.handles[i],this.element).show();
}
if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){
var axis=$(this.handles[i],this.element),_104=0;
_104=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();
var _105=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");
_103.css(_105,_104);
this._proportionallyResize();
}
if(!$(this.handles[i]).length){
continue;
}
}
};
this._renderAxis(this.element);
this._handles=$(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){
if(!self.resizing){
if(this.className){
var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
}
self.axis=axis&&axis[1]?axis[1]:"se";
}
});
if(o.autoHide){
this._handles.hide();
$(this.element).addClass("ui-resizable-autohide").hover(function(){
if(o.disabled){
return;
}
$(this).removeClass("ui-resizable-autohide");
self._handles.show();
},function(){
if(o.disabled){
return;
}
if(!self.resizing){
$(this).addClass("ui-resizable-autohide");
self._handles.hide();
}
});
}
this._mouseInit();
},destroy:function(){
this._mouseDestroy();
var _106=function(exp){
$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
};
if(this.elementIsWrapper){
_106(this.element);
var _107=this.element;
_107.after(this.originalElement.css({position:_107.css("position"),width:_107.outerWidth(),height:_107.outerHeight(),top:_107.css("top"),left:_107.css("left")})).remove();
}
this.originalElement.css("resize",this.originalResizeStyle);
_106(this.originalElement);
return this;
},_mouseCapture:function(_108){
var _109=false;
for(var i in this.handles){
if($(this.handles[i])[0]==_108.target){
_109=true;
}
}
return !this.options.disabled&&_109;
},_mouseStart:function(_10a){
var o=this.options,_10b=this.element.position(),el=this.element;
this.resizing=true;
this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};
if(el.is(".ui-draggable")||(/absolute/).test(el.css("position"))){
el.css({position:"absolute",top:_10b.top,left:_10b.left});
}
if($.browser.opera&&(/relative/).test(el.css("position"))){
el.css({position:"relative",top:"auto",left:"auto"});
}
this._renderProxy();
var _10c=num(this.helper.css("left")),_10d=num(this.helper.css("top"));
if(o.containment){
_10c+=$(o.containment).scrollLeft()||0;
_10d+=$(o.containment).scrollTop()||0;
}
this.offset=this.helper.offset();
this.position={left:_10c,top:_10d};
this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};
this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};
this.originalPosition={left:_10c,top:_10d};
this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};
this.originalMousePosition={left:_10a.pageX,top:_10a.pageY};
this.aspectRatio=(typeof o.aspectRatio=="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);
var _10e=$(".ui-resizable-"+this.axis).css("cursor");
$("body").css("cursor",_10e=="auto"?this.axis+"-resize":_10e);
el.addClass("ui-resizable-resizing");
this._propagate("start",_10a);
return true;
},_mouseDrag:function(_10f){
var el=this.helper,o=this.options,_110={},self=this,smp=this.originalMousePosition,a=this.axis;
var dx=(_10f.pageX-smp.left)||0,dy=(_10f.pageY-smp.top)||0;
var _111=this._change[a];
if(!_111){
return false;
}
var data=_111.apply(this,[_10f,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,_112=this.sizeDiff;
this._updateVirtualBoundaries(_10f.shiftKey);
if(this._aspectRatio||_10f.shiftKey){
data=this._updateRatio(data,_10f);
}
data=this._respectSize(data,_10f);
this._propagate("resize",_10f);
el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});
if(!this._helper&&this._proportionallyResizeElements.length){
this._proportionallyResize();
}
this._updateCache(data);
this._trigger("resize",_10f,this.ui());
return false;
},_mouseStop:function(_113){
this.resizing=false;
var o=this.options,self=this;
if(this._helper){
var pr=this._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),_114=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,_115=ista?0:self.sizeDiff.width;
var s={width:(self.helper.width()-_115),height:(self.helper.height()-_114)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;
if(!o.animate){
this.element.css($.extend(s,{top:top,left:left}));
}
self.helper.height(self.size.height);
self.helper.width(self.size.width);
if(this._helper&&!o.animate){
this._proportionallyResize();
}
}
$("body").css("cursor","auto");
this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",_113);
if(this._helper){
this.helper.remove();
}
return false;
},_updateVirtualBoundaries:function(_116){
var o=this.options,_117,_118,_119,_11a,b;
b={minWidth:_11b(o.minWidth)?o.minWidth:0,maxWidth:_11b(o.maxWidth)?o.maxWidth:Infinity,minHeight:_11b(o.minHeight)?o.minHeight:0,maxHeight:_11b(o.maxHeight)?o.maxHeight:Infinity};
if(this._aspectRatio||_116){
_117=b.minHeight*this.aspectRatio;
_119=b.minWidth/this.aspectRatio;
_118=b.maxHeight*this.aspectRatio;
_11a=b.maxWidth/this.aspectRatio;
if(_117>b.minWidth){
b.minWidth=_117;
}
if(_119>b.minHeight){
b.minHeight=_119;
}
if(_118<b.maxWidth){
b.maxWidth=_118;
}
if(_11a<b.maxHeight){
b.maxHeight=_11a;
}
}
this._vBoundaries=b;
},_updateCache:function(data){
var o=this.options;
this.offset=this.helper.offset();
if(_11b(data.left)){
this.position.left=data.left;
}
if(_11b(data.top)){
this.position.top=data.top;
}
if(_11b(data.height)){
this.size.height=data.height;
}
if(_11b(data.width)){
this.size.width=data.width;
}
},_updateRatio:function(data,_11c){
var o=this.options,cpos=this.position,_11d=this.size,a=this.axis;
if(_11b(data.height)){
data.width=(data.height*this.aspectRatio);
}else{
if(_11b(data.width)){
data.height=(data.width/this.aspectRatio);
}
}
if(a=="sw"){
data.left=cpos.left+(_11d.width-data.width);
data.top=null;
}
if(a=="nw"){
data.top=cpos.top+(_11d.height-data.height);
data.left=cpos.left+(_11d.width-data.width);
}
return data;
},_respectSize:function(data,_11e){
var el=this.helper,o=this._vBoundaries,_11f=this._aspectRatio||_11e.shiftKey,a=this.axis,_120=_11b(data.width)&&o.maxWidth&&(o.maxWidth<data.width),_121=_11b(data.height)&&o.maxHeight&&(o.maxHeight<data.height),_122=_11b(data.width)&&o.minWidth&&(o.minWidth>data.width),_123=_11b(data.height)&&o.minHeight&&(o.minHeight>data.height);
if(_122){
data.width=o.minWidth;
}
if(_123){
data.height=o.minHeight;
}
if(_120){
data.width=o.maxWidth;
}
if(_121){
data.height=o.maxHeight;
}
var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;
var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);
if(_122&&cw){
data.left=dw-o.minWidth;
}
if(_120&&cw){
data.left=dw-o.maxWidth;
}
if(_123&&ch){
data.top=dh-o.minHeight;
}
if(_121&&ch){
data.top=dh-o.maxHeight;
}
var _124=!data.width&&!data.height;
if(_124&&!data.left&&data.top){
data.top=null;
}else{
if(_124&&!data.top&&data.left){
data.left=null;
}
}
return data;
},_proportionallyResize:function(){
var o=this.options;
if(!this._proportionallyResizeElements.length){
return;
}
var _125=this.helper||this.element;
for(var i=0;i<this._proportionallyResizeElements.length;i++){
var prel=this._proportionallyResizeElements[i];
if(!this.borderDif){
var b=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")],p=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];
this.borderDif=$.map(b,function(v,i){
var _126=parseInt(v,10)||0,_127=parseInt(p[i],10)||0;
return _126+_127;
});
}
if($.browser.msie&&!(!($(_125).is(":hidden")||$(_125).parents(":hidden").length))){
continue;
}
prel.css({height:(_125.height()-this.borderDif[0]-this.borderDif[2])||0,width:(_125.width()-this.borderDif[1]-this.borderDif[3])||0});
}
},_renderProxy:function(){
var el=this.element,o=this.options;
this.elementOffset=el.offset();
if(this._helper){
this.helper=this.helper||$("<div style=\"overflow:hidden;\"></div>");
var ie6=$.browser.msie&&$.browser.version<7,_128=(ie6?1:0),_129=(ie6?2:-1);
this.helper.addClass(this._helper).css({width:this.element.outerWidth()+_129,height:this.element.outerHeight()+_129,position:"absolute",left:this.elementOffset.left-_128+"px",top:this.elementOffset.top-_128+"px",zIndex:++o.zIndex});
this.helper.appendTo("body").disableSelection();
}else{
this.helper=this.element;
}
},_change:{e:function(_12a,dx,dy){
return {width:this.originalSize.width+dx};
},w:function(_12b,dx,dy){
var o=this.options,cs=this.originalSize,sp=this.originalPosition;
return {left:sp.left+dx,width:cs.width-dx};
},n:function(_12c,dx,dy){
var o=this.options,cs=this.originalSize,sp=this.originalPosition;
return {top:sp.top+dy,height:cs.height-dy};
},s:function(_12d,dx,dy){
return {height:this.originalSize.height+dy};
},se:function(_12e,dx,dy){
return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[_12e,dx,dy]));
},sw:function(_12f,dx,dy){
return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[_12f,dx,dy]));
},ne:function(_130,dx,dy){
return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[_130,dx,dy]));
},nw:function(_131,dx,dy){
return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[_131,dx,dy]));
}},_propagate:function(n,_132){
$.ui.plugin.call(this,n,[_132,this.ui()]);
(n!="resize"&&this._trigger(n,_132,this.ui()));
},plugins:{},ui:function(){
return {originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition};
}});
$.extend($.ui.resizable,{version:"1.8.16"});
$.ui.plugin.add("resizable","alsoResize",{start:function(_133,ui){
var self=$(this).data("resizable"),o=self.options;
var _134=function(exp){
$(exp).each(function(){
var el=$(this);
el.data("resizable-alsoresize",{width:parseInt(el.width(),10),height:parseInt(el.height(),10),left:parseInt(el.css("left"),10),top:parseInt(el.css("top"),10),position:el.css("position")});
});
};
if(typeof (o.alsoResize)=="object"&&!o.alsoResize.parentNode){
if(o.alsoResize.length){
o.alsoResize=o.alsoResize[0];
_134(o.alsoResize);
}else{
$.each(o.alsoResize,function(exp){
_134(exp);
});
}
}else{
_134(o.alsoResize);
}
},resize:function(_135,ui){
var self=$(this).data("resizable"),o=self.options,os=self.originalSize,op=self.originalPosition;
var _136={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_137=function(exp,c){
$(exp).each(function(){
var el=$(this),_138=$(this).data("resizable-alsoresize"),_139={},css=c&&c.length?c:el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];
$.each(css,function(i,prop){
var sum=(_138[prop]||0)+(_136[prop]||0);
if(sum&&sum>=0){
_139[prop]=sum||null;
}
});
if($.browser.opera&&/relative/.test(el.css("position"))){
self._revertToRelativePosition=true;
el.css({position:"absolute",top:"auto",left:"auto"});
}
el.css(_139);
});
};
if(typeof (o.alsoResize)=="object"&&!o.alsoResize.nodeType){
$.each(o.alsoResize,function(exp,c){
_137(exp,c);
});
}else{
_137(o.alsoResize);
}
},stop:function(_13a,ui){
var self=$(this).data("resizable"),o=self.options;
var _13b=function(exp){
$(exp).each(function(){
var el=$(this);
el.css({position:el.data("resizable-alsoresize").position});
});
};
if(self._revertToRelativePosition){
self._revertToRelativePosition=false;
if(typeof (o.alsoResize)=="object"&&!o.alsoResize.nodeType){
$.each(o.alsoResize,function(exp){
_13b(exp);
});
}else{
_13b(o.alsoResize);
}
}
$(this).removeData("resizable-alsoresize");
}});
$.ui.plugin.add("resizable","animate",{stop:function(_13c,ui){
var self=$(this).data("resizable"),o=self.options;
var pr=self._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),_13d=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,_13e=ista?0:self.sizeDiff.width;
var _13f={width:(self.size.width-_13e),height:(self.size.height-_13d)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;
self.element.animate($.extend(_13f,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){
var data={width:parseInt(self.element.css("width"),10),height:parseInt(self.element.css("height"),10),top:parseInt(self.element.css("top"),10),left:parseInt(self.element.css("left"),10)};
if(pr&&pr.length){
$(pr[0]).css({width:data.width,height:data.height});
}
self._updateCache(data);
self._propagate("resize",_13c);
}});
}});
$.ui.plugin.add("resizable","containment",{start:function(_140,ui){
var self=$(this).data("resizable"),o=self.options,el=self.element;
var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;
if(!ce){
return;
}
self.containerElement=$(ce);
if(/document/.test(oc)||oc==document){
self.containerOffset={left:0,top:0};
self.containerPosition={left:0,top:0};
self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight};
}else{
var _141=$(ce),p=[];
$(["Top","Right","Left","Bottom"]).each(function(i,name){
p[i]=num(_141.css("padding"+name));
});
self.containerOffset=_141.offset();
self.containerPosition=_141.position();
self.containerSize={height:(_141.innerHeight()-p[3]),width:(_141.innerWidth()-p[1])};
var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,_142=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),_143=($.ui.hasScroll(ce)?ce.scrollHeight:ch);
self.parentData={element:ce,left:co.left,top:co.top,width:_142,height:_143};
}
},resize:function(_144,ui){
var self=$(this).data("resizable"),o=self.options,ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,_145=self._aspectRatio||_144.shiftKey,cop={top:0,left:0},ce=self.containerElement;
if(ce[0]!=document&&(/static/).test(ce.css("position"))){
cop=co;
}
if(cp.left<(self._helper?co.left:0)){
self.size.width=self.size.width+(self._helper?(self.position.left-co.left):(self.position.left-cop.left));
if(_145){
self.size.height=self.size.width/o.aspectRatio;
}
self.position.left=o.helper?co.left:0;
}
if(cp.top<(self._helper?co.top:0)){
self.size.height=self.size.height+(self._helper?(self.position.top-co.top):self.position.top);
if(_145){
self.size.width=self.size.height*o.aspectRatio;
}
self.position.top=self._helper?co.top:0;
}
self.offset.left=self.parentData.left+self.position.left;
self.offset.top=self.parentData.top+self.position.top;
var _146=Math.abs((self._helper?self.offset.left-cop.left:(self.offset.left-cop.left))+self.sizeDiff.width),_147=Math.abs((self._helper?self.offset.top-cop.top:(self.offset.top-co.top))+self.sizeDiff.height);
var _148=self.containerElement.get(0)==self.element.parent().get(0),_149=/relative|absolute/.test(self.containerElement.css("position"));
if(_148&&_149){
_146-=self.parentData.left;
}
if(_146+self.size.width>=self.parentData.width){
self.size.width=self.parentData.width-_146;
if(_145){
self.size.height=self.size.width/self.aspectRatio;
}
}
if(_147+self.size.height>=self.parentData.height){
self.size.height=self.parentData.height-_147;
if(_145){
self.size.width=self.size.height*self.aspectRatio;
}
}
},stop:function(_14a,ui){
var self=$(this).data("resizable"),o=self.options,cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;
var _14b=$(self.helper),ho=_14b.offset(),w=_14b.outerWidth()-self.sizeDiff.width,h=_14b.outerHeight()-self.sizeDiff.height;
if(self._helper&&!o.animate&&(/relative/).test(ce.css("position"))){
$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});
}
if(self._helper&&!o.animate&&(/static/).test(ce.css("position"))){
$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});
}
}});
$.ui.plugin.add("resizable","ghost",{start:function(_14c,ui){
var self=$(this).data("resizable"),o=self.options,cs=self.size;
self.ghost=self.originalElement.clone();
self.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost=="string"?o.ghost:"");
self.ghost.appendTo(self.helper);
},resize:function(_14d,ui){
var self=$(this).data("resizable"),o=self.options;
if(self.ghost){
self.ghost.css({position:"relative",height:self.size.height,width:self.size.width});
}
},stop:function(_14e,ui){
var self=$(this).data("resizable"),o=self.options;
if(self.ghost&&self.helper){
self.helper.get(0).removeChild(self.ghost.get(0));
}
}});
$.ui.plugin.add("resizable","grid",{resize:function(_14f,ui){
var self=$(this).data("resizable"),o=self.options,cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,_150=o._aspectRatio||_14f.shiftKey;
o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;
var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);
if(/^(se|s|e)$/.test(a)){
self.size.width=os.width+ox;
self.size.height=os.height+oy;
}else{
if(/^(ne)$/.test(a)){
self.size.width=os.width+ox;
self.size.height=os.height+oy;
self.position.top=op.top-oy;
}else{
if(/^(sw)$/.test(a)){
self.size.width=os.width+ox;
self.size.height=os.height+oy;
self.position.left=op.left-ox;
}else{
self.size.width=os.width+ox;
self.size.height=os.height+oy;
self.position.top=op.top-oy;
self.position.left=op.left-ox;
}
}
}
}});
var num=function(v){
return parseInt(v,10)||0;
};
var _11b=function(_151){
return !isNaN(parseInt(_151,10));
};
})(jQueryCS144);
(function($,_152){
var _153="ui-dialog "+"ui-widget "+"ui-widget-content "+"ui-corner-all ",_154={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},_155={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},_156=$.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};
$.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(pos){
var _157=$(this).css(pos).offset().top;
if(_157<0){
$(this).css("top",pos.top-_157);
}
}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){
this.originalTitle=this.element.attr("title");
if(typeof this.originalTitle!=="string"){
this.originalTitle="";
}
this.options.title=this.options.title||this.originalTitle;
var self=this,_158=self.options,_159=_158.title||"&#160;",_15a=$.ui.dialog.getTitleId(self.element),_15b=(self.uiDialog=$("<div></div>")).appendTo(document.body).hide().addClass(_153+_158.dialogClass).css({zIndex:_158.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(_15c){
if(_158.closeOnEscape&&!_15c.isDefaultPrevented()&&_15c.keyCode&&_15c.keyCode===$.ui.keyCode.ESCAPE){
self.close(_15c);
_15c.preventDefault();
}
}).attr({role:"dialog","aria-labelledby":_15a}).mousedown(function(_15d){
self.moveToTop(false,_15d);
}),_15e=self.element.show().removeAttr("title").addClass("ui-dialog-content "+"ui-widget-content").appendTo(_15b),_15f=(self.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar "+"ui-widget-header "+"ui-corner-all "+"ui-helper-clearfix").prependTo(_15b),_160=$("<a href=\"#\"></a>").addClass("ui-dialog-titlebar-close "+"ui-corner-all").attr("role","button").hover(function(){
_160.addClass("ui-state-hover");
},function(){
_160.removeClass("ui-state-hover");
}).focus(function(){
_160.addClass("ui-state-focus");
}).blur(function(){
_160.removeClass("ui-state-focus");
}).click(function(_161){
self.close(_161);
return false;
}).appendTo(_15f),_162=(self.uiDialogTitlebarCloseText=$("<span></span>")).addClass("ui-icon "+"ui-icon-closethick").text(_158.closeText).appendTo(_160),_163=$("<span></span>").addClass("ui-dialog-title").attr("id",_15a).html(_159).prependTo(_15f);
if($.isFunction(_158.beforeclose)&&!$.isFunction(_158.beforeClose)){
_158.beforeClose=_158.beforeclose;
}
_15f.find("*").add(_15f).disableSelection();
if(_158.draggable&&$.fn.draggable){
self._makeDraggable();
}
if(_158.resizable&&$.fn.resizable){
self._makeResizable();
}
self._createButtons(_158.buttons);
self._isOpen=false;
if($.fn.bgiframe){
_15b.bgiframe();
}
},_init:function(){
if(this.options.autoOpen){
this.open();
}
},destroy:function(){
var self=this;
if(self.overlay){
self.overlay.destroy();
}
self.uiDialog.hide();
self.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
self.uiDialog.remove();
if(self.originalTitle){
self.element.attr("title",self.originalTitle);
}
return self;
},widget:function(){
return this.uiDialog;
},close:function(_164){
var self=this,maxZ,_165;
if(false===self._trigger("beforeClose",_164)){
return;
}
if(self.overlay){
self.overlay.destroy();
}
self.uiDialog.unbind("keypress.ui-dialog");
self._isOpen=false;
if(self.options.hide){
self.uiDialog.hide(self.options.hide,function(){
self._trigger("close",_164);
});
}else{
self.uiDialog.hide();
self._trigger("close",_164);
}
$.ui.dialog.overlay.resize();
if(self.options.modal){
maxZ=0;
$(".ui-dialog").each(function(){
if(this!==self.uiDialog[0]){
_165=$(this).css("z-index");
if(!isNaN(_165)){
maxZ=Math.max(maxZ,_165);
}
}
});
$.ui.dialog.maxZ=maxZ;
}
return self;
},isOpen:function(){
return this._isOpen;
},moveToTop:function(_166,_167){
var self=this,_168=self.options,_169;
if((_168.modal&&!_166)||(!_168.stack&&!_168.modal)){
return self._trigger("focus",_167);
}
if(_168.zIndex>$.ui.dialog.maxZ){
$.ui.dialog.maxZ=_168.zIndex;
}
if(self.overlay){
$.ui.dialog.maxZ+=1;
self.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=$.ui.dialog.maxZ);
}
_169={scrollTop:self.element.scrollTop(),scrollLeft:self.element.scrollLeft()};
$.ui.dialog.maxZ+=1;
self.uiDialog.css("z-index",$.ui.dialog.maxZ);
self.element.attr(_169);
self._trigger("focus",_167);
return self;
},open:function(){
if(this._isOpen){
return;
}
var self=this,_16a=self.options,_16b=self.uiDialog;
self.overlay=_16a.modal?new $.ui.dialog.overlay(self):null;
self._size();
self._position(_16a.position);
_16b.show(_16a.show);
self.moveToTop(true);
if(_16a.modal){
_16b.bind("keypress.ui-dialog",function(_16c){
if(_16c.keyCode!==$.ui.keyCode.TAB){
return;
}
var _16d=$(":tabbable",this),_16e=_16d.filter(":first"),last=_16d.filter(":last");
if(_16c.target===last[0]&&!_16c.shiftKey){
_16e.focus(1);
return false;
}else{
if(_16c.target===_16e[0]&&_16c.shiftKey){
last.focus(1);
return false;
}
}
});
}
$(self.element.find(":tabbable").get().concat(_16b.find(".ui-dialog-buttonpane :tabbable").get().concat(_16b.get()))).eq(0).focus();
self._isOpen=true;
self._trigger("open");
return self;
},_createButtons:function(_16f){
var self=this,_170=false,_171=$("<div></div>").addClass("ui-dialog-buttonpane "+"ui-widget-content "+"ui-helper-clearfix"),_172=$("<div></div>").addClass("ui-dialog-buttonset").appendTo(_171);
self.uiDialog.find(".ui-dialog-buttonpane").remove();
if(typeof _16f==="object"&&_16f!==null){
$.each(_16f,function(){
return !(_170=true);
});
}
if(_170){
$.each(_16f,function(name,_173){
_173=$.isFunction(_173)?{click:_173,text:name}:_173;
var _174=$("<button type=\"button\"></button>").click(function(){
_173.click.apply(self.element[0],arguments);
}).appendTo(_172);
$.each(_173,function(key,_175){
if(key==="click"){
return;
}
if(key in _156){
_174[key](_175);
}else{
_174.attr(key,_175);
}
});
if($.fn.button){
_174.button();
}
});
_171.appendTo(self.uiDialog);
}
},_makeDraggable:function(){
var self=this,_176=self.options,doc=$(document),_177;
function _178(ui){
return {position:ui.position,offset:ui.offset};
};
self.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(_179,ui){
_177=_176.height==="auto"?"auto":$(this).height();
$(this).height($(this).height()).addClass("ui-dialog-dragging");
self._trigger("dragStart",_179,_178(ui));
},drag:function(_17a,ui){
self._trigger("drag",_17a,_178(ui));
},stop:function(_17b,ui){
_176.position=[ui.position.left-doc.scrollLeft(),ui.position.top-doc.scrollTop()];
$(this).removeClass("ui-dialog-dragging").height(_177);
self._trigger("dragStop",_17b,_178(ui));
$.ui.dialog.overlay.resize();
}});
},_makeResizable:function(_17c){
_17c=(_17c===_152?this.options.resizable:_17c);
var self=this,_17d=self.options,_17e=self.uiDialog.css("position"),_17f=(typeof _17c==="string"?_17c:"n,e,s,w,se,sw,ne,nw");
function _180(ui){
return {originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size};
};
self.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:self.element,maxWidth:_17d.maxWidth,maxHeight:_17d.maxHeight,minWidth:_17d.minWidth,minHeight:self._minHeight(),handles:_17f,start:function(_181,ui){
$(this).addClass("ui-dialog-resizing");
self._trigger("resizeStart",_181,_180(ui));
},resize:function(_182,ui){
self._trigger("resize",_182,_180(ui));
},stop:function(_183,ui){
$(this).removeClass("ui-dialog-resizing");
_17d.height=$(this).height();
_17d.width=$(this).width();
self._trigger("resizeStop",_183,_180(ui));
$.ui.dialog.overlay.resize();
}}).css("position",_17e).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se");
},_minHeight:function(){
var _184=this.options;
if(_184.height==="auto"){
return _184.minHeight;
}else{
return Math.min(_184.minHeight,_184.height);
}
},_position:function(_185){
var myAt=[],_186=[0,0],_187;
if(_185){
if(typeof _185==="string"||(typeof _185==="object"&&"0" in _185)){
myAt=_185.split?_185.split(" "):[_185[0],_185[1]];
if(myAt.length===1){
myAt[1]=myAt[0];
}
$.each(["left","top"],function(i,_188){
if(+myAt[i]===myAt[i]){
_186[i]=myAt[i];
myAt[i]=_188;
}
});
_185={my:myAt.join(" "),at:myAt.join(" "),offset:_186.join(" ")};
}
_185=$.extend({},$.ui.dialog.prototype.options.position,_185);
}else{
_185=$.ui.dialog.prototype.options.position;
}
_187=this.uiDialog.is(":visible");
if(!_187){
this.uiDialog.show();
}
this.uiDialog.css({top:0,left:0}).position($.extend({of:window},_185));
if(!_187){
this.uiDialog.hide();
}
},_setOptions:function(_189){
var self=this,_18a={},_18b=false;
$.each(_189,function(key,_18c){
self._setOption(key,_18c);
if(key in _154){
_18b=true;
}
if(key in _155){
_18a[key]=_18c;
}
});
if(_18b){
this._size();
}
if(this.uiDialog.is(":data(resizable)")){
this.uiDialog.resizable("option",_18a);
}
},_setOption:function(key,_18d){
var self=this,_18e=self.uiDialog;
switch(key){
case "beforeclose":
key="beforeClose";
break;
case "buttons":
self._createButtons(_18d);
break;
case "closeText":
self.uiDialogTitlebarCloseText.text(""+_18d);
break;
case "dialogClass":
_18e.removeClass(self.options.dialogClass).addClass(_153+_18d);
break;
case "disabled":
if(_18d){
_18e.addClass("ui-dialog-disabled");
}else{
_18e.removeClass("ui-dialog-disabled");
}
break;
case "draggable":
var _18f=_18e.is(":data(draggable)");
if(_18f&&!_18d){
_18e.draggable("destroy");
}
if(!_18f&&_18d){
self._makeDraggable();
}
break;
case "position":
self._position(_18d);
break;
case "resizable":
var _190=_18e.is(":data(resizable)");
if(_190&&!_18d){
_18e.resizable("destroy");
}
if(_190&&typeof _18d==="string"){
_18e.resizable("option","handles",_18d);
}
if(!_190&&_18d!==false){
self._makeResizable(_18d);
}
break;
case "title":
$(".ui-dialog-title",self.uiDialogTitlebar).html(""+(_18d||"&#160;"));
break;
}
$.Widget.prototype._setOption.apply(self,arguments);
},_size:function(){
var _191=this.options,_192,_193,_194=this.uiDialog.is(":visible");
this.element.show().css({width:"auto",minHeight:0,height:0});
if(_191.minWidth>_191.width){
_191.width=_191.minWidth;
}
_192=this.uiDialog.css({height:"auto",width:_191.width}).height();
_193=Math.max(0,_191.minHeight-_192);
if(_191.height==="auto"){
if($.support.minHeight){
this.element.css({minHeight:_193,height:"auto"});
}else{
this.uiDialog.show();
var _195=this.element.css("height","auto").height();
if(!_194){
this.uiDialog.hide();
}
this.element.height(Math.max(_195,_193));
}
}else{
this.element.height(Math.max(_191.height-_192,0));
}
if(this.uiDialog.is(":data(resizable)")){
this.uiDialog.resizable("option","minHeight",this._minHeight());
}
}});
$.extend($.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function($el){
var id=$el.attr("id");
if(!id){
this.uuid+=1;
id=this.uuid;
}
return "ui-dialog-title-"+id;
},overlay:function(_196){
this.$el=$.ui.dialog.overlay.create(_196);
}});
$.extend($.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(_197){
return _197+".dialog-overlay";
}).join(" "),create:function(_198){
if(this.instances.length===0){
setTimeout(function(){
if($.ui.dialog.overlay.instances.length){
$(document).bind($.ui.dialog.overlay.events,function(_199){
if($(_199.target).zIndex()<$.ui.dialog.overlay.maxZ){
return false;
}
});
}
},1);
$(document).bind("keydown.dialog-overlay",function(_19a){
if(_198.options.closeOnEscape&&!_19a.isDefaultPrevented()&&_19a.keyCode&&_19a.keyCode===$.ui.keyCode.ESCAPE){
_198.close(_19a);
_19a.preventDefault();
}
});
$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize);
}
var $el=(this.oldInstances.pop()||$("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});
if($.fn.bgiframe){
$el.bgiframe();
}
this.instances.push($el);
return $el;
},destroy:function($el){
var _19b=$.inArray($el,this.instances);
if(_19b!=-1){
this.oldInstances.push(this.instances.splice(_19b,1)[0]);
}
if(this.instances.length===0){
$([document,window]).unbind(".dialog-overlay");
}
$el.remove();
var maxZ=0;
$.each(this.instances,function(){
maxZ=Math.max(maxZ,this.css("z-index"));
});
this.maxZ=maxZ;
},height:function(){
var _19c,_19d;
if($.browser.msie&&$.browser.version<7){
_19c=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
_19d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);
if(_19c<_19d){
return $(window).height()+"px";
}else{
return _19c+"px";
}
}else{
return $(document).height()+"px";
}
},width:function(){
var _19e,_19f;
if($.browser.msie){
_19e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);
_19f=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);
if(_19e<_19f){
return $(window).width()+"px";
}else{
return _19e+"px";
}
}else{
return $(document).width()+"px";
}
},resize:function(){
var _1a0=$([]);
$.each($.ui.dialog.overlay.instances,function(){
_1a0=_1a0.add(this);
});
_1a0.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()});
}});
$.extend($.ui.dialog.overlay.prototype,{destroy:function(){
$.ui.dialog.overlay.destroy(this.$el);
}});
}(jQueryCS144));


