{"version":3,"sources":["UI/Icons.js","containers/logic.js","containers/config.js","containers/Form.js","components/DistributionType.js","components/DownlightSpecification.js","components/UplightSpecification.js","UI/Popup.js","UI/Debug.js","containers/service.js","fonts/SinkinSans-700Bold-webfont.woff","fonts/SinkinSans-200XLight-webfont.woff","fonts/SinkinSans-400Regular-webfont.woff","UI/Checkbox.js","components/Details.js","UI/Button.js","components/Download.js","UI/Notify.js","components/File.js","UI/Spinner.js","UI/Loader.js","styles/theme.js","UI/Box.js","context/OptionsContext.js","context/createDataContext.js","UI/WebsiteHeader.js","UI/NavMobile.js","UI/Header.js","components/Footer.js","App.js","styles/cssReset.js","components/hooks.js","serviceWorker.js","index.js","UI/TextBox.js","UI/FieldError.js","components/ScrollToError.js","components/TextControl.js","UI/RadioButton.js","UI/RadioImageButton.js","UI/Layout.js","UI/PopUpContent.js","services/popup.service.js","containers/ErrorContext.js","UI/Label.js"],"names":["SVGQuestion","width","height","viewBox","d","CloseSquare","fill","fillRule","clipRule","getChanges","state","field","value","updates","FIELD","distribution","defaultState","DISTRIBUTION","UP","upLumens","uplight","email","downDistribution","fixtureWidth","shouldEnable55","upDistribution","shouldEnable65","downlight","downLumens","upInputMode","INPUT_MODE","RADIO","Math","round","downInputMode","shouldEnable108","Number","getPostData","data","source","process","fileType","fixtureLength","isTopMostError","error","errors","errorOrder","getErrorPosition","findIndex","e","lowestPositionError","Object","keys","reduce","position","errorPosition","length","validateField","submitted","includes","lumens","getFieldValue","DOWN","UP_DOWN","match","emailRegex","parseInt","validateForm","initialErrors","reducer","disableLouvre","UpOrDownTypes","disabled","computed","slice","louvre","find","item","id","LIGHT_TYPE","LOUVRE","shouldDisableLouvre","profileWidth","shouldDisabled","enable55","profileWidths","enable","updatedProfileWidths","w","shouldEnable","SATIN","disableMicroprism","DownTypes","microprism","MICROPRISM","shouldDisableMicroprism","disableCeilingWash","UpTypes","ceilingWash","CEILING_WASH","shouldDisableCeilingWash","enable65","disableSatinUp","satinUp","shouldDisableSatinUp","enable108","errorHandler","message","response","console","info","status","headers","request","config","LOCAL_STORAGE_REMEMBER","LOCAL_STORAGE_EMAIL","DOUBLE_WASH","WALL_WASH","FILE","SLIDER","TEXT","distributionTypes","url","downlightTypes","label","lumensOutputs","btnLabel","fileTypes","uplightTypes","uplightOptions","FileDownload","require","Form","env","REACT_APP_HOST_ENV","useState","loading","toggleLoading","showPopup","togglePopup","setErrors","JSON","parse","localStorage","getItem","rememberMe","setRemember","setState","popupService","popup$","subscribe","content","useEffect","hotjar","initialize","REACT_APP_HOTJAR_SITE_ID","setItem","removeItem","onChangeHandler","updateField","newState","hasFormErrors","msg","onClose","Provider","onChange","downlightTypeChanged","downlightChanged","downlightLumensChanged","inputModeChanged","uplightTypeChanged","uplightChanged","uplightLumensChanged","fileLengthChanged","fileTypeChanged","profileChanged","emailChanged","rememberMeChanged","remember","text","onDownload","a","async","canSubmit","log","ReactGA","event","category","action","downloadFile","photometry","window","scrollTo","showErrorPopUp","fileName","replace","DistributionType","useContext","OptionsContext","options","updateProfileWidths","title","onOptionClick","selected","DownlightSpecification","updateDistributionType","mode","setMode","collapsed","gap","maxWidth","onEnable","errorKey","Note","styled","p","UplightSpecification","isDisDown","isDisUp","isDisUpDown","lightOutputLabel","up","down","isNaN","totalLumens","Container","div","props","offset","ClickShield","Inner","Close","theme","ACTIVE_STATE","Popup","children","document","body","style","overflow","documentElement","scrollTop","onClick","Th","td","Debug","postData","defaultValue","axios","post","module","exports","CheckboxContainer","Icon","svg","HiddenCheckbox","input","attrs","type","StyledCheckbox","checked","LabelText","span","Checkbox","className","points","Details","Box","TextControl","BaseButton","button","background","color","fontSize","padding","LargeBlueButton","Button","Wrapper","display","showHelpPopUp","data-tip","borderColor","Card","size","active","P","Title","Bar","BtnClose","Notify","notes","isActive","isControlled","setActive","map","note","index","key","File","hasLengthTips","RadioButton","bounce","keyframes","BounceOne","BounceTwo","Spinner","Message","Loader","orange","defaultTheme","BACKGROUND","BUTTON_PRIMARY_BG","BUTTON_PRIMARY_FG","CHECKBOX_CHECKED","CHECKBOX_UNCHECKED","CONTAINER_MAX_WIDTH","CONTAINER_WIDTH","HOVER_STATE","INFO_ICON","INFO_TOOLTIP_BG","NAVBAR_BG","NAVBAR_TEXT","LABEL_UNDERLINE","SLIDER_BG","SLIDER_DISABLED","SLIDER_FG","TEXT_COLOR","BoxShadow","BoxHeader","BoxContent","BoxTitle","actions","initialState","Context","React","createContext","useReducer","dispatch","boundActions","createDataContext","isLouvreDisabled","payload","isMicroprismDisabled","isSatinUpDisabled","isCeilingWashDisabled","routes","pathname","Header","titleCategory","cx","invisible","href","target","rel","LogoEL","xmlns","NavMobile","isNavOpen","setIsNavOpen","CloseButton","stroke","strokeWidth","strokeLinecap","strokeLinejoin","HomeButton","titleProduct","titleBtn","WebsiteHeader","fontFamily","MenuHamburger","Ul","ul","Link","Footer","GlobalStyle","createGlobalStyle","SinkinSansRegular","SinkinSansBold","SinkinSansLight","AppContainer","AppBody","App","setCollapsed","ref","useRef","entry","elementRef","threshold","root","rootMargin","freezeOnceVisible","setEntry","frozen","isIntersecting","updateEntry","node","current","IntersectionObserver","observer","observe","disconnect","stringify","useIntersectionObserver","pageview","location","search","Boolean","hostname","ReactDOM","render","getElementById","navigator","serviceWorker","ready","then","registration","unregister","Input","TextBox","onSelect","placeholder","required","ScrollToError","errorEl","middle","findDOMNode","getBoundingClientRect","top","pageYOffset","innerHeight","left","behavior","FieldError","marginTop","Label","ErrorContext","verticalCenter","Option","greyOut","BtnLabel","ButtonLabel","option","handleClick","ImageContainer","Image","RadioImageButton","Row","Col","Text","h3","Img","img","ErrorContent","HelpContent","src","subject","Subject","showPopUp","next","closePopUp","asObservable"],"mappings":"4GAAA,wFAEaA,EAAc,kBACzB,yBAAKC,MAAM,OAAOC,OAAO,OAAOC,QAAQ,aACtC,2BACE,0BACEC,EAAE,oMAGJ,0BACEA,EAAE,sSAIJ,0BACEA,EAAE,mgCAeGC,EAAc,kBACzB,yBAAKJ,MAAM,OAAOC,OAAO,O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\n)\n\nexport const CloseSquare = () => (\n \n \n \n \n \n)\n","import {\n defaultState,\n emailRegex,\n FIELD,\n INPUT_MODE,\n DISTRIBUTION,\n LIGHT_TYPE,\n} from './config'\n\nexport const getChanges = (state, field, value) => {\n // update the field that actually changed\n let updates = {\n [field]: value,\n }\n\n // Update any other fields the need to change\n switch (field) {\n case FIELD.distribution:\n // Whenever the distribution changes we RESET the form\n // But we still need to set enable55 appropriately for the current value\n updates = {\n ...defaultState,\n [field]: value,\n ...(value === DISTRIBUTION.UP && {\n upLumens: 2000,\n uplight: 2000,\n }),\n email: state.email,\n }\n break\n case FIELD.downDistribution:\n if (\n state.fixtureWidth === 55 &&\n !shouldEnable55(state.distribution, value, state.upDistribution)\n ) {\n updates.fixtureWidth = 75\n }\n if (\n state.fixtureWidth === 65 &&\n !shouldEnable65(state.distribution, value, state.upDistribution)\n ) {\n updates.fixtureWidth = 75\n }\n break\n case FIELD.downlight:\n // UI: Sync downLumens with downlight\n updates[FIELD.downLumens] = value\n // Business Logic: upLumens reacts on downLumens\n if (state.upInputMode === INPUT_MODE.RADIO)\n updates[FIELD.upLumens] = Math.round(value * state.uplight)\n break\n case FIELD.downLumens:\n // Business Logic: upLumens reacts on downLumens\n if (state.upInputMode === INPUT_MODE.RADIO)\n updates[FIELD.upLumens] = Math.round(value * state.uplight)\n break\n case FIELD.downInputMode:\n if (value === INPUT_MODE.RADIO) {\n updates[FIELD.downLumens] = state[FIELD.downLumens]\n updates.downLumens = updates.downlight || state.downlight\n if (state.upInputMode === INPUT_MODE.RADIO) {\n updates.upLumens = Math.round(updates.downLumens * state.uplight)\n }\n }\n break\n case FIELD.upDistribution:\n if (\n state.fixtureWidth === 55 &&\n !shouldEnable55(state.distribution, value, state.upDistribution)\n ) {\n updates.fixtureWidth = 75\n }\n if (\n state.fixtureWidth === 65 &&\n !shouldEnable65(state.distribution, value, state.upDistribution)\n ) {\n updates.fixtureWidth = 75\n }\n if (\n state.fixtureWidth === 108 &&\n !shouldEnable108(state.distribution, value)\n ) {\n updates.fixtureWidth = 75\n }\n break\n case FIELD.uplight:\n if (state.distribution === DISTRIBUTION.UP) {\n updates.upLumens = value\n } else {\n updates.upLumens = Math.round(state.downLumens * value)\n }\n break\n case FIELD.upLumens:\n updates.upLumens = Number(updates.upLumens)\n break\n case FIELD.upInputMode:\n if (value === INPUT_MODE.RADIO) {\n if (state.distribution === DISTRIBUTION.UP) {\n // Reset uplight to default state\n if (updates.uplight < 1) {\n updates.uplight = 2000\n updates.upLumens = 2000\n } else {\n updates.upLumens = state.uplight\n }\n } else {\n updates.upLumens = state.downLumens * state.uplight\n }\n }\n break\n default:\n break\n }\n\n return {\n ...state,\n ...updates,\n }\n}\n\nexport const getPostData = state => {\n // Covert State to API Body\n const data = {\n source: process.env.REACT_APP_NAME,\n distribution: state.distribution,\n downDistribution: state.downDistribution,\n downLumens: state.downLumens,\n email: state.email,\n fileType: state.fileType,\n fixtureLength: state.fixtureLength,\n fixtureWidth: state.fixtureWidth,\n upDistribution: state.upDistribution,\n upLumens: state.upLumens,\n }\n\n // Remove unnecessary properties in POST request\n if (data.distribution === 'down') {\n delete data.upDistribution\n delete data.upLumens\n } else if (data.distribution === 'up') {\n delete data.downDistribution\n delete data.downLumens\n }\n\n return data // just the stuff we want to post\n}\n\n// Determine if the supplied error key is for the topmost (visible) error on the page\nexport const isTopMostError = (error, errors) => {\n // list of all possible errors on the page, listed in order of display on the page\n // E.g. downLumens is displayed at top of page, email at the bottom\n const errorOrder = [\n FIELD.downLumens,\n FIELD.upLumens,\n FIELD.fixtureLength,\n FIELD.email,\n ]\n const getErrorPosition = error => errorOrder.findIndex(e => e === error)\n //const reducer = (accumulator, currentValue) => accumulator + currentValue;\n const reducer = (position, error) => {\n const errorPosition = getErrorPosition(error)\n return errorPosition < position ? errorPosition : position\n }\n const errorKeys = Object.keys(errors)\n const lowestPositionError = errorKeys.reduce(reducer, errorOrder.length)\n const thisErrorPosition = getErrorPosition(error)\n return thisErrorPosition === lowestPositionError\n}\n\nexport const validateField = (state, errors, field, submitted = false) => {\n if (\n !submitted &&\n [\n FIELD.downLumens,\n FIELD.upLumens,\n FIELD.fixtureLength,\n FIELD.email,\n ].includes(field)\n ) {\n // we don't validate these fields until the user submits\n // as it happens, this is currently now ALL fields, but leave as is,\n // so can have other fields validate immediately\n return errors\n }\n const getFieldValue = field => state[field]\n\n let lumens\n\n switch (field) {\n case FIELD.downLumens:\n if (\n state.distribution === DISTRIBUTION.DOWN ||\n state.distribution === DISTRIBUTION.UP_DOWN\n ) {\n lumens = getFieldValue(field)\n\n if (!lumens) {\n delete errors[field]\n } else if (lumens < 900 || lumens > 4000) {\n errors[field] = 'Value must be between 900 and 4000'\n } else {\n delete errors[field]\n }\n }\n\n break\n case FIELD.upLumens:\n if (\n state.distribution === DISTRIBUTION.UP ||\n state.distribution === DISTRIBUTION.UP_DOWN\n ) {\n lumens = getFieldValue(field)\n if (!lumens) {\n delete errors[field]\n } else if (lumens < 300 || lumens > 4000) {\n errors[field] = 'Value must be between 300 and 4000'\n } else {\n delete errors[field]\n }\n }\n\n break\n\n case FIELD.email:\n let email = getFieldValue(field)\n if (!email) {\n errors[field] = 'This field is required'\n } else {\n const match = email.match(emailRegex)\n if (match) {\n delete errors[field]\n } else {\n errors[field] = 'Please enter a valid email'\n }\n }\n break\n\n case FIELD.fixtureLength:\n let fixtureLength = getFieldValue(field)\n if (!fixtureLength) {\n errors[field] = 'This field is required'\n } else if (parseInt(fixtureLength) === 0) {\n errors[field] = 'Fixture Length must be greater than 0'\n } else {\n delete errors[field]\n }\n break\n\n default:\n break\n }\n\n return errors\n}\n\n/**\n * test all specified fields for errors\n * these are the fields we know might have errors\n * this guards against email being empty to start with for example\n */\nexport const validateForm = (state, submitted = false) => {\n const initialErrors = {\n ...state.errors,\n }\n\n const reducer = (errors, field) =>\n validateField(state, errors, field, submitted)\n\n // Note: that some fields will not be validated if submitted is FALSE,\n // see validateField()\n return [\n FIELD.downLumens,\n FIELD.upLumens,\n FIELD.email,\n FIELD.fixtureLength,\n ].reduce(reducer, initialErrors)\n}\n\nexport const disableLouvre = (UpOrDownTypes, disabled) => {\n const computed = UpOrDownTypes.slice()\n const louvre = computed.find(item => item.id === LIGHT_TYPE.LOUVRE)\n if (louvre) louvre.disabled = disabled\n return computed\n}\n\nexport const shouldDisableLouvre = profileWidth => {\n let shouldDisabled = false\n if ([55, 65].includes(profileWidth)) shouldDisabled = true\n\n return shouldDisabled\n}\n\nexport const enable55 = (profileWidths, enable) => {\n const updatedProfileWidths = profileWidths.slice()\n const profile55 = updatedProfileWidths.find(w => w.id === 55)\n profile55.disabled = !enable\n return updatedProfileWidths\n}\n\nexport const shouldEnable55 = (\n distribution,\n downDistribution,\n upDistribution\n) => {\n let shouldEnable = false\n\n if (distribution === DISTRIBUTION.DOWN) {\n shouldEnable = downDistribution === LIGHT_TYPE.SATIN\n }\n if (distribution === DISTRIBUTION.UP) {\n shouldEnable = upDistribution === LIGHT_TYPE.SATIN\n }\n if (distribution === DISTRIBUTION.UP_DOWN) {\n shouldEnable =\n downDistribution === LIGHT_TYPE.SATIN &&\n upDistribution === LIGHT_TYPE.SATIN\n }\n\n return shouldEnable\n}\n\nexport const disableMicroprism = (DownTypes, disabled) => {\n const computed = DownTypes.slice()\n const microprism = computed.find(item => item.id === LIGHT_TYPE.MICROPRISM)\n if (microprism) microprism.disabled = disabled\n return computed\n}\n\nexport const shouldDisableMicroprism = profileWidth => {\n let shouldDisabled = false\n if ([55, 108].includes(profileWidth)) shouldDisabled = true\n\n return shouldDisabled\n}\n\nexport const disableCeilingWash = (UpTypes, disabled) => {\n const computed = UpTypes.slice()\n const ceilingWash = computed.find(item => item.id === LIGHT_TYPE.CEILING_WASH)\n if (ceilingWash) ceilingWash.disabled = disabled\n return computed\n}\n\nexport const shouldDisableCeilingWash = profileWidth => {\n let shouldDisabled = false\n if ([55].includes(profileWidth)) shouldDisabled = true\n\n return shouldDisabled\n}\n\nexport const enable65 = (profileWidths, enable) => {\n const updatedProfileWidths = profileWidths.slice()\n const profile65 = updatedProfileWidths.find(w => w.id === 65)\n profile65.disabled = !enable\n return updatedProfileWidths\n}\n\nexport const shouldEnable65 = (\n distribution,\n downDistribution,\n upDistribution\n) => {\n let shouldEnable = false\n\n if (distribution === DISTRIBUTION.DOWN) {\n shouldEnable = downDistribution !== LIGHT_TYPE.LOUVRE\n }\n if (distribution === DISTRIBUTION.UP) {\n shouldEnable = upDistribution === LIGHT_TYPE.CEILING_WASH\n }\n if (distribution === DISTRIBUTION.UP_DOWN) {\n shouldEnable =\n downDistribution !== LIGHT_TYPE.LOUVRE &&\n upDistribution === LIGHT_TYPE.CEILING_WASH\n }\n\n return shouldEnable\n}\n\nexport const disableSatinUp = (UpTypes, disabled) => {\n const computed = UpTypes.slice()\n const satinUp = computed.find(item => item.id === LIGHT_TYPE.SATIN)\n if (satinUp) satinUp.disabled = disabled\n return computed\n}\n\nexport const shouldDisableSatinUp = profileWidth => {\n let shouldDisabled = false\n if ([65].includes(profileWidth)) shouldDisabled = true\n\n return shouldDisabled\n}\n\nexport const enable108 = (profileWidths, enable) => {\n const updatedProfileWidths = profileWidths.slice()\n const profile108 = updatedProfileWidths.find(w => w.id === 108)\n profile108.disabled = !enable\n return updatedProfileWidths\n}\n\nexport const shouldEnable108 = (distribution, downDistribution) => {\n let shouldEnable = false\n\n if (distribution === DISTRIBUTION.DOWN) {\n shouldEnable = downDistribution !== LIGHT_TYPE.MICROPRISM\n }\n if (distribution === DISTRIBUTION.UP) {\n shouldEnable = true\n }\n if (distribution === DISTRIBUTION.UP_DOWN) {\n shouldEnable = downDistribution !== LIGHT_TYPE.MICROPRISM\n }\n\n return shouldEnable\n}\n\n/**\n * A errorHandler function\n * Handle Axios request error\n * Handle Javascript Error instance\n * Handle Javascript TypeError\n * Handle Any error and return default error message\n * @param {Object || Any} error\n * @returns {String}\n */\nexport const errorHandler = (\n error,\n message = 'An error occurred, please try again later'\n) => {\n if (!error) return message\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n console.info(error.response.data)\n console.info(error.response.status)\n console.info(error.response.headers)\n if (error.response.data.error) {\n if (typeof error.response.data.error === 'string') {\n message = error.response.data.error\n }\n }\n return message\n }\n if (error.request) {\n // The request was made but no response was received\n // `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n // http.ClientRequest in node.js\n console.info(error.request)\n return message\n }\n // Something happened in setting up the request that triggered an Error\n if (error.config) console.info(error.config)\n if (error.message) {\n console.info(error.message)\n if (typeof error.message === 'string') {\n message = error.message\n }\n }\n return message\n}\n","export const LOCAL_STORAGE_REMEMBER = 'energyline.remember'\nexport const LOCAL_STORAGE_EMAIL = 'energyline.email'\n\nexport const FIELD = {\n // Type\n distribution: 'distribution',\n // Downlight\n downDistribution: 'downDistribution',\n downlight: 'downlight',\n downLumens: 'downLumens',\n // Uplight\n upDistribution: 'upDistribution',\n uplight: 'uplight',\n upLumens: 'upLumens',\n // File\n fileType: 'fileType',\n fixtureLength: 'fixtureLength',\n fixtureWidth: 'fixtureWidth',\n // UI\n downInputMode: 'downInputMode',\n upInputMode: 'upInputMode',\n // Misc\n email: 'email',\n errors: 'errors',\n}\n\nexport const DISTRIBUTION = {\n UP_DOWN: 'up_down',\n UP: 'up',\n DOWN: 'down',\n}\nexport const LIGHT_TYPE = {\n CEILING_WASH: 'ceiling wash',\n DOUBLE_WASH: 'double wash',\n LOUVRE: 'louvre',\n MICROPRISM: 'micro prism',\n SATIN: 'satin',\n WALL_WASH: 'wall wash',\n}\nexport const FILE = {\n IES: 'ies',\n LDT: 'ldt',\n}\nexport const INPUT_MODE = {\n SLIDER: 'slider',\n RADIO: 'radio',\n TEXT: 'textcontrol',\n}\n\nexport const defaultState = {\n // Type\n [FIELD.distribution]: DISTRIBUTION.UP_DOWN,\n // Downlight\n [FIELD.downDistribution]: LIGHT_TYPE.SATIN,\n [FIELD.downlight]: 2000,\n [FIELD.downLumens]: 2000,\n // Uplight\n [FIELD.upDistribution]: LIGHT_TYPE.SATIN,\n [FIELD.uplight]: 0.3,\n [FIELD.upLumens]: 600,\n // File\n [FIELD.fixtureLength]: 1000,\n [FIELD.fixtureWidth]: 75,\n [FIELD.fileType]: FILE.IES,\n // UI\n [FIELD.downInputMode]: INPUT_MODE.RADIO,\n [FIELD.upInputMode]: INPUT_MODE.RADIO,\n // Misc\n [FIELD.email]: '',\n [FIELD.errors]: {},\n}\n\nexport const distributionTypes = [\n { url: '../images/down.png', id: DISTRIBUTION.DOWN },\n { url: '../images/up-down.png', id: DISTRIBUTION.UP_DOWN },\n { url: '../images/up.png', id: DISTRIBUTION.UP },\n]\n\nexport const downlightTypes = [\n {\n url: '../images/satin.svg',\n id: LIGHT_TYPE.SATIN,\n label: 'Satin Diffuser',\n },\n {\n url: '../images/65-microprism.png',\n id: LIGHT_TYPE.MICROPRISM,\n label: 'Microprism Diffuser',\n },\n {\n url: '../images/louvre.svg',\n id: LIGHT_TYPE.LOUVRE,\n label: 'Louvre',\n },\n {\n url: '../images/wall-wash.svg',\n id: LIGHT_TYPE.WALL_WASH,\n label: 'Wall Wash',\n },\n {\n url: '../images/double-wash.svg',\n id: LIGHT_TYPE.DOUBLE_WASH,\n label: 'Double Wash',\n },\n]\n\nexport const lumensOutputs = [\n {\n id: 1000,\n btnLabel: 1000,\n },\n {\n id: 1500,\n btnLabel: 1500,\n },\n {\n id: 2000,\n btnLabel: 2000,\n },\n {\n id: 2500,\n btnLabel: 2500,\n },\n {\n id: 3000,\n btnLabel: 3000,\n },\n]\n\nexport const fileTypes = [\n {\n id: FILE.IES,\n btnLabel: 'IES',\n label: 'Optimised For AGI',\n },\n {\n id: FILE.LDT,\n btnLabel: 'LDT',\n label: 'Optimised For Dialux',\n },\n]\n\nexport const profileWidths = [\n {\n id: 55,\n btnLabel: 55,\n disabled: false,\n },\n {\n id: 65,\n btnLabel: 65,\n disabled: false,\n },\n {\n id: 75,\n btnLabel: 75,\n disabled: false,\n },\n {\n id: 108,\n btnLabel: 108,\n disabled: false,\n },\n]\n\nexport const uplightTypes = [\n {\n url: '../images/satin-up.png',\n id: LIGHT_TYPE.SATIN,\n label: 'Satin Diffuser',\n },\n {\n url: '../images/ceiling-wash.png',\n id: LIGHT_TYPE.CEILING_WASH,\n label: 'Ceiling Wash',\n },\n]\n\nexport const uplightOptions = [\n {\n id: 0.3,\n btnLabel: '30%',\n },\n {\n id: 0.5,\n btnLabel: '50%',\n },\n {\n id: 1,\n btnLabel: '100%',\n },\n]\n\nexport const emailRegex = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/ // eslint-disable-line\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useEffect, useState } from 'react'\nimport { hotjar } from 'react-hotjar'\n\nimport Details from '../components/Details'\nimport DistributionType from '../components/DistributionType'\nimport Download from '../components/Download'\nimport DownlightSpecification from '../components/DownlightSpecification'\nimport File from '../components/File'\nimport UplightSpecification from '../components/UplightSpecification'\n\nimport PopUp from '../UI/Popup'\nimport Loader from '../UI/Loader'\nimport Debug from '../UI/Debug'\n\nimport ErrorContext from './ErrorContext'\nimport popupService from '../services/popup.service'\n\nimport ReactGA from 'react-ga'\n\nimport {\n defaultState,\n LOCAL_STORAGE_REMEMBER,\n LOCAL_STORAGE_EMAIL,\n FIELD,\n} from './config'\nimport { getChanges, getPostData, validateForm, errorHandler } from './logic'\nimport { downloadFile } from './service'\n\nconst FileDownload = require('js-file-download')\n\nfunction Form() {\n const env = process?.env?.REACT_APP_HOST_ENV\n const [loading, toggleLoading] = useState(false)\n const [showPopup, togglePopup] = useState(null)\n const [errors, setErrors] = useState(defaultState.errors)\n const [rememberMe, setRemember] = useState(\n JSON.parse(localStorage.getItem(LOCAL_STORAGE_REMEMBER) || false)\n )\n const [state, setState] = useState({\n ...defaultState,\n submitted: false,\n email: localStorage.getItem(LOCAL_STORAGE_EMAIL) || '',\n })\n\n popupService.popup$.subscribe(content => {\n if (content) {\n togglePopup(content)\n } else {\n togglePopup(null)\n }\n })\n\n useEffect(() => {\n hotjar.initialize(process.env.REACT_APP_HOTJAR_SITE_ID, 'n/a')\n }, [])\n\n useEffect(() => {\n // keep the email in sync with local storage\n localStorage.setItem(LOCAL_STORAGE_REMEMBER, rememberMe)\n if (rememberMe && !errors['email']) {\n localStorage.setItem(LOCAL_STORAGE_EMAIL, state.email)\n } else {\n localStorage.removeItem(LOCAL_STORAGE_EMAIL)\n }\n }, [state.email, errors, rememberMe])\n\n useEffect(() => {\n // validate the form after every state change\n setErrors(validateForm(state, state.submitted))\n }, [state])\n\n const handleDownload = async () => {\n const errors = validateForm(state, true)\n const canSubmit = !hasFormErrors(errors)\n\n console.log(errors)\n\n if (canSubmit) {\n ReactGA.event({\n category: 'User',\n action: 'Download Photometry',\n })\n const data = getPostData(state)\n\n toggleLoading(true)\n\n let photometry\n try {\n photometry = await downloadFile(data)\n } catch (e) {\n window.scrollTo(0, 0)\n popupService.showErrorPopUp()\n toggleLoading(false)\n console.error(errorHandler(e))\n }\n toggleLoading(false)\n if (photometry) {\n const fileName = photometry.headers['content-disposition']\n .match(/(?:\"[^\"]*\"|^[^\"]*$)/)[0]\n .replace(/\"/g, '')\n\n FileDownload(photometry.data, fileName)\n }\n } else {\n setState({\n ...state,\n submitted: true,\n })\n setErrors(errors)\n }\n }\n\n const onChangeHandler = field => {\n return value => {\n return updateField(field, value)\n }\n }\n\n const updateField = (field, value) => {\n const newState = getChanges(state, field, value)\n setState({\n ...newState,\n })\n }\n\n const hasFormErrors = errors => Object.keys(errors).length > 0\n return (\n <>\n {loading && }\n {showPopup && (\n togglePopup(null)}>{showPopup}\n )}\n \n \n \n \n \n setRemember(remember)}\n />\n \n {env === 'development' && }\n \n \n )\n}\n\nexport default Form\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useContext, useEffect } from 'react'\n\nimport Box from '../UI/Box'\nimport RadioImageButton from '../UI/RadioImageButton'\nimport { Row, Col } from '../UI/Layout'\nimport { Context as OptionsContext } from '../context/OptionsContext'\n\nconst DistributionType = ({ data, onChange }) => {\n const { state: options, updateProfileWidths } = useContext(OptionsContext)\n\n useEffect(() => {\n // Update business logic\n updateProfileWidths({\n distribution: data.distribution,\n downDistribution: data.downDistribution,\n upDistribution: data.upDistribution,\n })\n }, [data])\n\n return (\n \n \n \n \n \n \n \n )\n}\n\nexport default DistributionType\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useState, useContext, useEffect } from 'react'\n\nimport Box from '../UI/Box'\nimport RadioImageButton from '../UI/RadioImageButton'\nimport { Row, Title, Col } from '../UI/Layout'\nimport RadioButton from '../UI/RadioButton'\n\nimport TextControl from './TextControl'\nimport { Context as OptionsContext } from '../context/OptionsContext'\n\nimport { FIELD, INPUT_MODE, DISTRIBUTION } from '../containers/config'\n\nconst DownlightSpecification = ({\n data,\n downlightTypeChanged,\n downlightChanged,\n downlightLumensChanged,\n inputModeChanged,\n}) => {\n const {\n state: options,\n updateProfileWidths,\n updateDistributionType,\n } = useContext(OptionsContext)\n const [mode, setMode] = useState(INPUT_MODE.RADIO)\n useEffect(() => {\n inputModeChanged(mode)\n }, [mode])\n\n useEffect(() => {\n updateProfileWidths({\n distribution: data.distribution,\n downDistribution: data.downDistribution,\n upDistribution: data.upDistribution,\n })\n\n updateDistributionType({\n profileWidths: data.profileWidths,\n })\n }, [data])\n\n return (\n \n {/* Section 1 */}\n \n \n Distribution\n \n \n \n {/* Section 2 */}\n \n \n Light output (Lumens per metre)\n setMode(INPUT_MODE.RADIO)}\n onOptionClick={downlightChanged}\n selected={data.downlight}\n />\n setMode(INPUT_MODE.TEXT)}\n errorKey={FIELD.downLumens}\n onChange={downlightLumensChanged}\n value={data.downLumens}\n label=\"Or enter custom lumens/m\"\n />\n \n \n \n )\n}\n\nexport default DownlightSpecification\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useState, useContext, useEffect } from 'react'\nimport styled from 'styled-components'\nimport Box from '../UI/Box'\nimport { Row, Title, Col } from '../UI/Layout'\nimport RadioButton from '../UI/RadioButton'\nimport RadioImageButton from '../UI/RadioImageButton'\n\nimport { FIELD, DISTRIBUTION, INPUT_MODE } from '../containers/config'\n\nimport TextControl from './TextControl'\n\nimport { Context as OptionsContext } from '../context/OptionsContext'\n\nconst Note = styled.p`\n font-size: 0.725em;\n margin-top: 0.25em;\n &:first-of-type {\n margin-top: 1em;\n }\n`\n\nconst totalLumens = ({ upLumens, downLumens }) => {\n const up = Number(upLumens)\n const down = Number(downLumens)\n if (Number.isNaN(up) || Number.isNaN(down)) return 0\n return up + down\n}\n\nconst UplightSpecification = ({\n data,\n uplightLumensChanged,\n uplightChanged,\n uplightTypeChanged,\n inputModeChanged,\n}) => {\n const {\n state: options,\n updateProfileWidths,\n updateDistributionType,\n } = useContext(OptionsContext)\n\n const [mode, setMode] = useState(INPUT_MODE.RADIO)\n\n useEffect(() => {\n updateProfileWidths({\n distribution: data.distribution,\n downDistribution: data.downDistribution,\n upDistribution: data.upDistribution,\n })\n updateDistributionType({\n profileWidths: data.fixtureWidth,\n })\n }, [data])\n\n useEffect(() => {\n inputModeChanged(mode)\n }, [mode])\n\n const isDisDown = data.distribution === DISTRIBUTION.DOWN\n const isDisUp = data.distribution === DISTRIBUTION.UP\n const isDisUpDown = data.distribution === DISTRIBUTION.UP_DOWN\n\n const lightOutputLabel = isDisUp\n ? 'Light output (Lumens per metre)'\n : 'Light output (% of Downlight lumens/m)'\n\n return (\n \n {/* Row 1 */}\n \n \n Distribution\n \n \n \n {/* Row 2 */}\n \n \n {lightOutputLabel}\n setMode(INPUT_MODE.RADIO)}\n onOptionClick={uplightChanged}\n selected={data.uplight}\n />\n setMode(INPUT_MODE.TEXT)}\n errorKey={FIELD.upLumens}\n label=\"Or enter custom lumens/m\"\n onChange={uplightLumensChanged}\n value={data.upLumens}\n />\n {data.upInputMode === 'radio' ? (\n Selected output is equivalent to {data.upLumens} lm/m\n ) : null}\n {isDisUpDown && (\n Total luminaire output: {totalLumens(data)} lm/m\n )}\n \n \n \n )\n}\n\nexport default UplightSpecification\n","import React, { useEffect } from 'react'\nimport styled from 'styled-components'\nimport { CloseSquare as CloseIcon } from './Icons'\n\nconst Container = styled.div`\n align-items: center;\n bottom: 0;\n display: flex;\n height: 100vh;\n justify-content: center;\n max-width: 100vw !important;\n position: absolute;\n right: 50%;\n top: ${props => props.offset - 200}px;\n transform: translateX(50%);\n width: 100vw !important;\n z-index: 11;\n`\n\nconst ClickShield = styled.div`\n background: rgba(255, 255, 255, 0.5);\n height: 100vh;\n max-width: 100vw !important;\n position: absolute;\n top: ${props => props.offset}px;\n width: 100vw !important;\n z-index: 10;\n box-shadow: var(--shadow);\n`\n\nconst Inner = styled.div`\n position: relative;\n background: white;\n padding: 2rem;\n border: 1px solid black;\n border-radius: 5px;\n max-width: 80% !important;\n z-index: 11;\n`\n\nconst Close = styled.div`\n position: absolute;\n top: 1rem;\n right: 1rem;\n fill: var(--black);\n &:hover {\n cursor: pointer;\n fill: ${props => props.theme.ACTIVE_STATE};\n }\n`\n\nconst Popup = ({ children, onClose }) => {\n useEffect(() => {\n // on mount\n document.body.style.overflow = 'hidden'\n }, [])\n\n useEffect(\n // on unmount\n () => () => {\n document.body.style.overflow = 'auto'\n },\n []\n )\n const offset = document.documentElement.scrollTop\n return (\n <>\n \n \n \n \n \n \n {children}\n \n \n \n )\n}\n\nexport default Popup\n","import React from 'react'\nimport styled from 'styled-components'\n\nimport { getPostData } from '../containers/logic'\n\nconst Container = styled.div`\n position: fixed;\n background-color: rgba(0, 0, 0, 0.6);\n right: 2%;\n bottom: 2%;\n color: white;\n font-size: 0.75rem;\n font-family: 'Courier New', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,\n Cantarell, Noto Sans, sans-serif;\n padding: 1rem 1.25rem;\n border-radius: 3px;\n z-index: 10;\n width: 340px;\n overflow: hidden;\n box-shadow: var(--shadow);\n`\n\nconst Th = styled.td`\n font-weight: bold;\n text-align: left;\n padding-right: 0.5rem;\n`\n\nconst Debug = ({ data }) => {\n const postData = getPostData(data)\n const {\n source,\n distribution,\n downDistribution,\n downLumens,\n email,\n fileType,\n fixtureLength,\n fixtureWidth,\n upDistribution,\n upLumens,\n } = postData\n const defaultValue = '----------------'\n return (\n \n
\n        \n          \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n            \n              \n              \n            \n          \n        
App Name:{source || defaultValue}
Type:{distribution || defaultValue}
Distribution (Down):{downDistribution || defaultValue}
Lumens (Down):{downLumens || defaultValue}
Distribution (Up):{upDistribution || defaultValue}
Lumens (Up):{upLumens || defaultValue}
Fixture Length:{fixtureLength || defaultValue}
Fixture Width:{fixtureWidth || defaultValue}
File Type:{fileType || defaultValue}
Email:{email || defaultValue}
\n
\n
\n )\n}\n\nexport default Debug\n","import axios from 'axios'\n\nexport const downloadFile = data => {\n const ENDPOINT = process.env.REACT_APP_PHOTOMETRY_API_URL\n const API_KEY = process.env.REACT_APP_PHOTOMETRY_API_KEY\n return axios.post(ENDPOINT, data, { headers: { 'x-api-key': API_KEY } })\n}\n","module.exports = __webpack_public_path__ + \"static/media/SinkinSans-700Bold-webfont.89126d58.woff\";","module.exports = __webpack_public_path__ + \"static/media/SinkinSans-200XLight-webfont.ddc95ebc.woff\";","module.exports = __webpack_public_path__ + \"static/media/SinkinSans-400Regular-webfont.1f41264f.woff\";","import React from 'react'\nimport styled from 'styled-components'\n\nconst CheckboxContainer = styled.label`\n display: flex;\n align-items: center;\n margin: 1rem 0 0;\n`\n\nconst Icon = styled.svg`\n fill: none;\n stroke: white;\n stroke-width: 2px;\n`\n\nconst HiddenCheckbox = styled.input.attrs({ type: 'checkbox' })`\n border: 0;\n clip: rect(0 0 0 0);\n clippath: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n`\n\nconst StyledCheckbox = styled.div`\n display: inline-block;\n width: 1.25rem;\n height: 1.25rem;\n background-color: ${props =>\n props.checked ? 'var(--color-orange)' : 'papayawhip'};\n border-radius: var(--border-radius_sm);\n transition: all 200ms var(--ease-out);\n border: 1px solid var(--color-orange);\n\n ${Icon} {\n display: block;\n visibility: ${props => (props.checked ? 'visible' : 'hidden')};\n }\n`\nconst LabelText = styled.span`\n font-family: var(--font-sans_serif__bold);\n font-size: 0.75rem;\n line-height: 1;\n margin-left: 0.5rem;\n text-transform: uppercase;\n`\n\nconst Checkbox = ({ className, checked, label, ...props }) => (\n \n \n \n \n \n \n \n {label}\n \n)\n\nexport default Checkbox\n","import React from 'react'\n\nimport Box from '../UI/Box'\nimport { Row, Col, Title } from '../UI/Layout'\nimport CheckBox from '../UI/Checkbox'\n\nimport { FIELD } from '../containers/config'\n\nimport TextControl from './TextControl'\n\nconst Details = ({ data, emailChanged, rememberMe, rememberMeChanged }) => {\n const { email } = data\n return (\n \n \n \n Email Address (required)\n \n rememberMeChanged(!rememberMe)}\n label=\"Remember Me\"\n />\n \n \n \n )\n}\n\nexport default Details\n","import React from 'react'\nimport styled from 'styled-components'\n\nconst BaseButton = styled.button.attrs(props => ({\n background: props.background || 'white',\n color: props.color || '#222',\n fontSize: props.fontSize || '8px',\n padding: props.padding || '1rem',\n width: props.width || 'auto',\n}))`\n background: ${props => props.background};\n border: 0 solid #dedede;\n border-radius: 4px;\n color: ${props => props.color};\n display: flex;\n flex: 1;\n font-family: 'SinkinSansRegular';\n font-size: ${props => props.fontSize};\n justify-content: center;\n padding: ${props => props.padding};\n width: ${props => props.width};\n max-width: ${props => props.width};\n opacity: ${props => (props.disabled ? 0.5 : 1)}\n transition: box-shadow 150ms var(--ease-in);\n\n &:hover {\n opacity: ${props => (props.disabled ? 0.5 : 1)}\n cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};\n box-shadow: var(--shadow);\n transition: box-shadow 200ms var(--ease-out);\n }\n`\n\nconst PrimaryButton = props => (\n \n)\n\nconst HomeButton = ({ setIsNavOpen }) => (\n setIsNavOpen(false)}\n href=\"https://www.energyline.net/systems/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n

Back to website

\n \n \n \n \n)\n","import React, { useState } from 'react'\nimport { cx } from '@emotion/css'\nimport WebsiteHeader from './WebsiteHeader'\nimport NavMobile from './NavMobile'\n\nconst Header = ({\n titleCategory = 'Photometry Generator',\n titleProduct = 'Photometry Generator',\n titleBtn = 'Back to Website',\n collapsed = false,\n}) => {\n const [isNavOpen, setIsNavOpen] = useState(false)\n\n return (\n <>\n \n \n \n \n \n {titleCategory && (\n \n {titleCategory}\n \n )}\n
\n \n {titleBtn} \n \n \n \n \n \n
\n \n \n \n \n )\n}\n\nexport default Header\n\nconst MenuHamburger = ({ setIsNavOpen }) => {\n return (\n setIsNavOpen(true)}\n >\n \n \n \n \n )\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport defaultTheme from '../styles/theme'\n\nconst { CONTAINER_MAX_WIDTH } = defaultTheme\n\nconst Container = styled.div`\n background-color: var(--color-info_gray);\n padding: 1rem 0;\n`\n\nconst Ul = styled.ul`\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0 auto;\n width: 80%;\n & > li {\n font-family: var(--font-sans_serif);\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n @media (min-width: ${CONTAINER_MAX_WIDTH}) {\n width: 50%;\n max-width: var(--breakpoint);\n }\n`\n\nconst Link = styled.a`\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n cursor: pointer;\n }\n`\n\nconst Footer = () => (\n \n
    \n
  • Energyline Ltd
  • \n
  • |
  • \n
  • \n \n Privacy Policy\n \n
  • \n
  • |
  • \n
  • All rights reserved
  • \n
\n
\n)\n\nexport default Footer\n","import React from 'react'\nimport styled, { ThemeProvider } from 'styled-components'\nimport { createGlobalStyle } from 'styled-components'\n\nimport Form from './containers/Form'\nimport { Provider as OptionsProvider } from './context/OptionsContext'\nimport Header from './UI/Header'\nimport { useIntersectionObserver } from './components/hooks'\n\nimport cssReset from './styles/cssReset'\nimport SinkinSansBold from './fonts/SinkinSans-700Bold-webfont.woff'\nimport SinkinSansLight from './fonts/SinkinSans-200XLight-webfont.woff'\nimport SinkinSansRegular from './fonts/SinkinSans-400Regular-webfont.woff'\n\nimport Footer from './components/Footer'\nimport theme from './styles/theme'\n\nimport ReactGA from 'react-ga'\n\nimport './styles/tooltips.css'\nimport './styles/variables.css'\n\nconst GlobalStyle = createGlobalStyle`\n ${cssReset}\n\n @font-face {\n font-family: 'SinkinSansRegular';\n src: url(${SinkinSansRegular}) format('woff2');\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n\n @font-face {\n font-family: 'SinkinSansBold';\n src: url(${SinkinSansBold}) format('woff2');\n font-weight: 700;\n font-style: normal;\n font-display: swap;\n }\n\n @font-face {\n font-family: 'SinkinSansLight';\n src: url(${SinkinSansLight}) format('woff2');\n font-weight: 200;\n font-style: normal;\n font-display: swap;\n }\n\n body {\n font-family: var(--font-sans_serif);\n color: ${theme.TEXT_COLOR};\n }\n a {\n color: steelblue;\n }\n\n a:hover {\n text-decoration-color: steelblue;\n }\n`\n\nconst AppContainer = styled.div`\n background-color: ${theme.BACKGROUND};\n width: 100%;\n margin: 0 auto;\n position: relative;\n`\n\nconst AppBody = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n padding-top: 1rem;\n width: ${theme.CONTAINER_WIDTH};\n max-width: ${theme.CONTAINER_MAX_WIDTH};\n margin: 0 auto;\n position: relative;\n z-index: 0;\n @media (max-width: ${theme.CONTAINER_MAX_WIDTH}) {\n width: 96%;\n max-width: 96%;\n }\n`\n\n// Add google analytics tracking\nReactGA.initialize(process.env.REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID)\n\nconst App = () => {\n const [collapsed, setCollapsed] = React.useState(false)\n\n const ref = React.useRef(null)\n const entry = useIntersectionObserver(ref, {\n threshold: 0.7,\n })\n const isIntersecting = entry && entry.isIntersecting\n\n React.useEffect(() => {\n setCollapsed(!isIntersecting)\n }, [isIntersecting])\n\n React.useEffect(() => {\n ReactGA.pageview(window.location.pathname + window.location.search)\n }, [])\n return (\n \n \n \n
\n
\n \n
\n \n