{"version":3,"sources":["../node_modules/react-page-visibility/node_modules/prop-types/index.js","../node_modules/react-page-visibility/node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/react-page-visibility/node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/resolve-pathname/esm/resolve-pathname.js","components/Proposals/CreateProposalTypeScene.tsx","../node_modules/reactstrap/es/ButtonGroup.js","components/Quotations/CreateQuotationMutation.tsx","components/Quotations/QuotationBadges.tsx","components/Quotations/CreateQuotationScene.tsx","components/Quotations/QuotationList/QuotationListActionButtons.tsx","components/Quotations/QuotationList/QuotationListFilterPanel.tsx","components/Quotations/DeleteQuotationMutation.tsx","components/Quotations/DeleteQuotationDropdownItem.tsx","components/Quotations/QuotationList/QuotationListItem.tsx","components/Quotations/QuotationList/index.tsx","components/Quotations/CopyAsNewQuotationScene.tsx","components/Quotations/QuotationListScene.tsx","components/Quotations/QuotationScene/FinanceTabContent.tsx","components/Quotations/QuotationScene/QuotationTabHeaders.tsx","components/Quotations/QuotationScene/VehicleTabContent.tsx","components/Quotations/QuotationScene/index.tsx","components/Quotations/QuotationRouter.tsx","../node_modules/react-page-visibility/dist/es5/PageVisibility.js","../node_modules/react-page-visibility/dist/es5/index.js"],"names":["module","exports","require","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","isAbsolute","pathname","charAt","spliceOne","list","index","i","k","n","length","pop","resolvePathname","to","from","undefined","hasTrailingSlash","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","last","up","part","unshift","result","join","substr","getBreadcrumbData","dealer","quotation","title","id","active","getFullName","retrieveRedirectLink","quotationId","dealerId","CreateProposalTypeScene","match","loggedInUser","loggedInDealerId","roles","includes","UserRoles","params","convertNumber","parseInt","className","loading","data","dealerData","dealerLoading","breadcrumbs","key","sm","ProposalType","INDIVIDUAL","toLowerCase","type","size","color","icon","faUser","BUSINESS","faBuilding","propTypes","tag","tagPropType","cssModule","role","vertical","ButtonGroup","Tag","attributes","_objectWithoutPropertiesLoose","classes","mapToCssModules","classNames","React","createElement","_extends","defaultProps","CREATE_QUOTATION","gql","QuotationFragment","CREATE_MANN_ISLAND_QUOTATION","CreateMannIslandMutation","children","mutation","useMannIslandCreateQuotation","useMutation","useCreateQuotation","CreateQuotation","QuotationBadges","s","finance","term","productType","monthlyPayment","submittedDate","financeValue","classnames","getShortDateAndTime","moment","isSame","distanceInWords","Date","toUpperCase","slice","formatCurrency","compose","withLoggedInUser","dealerLI","useLoggedInDealer","useParams","history","useHistory","useDealer","mannIslandMutation","client","useApolloClient","some","r","NeedsDealerSigned","showDealerSelect","onSubmitQuotation","isMannIslandDealer","isMultiQuote","vehicle","capId","toString","variables","input","refetchQueries","query","QUOTATION_LIST","page","pageSize","then","created","createMannIslandQuotation","writeFragment","fragment","fragmentName","push","imported","createQuotation","QuotationListActionButtons","checkCanCreate","useLoggedInUser","PermissionModuleNames","Quotations","QuotationListFilterPanel","values","setFieldValue","submitForm","context","isDealer","isAccountManager","ContextNames","DEALER","ACCOUNT_MANAGER","Row","Col","lg","FormGroup","Label","AccountManagerSelect","accountManagerId","onSelectAccountManager","isClearable","DealerSelect","onSelectDealer","DELETE_QUOTATION","DeleteQuotationDropdownItem","refresh","PagedListContext","useDeleteQuotation","message","confirmButtonText","confirmButtonColor","confirm","DropdownItem","onClick","e","preventDefault","stopPropagation","faTrash","QuotationListItem","fullName","checkCanDelete","encodeURIComponent","noGutters","regNo","make","model","cashPrice","partExchangeSettlement","deposit","partExchangeValue","ActionsDropdown","RouterDropdownItem","Proposals","divider","defaultSearchArgs","QuotationList","SearchForm","placeholder","mapQuerystringToValues","qs","mapValuesToQuerystring","defaultValues","fixedValues","filterPanel","formikProps","PagedList","initialValues","getSearchResults","quotations","actionButtonsComponent","listItemComponent","item","withRouter","Container","QuotationQuery","copy","Breadcrumbs","QuotationForm","submitted","rest","lender","CreateQuotationMutation","PageNotFound","QuotationListScene","FinanceTabContent","LoadingSpinner","SummaryRow","value","totalFinance","highlight","arrangementFee","completionFee","interestCharges","totalCharges","balancePayable","totalAmountPayable","ProductTypeEnum","HP","guaranteedFutureValue","aprRate","Math","round","toFixed","QuotationTabHeaders","FullWidthTabHeaders","tabs","path","VehicleTabContent","derivative","dateOfRegistration","format","mileage","maxAnnualMileage","doors","transmission","fuel","QuotationScene","useQuotation","checkIsAuthorized","SceneLoadingSpinner","vehicleText","getSingleLineVehicle","faCopy","PermissionActivityNames","ReadReport","FileDownloadLink","href","config","API_URL","target","faPrint","url","component","TabContentContainer","QuotationRouter","CreateQuotationScene","CopyAsNewQuotationScene","CreateProposalScene","_createClass","defineProperties","descriptor","enumerable","configurable","writable","Object","defineProperty","Constructor","protoProps","staticProps","prototype","_toConsumableArray","arr","Array","isArray","arr2","PageVisibility","_React$Component","instance","TypeError","_classCallCheck","this","_this","self","call","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","state","isSupported","visibility","subClass","superClass","create","constructor","setPrototypeOf","_inherits","handleVisibilityChange","bind","document","addEventListener","event","removeEventListener","_props","onChange","apply","getHandlerArgs","forceUpdate","_props2","Children","only","Component","displayName"],"mappings":"uFAiBEA,EAAOC,QAAUC,EAAQ,KAARA,I,kCCRnB,IAAIC,EAAuBD,EAAQ,MAEnC,SAASE,KACT,SAASC,KACTA,EAAuBC,kBAAoBF,EAE3CJ,EAAOC,QAAU,WACf,SAASM,EAAKC,EAAOC,EAAUC,EAAeC,EAAUC,EAAcC,GACpE,GAAIA,IAAWV,EAAf,CAIA,IAAIW,EAAM,IAAIC,MACZ,mLAKF,MADAD,EAAIE,KAAO,sBACLF,GAGR,SAASG,IACP,OAAOV,EAFTA,EAAKW,WAAaX,EAMlB,IAAIY,EAAiB,CACnBC,MAAOb,EACPc,KAAMd,EACNe,KAAMf,EACNgB,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WW,MAAOrB,KAAKiB,0BAEzD,CACClR,IAAK,yBACLwL,MAAO,WAEC,IAAIgG,EAD2B,oBAAxBvB,KAAKzV,MAAMiX,WAIjBD,EAASvB,KAAKzV,OAAOiX,SAASC,MAAMF,EAAQjC,EAAmBoC,gBAEjC,oBAAxB1B,KAAKzV,MAAM0H,UAElB+N,KAAK2B,gBAGd,CACC5R,IAAK,SACLwL,MAAO,WACH,OAAKyE,KAAKzV,MAAM0H,SAImB,oBAAxB+N,KAAKzV,MAAM0H,SAGb+N,KAAKQ,MAAMC,aAIRmB,EAAU5B,KAAKzV,OAAO0H,SAASwP,MAAMG,EAAStC,EAAmBoC,gBAF9D1B,KAAKzV,MAAM0H,WAKnBT,IAAMqQ,SAASC,KAAK9B,KAAKzV,MAAM0H,UAb3B,KAIP,IAAI2P,MAaTjC,EAnEU,CAoEnBnO,IAAMuQ,WAERpC,EAAeqC,YAAc,iBAE7BrC,EAAehP,UAAY,CACvB6Q,SAAUlV,IAAUjB,KACpB4G,SAAU3F,IAAUJ,UAAU,CAACI,IAAUP,KAAMO,IAAUjB,QAG9CsU,QCzFAA","file":"static/js/16.63b29c4b.chunk.js","sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import { faBuilding, faUser } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { RouteComponentProps } from \"react-router\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport {\n Button,\n Card,\n CardBody,\n CardHeader,\n CardTitle,\n Col,\n Container,\n Row\n} from \"reactstrap\";\nimport { convertNumber, getFullName } from \"../../utils\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport DealerQuery from \"../Dealers/DealerQuery\";\nimport { Dealer } from \"../Dealers/types\";\nimport { LoggedInUserProps } from \"../LoggedInUserQuery\";\nimport QuotationQuery from \"../Quotations/QuotationQuery\";\nimport { Quotation } from \"../Quotations/types\";\nimport { UserRoles } from \"../types\";\nimport \"./CreateProposalTypeScene.scss\";\nimport { ProposalType } from \"./types\";\n\nconst getBreadcrumbData = (dealer?: Dealer, quotation?: Quotation) =>\n dealer\n ? [\n { to: \"/\", title: \"Home\" },\n { to: \"/dealers\", title: \"Dealers\" },\n { to: `/dealers/${dealer.id}/proposals`, title: dealer.name },\n {\n to: `/dealers/${dealer.id}/proposals/create`,\n title: \"Proposal type\",\n active: true\n }\n ]\n : quotation\n ? [\n { to: \"/\", title: \"Home\" },\n { to: \"/quotations\", title: \"Quotations\" },\n {\n to: `/quotations/${quotation && quotation.id}`,\n title: (quotation && getFullName(quotation)) || \"Untitled quotation\"\n },\n {\n to: `/quotations/${quotation && quotation.id}/convert`,\n title: \"Proposal type\",\n active: true\n }\n ]\n : [\n { to: \"/\", title: \"Home\" },\n { to: \"/proposals\", title: \"Proposals\" },\n { to: \"/proposals/create\", title: \"Proposal type\", active: true }\n ];\n\nconst retrieveRedirectLink = (quotationId?: number, dealerId?: number) => {\n return dealerId\n ? `/dealers/${dealerId}/proposals/create/`\n : quotationId\n ? `/quotations/${quotationId}/convert/`\n : `/proposals/create/`;\n};\n\ntype CreateProposalTypeSceneProps = RouteComponentProps<{\n dealerId?: string;\n quotationId?: string;\n}> &\n LoggedInUserProps;\n\nconst CreateProposalTypeScene = ({\n match,\n loggedInUser\n}: CreateProposalTypeSceneProps) => {\n const loggedInDealerId =\n loggedInUser &&\n loggedInUser.dealer &&\n loggedInUser.roles.includes(UserRoles.dealer)\n ? loggedInUser.dealer.id\n : undefined;\n\n const dealerId =\n loggedInDealerId || match.params.dealerId\n ? convertNumber(match.params.dealerId)\n : undefined;\n\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n return (\n <>\n \n \n \n \n \n {({ loading, data }) => {\n const quotation =\n data && data.quotation ? data.quotation : undefined;\n\n return (\n \n {({ data: dealerData, loading: dealerLoading }) => {\n const dealer = loggedInDealerId\n ? undefined\n : dealerData && dealerData.dealer;\n return !dealerLoading && !loading ? (\n \n ) : null;\n }}\n \n );\n }}\n \n\n \n \n Choose a proposal type\n \n \n \n \n \n \n \n \n
\n Individual\n \n \n \n \n \n \n \n
\n Business\n \n \n \n
\n
\n
\n
\n \n
\n
\n \n );\n};\n\nexport default CreateProposalTypeScene;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n 'aria-label': PropTypes.string,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n role: PropTypes.string,\n size: PropTypes.string,\n vertical: PropTypes.bool\n};\nvar defaultProps = {\n tag: 'div',\n role: 'group'\n};\n\nvar ButtonGroup = function ButtonGroup(props) {\n var className = props.className,\n cssModule = props.cssModule,\n size = props.size,\n vertical = props.vertical,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"size\", \"vertical\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);\n return React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nButtonGroup.propTypes = propTypes;\nButtonGroup.defaultProps = defaultProps;\nexport default ButtonGroup;","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation,\n} from \"react-apollo\";\nimport { QuotationFragment } from \"./fragments\";\nimport { Quotation, QuotationVariables } from \"./types\";\n\nexport interface CreateQuotationData {\n createQuotation: Quotation;\n}\n\nexport const CREATE_QUOTATION = gql`\n mutation CreateQuotation($input: QuotationInput) {\n createQuotation(input: $input) {\n ...QuotationFragment\n }\n }\n ${QuotationFragment}\n`;\nexport interface CreateMannIslandQuotationData {\n createMannIslandQuotation: Quotation;\n}\n\nexport const CREATE_MANN_ISLAND_QUOTATION = gql`\n mutation CreateMannIslandQuotation($input: QuotationInput) {\n createMannIslandQuotation(input: $input) {\n ...QuotationFragment\n }\n }\n ${QuotationFragment}\n`;\n\nconst CreateQuotation = ({\n children,\n}: {\n children: (\n MutationFunction: MutationFunction,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const CreateMannIslandMutation = ({\n children,\n}: {\n children: (\n MutationFunction: MutationFunction<\n CreateMannIslandQuotationData,\n QuotationVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useMannIslandCreateQuotation = () => {\n const [createQuotation] = useMutation<\n CreateMannIslandQuotationData,\n QuotationVariables\n >(CREATE_MANN_ISLAND_QUOTATION);\n return createQuotation;\n};\n\nexport const useCreateQuotation = () => {\n const [createQuotation] = useMutation<\n CreateQuotationData,\n QuotationVariables\n >(CREATE_QUOTATION);\n return createQuotation;\n};\n\nexport default CreateQuotation;\n","import classnames from \"classnames\";\nimport { distanceInWords } from \"date-fns\";\nimport moment from \"moment\";\nimport * as React from \"react\";\nimport { Badge } from \"reactstrap\";\nimport { formatCurrency, getShortDateAndTime } from \"../../utils\";\nimport { QuotationProps } from \"./types\";\n\nfunction capitalizeFirstLetter(s: string) {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\nconst QuotationBadges = ({\n quotation: {\n finance: { term, productType, monthlyPayment, financeValue },\n submittedDate\n },\n className\n}: QuotationProps & { className?: string }) => (\n
\n {submittedDate ? {getShortDateAndTime(submittedDate)} : null}\n {submittedDate && moment(submittedDate).isSame(moment(), \"day\") ? (\n {`${capitalizeFirstLetter(\n distanceInWords(new Date(), submittedDate)\n )} ago`}\n ) : null}\n {`${term} months ${productType}`}\n {monthlyPayment ? (\n {formatCurrency(monthlyPayment)} p/m\n ) : null}\n
\n);\n\nexport default QuotationBadges;\n","import * as React from \"react\";\nimport { useApolloClient } from \"react-apollo\";\nimport Helmet from \"react-helmet\";\nimport {\n Redirect,\n RouteComponentProps,\n useHistory,\n useParams,\n} from \"react-router\";\nimport { Container } from \"reactstrap\";\nimport { convertNumber } from \"../../utils\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport { useDealer, useLoggedInDealer } from \"../Dealers/DealerQuery\";\nimport { Dealer } from \"../Dealers/types\";\nimport {\n useCreateQuotation,\n useMannIslandCreateQuotation,\n} from \"./CreateQuotationMutation\";\nimport { QuotationFragment } from \"./fragments\";\nimport QuotationForm from \"./QuotationForm\";\nimport { QUOTATION_LIST } from \"./QuotationList/QuotationListQuery\";\nimport { Quotation } from \"./types\";\nimport { LoggedInUserProps, withLoggedInUser } from \"../LoggedInUserQuery\";\nimport { NeedsDealerSigned } from \"../Dealers/dealerSetup\";\nimport { UserRoles } from \"../types\";\nimport { compose } from \"recompose\";\n\nconst getBreadcrumbData = (dealer?: Dealer) =>\n dealer\n ? [\n { to: \"/\", title: \"Home\" },\n { to: \"/dealers\", title: \"Dealers\" },\n { to: `/dealers/${dealer.id}/quotations`, title: dealer.name },\n {\n to: `/dealers/${dealer.id}/quotations/create`,\n title: \"New quotation\",\n active: true,\n },\n ]\n : [\n { to: \"/\", title: \"Home\" },\n { to: \"/quotations\", title: \"Quotations\" },\n { to: \"/quotations/create\", title: \"New quotation\", active: true },\n ];\n\ntype CreateQuotationSceneProps = RouteComponentProps<{}> & LoggedInUserProps;\n\nconst Quotations = ({ loggedInUser }: CreateQuotationSceneProps) => {\n const dealerLI = useLoggedInDealer();\n const params = useParams<{ dealerId?: string }>();\n const history = useHistory();\n const dealerId = params.dealerId ? convertNumber(params.dealerId) : undefined;\n const { loading: dealerLoading, dealer } = useDealer(dealerId);\n const mutation = useCreateQuotation();\n const mannIslandMutation = useMannIslandCreateQuotation();\n const client = useApolloClient();\n\n if (loggedInUser) {\n const isDealer = [UserRoles.dealer].some((r) =>\n loggedInUser.roles.includes(r)\n );\n\n if (isDealer && NeedsDealerSigned(dealerLI.dealer)) {\n return (\n <>\n \n \n );\n }\n }\n\n return (\n <>\n \n New quotation | Eurodrive\n \n \n {!dealerLoading ? (\n \n ) : null}\n {\n const { isMannIslandDealer, isMultiQuote, ...rest } = quotation;\n quotation = rest;\n if (quotation.vehicle)\n quotation.vehicle.capId = quotation.vehicle?.capId?.toString();\n\n if (!isMultiQuote && isMannIslandDealer) {\n return mannIslandMutation({\n variables: { input: quotation },\n refetchQueries: [\n {\n query: QUOTATION_LIST,\n variables: { input: { page: 1, pageSize: 10 } },\n },\n ],\n }).then((result) => {\n if (result && result.data) {\n const created = result.data.createMannIslandQuotation;\n client?.writeFragment({\n id: (created.id || \"\").toString(),\n fragment: QuotationFragment,\n data: created,\n fragmentName: \"QuotationFragment\",\n });\n history.push(`/quotations/${created.id}`);\n }\n });\n } else {\n delete quotation.vehicle?.imported;\n return mutation({\n variables: { input: quotation },\n refetchQueries: [\n {\n query: QUOTATION_LIST,\n variables: { input: { page: 1, pageSize: 10 } },\n },\n ],\n }).then((result) => {\n if (result && result.data) {\n const created = result.data.createQuotation;\n client?.writeFragment({\n id: (created.id || \"\").toString(),\n fragment: QuotationFragment,\n data: created,\n fragmentName: \"QuotationFragment\",\n });\n history.push(`/quotations/${created.id}`);\n }\n });\n }\n }}\n />\n \n \n );\n};\n\nexport default compose(withLoggedInUser)(\n Quotations\n);\n","import * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\n\nconst QuotationListActionButtons = (props: any) => {\n const { checkCanCreate } = useLoggedInUser();\n\n return (\n
\n {checkCanCreate(PermissionModuleNames.Quotations) ? (\n \n New quotation\n \n ) : null}\n
\n );\n};\n\nexport default QuotationListActionButtons;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport { Col, FormGroup, Label, Row } from \"reactstrap\";\nimport AccountManagerSelect from \"../../AccountManagers/AccountManagerSelect\";\nimport DealerSelect from \"../../Dealers/DealerSelect\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport { ContextNames } from \"../../types\";\nimport { QuotationSearchArgs } from \"../types\";\n\nconst QuotationListFilterPanel = ({\n values,\n setFieldValue,\n submitForm,\n context\n}: FormikProps & { context?: ContextNames }) => {\n const { loggedInUser, isDealer, isAccountManager } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n return (\n <>\n {context !== ContextNames.DEALER && !isDealer && (\n <>\n {context !== ContextNames.ACCOUNT_MANAGER && !isAccountManager && (\n \n \n \n \n {\n setFieldValue(\"accountManagerId\", id, false);\n submitForm();\n }}\n isClearable={true}\n />\n \n \n \n )}\n \n \n \n \n {\n setFieldValue(\"dealerId\", id, false);\n submitForm();\n }}\n isClearable={true}\n />\n \n \n \n \n )}\n \n );\n};\n\nexport default QuotationListFilterPanel;\n","import gql from \"graphql-tag\";\nimport * as React from \"react\";\nimport {\n Mutation,\n MutationFunction,\n MutationResult,\n useMutation\n} from \"react-apollo\";\n\ninterface DeleteQuotationData {\n success: boolean;\n}\n\ninterface DeleteQuotationVariables {\n id: number;\n}\n\nexport const DELETE_QUOTATION = gql`\n mutation DeleteQuotation($id: ID!) {\n deleteQuotation(id: $id) {\n success\n }\n }\n`;\n\nconst DeleteQuotationMutation = ({\n children\n}: {\n children: (\n mutationFunction: MutationFunction<\n DeleteQuotationData,\n DeleteQuotationVariables\n >,\n result: MutationResult\n ) => JSX.Element | null;\n}) => {children};\n\nexport const useDeleteQuotation = () => {\n const [deleteQuotation] = useMutation<\n DeleteQuotationData,\n DeleteQuotationVariables\n >(DELETE_QUOTATION);\n return deleteQuotation;\n};\n\nexport default DeleteQuotationMutation;\n","import { faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport { DropdownItem } from \"reactstrap\";\nimport { ConfirmDialog } from \"../Forms/ConfirmDialogProvider\";\nimport { PagedListContext } from \"../PagedList\";\nimport { useDeleteQuotation } from \"./DeleteQuotationMutation\";\n\ninterface DeleteQuotationDropdownItemProps {\n id: number;\n}\n\nconst DeleteQuotationDropdownItem = ({\n id\n}: DeleteQuotationDropdownItemProps) => {\n const { refresh } = React.useContext(PagedListContext);\n const mutation = useDeleteQuotation();\n\n return (\n \n {confirm => (\n {\n e.preventDefault();\n e.stopPropagation();\n\n confirm(() =>\n mutation({\n variables: { id }\n }).then(refresh)\n );\n }}\n >\n Delete\n \n )}\n \n );\n};\n\nexport default DeleteQuotationDropdownItem;\n","import * as React from \"react\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Col, DropdownItem, Row } from \"reactstrap\";\nimport { formatCurrency, getFullName } from \"../../../utils\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport ActionsDropdown from \"../../PagedList/ActionsDropdown\";\nimport { PermissionModuleNames } from \"../../Permissions/types\";\nimport RouterDropdownItem from \"../../RouterDropdownItem\";\nimport { ContextNames } from \"../../types\";\nimport DeleteQuotationDropdownItem from \"../DeleteQuotationDropdownItem\";\nimport QuotationBadges from \"../QuotationBadges\";\nimport { QuotationProps } from \"../types\";\nimport \"./index.scss\";\n\nconst QuotationListItem = ({ quotation, context }: QuotationProps) => {\n const fullName = getFullName(quotation);\n const {\n checkCanCreate,\n checkCanDelete,\n isDealer,\n loggedInUser\n } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n return (\n \n \n \n

\n {fullName ? (\n <>\n {fullName}\n {\", \"}\n \n ) : null}\n {quotation.vehicle && quotation.vehicle.regNo\n ? `${quotation.vehicle.regNo.toUpperCase()}, `\n : null}\n {quotation.vehicle &&\n (quotation.vehicle.make || quotation.vehicle.model)\n ? `${quotation.vehicle.make} ${quotation.vehicle.model}`\n : \"[vehicle unknown]\"}\n

\n {!isDealer && context !== ContextNames.DEALER ? (\n

{quotation.dealer && quotation.dealer.name}

\n ) : null}\n

\n Finance value:{\" \"}\n {formatCurrency(\n (quotation.finance.cashPrice || 0) +\n (quotation.finance.partExchangeSettlement || 0) -\n ((quotation.finance.deposit || 0) +\n (quotation.finance.partExchangeValue || 0))\n )}\n

\n\n \n \n \n \n {checkCanCreate(PermissionModuleNames.Quotations) ? (\n \n Copy as new quotation\n \n ) : null}\n {checkCanCreate(PermissionModuleNames.Proposals) ? (\n \n Convert to new proposal\n \n ) : null}\n {checkCanDelete(PermissionModuleNames.Quotations) ? (\n <>\n \n \n \n ) : null}\n \n \n
\n \n );\n};\n\nexport const QuotationListItemLoadingPlaceholder = () => (\n
\n \n
\n);\n\nexport default QuotationListItem;\n","import { FormikProps } from \"formik\";\nimport * as React from \"react\";\nimport SearchForm from \"../../Forms/SearchForm\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport PagedList from \"../../PagedList\";\nimport { ContextNames } from \"../../types\";\nimport { QuotationSearchArgs } from \"../types\";\nimport \"./index.scss\";\nimport QuotationListActionButtons from \"./QuotationListActionButtons\";\nimport QuotationListFilterPanel from \"./QuotationListFilterPanel\";\nimport QuotationListItem from \"./QuotationListItem\";\nimport { QUOTATION_LIST, QuotationListData } from \"./QuotationListQuery\";\n\ninterface QuotationListProps {\n accountManagerId?: string;\n dealerId?: number;\n context?: ContextNames;\n}\n\nconst defaultSearchArgs: QuotationSearchArgs = { page: 1, pageSize: 10 };\n\nconst QuotationList = ({\n accountManagerId,\n dealerId,\n context\n}: QuotationListProps) => {\n const { loggedInUser, isDealer } = useLoggedInUser();\n\n if (!loggedInUser) {\n return null;\n }\n\n return (\n qs}\n mapValuesToQuerystring={values => values}\n defaultValues={defaultSearchArgs}\n fixedValues={{ accountManagerId, dealerId }}\n filterPanel={\n context === ContextNames.DEALER || isDealer\n ? undefined\n : QuotationListFilterPanel\n }\n >\n {(formikProps: FormikProps) => (\n \n data.loggedInUser && data.loggedInUser.quotations\n }\n actionButtonsComponent={QuotationListActionButtons}\n listItemComponent={({ item }) => (\n \n )}\n />\n )}\n \n );\n};\n\nexport default QuotationList;\n","import * as React from \"react\";\nimport { RouteComponentProps, withRouter } from \"react-router\";\nimport { Container } from \"reactstrap\";\nimport { getFullName } from \"../../utils\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport PageNotFound from \"../PageNotFound\";\nimport CreateQuotationMutation, {\n CreateMannIslandMutation,\n} from \"./CreateQuotationMutation\";\nimport { QuotationFragment } from \"./fragments\";\nimport QuotationForm from \"./QuotationForm\";\nimport { QUOTATION_LIST } from \"./QuotationList/QuotationListQuery\";\nimport QuotationQuery from \"./QuotationQuery\";\nimport { Quotation } from \"./types\";\n\nconst getBreadcrumbData = (quotation?: Quotation) => [\n { to: \"/\", title: \"Home\" },\n { to: \"/quotations\", title: \"Quotations\" },\n {\n to: `/quotations/${quotation && quotation.id}`,\n title: (quotation && getFullName(quotation)) || \"Untitled quotation\",\n },\n {\n to: `/quotations/${quotation && quotation.id}/copy`,\n title: \"Copy quotation as new\",\n active: true,\n },\n];\n\nconst CopyAsNewQuotationScene = ({\n history,\n match,\n}: RouteComponentProps<{ quotationId: string }>) => {\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n return (\n \n \n {({ loading, data }) => {\n const quotation = data && data.quotation ? data.quotation : undefined;\n const isMannIslandDealer =\n data?.quotation.dealer?.isMannIslandDealer != null &&\n !!data?.quotation?.dealer?.isMannIslandDealer;\n const isMultiQuote =\n data?.quotation?.dealer?.isMultiQuote != null &&\n !!data?.quotation?.dealer?.isMultiQuote;\n\n const copy = quotation\n ? { ...quotation, isMannIslandDealer }\n : undefined;\n\n if (!loading && !copy) {\n return ;\n }\n return !loading ? (\n <>\n \n {!isMultiQuote && !!isMannIslandDealer ? (\n \n {(mutation, { client }) => (\n {\n const {\n isMannIslandDealer,\n lender,\n isMultiQuote,\n ...rest\n } = submitted;\n submitted = rest;\n\n return mutation({\n variables: { input: submitted },\n refetchQueries: [\n {\n query: QUOTATION_LIST,\n variables: { input: { page: 1, pageSize: 10 } },\n },\n ],\n }).then((result) => {\n if (result && result.data) {\n const created =\n result.data.createMannIslandQuotation;\n client?.writeFragment({\n id: (created.id || \"\").toString(),\n fragment: QuotationFragment,\n data: created,\n fragmentName: \"QuotationFragment\",\n });\n history.push(`/quotations/${created.id}`);\n }\n });\n }}\n />\n )}\n \n ) : (\n \n {(mutation, { client }) => (\n {\n const {\n isMannIslandDealer,\n lender,\n isMultiQuote,\n ...rest\n } = submitted;\n submitted = rest;\n\n return mutation({\n variables: { input: submitted },\n refetchQueries: [\n {\n query: QUOTATION_LIST,\n variables: { input: { page: 1, pageSize: 10 } },\n },\n ],\n }).then((result) => {\n if (result && result.data) {\n const created = result.data.createQuotation;\n client?.writeFragment({\n id: (created.id || \"\").toString(),\n fragment: QuotationFragment,\n data: created,\n fragmentName: \"QuotationFragment\",\n });\n history.push(`/quotations/${created.id}`);\n }\n });\n }}\n />\n )}\n \n )}\n \n ) : null;\n }}\n \n \n );\n};\n\nexport default withRouter(CopyAsNewQuotationScene);\n","import * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { Container } from \"reactstrap\";\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport \"./index.scss\";\nimport QuotationList from \"./QuotationList\";\nimport { QuotationSearchArgs } from \"./types\";\n\ninterface QuotationListProps extends QuotationSearchArgs {\n updateSearchArgs: (args: QuotationSearchArgs) => void;\n}\n\nclass QuotationListScene extends React.Component<\n QuotationListProps,\n { inputBuffer?: string }\n> {\n public render() {\n const breadcrumbs = [\n {\n to: \"/\",\n title: \"Home\"\n },\n { to: \"/quotations\", title: \"Quotations\", active: true }\n ];\n\n return (\n <>\n \n Quotations | Eurodrive\n \n \n \n

Quotations

\n \n
\n \n );\n }\n}\nexport default QuotationListScene;\n","import * as React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport { Col, Row } from \"reactstrap\";\nimport { formatCurrency } from \"../../../utils\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport SummaryRow from \"../../shared/SummarySection/SummaryRow\";\nimport SummaryDisplaySection from \"../../shared/SummarySection/SummarySection\";\nimport { ProductTypeEnum } from \"../../types\";\nimport QuotationQuery from \"../QuotationQuery\";\n\nconst FinanceTabContent = ({\n match,\n}: RouteComponentProps<{ quotationId: string; tab: string }>) => {\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n return (\n \n {({ loading, data }) => {\n if (loading || !data) {\n return ;\n }\n\n if (!data) {\n return null;\n }\n\n const { finance } = data.quotation;\n const { quotation } = data;\n\n return (\n <>\n {finance ? (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {finance.productType !== ProductTypeEnum.HP ? (\n \n ) : null}\n \n {quotation.lender && (\n \n )}\n \n \n \n ) : (\n

Finance data was not completed for this quotation yet.

\n )}\n \n );\n }}\n
\n );\n};\n\nexport default FinanceTabContent;\n","import * as React from \"react\";\nimport FullWidthTabHeaders from \"../../Tabs/FullWidthTabHeaders\";\n\nconst QuotationTabHeaders = () => {\n const tabs = [\n { path: \"\", title: \"Finance\" },\n { path: \"vehicle\", title: \"Vehicle\" }\n ];\n return ;\n};\n\nexport default QuotationTabHeaders;\n","import moment from \"moment\";\nimport * as React from \"react\";\nimport { RouteComponentProps } from \"react-router\";\nimport { Col, Row } from \"reactstrap\";\nimport LoadingSpinner from \"../../LoadingSpinner\";\nimport SummaryRow from \"../../shared/SummarySection/SummaryRow\";\nimport SummaryDisplaySection from \"../../shared/SummarySection/SummarySection\";\nimport QuotationQuery from \"../QuotationQuery\";\n\nconst VehicleTabContent = ({\n match\n}: RouteComponentProps<{ quotationId: string; tab: string }>) => {\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n return (\n \n {({ loading, data }) => {\n if (loading) {\n return ;\n }\n\n if (!data) {\n return null;\n }\n\n const { vehicle } = data.quotation;\n return (\n <>\n {vehicle && vehicle.make && vehicle.model ? (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ) : (\n

Vehicle not specified

\n )}\n \n );\n }}\n
\n );\n};\n\nexport default VehicleTabContent;\n","import { faCopy, faPrint } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport * as React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { Route, RouteComponentProps, Switch } from \"react-router\";\nimport { Link as RouterLink } from \"react-router-dom\";\nimport { Container } from \"reactstrap\";\nimport config from \"../../../config\";\nimport { getFullName, getSingleLineVehicle } from \"../../../utils\";\nimport Breadcrumbs from \"../../Breadcrumbs\";\nimport FileDownloadLink from \"../../FileDownloadLink\";\nimport { useLoggedInUser } from \"../../LoggedInUserQuery\";\nimport PageNotFound from \"../../PageNotFound\";\nimport {\n PermissionActivityNames,\n PermissionModuleNames\n} from \"../../Permissions/types\";\nimport SceneLoadingSpinner from \"../../SceneLoadingSpinner\";\nimport TabContentContainer from \"../../Tabs/TabContentContainer\";\nimport QuotationBadges from \"../QuotationBadges\";\nimport { useQuotation } from \"../QuotationQuery\";\nimport FinanceTabContent from \"./FinanceTabContent\";\nimport \"./index.scss\";\nimport QuotationTabHeaders from \"./QuotationTabHeaders\";\nimport VehicleTabContent from \"./VehicleTabContent\";\n\nconst QuotationScene = ({\n match\n}: RouteComponentProps<{ quotationId: string }>) => {\n const quotationId = match.params.quotationId\n ? parseInt(match.params.quotationId, 10)\n : undefined;\n\n const { loading, quotation } = useQuotation(quotationId);\n const {\n loggedInUser,\n checkCanCreate,\n checkIsAuthorized,\n isDealer\n } = useLoggedInUser();\n\n if (loading || !loggedInUser) {\n return ;\n }\n\n if (!quotation) {\n return ;\n }\n\n const { vehicle, dealer } = quotation;\n const fullName = getFullName(quotation);\n const vehicleText =\n getSingleLineVehicle(vehicle || {}) || \"[Unknown vehicle]\";\n\n const breadcrumbs = [\n {\n to: \"/\",\n title: \"Home\"\n },\n { to: \"/quotations\", title: \"Quotations\" },\n {\n to: `/quotations/${quotation.id}`,\n title: fullName || \"Untitled quotation\",\n active: true\n }\n ];\n\n return (\n <>\n \n \n \n

\n Quotation\n {fullName ? (\n <>\n {\" - \"}\n {fullName}\n \n ) : null}\n

\n
\n {vehicle ? (\n

\n {vehicle.regNo ? `${vehicle.regNo.toUpperCase()}, ` : null}\n {vehicleText}\n

\n ) : null}\n {dealer && !isDealer ? (\n

\n \n {dealer.name}\n \n

\n ) : null}\n
\n \n
\n {checkCanCreate(PermissionModuleNames.Proposals) ? (\n \n Convert to proposal\n \n ) : null}\n {checkCanCreate(PermissionModuleNames.Quotations) ? (\n \n Copy as new\n quotation\n \n ) : null}\n {checkIsAuthorized(\n PermissionModuleNames.Quotations,\n PermissionActivityNames.ReadReport\n ) ? (\n \n \n Print quotation\n \n ) : null}\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default QuotationScene;\n","import * as React from \"react\";\nimport { Route, Switch } from \"react-router-dom\";\nimport CreateProposalScene from \"../Proposals/CreateProposalScene\";\nimport CreateProposalTypeScene from \"../Proposals/CreateProposalTypeScene\";\nimport CopyAsNewQuotationScene from \"./CopyAsNewQuotationScene\";\nimport CreateQuotationScene from \"./CreateQuotationScene\";\nimport QuotationListScene from \"./QuotationListScene\";\nimport QuotationScene from \"./QuotationScene\";\n\nconst QuotationRouter = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default QuotationRouter;\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getHandlerArgs, isSupported, visibility } from './utils';\n\nvar PageVisibility = function (_React$Component) {\n _inherits(PageVisibility, _React$Component);\n\n function PageVisibility(props) {\n _classCallCheck(this, PageVisibility);\n\n var _this = _possibleConstructorReturn(this, (PageVisibility.__proto__ || Object.getPrototypeOf(PageVisibility)).call(this, props));\n\n _this.state = {\n isSupported: isSupported && visibility\n };\n return _this;\n }\n\n _createClass(PageVisibility, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (!this.state.isSupported) {\n return;\n }\n\n this.handleVisibilityChange = this.handleVisibilityChange.bind(this);\n document.addEventListener(visibility.event, this.handleVisibilityChange);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n if (!this.state.isSupported) {\n return;\n }\n document.removeEventListener(visibility.event, this.handleVisibilityChange);\n }\n }, {\n key: 'handleVisibilityChange',\n value: function handleVisibilityChange() {\n if (typeof this.props.onChange === 'function') {\n var _props;\n\n // propagate change to callback\n (_props = this.props).onChange.apply(_props, _toConsumableArray(getHandlerArgs()));\n }\n if (typeof this.props.children === 'function') {\n // we pass the props directly to the function as children\n this.forceUpdate();\n }\n }\n }, {\n key: 'render',\n value: function render() {\n if (!this.props.children) {\n return null;\n }\n // function as children pattern support\n if (typeof this.props.children === 'function') {\n var _props2;\n\n if (!this.state.isSupported) {\n // don't pass any arguments if PageVisibility is not supported\n return this.props.children();\n }\n return (_props2 = this.props).children.apply(_props2, _toConsumableArray(getHandlerArgs()));\n }\n\n return React.Children.only(this.props.children);\n }\n }]);\n\n return PageVisibility;\n}(React.Component);\n\nPageVisibility.displayName = 'PageVisibility';\n\nPageVisibility.propTypes = {\n onChange: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func])\n};\n\nexport default PageVisibility;","import PageVisibility from './PageVisibility';\nexport { default as usePageVisibility } from './usePageVisibility';\n\nexport default PageVisibility;"],"sourceRoot":""}