vendor: 23,836 bytes, lines 1-819
1/*! jQuery UI - v1.11.1 - 2014-08-27 2* http://jqueryui.com 3* Includes: core.js, position.js 4* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ 5 6(function( factory ) { 7 if ( typeof define === "function" && define.amd ) { 8 9 // AMD. Register as an anonymous module. 10 define([ "jquery" ], factory ); 11 } else { 12 13 // Browser globals 14 factory( jQuery ); 15 } 16}(function( $ ) { 17/*! 18 * jQuery UI Core 1.11.1 19 * http://jqueryui.com 20 * 21 * Copyright 2014 jQuery Foundation and other contributors 22 * Released under the MIT license. 23 * http://jquery.org/license 24 * 25 * http://api.jqueryui.com/category/ui-core/ 26 */ 27 28 29// $.ui might exist from components with no dependencies, e.g., $.ui.position 30$.ui = $.ui || {}; 31 32$.extend( $.ui, { 33 version: "1.11.1", 34 35 keyCode: { 36 BACKSPACE: 8, 37 COMMA: 188, 38 DELETE: 46, 39 DOWN: 40, 40 END: 35, 41 ENTER: 13, 42 ESCAPE: 27, 43 HOME: 36, 44 LEFT: 37, 45 PAGE_DOWN: 34, 46 PAGE_UP: 33, 47 PERIOD: 190, 48 RIGHT: 39, 49 SPACE: 32, 50 TAB: 9, 51 UP: 38 52 } 53}); 54 55// plugins 56$.fn.extend({ 57 scrollParent: function( includeHidden ) { 58 var position = this.css( "position" ), 59 excludeStaticParent = position === "absolute", 60 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, 61 scrollParent = this.parents().filter( function() { 62 var parent = $( this ); 63 if ( excludeStaticParent && parent.css( "position" ) === "static" ) { 64 return false; 65 } 66 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); 67 }).eq( 0 ); 68 69 return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; 70 }, 71 72 uniqueId: (function() { 73 var uuid = 0; 74 75 return function() { 76 return this.each(function() { 77 if ( !this.id ) { 78 this.id = "ui-id-" + ( ++uuid ); 79 } 80 }); 81 }; 82 })(), 83 84 removeUniqueId: function() { 85 return this.each(function() { 86 if ( /^ui-id-\d+$/.test( this.id ) ) { 87 $( this ).removeAttr( "id" ); 88 } 89 }); 90 } 91}); 92 93// selectors 94function focusable( element, isTabIndexNotNaN ) { 95 var map, mapName, img, 96 nodeName = element.nodeName.toLowerCase(); 97 if ( "area" === nodeName ) { 98 map = element.parentNode; 99 mapName = map.name; 100 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 101 return false; 102 } 103 img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; 104 return !!img && visible( img ); 105 } 106 return ( /input|select|textarea|button|object/.test( nodeName ) ? 107 !element.disabled : 108 "a" === nodeName ? 109 element.href || isTabIndexNotNaN : 110 isTabIndexNotNaN) && 111 // the element and all of its ancestors must be visible 112 visible( element ); 113} 114 115function visible( element ) { 116 return $.expr.filters.visible( element ) && 117 !$( element ).parents().addBack().filter(function() { 118 return $.css( this, "visibility" ) === "hidden"; 119 }).length; 120} 121 122$.extend( $.expr[ ":" ], { 123 data: $.expr.createPseudo ? 124 $.expr.createPseudo(function( dataName ) { 125 return function( elem ) { 126 return !!$.data( elem, dataName ); 127 }; 128 }) : 129 // support: jQuery <1.8 130 function( elem, i, match ) { 131 return !!$.data( elem, match[ 3 ] ); 132 }, 133 134 focusable: function( element ) { 135 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 136 }, 137 138 tabbable: function( element ) { 139 var tabIndex = $.attr( element, "tabindex" ), 140 isTabIndexNaN = isNaN( tabIndex ); 141 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 142 } 143}); 144 145// support: jQuery <1.8 146if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 147 $.each( [ "Width", "Height" ], function( i, name ) { 148 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], 149 type = name.toLowerCase(), 150 orig = { 151 innerWidth: $.fn.innerWidth, 152 innerHeight: $.fn.innerHeight, 153 outerWidth: $.fn.outerWidth, 154 outerHeight: $.fn.outerHeight 155 }; 156 157 function reduce( elem, size, border, margin ) { 158 $.each( side, function() { 159 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; 160 if ( border ) { 161 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; 162 } 163 if ( margin ) { 164 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; 165 } 166 }); 167 return size; 168 } 169 170 $.fn[ "inner" + name ] = function( size ) { 171 if ( size === undefined ) { 172 return orig[ "inner" + name ].call( this ); 173 } 174 175 return this.each(function() { 176 $( this ).css( type, reduce( this, size ) + "px" ); 177 }); 178 }; 179 180 $.fn[ "outer" + name] = function( size, margin ) { 181 if ( typeof size !== "number" ) { 182 return orig[ "outer" + name ].call( this, size ); 183 } 184 185 return this.each(function() { 186 $( this).css( type, reduce( this, size, true, margin ) + "px" ); 187 }); 188 }; 189 }); 190} 191 192// support: jQuery <1.8 193if ( !$.fn.addBack ) { 194 $.fn.addBack = function( selector ) { 195 return this.add( selector == null ? 196 this.prevObject : this.prevObject.filter( selector ) 197 ); 198 }; 199} 200 201// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) 202if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 203 $.fn.removeData = (function( removeData ) { 204 return function( key ) { 205 if ( arguments.length ) { 206 return removeData.call( this, $.camelCase( key ) ); 207 } else { 208 return removeData.call( this ); 209 } 210 }; 211 })( $.fn.removeData ); 212} 213 214// deprecated 215$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 216 217$.fn.extend({ 218 focus: (function( orig ) { 219 return function( delay, fn ) { 220 return typeof delay === "number" ? 221 this.each(function() { 222 var elem = this; 223 setTimeout(function() { 224 $( elem ).focus(); 225 if ( fn ) { 226 fn.call( elem ); 227 } 228 }, delay ); 229 }) : 230 orig.apply( this, arguments ); 231 }; 232 })( $.fn.focus ), 233 234 disableSelection: (function() { 235 var eventType = "onselectstart" in document.createElement( "div" ) ? 236 "selectstart" : 237 "mousedown"; 238 239 return function() { 240 return this.bind( eventType + ".ui-disableSelection", function( event ) { 241 event.preventDefault(); 242 }); 243 }; 244 })(), 245 246 enableSelection: function() { 247 return this.unbind( ".ui-disableSelection" ); 248 }, 249 250 zIndex: function( zIndex ) { 251 if ( zIndex !== undefined ) { 252 return this.css( "zIndex", zIndex ); 253 } 254 255 if ( this.length ) { 256 var elem = $( this[ 0 ] ), position, value; 257 while ( elem.length && elem[ 0 ] !== document ) { 258 // Ignore z-index if position is set to a value where z-index is ignored by the browser 259 // This makes behavior of this function consistent across browsers 260 // WebKit always returns auto if the element is positioned 261 position = elem.css( "position" ); 262 if ( position === "absolute" || position === "relative" || position === "fixed" ) { 263 // IE returns 0 when zIndex is not specified 264 // other browsers return a string 265 // we ignore the case of nested elements with an explicit value of 0 266 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> 267 value = parseInt( elem.css( "zIndex" ), 10 ); 268 if ( !isNaN( value ) && value !== 0 ) { 269 return value; 270 } 271 } 272 elem = elem.parent(); 273 } 274 } 275 276 return 0; 277 } 278}); 279 280// $.ui.plugin is deprecated. Use $.widget() extensions instead. 281$.ui.plugin = { 282 add: function( module, option, set ) { 283 var i, 284 proto = $.ui[ module ].prototype; 285 for ( i in set ) { 286 proto.plugins[ i ] = proto.plugins[ i ] || []; 287 proto.plugins[ i ].push( [ option, set[ i ] ] ); 288 } 289 }, 290 call: function( instance, name, args, allowDisconnected ) { 291 var i, 292 set = instance.plugins[ name ]; 293 294 if ( !set ) { 295 return; 296 } 297 298 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { 299 return; 300 } 301 302 for ( i = 0; i < set.length; i++ ) { 303 if ( instance.options[ set[ i ][ 0 ] ] ) { 304 set[ i ][ 1 ].apply( instance.element, args ); 305 } 306 } 307 } 308}; 309 310 311/*! 312 * jQuery UI Position 1.11.1 313 * http://jqueryui.com 314 * 315 * Copyright 2014 jQuery Foundation and other contributors 316 * Released under the MIT license. 317 * http://jquery.org/license 318 * 319 * http://api.jqueryui.com/position/ 320 */ 321 322(function() { 323 324$.ui = $.ui || {}; 325 326var cachedScrollbarWidth, supportsOffsetFractions, 327 max = Math.max, 328 abs = Math.abs, 329 round = Math.round, 330 rhorizontal = /left|center|right/, 331 rvertical = /top|center|bottom/, 332 roffset = /[\+\-]\d+(\.[\d]+)?%?/, 333 rposition = /^\w+/, 334 rpercent = /%$/, 335 _position = $.fn.position; 336 337function getOffsets( offsets, width, height ) { 338 return [ 339 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), 340 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) 341 ]; 342} 343 344function parseCss( element, property ) { 345 return parseInt( $.css( element, property ), 10 ) || 0; 346} 347 348function getDimensions( elem ) { 349 var raw = elem[0]; 350 if ( raw.nodeType === 9 ) { 351 return { 352 width: elem.width(), 353 height: elem.height(), 354 offset: { top: 0, left: 0 } 355 }; 356 } 357 if ( $.isWindow( raw ) ) { 358 return { 359 width: elem.width(), 360 height: elem.height(), 361 offset: { top: elem.scrollTop(), left: elem.scrollLeft() } 362 }; 363 } 364 if ( raw.preventDefault ) { 365 return { 366 width: 0, 367 height: 0, 368 offset: { top: raw.pageY, left: raw.pageX } 369 }; 370 } 371 return { 372 width: elem.outerWidth(), 373 height: elem.outerHeight(), 374 offset: elem.offset() 375 }; 376} 377 378$.position = { 379 scrollbarWidth: function() { 380 if ( cachedScrollbarWidth !== undefined ) { 381 return cachedScrollbarWidth; 382 } 383 var w1, w2, 384 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 385 innerDiv = div.children()[0]; 386 387 $( "body" ).append( div ); 388 w1 = innerDiv.offsetWidth; 389 div.css( "overflow", "scroll" ); 390 391 w2 = innerDiv.offsetWidth; 392 393 if ( w1 === w2 ) { 394 w2 = div[0].clientWidth; 395 } 396 397 div.remove(); 398 399 return (cachedScrollbarWidth = w1 - w2); 400 }, 401 getScrollInfo: function( within ) { 402 var overflowX = within.isWindow || within.isDocument ? "" : 403 within.element.css( "overflow-x" ), 404 overflowY = within.isWindow || within.isDocument ? "" : 405 within.element.css( "overflow-y" ), 406 hasOverflowX = overflowX === "scroll" || 407 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), 408 hasOverflowY = overflowY === "scroll" || 409 ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 410 return { 411 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 412 height: hasOverflowX ? $.position.scrollbarWidth() : 0 413 }; 414 }, 415 getWithinInfo: function( element ) { 416 var withinElement = $( element || window ), 417 isWindow = $.isWindow( withinElement[0] ), 418 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 419 return { 420 element: withinElement, 421 isWindow: isWindow, 422 isDocument: isDocument, 423 offset: withinElement.offset() || { left: 0, top: 0 }, 424 scrollLeft: withinElement.scrollLeft(), 425 scrollTop: withinElement.scrollTop(), 426 427 // support: jQuery 1.6.x 428 // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows 429 width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), 430 height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() 431 }; 432 } 433}; 434 435$.fn.position = function( options ) { 436 if ( !options || !options.of ) { 437 return _position.apply( this, arguments ); 438 } 439 440 // make a copy, we don't want to modify arguments 441 options = $.extend( {}, options ); 442 443 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, 444 target = $( options.of ), 445 within = $.position.getWithinInfo( options.within ), 446 scrollInfo = $.position.getScrollInfo( within ), 447 collision = ( options.collision || "flip" ).split( " " ), 448 offsets = {}; 449 450 dimensions = getDimensions( target ); 451 if ( target[0].preventDefault ) { 452 // force left top to allow flipping 453 options.at = "left top"; 454 } 455 targetWidth = dimensions.width; 456 targetHeight = dimensions.height; 457 targetOffset = dimensions.offset; 458 // clone to reuse original targetOffset later 459 basePosition = $.extend( {}, targetOffset ); 460 461 // force my and at to have valid horizontal and vertical positions 462 // if a value is missing or invalid, it will be converted to center 463 $.each( [ "my", "at" ], function() { 464 var pos = ( options[ this ] || "" ).split( " " ), 465 horizontalOffset, 466 verticalOffset; 467 468 if ( pos.length === 1) { 469 pos = rhorizontal.test( pos[ 0 ] ) ? 470 pos.concat( [ "center" ] ) : 471 rvertical.test( pos[ 0 ] ) ? 472 [ "center" ].concat( pos ) : 473 [ "center", "center" ]; 474 } 475 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; 476 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; 477 478 // calculate offsets 479 horizontalOffset = roffset.exec( pos[ 0 ] ); 480 verticalOffset = roffset.exec( pos[ 1 ] ); 481 offsets[ this ] = [ 482 horizontalOffset ? horizontalOffset[ 0 ] : 0, 483 verticalOffset ? verticalOffset[ 0 ] : 0 484 ]; 485 486 // reduce to just the positions without the offsets 487 options[ this ] = [ 488 rposition.exec( pos[ 0 ] )[ 0 ], 489 rposition.exec( pos[ 1 ] )[ 0 ] 490 ]; 491 }); 492 493 // normalize collision option 494 if ( collision.length === 1 ) { 495 collision[ 1 ] = collision[ 0 ]; 496 } 497 498 if ( options.at[ 0 ] === "right" ) { 499 basePosition.left += targetWidth; 500 } else if ( options.at[ 0 ] === "center" ) { 501 basePosition.left += targetWidth / 2; 502 } 503 504 if ( options.at[ 1 ] === "bottom" ) { 505 basePosition.top += targetHeight; 506 } else if ( options.at[ 1 ] === "center" ) { 507 basePosition.top += targetHeight / 2; 508 } 509 510 atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); 511 basePosition.left += atOffset[ 0 ]; 512 basePosition.top += atOffset[ 1 ]; 513 514 return this.each(function() { 515 var collisionPosition, using, 516 elem = $( this ), 517 elemWidth = elem.outerWidth(), 518 elemHeight = elem.outerHeight(), 519 marginLeft = parseCss( this, "marginLeft" ), 520 marginTop = parseCss( this, "marginTop" ), 521 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, 522 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, 523 position = $.extend( {}, basePosition ), 524 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); 525 526 if ( options.my[ 0 ] === "right" ) { 527 position.left -= elemWidth; 528 } else if ( options.my[ 0 ] === "center" ) { 529 position.left -= elemWidth / 2; 530 } 531 532 if ( options.my[ 1 ] === "bottom" ) { 533 position.top -= elemHeight; 534 } else if ( options.my[ 1 ] === "center" ) { 535 position.top -= elemHeight / 2; 536 } 537 538 position.left += myOffset[ 0 ]; 539 position.top += myOffset[ 1 ]; 540 541 // if the browser doesn't support fractions, then round for consistent results 542 if ( !supportsOffsetFractions ) { 543 position.left = round( position.left ); 544 position.top = round( position.top ); 545 } 546 547 collisionPosition = { 548 marginLeft: marginLeft, 549 marginTop: marginTop 550 }; 551 552 $.each( [ "left", "top" ], function( i, dir ) { 553 if ( $.ui.position[ collision[ i ] ] ) { 554 $.ui.position[ collision[ i ] ][ dir ]( position, { 555 targetWidth: targetWidth, 556 targetHeight: targetHeight, 557 elemWidth: elemWidth, 558 elemHeight: elemHeight, 559 collisionPosition: collisionPosition, 560 collisionWidth: collisionWidth, 561 collisionHeight: collisionHeight, 562 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], 563 my: options.my, 564 at: options.at, 565 within: within, 566 elem: elem 567 }); 568 } 569 }); 570 571 if ( options.using ) { 572 // adds feedback as second argument to using callback, if present 573 using = function( props ) { 574 var left = targetOffset.left - position.left, 575 right = left + targetWidth - elemWidth, 576 top = targetOffset.top - position.top, 577 bottom = top + targetHeight - elemHeight, 578 feedback = { 579 target: { 580 element: target, 581 left: targetOffset.left, 582 top: targetOffset.top, 583 width: targetWidth, 584 height: targetHeight 585 }, 586 element: { 587 element: elem, 588 left: position.left, 589 top: position.top, 590 width: elemWidth, 591 height: elemHeight 592 }, 593 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", 594 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" 595 }; 596 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { 597 feedback.horizontal = "center"; 598 } 599 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { 600 feedback.vertical = "middle"; 601 } 602 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { 603 feedback.important = "horizontal"; 604 } else { 605 feedback.important = "vertical"; 606 } 607 options.using.call( this, props, feedback ); 608 }; 609 } 610 611 elem.offset( $.extend( position, { using: using } ) ); 612 }); 613}; 614 615$.ui.position = { 616 fit: { 617 left: function( position, data ) { 618 var within = data.within, 619 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, 620 outerWidth = within.width, 621 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 622 overLeft = withinOffset - collisionPosLeft, 623 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, 624 newOverRight; 625 626 // element is wider than within 627 if ( data.collisionWidth > outerWidth ) { 628 // element is initially over the left side of within 629 if ( overLeft > 0 && overRight <= 0 ) { 630 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; 631 position.left += overLeft - newOverRight; 632 // element is initially over right side of within 633 } else if ( overRight > 0 && overLeft <= 0 ) { 634 position.left = withinOffset; 635 // element is initially over both left and right sides of within 636 } else { 637 if ( overLeft > overRight ) { 638 position.left = withinOffset + outerWidth - data.collisionWidth; 639 } else { 640 position.left = withinOffset; 641 } 642 } 643 // too far left -> align with left edge 644 } else if ( overLeft > 0 ) { 645 position.left += overLeft; 646 // too far right -> align with right edge 647 } else if ( overRight > 0 ) { 648 position.left -= overRight; 649 // adjust based on position and margin 650 } else { 651 position.left = max( position.left - collisionPosLeft, position.left ); 652 } 653 }, 654 top: function( position, data ) { 655 var within = data.within, 656 withinOffset = within.isWindow ? within.scrollTop : within.offset.top, 657 outerHeight = data.within.height, 658 collisionPosTop = position.top - data.collisionPosition.marginTop, 659 overTop = withinOffset - collisionPosTop, 660 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, 661 newOverBottom; 662 663 // element is taller than within 664 if ( data.collisionHeight > outerHeight ) { 665 // element is initially over the top of within 666 if ( overTop > 0 && overBottom <= 0 ) { 667 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; 668 position.top += overTop - newOverBottom; 669 // element is initially over bottom of within 670 } else if ( overBottom > 0 && overTop <= 0 ) { 671 position.top = withinOffset; 672 // element is initially over both top and bottom of within 673 } else { 674 if ( overTop > overBottom ) { 675 position.top = withinOffset + outerHeight - data.collisionHeight; 676 } else { 677 position.top = withinOffset; 678 } 679 } 680 // too far up -> align with top 681 } else if ( overTop > 0 ) { 682 position.top += overTop; 683 // too far down -> align with bottom edge 684 } else if ( overBottom > 0 ) { 685 position.top -= overBottom; 686 // adjust based on position and margin 687 } else { 688 position.top = max( position.top - collisionPosTop, position.top ); 689 } 690 } 691 }, 692 flip: { 693 left: function( position, data ) { 694 var within = data.within, 695 withinOffset = within.offset.left + within.scrollLeft, 696 outerWidth = within.width, 697 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, 698 collisionPosLeft = position.left - data.collisionPosition.marginLeft, 699 overLeft = collisionPosLeft - offsetLeft, 700 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, 701 myOffset = data.my[ 0 ] === "left" ? 702 -data.elemWidth : 703 data.my[ 0 ] === "right" ? 704 data.elemWidth : 705 0, 706 atOffset = data.at[ 0 ] === "left" ? 707 data.targetWidth : 708 data.at[ 0 ] === "right" ? 709 -data.targetWidth : 710 0, 711 offset = -2 * data.offset[ 0 ], 712 newOverRight, 713 newOverLeft; 714 715 if ( overLeft < 0 ) { 716 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; 717 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { 718 position.left += myOffset + atOffset + offset; 719 } 720 } else if ( overRight > 0 ) { 721 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; 722 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { 723 position.left += myOffset + atOffset + offset; 724 } 725 } 726 }, 727 top: function( position, data ) { 728 var within = data.within, 729 withinOffset = within.offset.top + within.scrollTop, 730 outerHeight = within.height, 731 offsetTop = within.isWindow ? within.scrollTop : within.offset.top, 732 collisionPosTop = position.top - data.collisionPosition.marginTop, 733 overTop = collisionPosTop - offsetTop, 734 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, 735 top = data.my[ 1 ] === "top", 736 myOffset = top ? 737 -data.elemHeight : 738 data.my[ 1 ] === "bottom" ? 739 data.elemHeight : 740 0, 741 atOffset = data.at[ 1 ] === "top" ? 742 data.targetHeight : 743 data.at[ 1 ] === "bottom" ? 744 -data.targetHeight : 745 0, 746 offset = -2 * data.offset[ 1 ], 747 newOverTop, 748 newOverBottom; 749 if ( overTop < 0 ) { 750 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; 751 if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { 752 position.top += myOffset + atOffset + offset; 753 } 754 } else if ( overBottom > 0 ) { 755 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 756 if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { 757 position.top += myOffset + atOffset + offset; 758 } 759 } 760 } 761 }, 762 flipfit: { 763 left: function() { 764 $.ui.position.flip.left.apply( this, arguments ); 765 $.ui.position.fit.left.apply( this, arguments ); 766 }, 767 top: function() { 768 $.ui.position.flip.top.apply( this, arguments ); 769 $.ui.position.fit.top.apply( this, arguments ); 770 } 771 } 772}; 773 774// fraction support test 775(function() { 776 var testElement, testElementParent, testElementStyle, offsetLeft, i, 777 body = document.getElementsByTagName( "body" )[ 0 ], 778 div = document.createElement( "div" ); 779 780 //Create a "fake body" for testing based on method used in jQuery.support 781 testElement = document.createElement( body ? "div" : "body" ); 782 testElementStyle = { 783 visibility: "hidden", 784 width: 0, 785 height: 0, 786 border: 0, 787 margin: 0, 788 background: "none" 789 }; 790 if ( body ) { 791 $.extend( testElementStyle, { 792 position: "absolute", 793 left: "-1000px", 794 top: "-1000px" 795 }); 796 } 797 for ( i in testElementStyle ) { 798 testElement.style[ i ] = testElementStyle[ i ]; 799 } 800 testElement.appendChild( div ); 801 testElementParent = body || document.documentElement; 802 testElementParent.insertBefore( testElement, testElementParent.firstChild ); 803 804 div.style.cssText = "position: absolute; left: 10.7432222px;"; 805 806 offsetLeft = $( div ).offset().left; 807 supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; 808 809 testElement.innerHTML = ""; 810 testElementParent.removeChild( testElement ); 811})(); 812 813})(); 814 815var position = $.ui.position; 816 817 818 819}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.