{"version":3,"file":"grouped-category-97388a91.js","sources":["../../../client/src/javascripts/customer_pages/_grouped-category/calendar-dates.js","../../../client/src/javascripts/customer_pages/_grouped-category/price-and-product-create.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/_common/grouped-category-base.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/calendar-start-date-selector.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/designer.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-comparison.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-nothing-selectable.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-selectors-mixin.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-color-criteron.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-image-criteron.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter-text-criteron.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filter.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/filters.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/button-option.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/button-option-selector.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/button-option-selectors.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/option-selector.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/option-selectors.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-description.jsx","../../../client/src/javascripts/customer_pages/_utils/tools/image-tools.js","../../../client/src/javascripts/customer_pages/_grouped-category/folded-card-product-image.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/metallic-card-product-image.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-image.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-image-thumbnail.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-video.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-images.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-not-available.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/product-flags.jsx","../../../client/src/javascripts/customer_pages/_grouped-category/grouped-category.jsx"],"sourcesContent":["const defaultDates = [\n {\n from: {day: 1, month: 10},\n to: {day: 31, month: 12},\n defaultsTo: { month: 1, year: 1 }\n },\n {\n from: {day: 1, month: 1},\n to: {day: 31, month: 1},\n defaultsTo: { month: 1, year: 0 }\n },\n {\n from: {day: 1, month: 2},\n to: {day: 31, month: 9},\n defaultsTo: { month: 13, year: 0 } // 13 indicates next month\n }\n];\nconst backDates = [{\n from: {day: 1, month: 1},\n to: {day: 30, month: 6},\n earliest: { month: 1, year: 0 }\n }, {\n from: {day: 1, month: 7},\n to: {day: 31, month: 12},\n earliest: { month: 7, year: 0 }\n }\n];\nconst forwardDate = {month: 1, year: 5};\n\nconst CalendarDates = {\n todayDate: new Date(),\n\n getOptions() {\n // Generate Month Options\n const monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n const { earliest } = this.findPeriod(backDates);\n let monthOptions = [];\n for (let i = earliest.year; i <= forwardDate.year; i++) {\n const startMonth = (i === earliest.year) ? earliest.month - 1 : 0;\n const noOfMonths = (i === forwardDate.year) ? forwardDate.month : 12;\n\n for (let j = startMonth; j < noOfMonths; j++) {\n const date = new Date(this.todayDate.getFullYear() + i, j);\n monthOptions.push(\n {\n label: `${ monthNames[date.getMonth()]}, ${ date.getFullYear() }`,\n value: date.getTime()\n }\n );\n }\n }\n\n return monthOptions;\n },\n\n getDefaultValue() {\n // Get Default Starting Date\n const { defaultsTo: { year, month } } = this.findPeriod(defaultDates);\n const defaultMonth = month <= 12 ? month - 1 : this.todayDate.getMonth() + (month - 12);\n const defaultTimeStamp = (new Date(this.todayDate.getFullYear() + year, defaultMonth)).getTime();\n\n return this.getOptions().find((mO) =>\n mO.value === defaultTimeStamp\n );\n },\n findPeriod(periodsArray) {\n return periodsArray.find((period) => {\n return (\n (period.from.month - 1) <= CalendarDates.todayDate.getMonth() &&\n (period.from.day) <= CalendarDates.todayDate.getDate() &&\n (period.to.month - 1) >= CalendarDates.todayDate.getMonth() &&\n (period.to.day) >= CalendarDates.todayDate.getDate()\n );\n }) || periodsArray[0];\n }\n}\n\nexport default CalendarDates;\n","import createReactClass from 'create-react-class';\n'use strict';\n\n// Import Libraries\nimport React from 'react';\nimport classNames from 'classnames';\n// Import JSX Modules\nimport Price from './price';\nimport ProgressButton from '../_utils/progress-button';\n// Import JS Modules\nimport { PrismUI, builderDispatch } from '../_utils/ui';\nimport genericHelpers from '../_utils/generic-helpers';\nimport translate from '../_utils/tools/translate';\nimport Currency from '../_utils/tools/currency';\nimport QuantityPricingTools from './quantity-pricing-tools';\nimport UrlBuilder from '../_utils/url-building';\n\n// -----------------------------------------------------------\n// PriceAndProductCreate\n// -----------------------------------------------------------\nvar PriceAndProductCreate = createReactClass({\n render() {\n if (this.props.products.length === 0)\n return null;\n\n const { product, $price } = (() => {\n if (this.props.products.length === 1) {\n const [product] = this.props.products;\n\n return {\n product,\n $price: this.renderPrice(product, true)\n };\n }\n\n const product = this.productWithMinimumPrice();\n\n return {\n product,\n $price: this.renderPrice(product)\n };\n })();\n\n const $quantityDropdown = (() => {\n if (product.show_quantity_dropdown) {\n return (\n
\n By: \n \n { this.props.name }\n \n
;\n }\n});\n\nexport default Designer;\n","'use strict';\n\n// Import Libraries\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ReactDOMServer from 'react-dom/server';\nimport DeliveryOptionCalculator from \"../_utils/_delivery-options/calculator\";\n// Import JS Modules\n\n// -----------------------------------------------------------\n// FilterComparison\n// -----------------------------------------------------------\nclass FilterComparison extends React.Component {\n\n componentDidMount() {\n if (typeof window !== 'undefined') {\n this.createPopover();\n window.addEventListener('touchend', this.hideFlyoutFromOutsideTouch);\n }\n }\n\n componentWillUnmount() {\n if (typeof window !== 'undefined') {\n window.removeEventListener('touchend', this.hideFlyoutFromOutsideTouch);\n }\n }\n\n render() {\n if (this.props.fields.length && this.props.options.some(o => Object.keys(o.comparison_data).length)) {\n return (\n this.trigger = ref}\n href=\"#\"\n aria-label=\"More information about these options\"\n tabIndex=\"0\"\n role=\"button\"\n onClick={e => e.preventDefault()}>\n \n \n );\n }\n\n return null;\n }\n\n hideFlyoutFromOutsideTouch = (event) => {\n if ($('.popover').length > 0 && $(event.target).closest('.filter-comparison').length === 0) {\n $(ReactDOM.findDOMNode(this.trigger)).popover('hide');\n }\n }\n\n createPopover() {\n if (!this.trigger) {\n return;\n }\n\n const $trigger = $(ReactDOM.findDOMNode(this.trigger));\n\n $trigger.popover({\n container: 'body',\n content: this.popoverHTML,\n html: true,\n placement: 'auto',\n template: ReactDOMServer.renderToString(\n\n {data}\n {this.getDeliveryOptionsIconsForKeys(\n this.deliveryOptionsForFilterField(option),\n this.props.deliveryOptions\n )}\n
\n );\n }\n\n return null;\n }\n\n renderRow(option, field, index) {\n const data = this.comparisonData(option, field);\n\n if (data) {\n return (\n\n {itemThemeTitle}\n {$favoritable}\n
\n {$designer}\n {$page}\n