{"version":3,"sources":["webpack:///./node_modules/get-size/get-size.js","webpack:///./node_modules/outlayer/outlayer.js","webpack:///./node_modules/ev-emitter/ev-emitter.js","webpack:///./node_modules/isotope-layout/js/layout-mode.js","webpack:///./node_modules/fizzy-ui-utils/utils.js","webpack:///./node_modules/desandro-matches-selector/matches-selector.js","webpack:///./node_modules/outlayer/item.js","webpack:///./node_modules/isotope-layout/js/item.js","webpack:///./node_modules/isotope-layout/js/layout-modes/masonry.js","webpack:///./node_modules/masonry-layout/masonry.js","webpack:///./node_modules/isotope-layout/js/layout-modes/fit-rows.js","webpack:///./node_modules/isotope-layout/js/layout-modes/vertical.js","webpack:///./node_modules/isotope-layout/js/isotope.js"],"names":["window","getStyleSize","value","num","parseFloat","indexOf","isNaN","logError","console","message","error","measurements","measurementsLength","length","getStyle","elem","style","getComputedStyle","isBoxSizeOuter","isSetup","getSize","div","document","createElement","width","padding","borderStyle","borderWidth","boxSizing","body","documentElement","appendChild","Math","round","removeChild","setup","querySelector","nodeType","display","size","height","innerWidth","innerHeight","outerWidth","outerHeight","i","getZeroSize","offsetWidth","offsetHeight","isBorderBox","measurement","paddingWidth","paddingLeft","paddingRight","paddingHeight","paddingTop","paddingBottom","marginWidth","marginLeft","marginRight","marginHeight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderHeight","borderTopWidth","borderBottomWidth","isBorderBoxSizeOuter","styleWidth","styleHeight","factory","EvEmitter","utils","Item","jQuery","noop","GUID","instances","Outlayer","element","options","queryElement","getQueryElement","this","$element","extend","constructor","defaults","option","id","outlayerGUID","_create","_getOption","layout","namespace","containerStyle","position","initLayout","originLeft","originTop","resize","resizeContainer","transitionDuration","hiddenStyle","opacity","transform","visibleStyle","proto","prototype","subclass","Parent","SubClass","apply","arguments","Object","create","opts","oldOption","compatOptions","undefined","horizontal","layoutInstant","reloadItems","stamps","stamp","bindResize","items","_itemize","children","elems","itemElems","_filterFindItemElements","item","push","filterFindElements","itemSelector","getItemElements","map","_resetLayout","_manageStamps","isInstant","_isLayoutInited","layoutItems","_init","_getMeasurement","HTMLElement","_getItemsForLayout","_layoutItems","_postLayout","filter","isIgnored","_emitCompleteOnItems","queue","forEach","_getItemLayoutPosition","isLayoutInstant","_processLayoutQueue","x","y","updateStagger","obj","_positionItem","stagger","time","matches","match","unit","mult","msUnits","getMilliseconds","goTo","moveTo","_getContainerSize","_setContainerMeasure","measure","isWidth","elemSize","max","eventName","_this","onComplete","dispatchEvent","count","doneCount","once","tick","type","event","args","emitArgs","concat","emitEvent","$event","Event","trigger","ignore","getItem","unignore","_find","unstamp","removeFrom","querySelectorAll","makeArray","_getBoundingRect","_manageStamp","boundingRect","getBoundingClientRect","_boundingRect","left","top","right","bottom","_getElementOffset","thisRect","handleEvent","addEventListener","isResizeBound","unbindResize","removeEventListener","onresize","debounceMethod","needsResizeLayout","addItems","appended","reveal","prepended","previousItems","slice","hide","revealItemElements","getItems","hideItemElements","remove","removeItems","destroy","removeData","data","Layout","htmlInit","bridget","ms","s","on","listener","events","_events","listeners","onceEvents","_onceEvents","off","index","splice","onceListeners","allOff","LayoutMode","isotope","filteredItems","methodName","needsVerticalResizeLayout","getColumnWidth","getSegmentSize","getRowHeight","segment","segmentName","outerSize","firstItemSize","getFirstItemSize","firstItem","modes","Mode","matchesSelector","a","b","prop","arraySlice","Array","isArray","call","ary","getParent","selector","parentNode","method","ffElems","childElems","_class","threshold","timeoutName","timeout","clearTimeout","setTimeout","docReady","callback","readyState","toDashed","str","replace","$1","$2","toLowerCase","WidgetClass","dashedNamespace","dataAttr","dataAttrElems","jsDashElems","dataOptionsAttr","attr","getAttribute","JSON","parse","className","instance","matchesMethod","ElemProto","Element","prefixes","docElemStyle","transitionProperty","transition","transformProperty","transitionEndEvent","WebkitTransition","vendorProperties","transitionDelay","_transn","ingProperties","clean","onEnd","css","elemStyle","getPosition","isOriginLeft","isOriginTop","xValue","yValue","layoutSize","layoutPosition","xPadding","xProperty","xResetProperty","getXValue","yPadding","yProperty","yResetProperty","getYValue","isHorizontal","percentPosition","_transitionTo","curX","curY","didNotMove","setPosition","isTransitioning","transX","transY","transitionStyle","getTranslate","to","onTransitionEnd","isCleaning","_nonTransition","_removeStyles","_transition","from","enableTransition","transitionProps","duration","staggerDelay","onwebkitTransitionEnd","ontransitionend","onotransitionend","dashedVendorProperties","target","propertyName","isEmptyObj","disableTransition","removeTransitionStyles","cleanStyle","cleanTransitionStyle","delay","removeElem","isHidden","getHideRevealTransitionEndProperty","onRevealTransitionEnd","styleProperty","optionStyle","onHideTransitionEnd","itemGUID","sortData","updateSortData","random","getSortData","sorters","_sorters","key","sorter","_destroy","Masonry","MasonryMode","keepModeMethods","measureColumns","isFitWidth","fitWidth","colYs","cols","maxY","horizontalColIndex","getContainerWidth","columnWidth","firstItemElem","containerWidth","gutter","excess","container","remainder","colSpan","min","colPosition","horizontalOrder","col","setHeight","setMax","_getTopColPosition","colGroup","_getTopColGroup","minimumY","groupCount","_getColGroupY","groupColYs","_getHorizontalColPosition","hasSize","stampSize","offset","firstX","lastX","firstCol","floor","lastCol","stampMaxY","_getContainerFitWidth","unusedCols","previousWidth","FitRows","itemWidth","Vertical","horizontalAlignment","trim","String","Isotope","layoutMode","isJQueryFiltering","sortAscending","name","_getSorters","sortHistory","_initLayoutMode","_updateItemsSortData","initialOpts","_layout","arrange","_getIsInstant","filtered","_filter","_bindArrangeComplete","_isInstant","_noTransition","_hideReveal","_sort","needReveal","needHide","isLayoutComplete","isHideComplete","isRevealComplete","arrangeParallelCallback","hiddenMatched","visibleUnmatched","test","_getFilterTest","isMatched","is","mungeSorter","len","split","query","attrMatch","getValue","child","textContent","getValueGetter","parser","sortDataParsers","val","parseInt","sortBy","sortBys","_getIsSameSortBy","itemSorter","sortAsc","itemA","itemB","getItemSorter","sort","_mode","mode","Error","_filterRevealAdded","insert","filteredInsertItems","_remove","shuffle","fn","returnValue","getFilteredItemElements"],"mappings":"6EAAA;;;;;GAsBIA,YATe,0BAAf,EASQ,WACZ,aAKA,SAASC,EAAcC,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QAAQ6Z,OAAS,SACtB1Z,KAAKgY,QACLhY,KAAKuX,WAWP/V,EAAMsW,cAAgB,SAAU6C,EAAIlU,GAElC,IAAItF,EAAqBnB,KAAKH,QAAQsB,mBAEtCnB,KAAKH,QAAQsB,mBAAqB,EAElC,IAAIyZ,EAAcD,EAAG9Y,MAAO7B,KAAMyG,GAGlC,OADAzG,KAAKH,QAAQsB,mBAAqBA,EAC3ByZ,GASTpZ,EAAMqZ,wBAA0B,WAC9B,OAAO7a,KAAK6K,cAAcvH,KAAK,SAAUL,GACvC,OAAOA,EAAKrD,YAMTiX,EA9kBM1X,CAASvE,EAAQ+E,EAAU3D,EAAS2P,EAAiBtM,EAAOC,EAAMqL,IAC1E,2BAnBP,CAgDG/P","file":"2.app.js","sourcesContent":["/*!\n * getSize v2.0.3\n * measure size of elements\n * MIT license\n */\n\n/* jshint browser: true, strict: true, undef: true, unused: true */\n/* globals console: false */\n\n( function( window, factory ) {\n /* jshint strict: false */ /* globals define, module */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.getSize = factory();\n }\n\n})( window, function factory() {\n'use strict';\n\n// -------------------------- helpers -------------------------- //\n\n// get a number from a string, not a percentage\nfunction getStyleSize( value ) {\n var num = parseFloat( value );\n // not a percent like '100%', and a number\n var isValid = value.indexOf('%') == -1 && !isNaN( num );\n return isValid && num;\n}\n\nfunction noop() {}\n\nvar logError = typeof console == 'undefined' ? noop :\n function( message ) {\n console.error( message );\n };\n\n// -------------------------- measurements -------------------------- //\n\nvar measurements = [\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopWidth',\n 'borderBottomWidth'\n];\n\nvar measurementsLength = measurements.length;\n\nfunction getZeroSize() {\n var size = {\n width: 0,\n height: 0,\n innerWidth: 0,\n innerHeight: 0,\n outerWidth: 0,\n outerHeight: 0\n };\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n size[ measurement ] = 0;\n }\n return size;\n}\n\n// -------------------------- getStyle -------------------------- //\n\n/**\n * getStyle, get style of element, check for Firefox bug\n * https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction getStyle( elem ) {\n var style = getComputedStyle( elem );\n if ( !style ) {\n logError( 'Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See https://bit.ly/getsizebug1' );\n }\n return style;\n}\n\n// -------------------------- setup -------------------------- //\n\nvar isSetup = false;\n\nvar isBoxSizeOuter;\n\n/**\n * setup\n * check isBoxSizerOuter\n * do on first getSize() rather than on page load for Firefox bug\n */\nfunction setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}\n\n// -------------------------- getSize -------------------------- //\n\nfunction getSize( elem ) {\n setup();\n\n // use querySeletor if elem is string\n if ( typeof elem == 'string' ) {\n elem = document.querySelector( elem );\n }\n\n // do not proceed on non-objects\n if ( !elem || typeof elem != 'object' || !elem.nodeType ) {\n return;\n }\n\n var style = getStyle( elem );\n\n // if hidden, everything is 0\n if ( style.display == 'none' ) {\n return getZeroSize();\n }\n\n var size = {};\n size.width = elem.offsetWidth;\n size.height = elem.offsetHeight;\n\n var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';\n\n // get all measurements\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n var value = style[ measurement ];\n var num = parseFloat( value );\n // any 'auto', 'medium' value will be 0\n size[ measurement ] = !isNaN( num ) ? num : 0;\n }\n\n var paddingWidth = size.paddingLeft + size.paddingRight;\n var paddingHeight = size.paddingTop + size.paddingBottom;\n var marginWidth = size.marginLeft + size.marginRight;\n var marginHeight = size.marginTop + size.marginBottom;\n var borderWidth = size.borderLeftWidth + size.borderRightWidth;\n var borderHeight = size.borderTopWidth + size.borderBottomWidth;\n\n var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;\n\n // overwrite width and height if we can get it from style\n var styleWidth = getStyleSize( style.width );\n if ( styleWidth !== false ) {\n size.width = styleWidth +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );\n }\n\n var styleHeight = getStyleSize( style.height );\n if ( styleHeight !== false ) {\n size.height = styleHeight +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );\n }\n\n size.innerWidth = size.width - ( paddingWidth + borderWidth );\n size.innerHeight = size.height - ( paddingHeight + borderHeight );\n\n size.outerWidth = size.width + marginWidth;\n size.outerHeight = size.height + marginHeight;\n\n return size;\n}\n\nreturn getSize;\n\n});\n","/*!\n * Outlayer v2.1.1\n * the brains and guts of a layout library\n * MIT license\n */\n\n( function( window, factory ) {\n 'use strict';\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size',\n 'fizzy-ui-utils/utils',\n './item'\n ],\n function( EvEmitter, getSize, utils, Item ) {\n return factory( window, EvEmitter, getSize, utils, Item);\n }\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n window,\n require('ev-emitter'),\n require('get-size'),\n require('fizzy-ui-utils'),\n require('./item')\n );\n } else {\n // browser global\n window.Outlayer = factory(\n window,\n window.EvEmitter,\n window.getSize,\n window.fizzyUIUtils,\n window.Outlayer.Item\n );\n }\n\n}( window, function factory( window, EvEmitter, getSize, utils, Item ) {\n'use strict';\n\n// ----- vars ----- //\n\nvar console = window.console;\nvar jQuery = window.jQuery;\nvar noop = function() {};\n\n// -------------------------- Outlayer -------------------------- //\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Outlayer intances\nvar instances = {};\n\n\n/**\n * @param {Element, String} element\n * @param {Object} options\n * @constructor\n */\nfunction Outlayer( element, options ) {\n var queryElement = utils.getQueryElement( element );\n if ( !queryElement ) {\n if ( console ) {\n console.error( 'Bad element for ' + this.constructor.namespace +\n ': ' + ( queryElement || element ) );\n }\n return;\n }\n this.element = queryElement;\n // add jQuery\n if ( jQuery ) {\n this.$element = jQuery( this.element );\n }\n\n // options\n this.options = utils.extend( {}, this.constructor.defaults );\n this.option( options );\n\n // add id for Outlayer.getFromElement\n var id = ++GUID;\n this.element.outlayerGUID = id; // expando\n instances[ id ] = this; // associate via id\n\n // kick it off\n this._create();\n\n var isInitLayout = this._getOption('initLayout');\n if ( isInitLayout ) {\n this.layout();\n }\n}\n\n// settings are for internal use only\nOutlayer.namespace = 'outlayer';\nOutlayer.Item = Item;\n\n// default options\nOutlayer.defaults = {\n containerStyle: {\n position: 'relative'\n },\n initLayout: true,\n originLeft: true,\n originTop: true,\n resize: true,\n resizeContainer: true,\n // item options\n transitionDuration: '0.4s',\n hiddenStyle: {\n opacity: 0,\n transform: 'scale(0.001)'\n },\n visibleStyle: {\n opacity: 1,\n transform: 'scale(1)'\n }\n};\n\nvar proto = Outlayer.prototype;\n// inherit EvEmitter\nutils.extend( proto, EvEmitter.prototype );\n\n/**\n * set options\n * @param {Object} opts\n */\nproto.option = function( opts ) {\n utils.extend( this.options, opts );\n};\n\n/**\n * get backwards compatible option value, check old name\n */\nproto._getOption = function( option ) {\n var oldOption = this.constructor.compatOptions[ option ];\n return oldOption && this.options[ oldOption ] !== undefined ?\n this.options[ oldOption ] : this.options[ option ];\n};\n\nOutlayer.compatOptions = {\n // currentName: oldName\n initLayout: 'isInitLayout',\n horizontal: 'isHorizontal',\n layoutInstant: 'isLayoutInstant',\n originLeft: 'isOriginLeft',\n originTop: 'isOriginTop',\n resize: 'isResizeBound',\n resizeContainer: 'isResizingContainer'\n};\n\nproto._create = function() {\n // get items from children\n this.reloadItems();\n // elements that affect layout, but are not laid out\n this.stamps = [];\n this.stamp( this.options.stamp );\n // set container style\n utils.extend( this.element.style, this.options.containerStyle );\n\n // bind resize method\n var canBindResize = this._getOption('resize');\n if ( canBindResize ) {\n this.bindResize();\n }\n};\n\n// goes through all children again and gets bricks in proper order\nproto.reloadItems = function() {\n // collection of item elements\n this.items = this._itemize( this.element.children );\n};\n\n\n/**\n * turn elements into Outlayer.Items to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - collection of new Outlayer Items\n */\nproto._itemize = function( elems ) {\n\n var itemElems = this._filterFindItemElements( elems );\n var Item = this.constructor.Item;\n\n // create new Outlayer Items for collection\n var items = [];\n for ( var i=0; i < itemElems.length; i++ ) {\n var elem = itemElems[i];\n var item = new Item( elem, this );\n items.push( item );\n }\n\n return items;\n};\n\n/**\n * get item elements to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - item elements\n */\nproto._filterFindItemElements = function( elems ) {\n return utils.filterFindElements( elems, this.options.itemSelector );\n};\n\n/**\n * getter method for getting item elements\n * @returns {Array} elems - collection of item elements\n */\nproto.getItemElements = function() {\n return this.items.map( function( item ) {\n return item.element;\n });\n};\n\n// ----- init & layout ----- //\n\n/**\n * lays out all items\n */\nproto.layout = function() {\n this._resetLayout();\n this._manageStamps();\n\n // don't animate first layout\n var layoutInstant = this._getOption('layoutInstant');\n var isInstant = layoutInstant !== undefined ?\n layoutInstant : !this._isLayoutInited;\n this.layoutItems( this.items, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n};\n\n// _init is alias for layout\nproto._init = proto.layout;\n\n/**\n * logic before any new layout\n */\nproto._resetLayout = function() {\n this.getSize();\n};\n\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * get measurement from option, for columnWidth, rowHeight, gutter\n * if option is String -> get element from selector string, & get size of element\n * if option is Element -> get size of element\n * else use option as a number\n *\n * @param {String} measurement\n * @param {String} size - width or height\n * @private\n */\nproto._getMeasurement = function( measurement, size ) {\n var option = this.options[ measurement ];\n var elem;\n if ( !option ) {\n // default to 0\n this[ measurement ] = 0;\n } else {\n // use option as an element\n if ( typeof option == 'string' ) {\n elem = this.element.querySelector( option );\n } else if ( option instanceof HTMLElement ) {\n elem = option;\n }\n // use size of element, if element\n this[ measurement ] = elem ? getSize( elem )[ size ] : option;\n }\n};\n\n/**\n * layout a collection of item elements\n * @api public\n */\nproto.layoutItems = function( items, isInstant ) {\n items = this._getItemsForLayout( items );\n\n this._layoutItems( items, isInstant );\n\n this._postLayout();\n};\n\n/**\n * get the items to be laid out\n * you may want to skip over some items\n * @param {Array} items\n * @returns {Array} items\n */\nproto._getItemsForLayout = function( items ) {\n return items.filter( function( item ) {\n return !item.isIgnored;\n });\n};\n\n/**\n * layout items\n * @param {Array} items\n * @param {Boolean} isInstant\n */\nproto._layoutItems = function( items, isInstant ) {\n this._emitCompleteOnItems( 'layout', items );\n\n if ( !items || !items.length ) {\n // no items, emit event with empty array\n return;\n }\n\n var queue = [];\n\n items.forEach( function( item ) {\n // get x/y object from method\n var position = this._getItemLayoutPosition( item );\n // enqueue\n position.item = item;\n position.isInstant = isInstant || item.isLayoutInstant;\n queue.push( position );\n }, this );\n\n this._processLayoutQueue( queue );\n};\n\n/**\n * get item layout position\n * @param {Outlayer.Item} item\n * @returns {Object} x and y position\n */\nproto._getItemLayoutPosition = function( /* item */ ) {\n return {\n x: 0,\n y: 0\n };\n};\n\n/**\n * iterate over array and position each item\n * Reason being - separating this logic prevents 'layout invalidation'\n * thx @paul_irish\n * @param {Array} queue\n */\nproto._processLayoutQueue = function( queue ) {\n this.updateStagger();\n queue.forEach( function( obj, i ) {\n this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );\n }, this );\n};\n\n// set stagger from option in milliseconds number\nproto.updateStagger = function() {\n var stagger = this.options.stagger;\n if ( stagger === null || stagger === undefined ) {\n this.stagger = 0;\n return;\n }\n this.stagger = getMilliseconds( stagger );\n return this.stagger;\n};\n\n/**\n * Sets position of item in DOM\n * @param {Outlayer.Item} item\n * @param {Number} x - horizontal position\n * @param {Number} y - vertical position\n * @param {Boolean} isInstant - disables transitions\n */\nproto._positionItem = function( item, x, y, isInstant, i ) {\n if ( isInstant ) {\n // if not transition, just set CSS\n item.goTo( x, y );\n } else {\n item.stagger( i * this.stagger );\n item.moveTo( x, y );\n }\n};\n\n/**\n * Any logic you want to do after each layout,\n * i.e. size the container\n */\nproto._postLayout = function() {\n this.resizeContainer();\n};\n\nproto.resizeContainer = function() {\n var isResizingContainer = this._getOption('resizeContainer');\n if ( !isResizingContainer ) {\n return;\n }\n var size = this._getContainerSize();\n if ( size ) {\n this._setContainerMeasure( size.width, true );\n this._setContainerMeasure( size.height, false );\n }\n};\n\n/**\n * Sets width or height of container if returned\n * @returns {Object} size\n * @param {Number} width\n * @param {Number} height\n */\nproto._getContainerSize = noop;\n\n/**\n * @param {Number} measure - size of width or height\n * @param {Boolean} isWidth\n */\nproto._setContainerMeasure = function( measure, isWidth ) {\n if ( measure === undefined ) {\n return;\n }\n\n var elemSize = this.size;\n // add padding and border width if border box\n if ( elemSize.isBorderBox ) {\n measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +\n elemSize.borderLeftWidth + elemSize.borderRightWidth :\n elemSize.paddingBottom + elemSize.paddingTop +\n elemSize.borderTopWidth + elemSize.borderBottomWidth;\n }\n\n measure = Math.max( measure, 0 );\n this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';\n};\n\n/**\n * emit eventComplete on a collection of items events\n * @param {String} eventName\n * @param {Array} items - Outlayer.Items\n */\nproto._emitCompleteOnItems = function( eventName, items ) {\n var _this = this;\n function onComplete() {\n _this.dispatchEvent( eventName + 'Complete', null, [ items ] );\n }\n\n var count = items.length;\n if ( !items || !count ) {\n onComplete();\n return;\n }\n\n var doneCount = 0;\n function tick() {\n doneCount++;\n if ( doneCount == count ) {\n onComplete();\n }\n }\n\n // bind callback\n items.forEach( function( item ) {\n item.once( eventName, tick );\n });\n};\n\n/**\n * emits events via EvEmitter and jQuery events\n * @param {String} type - name of event\n * @param {Event} event - original event\n * @param {Array} args - extra arguments\n */\nproto.dispatchEvent = function( type, event, args ) {\n // add original event to arguments\n var emitArgs = event ? [ event ].concat( args ) : args;\n this.emitEvent( type, emitArgs );\n\n if ( jQuery ) {\n // set this.$element\n this.$element = this.$element || jQuery( this.element );\n if ( event ) {\n // create jQuery event\n var $event = jQuery.Event( event );\n $event.type = type;\n this.$element.trigger( $event, args );\n } else {\n // just trigger with type if no event available\n this.$element.trigger( type, args );\n }\n }\n};\n\n// -------------------------- ignore & stamps -------------------------- //\n\n\n/**\n * keep item in collection, but do not lay it out\n * ignored items do not get skipped in layout\n * @param {Element} elem\n */\nproto.ignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n item.isIgnored = true;\n }\n};\n\n/**\n * return item to layout collection\n * @param {Element} elem\n */\nproto.unignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n delete item.isIgnored;\n }\n};\n\n/**\n * adds elements to stamps\n * @param {NodeList, Array, Element, or String} elems\n */\nproto.stamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ) {\n return;\n }\n\n this.stamps = this.stamps.concat( elems );\n // ignore\n elems.forEach( this.ignore, this );\n};\n\n/**\n * removes elements to stamps\n * @param {NodeList, Array, or Element} elems\n */\nproto.unstamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ){\n return;\n }\n\n elems.forEach( function( elem ) {\n // filter out removed stamp elements\n utils.removeFrom( this.stamps, elem );\n this.unignore( elem );\n }, this );\n};\n\n/**\n * finds child elements\n * @param {NodeList, Array, Element, or String} elems\n * @returns {Array} elems\n */\nproto._find = function( elems ) {\n if ( !elems ) {\n return;\n }\n // if string, use argument as selector string\n if ( typeof elems == 'string' ) {\n elems = this.element.querySelectorAll( elems );\n }\n elems = utils.makeArray( elems );\n return elems;\n};\n\nproto._manageStamps = function() {\n if ( !this.stamps || !this.stamps.length ) {\n return;\n }\n\n this._getBoundingRect();\n\n this.stamps.forEach( this._manageStamp, this );\n};\n\n// update boundingLeft / Top\nproto._getBoundingRect = function() {\n // get bounding rect for container element\n var boundingRect = this.element.getBoundingClientRect();\n var size = this.size;\n this._boundingRect = {\n left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,\n top: boundingRect.top + size.paddingTop + size.borderTopWidth,\n right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),\n bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )\n };\n};\n\n/**\n * @param {Element} stamp\n**/\nproto._manageStamp = noop;\n\n/**\n * get x/y position of element relative to container element\n * @param {Element} elem\n * @returns {Object} offset - has left, top, right, bottom\n */\nproto._getElementOffset = function( elem ) {\n var boundingRect = elem.getBoundingClientRect();\n var thisRect = this._boundingRect;\n var size = getSize( elem );\n var offset = {\n left: boundingRect.left - thisRect.left - size.marginLeft,\n top: boundingRect.top - thisRect.top - size.marginTop,\n right: thisRect.right - boundingRect.right - size.marginRight,\n bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom\n };\n return offset;\n};\n\n// -------------------------- resize -------------------------- //\n\n// enable event handlers for listeners\n// i.e. resize -> onresize\nproto.handleEvent = utils.handleEvent;\n\n/**\n * Bind layout to window resizing\n */\nproto.bindResize = function() {\n window.addEventListener( 'resize', this );\n this.isResizeBound = true;\n};\n\n/**\n * Unbind layout to window resizing\n */\nproto.unbindResize = function() {\n window.removeEventListener( 'resize', this );\n this.isResizeBound = false;\n};\n\nproto.onresize = function() {\n this.resize();\n};\n\nutils.debounceMethod( Outlayer, 'onresize', 100 );\n\nproto.resize = function() {\n // don't trigger if size did not change\n // or if resize was unbound. See #9\n if ( !this.isResizeBound || !this.needsResizeLayout() ) {\n return;\n }\n\n this.layout();\n};\n\n/**\n * check if layout is needed post layout\n * @returns Boolean\n */\nproto.needsResizeLayout = function() {\n var size = getSize( this.element );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.size && size;\n return hasSizes && size.innerWidth !== this.size.innerWidth;\n};\n\n// -------------------------- methods -------------------------- //\n\n/**\n * add items to Outlayer instance\n * @param {Array or NodeList or Element} elems\n * @returns {Array} items - Outlayer.Items\n**/\nproto.addItems = function( elems ) {\n var items = this._itemize( elems );\n // add items to collection\n if ( items.length ) {\n this.items = this.items.concat( items );\n }\n return items;\n};\n\n/**\n * Layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\nproto.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // layout and reveal just the new items\n this.layoutItems( items, true );\n this.reveal( items );\n};\n\n/**\n * Layout prepended elements\n * @param {Array or NodeList or Element} elems\n */\nproto.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n this.layoutItems( items, true );\n this.reveal( items );\n // layout previous items\n this.layoutItems( previousItems );\n};\n\n/**\n * reveal a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.reveal = function( items ) {\n this._emitCompleteOnItems( 'reveal', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.reveal();\n });\n};\n\n/**\n * hide a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.hide = function( items ) {\n this._emitCompleteOnItems( 'hide', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.hide();\n });\n};\n\n/**\n * reveal item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.revealItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.reveal( items );\n};\n\n/**\n * hide item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.hideItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.hide( items );\n};\n\n/**\n * get Outlayer.Item, given an Element\n * @param {Element} elem\n * @param {Function} callback\n * @returns {Outlayer.Item} item\n */\nproto.getItem = function( elem ) {\n // loop through items to get the one that matches\n for ( var i=0; i < this.items.length; i++ ) {\n var item = this.items[i];\n if ( item.element == elem ) {\n // return item\n return item;\n }\n }\n};\n\n/**\n * get collection of Outlayer.Items, given Elements\n * @param {Array} elems\n * @returns {Array} items - Outlayer.Items\n */\nproto.getItems = function( elems ) {\n elems = utils.makeArray( elems );\n var items = [];\n elems.forEach( function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n items.push( item );\n }\n }, this );\n\n return items;\n};\n\n/**\n * remove element(s) from instance and DOM\n * @param {Array or NodeList or Element} elems\n */\nproto.remove = function( elems ) {\n var removeItems = this.getItems( elems );\n\n this._emitCompleteOnItems( 'remove', removeItems );\n\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n\n removeItems.forEach( function( item ) {\n item.remove();\n // remove item from collection\n utils.removeFrom( this.items, item );\n }, this );\n};\n\n// ----- destroy ----- //\n\n// remove and disable Outlayer instance\nproto.destroy = function() {\n // clean up dynamic styles\n var style = this.element.style;\n style.height = '';\n style.position = '';\n style.width = '';\n // destroy items\n this.items.forEach( function( item ) {\n item.destroy();\n });\n\n this.unbindResize();\n\n var id = this.element.outlayerGUID;\n delete instances[ id ]; // remove reference to instance by id\n delete this.element.outlayerGUID;\n // remove data for jQuery\n if ( jQuery ) {\n jQuery.removeData( this.element, this.constructor.namespace );\n }\n\n};\n\n// -------------------------- data -------------------------- //\n\n/**\n * get Outlayer instance from element\n * @param {Element} elem\n * @returns {Outlayer}\n */\nOutlayer.data = function( elem ) {\n elem = utils.getQueryElement( elem );\n var id = elem && elem.outlayerGUID;\n return id && instances[ id ];\n};\n\n\n// -------------------------- create Outlayer class -------------------------- //\n\n/**\n * create a layout class\n * @param {String} namespace\n */\nOutlayer.create = function( namespace, options ) {\n // sub-class Outlayer\n var Layout = subclass( Outlayer );\n // apply new options and compatOptions\n Layout.defaults = utils.extend( {}, Outlayer.defaults );\n utils.extend( Layout.defaults, options );\n Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );\n\n Layout.namespace = namespace;\n\n Layout.data = Outlayer.data;\n\n // sub-class Item\n Layout.Item = subclass( Item );\n\n // -------------------------- declarative -------------------------- //\n\n utils.htmlInit( Layout, namespace );\n\n // -------------------------- jQuery bridge -------------------------- //\n\n // make into jQuery plugin\n if ( jQuery && jQuery.bridget ) {\n jQuery.bridget( namespace, Layout );\n }\n\n return Layout;\n};\n\nfunction subclass( Parent ) {\n function SubClass() {\n Parent.apply( this, arguments );\n }\n\n SubClass.prototype = Object.create( Parent.prototype );\n SubClass.prototype.constructor = SubClass;\n\n return SubClass;\n}\n\n// ----- helpers ----- //\n\n// how many milliseconds are in each unit\nvar msUnits = {\n ms: 1,\n s: 1000\n};\n\n// munge time-like parameter into millisecond number\n// '0.4s' -> 40\nfunction getMilliseconds( time ) {\n if ( typeof time == 'number' ) {\n return time;\n }\n var matches = time.match( /(^\\d*\\.?\\d*)(\\w*)/ );\n var num = matches && matches[1];\n var unit = matches && matches[2];\n if ( !num.length ) {\n return 0;\n }\n num = parseFloat( num );\n var mult = msUnits[ unit ] || 1;\n return num * mult;\n}\n\n// ----- fin ----- //\n\n// back in global\nOutlayer.Item = Item;\n\nreturn Outlayer;\n\n}));\n","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[ eventName ] = events[ eventName ] || [];\n // only add once\n if ( listeners.indexOf( listener ) == -1 ) {\n listeners.push( listener );\n }\n\n return this;\n};\n\nproto.once = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // add event\n this.on( eventName, listener );\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n // set flag\n onceListeners[ listener ] = true;\n\n return this;\n};\n\nproto.off = function( eventName, listener ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n var index = listeners.indexOf( listener );\n if ( index != -1 ) {\n listeners.splice( index, 1 );\n }\n\n return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n for ( var i=0; i < listeners.length; i++ ) {\n var listener = listeners[i]\n var isOnce = onceListeners && onceListeners[ listener ];\n if ( isOnce ) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off( eventName, listener );\n // unset once flag\n delete onceListeners[ listener ];\n }\n // trigger listener\n listener.apply( this, args );\n }\n\n return this;\n};\n\nproto.allOff = function() {\n delete this._events;\n delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n","/**\n * Isotope LayoutMode\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'get-size/get-size',\n 'outlayer/outlayer'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('get-size'),\n require('outlayer')\n );\n } else {\n // browser global\n window.Isotope = window.Isotope || {};\n window.Isotope.LayoutMode = factory(\n window.getSize,\n window.Outlayer\n );\n }\n\n}( window, function factory( getSize, Outlayer ) {\n 'use strict';\n\n // layout mode class\n function LayoutMode( isotope ) {\n this.isotope = isotope;\n // link properties\n if ( isotope ) {\n this.options = isotope.options[ this.namespace ];\n this.element = isotope.element;\n this.items = isotope.filteredItems;\n this.size = isotope.size;\n }\n }\n\n var proto = LayoutMode.prototype;\n\n /**\n * some methods should just defer to default Outlayer method\n * and reference the Isotope instance as `this`\n **/\n var facadeMethods = [\n '_resetLayout',\n '_getItemLayoutPosition',\n '_manageStamp',\n '_getContainerSize',\n '_getElementOffset',\n 'needsResizeLayout',\n '_getOption'\n ];\n\n facadeMethods.forEach( function( methodName ) {\n proto[ methodName ] = function() {\n return Outlayer.prototype[ methodName ].apply( this.isotope, arguments );\n };\n });\n\n // ----- ----- //\n\n // for horizontal layout modes, check vertical size\n proto.needsVerticalResizeLayout = function() {\n // don't trigger if size did not change\n var size = getSize( this.isotope.element );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.isotope.size && size;\n return hasSizes && size.innerHeight != this.isotope.size.innerHeight;\n };\n\n // ----- measurements ----- //\n\n proto._getMeasurement = function() {\n this.isotope._getMeasurement.apply( this, arguments );\n };\n\n proto.getColumnWidth = function() {\n this.getSegmentSize( 'column', 'Width' );\n };\n\n proto.getRowHeight = function() {\n this.getSegmentSize( 'row', 'Height' );\n };\n\n /**\n * get columnWidth or rowHeight\n * segment: 'column' or 'row'\n * size 'Width' or 'Height'\n **/\n proto.getSegmentSize = function( segment, size ) {\n var segmentName = segment + size;\n var outerSize = 'outer' + size;\n // columnWidth / outerWidth // rowHeight / outerHeight\n this._getMeasurement( segmentName, outerSize );\n // got rowHeight or columnWidth, we can chill\n if ( this[ segmentName ] ) {\n return;\n }\n // fall back to item of first element\n var firstItemSize = this.getFirstItemSize();\n this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] ||\n // or size of container\n this.isotope.size[ 'inner' + size ];\n };\n\n proto.getFirstItemSize = function() {\n var firstItem = this.isotope.filteredItems[0];\n return firstItem && firstItem.element && getSize( firstItem.element );\n };\n\n // ----- methods that should reference isotope ----- //\n\n proto.layout = function() {\n this.isotope.layout.apply( this.isotope, arguments );\n };\n\n proto.getSize = function() {\n this.isotope.getSize();\n this.size = this.isotope.size;\n };\n\n // -------------------------- create -------------------------- //\n\n LayoutMode.modes = {};\n\n LayoutMode.create = function( namespace, options ) {\n\n function Mode() {\n LayoutMode.apply( this, arguments );\n }\n\n Mode.prototype = Object.create( proto );\n Mode.prototype.constructor = Mode;\n\n // default options\n if ( options ) {\n Mode.options = options;\n }\n\n Mode.prototype.namespace = namespace;\n // register in Isotope\n LayoutMode.modes[ namespace ] = Mode;\n\n return Mode;\n };\n\n return LayoutMode;\n\n}));\n","/**\n * Fizzy UI utils v2.0.7\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n // universal module definition\n /*jshint strict: false */ /*globals define, module, require */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'desandro-matches-selector/matches-selector'\n ], function( matchesSelector ) {\n return factory( window, matchesSelector );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-matches-selector')\n );\n } else {\n // browser global\n window.fizzyUIUtils = factory(\n window,\n window.matchesSelector\n );\n }\n\n}( window, function factory( window, matchesSelector ) {\n\n'use strict';\n\nvar utils = {};\n\n// ----- extend ----- //\n\n// extends objects\nutils.extend = function( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n};\n\n// ----- modulo ----- //\n\nutils.modulo = function( num, div ) {\n return ( ( num % div ) + div ) % div;\n};\n\n// ----- makeArray ----- //\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nutils.makeArray = function( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n // return empty array if undefined or null. #6\n if ( obj === null || obj === undefined ) {\n return [];\n }\n\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n }\n\n // array of single index\n return [ obj ];\n};\n\n// ----- removeFrom ----- //\n\nutils.removeFrom = function( ary, obj ) {\n var index = ary.indexOf( obj );\n if ( index != -1 ) {\n ary.splice( index, 1 );\n }\n};\n\n// ----- getParent ----- //\n\nutils.getParent = function( elem, selector ) {\n while ( elem.parentNode && elem != document.body ) {\n elem = elem.parentNode;\n if ( matchesSelector( elem, selector ) ) {\n return elem;\n }\n }\n};\n\n// ----- getQueryElement ----- //\n\n// use element as selector string\nutils.getQueryElement = function( elem ) {\n if ( typeof elem == 'string' ) {\n return document.querySelector( elem );\n }\n return elem;\n};\n\n// ----- handleEvent ----- //\n\n// enable .ontype to trigger from .addEventListener( elem, 'type' )\nutils.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\n// ----- filterFindElements ----- //\n\nutils.filterFindElements = function( elems, selector ) {\n // make array of elems\n elems = utils.makeArray( elems );\n var ffElems = [];\n\n elems.forEach( function( elem ) {\n // check that elem is an actual element\n if ( !( elem instanceof HTMLElement ) ) {\n return;\n }\n // add elem if no selector\n if ( !selector ) {\n ffElems.push( elem );\n return;\n }\n // filter & find items if we have a selector\n // filter\n if ( matchesSelector( elem, selector ) ) {\n ffElems.push( elem );\n }\n // find children\n var childElems = elem.querySelectorAll( selector );\n // concat childElems to filterFound array\n for ( var i=0; i < childElems.length; i++ ) {\n ffElems.push( childElems[i] );\n }\n });\n\n return ffElems;\n};\n\n// ----- debounceMethod ----- //\n\nutils.debounceMethod = function( _class, methodName, threshold ) {\n threshold = threshold || 100;\n // original method\n var method = _class.prototype[ methodName ];\n var timeoutName = methodName + 'Timeout';\n\n _class.prototype[ methodName ] = function() {\n var timeout = this[ timeoutName ];\n clearTimeout( timeout );\n\n var args = arguments;\n var _this = this;\n this[ timeoutName ] = setTimeout( function() {\n method.apply( _this, args );\n delete _this[ timeoutName ];\n }, threshold );\n };\n};\n\n// ----- docReady ----- //\n\nutils.docReady = function( callback ) {\n var readyState = document.readyState;\n if ( readyState == 'complete' || readyState == 'interactive' ) {\n // do async to allow for other scripts to run. metafizzy/flickity#441\n setTimeout( callback );\n } else {\n document.addEventListener( 'DOMContentLoaded', callback );\n }\n};\n\n// ----- htmlInit ----- //\n\n// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/\nutils.toDashed = function( str ) {\n return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {\n return $1 + '-' + $2;\n }).toLowerCase();\n};\n\nvar console = window.console;\n/**\n * allow user to initialize classes via [data-namespace] or .js-namespace class\n * htmlInit( Widget, 'widgetName' )\n * options are parsed from data-namespace-options\n */\nutils.htmlInit = function( WidgetClass, namespace ) {\n utils.docReady( function() {\n var dashedNamespace = utils.toDashed( namespace );\n var dataAttr = 'data-' + dashedNamespace;\n var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );\n var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );\n var elems = utils.makeArray( dataAttrElems )\n .concat( utils.makeArray( jsDashElems ) );\n var dataOptionsAttr = dataAttr + '-options';\n var jQuery = window.jQuery;\n\n elems.forEach( function( elem ) {\n var attr = elem.getAttribute( dataAttr ) ||\n elem.getAttribute( dataOptionsAttr );\n var options;\n try {\n options = attr && JSON.parse( attr );\n } catch ( error ) {\n // log error, do not initialize\n if ( console ) {\n console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +\n ': ' + error );\n }\n return;\n }\n // initialize\n var instance = new WidgetClass( elem, options );\n // make available via $().data('namespace')\n if ( jQuery ) {\n jQuery.data( elem, namespace, instance );\n }\n });\n\n });\n};\n\n// ----- ----- //\n\nreturn utils;\n\n}));\n","/**\n * matchesSelector v2.0.2\n * matchesSelector( element, '.selector' )\n * MIT license\n */\n\n/*jshint browser: true, strict: true, undef: true, unused: true */\n\n( function( window, factory ) {\n /*global define: false, module: false */\n 'use strict';\n // universal module definition\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.matchesSelector = factory();\n }\n\n}( window, function factory() {\n 'use strict';\n\n var matchesMethod = ( function() {\n var ElemProto = window.Element.prototype;\n // check for the standard method name first\n if ( ElemProto.matches ) {\n return 'matches';\n }\n // check un-prefixed\n if ( ElemProto.matchesSelector ) {\n return 'matchesSelector';\n }\n // check vendor prefixes\n var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];\n\n for ( var i=0; i < prefixes.length; i++ ) {\n var prefix = prefixes[i];\n var method = prefix + 'MatchesSelector';\n if ( ElemProto[ method ] ) {\n return method;\n }\n }\n })();\n\n return function matchesSelector( elem, selector ) {\n return elem[ matchesMethod ]( selector );\n };\n\n}));\n","/**\n * Outlayer Item\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size'\n ],\n factory\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n require('ev-emitter'),\n require('get-size')\n );\n } else {\n // browser global\n window.Outlayer = {};\n window.Outlayer.Item = factory(\n window.EvEmitter,\n window.getSize\n );\n }\n\n}( window, function factory( EvEmitter, getSize ) {\n'use strict';\n\n// ----- helpers ----- //\n\nfunction isEmptyObj( obj ) {\n for ( var prop in obj ) {\n return false;\n }\n prop = null;\n return true;\n}\n\n// -------------------------- CSS3 support -------------------------- //\n\n\nvar docElemStyle = document.documentElement.style;\n\nvar transitionProperty = typeof docElemStyle.transition == 'string' ?\n 'transition' : 'WebkitTransition';\nvar transformProperty = typeof docElemStyle.transform == 'string' ?\n 'transform' : 'WebkitTransform';\n\nvar transitionEndEvent = {\n WebkitTransition: 'webkitTransitionEnd',\n transition: 'transitionend'\n}[ transitionProperty ];\n\n// cache all vendor properties that could have vendor prefix\nvar vendorProperties = {\n transform: transformProperty,\n transition: transitionProperty,\n transitionDuration: transitionProperty + 'Duration',\n transitionProperty: transitionProperty + 'Property',\n transitionDelay: transitionProperty + 'Delay'\n};\n\n// -------------------------- Item -------------------------- //\n\nfunction Item( element, layout ) {\n if ( !element ) {\n return;\n }\n\n this.element = element;\n // parent layout class, i.e. Masonry, Isotope, or Packery\n this.layout = layout;\n this.position = {\n x: 0,\n y: 0\n };\n\n this._create();\n}\n\n// inherit EvEmitter\nvar proto = Item.prototype = Object.create( EvEmitter.prototype );\nproto.constructor = Item;\n\nproto._create = function() {\n // transition objects\n this._transn = {\n ingProperties: {},\n clean: {},\n onEnd: {}\n };\n\n this.css({\n position: 'absolute'\n });\n};\n\n// trigger specified handler for event type\nproto.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * apply CSS styles to element\n * @param {Object} style\n */\nproto.css = function( style ) {\n var elemStyle = this.element.style;\n\n for ( var prop in style ) {\n // use vendor property if available\n var supportedProp = vendorProperties[ prop ] || prop;\n elemStyle[ supportedProp ] = style[ prop ];\n }\n};\n\n // measure position, and sets it\nproto.getPosition = function() {\n var style = getComputedStyle( this.element );\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n var xValue = style[ isOriginLeft ? 'left' : 'right' ];\n var yValue = style[ isOriginTop ? 'top' : 'bottom' ];\n var x = parseFloat( xValue );\n var y = parseFloat( yValue );\n // convert percent to pixels\n var layoutSize = this.layout.size;\n if ( xValue.indexOf('%') != -1 ) {\n x = ( x / 100 ) * layoutSize.width;\n }\n if ( yValue.indexOf('%') != -1 ) {\n y = ( y / 100 ) * layoutSize.height;\n }\n // clean up 'auto' or other non-integer values\n x = isNaN( x ) ? 0 : x;\n y = isNaN( y ) ? 0 : y;\n // remove padding from measurement\n x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;\n y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;\n\n this.position.x = x;\n this.position.y = y;\n};\n\n// set settled position, apply padding\nproto.layoutPosition = function() {\n var layoutSize = this.layout.size;\n var style = {};\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n\n // x\n var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';\n var xProperty = isOriginLeft ? 'left' : 'right';\n var xResetProperty = isOriginLeft ? 'right' : 'left';\n\n var x = this.position.x + layoutSize[ xPadding ];\n // set in percentage or pixels\n style[ xProperty ] = this.getXValue( x );\n // reset other property\n style[ xResetProperty ] = '';\n\n // y\n var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';\n var yProperty = isOriginTop ? 'top' : 'bottom';\n var yResetProperty = isOriginTop ? 'bottom' : 'top';\n\n var y = this.position.y + layoutSize[ yPadding ];\n // set in percentage or pixels\n style[ yProperty ] = this.getYValue( y );\n // reset other property\n style[ yResetProperty ] = '';\n\n this.css( style );\n this.emitEvent( 'layout', [ this ] );\n};\n\nproto.getXValue = function( x ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && !isHorizontal ?\n ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';\n};\n\nproto.getYValue = function( y ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && isHorizontal ?\n ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';\n};\n\nproto._transitionTo = function( x, y ) {\n this.getPosition();\n // get current x & y from top/left\n var curX = this.position.x;\n var curY = this.position.y;\n\n var didNotMove = x == this.position.x && y == this.position.y;\n\n // save end position\n this.setPosition( x, y );\n\n // if did not move and not transitioning, just go to layout\n if ( didNotMove && !this.isTransitioning ) {\n this.layoutPosition();\n return;\n }\n\n var transX = x - curX;\n var transY = y - curY;\n var transitionStyle = {};\n transitionStyle.transform = this.getTranslate( transX, transY );\n\n this.transition({\n to: transitionStyle,\n onTransitionEnd: {\n transform: this.layoutPosition\n },\n isCleaning: true\n });\n};\n\nproto.getTranslate = function( x, y ) {\n // flip cooridinates if origin on right or bottom\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n x = isOriginLeft ? x : -x;\n y = isOriginTop ? y : -y;\n return 'translate3d(' + x + 'px, ' + y + 'px, 0)';\n};\n\n// non transition + transform support\nproto.goTo = function( x, y ) {\n this.setPosition( x, y );\n this.layoutPosition();\n};\n\nproto.moveTo = proto._transitionTo;\n\nproto.setPosition = function( x, y ) {\n this.position.x = parseFloat( x );\n this.position.y = parseFloat( y );\n};\n\n// ----- transition ----- //\n\n/**\n * @param {Object} style - CSS\n * @param {Function} onTransitionEnd\n */\n\n// non transition, just trigger callback\nproto._nonTransition = function( args ) {\n this.css( args.to );\n if ( args.isCleaning ) {\n this._removeStyles( args.to );\n }\n for ( var prop in args.onTransitionEnd ) {\n args.onTransitionEnd[ prop ].call( this );\n }\n};\n\n/**\n * proper transition\n * @param {Object} args - arguments\n * @param {Object} to - style to transition to\n * @param {Object} from - style to start transition from\n * @param {Boolean} isCleaning - removes transition styles after transition\n * @param {Function} onTransitionEnd - callback\n */\nproto.transition = function( args ) {\n // redirect to nonTransition if no transition duration\n if ( !parseFloat( this.layout.options.transitionDuration ) ) {\n this._nonTransition( args );\n return;\n }\n\n var _transition = this._transn;\n // keep track of onTransitionEnd callback by css property\n for ( var prop in args.onTransitionEnd ) {\n _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];\n }\n // keep track of properties that are transitioning\n for ( prop in args.to ) {\n _transition.ingProperties[ prop ] = true;\n // keep track of properties to clean up when transition is done\n if ( args.isCleaning ) {\n _transition.clean[ prop ] = true;\n }\n }\n\n // set from styles\n if ( args.from ) {\n this.css( args.from );\n // force redraw. http://blog.alexmaccaw.com/css-transitions\n var h = this.element.offsetHeight;\n // hack for JSHint to hush about unused var\n h = null;\n }\n // enable transition\n this.enableTransition( args.to );\n // set styles that are transitioning\n this.css( args.to );\n\n this.isTransitioning = true;\n\n};\n\n// dash before all cap letters, including first for\n// WebkitTransform => -webkit-transform\nfunction toDashedAll( str ) {\n return str.replace( /([A-Z])/g, function( $1 ) {\n return '-' + $1.toLowerCase();\n });\n}\n\nvar transitionProps = 'opacity,' + toDashedAll( transformProperty );\n\nproto.enableTransition = function(/* style */) {\n // HACK changing transitionProperty during a transition\n // will cause transition to jump\n if ( this.isTransitioning ) {\n return;\n }\n\n // make `transition: foo, bar, baz` from style object\n // HACK un-comment this when enableTransition can work\n // while a transition is happening\n // var transitionValues = [];\n // for ( var prop in style ) {\n // // dash-ify camelCased properties like WebkitTransition\n // prop = vendorProperties[ prop ] || prop;\n // transitionValues.push( toDashedAll( prop ) );\n // }\n // munge number to millisecond, to match stagger\n var duration = this.layout.options.transitionDuration;\n duration = typeof duration == 'number' ? duration + 'ms' : duration;\n // enable transition styles\n this.css({\n transitionProperty: transitionProps,\n transitionDuration: duration,\n transitionDelay: this.staggerDelay || 0\n });\n // listen for transition end event\n this.element.addEventListener( transitionEndEvent, this, false );\n};\n\n// ----- events ----- //\n\nproto.onwebkitTransitionEnd = function( event ) {\n this.ontransitionend( event );\n};\n\nproto.onotransitionend = function( event ) {\n this.ontransitionend( event );\n};\n\n// properties that I munge to make my life easier\nvar dashedVendorProperties = {\n '-webkit-transform': 'transform'\n};\n\nproto.ontransitionend = function( event ) {\n // disregard bubbled events from children\n if ( event.target !== this.element ) {\n return;\n }\n var _transition = this._transn;\n // get property name of transitioned property, convert to prefix-free\n var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;\n\n // remove property that has completed transitioning\n delete _transition.ingProperties[ propertyName ];\n // check if any properties are still transitioning\n if ( isEmptyObj( _transition.ingProperties ) ) {\n // all properties have completed transitioning\n this.disableTransition();\n }\n // clean style\n if ( propertyName in _transition.clean ) {\n // clean up style\n this.element.style[ event.propertyName ] = '';\n delete _transition.clean[ propertyName ];\n }\n // trigger onTransitionEnd callback\n if ( propertyName in _transition.onEnd ) {\n var onTransitionEnd = _transition.onEnd[ propertyName ];\n onTransitionEnd.call( this );\n delete _transition.onEnd[ propertyName ];\n }\n\n this.emitEvent( 'transitionEnd', [ this ] );\n};\n\nproto.disableTransition = function() {\n this.removeTransitionStyles();\n this.element.removeEventListener( transitionEndEvent, this, false );\n this.isTransitioning = false;\n};\n\n/**\n * removes style property from element\n * @param {Object} style\n**/\nproto._removeStyles = function( style ) {\n // clean up transition styles\n var cleanStyle = {};\n for ( var prop in style ) {\n cleanStyle[ prop ] = '';\n }\n this.css( cleanStyle );\n};\n\nvar cleanTransitionStyle = {\n transitionProperty: '',\n transitionDuration: '',\n transitionDelay: ''\n};\n\nproto.removeTransitionStyles = function() {\n // remove transition\n this.css( cleanTransitionStyle );\n};\n\n// ----- stagger ----- //\n\nproto.stagger = function( delay ) {\n delay = isNaN( delay ) ? 0 : delay;\n this.staggerDelay = delay + 'ms';\n};\n\n// ----- show/hide/remove ----- //\n\n// remove element from DOM\nproto.removeElem = function() {\n this.element.parentNode.removeChild( this.element );\n // remove display: none\n this.css({ display: '' });\n this.emitEvent( 'remove', [ this ] );\n};\n\nproto.remove = function() {\n // just remove element if no transition support or no transition\n if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {\n this.removeElem();\n return;\n }\n\n // start transition\n this.once( 'transitionEnd', function() {\n this.removeElem();\n });\n this.hide();\n};\n\nproto.reveal = function() {\n delete this.isHidden;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;\n\n this.transition({\n from: options.hiddenStyle,\n to: options.visibleStyle,\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onRevealTransitionEnd = function() {\n // check if still visible\n // during transition, item may have been hidden\n if ( !this.isHidden ) {\n this.emitEvent('reveal');\n }\n};\n\n/**\n * get style property use for hide/reveal transition end\n * @param {String} styleProperty - hiddenStyle/visibleStyle\n * @returns {String}\n */\nproto.getHideRevealTransitionEndProperty = function( styleProperty ) {\n var optionStyle = this.layout.options[ styleProperty ];\n // use opacity\n if ( optionStyle.opacity ) {\n return 'opacity';\n }\n // get first property\n for ( var prop in optionStyle ) {\n return prop;\n }\n};\n\nproto.hide = function() {\n // set flag\n this.isHidden = true;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;\n\n this.transition({\n from: options.visibleStyle,\n to: options.hiddenStyle,\n // keep hidden stuff hidden\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onHideTransitionEnd = function() {\n // check if still hidden\n // during transition, item may have been un-hidden\n if ( this.isHidden ) {\n this.css({ display: 'none' });\n this.emitEvent('hide');\n }\n};\n\nproto.destroy = function() {\n this.css({\n position: '',\n left: '',\n right: '',\n top: '',\n bottom: '',\n transition: '',\n transform: ''\n });\n};\n\nreturn Item;\n\n}));\n","/**\n * Isotope Item\n**/\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'outlayer/outlayer'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('outlayer')\n );\n } else {\n // browser global\n window.Isotope = window.Isotope || {};\n window.Isotope.Item = factory(\n window.Outlayer\n );\n }\n\n}( window, function factory( Outlayer ) {\n'use strict';\n\n// -------------------------- Item -------------------------- //\n\n// sub-class Outlayer Item\nfunction Item() {\n Outlayer.Item.apply( this, arguments );\n}\n\nvar proto = Item.prototype = Object.create( Outlayer.Item.prototype );\n\nvar _create = proto._create;\nproto._create = function() {\n // assign id, used for original-order sorting\n this.id = this.layout.itemGUID++;\n _create.call( this );\n this.sortData = {};\n};\n\nproto.updateSortData = function() {\n if ( this.isIgnored ) {\n return;\n }\n // default sorters\n this.sortData.id = this.id;\n // for backward compatibility\n this.sortData['original-order'] = this.id;\n this.sortData.random = Math.random();\n // go thru getSortData obj and apply the sorters\n var getSortData = this.layout.options.getSortData;\n var sorters = this.layout._sorters;\n for ( var key in getSortData ) {\n var sorter = sorters[ key ];\n this.sortData[ key ] = sorter( this.element, this );\n }\n};\n\nvar _destroy = proto.destroy;\nproto.destroy = function() {\n // call super\n _destroy.apply( this, arguments );\n // reset display, #741\n this.css({\n display: ''\n });\n};\n\nreturn Item;\n\n}));\n","/*!\n * Masonry layout mode\n * sub-classes Masonry\n * https://masonry.desandro.com\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n '../layout-mode',\n 'masonry-layout/masonry'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('../layout-mode'),\n require('masonry-layout')\n );\n } else {\n // browser global\n factory(\n window.Isotope.LayoutMode,\n window.Masonry\n );\n }\n\n}( window, function factory( LayoutMode, Masonry ) {\n'use strict';\n\n// -------------------------- masonryDefinition -------------------------- //\n\n // create an Outlayer layout class\n var MasonryMode = LayoutMode.create('masonry');\n\n var proto = MasonryMode.prototype;\n\n var keepModeMethods = {\n _getElementOffset: true,\n layout: true,\n _getMeasurement: true\n };\n\n // inherit Masonry prototype\n for ( var method in Masonry.prototype ) {\n // do not inherit mode methods\n if ( !keepModeMethods[ method ] ) {\n proto[ method ] = Masonry.prototype[ method ];\n }\n }\n\n var measureColumns = proto.measureColumns;\n proto.measureColumns = function() {\n // set items, used if measuring first item\n this.items = this.isotope.filteredItems;\n measureColumns.call( this );\n };\n\n // point to mode options for fitWidth\n var _getOption = proto._getOption;\n proto._getOption = function( option ) {\n if ( option == 'fitWidth' ) {\n return this.options.isFitWidth !== undefined ?\n this.options.isFitWidth : this.options.fitWidth;\n }\n return _getOption.apply( this.isotope, arguments );\n };\n\n return MasonryMode;\n\n}));\n","/*!\n * Masonry v4.2.2\n * Cascading grid layout library\n * https://masonry.desandro.com\n * MIT License\n * by David DeSandro\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'outlayer/outlayer',\n 'get-size/get-size'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('outlayer'),\n require('get-size')\n );\n } else {\n // browser global\n window.Masonry = factory(\n window.Outlayer,\n window.getSize\n );\n }\n\n}( window, function factory( Outlayer, getSize ) {\n\n'use strict';\n\n// -------------------------- masonryDefinition -------------------------- //\n\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n // isFitWidth -> fitWidth\n Masonry.compatOptions.fitWidth = 'isFitWidth';\n\n var proto = Masonry.prototype;\n\n proto._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n this.colYs = [];\n for ( var i=0; i < this.cols; i++ ) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n this.horizontalColIndex = 0;\n };\n\n proto.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n var columnWidth = this.columnWidth += this.gutter;\n\n // calculate columns\n var containerWidth = this.containerWidth + this.gutter;\n var cols = containerWidth / columnWidth;\n // fix rounding errors, typically with gutters\n var excess = columnWidth - containerWidth % columnWidth;\n // if overshoot is less than a pixel, round up, otherwise floor it\n var mathMethod = excess && excess < 1 ? 'round' : 'floor';\n cols = Math[ mathMethod ]( cols );\n this.cols = Math.max( cols, 1 );\n };\n\n proto.getContainerWidth = function() {\n // container is parent if fit width\n var isFitWidth = this._getOption('fitWidth');\n var container = isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n proto._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n // use horizontal or top column position\n var colPosMethod = this.options.horizontalOrder ?\n '_getHorizontalColPosition' : '_getTopColPosition';\n var colPosition = this[ colPosMethod ]( colSpan, item );\n // position the brick\n var position = {\n x: this.columnWidth * colPosition.col,\n y: colPosition.y\n };\n // apply setHeight to necessary columns\n var setHeight = colPosition.y + item.size.outerHeight;\n var setMax = colSpan + colPosition.col;\n for ( var i = colPosition.col; i < setMax; i++ ) {\n this.colYs[i] = setHeight;\n }\n\n return position;\n };\n\n proto._getTopColPosition = function( colSpan ) {\n var colGroup = this._getTopColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n\n return {\n col: colGroup.indexOf( minimumY ),\n y: minimumY,\n };\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n proto._getTopColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n colGroup[i] = this._getColGroupY( i, colSpan );\n }\n return colGroup;\n };\n\n proto._getColGroupY = function( col, colSpan ) {\n if ( colSpan < 2 ) {\n return this.colYs[ col ];\n }\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( col, col + colSpan );\n // and get the max value of the array\n return Math.max.apply( Math, groupColYs );\n };\n\n // get column position based on horizontal index. #873\n proto._getHorizontalColPosition = function( colSpan, item ) {\n var col = this.horizontalColIndex % this.cols;\n var isOver = colSpan > 1 && col + colSpan > this.cols;\n // shift to next row if item can't fit on current row\n col = isOver ? 0 : col;\n // don't let zero-size items take up space\n var hasSize = item.size.outerWidth && item.size.outerHeight;\n this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;\n\n return {\n col: col,\n y: this._getColGroupY( col, colSpan ),\n };\n };\n\n proto._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var isOriginLeft = this._getOption('originLeft');\n var firstX = isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n\n var isOriginTop = this._getOption('originTop');\n var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n proto._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this._getOption('fitWidth') ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n proto._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n proto.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth != this.containerWidth;\n };\n\n return Masonry;\n\n}));\n","/**\n * fitRows layout mode\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n '../layout-mode'\n ],\n factory );\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n require('../layout-mode')\n );\n } else {\n // browser global\n factory(\n window.Isotope.LayoutMode\n );\n }\n\n}( window, function factory( LayoutMode ) {\n'use strict';\n\nvar FitRows = LayoutMode.create('fitRows');\n\nvar proto = FitRows.prototype;\n\nproto._resetLayout = function() {\n this.x = 0;\n this.y = 0;\n this.maxY = 0;\n this._getMeasurement( 'gutter', 'outerWidth' );\n};\n\nproto._getItemLayoutPosition = function( item ) {\n item.getSize();\n\n var itemWidth = item.size.outerWidth + this.gutter;\n // if this element cannot fit in the current row\n var containerWidth = this.isotope.size.innerWidth + this.gutter;\n if ( this.x !== 0 && itemWidth + this.x > containerWidth ) {\n this.x = 0;\n this.y = this.maxY;\n }\n\n var position = {\n x: this.x,\n y: this.y\n };\n\n this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );\n this.x += itemWidth;\n\n return position;\n};\n\nproto._getContainerSize = function() {\n return { height: this.maxY };\n};\n\nreturn FitRows;\n\n}));\n","/**\n * vertical layout mode\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n '../layout-mode'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('../layout-mode')\n );\n } else {\n // browser global\n factory(\n window.Isotope.LayoutMode\n );\n }\n\n}( window, function factory( LayoutMode ) {\n'use strict';\n\nvar Vertical = LayoutMode.create( 'vertical', {\n horizontalAlignment: 0\n});\n\nvar proto = Vertical.prototype;\n\nproto._resetLayout = function() {\n this.y = 0;\n};\n\nproto._getItemLayoutPosition = function( item ) {\n item.getSize();\n var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) *\n this.options.horizontalAlignment;\n var y = this.y;\n this.y += item.size.outerHeight;\n return { x: x, y: y };\n};\n\nproto._getContainerSize = function() {\n return { height: this.y };\n};\n\nreturn Vertical;\n\n}));\n","/*!\n * Isotope v3.0.6\n *\n * Licensed GPLv3 for open source use\n * or Isotope Commercial License for commercial use\n *\n * https://isotope.metafizzy.co\n * Copyright 2010-2018 Metafizzy\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'outlayer/outlayer',\n 'get-size/get-size',\n 'desandro-matches-selector/matches-selector',\n 'fizzy-ui-utils/utils',\n './item',\n './layout-mode',\n // include default layout modes\n './layout-modes/masonry',\n './layout-modes/fit-rows',\n './layout-modes/vertical'\n ],\n function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {\n return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('outlayer'),\n require('get-size'),\n require('desandro-matches-selector'),\n require('fizzy-ui-utils'),\n require('./item'),\n require('./layout-mode'),\n // include default layout modes\n require('./layout-modes/masonry'),\n require('./layout-modes/fit-rows'),\n require('./layout-modes/vertical')\n );\n } else {\n // browser global\n window.Isotope = factory(\n window,\n window.Outlayer,\n window.getSize,\n window.matchesSelector,\n window.fizzyUIUtils,\n window.Isotope.Item,\n window.Isotope.LayoutMode\n );\n }\n\n}( window, function factory( window, Outlayer, getSize, matchesSelector, utils,\n Item, LayoutMode ) {\n\n'use strict';\n\n// -------------------------- vars -------------------------- //\n\nvar jQuery = window.jQuery;\n\n// -------------------------- helpers -------------------------- //\n\nvar trim = String.prototype.trim ?\n function( str ) {\n return str.trim();\n } :\n function( str ) {\n return str.replace( /^\\s+|\\s+$/g, '' );\n };\n\n// -------------------------- isotopeDefinition -------------------------- //\n\n // create an Outlayer layout class\n var Isotope = Outlayer.create( 'isotope', {\n layoutMode: 'masonry',\n isJQueryFiltering: true,\n sortAscending: true\n });\n\n Isotope.Item = Item;\n Isotope.LayoutMode = LayoutMode;\n\n var proto = Isotope.prototype;\n\n proto._create = function() {\n this.itemGUID = 0;\n // functions that sort items\n this._sorters = {};\n this._getSorters();\n // call super\n Outlayer.prototype._create.call( this );\n\n // create layout modes\n this.modes = {};\n // start filteredItems with all items\n this.filteredItems = this.items;\n // keep of track of sortBys\n this.sortHistory = [ 'original-order' ];\n // create from registered layout modes\n for ( var name in LayoutMode.modes ) {\n this._initLayoutMode( name );\n }\n };\n\n proto.reloadItems = function() {\n // reset item ID counter\n this.itemGUID = 0;\n // call super\n Outlayer.prototype.reloadItems.call( this );\n };\n\n proto._itemize = function() {\n var items = Outlayer.prototype._itemize.apply( this, arguments );\n // assign ID for original-order\n for ( var i=0; i < items.length; i++ ) {\n var item = items[i];\n item.id = this.itemGUID++;\n }\n this._updateItemsSortData( items );\n return items;\n };\n\n\n // -------------------------- layout -------------------------- //\n\n proto._initLayoutMode = function( name ) {\n var Mode = LayoutMode.modes[ name ];\n // set mode options\n // HACK extend initial options, back-fill in default options\n var initialOpts = this.options[ name ] || {};\n this.options[ name ] = Mode.options ?\n utils.extend( Mode.options, initialOpts ) : initialOpts;\n // init layout mode instance\n this.modes[ name ] = new Mode( this );\n };\n\n\n proto.layout = function() {\n // if first time doing layout, do all magic\n if ( !this._isLayoutInited && this._getOption('initLayout') ) {\n this.arrange();\n return;\n }\n this._layout();\n };\n\n // private method to be used in layout() & magic()\n proto._layout = function() {\n // don't animate first layout\n var isInstant = this._getIsInstant();\n // layout flow\n this._resetLayout();\n this._manageStamps();\n this.layoutItems( this.filteredItems, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n };\n\n // filter + sort + layout\n proto.arrange = function( opts ) {\n // set any options pass\n this.option( opts );\n this._getIsInstant();\n // filter, sort, and layout\n\n // filter\n var filtered = this._filter( this.items );\n this.filteredItems = filtered.matches;\n\n this._bindArrangeComplete();\n\n if ( this._isInstant ) {\n this._noTransition( this._hideReveal, [ filtered ] );\n } else {\n this._hideReveal( filtered );\n }\n\n this._sort();\n this._layout();\n };\n // alias to _init for main plugin method\n proto._init = proto.arrange;\n\n proto._hideReveal = function( filtered ) {\n this.reveal( filtered.needReveal );\n this.hide( filtered.needHide );\n };\n\n // HACK\n // Don't animate/transition first layout\n // Or don't animate/transition other layouts\n proto._getIsInstant = function() {\n var isLayoutInstant = this._getOption('layoutInstant');\n var isInstant = isLayoutInstant !== undefined ? isLayoutInstant :\n !this._isLayoutInited;\n this._isInstant = isInstant;\n return isInstant;\n };\n\n // listen for layoutComplete, hideComplete and revealComplete\n // to trigger arrangeComplete\n proto._bindArrangeComplete = function() {\n // listen for 3 events to trigger arrangeComplete\n var isLayoutComplete, isHideComplete, isRevealComplete;\n var _this = this;\n function arrangeParallelCallback() {\n if ( isLayoutComplete && isHideComplete && isRevealComplete ) {\n _this.dispatchEvent( 'arrangeComplete', null, [ _this.filteredItems ] );\n }\n }\n this.once( 'layoutComplete', function() {\n isLayoutComplete = true;\n arrangeParallelCallback();\n });\n this.once( 'hideComplete', function() {\n isHideComplete = true;\n arrangeParallelCallback();\n });\n this.once( 'revealComplete', function() {\n isRevealComplete = true;\n arrangeParallelCallback();\n });\n };\n\n // -------------------------- filter -------------------------- //\n\n proto._filter = function( items ) {\n var filter = this.options.filter;\n filter = filter || '*';\n var matches = [];\n var hiddenMatched = [];\n var visibleUnmatched = [];\n\n var test = this._getFilterTest( filter );\n\n // test each item\n for ( var i=0; i < items.length; i++ ) {\n var item = items[i];\n if ( item.isIgnored ) {\n continue;\n }\n // add item to either matched or unmatched group\n var isMatched = test( item );\n // item.isFilterMatched = isMatched;\n // add to matches if its a match\n if ( isMatched ) {\n matches.push( item );\n }\n // add to additional group if item needs to be hidden or revealed\n if ( isMatched && item.isHidden ) {\n hiddenMatched.push( item );\n } else if ( !isMatched && !item.isHidden ) {\n visibleUnmatched.push( item );\n }\n }\n\n // return collections of items to be manipulated\n return {\n matches: matches,\n needReveal: hiddenMatched,\n needHide: visibleUnmatched\n };\n };\n\n // get a jQuery, function, or a matchesSelector test given the filter\n proto._getFilterTest = function( filter ) {\n if ( jQuery && this.options.isJQueryFiltering ) {\n // use jQuery\n return function( item ) {\n return jQuery( item.element ).is( filter );\n };\n }\n if ( typeof filter == 'function' ) {\n // use filter as function\n return function( item ) {\n return filter( item.element );\n };\n }\n // default, use filter as selector string\n return function( item ) {\n return matchesSelector( item.element, filter );\n };\n };\n\n // -------------------------- sorting -------------------------- //\n\n /**\n * @params {Array} elems\n * @public\n */\n proto.updateSortData = function( elems ) {\n // get items\n var items;\n if ( elems ) {\n elems = utils.makeArray( elems );\n items = this.getItems( elems );\n } else {\n // update all items if no elems provided\n items = this.items;\n }\n\n this._getSorters();\n this._updateItemsSortData( items );\n };\n\n proto._getSorters = function() {\n var getSortData = this.options.getSortData;\n for ( var key in getSortData ) {\n var sorter = getSortData[ key ];\n this._sorters[ key ] = mungeSorter( sorter );\n }\n };\n\n /**\n * @params {Array} items - of Isotope.Items\n * @private\n */\n proto._updateItemsSortData = function( items ) {\n // do not update if no items\n var len = items && items.length;\n\n for ( var i=0; len && i < len; i++ ) {\n var item = items[i];\n item.updateSortData();\n }\n };\n\n // ----- munge sorter ----- //\n\n // encapsulate this, as we just need mungeSorter\n // other functions in here are just for munging\n var mungeSorter = ( function() {\n // add a magic layer to sorters for convienent shorthands\n // `.foo-bar` will use the text of .foo-bar querySelector\n // `[foo-bar]` will use attribute\n // you can also add parser\n // `.foo-bar parseInt` will parse that as a number\n function mungeSorter( sorter ) {\n // if not a string, return function or whatever it is\n if ( typeof sorter != 'string' ) {\n return sorter;\n }\n // parse the sorter string\n var args = trim( sorter ).split(' ');\n var query = args[0];\n // check if query looks like [an-attribute]\n var attrMatch = query.match( /^\\[(.+)\\]$/ );\n var attr = attrMatch && attrMatch[1];\n var getValue = getValueGetter( attr, query );\n // use second argument as a parser\n var parser = Isotope.sortDataParsers[ args[1] ];\n // parse the value, if there was a parser\n sorter = parser ? function( elem ) {\n return elem && parser( getValue( elem ) );\n } :\n // otherwise just return value\n function( elem ) {\n return elem && getValue( elem );\n };\n\n return sorter;\n }\n\n // get an attribute getter, or get text of the querySelector\n function getValueGetter( attr, query ) {\n // if query looks like [foo-bar], get attribute\n if ( attr ) {\n return function getAttribute( elem ) {\n return elem.getAttribute( attr );\n };\n }\n\n // otherwise, assume its a querySelector, and get its text\n return function getChildText( elem ) {\n var child = elem.querySelector( query );\n return child && child.textContent;\n };\n }\n\n return mungeSorter;\n })();\n\n // parsers used in getSortData shortcut strings\n Isotope.sortDataParsers = {\n 'parseInt': function( val ) {\n return parseInt( val, 10 );\n },\n 'parseFloat': function( val ) {\n return parseFloat( val );\n }\n };\n\n // ----- sort method ----- //\n\n // sort filteredItem order\n proto._sort = function() {\n if ( !this.options.sortBy ) {\n return;\n }\n // keep track of sortBy History\n var sortBys = utils.makeArray( this.options.sortBy );\n if ( !this._getIsSameSortBy( sortBys ) ) {\n // concat all sortBy and sortHistory, add to front, oldest goes in last\n this.sortHistory = sortBys.concat( this.sortHistory );\n }\n // sort magic\n var itemSorter = getItemSorter( this.sortHistory, this.options.sortAscending );\n this.filteredItems.sort( itemSorter );\n };\n\n // check if sortBys is same as start of sortHistory\n proto._getIsSameSortBy = function( sortBys ) {\n for ( var i=0; i < sortBys.length; i++ ) {\n if ( sortBys[i] != this.sortHistory[i] ) {\n return false;\n }\n }\n return true;\n };\n\n // returns a function used for sorting\n function getItemSorter( sortBys, sortAsc ) {\n return function sorter( itemA, itemB ) {\n // cycle through all sortKeys\n for ( var i = 0; i < sortBys.length; i++ ) {\n var sortBy = sortBys[i];\n var a = itemA.sortData[ sortBy ];\n var b = itemB.sortData[ sortBy ];\n if ( a > b || a < b ) {\n // if sortAsc is an object, use the value given the sortBy key\n var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;\n var direction = isAscending ? 1 : -1;\n return ( a > b ? 1 : -1 ) * direction;\n }\n }\n return 0;\n };\n }\n\n // -------------------------- methods -------------------------- //\n\n // get layout mode\n proto._mode = function() {\n var layoutMode = this.options.layoutMode;\n var mode = this.modes[ layoutMode ];\n if ( !mode ) {\n // TODO console.error\n throw new Error( 'No layout mode: ' + layoutMode );\n }\n // HACK sync mode's options\n // any options set after init for layout mode need to be synced\n mode.options = this.options[ layoutMode ];\n return mode;\n };\n\n proto._resetLayout = function() {\n // trigger original reset layout\n Outlayer.prototype._resetLayout.call( this );\n this._mode()._resetLayout();\n };\n\n proto._getItemLayoutPosition = function( item ) {\n return this._mode()._getItemLayoutPosition( item );\n };\n\n proto._manageStamp = function( stamp ) {\n this._mode()._manageStamp( stamp );\n };\n\n proto._getContainerSize = function() {\n return this._mode()._getContainerSize();\n };\n\n proto.needsResizeLayout = function() {\n return this._mode().needsResizeLayout();\n };\n\n // -------------------------- adding & removing -------------------------- //\n\n // HEADS UP overwrites default Outlayer appended\n proto.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // filter, layout, reveal new items\n var filteredItems = this._filterRevealAdded( items );\n // add to filteredItems\n this.filteredItems = this.filteredItems.concat( filteredItems );\n };\n\n // HEADS UP overwrites default Outlayer prepended\n proto.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // filter, layout, reveal new items\n var filteredItems = this._filterRevealAdded( items );\n // layout previous items\n this.layoutItems( this.filteredItems );\n // add to items and filteredItems\n this.filteredItems = filteredItems.concat( this.filteredItems );\n this.items = items.concat( this.items );\n };\n\n proto._filterRevealAdded = function( items ) {\n var filtered = this._filter( items );\n this.hide( filtered.needHide );\n // reveal all new items\n this.reveal( filtered.matches );\n // layout new items, no transition\n this.layoutItems( filtered.matches, true );\n return filtered.matches;\n };\n\n /**\n * Filter, sort, and layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\n proto.insert = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // append item elements\n var i, item;\n var len = items.length;\n for ( i=0; i < len; i++ ) {\n item = items[i];\n this.element.appendChild( item.element );\n }\n // filter new stuff\n var filteredInsertItems = this._filter( items ).matches;\n // set flag\n for ( i=0; i < len; i++ ) {\n items[i].isLayoutInstant = true;\n }\n this.arrange();\n // reset flag\n for ( i=0; i < len; i++ ) {\n delete items[i].isLayoutInstant;\n }\n this.reveal( filteredInsertItems );\n };\n\n var _remove = proto.remove;\n proto.remove = function( elems ) {\n elems = utils.makeArray( elems );\n var removeItems = this.getItems( elems );\n // do regular thing\n _remove.call( this, elems );\n // bail if no items to remove\n var len = removeItems && removeItems.length;\n // remove elems from filteredItems\n for ( var i=0; len && i < len; i++ ) {\n var item = removeItems[i];\n // remove item from collection\n utils.removeFrom( this.filteredItems, item );\n }\n };\n\n proto.shuffle = function() {\n // update random sortData\n for ( var i=0; i < this.items.length; i++ ) {\n var item = this.items[i];\n item.sortData.random = Math.random();\n }\n this.options.sortBy = 'random';\n this._sort();\n this._layout();\n };\n\n /**\n * trigger fn without transition\n * kind of hacky to have this in the first place\n * @param {Function} fn\n * @param {Array} args\n * @returns ret\n * @private\n */\n proto._noTransition = function( fn, args ) {\n // save transitionDuration before disabling\n var transitionDuration = this.options.transitionDuration;\n // disable transition\n this.options.transitionDuration = 0;\n // do it\n var returnValue = fn.apply( this, args );\n // re-enable transition for reveal\n this.options.transitionDuration = transitionDuration;\n return returnValue;\n };\n\n // ----- helper methods ----- //\n\n /**\n * getter method for getting filtered item elements\n * @returns {Array} elems - collection of item elements\n */\n proto.getFilteredItemElements = function() {\n return this.filteredItems.map( function( item ) {\n return item.element;\n });\n };\n\n // ----- ----- //\n\n return Isotope;\n\n}));\n"],"sourceRoot":""}