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,QAAS6E,KAAKI,MAAMC,kBACpBvF,OAAQ4H,KAAKC,IAAI3C,KAAKrG,MAAMU,SAAS8H,SAASvG,OAAQ,KAAWgH,cAGjD,gBAAoB,MAAO,CAC7C7I,UAAW,kBACG,gBAAoB,IAAK,CACvCA,UAAW,iBACX8I,KAAM7C,KAAKrG,MAAMU,SAASyI,aAAarC,KACtCT,KAAKrG,MAAMU,SAAS0I,cACzB,GACC,CACDhH,IAAK,SACL2D,MAAO,WACL,OAAoB,gBAAoB,MAAO,KAAmB,gBAAoB,IAAQ,CAC5FsD,KAAMhD,KAAKI,MAAME,WACjBzD,QAAS,KACToG,YAAa,KACbC,gBAAiB,MAChBlD,KAAKmD,cACV,IAEJ,CA1HkC,CA0HhC,aACFlD,EAAehG,UAAY,CACzBI,SAAU,cAAoB,CAAC,WAAkB,aAAmBH,YAEtE+F,EAAe9F,aAAe,CAAC,GAC/B,IAAIyF,GAAoBwD,K,yDCjLxB,IAGIC,EAAa,CACfC,QAAS,KACTC,YAAa,KACbC,SAAU,KACVC,WAAY,KACZC,qBAAsB,KACtBC,6BAA8B,KAC9BC,oBAAqB,KACrBC,UAAW,KACXC,UAAW,KACXC,UAAW,KACXC,eAAgB,KAChBC,SAAU,KACVC,YAAa,KACbC,aAAc,KACdC,qBAAsB,KACtBC,iBAAkB,KAClBC,qBAAsB,KACtBC,gBAAiB,KACjBC,sBAAuB,KACvBC,4BAA6B,KAC7BC,iBAAkB,KAClBC,UAAW,MAoBb,KA7CiB,CACf/B,UAAW,E","sources":["webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/views/support-services/getBox.js","webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/views/support-services/slideCarousel.js","webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/utils/getSettings-utils.js","webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/wdh-bss-details-spot.js","webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/infrastructure/const.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nvar GetBox = function GetBox(props) {\n var dispLabel = props.dispLabel,\n dispVal = props.dispVal,\n helpTxt = props.helpTxt;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"get-box-bss-slider\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"get-box-adjustments\"\n }, dispLabel, /*#__PURE__*/React.createElement(\"span\", {\n className: \"help-text-icon\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"help-text-border\",\n type: \"button\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"help-text\"\n }, helpTxt)))), /*#__PURE__*/React.createElement(\"p\", {\n className: \"valuesize\"\n }, dispVal));\n};\nGetBox.propTypes = {\n dispLabel: PropTypes.string.isRequired,\n dispVal: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n helpTxt: PropTypes.string.isRequired\n};\nGetBox.defaultProps = {\n dispVal: ''\n};\nexport default GetBox;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Slider from 'react-slick';\nimport GetBox from './getBox';\nimport classNames from 'classnames';\nvar divWrapperCssClasses = classNames('wdh-feature-bss-sliders');\nvar settings = {\n dots: false,\n infinite: true,\n speed: 500,\n slidesToShow: 4,\n slidesToScroll: 3,\n className: 'bss-mobile-slick-slider-orignal',\n responsive: [{\n breakpoint: 3000,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 4,\n slidesToScroll: 3,\n className: 'bss-mobile-slick-slider-twentyFive'\n }\n }, {\n breakpoint: 1441,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 4,\n slidesToScroll: 3,\n className: 'bss-mobile-slick-slider-fourteen'\n }\n }, {\n breakpoint: 1025,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 4,\n slidesToScroll: 3,\n className: 'bss-mobile-slick-slider-thousand'\n }\n }, {\n breakpoint: 812,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 2,\n slidesToScroll: 1,\n className: 'bss-mobile-slick-slider-tab'\n }\n }, {\n breakpoint: 768,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 2,\n slidesToScroll: 1,\n className: 'bss-mobile-slick-slider-tab'\n }\n }, {\n breakpoint: 425,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 1,\n slidesToScroll: 1\n }\n }, {\n breakpoint: 375,\n settings: {\n dots: false,\n infinite: true,\n slidesToShow: 1,\n slidesToScroll: 1\n }\n }]\n};\nvar SlideCarousel = function SlideCarousel(props) {\n settings.slidesToShow = props.slides;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: props.slides < 4 ? divWrapperCssClasses : ''\n }, /*#__PURE__*/React.createElement(Slider, settings, props.items.map(function (item) {\n var itemval = props.details[item.fieldName];\n if (typeof itemval == 'string' && !itemval.includes(\"/\")) {\n itemval = parseInt(itemval);\n }\n var val = itemval.toLocaleString('en-US');\n if (item.fieldName !== 'UnitsPurchased' && item.fieldName !== 'UnitsRequired' && item.fieldName !== 'unitSold' && item.fieldName !== 'period' && item.fieldName !== 'nextMilestoneDate' && item.fieldName !== 'baseline') {\n // pad string with 0's to keep consistent with other currency values.\n var re = /\\.([0-9]+)/;\n var decimals = re.exec(val);\n var padding = '';\n if (decimals && decimals[1].length > 0) {\n padding = decimals[1].length === 1 ? '0' : '';\n } else {\n padding = '.00';\n }\n\n // managed care rebate and sales amount should be currency\n if (item.fieldName === 'rebateAmount' || item.fieldName === 'salesAmount') {\n val = \"\".concat(val.indexOf('$') === -1 ? '$' : '').concat(val).concat(padding);\n } else {\n val = \"\".concat(val).concat(padding, \" points\");\n }\n }\n return /*#__PURE__*/React.createElement(GetBox, {\n key: item.itemInfo.id,\n dispLabel: item.label,\n dispVal: val,\n helpTxt: item.helpText\n });\n })));\n};\nSlideCarousel.propTypes = {\n items: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n details: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n slides: PropTypes.number\n};\nSlideCarousel.defaultProps = {\n items: [],\n details: [],\n slides: 4\n};\nexport default SlideCarousel;","/**\n * Get the rendered settings for the component instance given by *component*\n * @param component\n * @private\n */\nvar getSettingsFromComponent = function getSettingsFromComponent(component) {\n var settingsElement = component.querySelector('script[type=\"application/json\"]');\n var settings = {};\n try {\n settings = JSON.parse(settingsElement.textContent);\n } catch (e) {\n settings.error = \"\".concat(e.name, \" - \").concat(e.message);\n }\n settings = Object.assign(settings, {});\n return settings;\n};\nexport default getSettingsFromComponent;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport Loader from 'react-loader-advanced';\nimport { spinner, loaderOpacity, loaderBackgroundStyle } from './views/Spinner';\nimport { WDHComponent } from '../../../../../../../wdh-foundation/wdh';\nimport CheckUtils from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/utilities/check-utils';\nimport SlideCarousel from './views/support-services/slideCarousel';\nimport getSettingsFromComponent from './utils/getSettings-utils';\nimport SlideCount from './infrastructure/const';\nimport axios from 'axios';\nimport AxiosUtils from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/utilities/axios-utils';\nimport ConfigurationManager from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/infrastructure/configuration-manager';\nvar WDHBSSDetailsSpot = /*#__PURE__*/function (_WDHComponent) {\n /**\n * @param {String} className - The unique css selector that triggers the component\n * @constructor\n * @augments WDHComponent\n * @inheritDoc\n */\n function WDHBSSDetailsSpot() {\n var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'business-support-services-spot';\n _classCallCheck(this, WDHBSSDetailsSpot);\n return _callSuper(this, WDHBSSDetailsSpot, [className]);\n }\n _inherits(WDHBSSDetailsSpot, _WDHComponent);\n return _createClass(WDHBSSDetailsSpot, [{\n key: \"init\",\n value: function init(component) {\n var settings = getSettingsFromComponent(component);\n ReactDOM.render(/*#__PURE__*/React.createElement(BSSDetailsSpot, {\n settings: settings\n }), component.querySelector('.component-content'));\n }\n }]);\n}(WDHComponent);\nexport default WDHBSSDetailsSpot;\nvar BSSDetailsSpot = /*#__PURE__*/function (_React$Component) {\n function BSSDetailsSpot(props) {\n var _this;\n _classCallCheck(this, BSSDetailsSpot);\n _this = _callSuper(this, BSSDetailsSpot, [props]);\n _this.state = {\n bssProgramDetails: {},\n showLoader: true\n };\n return _this;\n }\n _inherits(BSSDetailsSpot, _React$Component);\n return _createClass(BSSDetailsSpot, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.getData(this.props.settings.endpoint, 5);\n }\n }, {\n key: \"getData\",\n value: function getData(url, iterationCount) {\n var _this2 = this;\n if (iterationCount >= 10) return; // made sure data was there before we quit trying\n\n var _this$props$settings = this.props.settings,\n endpoint = _this$props$settings.endpoint,\n className = _this$props$settings.className;\n var sessionDetails = JSON.parse(document.getElementById('B2BSessionDetails').innerHTML);\n var shouldUseToken = !endpoint.toLowerCase().includes('webservice'); // allows us to use both webservice and direct api at same time\n\n var config = shouldUseToken ? AxiosUtils.getConfig(ConfigurationManager.getUSCustomersServiceEndPoint(), sessionDetails.token) : '';\n axios.get(endpoint, config).then(function (response) {\n var data = response.data,\n status = response.status;\n switch (status) {\n case 204:\n setTimeout(function () {\n _this2.getData(url, ++iterationCount);\n _this2.setState({\n showLoader: false\n });\n }, 500);\n break;\n case 200:\n if (className === 'mcRebate') {\n var _data$rebateDetails;\n _this2.setState({\n bssProgramDetails: (_data$rebateDetails = data.rebateDetails) === null || _data$rebateDetails === void 0 ? void 0 : _data$rebateDetails.items[0],\n showLoader: false\n });\n } else {\n _this2.setState({\n bssProgramDetails: data,\n showLoader: false\n });\n }\n break;\n default:\n break;\n }\n }).catch(function (err) {\n console.error('an unexpected Error occurred.', err);\n _this2.setState({\n showLoader: false\n });\n });\n }\n\n /**\n * tests all children from settings against our details object. if any are null or undefined then data is not valid and should not be shown.\n *\n * @returns bool\n */\n }, {\n key: \"hasData\",\n value: function hasData() {\n var _this3 = this;\n return this.props.settings.children.every(function (childItem) {\n if (Object.prototype.hasOwnProperty.call(_this3.state.bssProgramDetails, childItem.fieldName)) {\n // we have the key in our state object\n switch (_typeof(_this3.state.bssProgramDetails[childItem.fieldName])) {\n case 'string':\n return !CheckUtils.isNullOrEmptyString(_this3.state.bssProgramDetails[childItem.fieldName]);\n case 'number':\n return !CheckUtils.isNullOrEmptyNumber(_this3.state.bssProgramDetails[childItem.fieldName]);\n default:\n // if it is anything else\n return false;\n }\n }\n return false;\n });\n }\n }, {\n key: \"renderView\",\n value: function renderView() {\n if (this.hasData()) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"flexBoxContainer\"\n }, /*#__PURE__*/React.createElement(SlideCarousel, {\n items: this.props.settings.children,\n details: this.state.bssProgramDetails,\n slides: Math.min(this.props.settings.children.length, SlideCount.MAX_SLIDE)\n }));\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"bss-learn-more\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"button dark-bg\",\n href: this.props.settings.readMoreLink.url\n }, this.props.settings.readMoreText));\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(Loader, {\n show: this.state.showLoader,\n message: spinner,\n contentBlur: loaderOpacity,\n backgroundStyle: loaderBackgroundStyle\n }, this.renderView()));\n }\n }]);\n}(React.Component);\nBSSDetailsSpot.propTypes = {\n settings: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nBSSDetailsSpot.defaultProps = {};\nnew WDHBSSDetailsSpot().run();","var SlideCount = {\n MAX_SLIDE: 4\n};\nvar blankModel = {\n Message: null,\n saleForceId: null,\n birthDay: null,\n birthMonth: null,\n businessEmailAddress: null,\n contactAccountRelationShipId: null,\n dispenseHearingAids: null,\n faxNumber: null,\n firstName: null,\n homePhone: null,\n influenceLevel: null,\n lastName: null,\n mobilePhone: null,\n navContactId: null,\n personalEmailAddress: null,\n primaryAccountId: null,\n primaryAccountNumber: null,\n relatedAccounts: null,\n selectedAccountNumber: null,\n selectedAccountSalesForceId: null,\n selectedFunction: null,\n workPhone: null\n};\nvar relatedAccountsBlankModel = {\n relationship: [{\n accountNumber: null,\n addressLine1: null,\n addressLine2: null,\n city: null,\n oticonNewsDirectMail: null,\n oticonNewsEmail: null,\n productInformationDirectMail: null,\n productInformationEmail: null,\n salesFunction: null,\n seminarEventsDirectMail: null,\n seminarEventsEmail: null,\n state: null,\n zipCode: null,\n salesForceBrandRelationShipId: null\n }]\n};\nexport default SlideCount;\nexport { blankModel, relatedAccountsBlankModel };"],"names":["GetBox","props","dispLabel","dispVal","helpTxt","className","type","propTypes","isRequired","defaultProps","divWrapperCssClasses","settings","dots","infinite","speed","slidesToShow","slidesToScroll","responsive","breakpoint","SlideCarousel","slides","items","map","item","itemval","details","fieldName","includes","parseInt","val","toLocaleString","decimals","exec","padding","length","concat","indexOf","key","itemInfo","id","label","helpText","component","settingsElement","querySelector","JSON","parse","textContent","e","error","name","message","Object","assign","_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","a","n","TypeError","_defineProperties","r","t","enumerable","configurable","writable","defineProperty","_toPropertyKey","_createClass","i","toPrimitive","call","String","Number","_toPrimitive","_callSuper","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","apply","Boolean","valueOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_inherits","create","value","_setPrototypeOf","WDHBSSDetailsSpot","_WDHComponent","arguments","undefined","this","BSSDetailsSpot","_React$Component","_this","state","bssProgramDetails","showLoader","getData","endpoint","url","iterationCount","_this2","_this$props$settings","sessionDetails","document","getElementById","innerHTML","config","toLowerCase","A","getConfig","getUSCustomersServiceEndPoint","token","then","response","data","status","setTimeout","setState","_data$rebateDetails","rebateDetails","catch","err","console","_this3","children","every","childItem","hasOwnProperty","isNullOrEmptyString","isNullOrEmptyNumber","hasData","Math","min","MAX_SLIDE","href","readMoreLink","readMoreText","show","contentBlur","backgroundStyle","renderView","run","blankModel","Message","saleForceId","birthDay","birthMonth","businessEmailAddress","contactAccountRelationShipId","dispenseHearingAids","faxNumber","firstName","homePhone","influenceLevel","lastName","mobilePhone","navContactId","personalEmailAddress","primaryAccountId","primaryAccountNumber","relatedAccounts","selectedAccountNumber","selectedAccountSalesForceId","selectedFunction","workPhone"],"sourceRoot":""}