{"version":3,"sources":["assets/styles/index.scss","app/app.ts","serviceWorker.ts","index.ts","domain/modules/volusion-pages.ts"],"names":["VolusionPages","isOnPackingSlipPage","isOnCartPage","isOnCheckoutPage","isLocalhost","Boolean","window","location","hostname","match","register","config","process","navigator","publicUrl","URL","href","origin","addEventListener","swUrl","checkValidServiceWorker","serviceWorker","ready","then","console","log","registerValidSW","registration","onupdatefound","installingWorker","installing","onstatechange","state","controller","onUpdate","onSuccess","catch","error","fetch","headers","response","contentType","get","status","indexOf","unregister","reload","message","Account","Invoice","Cart","Checkout","Product","PackingSlip","isOnAccountPage","find","x","toLowerCase","isOnInvoicePage","isOnProductPage"],"mappings":";;;;;;;;;;;;;AAAA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACEe,4HAAC,yIACVA,uCAAa,CAACC,mBAAd,EADU,+CAGC,kFAHD,kEAIHD,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AtB,C","file":"static/js/main.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin","import '../assets/styles/index.scss';\nimport { VolusionPages } from \"../domain/modules/volusion-pages\";\nexport default (async () => {\n if (VolusionPages.isOnPackingSlipPage()) {\n // In development use: http://localhost:3000/#/Receipt_PrinterFriendly.asp\n return await import(\"./controllers/packing-slip\");\n } else if (VolusionPages.isOnCartPage()) {\n return await import(\"./controllers/cart\");\n } else if (VolusionPages.isOnCheckoutPage()) {\n return await import(\"./controllers/checkout\");\n }\n return true;\n})();\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import \"core-js/stable\";\nimport \"mutationobserver-polyfill\";\nimport \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\nimport \"./app/app\";\nimport * as serviceWorker from \"./serviceWorker\";\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","export const VolusionPages = {\n Account: [\"orderdetails.asp\"],\n Invoice: [\"receipt_printerfriendly.asp\"],\n Cart: [\"shoppingcart.asp\"],\n Checkout: [\"one-page-checkout.asp\"],\n Product: [\"_p/\", \"-p/\",\"productdetails.asp\"],\n PackingSlip: [\"receipt_printerfriendly.asp\"],\n isOnAccountPage: () => {\n return VolusionPages.Account.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n },\n isOnInvoicePage: () => {\n return VolusionPages.Invoice.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n },\n isOnCartPage: () => {\n return VolusionPages.Cart.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n },\n isOnCheckoutPage: () => {\n return VolusionPages.Checkout.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n },\n isOnProductPage: () => {\n return VolusionPages.Product.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n },\n isOnPackingSlipPage: () => {\n return VolusionPages.PackingSlip.find(\n x => window.location.href.toLowerCase().indexOf(x.toLowerCase()) >= 0\n );\n }\n};\n"],"sourceRoot":""}