PATH:
home
/
letacommog
/
les-compagnons
/
wp-content
/
plugins
/
elementor-extras
/
assets
/
lib
/
packery
!function(t,e){"function"==typeof define&&define.amd?define("packery/js/rect",e):"object"==typeof module&&module.exports?module.exports=e():(t.Packery=t.Packery||{},t.Packery.Rect=e())}(window,function(){function t(e){for(var i in t.defaults)this[i]=t.defaults[i];for(i in e)this[i]=e[i]}t.defaults={x:0,y:0,width:0,height:0};var e=t.prototype;return e.contains=function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i},e.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,s=t.x+t.width,r=t.y+t.height;return this.x<s&&e>t.x&&this.y<r&&i>t.y},e.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,s=[],r=this.x+this.width,h=this.y+this.height,n=e.x+e.width,o=e.y+e.height;return this.y<e.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),s.push(i)),r>n&&(i=new t({x:n,y:this.y,width:r-n,height:this.height}),s.push(i)),h>o&&(i=new t({x:this.x,y:o,width:this.width,height:h-o}),s.push(i)),this.x<e.x&&(i=new t({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),s.push(i)),s},e.canFit=function(t){return this.width>=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof module&&module.exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}var i=e.prototype;i.reset=function(){this.spaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},i.pack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.canFit(t)){this.placeInSpace(t,i);break}}},i.columnPack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.x<=t.x&&i.x+i.width>=t.x+t.width&&i.height>=t.height-.01){t.y=i.y,this.placed(t);break}}},i.rowPack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.y<=t.y&&i.y+i.height>=t.y+t.height&&i.width>=t.width-.01){t.x=i.x,this.placed(t);break}}},i.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},i.placed=function(t){for(var e=[],i=0;i<this.spaces.length;i++){var s=this.spaces[i],r=s.getMaximalFreeRects(t);r?e.push.apply(e,r):e.push(s)}this.spaces=e,this.mergeSortSpaces()},i.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},i.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},e.mergeRects=function(t){var e=0,i=t[e];t:for(;i;){for(var s=0,r=t[e+s];r;){if(r==i)s++;else{if(r.contains(i)){t.splice(e,1),i=t[e];continue t}i.contains(r)?t.splice(e+s,1):s++}r=t[e+s]}e++,i=t[e]}return t};var s={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};return e}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("./rect")):t.Packery.Item=e(t.Outlayer,t.Packery.Rect)}(window,function(t,e){var i=document.documentElement.style,s="string"==typeof i.transform?"transform":"WebkitTransform",r=function(){t.Item.apply(this,arguments)},h=r.prototype=Object.create(t.Item.prototype),n=h._create;h._create=function(){n.call(this),this.rect=new e};var o=h.moveTo;return h.moveTo=function(t,e){var i=Math.abs(this.position.x-t),s=Math.abs(this.position.y-e);if(this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&i<1&&s<1)return void this.goTo(t,e);o.apply(this,arguments)},h.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&s&&(this.element.style[s]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},h.disablePlacing=function(){this.isPlacing=!1},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},h.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||(t=this.dropPlaceholder=document.createElement("div"),t.className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},h.positionDropPlaceholder=function(){this.dropPlaceholder.style[s]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},h.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},r}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(t,e,i,s,r){function h(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function n(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}function o(t,e){var i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}i.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var a=e.create("packery");a.Item=r;var c=a.prototype;c._create=function(){e.prototype._create.call(this),this.packer=new s,this.shiftPacker=new s,this.isEnabled=!0,this.dragItemCount=0;var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},c._resetLayout=function(){this.getSize(),this._getMeasurements();var t,e,i;this._getOption("horizontal")?(t=1/0,e=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,e=1/0,i="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=e,this.packer.sortDirection=this.shiftPacker.sortDirection=i,this.packer.reset(),this.maxY=0,this.maxX=0},c._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},c._getItemLayoutPosition=function(t){if(this._setRectSize(t.element,t.rect),this.isShifting||this.dragItemCount>0){var e=this._getPackMethod();this.packer[e](t.rect)}else this.packer.pack(t.rect);return this._setMaxXY(t.rect),t.rect},c.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},c._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},c._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},c._setRectSize=function(e,i){var s=t(e),r=s.outerWidth,h=s.outerHeight;(r||h)&&(r=this._applyGridGutter(r,this.columnWidth),h=this._applyGridGutter(h,this.rowHeight)),i.width=Math.min(r,this.packer.width),i.height=Math.min(h,this.packer.height)},c._applyGridGutter=function(t,e){if(!e)return t+this.gutter;e+=this.gutter;var i=t%e,s=i&&i<1?"round":"ceil";return t=Math[s](t/e)*e},c._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},c._manageStamp=function(t){var e,s=this.getItem(t);if(s&&s.isPlacing)e=s.rect;else{var r=this._getElementOffset(t);e=new i({x:this._getOption("originLeft")?r.left:r.right,y:this._getOption("originTop")?r.top:r.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},c.sortItemsByPosition=function(){var t=this._getOption("horizontal")?n:h;this.items.sort(t)},c.fit=function(t,e,i){var s=this.getItem(t);s&&(this.stamp(s.element),s.enablePlacing(),this.updateShiftTargets(s),e=void 0===e?s.rect.x:e,i=void 0===i?s.rect.y:i,this.shift(s,e,i),this._bindFitEvents(s),s.moveTo(s.rect.x,s.rect.y),this.shiftLayout(),this.unstamp(s.element),this.sortItemsByPosition(),s.disablePlacing())},c._bindFitEvents=function(t){function e(){2==++s&&i.dispatchEvent("fitComplete",null,[t])}var i=this,s=0;t.once("layout",e),this.once("layoutComplete",e)},c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},c.needsResizeLayout=function(){var e=t(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return e[i]!=this.size[i]},c.resizeShiftPercentLayout=function(){var e=this._getItemsForLayout(this.items),i=this._getOption("horizontal"),s=i?"y":"x",r=i?"height":"width",h=i?"rowHeight":"columnWidth",n=i?"innerHeight":"innerWidth",o=this[h];if(o=o&&o+this.gutter){this._getMeasurements();var a=this[h]+this.gutter;e.forEach(function(t){var e=Math.round(t.rect[s]/o);t.rect[s]=e*a})}else{var c=t(this.element)[n]+this.gutter,u=this.packer[r];e.forEach(function(t){t.rect[s]=t.rect[s]/u*c})}this.shiftLayout()},c.itemDragStart=function(t){if(this.isEnabled){this.stamp(t);var e=this.getItem(t);e&&(e.enablePlacing(),e.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(e))}},c.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var r=this.getItem(t);if(!r||!r.isPlacing){var h=this._getElementOffset(t),n=new i({x:e?h.left:h.right,y:s?h.top:h.bottom});this._setRectSize(t,n),this.shiftPacker.placed(n)}},this);var r=this._getOption("horizontal"),h=r?"rowHeight":"columnWidth",n=r?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var o,a=this[h];if(a=a&&a+this.gutter){var c=Math.ceil(t.rect[n]/a),u=Math.floor((this.shiftPacker[n]+this.gutter)/a);o=(u-c)*a;for(var d=0;d<u;d++)this._addShiftTarget(d*a,0,o)}else o=this.shiftPacker[n]+this.gutter-t.rect[n],this._addShiftTarget(0,0,o);var g=this._getItemsForLayout(this.items),l=this._getPackMethod();g.forEach(function(t){var e=t.rect;this._setRectSize(t.element,e),this.shiftPacker[l](e),this._addShiftTarget(e.x,e.y,o);var i=r?e.x+e.width:e.x,s=r?e.y:e.y+e.height;if(this._addShiftTarget(i,s,o),a)for(var h=Math.round(e[n]/a),c=1;c<h;c++){var u=r?i:e.x+a*c,d=r?e.y+a*c:s;this._addShiftTarget(u,d,o)}},this)},c._addShiftTarget=function(t,e,i){var s=this._getOption("horizontal")?e:t;if(!(0!==s&&s>i)){var r=t+","+e;-1!=this.shiftTargetKeys.indexOf(r)||(this.shiftTargetKeys.push(r),this.shiftTargets.push({x:t,y:e}))}},c.shift=function(t,e,i){var s,r=1/0,h={x:e,y:i};this.shiftTargets.forEach(function(t){var e=o(t,h);e<r&&(s=t,r=e)}),t.rect.x=s.x,t.rect.y=s.y};c.itemDragMove=function(t,e,i){function s(){h.shift(r,e,i),r.positionDropPlaceholder(),h.layout()}var r=this.isEnabled&&this.getItem(t);if(r){e-=this.size.paddingLeft,i-=this.size.paddingTop;var h=this,n=new Date;this._itemDragTime&&n-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(s,120)):(s(),this._itemDragTime=n)}},c.itemDragEnd=function(t){function e(){2==++s&&(i.element.classList.remove("is-positioning-post-drag"),i.hideDropPlaceholder(),r.dispatchEvent("dragItemPositioned",null,[i]))}var i=this.isEnabled&&this.getItem(t);if(i){clearTimeout(this.dragTimeout),i.element.classList.add("is-positioning-post-drag");var s=0,r=this;i.once("layout",e),this.once("layoutComplete",e),i.moveTo(i.rect.x,i.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),i.disablePlacing(),this.unstamp(i.element)}},c.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},c.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},c._bindDraggabillyEvents=function(t,e){var i=this.handleDraggabilly;t[e]("dragStart",i.dragStart),t[e]("dragMove",i.dragMove),t[e]("dragEnd",i.dragEnd)},c.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},c.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},c._bindUIDraggableEvents=function(t,e){var i=this.handleUIDraggable;t[e]("dragstart",i.start)[e]("drag",i.drag)[e]("dragstop",i.stop)};var u=c.destroy;return c.destroy=function(){u.apply(this,arguments),this.isEnabled=!1},a.Rect=i,a.Packer=s,a}),function(t,e){"function"==typeof define&&define.amd?define(["isotope/js/layout-mode","packery/js/packery"],e):"object"==typeof module&&module.exports?module.exports=e(require("isotope-layout/js/layout-mode"),require("packery")):e(t.Isotope.LayoutMode,t.Packery)}(window,function(t,e){var i=t.create("packery"),s=i.prototype,r={_getElementOffset:!0,_getMeasurement:!0};for(var h in e.prototype)r[h]||(s[h]=e.prototype[h]);var n=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new e.Packer,this.shiftPacker=this.shiftPacker||new e.Packer,n.apply(this,arguments)};var o=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new e.Rect,o.call(this,t)};var a=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():a.call(this)};var c=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:c.apply(this.isotope,arguments)},i});
[+]
..
[-] packery-mode.pkgd.js
[edit]
[-] packery-mode.pkgd.min.js
[edit]