1function masonry_pluginAppObj_6_69() { 2 3 var $grid, 4 grid = "", 5 loaders = [], 6 loadingTimeout, 7 effect = "Amun", 8 resizeTimer; 9 10 x5engine.boot.push(function(){resize_masonry(); 11 12 grid = $("#masonry_pluginAppObj_6_69 .grid"); 13 $grid = $('#masonry_pluginAppObj_6_69 .grid').masonry({ 14 itemSelector: '#masonry_pluginAppObj_6_69 .grid-item', 15 percentPosition: true, 16 columnWidth: $('#masonry_pluginAppObj_6_69 .grid-item')[0], 17 transitionDuration: 0 18 }); 19 20 $('#masonry_pluginAppObj_6_69 .grid-item .item-wrapper img').each(function(){ 21 $(this).attr("src", x5engine.settings.currentPath + $(this).attr("src")); 22 }); 23 24 if("online" !== 'uipreview'){ 25 x5engine.utils.onElementInViewPort($("#masonry_pluginAppObj_6_69")[0],loadImage,$("#masonry_pluginAppObj_6_69 .grid-item:lt(1)").height() /3); 26 } 27 else{ 28 loadImage(); 29 } 30 31 var pluginAppObj_6_69_resizeTo = null, 32 pluginAppObj_6_69_width = 0; 33 x5engine.utils.onElementResize(document.getElementById('pluginAppObj_6_69'), function (rect, target) { 34 if (pluginAppObj_6_69_width == rect.width) { 35 return; 36 } 37 pluginAppObj_6_69_width = rect.width; 38 if (!!pluginAppObj_6_69_resizeTo) { 39 clearTimeout(pluginAppObj_6_69_resizeTo); 40 } 41 pluginAppObj_6_69_resizeTo = setTimeout(function() { 42 init_resize(); 43 }, 50); 44 }); 45create_showbox(); 46 }); 47 48 function loadImage(){ 49 $grid.imagesLoaded().progress(function (imgLoad, image) { 50 $grid.masonry('layout'); 51 if (effect === "none") { 52 $(image.img).delay(500).animate({ 53 opacity: 1 54 }); 55 } 56 }).done(function (instance) { 57 if (effect !== "none") { 58 loaders.push(new GridLoaderFx($grid)); 59 applyFx(); 60 } 61 resized_pluginAppObj_6_69 (); 62 }); 63 } 64 65 function init_resize(){ 66 resize_masonry(); 67 $grid.masonry('layout'); 68 } 69 70 function resize_masonry(){ 71 var columns = 2; 72 var mode = 'resize'; 73 var wsx5Mode = 'online'; 74 var width; 75 var max_width; 76 var container_width = $("#pluginAppObj_6_69").width(); 77 78 if (mode == 'resize' || (true && x5engine.responsive.isDesktopMode()) ) { 79 if (wsx5Mode == 'uipreview' || container_width > (columns * 64)) { 80 width = (100/columns) + "%"; 81 } 82 else { 83 width = "100%"; 84 } 85 } 86 else { 87 var item_width = 562.5; 88 width = 100 / (Math.ceil(container_width / item_width)) + "%"; 89 } 90 $("#masonry_pluginAppObj_6_69 .grid-item").css("width", width); 91 resized_pluginAppObj_6_69(); 92 } 93 94 function resized_pluginAppObj_6_69(){ 95 $('#masonry_pluginAppObj_6_69 .grid-item .item-wrapper').each(function(){ 96 $(this).find('.overlay-content').css({width: $(this).width(), height: $(this).height()}); 97 }); 98 } 99 100 function create_showbox(){ 101 $("#masonry_pluginAppObj_6_69 .grid-item.showbox").off("click"); 102 $("#masonry_pluginAppObj_6_69 .grid-item.showbox").on("click", function(e) { 103 var starting_index = parseInt($(this).attr("data-index"),10); 104 var images = ['pluginAppObj/pluginAppObj_6_69/Mienskipskeamer-Flinterstruk1.jpg','pluginAppObj/pluginAppObj_6_69/Mienskipskeamer-Flinterstruk2.jpg']; 105 var medias = []; 106 for(var i = 0; i < images.length; i++) { 107 medias[i] = {url: x5engine.settings.currentPath + images[i], type: "image"}; 108 } 109 x5engine.imShowBox({ 110 media: medias, 111 }, starting_index , $(this)); 112 return false; 113 }); 114 } 115 116 function applyFx() { 117 loadingTimeout = setTimeout(function () { 118 // Apply effect. 119 loaders[0]._render(); 120 }, 500); 121 } 122 123 function GridLoaderFx(el, options) { 124 this.el = el; 125 this.items = $(el).find('.grid-item .item-img'); 126 } 127 128 GridLoaderFx.prototype._render = function () { 129 // Reset styles. 130 this._resetStyles(); 131 132 var self = this, 133 effectSettings = this.effects[effect], 134 animeOpts = effectSettings.animeOpts 135 136 if (effectSettings.perspective != undefined) {
137 [].slice.call(this.items).forEach(function (item) { 138 item.parentNode.style.WebkitPerspective = item.parentNode.style.perspective = effectSettings.perspective + 'px'; 139 }); 140 } 141 142 if (effectSettings.origin != undefined) { 143 [].slice.call(this.items).forEach(function (item) { 144 item.style.WebkitTransformOrigin = item.style.transformOrigin = effectSettings.origin; 145 }); 146 } 147 148 if (effectSettings.lineDrawing != undefined) { 149 [].slice.call(this.items).forEach(function (item) { 150 // Create SVG. 151 var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'), 152 path = document.createElementNS('http://www.w3.org/2000/svg', 'path'), 153 itemW = item.offsetWidth-0.1, 154 itemH = item.offsetHeight; 155 156 svg.setAttribute('width', itemW + 'px'); 157 svg.setAttribute('height', itemH + 'px'); 158 svg.setAttribute('viewBox', '0 0 ' + itemW + ' ' + itemH); 159 svg.setAttribute('class', 'grid__deco'); 160 path.setAttribute('d', 'M0,0 l' + itemW + ',0 0,' + itemH + ' -' + itemW + ',0 0,-' + itemH); 161 path.setAttribute('stroke-dashoffset', anime.setDashoffset(path)); 162 svg.appendChild(path); 163 item.parentNode.appendChild(svg); 164 }); 165 166 var animeLineDrawingOpts = effectSettings.animeLineDrawingOpts; 167 animeLineDrawingOpts.targets = document.querySelectorAll('#masonry_pluginAppObj_6_69 .grid__deco > path'); 168 anime.remove(animeLineDrawingOpts.targets); 169 anime(animeLineDrawingOpts); 170 } 171 172 if (effectSettings.revealer != undefined) { 173 [].slice.call(this.items).forEach(function (item) { 174 var revealer = document.createElement('div'); 175 revealer.className = 'grid__reveal'; 176 if (effectSettings.revealerOrigin != undefined) { 177 revealer.style.transformOrigin = effectSettings.revealerOrigin; 178 } 179 if (effectSettings.revealerColor != undefined) { 180 revealer.style.backgroundColor = 'rgba(159, 171, 176, 1)'; 181 } 182 item.parentNode.appendChild(revealer); 183 }); 184 185 var animeRevealerOpts = effectSettings.animeRevealerOpts; 186 animeRevealerOpts.targets = document.querySelectorAll('#masonry_pluginAppObj_6_69 .grid__reveal'); 187 animeRevealerOpts.begin = function (obj) { 188 for (var i = 0, len = obj.animatables.length; i < len; ++i) { 189 obj.animatables[i].target.style.opacity = 1; 190 } 191 }; 192 anime.remove(animeRevealerOpts.targets); 193 anime(animeRevealerOpts); 194 } 195 196 if (effectSettings.itemOverflowHidden) { 197 [].slice.call(this.items).forEach(function (item) { 198 item.parentNode.style.overflow = 'hidden'; 199 }); 200 } 201 202 animeOpts.targets = effectSettings.sortTargetsFn && typeof effectSettings.sortTargetsFn === 'function' ? [].slice.call(this.items).sort(effectSettings.sortTargetsFn) : document.querySelectorAll("#masonry_pluginAppObj_6_69 .item-img"); 203 animeOpts.complete = function(anim) { 204 // Reset some CSS defaults useful for hover effects 205 for (var i = 0; i < loaders[0].items.length; i++) { 206 loaders[0].items[i].style = ''; 207 loaders[0].items[i].style.opacity = '1'; 208 loaders[0].items[i].style.transition = 'all 300ms ease'; 209 } 210 }; 211 anime.remove(animeOpts.targets); 212 anime(animeOpts); 213 }; 214 215 GridLoaderFx.prototype._resetStyles = function () { 216 this.el.style = ""; 217 this.el.style.perspective = ""; 218 this.el.style.WebkitPerspective = this.el.style.perspective = 'none'; 219 [].slice.call(this.items).forEach(function (item) { 220 var gItem = item.parentNode; 221 item.style.opacity = 0; 222 item.style.WebkitTransformOrigin = item.style.transformOrigin = '50% 50%'; 223 item.style.transform = 'none'; 224 225 var svg = item.parentNode.querySelector('svg.grid__deco'); 226 if (svg) { 227 gItem.removeChild(svg); 228 } 229 230 var revealer = item.parentNode.querySelector('.grid__reveal'); 231 if (revealer) { 232 gItem.removeChild(revealer); 233 } 234 235 gItem.style.overflow = ''; 236 }); 237 }; 238 239 /** 240 * Effects. 241 */ 242 GridLoaderFx.prototype.effects = { 243 'Hapi': { 244 animeOpts: { 245 duration: function(t,i) { 246 return 600 + i*75; 247 }, 248 easing: 'easeOutExpo', 249 delay: function(t,i) { 250 return i*50; 251 }, 252 opacity: { 253 value: [0,1], 254 easing: 'linear' 255 }, 256 scale: [0,1] 257 } 258 }, 259 'Amun': { 260 // Sort target elements function. 261 sortTargetsFn: function(a,b) { 262 var aBounds = a.getBoundingClientRect(), 263 bBounds = b.getBoundingClientRect(); 264 265 return (aBounds.left - bBounds.left) || (aBounds.top - bBounds.top); 266 }, 267 animeOpts: { 268 duration: function(t,i) { 269 return 500 + i*50; 270 }, 271 easing: 'easeOutExpo', 272 delay: function(t,i) { 273 return i * 20; 274 }, 275 opacity: { 276 value: [0,1], 277 duration: function(t,i) { 278 return 250 + i*50; 279 }, 280 easing: 'linear' 281 }, 282 translateY: [400,0] 283 } 284 }, 285 'Kek': { 286 sortTargetsFn: function(a,b) { 287 return b.getBoundingClientRect().left - a.getBoundingClientRect().left; 288 }, 289 animeOpts: {
290 duration: 800, 291 easing: [0.1,1,0.3,1], 292 delay: function(t,i) { 293 return i * 20; 294 }, 295 opacity: { 296 value: [0,1], 297 duration: 600, 298 easing: 'linear' 299 }, 300 translateX: [-500,0], 301 rotateZ: [15,0] 302 } 303 }, 304 'Isis': { 305 animeOpts: { 306 duration: 900, 307 elasticity: 500, 308 delay: function(t,i) { 309 return i*15; 310 }, 311 opacity: { 312 value: [0,1], 313 duration: 300, 314 easing: 'linear' 315 }, 316 translateX: function() { 317 return [anime.random(0,1) === 0 ? 100 : -100,0]; 318 }, 319 translateY: function() { 320 return [anime.random(0,1) === 0 ? 100 : -100,0]; 321 } 322 } 323 }, 324 'Montu': { 325 perspective: 800, 326 origin: '50% 0%', 327 animeOpts: { 328 duration: 1500, 329 elasticity: 400, 330 delay: function(t,i) { 331 return i*75; 332 }, 333 opacity: { 334 value: [0,1], 335 duration: 1000, 336 easing: 'linear' 337 }, 338 rotateX: [-90,0] 339 } 340 }, 341 'Osiris': { 342 perspective: 3000, 343 animeOpts: { 344 duration: function() { 345 return anime.random(500,1000) 346 }, 347 easing: [0.2,1,0.3,1], 348 delay: function(t,i) { 349 return i*50; 350 }, 351 opacity: { 352 value: [0,1], 353 duration: 700, 354 easing: 'linear' 355 }, 356 translateZ: { 357 value: [-3000,0], 358 duration: 1000 359 }, 360 rotateY: ['-1turns',0] 361 } 362 }, 363 'Satet': { 364 animeOpts: { 365 duration: 800, 366 elasticity: 600, 367 delay: function(t,i) { 368 return i*100; 369 }, 370 opacity: { 371 value: [0,1], 372 duration: 600, 373 easing: 'linear' 374 }, 375 scaleX: { 376 value: [0.4,1] 377 }, 378 scaleY: { 379 value: [0.6,1], 380 duration: 1000 381 } 382 } 383 }, 384 'Atum': { 385 sortTargetsFn: function(a,b) { 386 var docScrolls = {top : document.body.scrollTop + document.documentElement.scrollTop}, 387 y1 = window.innerHeight + docScrolls.top, 388 aBounds = a.getBoundingClientRect(), 389 ay1 = aBounds.top + docScrolls.top + aBounds.height/2, 390 bBounds = b.getBoundingClientRect(), 391 by1 = bBounds.top + docScrolls.top + bBounds.height/2; 392 393 return Math.abs(y1-ay1) - Math.abs(y1-by1); 394 }, 395 perspective: 1000, 396 origin: '50% 0%', 397 animeOpts: { 398 duration: 800, 399 easing: [0.1,1,0.3,1], 400 delay: function(t,i) { 401 return i*35; 402 }, 403 opacity: { 404 value: [0,1], 405 duration: 600, 406 easing: 'linear' 407 }, 408 translateX: [100,0], 409 translateY: [-100,0], 410 translateZ: [400,0], 411 rotateZ: [10,0], 412 rotateX: [75,0] 413 } 414 }, 415 'Ra': { 416 origin: '50% 0%', 417 animeOpts: { 418 duration: 500, 419 easing: 'easeOutBack', 420 delay: function(t,i) { 421 return i * 100; 422 }, 423 opacity: { 424 value: [0,1], 425 easing: 'linear' 426 }, 427 translateY: [400,0], 428 scaleY: [ 429 {value: [3,0.6], delay: function(t,i) {return i * 100 + 120;}, duration: 300, easing: 'easeOutExpo'}, 430 {value: [0.6,1], duration: 1400, easing: 'easeOutElastic'} 431 ], 432 scaleX: [ 433 {value: [0.9,1.05], delay: function(t,i) {return i * 100 + 120;}, duration: 300, easing: 'easeOutExpo'}, 434 {value: [1.05,1], duration: 1400, easing: 'easeOutElastic'} 435 ] 436 } 437 }, 438 'Sobek': { 439 animeOpts: { 440 duration: 600, 441 easing: 'easeOutExpo', 442 delay: function(t,i) { 443 return i*100; 444 }, 445 opacity: { 446 value: [0,1], 447 duration: 100, 448 easing: 'linear' 449 }, 450 translateX: function(t,i) { 451 var docScrolls = {left : document.body.scrollLeft + document.documentElement.scrollLeft}, 452 x1 = window.innerWidth/2 + docScrolls.left, 453 tBounds = t.getBoundingClientRect(), 454 x2 = tBounds.left +docScrolls.left + tBounds.width/2; 455 456 return [x1-x2,0]; 457 }, 458 translateY: function(t,i) { 459 var docScrolls = {top : document.body.scrollTop + document.documentElement.scrollTop}, 460 y1 = window.innerHeight + docScrolls.top, 461 tBounds = t.getBoundingClientRect(), 462 y2 = tBounds.top + docScrolls.top + tBounds.height/2; 463 464 return [y1-y2,0]; 465 }, 466 rotate: function(t,i) { 467 var x1 = window.innerWidth/2, 468 tBounds = t.getBoundingClientRect(), 469 x2 = tBounds.left + tBounds.width/2; 470 471 return [x2 < x1 ? 90 : -90,0]; 472 }, 473 scale: [0,1] 474 } 475 }, 476 'Ptah': { 477 itemOverflowHidden: true, 478 sortTargetsFn: function(a,b) { 479 return b.getBoundingClientRect().left - a.getBoundingClientRect().left; 480 }, 481 origin: '100% 0%', 482 animeOpts: { 483 duration: 500, 484 easing: 'easeOutExpo', 485 delay: function(t,i) { 486 return i * 20; 487 }, 488 opacity: { 489 value: [0,1], 490 duration: 400, 491 easing: 'linear' 492 }, 493 rotateZ: [45,0] 494 } 495 }, 496 'Bes': { 497 revealer: true, 498 revealerOrigin: '100% 50%', 499 animeRevealerOpts: {
500 duration: 800, 501 delay: function(t,i) { 502 return i*75; 503 }, 504 easing: 'easeInOutQuart', 505 scaleX: [1,0] 506 }, 507 animeOpts: { 508 duration: 800, 509 easing: 'easeInOutQuart', 510 delay: function(t,i) { 511 return i*75; 512 }, 513 opacity: { 514 value: [0,1], 515 easing: 'linear' 516 }, 517 scale: [0.8,1] 518 } 519 }, 520 'Seker': { 521 revealer: true, 522 revealerOrigin: '50% 100%', 523 animeRevealerOpts: { 524 duration: 500, 525 delay: function(t,i) { 526 return i*50; 527 }, 528 easing: [0.7,0,0.3,1], 529 translateY: [100,0], 530 scaleY: [1,0] 531 }, 532 animeOpts: { 533 duration: 500, 534 easing: [0.7,0,0.3,1], 535 delay: function(t,i) { 536 return i*50; 537 }, 538 opacity: { 539 value: [0,1], 540 duration: 400, 541 easing: 'linear' 542 }, 543 translateY: [100,0], 544 scale: [0.8,1] 545 } 546 }, 547 'Nut': { 548 revealer: true, 549 revealerColor: '#1d1d1d', 550 itemOverflowHidden: true, 551 animeRevealerOpts: { 552 easing: 'easeOutCubic', 553 delay: function(t,i) { 554 return i*100; 555 }, 556 translateX: [ 557 {value: ['101%','0%'], duration: 400 }, 558 {value: ['0%','-101%'], duration: 400} 559 ] 560 }, 561 animeOpts: { 562 duration: 900, 563 easing: 'easeOutCubic', 564 delay: function(t,i) { 565 return 400+i*100; 566 }, 567 opacity: { 568 value: 1, 569 duration: 1, 570 easing: 'linear' 571 }, 572 scale: [0.8,1] 573 } 574 }, 575 'Shu': { 576 lineDrawing: true, 577 animeLineDrawingOpts: { 578 duration: 800, 579 delay: function(t,i) { 580 return i*150; 581 }, 582 easing: 'easeInOutSine', 583 strokeDashoffset: [anime.setDashoffset, 0], 584 opacity: [ 585 {value: [0,1]}, 586 {value: [1,0], duration: 200, easing: 'linear', delay:500} 587 ] 588 }, 589 animeOpts: { 590 duration: 800, 591 easing: [0.2,1,0.3,1], 592 delay: function(t,i) { 593 return i*150 + 800; 594 }, 595 opacity: { 596 value: [0,1], 597 easing: 'linear' 598 }, 599 scale: [0.5,1] 600 } 601 } 602 }; 603}
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.