{"version":3,"sources":["webpack:///./Scripts/constants.js","webpack:///./Scripts/Models/CheckoutConstants.js","webpack:///./Scripts/Components/Cart.js","webpack:///./Scripts/Components/Checkout.PrivateCustomerInfo.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerInfo.js","webpack:///./Scripts/Components/Checkout.DeliveryMethods.js","webpack:///./Scripts/Components/Checkout.PaymentMethods.js","webpack:///./Scripts/Components/Payments/PaymentWidget.js","webpack:///./Scripts/Components/Checkout.SalesOrderCustomerInfo.js","webpack:///./Scripts/Containers/Checkout.container.js"],"names":["window","__litium","orderType","Cart","props","state","editingQuantity","removingRow","rowSystemId","quantity","this","setState","previousState","Math","abs","showDeleteButton","currentQuantity","originalQuantity","comments","IsMaximumOfOneAllowed","IsMandatory","updateOrderRowQuantity","then","onQuantityChange","undefined","isSuperBuilder","superBuilderItems","rowIds","v","removeOrderRows","removeOrderRow","orderRows","className","length","order","cartOrder","parentItem","key","href","url","src","image","name","stockStatus","StockStatus","data","options","option","index","articleNumber","value","onClick","handleUpdateClick","packagingQuantity","campaignPrice","totalOrdinaryPrice","totalPrice","subVariants","translate","YourSelections","sections","fromCart","configOrderRows","row","JSON","parse","superBuilderBundleId","renderCart","superBuilderParentOrderRows","Component","CheckoutPrivateCustomerInfo","customerDetails","alternativeAddress","signUp","authenticated","onChange","onSignUpChange","setCountry","errors","input","cssClass","stateKey","id","autoComplete","placeholder","type","htmlFor","toLowerCase","event","target","data-error-for","country","disabled","constants","countries","text","checked","showAlternativeAddress","CheckoutBusinessCustomerInfo","companyAddresses","companyName","selectedCompanyAddressId","setSelectedCompanyAddress","selectedAddress","address","systemId","getCountry","addressCountry","zipCode","city","CheckoutDeliveryMethods","deliveryMethods","selectedId","method","formattedPrice","description","CheckoutPaymentMethods","paymentMethods","onCampaignCodeChange","onSubmitCampaignCode","scriptPattern","scriptFilePattern","PaymentWidget","responseString","renderWidget","paymentSession","WidgetCheckout","DynamicComponent","loader","args","extractScripts","executeScript","includeScript","domString","matches","html","scripts","scriptFiles","exec","replace","push","domId","scriptContent","script","document","createElement","appendChild","createTextNode","e","getElementById","srciptUrl","PureComponent","CheckoutSalesOrderCustomerInfo","orderTypes","checkout","payload","orderTypeRadioButtons","responsiveness","desktopbig","breakpoint","max","min","items","slidesToSlide","desktop","tabletakward","tablet","mobilebig","mobile","privateCustomerAdditionalDetailsSchema","object","shape","acceptTermsOfCondition","boolean","required","oneOf","selectedDeliveryMethod","string","privateCustomerAddressSchema","email","phoneNumber","mixed","notOneOf","lastName","firstName","privateCustomerAlternativeAddressSchema","businessCustomerDetailsSchema","salesOrderCustomerDetailsSchema","CheckoutContainer","selectedPaymentMethod","setPayment","onCustomerDetailsChange","pushCheckoutEvent","isBusinessCustomer","notCustomerDetailFields","onError","error","addressPath","path","submitError","submitRequest","validate","submit","checkAltAddress","cart","dangerouslySetInnerHTML","__html","continueShoppingMessage","paymentWidget","orderNote","checkoutMode","isChangeable","renderCartSection","renderCartSummary","relatedProducts","MultiCarousel","itemType","add","responsivestyle","seoTitle","seoText","soExternalLink","displayDeliveryMethods","renderDeliveryMethodsSection","isDanishSite","renderPaymentMethodsSection","verify","renderCustomerDetailsSection","isSubmitting","placeOrder","prevProps","result","redirectUrl","location","errorKeys","errorNode","querySelector","inputNode","parentElement","focus","scrollIntoView","behavior","newsLetterEnabled","messageToCustomer","createNewCustomer","orderTotal","totalOrderRowDiscount","class","vat","deliveryCost","campaignCode","campaignDiscount","grandTotal","FeatureList","setCustomerMessage","substring","submitCustomerMessage","messageAddedSuccess","setNewsLetter","showCampaignEntry","spellCheck","setCampaignCode","submitCampaignCode","campaignApplied","privateCustomerInfoComponent","businessCustomerInfoComponent","salesOrderCustomerInfoComponent","loginUrl","both","setBusinessCustomer","companyCustomers","setDelivery","hideComments","onBlur","discount","connect","dispatch","code","setOrderNote","note","accept","orderId","setSignUp","setHideComments","submitDone","companyAddressId","propName","setCustomerDetails","setAlternativeAddress","setCheckout","rowId","reloadPayment"],"mappings":"2FAAeA,WAAOC,S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GAC5C,OAAQ+B,GACN,IAAK,kBACHmM,EAASW,aAAmBD,EAAU5O,IACtC,MACF,IAAK,qBACHkO,EAASY,aAAsBF,EAAU5O,IACzC,MACF,IAAK,YACHkO,EAASa,aAAY/O,MAK3B7B,uBAAwB,SAAC6Q,EAAOzR,GAAR,OACtB2Q,EAAS/P,aAAuB,CAAC6Q,GAAQzR,IAAWa,MAAK,kBACvD8P,EAASe,oBAEbrQ,eAAgB,SAACoQ,GAAD,OACdd,EAAS/P,aAAuB,CAAC6Q,GAAQ,IAAI5Q,MAAK,kBAChD8P,EAASe,oBAEbtQ,gBAAiB,SAACF,GAAD,OACfyP,EAAS/P,aAAuBM,EAAQ,IAAIL,MAAK,kBAC/C8P,EAASe,oBAEbnG,kBAAmB,SAACxG,GAAD,OAAW4L,EAASpF,aAAkBxG,QAI9C2L,CAA6CvF","file":"5.4282398c31f3ff0d8d8f.js","sourcesContent":["export default window.__litium.constants;","export const orderType = {\r\n    standard: 'standard',\r\n    salesOrder: 'salesOrder',\r\n    salesQuote: 'salesQuote',\r\n }\r\n ","import React, { Component, Fragment } from 'react';\r\nimport StockStatus from './StockStatus';\r\nimport YourSelections from './YourSelections'\r\nimport { translate } from '../Services/translation';\r\n\r\nclass Cart extends Component {\r\n  constructor(props) {\r\n    super(props);\r\n    this.state = {\r\n      editingQuantity: {},\r\n      removingRow: {},\r\n    };\r\n  }\r\n\r\n  onQuantityChange(rowSystemId, quantity) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      editingQuantity: {\r\n        ...previousState.editingQuantity,\r\n        [rowSystemId]: Math.abs(quantity), // The quantity should be a positive number\r\n      }\r\n    }));\r\n  }\r\n\r\n  onDeleteRequest(rowSystemId, showDeleteButton) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      removingRow: {\r\n        ...previousState.removingRow,\r\n        [rowSystemId]: showDeleteButton,\r\n      }\r\n    }));\r\n  }\r\n\r\n  handleUpdateClick(rowSystemId, currentQuantity, originalQuantity, comments) {\r\n    if (currentQuantity == originalQuantity) {\r\n      return;\r\n    }\r\n    if (comments) {\r\n      if (comments.IsMaximumOfOneAllowed) return;\r\n      if (comments.IsMandatory && currentQuantity < 1) return;\r\n    }\r\n\r\n    this.props.updateOrderRowQuantity(rowSystemId, currentQuantity)\r\n      .then(() => this.onQuantityChange(rowSystemId, undefined));\r\n  }\r\n\r\n  removeOrderRow(rowSystemId, isSuperBuilder = false, superBuilderItems) {\r\n    if (isSuperBuilder) {\r\n      var rowIds = superBuilderItems.map(v => v.rowSystemId);\r\n      this.props.removeOrderRows(rowIds);\r\n    }\r\n    else {\r\n      this.props.removeOrderRow(rowSystemId);\r\n    }\r\n  }\r\n\r\n  renderCart(orderRows, isSuperBuilder = false) {\r\n    return <ul className=\"checkout-cart\">\r\n      {orderRows && orderRows.length > 0 && orderRows.map(order => {\r\n        var cartOrder = isSuperBuilder ? order.parentItem : order;\r\n        return <li key={cartOrder.rowSystemId}>\r\n          <div>\r\n            <div className=\"cart-item\" >\r\n              <div className=\"cart-item__thumb-container\">\r\n                <a href={cartOrder.url}>\r\n                  <img className=\"cart-item__thumb\" src={cartOrder.image} /*alt={order.name}*/ />\r\n                </a>\r\n              </div>\r\n              <div className=\"cart-item__content\">\r\n                <div className=\"cart-item_section\">\r\n                  <div>\r\n                    <h3 className=\"cart-item__name\"><a href={cartOrder.url}>{cartOrder.name}</a></h3>\r\n                    {cartOrder.stockStatus && <StockStatus data={cartOrder.stockStatus}></StockStatus>}\r\n                    {(cartOrder.options && cartOrder.options.length > 0) &&\r\n                      <details className=\"ti-accordion ti-accordion--inline ti-accordion--super-small\">\r\n                        <summary>\r\n                          Se mina val\r\n                        </summary>\r\n                        <ul className=\"cart-item__list\">\r\n                          {cartOrder.options.map((option, index) => {\r\n                            return <li key={option.articleNumber + \"-\" + index}>\r\n                              {option.name !== '' &&\r\n                                <span>{option.name}:</span>} {option.quantity != \"\" ? option.quantity + \" x \" : \"\"} {option.value}\r\n                            </li>\r\n                          })}\r\n                        </ul>\r\n                      </details>\r\n                    }\r\n                  </div>\r\n                </div>\r\n                {!isSuperBuilder && <div className=\"cart-item_section cart-change-quantity\">\r\n                  <a className=\"cart-change-quantity__minus\" onClick={() => this.handleUpdateClick(cartOrder.rowSystemId, cartOrder.quantity - (cartOrder.packagingQuantity > 0 ? cartOrder.packagingQuantity : 1), cartOrder.quantity)}>\r\n                    <svg className={`${cartOrder.quantity === 1 ? 'cart-change-quantity__remove' : ''}`}>\r\n                      {cartOrder.quantity === 1 ? (\r\n                        <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#trashcan\"></use>\r\n                      ) : (\r\n                        <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#minus\"></use>\r\n                      )}\r\n                    </svg>\r\n                  </a>\r\n                  <span className=\"cart-change-quantity__display\">{cartOrder.quantity}</span>\r\n                  <a className=\"cart-change-quantity__plus\" onClick={() => this.handleUpdateClick(cartOrder.rowSystemId, cartOrder.quantity +\r\n                    (cartOrder.packagingQuantity > 0 ? cartOrder.packagingQuantity : 1), cartOrder.quantity)}>\r\n                    <svg>\r\n                      <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#plus\"></use>\r\n                    </svg>\r\n                  </a>\r\n                </div>}\r\n                <div className=\"cart-item__section cart-price\">\r\n                  {cartOrder.campaignPrice ? (\r\n                    <Fragment>\r\n                      <div className=\"cart-price__original\">{cartOrder.totalOrdinaryPrice}</div>\r\n                      <div className=\"cart-price__current\">{cartOrder.totalPrice}</div>\r\n                    </Fragment>\r\n                  ) : (\r\n                    <Fragment>\r\n                      <span className=\"cart-price__current\">{cartOrder.totalPrice}</span>\r\n                    </Fragment>\r\n                  )}\r\n                </div>\r\n                <div className=\"cart-item__section\">\r\n                  <a className=\"cart-remove-row\" onClick={() => this.removeOrderRow(cartOrder.rowSystemId, isSuperBuilder, order.subVariants)}>\r\n                    <svg>\r\n                      <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#close\"></use>\r\n                    </svg>\r\n                  </a>\r\n                </div>\r\n              </div>\r\n            </div>\r\n            {isSuperBuilder && <div className=\"cart_your-selection_container\">\r\n              <div className=\"cart_your-selection_container_sub\">\r\n                <div className=\"cart-selector__name\">\r\n                  <span>{translate('yourselection.header')}</span>\r\n                </div>\r\n                <YourSelections sections={order.subVariants} fromCart={true} onQuantityChange={(rowSystemId, currentQuantity, originalQuantity, comments) => this.handleUpdateClick(rowSystemId, currentQuantity, originalQuantity, comments)}></YourSelections>\r\n              </div>\r\n            </div>}\r\n          </div>\r\n        </li>\r\n      })}\r\n    </ul>\r\n  }\r\n\r\n  render() {\r\n    const configOrderRows = this.props.orderRows.filter(function (row) {\r\n      if (!row.comments) return true;\r\n      var superBuilderBundleId = JSON.parse(row.comments).superBuilderBundleId;\r\n      if (!superBuilderBundleId)\r\n        return true;\r\n    });\r\n    return <div>\r\n      {this.renderCart(this.props.superBuilderParentOrderRows, true)}\r\n      {this.renderCart(configOrderRows, false)}\r\n    </div>\r\n  }\r\n}\r\nexport default Cart;","import React from 'react';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutPrivateCustomerInfo = (props) => {\r\n    const { customerDetails = {}, alternativeAddress = {}, signUp, authenticated, onChange, onSignUpChange, setCountry, errors = {} } = props;\r\n    const input = (cssClass, stateKey, id, autoComplete = 'on', placeholder = null, type = 'text') => (\r\n        <div className={cssClass}>\r\n            <label className=\"form__label\" htmlFor={`${stateKey}-${id}`}>{translate(`checkout.customerinfo.${id.toLowerCase()}`)}&#8203;</label>\r\n            <input className=\"form__input\" id={`${stateKey}-${id}`} name={`${stateKey}-${id}`} type={type}\r\n                value={(props[stateKey] || {})[id] || ''} placeholder={placeholder} autoComplete={autoComplete}\r\n                onChange={(event) => onChange(stateKey, id, event.target.value)}/>\r\n            {errors[`${stateKey}-${id}`] &&\r\n                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for={`${stateKey}-${id}`}>{errors[`${stateKey}-${id}`][0]}</span>\r\n            }\r\n        </div>\r\n    );\r\n    return (\r\n        <div className=\"row checkout-info__container\">\r\n            <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns checkout-info__placeholder-container\">\r\n                    </div>\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'firstName', 'billing given-name')}\r\n                    {input('small-6 columns', 'customerDetails', 'lastName', 'billing family-name')}\r\n                    {input('small-12 columns', 'customerDetails', 'careOf')}\r\n                    {input('small-12 columns', 'customerDetails', 'address', 'billing street-address')}\r\n                    {input('small-6 columns', 'customerDetails', 'zipCode', 'billing postal-code')}\r\n                    {input('small-6 columns', 'customerDetails', 'city', 'billing address-level2')}\r\n                    <div className=\"small-12 columns\">\r\n                        <label className=\"form__label\" htmlFor=\"country\">{translate('checkout.customerinfo.country')}</label>\r\n                        <select className=\"form__input\" id=\"country\" value={customerDetails.country}\r\n                            onChange={(event) => { onChange('customerDetails', 'country', event.target.value); onChange('alternativeAddress', 'country', event.target.value); setCountry(event.target.value) }}>\r\n                            <option value='' disabled>{translate('checkout.customerinfo.country.placeholder')}</option>\r\n                            {constants.countries && constants.countries.map(({text, value,}) =>\r\n                                <option value={value} key={`country-${value}`}>{text}</option>\r\n                            )}\r\n                        </select>\r\n                    </div>\r\n                    {input('small-12 columns', 'customerDetails', 'phoneNumber', 'billing tel')}\r\n                </div>\r\n            </div>\r\n            <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">\r\n                        <input \r\n                            className=\"checkout-info__checkbox-input\"\r\n                            type=\"checkbox\"\r\n                            id=\"showAlternativeAddress\"\r\n                            name=\"showAlternativeAddress\"\r\n                            checked={alternativeAddress.showAlternativeAddress || false}\r\n                            onChange={(event) => onChange('alternativeAddress', 'showAlternativeAddress', event.target.checked)} \r\n                        />\r\n                        <label className=\"checkout-info__checkbox-label\" htmlFor=\"showAlternativeAddress\">\r\n                            {translate('checkout.customerinfo.showAlternativeAddress')}\r\n                        </label>\r\n                    </div>\r\n                </div>\r\n                {alternativeAddress.showAlternativeAddress && (<div className=\"row-inner\">\r\n                    {input('small-6 columns', 'alternativeAddress', 'firstName', 'shipping given-name')}\r\n                    {input('small-6 columns', 'alternativeAddress', 'lastName', 'shipping family-name')}\r\n                    {input('small-12 columns', 'alternativeAddress', 'careOf')}\r\n                    {input('small-12 columns', 'alternativeAddress', 'address', 'shipping street-address')}\r\n                    {input('small-6 columns', 'alternativeAddress', 'zipCode', 'shipping postal-code')}\r\n                    {input('small-6 columns', 'alternativeAddress', 'city', 'shipping address-level2')}\r\n                    <div className=\"small-12 columns\">\r\n                        <label className=\"form__label\" htmlFor=\"country2\">{translate('checkout.customerinfo.country')}</label>\r\n                        <select className=\"form__input\" id=\"country2\" value={customerDetails.country}\r\n                            onChange={(event) =>{ onChange('alternativeAddress', 'country', event.target.value); onChange('customerDetails', 'country', event.target.value); setCountry(event.target.value) }}>\r\n                            <option value='' disabled>{translate('checkout.customerinfo.country.placeholder')}</option>\r\n                            {constants.countries && constants.countries.map(({text, value}) =>\r\n                                <option value={value} key={`country2-${value}`}>{text}</option>\r\n                            )}\r\n                        </select>\r\n                    </div>\r\n                    {input('small-12 columns', 'alternativeAddress', 'phoneNumber', 'shipping tel')}\r\n                </div>)}\r\n            </div>\r\n            <div className=\"small-12 columns\">\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'email', 'email')}\r\n                </div>\r\n            </div>\r\n            {!authenticated && (<div className=\"small-12 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">\r\n                        <input className=\"checkout-info__checkbox-input\" type=\"checkbox\" id=\"signupandlogin\" \r\n                            checked={signUp}\r\n                            onChange={(event) => onSignUpChange(event.target.checked)}/>\r\n                        <label className=\"checkout-info__checkbox-label\" htmlFor=\"signupandlogin\">\r\n                            {translate('checkout.customerinfo.signupandlogin')}\r\n                        </label>\r\n                    </div>\r\n                </div>\r\n            </div>)}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutPrivateCustomerInfo;","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\nimport constants from '../constants';\r\n\r\nconst CheckoutBusinessCustomerInfo = (props) => {\r\n    const { companyAddresses = [], companyName, authenticated, selectedCompanyAddressId, onChange, setSelectedCompanyAddress, errors = {} } = props;\r\n    const input = (cssClass, stateKey, id, autoComplete = null, placeholder = null, type = 'text') => (\r\n        <div className={cssClass}>\r\n            <label className=\"form__label\" htmlFor={`${stateKey}-${id}`}>{translate(`checkout.customerinfo.${id.toLowerCase()}`)}&#8203;</label>\r\n            <input className=\"form__input\" disabled={!authenticated} id={`${stateKey}-${id}`} name={`${stateKey}-${id}`} type={type}\r\n                value={(props[stateKey] || {})[id] || ''} placeholder={placeholder} autoComplete={autoComplete}\r\n                onChange={(event) => onChange(stateKey, id, event.target.value)}/>\r\n            {errors[`${stateKey}-${id}`] &&\r\n                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for={`${stateKey}-${id}`}>{errors[`${stateKey}-${id}`][0]}</span>\r\n            }\r\n        </div>\r\n    );\r\n    const selectedAddress = selectedCompanyAddressId && companyAddresses ? companyAddresses.find(address => address.systemId === selectedCompanyAddressId) : null;\r\n    const getCountry = (address) => {\r\n        const addressCountry = constants.countries ? constants.countries.find(country => country.value === address.country) : null;\r\n        return addressCountry ? addressCountry.text : address.country;\r\n    };\r\n    return (\r\n        <div className=\"row checkout-info__container\">\r\n            <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">{translate('checkout.customerinfo.reference')}</div>\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'firstName', 'billing given-name')}\r\n                    {input('small-6 columns', 'customerDetails', 'lastName', 'billing family-name')}\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-12 columns', 'customerDetails', 'phoneNumber', 'billing tel')}\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'email', 'email')}\r\n                </div>\r\n            </div>\r\n            <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">{translate('checkout.customerinfo.address')}</div>\r\n                    <div className=\"small-12 columns\">\r\n                        <label className=\"form__label\" htmlFor=\"address\">&#8203;</label>\r\n                        <select className=\"form__input\" value={selectedCompanyAddressId || ''} disabled={!authenticated}\r\n                            onChange={(event) => setSelectedCompanyAddress(event.target.value, companyAddresses.find(address => address.systemId === event.target.value).country)}>\r\n                            <option value='' disabled>{translate('checkout.customerinfo.companyaddress.placeholder')}</option>\r\n                            {companyAddresses && companyAddresses.map((address) =>\r\n                                <option value={address.systemId} key={`companyAddress-${address.systemId}`}>{`${address.address}, ${address.zipCode}, ${address.city}, ${getCountry(address)}`}</option>\r\n                            )}\r\n                        </select>\r\n                        {errors['selectedCompanyAddressId'] &&\r\n                            <span className=\"form__validator--error form__validator--top-narrow\" data-error-for='selectedCompanyAddressId'>{errors['selectedCompanyAddressId'][0]}</span>\r\n                        }\r\n                    </div>\r\n                </div>\r\n                { selectedAddress &&\r\n                    <div className=\"row-inner\">\r\n                        <div className=\"small-12 columns\">{companyName}</div>\r\n                        <div className=\"small-12 columns\">{selectedAddress.address}</div>\r\n                        <div className=\"small-12 columns\">\r\n                            <span>{selectedAddress.zipCode}</span>&nbsp;\r\n                            <span>{selectedAddress.city}</span>\r\n                        </div>\r\n                        <div className=\"small-12 columns\">{getCountry(selectedAddress)}</div>\r\n                    </div>\r\n                }\r\n            </div>\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutBusinessCustomerInfo;","import React from 'react';\r\n\r\nconst CheckoutDeliveryMethods = ({ deliveryMethods, selectedId, onChange }) => (\r\n    <ul className=\"shipping-option-list\">\r\n        { deliveryMethods && deliveryMethods.map(method => (\r\n            <li key={method.id}>\r\n                <div className=\"shipping-option\">\r\n                    <div>\r\n                        <input id={method.id} type=\"radio\" name=\"deliveryMethods\" checked={method.id === selectedId} value={method.id} onChange={() => onChange(method.id)} />\r\n                        <label htmlFor={method.id}>\r\n                            <svg className='shipping-option__svg'>\r\n                                <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#checked\"></use>\r\n                            </svg>\r\n                        </label>\r\n                    </div>\r\n                    <div className=\"shipping-option__info\">\r\n                        <h3 className=\"section-header section-header--small section-header--slim\">{method.name}<span>{method.formattedPrice}</span></h3>\r\n                        <details className=\"ti-accordion ti-accordion--small ti-accordion--inline ti-accordion--faded\">\r\n                            <summary>\r\n                            Läs mer\r\n                            </summary>\r\n                            <div>\r\n                                {method.description}\r\n                            </div>\r\n                        </details>\r\n                    </div>\r\n                </div>\r\n            </li>\r\n        ))}\r\n    </ul>\r\n)\r\n\r\nexport default CheckoutDeliveryMethods;","import React from 'react';\r\n\r\nconst CheckoutPaymentMethods = ({ paymentMethods, selectedId, onChange, onCampaignCodeChange, onSubmitCampaignCode, errors }) => (\r\n    <ul className=\"payment-option-list\">\r\n        {paymentMethods && paymentMethods.map(method => {\r\n            return <li key={method.id}>\r\n                <div className=\"shipping-option\">\r\n                    <div>\r\n                        <input id={method.id} type=\"radio\" name=\"paymentMethods\" checked={method.id === selectedId} value={method.id}\r\n                            onChange={() => onChange(method.id)} />\r\n                        <label htmlFor={method.id} className={method.id.indexOf(\"Klarna\") > -1 ? \"payment-method__klarna\" : \"payment-method__nets\"}>\r\n                            <svg className='shipping-option__svg'>\r\n                                <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#checked\"></use>\r\n                            </svg>\r\n                        </label>\r\n                    </div>\r\n                    <div className=\"shipping-option__info\">\r\n                        <h3 className=\"section-header section-header--small section-header--slim\">{method.name}</h3>\r\n                    </div>\r\n                </div>\r\n            </li>}\r\n        )}\r\n    </ul>\r\n)\r\n\r\nexport default CheckoutPaymentMethods;","import React, { PureComponent } from 'react';\r\nimport DynamicComponent from '../DynamicComponent';\r\nconst scriptPattern = /<script\\b[^>]*>([\\s\\S]*?)<\\/script>/gi;\r\nconst scriptFilePattern = /<script.*?src=[\"'](.*?)[\"']/gi;\r\n\r\nclass PaymentWidget extends PureComponent {\r\n    render() {\r\n        const { id, responseString } = this.props;\r\n        return this.renderWidget(responseString);\r\n    }\r\n\r\n    renderWidget(paymentSession) {\r\n        const WidgetCheckout = DynamicComponent({\r\n            loader: () => import('./CheckoutWidget')\r\n        });\r\n        const args = { \r\n            paymentSession,\r\n            extractScripts: this.extractScripts,\r\n            executeScript: this.executeScript,\r\n            includeScript: this.includeScript\r\n        };\r\n        return (\r\n            <WidgetCheckout { ...args } />\r\n        );\r\n    }\r\n\r\n    extractScripts(domString) {\r\n        let matches, html = domString;\r\n        const scripts = [], scriptFiles = [];\r\n        while ((matches = scriptPattern.exec(domString)) !== null) {\r\n            html = html.replace(matches[0], '');\r\n            matches[1] && matches[1].trim() !== '' && scripts.push(matches[1]);\r\n        }\r\n        while ((matches = scriptFilePattern.exec(domString)) !== null) {\r\n            matches[1] && matches[1].trim() !== '' && scriptFiles.push(matches[1]);\r\n        }\r\n        \r\n        return {\r\n            html,\r\n            scripts,\r\n            scriptFiles,\r\n        };\r\n    }\r\n\r\n    executeScript(domId, scriptContent) {\r\n        const script = document.createElement(\"script\");\r\n        script.type = \"text/javascript\";\r\n        try {\r\n            script.appendChild(document.createTextNode(scriptContent));      \r\n        } catch(e) {\r\n            // to support IE\r\n            script.text = scriptContent;\r\n        }\r\n        document.getElementById(domId).appendChild(script);\r\n    }\r\n\r\n    includeScript(domId, srciptUrl) {\r\n        const script = document.createElement(\"script\");\r\n        script.type = \"text/javascript\";\r\n        script.src = srciptUrl;\r\n        document.getElementById(domId).appendChild(script);\r\n    }\r\n}\r\n\r\nexport default PaymentWidget;","import React from 'react';\r\nimport constants from '../constants';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutSalesOrderCustomerInfo = (props) => {\r\n    const orderTypes = { salesOrder: 'salesOrder', salesQuote: 'salesQuote' };\r\n    const { checkout, customerDetails = {}, alternativeAddress = {}, signUp, authenticated, onChange, onSignUpChange, setCountry, errors = {} } = props;\r\n    const input = (cssClass, stateKey, id, autoComplete = 'on', placeholder = null, type = 'text') => (\r\n        <div className={cssClass}>\r\n            <label className=\"form__label\" htmlFor={`${stateKey}-${id}`}>{translate(`checkout.customerinfo.${id.toLowerCase()}`)}&#8203;</label>\r\n            <input className=\"form__input\" id={`${stateKey}-${id}`} name={`${stateKey}-${id}`} type={type}\r\n                value={(props[stateKey] || {})[id] || ''} placeholder={placeholder} autoComplete={autoComplete}\r\n                onChange={(event) => onChange(stateKey, id, event.target.value)}/>\r\n            {errors[`${stateKey}-${id}`] &&\r\n                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for={`${stateKey}-${id}`}>{errors[`${stateKey}-${id}`][0]}</span>\r\n            }\r\n        </div>\r\n    );\r\n    const orderTypeRadioButtons = (cssClass, stateKey, id, placeholder = null) => (\r\n        <div className={cssClass}>\r\n            <label className=\"form__label\" htmlFor={`${stateKey}-${id}`}>{translate(`checkout.payload.${id.toLowerCase()}`)}&#8203;</label>            \r\n                <input type=\"radio\"\r\n                        value={orderTypes['salesOrder']} \r\n                        checked={orderTypes['salesOrder'] === props.checkout.payload.orderType || props.checkout.payload.orderType == undefined} \r\n                        onChange={() => onChange(stateKey, id, 'salesOrder')} />\r\n                        <span className=\"columns\">\r\n                        {translate('checkout.ordertype.salesorder')}\r\n                        </span> \r\n                        <input type=\"radio\"\r\n                        value={orderTypes['salesQuote']} \r\n                        checked={orderTypes['salesQuote'] === props.checkout.payload.orderType} \r\n                        onChange={() => onChange(stateKey, id, 'salesQuote')} /> \r\n                        <span className=\"columns\">\r\n                        {translate('checkout.ordertype.salesquote')}\r\n                        </span>               \r\n            {errors[`${stateKey}-${id}`] &&\r\n                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for={`${stateKey}-${id}`}>{errors[`${stateKey}-${id}`][0]}</span>\r\n            }\r\n        </div>\r\n    );\r\n    return (\r\n        <div className=\"row checkout-info__container\">          \r\n                    {input('small-6 columns', 'customerDetails', 'firstName', 'billing given-name')}\r\n                    {input('small-6 columns', 'customerDetails', 'lastName', 'billing family-name')}                    \r\n                    {input('small-6 columns', 'customerDetails', 'address', 'billing street-address')}\r\n                    {input('small-6 columns', 'customerDetails', 'zipCode', 'billing postal-code')}\r\n                    {input('small-6 columns', 'customerDetails', 'city', 'billing address-level2')}                    \r\n                    {input('small-6 columns', 'customerDetails', 'phoneNumber', 'billing tel')}\r\n                    {input('small-6 columns', 'customerDetails', 'email', 'email')}  \r\n                    {orderTypeRadioButtons('small-6 columns','orderType', 'ordertype', 'orderType')} \r\n            {!authenticated && (<div className=\"small-12 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">\r\n                        <input className=\"checkout-info__checkbox-input\" type=\"checkbox\" id=\"signupandlogin\" \r\n                            checked={signUp}\r\n                            onChange={(event) => onSignUpChange(event.target.checked)}/>\r\n                        <label className=\"checkout-info__checkbox-label\" htmlFor=\"signupandlogin\">\r\n                            {translate('checkout.customerinfo.signupandlogin')}\r\n                        </label>\r\n                    </div>\r\n                </div>\r\n            </div>)}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutSalesOrderCustomerInfo;","import React, { Component, Fragment } from \"react\";\r\nimport { connect } from \"react-redux\";\r\n\r\nimport { orderType } from \"../Models/CheckoutConstants\";\r\nimport Cart from \"../Components/Cart\";\r\nimport CheckoutPrivateCustomerInfo from \"../Components/Checkout.PrivateCustomerInfo\";\r\nimport CheckoutBusinessCustomerInfo from \"../Components/Checkout.BusinessCustomerInfo\";\r\nimport CheckoutDeliveryMethods from \"../Components/Checkout.DeliveryMethods\";\r\nimport CheckoutPaymentMethods from \"../Components/Checkout.PaymentMethods\";\r\nimport CheckoutOrderNote from \"../Components/Checkout.OrderNote\";\r\nimport CheckoutOrderInfo from \"../Components/Checkout.OrderInfo\";\r\nimport PaymentWidget from \"../Components/Payments/PaymentWidget\";\r\nimport MultiCarousel from \"../Components/MultiCarousel\";\r\nimport FeatureList from \"../Components/FeatureList\";\r\nimport CheckoutSalesOrderCustomerInfo from \"../Components/Checkout.SalesOrderCustomerInfo\";\r\n\r\nimport constants from \"../constants\";\r\n\r\nimport {\r\n  acceptTermsOfCondition,\r\n  setBusinessCustomer,\r\n  setCampaignCode,\r\n  setCountry,\r\n  setDelivery,\r\n  setPayment,\r\n  setOrderNote,\r\n  submit,\r\n  verify,\r\n  setCustomerDetails,\r\n  setAlternativeAddress,\r\n  setCheckout,\r\n  setSignUp,\r\n  setSelectedCompanyAddress,\r\n  submitError,\r\n  reloadPayment,\r\n  submitCampaignCode,\r\n  submitRequest,\r\n  submitDone,\r\n  setCustomerMessage,\r\n  submitCustomerMessage,\r\n  setNewsLetter,\r\n  showCampaignEntry,\r\n  add,\r\n} from \"../Actions/Checkout.action\";\r\nimport { update as updateOrderRowQuantity } from \"../Actions/Cart.action\";\r\nimport { pushCheckoutEvent } from \"../Actions/Gtm.action\";\r\n\r\nimport { translate } from \"../Services/translation\";\r\nimport { string, object, boolean, mixed } from \"yup\";\r\nimport { hide } from \"../Actions/Notification.action\";\r\n\r\nlet responsiveness = {\r\n  desktopbig: {\r\n    breakpoint: { max: 3000, min: 1630 },\r\n    items: 4,\r\n    slidesToSlide: 4,\r\n  },\r\n  desktop: {\r\n    breakpoint: { max: 1630, min: 1300 },\r\n    items: 3,\r\n    slidesToSlide: 3,\r\n  },\r\n  tabletakward: {\r\n    breakpoint: { max: 1300, min: 1025 },\r\n    items: 2,\r\n    slidesToSlide: 2,\r\n  },\r\n  tablet: {\r\n    breakpoint: { max: 1025, min: 700 },\r\n    items: 3,\r\n    slidesToSlide: 3,\r\n  },\r\n  mobilebig: {\r\n    breakpoint: { max: 700, min: 665 },\r\n    items: 2,\r\n    slidesToSlide: 2,\r\n  },\r\n  mobile: {\r\n    breakpoint: { max: 665, min: 0 },\r\n    items: 2,\r\n    slidesToSlide: 2,\r\n  },\r\n};\r\n\r\nconst privateCustomerAdditionalDetailsSchema = object().shape({\r\n  acceptTermsOfCondition: boolean()\r\n    .required(translate(`validation.checkrequired`))\r\n    .oneOf([true], translate(`validation.checkrequired`)),\r\n  selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst salesOrderCustomerAdditionalDetailsSchema = object().shape({\r\n  selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst privateCustomerAddressSchema = object().shape({\r\n  email: string()\r\n    .required(translate(`validation.required`))\r\n    .email(translate(`validation.email`)),\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  country: mixed()\r\n    .required(translate(`validation.required`))\r\n    .notOneOf([\"\"], translate(\"validation.required\")),\r\n  city: string().required(translate(`validation.required`)),\r\n  zipCode: string().required(translate(`validation.required`)),\r\n  address: string().required(translate(`validation.required`)),\r\n  lastName: string().required(translate(`validation.required`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst privateCustomerAlternativeAddressSchema = object().shape({\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  country: mixed()\r\n    .required(translate(`validation.required`))\r\n    .notOneOf([\"\"], translate(\"validation.required\")),\r\n  city: string().required(translate(`validation.required`)),\r\n  zipCode: string().required(translate(`validation.required`)),\r\n  address: string().required(translate(`validation.required`)),\r\n  lastName: string().required(translate(`validation.required`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst businessCustomerDetailsSchema = object().shape({\r\n  acceptTermsOfCondition: boolean()\r\n    .required(translate(`validation.checkrequired`))\r\n    .oneOf([true], translate(`validation.checkrequired`)),\r\n  selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n  email: string()\r\n    .required(translate(`validation.required`))\r\n    .email(translate(`validation.email`)),\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  lastName: string().required(translate(`validation.required`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n  selectedCompanyAddressId: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst salesOrderCustomerDetailsSchema = object().shape({  \r\n  email: string()    \r\n    .email(translate(`validation.email`)),\r\n});\r\n\r\nclass CheckoutContainer extends Component {\r\n  componentDidMount() {\r\n    if (!this.props || !this.props.checkout) {\r\n      return;\r\n    }\r\n    // set selected value for payment method on load.\r\n    const { selectedPaymentMethod } = this.props.checkout.payload;\r\n    selectedPaymentMethod && this.props.setPayment(selectedPaymentMethod);\r\n\r\n    // fill default select value to the state\r\n    const { customerDetails, alternativeAddress } = this.props.checkout.payload;\r\n    (!customerDetails || !customerDetails.country) &&\r\n      constants.countries &&\r\n      constants.countries[0] &&\r\n      this.props.onCustomerDetailsChange(\r\n        \"customerDetails\",\r\n        \"country\",\r\n        constants.countries[0].value\r\n      );\r\n    (!alternativeAddress || !alternativeAddress.country) &&\r\n      constants.countries &&\r\n      constants.countries[0] &&\r\n      this.props.onCustomerDetailsChange(\r\n        \"alternativeAddress\",\r\n        \"country\",\r\n        constants.countries[0].value\r\n      );\r\n\r\n    this.props.pushCheckoutEvent();\r\n  }\r\n\r\n  placeOrder() {\r\n    const { payload } = this.props.checkout,\r\n      {\r\n        isBusinessCustomer,\r\n        selectedCompanyAddressId,\r\n        acceptTermsOfCondition,\r\n        selectedPaymentMethod,\r\n        selectedDeliveryMethod,\r\n      } = this.props.checkout.payload;\r\n    const notCustomerDetailFields = [\r\n      \"selectedCompanyAddressId\",\r\n      \"selectedPaymentMethod\",\r\n      \"selectedDeliveryMethod\",\r\n      \"acceptTermsOfCondition\",\r\n    ];\r\n    const onError = (error, addressPath = \"customerDetails\") => {\r\n      error.path =\r\n        notCustomerDetailFields.indexOf(error.path) >= 0\r\n          ? error.path\r\n          : `${addressPath}-${error.path}`;\r\n      this.props.submitError(error);\r\n    };\r\n    this.props.submitRequest();\r\n    if (isBusinessCustomer) {\r\n      businessCustomerDetailsSchema\r\n        .validate({\r\n          ...payload.customerDetails,\r\n          selectedCompanyAddressId,\r\n          selectedPaymentMethod,\r\n          selectedDeliveryMethod,\r\n          acceptTermsOfCondition,\r\n        })\r\n        .then(() => {\r\n          this.props.submit();\r\n        })\r\n        .catch(onError);\r\n    } else {\r\n      if (\r\n        payload.orderType === orderType.salesOrder ||\r\n        payload.orderType === orderType.salesQuote\r\n      ) {\r\n        if (payload.customerDetails.email) {\r\n          salesOrderCustomerDetailsSchema\r\n            .validate({\r\n              ...payload.customerDetails,\r\n            })\r\n            .then(() => {\r\n              this.props.submit();\r\n            })\r\n            .catch(onError);\r\n        } else {\r\n          this.props.submit();\r\n        }\r\n      } else {\r\n        const checkAltAddress =\r\n          payload.alternativeAddress.showAlternativeAddress &&\r\n          (payload.alternativeAddress.firstName ||\r\n            payload.alternativeAddress.lastName ||\r\n            payload.alternativeAddress.address ||\r\n            payload.alternativeAddress.zipCode ||\r\n            payload.alternativeAddress.city ||\r\n            payload.alternativeAddress.phoneNumber);\r\n\r\n        privateCustomerAddressSchema\r\n          .validate({\r\n            ...payload.customerDetails,\r\n          })\r\n          .then(() => {\r\n            payload.showAlternativeAddress =\r\n              payload.alternativeAddress.showAlternativeAddress;\r\n            if (checkAltAddress) {\r\n              privateCustomerAlternativeAddressSchema\r\n                .validate({\r\n                  ...payload.alternativeAddress,\r\n                })\r\n                .then(() => {\r\n                  privateCustomerAdditionalDetailsSchema\r\n                    .validate({\r\n                      selectedPaymentMethod,\r\n                      selectedDeliveryMethod,\r\n                      acceptTermsOfCondition,\r\n                    })\r\n                    .then(() => {\r\n                      this.props.submit();\r\n                    })\r\n                    .catch(onError);\r\n                })\r\n                .catch((error) => {\r\n                  onError(error, \"alternativeAddress\");\r\n                });\r\n            } else {\r\n              privateCustomerAdditionalDetailsSchema\r\n                .validate({\r\n                  selectedPaymentMethod,\r\n                  selectedDeliveryMethod,\r\n                  acceptTermsOfCondition,\r\n                })\r\n                .then(() => {\r\n                  this.props.submit();\r\n                })\r\n                .catch(onError);\r\n            }\r\n          })\r\n          .catch(onError);\r\n      }\r\n    }\r\n  }\r\n\r\n  render() {\r\n    const { cart } = this.props;\r\n    if (!cart || !cart.orderRows || cart.orderRows.length < 1) {\r\n      return (\r\n        <Fragment>\r\n          <div className=\"empty-checkout\">\r\n            <div className=\"empty-checkout__inner\">\r\n              <h2 className=\"checkout__title\">\r\n                {translate(`checkout.cart.empty`)}\r\n              </h2>\r\n\r\n              <div\r\n                className=\"small-12 columns empty-checkout-message\"\r\n                dangerouslySetInnerHTML={{\r\n                  __html: this.props.checkout.payload.continueShoppingMessage,\r\n                }}\r\n              ></div>\r\n            </div>\r\n          </div>\r\n        </Fragment>\r\n      );\r\n    }\r\n\r\n    const { checkout } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      {\r\n        orderNote,\r\n        paymentWidget,\r\n        paymentMethods,\r\n        authenticated,\r\n        isBusinessCustomer,\r\n        checkoutMode,\r\n      } = payload;\r\n    return (\r\n      <div className=\"checkout-container\">\r\n        <div className=\"error-msgs\">\r\n          {errors && errors[\"general\"] && (\r\n            <p className=\"checkout__validator--error\">{errors[\"general\"][0]}</p>\r\n          )}\r\n        </div>\r\n        <div className=\"checkout\">\r\n          <div className=\"checkout__main small-12 large-7 columns\">\r\n            <div className=\"row-inner checkout-header-section\">\r\n              <div className=\"small-6 medium-9 checkout-header\">\r\n                <h2>{translate(\"checkout.title\")}</h2>\r\n              </div>\r\n            </div>\r\n            <div className=\"row-inner mobile-header\">\r\n              <div className=\"small-12 checkout__cart-header-container\">\r\n                <div className=\"row checkout-header-wrapper\">\r\n                  <h2 className=\" checkout-header\">\r\n                    {translate(\"checkout.title\")}\r\n                  </h2>\r\n                  <div className=\"text--right\">\r\n                    <a\r\n                      href=\"javascript:history.back()\"\r\n                      className=\"checkout-continue-link\"\r\n                    >\r\n                      {translate(\"checkout.continuelink\")}\r\n                    </a>\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            </div>\r\n            {(!paymentWidget || paymentWidget.isChangeable) &&\r\n              this.renderCartSection()}\r\n            <div className=\"orderflip\">\r\n              <div className=\"orderflip__first\">{this.renderCartSummary()}</div>\r\n              <div className=\"orderflip__second\">\r\n                {this.props.cart.relatedProducts &&\r\n                  this.props.cart.relatedProducts.length > 0 ? (\r\n                  <h3 className=\"orderflip__title\">\r\n                    Du glömmer väl inte\r\n                  </h3>\r\n                ) : null}\r\n                {this.props.cart.relatedProducts &&\r\n                  this.props.cart.relatedProducts.length > 0 ? (\r\n                  <div className=\"checkout__dont-forget multi-carousel\">\r\n                    <MultiCarousel\r\n                      items={this.props.cart.relatedProducts}\r\n                      itemType=\"products\"\r\n                      onClick={this.props.add}\r\n                      responsivestyle={responsiveness}\r\n                    ></MultiCarousel>\r\n                    {/* <a className=\"ti-button ti-button--small ti-button--wide\" onClick={() => this.props.add(value.articleNumber)}> */}\r\n\r\n                    {/*<ul className=\"related-list related-list--checkout\">\r\n                                        {this.props.cart.relatedProducts.map((value, index) => {\r\n                                            return <li key={index}>\r\n                                                <div className=\"related-item\">\r\n                                                    <div className=\"related-item__image\">\r\n                                                        <img src={value.imageUrl} />\r\n                                                    </div>\r\n                                                    <h4 className=\"related-item__header\">{value.name}</h4>\r\n                                                    <div className=\"related-item__info\">\r\n                                                        <div className=\"related-item__brand\">{value.brand}</div>\r\n                                                        <div className=\"related-item__price\">{value.price} kr</div>\r\n                                                    </div>\r\n                                                    <a className=\"ti-button ti-button--small ti-button--wide\" onClick={() => this.props.add(value.articleNumber)}>\r\n                                                        <svg>\r\n                                                            <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#plus\"></use>\r\n                                                        </svg>\r\n                                                        Köp till\r\n                                                    </a>\r\n                                                </div>\r\n                                            </li>\r\n                                        })}\r\n                                    </ul> */}\r\n                  </div>\r\n                ) : null}\r\n                {payload.seoTitle != null && payload.seoTitle != \"\" ? (\r\n                  <h3 className=\"orderflip__title\">\r\n                    {payload.seoTitle}\r\n                  </h3>\r\n                ) : null}\r\n                <div className=\"section-content section-content--center\">\r\n                  {payload.seoText != null && payload.seoText != \"\" ? (\r\n                    <div\r\n                      dangerouslySetInnerHTML={{ __html: payload.seoText }}\r\n                    ></div>\r\n                  ) : null}\r\n                  {payload.soExternalLink != null &&\r\n                    payload.soExternalLink != \"\" ? (\r\n                    <a href={payload.soExternalLink}>\r\n                      {translate(\"checkout.moreinformation\")}\r\n                    </a>\r\n                  ) : null}\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n          <div className=\"checkout__side small-12 large-5 columns\">\r\n            <h2 className=\"section-header\">\r\n              {translate(\"checkout.delivery.title\")}\r\n            </h2>\r\n            {(!paymentWidget || paymentWidget.displayDeliveryMethods) &&\r\n              this.renderDeliveryMethodsSection()}            \r\n            <h2 className=\"section-header\">\r\n              {payload.orderType === orderType.salesOrder ||\r\n                payload.orderType === orderType.salesQuote\r\n                ? translate(\"checkout.customerinfo.title\")\r\n                : translate(\"checkout.payment.title\")}\r\n            </h2>\r\n            {payload.orderType === orderType.standard && payload.isDanishSite && this.renderPaymentMethodsSection()}\r\n            {payload.orderType === orderType.standard ? (\r\n              <PaymentWidget {...paymentWidget} verify={this.props.verify} />\r\n            ) : (\r\n              this.renderCustomerDetailsSection()\r\n            )}\r\n            {payload.orderType === orderType.salesOrder ||\r\n              payload.orderType === orderType.salesQuote ? (\r\n              <button\r\n                type=\"submit\"\r\n                className=\"button button--buy-button checkout__submit-button\"\r\n                disabled={checkout.isSubmitting}\r\n                onClick={() => this.placeOrder()}\r\n              >\r\n                {translate(\"checkout.placeorder\")}\r\n              </button>\r\n            ) : null}\r\n          </div>          \r\n        </div>\r\n      </div>\r\n    );\r\n  }\r\n\r\n  componentDidUpdate(prevProps) {\r\n    if (this.props.checkout.result && this.props.checkout.result.redirectUrl) {\r\n      window.location = this.props.checkout.result.redirectUrl;\r\n      return;\r\n    }\r\n\r\n    const { checkout } = this.props;\r\n    if (!checkout.isSubmitting || !checkout.errors) {\r\n      return;\r\n    }\r\n\r\n    const errorKeys = Object.keys(checkout.errors);\r\n    if (!errorKeys || errorKeys.length < 1) {\r\n      return;\r\n    }\r\n\r\n    const errorNode = document.querySelector(\r\n      `[data-error-for=\"${errorKeys[0]}\"]`\r\n    );\r\n    if (!errorNode) {\r\n      return;\r\n    }\r\n\r\n    const inputNode = errorNode.parentElement.querySelector(\"input\");\r\n    if (inputNode) {\r\n      setTimeout(() => inputNode.focus(), 1000);\r\n      inputNode.scrollIntoView({ behavior: \"smooth\" });\r\n    } else {\r\n      errorNode.scrollIntoView({ behavior: \"smooth\" });\r\n    }\r\n  }\r\n\r\n  renderCartSection() {\r\n    const { checkout } = this.props,\r\n      { errors = {} } = checkout;\r\n    return (\r\n      <Fragment>\r\n        <div className=\"error-msgs\">\r\n          {errors && errors[\"cart\"] && (\r\n            <p className=\"checkout__validator--error\">{errors[\"cart\"][0]}</p>\r\n          )}\r\n        </div>\r\n        <Cart\r\n          {...{\r\n            ...this.props.cart,\r\n            updateOrderRowQuantity: this.props.updateOrderRowQuantity,\r\n            removeOrderRow: this.props.removeOrderRow,\r\n            removeOrderRows: this.props.removeOrderRows,\r\n          }}\r\n        />\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderCartSummary() {\r\n    const { checkout } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { messageToCustomer, createNewCustomer, newsLetterEnabled } = payload;\r\n\r\n    return (\r\n      <Fragment>\r\n        <div className=\"cart-summary\">\r\n          <div className=\"cart-summary__totals\">\r\n            <div className=\"cart-summary__box\">\r\n              <ul className=\"cart-totals\">\r\n                <li>\r\n                  <span>{translate(\"checkout.sumofarticles\")}</span>\r\n                  <span>{this.props.cart.orderTotal}</span>\r\n                </li>\r\n                {this.props.cart.totalOrderRowDiscount != null &&\r\n                  this.props.cart.totalOrderRowDiscount != \"\" &&\r\n                  this.props.cart.totalOrderRowDiscount != \"0\" &&\r\n                  this.props.cart.totalOrderRowDiscount != \"0 kr\" && (\r\n                    <li class=\"cart-totals__discount\">\r\n                      <span>{translate(\"checkout.totaldiscount\")}</span>\r\n                      <span>- {this.props.cart.totalOrderRowDiscount}</span>\r\n                    </li>\r\n                  )}\r\n                <li>\r\n                  <span>{translate(\"checkout.vat\")}</span>\r\n                  <span>{this.props.cart.vat}</span>\r\n                </li>\r\n                <li>\r\n                  <span>{translate(\"checkout.deliverycost\")}</span>\r\n                  <span>{this.props.cart.deliveryCost}</span>\r\n                </li>\r\n                {this.props.cart.campaignCode != null &&\r\n                  this.props.cart.campaignCode != \"\" ? (\r\n                  <li>\r\n                    <span>{this.props.cart.campaignCode}</span>\r\n                    <span>- {this.props.cart.campaignDiscount}</span>\r\n                  </li>\r\n                ) : null}\r\n                <li className=\"cart-totals__grand-total\">\r\n                  <div className=\"cart-totals__grand-text\">\r\n                    {translate(\"checkout.totaltopay\")}\r\n                  </div>\r\n                  <div className=\"cart-totals__grand-sum\">\r\n                    {this.props.cart.grandTotal}\r\n                  </div>\r\n                </li>\r\n              </ul>\r\n              <FeatureList></FeatureList>\r\n            </div>\r\n          </div>\r\n          <div className=\"cart-summary__options\">\r\n            <div className=\"cart-summary__box\">\r\n              <details className=\"ti-accordion ti-accordion--big-button\">\r\n                <summary className=\"as-h3 small\">\r\n                  {translate(\"checkout.customermessagelabel\")}\r\n                </summary>                \r\n                <textarea\r\n                  className=\"cart-summary__comment\"\r\n                  placeholder={translate(\"checkout.leavemessage\")}\r\n                  onChange={(event) => {\r\n                    if (event.target.value.length > 100) {\r\n                      document.getElementById(\"comment-error\").className=\"checkout__comment-errormessage\";\r\n                    } else {\r\n                      document.getElementById(\"comment-error\").className=\"checkout__comment-message\";\r\n                    }\r\n                      this.props.setCustomerMessage(event.target.value.substring(0, 100));\r\n                      event.target.value = event.target.value.substring(0, 100);\r\n                    }\r\n                  }                  \r\n                ></textarea>\r\n                <div id=\"comment-error\" className=\"checkout__comment-message\">{translate(\"checkout.comment.validation\")}</div>\r\n                <a\r\n                  className=\"cart-summary__send-button\"\r\n                  onClick={() => this.props.submitCustomerMessage()}\r\n                >\r\n                  {translate(\"checkout.sendtext\")}\r\n                  <span className=\"summary-arrow\"></span>\r\n                </a>\r\n                {payload.messageAddedSuccess == true ? (\r\n                  <div className=\"cart-summary__campaign-success\">\r\n                    {translate(\"messageAddeddSuccessfully\")}\r\n                  </div>\r\n                ) : (\r\n                  <div></div>\r\n                )}\r\n              </details>\r\n            </div>\r\n            {newsLetterEnabled && <div className=\"cart-summary__box\">\r\n              <label className=\"cart-summary__label as-h3 small\">\r\n                <input\r\n                  id=\"newsletter\"\r\n                  className=\"ti-checkbox small\"\r\n                  type=\"checkbox\"\r\n                  onChange={(event) =>\r\n                    this.props.setNewsLetter(event.target.checked)\r\n                  }\r\n                ></input>\r\n                <label htmlFor=\"newsletter\">\r\n                  <svg className='shipping-option__svg'>\r\n                    <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#checked\"></use>\r\n                  </svg>\r\n                </label>\r\n                {translate(\"checkout.newsletterlabel\")}\r\n              </label>\r\n            </div>}\r\n            <div className=\"cart-summary__box cart-summary__box--transparent\">\r\n              <label className=\"cart-summary__label cart-summary__label--campaign as-h3 small\">\r\n                <input\r\n                  id=\"campaign\"\r\n                  className=\"ti-checkbox small\"\r\n                  type=\"checkbox\"\r\n                  onChange={(event) =>\r\n                    this.props.showCampaignEntry(event.target.checked)\r\n                  }\r\n                />\r\n                <label htmlFor=\"campaign\">\r\n                  <svg className='shipping-option__svg'>\r\n                    <use href=\"/ui/images/tibergs-svg/sprite/sprite.svg#checked\"></use>\r\n                  </svg>\r\n                </label>\r\n                {translate(\"checkout.rebatecodelabel\")}\r\n              </label>\r\n              {payload.showCampaignEntry == true ? (\r\n                <div className=\"campaign-section\">\r\n                  <input\r\n                    className=\"cart-summary__campaign\"\r\n                    id=\"campaign-code\"\r\n                    spellCheck=\"false\"\r\n                    placeholder={translate(\"checkout.entercode\")}\r\n                    onChange={(event) =>\r\n                      this.props.setCampaignCode(event.target.value)\r\n                    }\r\n                  />\r\n                  <a\r\n                    className=\"cart-summary__campaign-button\"\r\n                    onClick={() => this.props.submitCampaignCode()}\r\n                  >\r\n                    {translate(\"checkout.activate\")}\r\n                    <span className=\"summary-arrow\"></span>\r\n                  </a>\r\n                  {payload.campaignApplied == true ? (\r\n                    <div className=\"cart-summary__campaign-success\">\r\n                      {translate(\"checkout.campaignapplied\")}\r\n                    </div>\r\n                  ) : (\r\n                    <div></div>\r\n                  )}\r\n                  {errors &&\r\n                    errors[\"campaignCode\"] &&\r\n                    payload.campaignApplied != true && (\r\n                      <div\r\n                        className=\"campaign-checkout-error\"\r\n                        data-error-for=\"campaign-code\"\r\n                      >\r\n                        <span>X</span>\r\n                        {errors[\"campaignCode\"][0]}\r\n                      </div>\r\n                    )}\r\n                </div>\r\n              ) : null}\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderCustomerDetailsSection() {\r\n    const {\r\n      checkout,\r\n      onCustomerDetailsChange,\r\n      onSignUpChange,\r\n      setSelectedCompanyAddress,\r\n      setCountry,\r\n    } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      {\r\n        companyName,\r\n        authenticated,\r\n        customerDetails,\r\n        alternativeAddress,\r\n        companyAddresses,\r\n        selectedCompanyAddressId,\r\n        isBusinessCustomer,\r\n        signUp,\r\n        checkoutMode,\r\n      } = payload;\r\n    const privateCustomerInfoComponent = (\r\n      <CheckoutPrivateCustomerInfo\r\n        {...{\r\n          customerDetails,\r\n          alternativeAddress,\r\n          authenticated,\r\n          onChange: onCustomerDetailsChange,\r\n          signUp,\r\n          onSignUpChange,\r\n          setCountry,\r\n          errors,\r\n        }}\r\n      />\r\n    );\r\n    const businessCustomerInfoComponent = (\r\n      <CheckoutBusinessCustomerInfo\r\n        {...{\r\n          customerDetails,\r\n          companyAddresses,\r\n          companyName,\r\n          authenticated,\r\n          selectedCompanyAddressId,\r\n          onChange: onCustomerDetailsChange,\r\n          setSelectedCompanyAddress,\r\n          errors,\r\n        }}\r\n      />\r\n    );\r\n    const salesOrderCustomerInfoComponent = (\r\n      <CheckoutSalesOrderCustomerInfo\r\n        {...{\r\n          checkout,\r\n          customerDetails,\r\n          alternativeAddress,\r\n          authenticated,\r\n          onChange: onCustomerDetailsChange,\r\n          signUp,\r\n          onSignUpChange,\r\n          setCountry,\r\n          errors,\r\n        }}\r\n      />\r\n    );\r\n    if (!authenticated) {\r\n      return (\r\n        <Fragment>\r\n          <div className=\"row\">\r\n            <h3 className=\"checkout__section-title\"></h3>\r\n            <Fragment>\r\n              <label className=\"checkout__text--in-line\">\r\n                {translate(\"checkout.customerinfo.existingcustomer\")}\r\n              </label>\r\n              &nbsp;\r\n              <a href={payload.loginUrl} className=\"checkout__link\">\r\n                {translate(\"checkout.customerinfo.clicktologin\")}\r\n              </a>\r\n              &nbsp;\r\n              {!isBusinessCustomer &&\r\n                checkoutMode === constants.checkoutMode.both && (\r\n                  <a\r\n                    onClick={() => this.props.setBusinessCustomer(true)}\r\n                    className=\"checkout__link\"\r\n                  >\r\n                    {translate(\"checkout.customerinfo.businesscustomer\")}\r\n                  </a>\r\n                )}\r\n            </Fragment>\r\n            {isBusinessCustomer &&\r\n              checkoutMode === constants.checkoutMode.both && (\r\n                <a\r\n                  onClick={() => this.props.setBusinessCustomer(false)}\r\n                  className=\"checkout__link\"\r\n                >\r\n                  {translate(\"checkout.customerinfo.privatecustomer\")}\r\n                </a>\r\n              )}\r\n          </div>\r\n          {!isBusinessCustomer &&\r\n            checkoutMode !== constants.checkoutMode.companyCustomers &&\r\n            !payload.orderType === orderType.standard &&\r\n            privateCustomerInfoComponent}\r\n          {(isBusinessCustomer ||\r\n            checkoutMode === constants.checkoutMode.companyCustomers) &&\r\n            businessCustomerInfoComponent}\r\n          {(payload.orderType === orderType.salesOrder ||\r\n            payload.orderType === orderType.salesQuote) &&\r\n            salesOrderCustomerInfoComponent}\r\n        </Fragment>\r\n      );\r\n    }\r\n    if (isBusinessCustomer) {\r\n      return (\r\n        <Fragment>\r\n          <div className=\"row\">\r\n            <h3 className=\"checkout__section-title\">\r\n              {translate(\"checkout.customerinfo.title\")}\r\n            </h3>\r\n          </div>\r\n          {authenticated && businessCustomerInfoComponent}\r\n        </Fragment>\r\n      );\r\n    }\r\n\r\n    return (\r\n      <Fragment>\r\n        <div className=\"row\">\r\n          <h3 className=\"checkout__section-title\"></h3>\r\n        </div>\r\n        {payload.orderType == orderType.salesOrder ||\r\n          payload.orderType === orderType.salesQuote\r\n          ? salesOrderCustomerInfoComponent\r\n          : privateCustomerInfoComponent}\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderDeliveryMethodsSection() {\r\n    const { checkout } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { deliveryMethods } = payload;\r\n\r\n    return (\r\n      <Fragment>\r\n        <CheckoutDeliveryMethods\r\n          deliveryMethods={this.props.cart.deliveryMethods}\r\n          selectedId={payload.selectedDeliveryMethod}\r\n          onChange={this.props.setDelivery}\r\n        />\r\n        {errors[\"selectedDeliveryMethod\"] && (\r\n          <span className=\"form__validator--error form__validator--top-narrow\">\r\n            {errors[\"selectedDeliveryMethod\"][0]}\r\n          </span>\r\n        )}\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderCustomerMessageSection() {\r\n    const { checkout, hideComments } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { messageToCustomer, createNewCustomer } = payload;\r\n\r\n    return (\r\n      <Fragment>\r\n        <div className=\"row customer_message_section\">\r\n          <div className=\"columns small-6\">\r\n            <div className=\"row inner_row_first\">\r\n              <details>\r\n                <summary>{translate(\"checkout.customermessagelabel\")}</summary>\r\n                <input\r\n                  type=\"text\"\r\n                  className=\"form__input top_margin_text\"\r\n                  onBlur={(value) =>\r\n                    this.props.setCustomerMessage(value.target.value)\r\n                  }\r\n                ></input>\r\n                <a onClick={() => this.props.submitCustomerMessage()}>Skicka</a>\r\n              </details>\r\n            </div>\r\n            <div className=\"row inner_row\">\r\n              <input\r\n                type=\"checkbox\"\r\n                onChange={(event) =>\r\n                  this.props.setNewsLetter(event.target.checked)\r\n                }\r\n              ></input>\r\n              <label className=\"form__label left_margin\">\r\n                {translate(\"checkout.newsletterlabel\")}\r\n              </label>\r\n              <div className=\"full_width\">\r\n                <input\r\n                  type=\"checkbox\"\r\n                  onChange={(event) =>\r\n                    this.props.showCampaignEntry(event.target.checked)\r\n                  }\r\n                ></input>\r\n                <label\r\n                  className=\"form__label left_margin\"\r\n                  htmlFor=\"campaign-code\"\r\n                >\r\n                  {translate(\"checkout.rebatecodelabel\")}\r\n                </label>\r\n              </div>\r\n              {payload.showCampaignEntry == true ? (\r\n                <div>\r\n                  <input\r\n                    className=\"checkout-info__campaign-input\"\r\n                    id=\"campaign-code\"\r\n                    placeholder={translate(\"checkout.entercode\")}\r\n                    onChange={(event) =>\r\n                      this.props.setCampaignCode(event.target.value)\r\n                    }\r\n                  />\r\n                  {errors && errors[\"campaignCode\"] && (\r\n                    <span\r\n                      className=\"form__validator--error form__validator--top-narrow\"\r\n                      data-error-for=\"campaign-code\"\r\n                    >\r\n                      {errors[\"campaignCode\"][0]}\r\n                    </span>\r\n                  )}\r\n                  <button\r\n                    className=\"checkout-info__campaign-button\"\r\n                    onClick={() => this.props.submitCampaignCode()}\r\n                  >\r\n                    {translate(\"checkout.activate\")}\r\n                  </button>\r\n                </div>\r\n              ) : null}\r\n            </div>\r\n          </div>\r\n          <div className=\"columns small-6\">\r\n            <div>\r\n              <label className=\"form__label label_width\">\r\n                {translate(\"checkout.sumofarticles\")}\r\n              </label>\r\n              <label className=\"form__label label_width\">\r\n                {this.props.cart.orderTotal}\r\n              </label>\r\n            </div>\r\n            <div>\r\n              <label className=\"form__label label_width\">\r\n                {translate(\"checkout.totaldiscount\")}\r\n              </label>\r\n              <label className=\"form__label label_width\">\r\n                {this.props.cart.discount}\r\n              </label>\r\n            </div>\r\n            <div>\r\n              <label className=\"form__label label_width\">\r\n                {translate(\"checkout.vat\")}\r\n              </label>\r\n              <label className=\"form__label label_width\">\r\n                {this.props.cart.vat}\r\n              </label>\r\n            </div>\r\n            {this.props.cart.campaignCode != null &&\r\n              this.props.cart.campaignCode != \"\" ? (\r\n              <div>\r\n                <label className=\"form__label label_width red\">\r\n                  {this.props.cart.campaignCode}\r\n                </label>\r\n                <label className=\"form__label label_width\">\r\n                  {this.props.cart.campaignDiscount}\r\n                </label>\r\n              </div>\r\n            ) : null}\r\n            <div>\r\n              <label className=\"form__label label_width\">\r\n                {translate(\"checkout.totaltopay\")}\r\n              </label>\r\n              <label className=\"form__label label_width\">\r\n                {this.props.cart.grandTotal}\r\n              </label>\r\n            </div>\r\n          </div>\r\n          <label className=\"underline not_forget\">\r\n            {translate(\"checkout.donotforgetchoices\")}\r\n          </label>\r\n        </div>\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderPaymentMethodsSection() {\r\n    const { checkout } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { paymentMethods } = payload;\r\n    return (\r\n      <Fragment>        \r\n        <CheckoutPaymentMethods\r\n          paymentMethods={paymentMethods}\r\n          selectedId={payload.selectedPaymentMethod}\r\n          onChange={this.props.setPayment}\r\n          errors={errors}\r\n          onCampaignCodeChange={this.props.setCampaignCode}\r\n          onSubmitCampaignCode={this.props.submitCampaignCode}          \r\n        />\r\n        {errors[\"selectedPaymentMethod\"] && (\r\n          <span className=\"form__validator--error form__validator--top-narrow\">\r\n            {errors[\"selectedPaymentMethod\"][0]}\r\n          </span>\r\n        )}\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n  const { cart, checkout, hideComments } = state;\r\n  return {\r\n    cart,\r\n    checkout,\r\n    hideComments,\r\n  };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch) => {\r\n  return {\r\n    submit: () => dispatch(submit()),\r\n    setBusinessCustomer: (value) => dispatch(setBusinessCustomer(value)),\r\n    setCampaignCode: (code) => dispatch(setCampaignCode(code)),\r\n    setCountry: (systemId) => dispatch(setCountry(systemId)),\r\n    setDelivery: (systemId) => dispatch(setDelivery(systemId)),\r\n    setPayment: (systemId) => dispatch(setPayment(systemId)),\r\n    setOrderNote: (note) => dispatch(setOrderNote(note)),\r\n    acceptTermsOfCondition: (accept) =>\r\n      dispatch(acceptTermsOfCondition(accept)),\r\n    verify: (url, orderId, payload) => dispatch(verify(url, orderId, payload)),\r\n    onSignUpChange: (signUp) => dispatch(setSignUp(signUp)),\r\n    submitCampaignCode: () => dispatch(submitCampaignCode()),\r\n    submitRequest: () => dispatch(submitRequest()),\r\n    setCustomerMessage: (value) => dispatch(setCustomerMessage(value)),\r\n    submitCustomerMessage: () => dispatch(submitCustomerMessage()),\r\n    setNewsLetter: (value) => dispatch(setNewsLetter(value)),\r\n    setHideComments: (value) => dispatch(setHideComments(value)),\r\n    showCampaignEntry: (value) => dispatch(showCampaignEntry(value)),\r\n    add: (value) => dispatch(add(value)),\r\n    submitError: (error) => {\r\n      dispatch(submitError(error));\r\n      dispatch(submitDone(null));\r\n    },\r\n    setSelectedCompanyAddress: (companyAddressId, country) => {\r\n      dispatch(setSelectedCompanyAddress(companyAddressId));\r\n      dispatch(setCountry(country));\r\n    },\r\n    onCustomerDetailsChange: (stateKey, propName, value) => {\r\n      switch (stateKey) {\r\n        case \"customerDetails\":\r\n          dispatch(setCustomerDetails(propName, value));\r\n          break;\r\n        case \"alternativeAddress\":\r\n          dispatch(setAlternativeAddress(propName, value));\r\n          break;\r\n        case \"orderType\":\r\n          dispatch(setCheckout(value));\r\n          break;\r\n      }\r\n    },\r\n\r\n    updateOrderRowQuantity: (rowId, quantity) =>\r\n      dispatch(updateOrderRowQuantity([rowId], quantity)).then(() =>\r\n        dispatch(reloadPayment())\r\n      ),\r\n    removeOrderRow: (rowId) =>\r\n      dispatch(updateOrderRowQuantity([rowId], 0)).then(() =>\r\n        dispatch(reloadPayment())\r\n      ),\r\n    removeOrderRows: (rowIds) =>\r\n      dispatch(updateOrderRowQuantity(rowIds, 0)).then(() =>\r\n        dispatch(reloadPayment())\r\n      ),\r\n    pushCheckoutEvent: (event) => dispatch(pushCheckoutEvent(event))\r\n  };\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(CheckoutContainer);\r\n"],"sourceRoot":""}