(window.webpackJsonpLIS=window.webpackJsonpLIS||[]).push([[12],{624:function(t,n,e){"use strict";e.r(n),e.d(n,"ToubizSocialGrid",(function(){return u}));var r=e(94);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,a,c=[],u=!0,l=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;u=!1}else for(;!(u=(r=i.call(e)).done)&&(c.push(r.value),c.length!==n);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return a(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return a(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function c(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,a=void 0,a=function(t,n){if("object"!==o(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,n||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(i,"string"),"symbol"===o(a)?a:String(a)),r)}var i,a}var u=function(){function t(n){var e=this;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.node=n,this.containsFacebookPosts=null!==this.node.querySelector("[data-toubiz-social-grid-facebook-post]"),this.macyInstance=null,this.waitForDependencies().then((function(t){var n=i(t,1)[0].default;e.containsFacebookPosts?FB.Event.subscribe("xfbml.render",(function(){e.initializeView(n)})):e.initializeView(n)})).catch((function(t){console.warn(t)}))}var n,o,a;return n=t,(o=[{key:"onLoaded",value:function(){this.node.classList.add("tb-social-grid--loaded")}},{key:"initializeView",value:function(t){var n=this,e=this.node.querySelector("[data-toubiz-social-grid-items]");if(!e)return console.warn("## ToubizSocialGrid Warning - Masonry Layout not available\n                Container node for social grid items can not be found.\n                Enable masonry by including [data-toubiz-social-grid-items] in your markup."),void this.onLoaded();window.innerWidth<=600?this.onLoaded():(this.macyInstance=new t({container:e,columns:4,waitForImages:!0,margin:16,breakAt:{1024:2,600:1}}),this.macyInstance.on(this.macyInstance.constants.EVENT_IMAGE_COMPLETE,(function(){setTimeout((function(){var t=document.createEvent("HTMLEvents");t.initEvent("resize",!0,!1),window.dispatchEvent(t)}),1e3),n.onLoaded()})))}},{key:"waitForDependencies",value:function(){var t=[e.e(28).then(e.t.bind(null,599,7))];return this.containsFacebookPosts&&t.push(Object(r.c)("https://connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v3.2","fb-sdk")),Promise.all(t)}}])&&c(n.prototype,o),a&&c(n,a),Object.defineProperty(n,"prototype",{writable:!1}),t}()}}]);