1/*! 2 * Packery PACKAGED v2.1.2 3 * Gapless, draggable grid layouts 4 * 5 * Licensed GPLv3 for open source use 6 * or Packery Commercial License for commercial use 7 * 8 * http://packery.metafizzy.co 9 * Copyright 2013-2018 Metafizzy 10 */ 11 12!(function (t, e) { 13 'function' == typeof define && define.amd 14 ? define('jquery-bridget/jquery-bridget', ['jquery'], function (i) { 15 return e(t, i) 16 }) 17 : 'object' == typeof module && module.exports 18 ? (module.exports = e(t, require('jquery'))) 19 : (t.jQueryBridget = e(t, t.jQuery)) 20})(window, function (t, e) { 21 'use strict' 22 function i(i, s, a) { 23 function h(t, e, n) { 24 var o, 25 s = '$().' + i + '("' + e + '")' 26 return ( 27 t.each(function (t, h) { 28 var u = a.data(h, i) 29 if (!u) return void r(i + ' not initialized. Cannot call methods, i.e. ' + s) 30 var c = u[e] 31 if (!c || '_' == e.charAt(0)) return void r(s + ' is not a valid method') 32 var d = c.apply(u, n) 33 o = void 0 === o ? d : o 34 }), 35 void 0 !== o ? o : t 36 ) 37 } 38 function u(t, e) { 39 t.each(function (t, n) { 40 var o = a.data(n, i) 41 o ? (o.option(e), o._init()) : ((o = new s(n, e)), a.data(n, i, o)) 42 }) 43 } 44 ;(a = a || e || t.jQuery), 45 a && 46 (s.prototype.option || 47 (s.prototype.option = function (t) { 48 a.isPlainObject(t) && (this.options = a.extend(!0, this.options, t)) 49 }), 50 (a.fn[i] = function (t) { 51 if ('string' == typeof t) { 52 var e = o.call(arguments, 1) 53 return h(this, t, e) 54 } 55 return u(this, t), this 56 }), 57 n(a)) 58 } 59 function n(t) { 60 !t || (t && t.bridget) || (t.bridget = i) 61 } 62 var o = Array.prototype.slice, 63 s = t.console, 64 r = 65 'undefined' == typeof s 66 ? function () {} 67 : function (t) { 68 s.error(t) 69 } 70 return n(e || t.jQuery), i 71}), 72 (function (t, e) { 73 'function' == typeof define && define.amd ? define('get-size/get-size', e) : 'object' == typeof module && module.exports ? (module.exports = e()) : (t.getSize = e()) 74 })(window, function () { 75 'use strict' 76 function t(t) { 77 var e = parseFloat(t), 78 i = -1 == t.indexOf('%') && !isNaN(e) 79 return i && e 80 } 81 function e() {} 82 function i() { 83 for (var t = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }, e = 0; u > e; e++) { 84 var i = h[e] 85 t[i] = 0 86 } 87 return t 88 } 89 function n(t) { 90 var e = getComputedStyle(t) 91 return e || a('Style returned ' + e + '. Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1'), e 92 } 93 function o() { 94 if (!c) { 95 c = !0 96 var e = document.createElement('div') 97 ;(e.style.width = '200px'), (e.style.padding = '1px 2px 3px 4px'), (e.style.borderStyle = 'solid'), (e.style.borderWidth = '1px 2px 3px 4px'), (e.style.boxSizing = 'border-box') 98 var i = document.body || document.documentElement 99 i.appendChild(e) 100 var o = n(e) 101 ;(r = 200 == Math.round(t(o.width))), (s.isBoxSizeOuter = r), i.removeChild(e) 102 } 103 } 104 function s(e) { 105 if ((o(), 'string' == typeof e && (e = document.querySelector(e)), e && 'object' == typeof e && e.nodeType)) { 106 var s = n(e) 107 if ('none' == s.display) return i() 108 var a = {} 109 ;(a.width = e.offsetWidth), (a.height = e.offsetHeight) 110 for (var c = (a.isBorderBox = 'border-box' == s.boxSizing), d = 0; u > d; d++) { 111 var l = h[d], 112 f = s[l], 113 p = parseFloat(f) 114 a[l] = isNaN(p) ? 0 : p 115 } 116 var g = a.paddingLeft + a.paddingRight, 117 m = a.paddingTop + a.paddingBottom, 118 y = a.marginLeft + a.marginRight, 119 v = a.marginTop + a.marginBottom, 120 _ = a.borderLeftWidth + a.borderRightWidth, 121 x = a.borderTopWidth + a.borderBottomWidth, 122 b = c && r, 123 E = t(s.width) 124 E !== !1 && (a.width = E + (b ? 0 : g + _)) 125 var w = t(s.height) 126 return w !== !1 && (a.height = w + (b ? 0 : m + x)), (a.innerWidth = a.width - (g + _)), (a.innerHeight = a.height - (m + x)), (a.outerWidth = a.width + y), (a.outerHeight = a.height + v), a 127 } 128 } 129 var r, 130 a = 131 'undefined' == typeof console 132 ? e 133 : function (t) { 134 console.error(t) 135 }, 136 h = ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderBottomWidth'], 137 u = h.length, 138 c = !1 139 return s 140 }), 141 (function (t, e) { 142 'function' == typeof define && define.amd ? define('ev-emitter/ev-emitter', e) : 'object' == typeof module && module.exports ? (module.exports = e()) : (t.EvEmitter = e()) 143 })('undefined' != typeof window ? window : this, function () { 144 function t() {} 145 var e = t.prototype 146 return ( 147 (e.on = function (t, e) { 148 if (t && e) { 149 var i = (this._events = this._events || {}), 150 n = (i[t] = i[t] || []) 151 return -1 == n.indexOf(e) && n.push(e), this 152 } 153 }), 154 (e.once = function (t, e) { 155 if (t && e) { 156 this.on(t, e) 157 var i = (this._onceEvents = this._onceEvents || {}), 158 n = (i[t] = i[t] || {}) 159 return (n[e] = !0), this 160 } 161 }), 162 (e.off = function (t, e) { 163 var i = this._events && this._events[t] 164 if (i && i.length) { 165 var n = i.indexOf(e) 166 return -1 != n && i.splice(n, 1), this 167 } 168 }), 169 (e.emitEvent = function (t, e) { 170 var i = this._events && this._events[t] 171 if (i && i.length) { 172 ;(i = i.slice(0)), (e = e || []) 173 for (var n = this._onceEvents && this._onceEvents[t], o = 0; o < i.length; o++) { 174 var s = i[o], 175 r = n && n[s] 176 r && (this.off(t, s), delete n[s]), s.apply(this, e) 177 } 178 return this 179 } 180 }), 181 (e.allOff = function () { 182 delete this._events, delete this._onceEvents 183 }), 184 t 185 ) 186 }), 187 (function (t, e) { 188 'use strict' 189 'function' == typeof define && define.amd ? define('desandro-matches-selector/matches-selector', e) : 'object' == typeof module && module.exports ? (module.exports = e()) : (t.matchesSelector = e()) 190 })(window, function () { 191 'use strict' 192 var t = (function () { 193 var t = window.Element.prototype 194 if (t.matches) return 'matches' 195 if (t.matchesSelector) return 'matchesSelector' 196 for (var e = ['webkit', 'moz', 'ms', 'o'], i = 0; i < e.length; i++) { 197 var n = e[i], 198 o = n + 'MatchesSelector' 199 if (t[o]) return o 200 } 201 })() 202 return function (e, i) { 203 return e[t](i) 204 } 205 }), 206 (function (t, e) { 207 'function' == typeof define && define.amd 208 ? define('fizzy-ui-utils/utils', ['desandro-matches-selector/matches-selector'], function (i) { 209 return e(t, i) 210 }) 211 : 'object' == typeof module && module.exports 212 ? (module.exports = e(t, require('desandro-matches-selector'))) 213 : (t.fizzyUIUtils = e(t, t.matchesSelector)) 214 })(window, function (t, e) { 215 var i = {} 216 ;(i.extend = function (t, e) { 217 for (var i in e) t[i] = e[i] 218 return t 219 }), 220 (i.modulo = function (t, e) { 221 return ((t % e) + e) % e 222 }) 223 var n = Array.prototype.slice 224 ;(i.makeArray = function (t) { 225 if (Array.isArray(t)) return t 226 if (null === t || void 0 === t) return [] 227 var e = 'object' == typeof t && 'number' == typeof t.length 228 return e ? n.call(t) : [t] 229 }), 230 (i.removeFrom = function (t, e) { 231 var i = t.indexOf(e) 232 ;-1 != i && t.splice(i, 1) 233 }), 234 (i.getParent = function (t, i) { 235 for (; t.parentNode && t != document.body; ) if (((t = t.parentNode), e(t, i))) return t 236 }), 237 (i.getQueryElement = function (t) { 238 return 'string' == typeof t ? document.querySelector(t) : t 239 }), 240 (i.handleEvent = function (t) { 241 var e = 'on' + t.type 242 this[e] && this[e](t) 243 }), 244 (i.filterFindElements = function (t, n) { 245 t = i.makeArray(t) 246 var o = [] 247 return ( 248 t.forEach(function (t) { 249 if (t instanceof HTMLElement) { 250 if (!n) return void o.push(t) 251 e(t, n) && o.push(t) 252 for (var i = t.querySelectorAll(n), s = 0; s < i.length; s++) o.push(i[s]) 253 } 254 }), 255 o 256 ) 257 }), 258 (i.debounceMethod = function (t, e, i) { 259 i = i || 100 260 var n = t.prototype[e], 261 o = e + 'Timeout' 262 t.prototype[e] = function () { 263 var t = this[o] 264 clearTimeout(t) 265 var e = arguments, 266 s = this 267 this[o] = setTimeout(function () { 268 n.apply(s, e), delete s[o] 269 }, i) 270 } 271 }), 272 (i.docReady = function (t) { 273 var e = document.readyState 274 'complete' == e || 'interactive' == e ? setTimeout(t) : document.addEventListener('DOMContentLoaded', t) 275 }), 276 (i.toDashed = function (t) { 277 return t 278 .replace(/(.)([A-Z])/g, function (t, e, i) { 279 return e + '-' + i 280 }) 281 .toLowerCase() 282 }) 283 var o = t.console 284 return ( 285 (i.htmlInit = function (e, n) { 286 i.docReady(function () { 287 var s = i.toDashed(n), 288 r = 'data-' + s, 289 a = document.querySelectorAll('[' + r + ']'), 290 h = document.querySelectorAll('.js-' + s), 291 u = i.makeArray(a).concat(i.makeArray(h)), 292 c = r + '-options', 293 d = t.jQuery 294 u.forEach(function (t) { 295 var i, 296 s = t.getAttribute(r) || t.getAttribute(c) 297 try { 298 i = s && JSON.parse(s) 299 } catch (a) { 300 return void (o && o.error('Error parsing ' + r + ' on ' + t.className + ': ' + a)) 301 } 302 var h = new e(t, i) 303 d && d.data(t, n, h) 304 }) 305 }) 306 }), 307 i 308 ) 309 }), 310 (function (t, e) { 311 'function' == typeof define && define.amd 312 ? define('outlayer/item', ['ev-emitter/ev-emitter', 'get-size/get-size'], e) 313 : 'object' == typeof module && module.exports 314 ? (module.exports = e(require('ev-emitter'), require('get-size'))) 315 : ((t.Outlayer = {}), (t.Outlayer.Item = e(t.EvEmitter, t.getSize))) 316 })(window, function (t, e) { 317 'use strict' 318 function i(t) { 319 for (var e in t) return !1 320 return (e = null), !0 321 } 322 function n(t, e) { 323 t && ((this.element = t), (this.layout = e), (this.position = { x: 0, y: 0 }), this._create()) 324 } 325 function o(t) { 326 return t.replace(/([A-Z])/g, function (t) { 327 return '-' + t.toLowerCase() 328 }) 329 } 330 var s = document.documentElement.style, 331 r = 'string' == typeof s.transition ? 'transition' : 'WebkitTransition', 332 a = 'string' == typeof s.transform ? 'transform' : 'WebkitTransform', 333 h = { WebkitTransition: 'webkitTransitionEnd', transition: 'transitionend' }[r], 334 u = { transform: a, transition: r, transitionDuration: r + 'Duration', transitionProperty: r + 'Property', transitionDelay: r + 'Delay' }, 335 c = (n.prototype = Object.create(t.prototype)) 336 ;(c.constructor = n), 337 (c._create = function () { 338 ;(this._transn = { ingProperties: {}, clean: {}, onEnd: {} }), this.css({ position: 'absolute' }) 339 }), 340 (c.handleEvent = function (t) { 341 var e = 'on' + t.type 342 this[e] && this[e](t) 343 }), 344 (c.getSize = function () { 345 this.size = e(this.element) 346 }), 347 (c.css = function (t) { 348 var e = this.element.style 349 for (var i in t) { 350 var n = u[i] || i 351 e[n] = t[i] 352 } 353 }), 354 (c.getPosition = function () { 355 var t = getComputedStyle(this.element), 356 e = this.layout._getOption('originLeft'), 357 i = this.layout._getOption('originTop'), 358 n = t[e ? 'left' : 'right'], 359 o = t[i ? 'top' : 'bottom'], 360 s = parseFloat(n), 361 r = parseFloat(o), 362 a = this.layout.size 363 ;-1 != n.indexOf('%') && (s = (s / 100) * a.width), -1 != o.indexOf('%') && (r = (r / 100) * a.height), (s = isNaN(s) ? 0 : s
363), (r = isNaN(r) ? 0 : r), (s -= e ? a.paddingLeft : a.paddingRight), (r -= i ? a.paddingTop : a.paddingBottom), (this.position.x = s), (this.position.y = r) 364 }), 365 (c.layoutPosition = function () { 366 var t = this.layout.size, 367 e = {}, 368 i = this.layout._getOption('originLeft'), 369 n = this.layout._getOption('originTop'), 370 o = i ? 'paddingLeft' : 'paddingRight', 371 s = i ? 'left' : 'right', 372 r = i ? 'right' : 'left', 373 a = this.position.x + t[o] 374 ;(e[s] = this.getXValue(a)), (e[r] = '') 375 var h = n ? 'paddingTop' : 'paddingBottom', 376 u = n ? 'top' : 'bottom', 377 c = n ? 'bottom' : 'top', 378 d = this.position.y + t[h] 379 ;(e[u] = this.getYValue(d)), (e[c] = ''), this.css(e), this.emitEvent('layout', [this]) 380 }), 381 (c.getXValue = function (t) { 382 var e = this.layout._getOption('horizontal') 383 return this.layout.options.percentPosition && !e ? (t / this.layout.size.width) * 100 + '%' : t + 'px' 384 }), 385 (c.getYValue = function (t) { 386 var e = this.layout._getOption('horizontal') 387 return this.layout.options.percentPosition && e ? (t / this.layout.size.height) * 100 + '%' : t + 'px' 388 }), 389 (c._transitionTo = function (t, e) { 390 this.getPosition() 391 var i = this.position.x, 392 n = this.position.y, 393 o = t == this.position.x && e == this.position.y 394 if ((this.setPosition(t, e), o && !this.isTransitioning)) return void this.layoutPosition() 395 var s = t - i, 396 r = e - n, 397 a = {} 398 ;(a.transform = this.getTranslate(s, r)), this.transition({ to: a, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: !0 }) 399 }), 400 (c.getTranslate = function (t, e) { 401 var i = this.layout._getOption('originLeft'), 402 n = this.layout._getOption('originTop') 403 return (t = i ? t : -t), (e = n ? e : -e), 'translate3d(' + t + 'px, ' + e + 'px, 0)' 404 }), 405 (c.goTo = function (t, e) { 406 this.setPosition(t, e), this.layoutPosition() 407 }), 408 (c.moveTo = c._transitionTo), 409 (c.setPosition = function (t, e) { 410 ;(this.position.x = parseFloat(t)), (this.position.y = parseFloat(e)) 411 }), 412 (c._nonTransition = function (t) { 413 this.css(t.to), t.isCleaning && this._removeStyles(t.to) 414 for (var e in t.onTransitionEnd) t.onTransitionEnd[e].call(this) 415 }), 416 (c.transition = function (t) { 417 if (!parseFloat(this.layout.options.transitionDuration)) return void this._nonTransition(t) 418 var e = this._transn 419 for (var i in t.onTransitionEnd) e.onEnd[i] = t.onTransitionEnd[i] 420 for (i in t.to) (e.ingProperties[i] = !0), t.isCleaning && (e.clean[i] = !0) 421 if (t.from) { 422 this.css(t.from) 423 var n = this.element.offsetHeight 424 n = null 425 } 426 this.enableTransition(t.to), this.css(t.to), (this.isTransitioning = !0) 427 }) 428 var d = 'opacity,' + o(a) 429 ;(c.enableTransition = function () { 430 if (!this.isTransitioning) { 431 var t = this.layout.options.transitionDuration 432 ;(t = 'number' == typeof t ? t + 'ms' : t), this.css({ transitionProperty: d, transitionDuration: t, transitionDelay: this.staggerDelay || 0 }), this.element.addEventListener(h, this, !1) 433 } 434 }), 435 (c.onwebkitTransitionEnd = function (t) { 436 this.ontransitionend(t) 437 }), 438 (c.onotransitionend = function (t) { 439 this.ontransitionend(t) 440 }) 441 var l = { '-webkit-transform': 'transform' } 442 ;(c.ontransitionend = function (t) { 443 if (t.target === this.element) { 444 var e = this._transn, 445 n = l[t.propertyName] || t.propertyName 446 if ((delete e.ingProperties[n], i(e.ingProperties) && this.disableTransition(), n in e.clean && ((this.element.style[t.propertyName] = ''), delete e.clean[n]), n in e.onEnd)) { 447 var o = e.onEnd[n] 448 o.call(this), delete e.onEnd[n] 449 } 450 this.emitEvent('transitionEnd', [this]) 451 } 452 }), 453 (c.disableTransition = function () { 454 this.removeTransitionStyles(), this.element.removeEventListener(h, this, !1), (this.isTransitioning = !1) 455 }), 456 (c._removeStyles = function (t) { 457 var e = {} 458 for (var i in t) e[i] = '' 459 this.css(e) 460 }) 461 var f = { transitionProperty: '', transitionDuration: '', transitionDelay: '' } 462 return ( 463 (c.removeTransitionStyles = function () { 464 this.css(f) 465 }), 466 (c.stagger = function (t) { 467 ;(t = isNaN(t) ? 0 : t), (this.staggerDelay = t + 'ms') 468 }), 469 (c.removeElem = function () { 470 this.element.parentNode.removeChild(this.element), this.css({ display: '' }), this.emitEvent('remove', [this]) 471 }), 472 (c.remove = function () { 473 return r && parseFloat(this.layout.options.transitionDuration) 474 ? (this.once('transitionEnd', function () { 475 this.removeElem() 476 }), 477 void this.hide()) 478 : void this.removeElem() 479 }), 480 (c.reveal = function () { 481 delete this.isHidden, this.css({ display: '' }) 482 var t = this.layout.options, 483 e = {}, 484 i = this.getHideRevealTransitionEndProperty('visibleStyle') 485 ;(e[i] = this.onRevealTransitionEnd), this.transition({ from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0, onTransitionEnd: e }) 486 }), 487 (c.onRevealTransitionEnd = function () { 488 this.isHidden || this.emitEvent('reveal') 489 }), 490 (c.getHideRevealTransitionEndProperty = function (t) { 491 var e = this.layout.options[t] 492 if (e.opacity) return 'opacity' 493 for (var i in e) return i 494 }), 495 (c.hide = function () { 496 ;(this.isHidden = !0), this.css({ display: '' }) 497 var t = this.layout.options, 498 e = {}, 499 i = this.getHideRevealTransitionEndProperty('hiddenStyle') 500 ;(e[i] = this.onHideTransitionEnd), this.transition({ from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: e }) 501 }), 502 (c.onHideTransitionEnd = function () { 503 this.isHidden && (this.css({ display: 'none' }), this.emitEvent('hide')) 504 }), 505 (c.destroy = function () { 506 this.css({ position: '', left: '', right: '', top: '', bottom: '', transition: '', transform: '' }) 507 }), 508 n 509 ) 510 }), 511 (function (t, e) { 512 'use strict' 513 'function' == typeof define && define.amd 514 ? define('outlayer/outlayer', ['ev-emitter/ev-emitter', 'get-size/get-size', 'fizzy-ui-utils/utils', './item'], function (i, n, o, s) { 515 return e(t, i, n, o, s) 516 }) 517 : 'object' == typeof module && module.exports 518 ? (module.exports = e(t, require('ev-emitter'), require('get-size'), require('fizzy-ui-utils'), require('./item'))) 519 : (t.Outlayer = e(t, t.EvEmitter, t.getSize, t.fizzyUIUtils, t.Outlayer.Item)) 520 })(window, function (t, e, i, n, o) { 521 'use strict' 522 function s(t, e) { 523 var i = n.getQueryElement(t) 524 if (!i) return void (h && h.error('Bad element for ' + this.constructor.namespace + ': ' + (i || t))) 525 ;(this.element = i), u && (this.$element = u(this.element)), (this.options = n.extend({}, this.constructor.defaults)), this.option(e) 526 var o = ++d 527 ;(this.element.outlayerGUID = o), (l[o] = this), this._create() 528 var s = this._getOption('initLayout') 529 s && this.layout() 530 } 531 function r(t) { 532 function e() { 533 t.apply(this, arguments) 534 } 535 return (e.prototype = Object.create(t.prototype)), (e.prototype.constructor = e), e 536 } 537 function a(t) { 538 if ('number' == typeof t) return t 539 var e = t.match(/(^\d*\.?\d*)(\w*)/), 540 i = e && e[1], 541 n = e && e[2] 542 if (!i.length) return 0 543 i = parseFloat(i) 544 var o = p[n] || 1 545 return i * o 546 }
547 var h = t.console, 548 u = t.jQuery, 549 c = function () {}, 550 d = 0, 551 l = {} 552 ;(s.namespace = 'outlayer'), 553 (s.Item = o), 554 (s.defaults = { containerStyle: { position: 'relative' }, initLayout: !0, originLeft: !0, originTop: !0, resize: !0, resizeContainer: !0, transitionDuration: '0.4s', hiddenStyle: { opacity: 0, transform: 'scale(0.001)' }, visibleStyle: { opacity: 1, transform: 'scale(1)' } }) 555 var f = s.prototype 556 n.extend(f, e.prototype), 557 (f.option = function (t) { 558 n.extend(this.options, t) 559 }), 560 (f._getOption = function (t) { 561 var e = this.constructor.compatOptions[t] 562 return e && void 0 !== this.options[e] ? this.options[e] : this.options[t] 563 }), 564 (s.compatOptions = { initLayout: 'isInitLayout', horizontal: 'isHorizontal', layoutInstant: 'isLayoutInstant', originLeft: 'isOriginLeft', originTop: 'isOriginTop', resize: 'isResizeBound', resizeContainer: 'isResizingContainer' }), 565 (f._create = function () { 566 this.reloadItems(), (this.stamps = []), this.stamp(this.options.stamp), n.extend(this.element.style, this.options.containerStyle) 567 var t = this._getOption('resize') 568 t && this.bindResize() 569 }), 570 (f.reloadItems = function () { 571 this.items = this._itemize(this.element.children) 572 }), 573 (f._itemize = function (t) { 574 for (var e = this._filterFindItemElements(t), i = this.constructor.Item, n = [], o = 0; o < e.length; o++) { 575 var s = e[o], 576 r = new i(s, this) 577 n.push(r) 578 } 579 return n 580 }), 581 (f._filterFindItemElements = function (t) { 582 return n.filterFindElements(t, this.options.itemSelector) 583 }), 584 (f.getItemElements = function () { 585 return this.items.map(function (t) { 586 return t.element 587 }) 588 }), 589 (f.layout = function () { 590 this._resetLayout(), this._manageStamps() 591 var t = this._getOption('layoutInstant'), 592 e = void 0 !== t ? t : !this._isLayoutInited 593 this.layoutItems(this.items, e), (this._isLayoutInited = !0) 594 }), 595 (f._init = f.layout), 596 (f._resetLayout = function () {
597 this.getSize() 598 }), 599 (f.getSize = function () { 600 this.size = i(this.element) 601 }), 602 (f._getMeasurement = function (t, e) { 603 var n, 604 o = this.options[t] 605 o ? ('string' == typeof o ? (n = this.element.querySelector(o)) : o instanceof HTMLElement && (n = o), (this[t] = n ? i(n)[e] : o)) : (this[t] = 0) 606 }), 607 (f.layoutItems = function (t, e) { 608 ;(t = this._getItemsForLayout(t)), this._layoutItems(t, e), this._postLayout() 609 }), 610 (f._getItemsForLayout = function (t) { 611 return t.filter(function (t) { 612 return !t.isIgnored 613 }) 614 }), 615 (f._layoutItems = function (t, e) { 616 if ((this._emitCompleteOnItems('layout', t), t && t.length)) { 617 var i = [] 618 t.forEach(function (t) { 619 var n = this._getItemLayoutPosition(t) 620 ;(n.item = t), (n.isInstant = e || t.isLayoutInstant), i.push(n) 621 }, this), 622 this._processLayoutQueue(i) 623 } 624 }), 625 (f._getItemLayoutPosition = function () { 626 return { x: 0, y: 0 } 627 }), 628 (f._processLayoutQueue = function (t) { 629 this.updateStagger(), 630 t.forEach(function (t, e) { 631 this._positionItem(t.item, t.x, t.y, t.isInstant, e) 632 }, this) 633 }), 634 (f.updateStagger = function () { 635 var t = this.options.stagger 636 return null === t || void 0 === t ? void (this.stagger = 0) : ((this.stagger = a(t)), this.stagger) 637 }), 638 (f._positionItem = function (t, e, i, n, o) { 639 n ? t.goTo(e, i) : (t.stagger(o * this.stagger), t.moveTo(e, i)) 640 }), 641 (f._postLayout = function () { 642 this.resizeContainer() 643 }), 644 (f.resizeContainer = function () { 645 var t = this._getOption('resizeContainer') 646 if (t) { 647 var e = this._getContainerSize() 648 e && (this._setContainerMeasure(e.width, !0), this._setContainerMeasure(e.height, !1)) 649 } 650 }), 651 (f._getContainerSize = c), 652 (f._setContainerMeasure = function (t, e) { 653 if (void 0 !== t) { 654 var i = this.size 655 i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), (t = Math.max(t, 0)), (this.element.style[e ? 'width' : 'height'] = t + 'px') 656 } 657 }), 658 (f._emitCompleteOnItems = function (t, e) { 659 function i() { 660 o.dispatchEvent(t + 'Complete', null, [e]) 661 } 662 function n() { 663 r++, r == s && i() 664 } 665 var o = this, 666 s = e.length 667 if (!e || !s) return void i() 668 var r = 0 669 e.forEach(function (e) { 670 e.once(t, n) 671 }) 672 }), 673 (f.dispatchEvent = function (t, e, i) { 674 var n = e ? [e].concat(i) : i 675 if ((this.emitEvent(t, n), u)) 676 if (((this.$element = this.$element || u(this.element)), e)) { 677 var o = u.Event(e) 678 ;(o.type = t), this.$element.trigger(o, i) 679 } else this.$element.trigger(t, i) 680 }), 681 (f.ignore = function (t) { 682 var e = this.getItem(t) 683 e && (e.isIgnored = !0) 684 }), 685 (f.unignore = function (t) { 686 var e = this.getItem(t) 687 e && delete e.isIgnored 688 }), 689 (f.stamp = function (t) { 690 ;(t = this._find(t)), t && ((this.stamps = this.stamps.concat(t)), t.forEach(this.ignore, this)) 691 }), 692 (f.unstamp = function (t) { 693 ;(t = this._find(t)), 694 t && 695 t.forEach(function (t) { 696 n.removeFrom(this.stamps, t), this.unignore(t) 697 }, this) 698 }), 699 (f._find = function (t) { 700 return t ? ('string' == typeof t && (t = this.element.querySelectorAll(t)), (t = n.makeArray(t))) : void 0 701 }), 702 (f._manageStamps = function () { 703 this.stamps && this.stamps.length && (this._getBoundingRect(), this.stamps.forEach(this._manageStamp, this)) 704 }), 705 (f._getBoundingRect = function () { 706 var t = this.element.getBoundingClientRect(), 707 e = this.size 708 this._boundingRect = { left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth) } 709 }), 710 (f._manageStamp = c), 711 (f._getElementOffset = function (t) { 712 var e = t.getBoundingClientRect(), 713 n = this._boundingRect, 714 o = i(t), 715 s = { left: e.left - n.left - o.marginLeft, top: e.top - n.top - o.marginTop, right: n.right - e.right - o.marginRight, bottom: n.bottom - e.bottom - o.marginBottom } 716 return s 717 }), 718 (f.handleEvent = n.handleEvent), 719 (f.bindResize = function () { 720 t.addEventListener('resize', this), (this.isResizeBound = !0) 721 }), 722 (f.unbindResize = function () { 723 t.removeEventListener('resize', this), (this.isResizeBound = !1) 724 }), 725 (f.onresize = function () { 726 this.resize() 727 }), 728 n.debounceMethod(s, 'onresize', 100), 729 (f.resize = function () { 730 this.isResizeBound && this.needsResizeLayout() && this.layout() 731 }), 732 (f.needsResizeLayout = function () { 733 var t = i(this.element), 734 e = this.size && t 735 return e && t.innerWidth !== this.size.innerWidth 736 }), 737 (f.addItems = function (t) { 738 var e = this._itemize(t) 739 return e.length && (this.items = this.items.concat(e)), e 740 }), 741 (f.appended = function (t) { 742 var e = this.addItems(t) 743 e.length && (this.layoutItems(e, !0), this.reveal(e)) 744 }),
745 (f.prepended = function (t) { 746 var e = this._itemize(t) 747 if (e.length) { 748 var i = this.items.slice(0) 749 ;(this.items = e.concat(i)), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) 750 } 751 }), 752 (f.reveal = function (t) { 753 if ((this._emitCompleteOnItems('reveal', t), t && t.length)) { 754 var e = this.updateStagger() 755 t.forEach(function (t, i) { 756 t.stagger(i * e), t.reveal() 757 }) 758 } 759 }), 760 (f.hide = function (t) { 761 if ((this._emitCompleteOnItems('hide', t), t && t.length)) { 762 var e = this.updateStagger() 763 t.forEach(function (t, i) { 764 t.stagger(i * e), t.hide() 765 }) 766 } 767 }), 768 (f.revealItemElements = function (t) { 769 var e = this.getItems(t) 770 this.reveal(e) 771 }), 772 (f.hideItemElements = function (t) { 773 var e = this.getItems(t) 774 this.hide(e) 775 }), 776 (f.getItem = function (t) { 777 for (var e = 0; e < this.items.length; e++) { 778 var i = this.items[e] 779 if (i.element == t) return i 780 } 781 }), 782 (f.getItems = function (t) { 783 t = n.makeArray(t) 784 var e = [] 785 return ( 786 t.forEach(function (t) { 787 var i = this.getItem(t) 788 i && e.push(i) 789 }, this), 790 e 791 ) 792 }), 793 (f.remove = function (t) { 794 var e = this.getItems(t) 795 this._emitCompleteOnItems('remove', e), 796 e && 797 e.length && 798 e.forEach(function (t) { 799 t.remove(), n.removeFrom(this.items, t) 800 }, this) 801 }), 802 (f.destroy = function () { 803 var t = this.element.style 804 ;(t.height = ''), 805 (t.position = ''), 806 (t.width = ''), 807 this.items.forEach(function (t) { 808 t.destroy() 809 }), 810 this.unbindResize() 811 var e = this.element.outlayerGUID 812 delete l[e], delete this.element.outlayerGUID, u && u.removeData(this.element, this.constructor.namespace) 813 }), 814 (s.data = function (t) { 815 t = n.getQueryElement(t) 816 var e = t && t.outlayerGUID 817 return e && l[e] 818 }), 819 (s.create = function (t, e) { 820 var i = r(s) 821 return (i.defaults = n.extend({}, s.defaults)), n.extend(i.defaults, e), (i.compatOptions = n.extend({}, s.compatOptions)), (i.namespace = t), (i.data = s.data), (i.Item = r(o)), n.htmlInit(i, t), u && u.bridget && u.bridget(t, i), i 822 }) 823 var p = { ms: 1, s: 1e3 } 824 return (s.Item = o), s 825 }), 826 (function (t, e) { 827 '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())) 828 })(window, function () { 829 'use strict' 830 function t(e) { 831 for (var i in t.defaults) this[i] = t.defaults[i] 832 for (i in e) this[i] = e[i] 833 } 834 t.defaults = { x: 0, y: 0, width: 0, height: 0 } 835 var e = t.prototype 836 return ( 837 (e.contains = function (t) { 838 var e = t.width || 0, 839 i = t.height || 0 840 return this.x <= t.x && this.y <= t.y && this.x + this.width >= t.x + e && this.y + this.height >= t.y + i 841 }), 842 (e.overlaps = function (t) { 843 var e = this.x + this.width, 844 i = this.y + this.height, 845 n = t.x + t.width, 846 o = t.y + t.height 847 return this.x < n && e > t.x && this.y < o && i > t.y 848 }), 849 (e.getMaximalFreeRects = function (e) { 850 if (!this.overlaps(e)) return !1 851 var i, 852 n = [], 853 o = this.x + this.width, 854 s = this.y + this.height, 855 r = e.x + e.width, 856 a = e.y + e.height 857 return ( 858 this.y < e.y && ((i = new t({ x: this.x, y: this.y, width: this.width, height: e.y - this.y })), n.push(i)), 859 o > r && ((i = new t({ x: r, y: this.y, width: o - r, height: this.height })), n.push(i)), 860 s > a && ((i = new t({ x: this.x, y: a, width: this.width, height: s - a })), n.push(i)), 861 this.x < e.x && ((i = new t({ x: this.x, y: this.y, width: e.x - this.x, height: this.height })), n.push(i)), 862 n 863 ) 864 }), 865 (e.canFit = function (t) { 866 return this.width >= t.width && this.height >= t.height 867 }), 868 t 869 ) 870 }), 871 (function (t, e) { 872 if ('function' == typeof define && define.amd) define('packery/js/packer', ['./rect'], e) 873 else if ('object' == typeof module && module.exports) module.exports = e(require('./rect')) 874 else { 875 var i = (t.Packery = t.Packery || {}) 876 i.Packer = e(i.Rect) 877 } 878 })(window, function (t) { 879 'use strict' 880 function e(t, e, i) { 881 ;(this.width = t || 0), (this.height = e || 0), (this.sortDirection = i || 'downwardLeftToRight'), this.reset() 882 } 883 var i = e.prototype 884 ;(i.reset = function () { 885 this.spaces = [] 886 var e = new t({ x: 0, y: 0, width: this.width, height: this.height }) 887 this.spaces.push(e), (this.sorter = n[this.sortDirection] || n.downwardLeftToRight) 888 }), 889 (i.pack = function (t) { 890 for (var e = 0; e < this.spaces.length; e++) { 891 var i = this.spaces[e] 892 if (i.canFit(t)) { 893 this.placeInSpace(t, i) 894 break 895 } 896 } 897 }), 898 (i.columnPack = function (t) { 899 for (var e = 0; e < this.spaces.length; e++) { 900 var i = this.spaces[e], 901 n = i.x <= t.x && i.x + i.width >= t.x + t.width && i.height >= t.height - 0.01 902 if (n) { 903 ;(t.y = i.y), this.placed(t) 904 break 905 } 906 } 907 }), 908 (i.rowPack = function (t) { 909 for (var e = 0; e < this.spaces.length; e++) { 910 var i = this.spaces[e], 911 n = i.y <= t.y && i.y + i.height >= t.y + t.height && i.width >= t.width - 0.01 912 if (n) { 913 ;(t.x = i.x), this.placed(t) 914 break 915 } 916 } 917 }), 918 (i.placeInSpace = function (t, e) { 919 ;(t.x = e.x), (t.y = e.y), this.placed(t) 920 }), 921 (i.placed = function (t) { 922 for (var e = [], i = 0; i < this.spaces.length; i++) { 923 var n = this.spaces[i], 924 o = n.getMaximalFreeRects(t) 925 o ? e.push.apply(e, o) : e.push(n) 926 } 927 ;(this.spaces = e), this.mergeSortSpaces() 928 }), 929 (i.mergeSortSpaces = function () { 930 e.mergeRects(this.spaces), this.spaces.sort(this.sorter) 931 }), 932 (i.addSpace = function (t) { 933 this.spaces.push(t), this.mergeSortSpaces() 934 }), 935 (e.mergeRects = function (t) { 936 var e = 0, 937 i = t[e] 938 t: for (; i; ) { 939 for (var n = 0, o = t[e + n]; o; ) { 940 if (o == i) n++ 941 else { 942 if (o.contains(i)) { 943 t.splice(e, 1), (i = t[e]) 944 continue t 945 } 946 i.contains(o) ? t.splice(e + n, 1) : n++ 947 } 948 o = t[e + n] 949 } 950 e++, (i = t[e]) 951 } 952 return t 953 }) 954 var n = { 955 downwardLeftToRight: function (t, e) { 956 return t.y - e.y || t.x - e.x 957 }, 958 rightwardTopToBottom: function (t, e) { 959 return t.x - e.x || t.y - e.y 960 }, 961 } 962 return e 963 }), 964 (function (t, e) { 965 '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)) 966 })(window, function (t, e) { 967 'use strict' 968 var i = document.documentElement.style, 969 n = 'string' == typeof i.transform ? 'transform' : 'WebkitTransform', 970 o = function () { 971 t.Item.apply(this, arguments) 972 }, 973 s = (o.prototype = Object.create(t.Item.prototype)), 974 r = s._create 975 s._create = function () { 976 r.call(this), (this.rect = new e()) 977 } 978 var a = s.moveTo 979 return ( 980 (s.moveTo = function (t, e) { 981 var i = Math.abs(this.position.x - t), 982 n = Math.abs(this.position.y - e), 983 o = this.layout.dragItemCount && !this.isPlacing && !this.isTransitioning && 1 > i && 1 > n 984 return o ? void this.goTo(t, e) : void a.apply(this, arguments) 985 }), 986 (s.enablePlacing = function () { 987 this.removeTransitionStyles(), this.isTransitioning && n && (this.element.style[n] = 'none'), (this.isTransitioning = !1), this.get
987Size(), this.layout._setRectSize(this.element, this.rect), (this.isPlacing = !0) 988 }), 989 (s.disablePlacing = function () { 990 this.isPlacing = !1 991 }), 992 (s.removeElem = function () { 993 var t = this.element.parentNode 994 t && t.removeChild(this.element), this.layout.packer.addSpace(this.rect), this.emitEvent('remove', [this]) 995 }), 996 (s.showDropPlaceholder = function () { 997 var t = this.dropPlaceholder 998 t || ((t = this.dropPlaceholder = document.createElement('div')), (t.className = 'packery-drop-placeholder'), (t.style.position = 'absolute')), 999 (t.style.width = this.size.width + 'px'), 1000 (t.style.height = this.size.height + 'px'), 1001 this.positionDropPlaceholder(), 1002 this.layout.element.appendChild(t) 1003 }), 1004 (s.positionDropPlaceholder = function () { 1005 this.dropPlaceholder.style[n] = 'translate(' + this.rect.x + 'px, ' + this.rect.y + 'px)' 1006 }), 1007 (s.hideDropPlaceholder = function () { 1008 var t = this.dropPlaceholder.parentNode 1009 t && t.removeChild(this.dropPlaceholder) 1010 }), 1011 o 1012 ) 1013 }), 1014 (function (t, e) { 1015 'function' == typeof define && define.amd 1016 ? define(['get-size/get-size', 'outlayer/outlayer', 'packery/js/rect', 'packery/js/packer', 'packery/js/item'], e) 1017 : 'object' == typeof module && module.exports 1018 ? (module.exports = e(require('get-size'), require('outlayer'), require('./rect'), require('./packer'), require('./item'))) 1019 : (t.Packery = e(t.getSize, t.Outlayer, t.Packery.Rect, t.Packery.Packer, t.Packery.Item)) 1020 })(window, function (t, e, i, n, o) { 1021 'use strict' 1022 function s(t, e) { 1023 return t.position.y - e.position.y || t.position.x - e.position.x 1024 } 1025 function r(t, e) { 1026 return t.position.x - e.position.x || t.position.y - e.position.y 1027 } 1028 function a(t, e) { 1029 var i = e.x - t.x, 1030 n = e.y - t.y 1031 return Math.sqrt(i * i + n * n) 1032 } 1033 i.prototype.canFit = function (t) { 1034 return this.width >= t.width - 1 && this.height >= t.height - 1 1035 } 1036 var h = e.create('packery') 1037 h.Item = o 1038 var u = h.prototype 1039 ;(u._create = function () { 1040 e.prototype._create.call(this), (this.packer = new n()), (this.shiftPacker = new n()), (this.isEnabled = !0), (this.dragItemCount = 0) 1041 var t = this 1042 ;(this.handleDraggabilly = { 1043 dragStart: function () { 1044 t.itemDragStart(this.element) 1045 }, 1046 dragMove: function () { 1047 t.itemDragMove(this.element, this.position.x, this.position.y) 1048 }, 1049 dragEnd: function () { 1050 t.itemDragEnd(this.element) 1051 }, 1052 }), 1053 (this.handleUIDraggable = { 1054 start: function (e, i) { 1055 i && t.itemDragStart(e.currentTarget) 1056 }, 1057 drag: function (e, i) { 1058 i && t.itemDragMove(e.currentTarget, i.position.left, i.position.top) 1059 }, 1060 stop: function (e, i) { 1061 i && t.itemDragEnd(e.currentTarget) 1062 }, 1063 }) 1064 }), 1065 (u._resetLayout = function () {
1066 this.getSize(), this._getMeasurements() 1067 var t, e, i 1068 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')), 1069 (this.packer.width = this.shiftPacker.width = t), 1070 (this.packer.height = this.shiftPacker.height = e), 1071 (this.packer.sortDirection = this.shiftPacker.sortDirection = i), 1072 this.packer.reset(), 1073 (this.maxY = 0), 1074 (this.maxX = 0) 1075 }), 1076 (u._getMeasurements = function () { 1077 this._getMeasurement('columnWidth', 'width'), this._getMeasurement('rowHeight', 'height'), this._getMeasurement('gutter', 'width') 1078 }), 1079 (u._getItemLayoutPosition = function (t) { 1080 if ((this._setRectSize(t.element, t.rect), this.isShifting || this.dragItemCount > 0)) { 1081 var e = this._getPackMethod() 1082 this.packer[e](t.rect) 1083 } else this.packer.pack(t.rect) 1084 return this._setMaxXY(t.rect), t.rect 1085 }), 1086 (u.shiftLayout = function () { 1087 ;(this.isShifting = !0), this.layout(), delete this.isShifting 1088 }), 1089 (u._getPackMethod = function () { 1090 return this._getOption('horizontal') ? 'rowPack' : 'columnPack' 1091 }), 1092 (u._setMaxXY = function (t) { 1093 ;(this.maxX = Math.max(t.x + t.width, this.maxX)), (this.maxY = Math.max(t.y + t.height, this.maxY)) 1094 }), 1095 (u._setRectSize = function (e, i) { 1096 var n = t(e), 1097 o = n.outerWidth, 1098 s = n.outerHeight 1099 ;(o || s) && ((o = this._applyGridGutter(o, this.columnWidth)), (s = this._applyGridGutter(s, this.rowHeight))), (i.width = Math.min(o, this.packer.width)), (i.height = Math.min(s, this.packer.height)) 1100 }), 1101 (u._applyGridGutter = function (t, e) { 1102 if (!e) return t + this.gutter 1103 e += this.gutter 1104 var i = t % e, 1105 n = i && 1 > i ? 'round' : 'ceil' 1106 return (t = Math[n](t / e) * e) 1107 }), 1108 (u._getContainerSize = function () { 1109 return this._getOption('horizontal') ? { width: this.maxX - this.gutter } : { height: this.maxY - this.gutter } 1110 }), 1111 (u._manageStamp = function (t) { 1112 var e, 1113 n = this.getItem(t) 1114 if (n && n.isPlacing) e = n.rect 1115 else { 1116 var o = this._getElementOffset(t) 1117 e = new i({ x: this._getOption('originLeft') ? o.left : o.right, y: this._getOption('originTop') ? o.top : o.bottom }) 1118 } 1119 this._setRectSize(t, e), this.packer.placed(e), this._setMaxXY(e) 1120 }), 1121 (u.sortItemsByPosition = function () { 1122 var t = this._getOption('horizontal') ? r : s 1123 this.items.sort(t) 1124 }), 1125 (u.fit = function (t, e, i) { 1126 var n = this.getItem(t) 1127 n && 1128 (this.stamp(n.element), 1129 n.enablePlacing(), 1130 this.updateShiftTargets(n), 1131 (e = void 0 === e ? n.rect.x : e), 1132 (i = void 0 === i ? n.rect.y : i), 1133 this.shift(n, e, i), 1134 this._bindFitEvents(n), 1135 n.moveTo(n.rect.x, n.rect.y), 1136 this.shiftLayout(), 1137 this.unstamp(n.element), 1138 this.sortItemsByPosition(), 1139 n.disablePlacing()) 1140 }), 1141 (u._bindFitEvents = function (t) { 1142 function e() { 1143 n++, 2 == n && i.dispatchEvent('fitComplete', null, [t]) 1144 } 1145 var i = this, 1146 n = 0 1147 t.once('layout', e), this.once('layoutComplete', e) 1148 }), 1149 (u.resize = function () { 1150 this.isResizeBound && this.needsResizeLayout() && (this.options.shiftPercentResize ? this.resizeShiftPercentLayout() : this.layout()) 1151 }), 1152 (u.needsResizeLayout = function () { 1153 var e = t(this.element), 1154 i = this._getOption('horizontal') ? 'innerHeight' : 'innerWidth' 1155 return e[i] != this.size[i] 1156 }), 1157 (u.resizeShiftPercentLayout = function () { 1158 var e = this._getItemsForLayout(this.items), 1159 i = this._getOption('horizontal'), 1160 n = i ? 'y' : 'x', 1161 o = i ? 'height' : 'width', 1162 s = i ? 'rowHeight' : 'columnWidth', 1163 r = i ? 'innerHeight' : 'innerWidth', 1164 a = this[s] 1165 if ((a = a && a + this.gutter)) { 1166 this._getMeasurements() 1167 var h = this[s] + this.gutter 1168 e.forEach(function (t) { 1169 var e = Math.round(t.rect[n] / a) 1170 t.rect[n] = e * h 1171 }) 1172 } else { 1173 var u = t(this.element)[r] + this.gutter, 1174 c = this.packer[o] 1175 e.forEach(function (t) { 1176 t.rect[n] = (t.rect[n] / c) * u 1177 }) 1178 } 1179 this.shiftLayout() 1180 }), 1181 (u.itemDragStart = function (t) { 1182 if (this.isEnabled) { 1183 this.stamp(t) 1184 var e = this.getItem(t) 1185 e && (e.enablePlacing(), e.showDropPlaceholder(), this.dragItemCount++, this.updateShiftTargets(e)) 1186 } 1187 }), 1188 (u.updateShiftTargets = function (t) {
1189 this.shiftPacker.reset(), this._getBoundingRect() 1190 var e = this._getOption('originLeft'), 1191 n = this._getOption('originTop') 1192 this.stamps.forEach(function (t) { 1193 var o = this.getItem(t) 1194 if (!o || !o.isPlacing) { 1195 var s = this._getElementOffset(t), 1196 r = new i({ x: e ? s.left : s.right, y: n ? s.top : s.bottom }) 1197 this._setRectSize(t, r), this.shiftPacker.placed(r) 1198 } 1199 }, this) 1200 var o = this._getOption('horizontal'), 1201 s = o ? 'rowHeight' : 'columnWidth', 1202 r = o ? 'height' : 'width' 1203 ;(this.shiftTargetKeys = []), (this.shiftTargets = []) 1204 var a, 1205 h = this[s] 1206 if ((h = h && h + this.gutter)) { 1207 var u = Math.ceil(t.rect[r] / h), 1208 c = Math.floor((this.shiftPacker[r] + this.gutter) / h) 1209 a = (c - u) * h 1210 for (var d = 0; c > d; d++) { 1211 var l = o ? 0 : d * h, 1212 f = o ? d * h : 0 1213 this._addShiftTarget(l, f, a) 1214 } 1215 } else (a = this.shiftPacker[r] + this.gutter - t.rect[r]), this._addShiftTarget(0, 0, a) 1216 var p = this._getItemsForLayout(this.items), 1217 g = this._getPackMethod() 1218 p.forEach(function (t) { 1219 var e = t.rect 1220 this._setRectSize(t.element, e), this.shiftPacker[g](e), this._addShiftTarget(e.x, e.y, a) 1221 var i = o ? e.x + e.width : e.x, 1222 n = o ? e.y : e.y + e.height 1223 if ((this._addShiftTarget(i, n, a), h)) 1224 for (var s = Math.round(e[r] / h), u = 1; s > u; u++) { 1225 var c = o ? i : e.x + h * u, 1226 d = o ? e.y + h * u : n 1227 this._addShiftTarget(c, d, a) 1228 } 1229 }, this) 1230 }), 1231 (u._addShiftTarget = function (t, e, i) { 1232 var n = this._getOption('horizontal') ? e : t 1233 if (!(0 !== n && n > i)) { 1234 var o = t + ',' + e, 1235 s = -1 != this.shiftTargetKeys.indexOf(o) 1236 s || (this.shiftTargetKeys.push(o), this.shiftTargets.push({ x: t, y: e })) 1237 } 1238 }), 1239 (u.shift = function (t, e, i) { 1240 var n, 1241 o = 1 / 0, 1242 s = { x: e, y: i } 1243 this.shiftTargets.forEach(function (t) { 1244 var e = a(t, s) 1245 o > e && ((n = t), (o = e)) 1246 }), 1247 (t.rect.x = n.x), 1248 (t.rect.y = n.y) 1249 }) 1250 var c = 120 1251 ;(u.itemDragMove = function (t, e, i) { 1252 function n() { 1253 s.shift(o, e, i), o.positionDropPlaceholder(), s.layout() 1254 } 1255 var o = this.isEnabled && this.getItem(t) 1256 if (o) { 1257 ;(e -= this.size.paddingLeft), (i -= this.size.paddingTop) 1258 var s = this, 1259 r = new Date(), 1260 a = this._itemDragTime && r - this._itemDragTime < c 1261 a ? (clearTimeout(this.dragTimeout), (this.dragTimeout = setTimeout(n, c))) : (n(), (this._itemDragTime = r)) 1262 } 1263 }), 1264 (u.itemDragEnd = function (t) { 1265 function e() { 1266 n++, 2 == n && (i.element.classList.remove('is-positioning-post-drag'), i.hideDropPlaceholder(), o.dispatchEvent('dragItemPositioned', null, [i])) 1267 } 1268 var i = this.isEnabled && this.getItem(t) 1269 if (i) { 1270 clearTimeout(this.dragTimeout), i.element.classList.add('is-positioning-post-drag') 1271 var n = 0, 1272 o = this 1273 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) 1274 } 1275 }), 1276 (u.bindDraggabillyEvents = function (t) { 1277 this._bindDraggabillyEvents(t, 'on') 1278 }), 1279 (u.unbindDraggabillyEvents = function (t) { 1280 this._bindDraggabillyEvents(t, 'off') 1281 }), 1282 (u._bindDraggabillyEvents = function (t, e) { 1283 var i = this.handleDraggabilly 1284 t[e]('dragStart', i.dragStart), t[e]('dragMove', i.dragMove), t[e]('dragEnd', i.dragEnd) 1285 }), 1286 (u.bindUIDraggableEvents = function (t) { 1287 this._bindUIDraggableEvents(t, 'on') 1288 }), 1289 (u.unbindUIDraggableEvents = function (t) { 1290 this._bindUIDraggableEvents(t, 'off') 1291 }), 1292 (u._bindUIDraggableEvents = function (t, e) { 1293 var i = this.handleUIDraggable 1294 t[e]('dragstart', i.start)[e]('drag', i.drag)[e]('dragstop', i.stop) 1295 }) 1296 var d = u.destroy 1297 return ( 1298 (u.destroy = function () { 1299 d.apply(this, arguments), (this.isEnabled = !1) 1300 }), 1301 (h.Rect = i), 1302 (h.Packer = n), 1303 h 1304 ) 1305 })
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.