{"version":3,"sources":["webpack:///./node_modules/@logitravel/alex-comp-cru/components/main-niches-cru/client/js/index.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/main-niches-cru/client/js/components.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/main-niches-cru/client/js/config.js"],"names":["require","elementExist","_require2","resolveComponents","getClickToCall","module","exports","selector","arguments","length","undefined","element","document","querySelector","config","_objectSpread","dataset","result","JSON","parse","publicPath","__webpack_public_path__","components","map","component","loader","name","_component$type","type","query","concat","filter","observerConfig","root","rootMargin","threshold","observer","IntersectionObserver","entries","forEach","entry","intersectionRatio","target","reduce","acc","then","_entry$target$dataset","default","unobserve","observe","configuration","COMPONENTS","featuredSelections","yearsCards","cardSimpleConfig","resize","width","height","carousel","swiper","slidesPerView","slidesPerGroup","breakpoints","767","992","1200"],"mappings":";8wBAKAA,EAAQ,QAER,IAAQC,EAAiBD,EAAQ,QAAzBC,aAERC,EAA8CF,EAAQ,QAA9CG,EAAiBD,EAAjBC,kBAAmBC,EAAcF,EAAdE,eAM3BC,EAAOC,QAAU,WAAoE,IAA7CC,EAAQC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,iCAC/C,GAAIP,EAAaM,GAAW,CACxB,IAAMI,EAAUC,SAASC,cAAcN,GAEjCO,EAAMC,EAAA,GACJ,WACA,IAAKJ,EAAQK,QAAQF,OAAQ,MAAO,GAEpC,IAAMG,EAASC,KAAKC,MAAMR,EAAQK,QAAQF,QAE1C,OADAH,EAAQK,QAAQF,OAAS,GAClBG,EALP,IAaJH,EAAOM,aAAYC,IAA0BP,EAAOM,YAGxD,IAAME,EAAanB,IACdoB,KAAI,SAAAC,GACD,IAAQC,EAA+BD,EAA/BC,OAAQC,EAAuBF,EAAvBE,KAAIC,EAAmBH,EAAjBI,YAAI,IAAAD,GAAQA,EAC5BE,EAAQD,EAAO,oBAAHE,OAAuBJ,EAAI,kBAAAI,OAAiBF,EAAI,0BAAAE,OAA2BJ,EAAI,M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vB,OAAO,oEA8CHC,KAAM,mBAEV,CACID,OAlIe,WACnB,OAAO,4DAkIHC,KAAM,uBAWdrB,EAAOC,QAAU,CACbH,kBALJ,WACI,OAAOgD,GAKP/C,eApKmB,WACnB,OAAO,8D,mBCCX,IAAMU,EAAS,CACXU,UAAW,gBACXI,KAAM,CACFwB,mBAAoB,sCACpBC,WAAY,+BAEhBC,iBAAkB,CACdC,OAAQ,CACJC,MAAO,IACPC,OAAQ,MAGhBC,SAAU,CACNC,OAAQ,CACJC,cAAe,EACfC,eAAgB,EAGhBC,YAAa,CAETC,IAAK,CACDH,cAAe,EACfC,eAAgB,GAGpBG,IAAK,CACDJ,cAAe,EACfC,eAAgB,GAGpBI,KAAM,CACFL,cAAe,EACfC,eAAgB,OAOpCxD,EAAOC,QAAU,kBAAMQ","file":"main-niches-cru.fdf472be8bf510224347.bundle.js","sourcesContent":["/* ==========================================================================\n MainNichesCru > Client\n ========================================================================== */\n\n/* Import modules */\nrequire('intersection-observer');\n\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\n\nconst { resolveComponents, getClickToCall } = require('./components');\n\n/**\n * MainNichesCru component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function MainNichesCru(selector = '[data-component=MainNichesCru]') {\n if (elementExist(selector)) {\n const element = document.querySelector(selector);\n\n const config = {\n ...(function getConfig() {\n if (!element.dataset.config) return '';\n\n const result = JSON.parse(element.dataset.config);\n element.dataset.config = '';\n return result;\n })()\n };\n\n /**\n * Setting public path to the webpack exposed variable\n */\n /* eslint-disable */\n if (config.publicPath) __webpack_public_path__ = config.publicPath;\n /* eslint-enable */\n\n const components = resolveComponents()\n .map(component => {\n const { loader, name, type = false } = component;\n const query = type ? `[data-component=\"${name}\"][data-type=\"${type}\"]` : `[data-component=\"${name}\"]`;\n\n return {\n loader,\n element: document.querySelector(query)\n };\n })\n .filter(component => component.element);\n\n /* Observer Config */\n const observerConfig = {\n root: null, // avoiding 'root' or setting it to 'null' sets it to default value: viewport\n rootMargin: '0px',\n threshold: 0.15\n };\n\n /**\n * Observer to lazy load modules based on\n * currently viewed components in the viewport\n */\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n if (entry.intersectionRatio > 0) {\n const { loader } = components\n .filter(component => component.element === entry.target)\n .reduce(acc => acc);\n\n /**\n * Init component with its loader and then\n * unobserve from this entry so we dont\n * call the init of the component more\n * than once\n */\n loader().then(module => {\n const { type, component } = entry.target.dataset;\n const query = type\n ? `[data-component=\"${component}\"][data-type=\"${type}\"]`\n : `[data-component=\"${component}\"]`;\n module.default(query);\n observer.unobserve(entry.target);\n });\n }\n });\n }, observerConfig);\n\n components.forEach(component => {\n observer.observe(component.element);\n });\n\n /* ClickToCall */\n getClickToCall().then(module => module.default());\n }\n};\n","const configuration = require('./config');\n\n/**\n * ClickToCall\n */\nconst getClickToCall = () => {\n return import(\n /* webpackChunkName: \"click-to-call\" */\n '@bluekiri/alexandria-contrib-components/components/click-to-call/client/js'\n );\n};\n\n/**\n * MasonryCarousel\n */\nconst getMasonryCarousel = () => {\n return import(\n /* webpackChunkName: \"masonry-carousel\" */\n '@bluekiri/alexandria-contrib-components/components/masonry-carousel/client/js'\n );\n};\n\n/**\n * OtherNiches\n */\nconst getOtherNiches = () => {\n return import(\n /* webpackChunkName: \"carousel-card-simple\" */\n '@bluekiri/alexandria-logitravel/components/carousel-card-simple/client/js'\n );\n};\n\n/**\n * BreadcrumbsIdCru\n */\nconst getBreadcrumbsIdCru = () => {\n return import(\n /* webpackChunkName: \"breadcrumbs-id-cru\" */\n '../../../breadcrumbs-id-cru/client/js'\n );\n};\n\n/**\n * HeaderBanner\n */\nconst getHeaderBanner = () => {\n return import(\n /* webpackChunkName: \"header-banner\" */\n '../../../header-banner/client/js'\n );\n};\n\n/**\n * TextMedia\n */\nconst getTextMedia = () => {\n return import(\n /* webpackChunkName: \"text-media\" */\n '../../../text-media/client/js'\n );\n};\n\n/**\n * ShippingLine\n */\nconst getShippingLine = () => {\n return import(\n /* webpackChunkName: \"shipping-line-rxjs\" */\n '../../../shipping-line-rxjs/client/js'\n );\n};\n\n/**\n * FeaturedSelections\n */\nconst getFeaturedSelections = () => {\n return import(\n /* webpackChunkName: \"card-grid-list\" */\n '../../../card-grid-list/client/js'\n );\n};\n\n/**\n * YearsCards\n */\nconst getYearsCards = () => {\n return import(\n /* webpackChunkName: \"card-grid-list\" */\n '../../../card-grid-list/client/js'\n );\n};\n\n/**\n * NewsletterAgent\n */\nconst getNewsletterAgent = () => {\n return import(\n /* webpackChunkName: \"newsletter-agent\" */\n '../../../newsletter-agent/client/js'\n );\n};\n\n/**\n * SearcherCruises\n */\nconst getSearcherCruises = () => {\n return import(\n /* webpackChunkName: \"searcher-section\" */\n '../../../searcher-section/client/js'\n );\n};\n\n/**\n * Components\n */\nconst COMPONENTS = [\n {\n loader: getBreadcrumbsIdCru,\n name: 'BreadcrumbsIdCru'\n },\n {\n loader: getHeaderBanner,\n name: 'HeaderBanner'\n },\n {\n loader: getMasonryCarousel,\n name: 'MasonryCarousel'\n },\n {\n loader: getTextMedia,\n name: 'TextMedia'\n },\n {\n loader: getShippingLine,\n name: 'ShippingLineRxjs'\n },\n {\n loader: getFeaturedSelections,\n name: 'CardGridList',\n type: configuration().type.featuredSelections\n },\n {\n loader: getYearsCards,\n name: 'CardGridList',\n type: configuration().type.yearsCards\n },\n {\n loader: getNewsletterAgent,\n name: 'NewsletterAgent'\n },\n {\n loader: getSearcherCruises,\n name: 'SearcherSection'\n },\n {\n loader: getOtherNiches,\n name: 'CarouselCardSimple'\n }\n];\n\n/**\n * Resolver components\n */\nfunction resolveComponents() {\n return COMPONENTS;\n}\n\nmodule.exports = {\n resolveComponents,\n getClickToCall\n};\n","/* ==========================================================================\n MainNichesCru > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'MainNichesCru',\n type: {\n featuredSelections: 'main-niches-cru-featured-selections',\n yearsCards: 'main-niches-cru-years-cards'\n },\n cardSimpleConfig: {\n resize: {\n width: 272,\n height: 225\n }\n },\n carousel: {\n swiper: {\n slidesPerView: 5,\n slidesPerGroup: 5,\n\n /* Breakpoints config */\n breakpoints: {\n // when window width is <= 767px\n 767: {\n slidesPerView: 2,\n slidesPerGroup: 2\n },\n // when window width is <= 992px\n 992: {\n slidesPerView: 3,\n slidesPerGroup: 3\n },\n // when window width is <= 1200px\n 1200: {\n slidesPerView: 4,\n slidesPerGroup: 4\n }\n }\n }\n }\n};\n\nmodule.exports = () => config;\n"],"sourceRoot":""}