{"version":3,"sources":["webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/tooltip/index.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/store/reducer.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-rxjs/client/js/config.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/devices.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-rxjs/client/js/index.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/prototype.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/index.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/store/actions.js","webpack:///./node_modules/@logitravel/alex-comp-cru/components/shipping-line-card-rxjs/client/js/config.js"],"names":["toNode","require","markdown","createTooltip","instance","tooltip","config","template","context","concat","title","highlight","items","map","item","content","join","module","exports","addTooltip","panel","node","document","body","appendChild","nodeDom","eventMouse","store","select","innerWidth","window","_eventMouse$currentTa","currentTarget","getBoundingClientRect","bottom","left","right","style","top","offsetWidth","classList","add","setPositionNode","setTimeout","css","visible","destroyTooltip","removeChild","types","initialState","hidden","reducer","state","arguments","length","undefined","action","type","DESTROY","DISPLAY","HOVERIN","_objectSpread","HOVEROUT","SET_MOUSE_POSITION","payload","component","carousel","init","hasPagination","hasLazy","isMulti","swiper","slidesPerView","slidesPerGroup","spaceBetween","breakpoints","991","1200","1400","1500","isTablet","userAgent","navigator","toLowerCase","test","elementExist","Carousel","ShippingLineCard","selector","configuration","element","querySelector","dataset","result","JSON","parse","cards","_toConsumableArray","querySelectorAll","card","index","Store","fromEvent","_require4","actions","_require6","prototype","setupStore","this","prices","setupActions","_this","destroy","dispatch","display","hoverIn","hoverOut","setMousePosition","setupReactions","_this2","reactions","subscribe","unsubscribe","parentNode","Object","keys","forEach","key","remove","_this3","subscriptions","pipe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4BACVE,EAAW,6BAYjB7C,EAAOC,QAAU,CACb8B,MAAO,CACHU,UACAC,UACAC,UACAE,WACAC,mBAjBmB,wCAmBvByC,QAAS,CACLQ,QAjBQ,WAAH,MAAU,CAAEvD,KAAMC,IAkBvBwD,QAjBQ,WAAH,MAAU,CAAEzD,KAAME,IAkBvBwD,QAhBQ,SAAAnD,GAAO,MAAK,CAAEP,KAAMG,EAASI,YAiBrCoD,SAhBS,WAAH,MAAU,CAAE3D,KAAMK,IAiBxBuD,iBAhBiB,SAAArD,GAAO,MAAK,CAAEP,KARZ,uCAQsCO,e,mBCZjE,IAAM1D,EAAS,CACX2D,UAAW,uBACXE,MAAM,EACNvB,IAAK,CACDC,QAAS,cAEb6F,OAAQ,CACJC,MAAO,IACPC,OAAQ,KAIhB3H,EAAOC,QAAU,kBAAMZ","file":"shipping-line.df92cdaf183df373621d.bundle.js","sourcesContent":["/* Modules */\nconst { toNode } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst { markdown } = require('@bluekiri/alexandria/core/ViewHelpers')();\n\n/**\n * Instantiates a tooltip\n * @param {*} instance\n */\nfunction createTooltip(instance) {\n const { config } = instance;\n const template = TooltipTemplate(config.tooltip, config.context);\n\n /* Node */\n const node = toNode(template)[0];\n\n /* Return */\n return node;\n}\n\n/**\n * Requests remotely a tooltip and draws it\n * @param {*} instance\n */\nfunction addTooltip(instance) {\n const panel = instance;\n\n /* Node */\n const node = createTooltip(instance);\n\n /* Add to HTML */\n document.body.appendChild(node);\n\n panel.tooltip = node;\n\n setPositionNode(node, instance);\n\n setTimeout(() => panel.tooltip.classList.add(instance.config.css.visible), 200);\n}\n\nfunction setPositionNode(node, instance) {\n const nodeDom = node;\n\n const { eventMouse } = instance.store.select('prices');\n const { innerWidth } = window;\n const { bottom, left, right } = eventMouse.currentTarget.getBoundingClientRect();\n\n nodeDom.style.top = `${bottom + 16}px`;\n if (right < innerWidth / 2) {\n nodeDom.style.left = `${left}px`;\n } else {\n nodeDom.style.left = `${right - nodeDom.offsetWidth}px`;\n nodeDom.classList.add('arrow-right');\n }\n}\n\n/* Destroy tooltip */\nfunction destroyTooltip(instance) {\n const panel = instance;\n if (panel.tooltip) {\n document.body.removeChild(panel.tooltip);\n }\n}\n\nfunction TooltipTemplate(tooltip) {\n const htmlTooltip = `
\n

${tooltip.title}

\n \n
`;\n\n return htmlTooltip;\n}\n\n/* Exports */\nmodule.exports = {\n addTooltip,\n destroyTooltip\n};\n","/* ==========================================================================\n ShippingLineCardRxjs > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {\n hidden: false,\n eventMouse: {}\n};\n\n/* Reducer */\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return state;\n case types.DISPLAY:\n return {\n ...state,\n hidden: false\n };\n case types.HOVERIN:\n return {\n ...state,\n hidden: false\n };\n case types.HOVEROUT:\n return {\n ...state,\n hidden: true\n };\n case types.SET_MOUSE_POSITION:\n return {\n ...state,\n eventMouse: action.payload\n };\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n ShippingLineRxjs > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'ShippingLineRxjs',\n carousel: {\n init: true,\n hasPagination: true,\n hasLazy: false,\n isMulti: true,\n swiper: {\n init: true,\n // Default parameters\n slidesPerView: 9,\n slidesPerGroup: 3,\n spaceBetween: 20,\n\n // Responsive breakpoints\n breakpoints: {\n // when window width is <= 991px\n 991: {\n slidesPerView: 5\n },\n // when window width is <= 1200px\n 1200: {\n slidesPerView: 6\n },\n // when window width is <= 1600px\n 1400: {\n slidesPerView: 7\n },\n // when window width is <= 1600px\n 1500: {\n slidesPerView: 8\n }\n }\n }\n }\n};\n\nmodule.exports = () => config;\n","function isTablet() {\n const userAgent = navigator.userAgent.toLowerCase();\n /* eslint-disable */\n const isTablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(\n userAgent\n );\n /* eslint-enable */\n return isTablet;\n}\n\nmodule.exports = {\n isTablet\n};\n","/* ==========================================================================\n ShippingLineRxjs > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst Carousel = require('@bluekiri/alexandria-contrib-components/components/carousel-rxjs/client/js');\nconst ShippingLineCard = require('../../../shipping-line-card-rxjs/client/js');\nconst config = require('./config');\n\n/**\n * ShippingLineRxjs component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ShippingLineRxjs(selector = '[data-component=ShippingLineRxjs]', configuration = {}) {\n if (elementExist(selector)) {\n const instance = {};\n\n instance.element = document.querySelector(selector);\n\n instance.selector = selector;\n\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n instance.cards = [\n ...instance.element.querySelectorAll(`${selector} [data-component=\"ShippingLineCardRxjs\"]`)\n ].map((card, index) =>\n ShippingLineCard(`${selector} [data-component=\"ShippingLineCardRxjs\"][data-type=\"shipping-line-${index}\"]`)\n );\n\n instance.carousel = Carousel(`${selector} [data-component=\"CarouselRxjs\"]`, instance.config.carousel);\n\n return instance;\n }\n};\n","/* ==========================================================================\n ShippingLineCardRxjs > Prototype\n ========================================================================== */\n\n/* Modules */\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\n\nconst { fromEvent } = require('rxjs');\nconst { map } = require('rxjs/operators');\n\nconst { types, actions } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\nconst { addTooltip, destroyTooltip } = require('./tooltip');\n\nconst { isTablet } = require('./devices');\n\nconst prototype = {\n setupStore() {\n if (this.store) return this;\n\n this.store = new Store({\n prices: reducer\n });\n\n return this;\n },\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => {\n return this.store.dispatch(actions.destroy());\n },\n display: () => {\n return this.store.dispatch(actions.display());\n },\n hoverIn: payload => {\n return this.store.dispatch(actions.hoverIn(payload));\n },\n hoverOut: () => {\n return this.store.dispatch(actions.hoverOut());\n },\n setMousePosition: payload => {\n return this.store.dispatch(actions.setMousePosition(payload));\n }\n };\n\n return this;\n },\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Unsubscribe */\n this.unsubscribe();\n\n /* Remove from DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean reactions */\n [...Object.keys(this.reactions)].forEach(key => this.reactions[key].unsubscribe());\n\n /* Clean instance */\n [...Object.keys(this)].forEach(key => delete this[key]);\n }),\n display: this.store.subscribe((state, action) => {\n if (action.type !== types.DISPLAY) return;\n\n const { css } = this.config;\n this.element.classList.remove(css.hidden);\n }),\n hoverIn: this.store.subscribe((state, action) => {\n if (action.type !== types.HOVERIN) return;\n\n addTooltip(this);\n }),\n hoverOut: this.store.subscribe((state, action) => {\n if (action.type !== types.HOVEROUT) return;\n\n destroyTooltip(this);\n })\n };\n\n return this;\n },\n subscribe() {\n if (this.subscriptions) this.unsubscribe();\n\n this.subscriptions = {\n hoverIn: !isTablet()\n ? fromEvent(this.element, 'mouseenter')\n .pipe(map(event => event))\n .subscribe(position => {\n /* Setting mouse position */\n this.actions.setMousePosition(position);\n /* Dispatch action */\n this.actions.hoverIn(this.element);\n })\n : false,\n hoverOut: !isTablet()\n ? fromEvent(this.element, 'mouseleave').subscribe(() => {\n /* Dispatch action */\n this.actions.hoverOut();\n })\n : false\n };\n\n return this;\n },\n unsubscribe() {\n if (!this.subscriptions) return this;\n\n [...Object.keys(this.subscriptions)].forEach(key => this.subscriptions[key].unsubscribe());\n\n return this;\n },\n /* Init */\n init() {\n if (!this.config.init) return this;\n\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n /* Subscribe */\n this.subscribe();\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/* ==========================================================================\n ShippingLineCardRxjs > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst Image = require('@bluekiri/alexandria-contrib-components/components/image-rxjs/client/js');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * ShippingLineCardRxjs component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ShippingLineCardRxjs(selector = '[data-component=ShippingLineCardRxjs]', configuration = {}) {\n if (elementExist(selector)) {\n const instance = Object.create(prototype);\n\n instance.element = document.querySelector(selector);\n\n instance.selector = selector;\n\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n instance.image = Image(`${selector} [data-component=\"ImageRxjs\"]`);\n\n if (instance.config.init) instance.init();\n\n return instance;\n }\n};\n","/* ==========================================================================\n ShippingLineCardRxjs > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'SHIPPINGLINECARD::DESTROY';\nconst DISPLAY = 'SHIPPINGLINECARD::DISPLAY';\n\n/* Calendar events */\nconst HOVERIN = 'SHIPPINGLINECARD::HOVERIN';\nconst HOVEROUT = 'SHIPPINGLINECARD::HOVEROUT';\nconst SET_MOUSE_POSITION = 'SHIPPINGLINECARD::SET_MOUSE_POSITION';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\nconst display = () => ({ type: DISPLAY });\n\nconst hoverIn = payload => ({ type: HOVERIN, payload });\nconst hoverOut = () => ({ type: HOVEROUT });\nconst setMousePosition = payload => ({ type: SET_MOUSE_POSITION, payload });\n\n/* Exports */\nmodule.exports = {\n types: {\n DESTROY,\n DISPLAY,\n HOVERIN,\n HOVEROUT,\n SET_MOUSE_POSITION\n },\n actions: {\n destroy,\n display,\n hoverIn,\n hoverOut,\n setMousePosition\n }\n};\n","/* ==========================================================================\n ShippingLineCardRxjs > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'ShippingLineCardRxjs',\n init: true,\n css: {\n visible: 'is-visible'\n },\n resize: {\n width: 140,\n height: 38\n }\n};\n\nmodule.exports = () => config;\n"],"sourceRoot":""}