{"version":3,"sources":["jquery.ba-resize.js"],"names":["$","window","undefined","loopy","timeout_id","str_setTimeout","elems","each","elem","this","width","height","data","str_data","w","h","trigger","str_resize","jq_resize","str_delay","resize","extend","str_throttle","event","special","setup","add","length","teardown","not","removeData","clearTimeout","handleObj","new_handler","e","old_handler","apply","arguments","isFunction","handler","ixp","runtime","components","dependencies","jQuery","v1_11"],"mappings":"CAgDA,SAAUA,EAAEC,EAAOC,GACjB,WAyKA,SAASC,KAGPC,EAAaH,EAAQI,GAAiB,WAGpCC,EAAMC,KAAK,WACT,GAAIC,GAAOR,EAAES,MACXC,EAAQF,EAAKE,QACbC,EAASH,EAAKG,SACdC,EAAOZ,EAAEY,KAAMH,KAAMI,EAIlBH,KAAUE,EAAKE,GAAKH,IAAWC,EAAKG,GACvCP,EAAKQ,QAASC,GAAcL,EAAKE,EAAIJ,EAAOE,EAAKG,EAAIJ,MAMzDR,KAECe,EAAWC,IA5LhB,GAKEf,GALEE,EAAQN,MAGVkB,EAAYlB,EAAEoB,OAASpB,EAAEqB,OAAQrB,EAAEoB,WAKnCf,EAAiB,aACjBY,EAAa,SACbJ,EAAWI,EAAa,iBACxBE,EAAY,QACZG,EAAe,gBAOjBJ,GAAWC,GAAc,IAiBzBD,EAAWI,IAAiB,EAuC5BtB,EAAEuB,MAAMC,QAASP,IAGfQ,MAAO,WAKL,IAAMP,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAIG,GAAOR,EAAES,KAGbH,GAAQA,EAAMoB,IAAKlB,GAGnBR,EAAEY,KAAMH,KAAMI,GAAYC,EAAGN,EAAKE,QAASK,EAAGP,EAAKG,WAG7B,IAAjBL,EAAMqB,QACTxB,KAKJyB,SAAU,WAKR,IAAMV,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAIG,GAAOR,EAAES,KAGbH,GAAQA,EAAMuB,IAAKrB,GAGnBA,EAAKsB,WAAYjB,GAGXP,EAAMqB,QACVI,aAAc3B,IAMlBsB,IAAK,SAAUM,GAcb,QAASC,GAAaC,EAAGpB,EAAGC,GAC1B,GAAIP,GAAOR,EAAES,MACXG,EAAOZ,EAAEY,KAAMH,KAAMI,EAKvBD,GAAKE,EAAIA,IAAMZ,EAAYY,EAAIN,EAAKE,QACpCE,EAAKG,EAAIA,IAAMb,EAAYa,EAAIP,EAAKG,SAEpCwB,EAAYC,MAAO3B,KAAM4B,WApB3B,IAAMnB,EAAWI,IAAkBb,KAAMJ,GAAqB,OAAO,CAErE,IAAI8B,EAuBJ,OAAKnC,GAAEsC,WAAYN,IAEjBG,EAAcH,EACPC,IAGPE,EAAcH,EAAUO,aACxBP,EAAUO,QAAUN,OAiCzBhC,OAAOuC,IAAIC,QAAQC,WAAWC,aAAaC,OAAOC,MAAOpC","file":"jquery.ba-resize.min.js","sourcesContent":["/*!\n * jQuery resize event - v1.1 - 3/14/2010\n * http://benalman.com/projects/jquery-resize-plugin/\n *\n * Copyright (c) 2010 \"Cowboy\" Ben Alman\n * Dual licensed under the MIT and GPL licenses.\n * http://benalman.com/about/license/\n */\n\n// Script: jQuery resize event\n//\n// *Version: 1.1, Last updated: 3/14/2010*\n//\n// Project Home - http://benalman.com/projects/jquery-resize-plugin/\n// GitHub       - http://github.com/cowboy/jquery-resize/\n// Source       - http://github.com/cowboy/jquery-resize/raw/master/jquery.ba-resize.js\n// (Minified)   - http://github.com/cowboy/jquery-resize/raw/master/jquery.ba-resize.min.js (1.0kb)\n//\n// About: License\n//\n// Copyright (c) 2010 \"Cowboy\" Ben Alman,\n// Dual licensed under the MIT and GPL licenses.\n// http://benalman.com/about/license/\n//\n// About: Examples\n//\n// This working example, complete with fully commented code, illustrates a few\n// ways in which this plugin can be used.\n//\n// resize event - http://benalman.com/code/projects/jquery-resize/examples/resize/\n//\n// About: Support and Testing\n//\n// Information about what version or versions of jQuery this plugin has been\n// tested with, what browsers it has been tested in, and where the unit tests\n// reside (so you can test it yourself).\n//\n// jQuery Versions - 1.3.2, 1.4.1, 1.4.2\n// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.1.\n// Unit Tests      - http://benalman.com/code/projects/jquery-resize/unit/\n//\n// About: Release History\n//\n// 1.1 - (3/14/2010) Fixed a minor bug that was causing the event to trigger\n//       immediately after bind in some circumstances. Also changed $.fn.data\n//       to $.data to improve performance.\n// 1.0 - (2/10/2010) Initial release\n\n(function($,window,undefined){\n  '$:nomunge'; // Used by YUI compressor.\n\n  // A jQuery object containing all non-window elements to which the resize\n  // event is bound.\n  var elems = $([]),\n\n    // Extend $.resize if it already exists, otherwise create it.\n    jq_resize = $.resize = $.extend( $.resize, {} ),\n\n    timeout_id,\n\n    // Reused strings.\n    str_setTimeout = 'setTimeout',\n    str_resize = 'resize',\n    str_data = str_resize + '-special-event',\n    str_delay = 'delay',\n    str_throttle = 'throttleWindow';\n\n  // Property: jQuery.resize.delay\n  //\n  // The numeric interval (in milliseconds) at which the resize event polling\n  // loop executes. Defaults to 250.\n\n  jq_resize[ str_delay ] = 250;\n\n  // Property: jQuery.resize.throttleWindow\n  //\n  // Throttle the native window object resize event to fire no more than once\n  // every <jQuery.resize.delay> milliseconds. Defaults to true.\n  //\n  // Because the window object has its own resize event, it doesn't need to be\n  // provided by this plugin, and its execution can be left entirely up to the\n  // browser. However, since certain browsers fire the resize event continuously\n  // while others do not, enabling this will throttle the window resize event,\n  // making event behavior consistent across all elements in all browsers.\n  //\n  // While setting this property to false will disable window object resize\n  // event throttling, please note that this property must be changed before any\n  // window object resize event callbacks are bound.\n\n  jq_resize[ str_throttle ] = true;\n\n  // Event: resize event\n  //\n  // Fired when an element's width or height changes. Because browsers only\n  // provide this event for the window element, for other elements a polling\n  // loop is initialized, running every <jQuery.resize.delay> milliseconds\n  // to see if elements' dimensions have changed. You may bind with either\n  // .resize( fn ) or .bind( \"resize\", fn ), and unbind with .unbind( \"resize\" ).\n  //\n  // Usage:\n  //\n  // > jQuery('selector').bind( 'resize', function(e) {\n  // >   // element's width or height has changed!\n  // >   ...\n  // > });\n  //\n  // Additional Notes:\n  //\n  // * The polling loop is not created until at least one callback is actually\n  //   bound to the 'resize' event, and this single polling loop is shared\n  //   across all elements.\n  //\n  // Double firing issue in jQuery 1.3.2:\n  //\n  // While this plugin works in jQuery 1.3.2, if an element's event callbacks\n  // are manually triggered via .trigger( 'resize' ) or .resize() those\n  // callbacks may double-fire, due to limitations in the jQuery 1.3.2 special\n  // events system. This is not an issue when using jQuery 1.4+.\n  //\n  // > // While this works in jQuery 1.4+\n  // > $(elem).css({ width: new_w, height: new_h }).resize();\n  // >\n  // > // In jQuery 1.3.2, you need to do this:\n  // > var elem = $(elem);\n  // > elem.css({ width: new_w, height: new_h });\n  // > elem.data( 'resize-special-event', { width: elem.width(), height: elem.height() } );\n  // > elem.resize();\n\n  $.event.special[ str_resize ] = {\n\n    // Called only when the first 'resize' event callback is bound per element.\n    setup: function() {\n      // Since window has its own native 'resize' event, return false so that\n      // jQuery will bind the event using DOM methods. Since only 'window'\n      // objects have a .setTimeout method, this should be a sufficient test.\n      // Unless, of course, we're throttling the 'resize' event for window.\n      if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\n\n      var elem = $(this);\n\n      // Add this element to the list of internal elements to monitor.\n      elems = elems.add( elem );\n\n      // Initialize data store on the element.\n      $.data( this, str_data, { w: elem.width(), h: elem.height() } );\n\n      // If this is the first element added, start the polling loop.\n      if ( elems.length === 1 ) {\n        loopy();\n      }\n    },\n\n    // Called only when the last 'resize' event callback is unbound per element.\n    teardown: function() {\n      // Since window has its own native 'resize' event, return false so that\n      // jQuery will unbind the event using DOM methods. Since only 'window'\n      // objects have a .setTimeout method, this should be a sufficient test.\n      // Unless, of course, we're throttling the 'resize' event for window.\n      if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\n\n      var elem = $(this);\n\n      // Remove this element from the list of internal elements to monitor.\n      elems = elems.not( elem );\n\n      // Remove any data stored on the element.\n      elem.removeData( str_data );\n\n      // If this is the last element removed, stop the polling loop.\n      if ( !elems.length ) {\n        clearTimeout( timeout_id );\n      }\n    },\n\n    // Called every time a 'resize' event callback is bound per element (new in\n    // jQuery 1.4).\n    add: function( handleObj ) {\n      // Since window has its own native 'resize' event, return false so that\n      // jQuery doesn't modify the event object. Unless, of course, we're\n      // throttling the 'resize' event for window.\n      if ( !jq_resize[ str_throttle ] && this[ str_setTimeout ] ) { return false; }\n\n      var old_handler;\n\n      // The new_handler function is executed every time the event is triggered.\n      // This is used to update the internal element data store with the width\n      // and height when the event is triggered manually, to avoid double-firing\n      // of the event callback. See the \"Double firing issue in jQuery 1.3.2\"\n      // comments above for more information.\n\n      function new_handler( e, w, h ) {\n        var elem = $(this),\n          data = $.data( this, str_data );\n\n        // If called from the polling loop, w and h will be passed in as\n        // arguments. If called manually, via .trigger( 'resize' ) or .resize(),\n        // those values will need to be computed.\n        data.w = w !== undefined ? w : elem.width();\n        data.h = h !== undefined ? h : elem.height();\n\n        old_handler.apply( this, arguments );\n      };\n\n      // This may seem a little complicated, but it normalizes the special event\n      // .add method between jQuery 1.4/1.4.1 and 1.4.2+\n      if ( $.isFunction( handleObj ) ) {\n        // 1.4, 1.4.1\n        old_handler = handleObj;\n        return new_handler;\n      } else {\n        // 1.4.2+\n        old_handler = handleObj.handler;\n        handleObj.handler = new_handler;\n      }\n    }\n\n  };\n\n  function loopy() {\n\n    // Start the polling loop, asynchronously.\n    timeout_id = window[ str_setTimeout ](function(){\n\n      // Iterate over all elements to which the 'resize' event is bound.\n      elems.each(function(){\n        var elem = $(this),\n          width = elem.width(),\n          height = elem.height(),\n          data = $.data( this, str_data );\n\n        // If element size has changed since the last time, update the element\n        // data store and trigger the 'resize' event.\n        if ( width !== data.w || height !== data.h ) {\n          elem.trigger( str_resize, [ data.w = width, data.h = height ] );\n        }\n\n      });\n\n      // Loop.\n      loopy();\n\n    }, jq_resize[ str_delay ] );\n\n  };\n\n})(window.ixp.runtime.components.dependencies.jQuery.v1_11, this);\n"]}