ordering-ui-external 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/_bundles/0.ordering-ui.4daed536057dd0fbaf15.js +1 -0
  2. package/_bundles/{0.ordering-ui.8d3ec9f208550df10621.js → 1.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  3. package/_bundles/{1.ordering-ui.8d3ec9f208550df10621.js → 2.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  4. package/_bundles/{4.ordering-ui.8d3ec9f208550df10621.js → 4.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  5. package/_bundles/{5.ordering-ui.8d3ec9f208550df10621.js → 5.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  6. package/_bundles/{6.ordering-ui.8d3ec9f208550df10621.js → 6.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  7. package/_bundles/7.ordering-ui.4daed536057dd0fbaf15.js +2 -0
  8. package/_bundles/{7.ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → 7.ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.8d3ec9f208550df10621.js → 8.ordering-ui.4daed536057dd0fbaf15.js} +0 -0
  10. package/_bundles/{9.ordering-ui.8d3ec9f208550df10621.js → 9.ordering-ui.4daed536057dd0fbaf15.js} +1 -1
  11. package/_bundles/ordering-ui.4daed536057dd0fbaf15.js +2 -0
  12. package/_bundles/{ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt → ordering-ui.4daed536057dd0fbaf15.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/five/index.js +7 -0
  14. package/_modules/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +47 -0
  15. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -29
  16. package/_modules/themes/five/src/components/BusinessProductsList/index.js +10 -6
  17. package/_modules/themes/five/src/components/BusinessProductsList/styles.js +8 -7
  18. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  19. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +3 -3
  20. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +4 -1
  21. package/_modules/themes/five/src/components/Cart/index.js +3 -1
  22. package/_modules/themes/five/src/components/Checkout/index.js +46 -33
  23. package/_modules/themes/five/src/components/Favorite/index.js +16 -2
  24. package/_modules/themes/five/src/components/FavoriteList/index.js +15 -1
  25. package/_modules/themes/five/src/components/Header/index.js +2 -2
  26. package/_modules/themes/five/src/components/Header/styles.js +5 -3
  27. package/_modules/themes/five/src/components/Modal/index.js +2 -2
  28. package/_modules/themes/five/src/components/Modal/styles.js +8 -4
  29. package/_modules/themes/five/src/components/MyOrders/index.js +9 -2
  30. package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
  31. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +10 -40
  32. package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +25 -0
  33. package/_modules/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +19 -0
  34. package/_modules/themes/five/src/components/OrdersOption/index.js +16 -13
  35. package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
  36. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  37. package/_modules/themes/five/src/components/SidebarMenu/index.js +39 -17
  38. package/_modules/themes/five/src/components/SingleProductCard/styles.js +1 -1
  39. package/_modules/themes/five/src/components/SingleProfessionalCard/index.js +95 -0
  40. package/_modules/themes/five/src/components/SingleProfessionalCard/styles.js +47 -0
  41. package/_modules/themes/five/src/styles/Selects/index.js +1 -1
  42. package/index-template.js +28 -5
  43. package/package.json +6 -3
  44. package/src/themes/five/index.js +2 -0
  45. package/src/themes/five/src/components/BusinessListingSearch/MaxSectionItem/index.js +44 -0
  46. package/src/themes/five/src/components/BusinessListingSearch/index.js +8 -30
  47. package/src/themes/five/src/components/BusinessProductsList/index.js +29 -22
  48. package/src/themes/five/src/components/BusinessProductsList/styles.js +25 -2
  49. package/src/themes/five/src/components/BusinessProductsListing/index.js +1 -1
  50. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +4 -3
  51. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
  52. package/src/themes/five/src/components/Cart/index.js +2 -0
  53. package/src/themes/five/src/components/Checkout/index.js +19 -12
  54. package/src/themes/five/src/components/Favorite/index.js +19 -1
  55. package/src/themes/five/src/components/FavoriteList/index.js +24 -0
  56. package/src/themes/five/src/components/Header/index.js +11 -8
  57. package/src/themes/five/src/components/Header/styles.js +5 -0
  58. package/src/themes/five/src/components/Modal/index.js +9 -6
  59. package/src/themes/five/src/components/Modal/styles.js +15 -1
  60. package/src/themes/five/src/components/MyOrders/index.js +11 -1
  61. package/src/themes/five/src/components/OrderDetails/ActionsSection.js +1 -0
  62. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -29
  63. package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/index.js +32 -0
  64. package/src/themes/five/src/components/OrdersOption/PreviousProfessionalOrdered/styles.js +38 -0
  65. package/src/themes/five/src/components/OrdersOption/index.js +18 -9
  66. package/src/themes/five/src/components/ProductForm/index.js +5 -5
  67. package/src/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
  68. package/src/themes/five/src/components/SidebarMenu/index.js +98 -42
  69. package/src/themes/five/src/components/SingleProductCard/styles.js +5 -1
  70. package/src/themes/five/src/components/SingleProfessionalCard/index.js +82 -0
  71. package/src/themes/five/src/components/SingleProfessionalCard/styles.js +92 -0
  72. package/src/themes/five/src/styles/Selects/index.js +1 -0
  73. package/template/Utils/index.js +4 -0
  74. package/template/app.js +554 -143
  75. package/template/assets/images/business-hero.jpg +0 -0
  76. package/template/assets/images/business-signup-background.png +0 -0
  77. package/template/assets/images/business_signup.png +0 -0
  78. package/template/assets/images/congratulation_approval.png +0 -0
  79. package/template/assets/images/congratulation_no_approval.png +0 -0
  80. package/template/assets/images/credit.png +0 -0
  81. package/template/assets/images/delivery-types/curbside.jpg +0 -0
  82. package/template/assets/images/delivery-types/delivery.jpg +0 -0
  83. package/template/assets/images/delivery-types/drive_thru.jpg +0 -0
  84. package/template/assets/images/delivery-types/eat_in.jpg +0 -0
  85. package/template/assets/images/delivery-types/pickup.jpg +0 -0
  86. package/template/assets/images/driver-signup-background.png +0 -0
  87. package/template/assets/images/driver-signup-hero.png +0 -0
  88. package/template/assets/images/driver_congratulation_approval.png +0 -0
  89. package/template/assets/images/driver_congratulation_no_approval.png +0 -0
  90. package/template/assets/images/driver_signup.png +0 -0
  91. package/template/assets/images/home-hero.jpg +0 -0
  92. package/template/assets/images/loyalty_level.png +0 -0
  93. package/template/assets/images/mastercard.png +0 -0
  94. package/template/assets/images/not-found.svg +94 -1
  95. package/template/assets/images/not-network.svg +226 -1
  96. package/template/assets/images/visa.png +0 -0
  97. package/template/components/HelmetTags/index.js +5 -4
  98. package/template/components/ListenPageChanges/index.js +25 -12
  99. package/template/components/ScrollToTop/index.js +4 -0
  100. package/template/config.js +14 -0
  101. package/template/config.json +1 -0
  102. package/template/helmetdata.json +91 -28
  103. package/template/pages/AddressList/index.js +34 -0
  104. package/template/pages/AddressList/styles.js +43 -0
  105. package/template/pages/BusinessListingSearch/index.js +106 -0
  106. package/template/pages/BusinessProductsList/index.js +152 -29
  107. package/template/pages/BusinessesList/index.js +17 -6
  108. package/template/pages/Checkout/index.js +14 -4
  109. package/template/pages/Favorite/index.js +12 -0
  110. package/template/pages/Help/index.js +7 -2
  111. package/template/pages/Home/index.js +58 -36
  112. package/template/pages/Home/styles.js +14 -0
  113. package/template/pages/MessagesList/index.js +19 -0
  114. package/template/pages/MultiCheckout/index.js +26 -0
  115. package/template/pages/MultiOrdersDetails/index.js +21 -0
  116. package/template/pages/MyOrders/index.js +87 -3
  117. package/template/pages/OrderDetails/index.js +12 -2
  118. package/template/pages/Profile/index.js +16 -3
  119. package/template/pages/Promotions/index.js +13 -0
  120. package/template/pages/ResetPassword/index.js +15 -9
  121. package/template/pages/SessionsList/index.js +12 -0
  122. package/template/pages/SignUpBusiness/index.js +12 -0
  123. package/template/pages/SignUpDriver/index.js +12 -0
  124. package/template/pages/UserVerification/index.js +12 -0
  125. package/template/pages/Wallets/index.js +12 -0
  126. package/template/service-worker.js +72 -0
  127. package/template/theme.json +27 -51
  128. package/_bundles/3.ordering-ui.8d3ec9f208550df10621.js +0 -1
  129. package/_bundles/7.ordering-ui.8d3ec9f208550df10621.js +0 -2
  130. package/_bundles/ordering-ui.8d3ec9f208550df10621.js +0 -2
  131. package/template/assets/images/exclamation.svg +0 -3
  132. package/template/assets/images/order-creating.png +0 -0
  133. package/template/assets/images/order-sucess.png +0 -0
@@ -1,13 +1,97 @@
1
1
  import React from 'react'
2
- import { MyOrders as MyOrdersController } from '../../../src/components/MyOrders'
2
+ import { useSite, useEvent } from 'ordering-components-external'
3
+ import { MyOrders as MyOrdersController } from '../../../src/themes/five/src/components/MyOrders'
3
4
  import { HelmetTags } from '../../components/HelmetTags'
4
- import { useEvent } from 'ordering-components-external'
5
+ import settings from '../../config'
6
+ import { checkSiteUrl } from '../../Utils'
5
7
 
6
8
  export const MyOrders = (props) => {
7
9
  const [events] = useEvent()
10
+ const [{ site }] = useSite()
11
+ const businessUrlTemplate = checkSiteUrl(site?.business_url_template, '/store/:business_slug')
12
+ const productUrlTemplate = checkSiteUrl(site?.product_url_template, '/store/:business_slug?category=:category_id&product=:product_id')
13
+
8
14
  const ordersProps = {
9
15
  ...props,
10
- onRedirectPage: (data) => events.emit('go_to_page', data)
16
+ franchiseId: settings?.franchiseSlug,
17
+ onRedirectPage: (data) => {
18
+ if (data.page === 'business') {
19
+ const businessSlug = data.params?.store
20
+ if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
21
+ events.emit('go_to_page', { page: 'business', params: { business_slug: businessSlug } })
22
+ } else {
23
+ events.emit('go_to_page', { page: 'business', search: `?${businessUrlTemplate.split('?')[1].replace(':business_slug', '')}${businessSlug}` })
24
+ }
25
+ } else {
26
+ events.emit('go_to_page', data)
27
+ }
28
+ },
29
+ onProductRedirect: ({ slug, category, product }) => {
30
+ if (!category && !product) {
31
+ if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
32
+ return events.emit('go_to_page', { page: 'business', params: { business_slug: slug } })
33
+ } else {
34
+ return events.emit('go_to_page', { page: 'business', search: `?${businessUrlTemplate.split('?')[1].replace(':business_slug', '')}${slug}` })
35
+ }
36
+ }
37
+ if (productUrlTemplate === '/store/:business_slug/:category_slug/:product_slug' || productUrlTemplate === '/:business_slug/:category_slug/:product_slug') {
38
+ return events.emit('go_to_page', {
39
+ page: 'product',
40
+ params: {
41
+ business_slug: slug,
42
+ category_slug: category,
43
+ product_slug: product
44
+ },
45
+ replace: true
46
+ })
47
+ }
48
+ if (productUrlTemplate.includes('/store/:category_slug/:product_slug')) {
49
+ const businessParameter = businessUrlTemplate.replace('/store?', '').replace('=:business_slug', '')
50
+ return events.emit('go_to_page', {
51
+ page: 'product',
52
+ params: {
53
+ category_slug: category,
54
+ product_slug: product
55
+ },
56
+ search: `?${businessParameter}=${slug}`,
57
+ replace: true
58
+ })
59
+ }
60
+ if (productUrlTemplate.includes('/store/:business_slug') && productUrlTemplate.includes('category_id')) {
61
+ const ids = productUrlTemplate.split('?')[1].split('&')
62
+ const categoryParameter = ids[0].replace('=:category_id', '')
63
+ const productParameter = ids[1].replace('=:product_id', '')
64
+ return events.emit('go_to_page', {
65
+ page: 'product',
66
+ params: {
67
+ business_slug: slug
68
+ },
69
+ search: `?${categoryParameter}=${category}&${productParameter}=${product}`,
70
+ replace: true
71
+ })
72
+ }
73
+ if (productUrlTemplate.includes('/:business_slug') && !productUrlTemplate.includes('store')) {
74
+ const ids = productUrlTemplate.split('?')[1].split('&')
75
+ const categoryParameter = ids[0].replace('=:category_id', '')
76
+ const productParameter = ids[1].replace('=:product_id', '')
77
+ return events.emit('go_to_page', {
78
+ page: 'product',
79
+ params: {
80
+ business_slug: slug
81
+ },
82
+ search: `?${categoryParameter}=${category}&${productParameter}=${product}`,
83
+ replace: true
84
+ })
85
+ }
86
+ },
87
+ isAsCustomer: true,
88
+ onBusinessClick: (business) => {
89
+ if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
90
+ events.emit('go_to_page', { page: 'business', params: { business_slug: business.slug } })
91
+ } else {
92
+ events.emit('go_to_page', { page: 'business', search: `?${businessUrlTemplate.split('?')[1].replace(':business_slug', '')}${business.slug}` })
93
+ }
94
+ },
11
95
  }
12
96
  return (
13
97
  <>
@@ -1,12 +1,22 @@
1
1
  import React from 'react'
2
2
  import { useHistory, useParams, useLocation } from 'react-router-dom'
3
3
  import { HelmetTags } from '../../components/HelmetTags'
4
- import { OrderDetails } from '../../../src/components/OrderDetails'
4
+ import { useOrderingTheme } from 'ordering-components-external'
5
+ import { OrderDetails } from '../../../src/themes/five/src/components/OrderDetails'
6
+ import { OrderDetails as OrderDetailsKiosk } from '../../../src/themes/five/src/components/OrderDetails/layouts/Kiosk'
7
+ import { OrderDetails as OrderDetailsOld } from '../../../src/components/OrderDetails'
8
+ import settings from '../../config'
5
9
 
6
10
  export const OrderDetailsPage = (props) => {
7
11
  const history = useHistory()
8
12
  const { orderId } = useParams()
9
13
  const hashKey = new URLSearchParams(useLocation()?.search)?.get('hash') || null
14
+ const [orderingTheme] = useOrderingTheme()
15
+ const useKioskApp = settings?.use_kiosk
16
+ const OrderDetailsComponent = useKioskApp ? OrderDetailsKiosk
17
+ : orderingTheme?.theme?.confirmation?.components?.layout?.type === 'old'
18
+ ? OrderDetailsOld
19
+ : OrderDetails
10
20
 
11
21
  const orderDetailsProps = {
12
22
  ...props,
@@ -23,7 +33,7 @@ export const OrderDetailsPage = (props) => {
23
33
  return (
24
34
  <>
25
35
  <HelmetTags page='order_details' helmetTitle={`Order #${orderId}`} />
26
- <OrderDetails {...orderDetailsProps} />
36
+ <OrderDetailsComponent {...orderDetailsProps} />
27
37
  </>
28
38
  )
29
39
  }
@@ -1,12 +1,25 @@
1
1
  import React from 'react'
2
- import { UserProfileForm } from '../../../src/components/UserProfileForm'
2
+ import { UserProfileForm as UserProfileFormOriginal } from '../../../src/themes/five/src/components/UserProfileForm'
3
+ import { UserProfileForm as UserProfileFormOld } from '../../../src/components/UserProfileForm'
3
4
  import { HelmetTags } from '../../components/HelmetTags'
4
-
5
+ import { useOrderingTheme } from 'ordering-components-external'
5
6
  export const Profile = (props) => {
7
+ const profileProps = {
8
+ ...props,
9
+ refreshSessionUser: true
10
+ }
11
+
12
+ const [orderingTheme] = useOrderingTheme()
13
+ const layout = orderingTheme?.theme?.profile?.components?.layout?.type
14
+
6
15
  return (
7
16
  <>
8
17
  <HelmetTags page='profile' />
9
- <UserProfileForm {...props} />
18
+ {layout === 'old' ? (
19
+ <UserProfileFormOld {...profileProps} />
20
+ ) : (
21
+ <UserProfileFormOriginal {...profileProps} />
22
+ )}
10
23
  </>
11
24
  )
12
25
  }
@@ -0,0 +1,13 @@
1
+ import React from 'react'
2
+ import { Promotions as PromotionsController } from '../../../src/themes/five/src/components/Promotions'
3
+
4
+ export const Promotions = (props) => {
5
+ const promotionsProps = {
6
+ ...props
7
+ }
8
+ return (
9
+ <>
10
+ <PromotionsController {...promotionsProps} />
11
+ </>
12
+ )
13
+ }
@@ -1,26 +1,32 @@
1
1
  import React from 'react'
2
+ import { useLocation } from 'react-router-dom'
2
3
  import { useEvent } from 'ordering-components-external'
3
4
  import { HelmetTags } from '../../components/HelmetTags'
4
- import { ResetPassword as ResetPasswordController } from '../../../src/components/ResetPassword'
5
+ import { ResetPassword as ResetPasswordController } from '../../../src/themes/five/src/components/ResetPassword'
5
6
 
6
7
  export const ResetPassword = (props) => {
7
8
  const [events] = useEvent()
8
- const params = new URLSearchParams(props.location.search)
9
- const code = params.get('code')
10
- const random = params.get('random')
9
+ const { search } = useLocation()
10
+ let code, random
11
+
12
+ if (search) {
13
+ const data = search.substring(1).split('&')
14
+ code = data[0]
15
+ random = data[1]
16
+ }
17
+
18
+ const codeString = code && code.split('=')[1]
19
+ const randomString = random && random.split('=')[1]
11
20
 
12
21
  const resetPasswordProps = {
13
22
  ...props,
14
- code: code,
15
- random: random,
23
+ code: codeString,
24
+ random: randomString,
16
25
  redirectResetPassword: ({ code, random }) => {
17
26
  events.emit('go_to_page', {
18
27
  page: 'reset_password',
19
28
  search: `?code=${code}&random=${random}`
20
29
  })
21
- },
22
- redirectLogin: () => {
23
- events.emit('go_to_page', { page: 'signin' })
24
30
  }
25
31
  }
26
32
  return (
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { SessionsList as SessionsListController } from '../../../src/themes/five/src/components/SessionsList'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+
5
+ export const SessionsList = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='sessions' />
9
+ <SessionsListController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { SignUpBusiness as SignUpBusinessController } from '../../../src/themes/five/src/components/SignUpBusiness'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+
5
+ export const SignUpBusiness = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='signup_business' />
9
+ <SignUpBusinessController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { SignUpDriver as SignUpDriverController } from '../../../src/themes/five/src/components/SignUpDriver'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+
5
+ export const SignUpDriver = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='signup_driver' />
9
+ <SignUpDriverController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { UserVerification as UserVerificationController } from '../../../src/themes/five/src/components/UserVerification'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+
5
+ export const UserVerification = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='user-verification' />
9
+ <UserVerificationController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+ import { Wallets as WalletsController } from '../../../src/themes/five/src/components/Wallets'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+
5
+ export const Wallets = (props) => {
6
+ return (
7
+ <>
8
+ <HelmetTags page='wallets' />
9
+ <WalletsController {...props} />
10
+ </>
11
+ )
12
+ }
@@ -0,0 +1,72 @@
1
+ /* eslint-disable no-restricted-globals */
2
+
3
+ // This service worker can be customized!
4
+ // See https://developers.google.com/web/tools/workbox/modules
5
+ // for the list of available Workbox modules, or add any other
6
+ // code you'd like.
7
+ // You can also remove this file if you'd prefer not to use a
8
+ // service worker, and the Workbox build step will be skipped.
9
+
10
+ import { clientsClaim } from 'workbox-core';
11
+ import { ExpirationPlugin } from 'workbox-expiration';
12
+ import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
13
+ import { registerRoute } from 'workbox-routing';
14
+ import { StaleWhileRevalidate } from 'workbox-strategies';
15
+
16
+ clientsClaim();
17
+
18
+ // Precache all of the assets generated by your build process.
19
+ // Their URLs are injected into the manifest variable below.
20
+ // This variable must be present somewhere in your service worker file,
21
+ // even if you decide not to use precaching. See https://cra.link/PWA
22
+ precacheAndRoute(self.__WB_MANIFEST);
23
+
24
+ // Set up App Shell-style routing, so that all navigation requests
25
+ // are fulfilled with your index.html shell. Learn more at
26
+ // https://developers.google.com/web/fundamentals/architecture/app-shell
27
+ const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$');
28
+ registerRoute(
29
+ // Return false to exempt requests from being fulfilled by index.html.
30
+ ({ request, url }) => {
31
+ // If this isn't a navigation, skip.
32
+ if (request.mode !== 'navigate') {
33
+ return false;
34
+ } // If this is a URL that starts with /_, skip.
35
+
36
+ if (url.pathname.startsWith('/_')) {
37
+ return false;
38
+ } // If this looks like a URL for a resource, because it contains // a file extension, skip.
39
+
40
+ if (url.pathname.match(fileExtensionRegexp)) {
41
+ return false;
42
+ } // Return true to signal that we want to use the handler.
43
+
44
+ return true;
45
+ },
46
+ createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html')
47
+ );
48
+
49
+ // An example runtime caching route for requests that aren't handled by the
50
+ // precache, in this case same-origin .png requests like those from in public/
51
+ registerRoute(
52
+ // Add in any other file extensions or routing criteria as needed.
53
+ ({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst.
54
+ new StaleWhileRevalidate({
55
+ cacheName: 'images',
56
+ plugins: [
57
+ // Ensure that once this runtime cache reaches a maximum size the
58
+ // least-recently used images are removed.
59
+ new ExpirationPlugin({ maxEntries: 50 }),
60
+ ],
61
+ })
62
+ );
63
+
64
+ // This allows the web app to trigger skipWaiting via
65
+ // registration.waiting.postMessage({type: 'SKIP_WAITING'})
66
+ self.addEventListener('message', (event) => {
67
+ if (event.data && event.data.type === 'SKIP_WAITING') {
68
+ self.skipWaiting();
69
+ }
70
+ });
71
+
72
+ // Any other custom service worker logic can go here.
@@ -2,49 +2,54 @@
2
2
  "fonts": {
3
3
  "primary": {
4
4
  "name": "Poppins",
5
- "weights": [
6
- 300,
7
- 400,
8
- 500,
9
- 600
10
- ]
5
+ "weights": [300, 400, 500, 600]
11
6
  },
12
7
  "special": {
13
8
  "name": "Lobster",
14
- "weights": [
15
- 400
16
- ]
9
+ "weights": [400]
17
10
  }
18
11
  },
19
12
  "colors": {
20
- "primary": "#D83520",
21
- "primaryContrast": "#FFF",
13
+ "primary": "#2C7BE5",
14
+ "primaryContrast": "#E9F2FE",
22
15
  "secundary": "#EFEFEF",
23
16
  "secundaryContrast": "#000",
24
17
  "disabled": "#CBCBCB",
25
18
  "disabledContrast": "#000",
26
- "backgroundPage": "#F8F8F8",
27
- "colorPage": "#333",
19
+ "backgroundPage": "#FFFFFF",
20
+ "colorPage": "#344050",
28
21
  "colorTextSignForm": "#FFFFFF",
22
+ "headingColor": "#344050",
23
+ "darkGray": "#909BA9",
24
+ "darkTextColor": "#344050",
25
+ "lightGray": "#B1BCCC",
26
+ "darkPrimaryColor": "#03459E",
27
+ "grayDividerColor": "#F8F9FA",
29
28
  "titleHomeColor": "#FFFFFF",
30
29
  "subtitleHomeColor": "#FFFFFF",
31
30
  "warning100": "#FFF4CC",
32
31
  "warning500": "#FFC700",
33
- "grayDividerColor": "#F8F9FA",
34
- "darkGray": "#CBCBCB",
35
- "gray200": "#E9ECEF"
32
+ "gray200": "#E9ECEF",
33
+ "danger500": "#E63757",
34
+ "links": "#2C7BE5",
35
+ "success500": "#00D27A",
36
+ "secondaryDark": "#414954",
37
+ "black": "#000000"
36
38
  },
37
39
  "defaultLanguages": {
38
40
  "QUESTION_CLEAR_CUSTOMER": "Are you sure that you want to clear the customer?",
39
41
  "SIGN_IN": "Sign in",
40
42
  "SIGN_UP": "Sign up",
41
43
  "ACCEPT": "Accept",
44
+
42
45
  "TITLE_HOME": "All We need is Food",
43
46
  "SUBTITLE_HOME": "Let's start to order food now",
44
47
  "TYPE_AN_ADDRESS": "Type an addres",
45
48
  "FIND_BUSINESSES": "Find businesse",
46
49
  "ADDRESS": "Address",
47
50
  "ADDRESSES": "Addresses",
51
+ "WHERE_DO_WE_DELIVERY": "Where do we delivery?",
52
+
48
53
  "SORT_BY": "Sort By",
49
54
  "RANK": "Rank",
50
55
  "A_to_Z": "A-Z",
@@ -58,6 +63,7 @@
58
63
  "NOT_FOUND_BUSINESS_PRODUCTS": "No products to show at this business, please try with other business",
59
64
  "SEARCH_REDIRECT": "Go to Businesses",
60
65
  "ERROR_NOT_FOUND_STORE": "Sorry, an error has occurred with business selected",
66
+
61
67
  "SKU": "Sku",
62
68
  "INGREDIENTS": "Ingredients",
63
69
  "SPECIAL_COMMENT": "Special comment",
@@ -67,6 +73,7 @@
67
73
  "RESET_PASSWORD": "Reset password",
68
74
  "LOGIN": "Login",
69
75
  "LOGIN_SIGNUP": "Login / Sign Up",
76
+
70
77
  "PENDING": "Pending",
71
78
  "COMPLETED": "Completed",
72
79
  "REJECTED": "Rejected",
@@ -109,25 +116,13 @@
109
116
  "TOTAL": "Total",
110
117
  "REVIEW_ORDER": "Review your Order",
111
118
  "MY_ORDERS": "My Orders",
119
+ "YOUR_ORDERS": "Your Orders",
112
120
  "NOT_FOUND_ORDER": "Sorry, we couldn't find the requested order.",
113
121
  "ORDERS_REDIRECT": "Go to Orders",
114
122
  "WRITE_A_REVIEW": "Write a Review",
115
- "LOGIN_WITH_CELLPHONE": "Login with Cellphone",
116
- "NEW_ON_PLATFORM": "New on the Plafrom?",
117
- "PHONE_NUMBER": "Phone number"
123
+ "ADD": "Add"
118
124
  },
119
125
  "layouts": {
120
- "business_listing_view": {
121
- "components": {
122
- "layout": {
123
- "type": "original",
124
- "rows": 3
125
- },
126
- "cities": {
127
- "hidden": false
128
- }
129
- }
130
- },
131
126
  "business_view": {
132
127
  "components": {
133
128
  "layout": {
@@ -150,9 +145,6 @@
150
145
  "components": {
151
146
  "photo": {
152
147
  "hidden": false
153
- },
154
- "add_to_cart_button": {
155
- "hidden": false
156
148
  }
157
149
  }
158
150
  },
@@ -204,9 +196,6 @@
204
196
  },
205
197
  "sort": {
206
198
  "hidden": false
207
- },
208
- "city": {
209
- "hidden": false
210
199
  }
211
200
  }
212
201
  },
@@ -228,21 +217,8 @@
228
217
  }
229
218
  }
230
219
  },
231
- "products": {
232
- "components": {
233
- "layout": {
234
- "rows": 3
235
- },
236
- "add_to_cart_button": {
237
- "hidden": false
238
- }
239
- }
240
- },
241
220
  "order_view_button": {
242
221
  "hidden": true
243
- },
244
- "near_business": {
245
- "hidden": false
246
222
  }
247
223
  }
248
224
  },
@@ -384,7 +360,7 @@
384
360
  "hidden": false,
385
361
  "components": {
386
362
  "layout": {
387
- "type": "original"
363
+ "type": "old"
388
364
  },
389
365
  "delivery_type": {
390
366
  "hidden": false
@@ -465,7 +441,7 @@
465
441
  }
466
442
  },
467
443
  "delivery_types": {
468
- "components":{
444
+ "components": {
469
445
  "hidden": false
470
446
  }
471
447
  }
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[3],{595:function(e,n,t){"use strict";t.r(n),t.d(n,"applyDestinationMiddleware",(function(){return o})),t.d(n,"sourceMiddlewarePlugin",(function(){return u}));var r=t(3),i=t(20),a=t(93),c=t(171);function o(e,n,t){return Object(r.b)(this,void 0,void 0,(function(){function i(n,t){return Object(r.b)(this,void 0,void 0,(function(){var i,o,u;return Object(r.d)(this,(function(l){switch(l.label){case 0:return i=!1,o=null,[4,Object(a.a)(t({payload:Object(c.a)(n,{clone:!0,traverse:!1}),integration:e,next:function(e){i=!0,null===e&&(o=null),e&&(o=e.obj)}}))];case 1:return l.sent(),i||null===o||(o.integrations=Object(r.a)(Object(r.a)({},n.integrations),((u={})[e]=!1,u))),[2,o]}}))}))}var o,u,l,s;return Object(r.d)(this,(function(e){switch(e.label){case 0:o=0,u=t,e.label=1;case 1:return o<u.length?(l=u[o],[4,i(n,l)]):[3,4];case 2:if(null===(s=e.sent()))return[2,null];n=s,e.label=3;case 3:return o++,[3,1];case 4:return[2,n]}}))}))}function u(e,n){function t(t){return Object(r.b)(this,void 0,void 0,(function(){var o;return Object(r.d)(this,(function(r){switch(r.label){case 0:return o=!1,[4,Object(a.a)(e({payload:Object(c.a)(t.event,{clone:!0,traverse:!1}),integrations:null!=n?n:{},next:function(e){o=!0,e&&(t.event=e.obj)}}))];case 1:if(r.sent(),!o)throw new i.b({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,t]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:t,page:t,identify:t,alias:t,group:t}}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 7.ordering-ui.8d3ec9f208550df10621.js.LICENSE.txt */
2
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[7,3],{589:function(t,e,n){"use strict";var r,i=n(625),o=n(629),s=n(630);r=i()?s:o,t.exports=r},590:function(t,e,n){"use strict";function r(t,e){var n,r;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(r=null===(n=null==t?void 0:t.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}n.d(e,"a",(function(){return r}))},591:function(t,e,n){t.exports=function(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}},592:function(t,e,n){"use strict";var r,i=n(621),o=n(636),s=n(637);r=i()?o:s,t.exports=r},593:function(t,e,n){"use strict";var r,i=n(638),o=n(643),s=n(644);r=i()?o:s,t.exports=r},594:function(t,e,n){"use strict";var r=n(646);t.exports=r},595:function(t,e,n){"use strict";n.r(e),n.d(e,"applyDestinationMiddleware",(function(){return u})),n.d(e,"sourceMiddlewarePlugin",(function(){return c}));var r=n(3),i=n(20),o=n(93),s=n(171);function u(t,e,n){return Object(r.b)(this,void 0,void 0,(function(){function i(e,n){return Object(r.b)(this,void 0,void 0,(function(){var i,u,c;return Object(r.d)(this,(function(a){switch(a.label){case 0:return i=!1,u=null,[4,Object(o.a)(n({payload:Object(s.a)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(u=null),t&&(u=t.obj)}}))];case 1:return a.sent(),i||null===u||(u.integrations=Object(r.a)(Object(r.a)({},e.integrations),((c={})[t]=!1,c))),[2,u]}}))}))}var u,c,a,f;return Object(r.d)(this,(function(t){switch(t.label){case 0:u=0,c=n,t.label=1;case 1:return u<c.length?(a=c[u],[4,i(e,a)]):[3,4];case 2:if(null===(f=t.sent()))return[2,null];e=f,t.label=3;case 3:return u++,[3,1];case 4:return[2,e]}}))}))}function c(t,e){function n(n){return Object(r.b)(this,void 0,void 0,(function(){var u;return Object(r.d)(this,(function(r){switch(r.label){case 0:return u=!1,[4,Object(o.a)(t({payload:Object(s.a)(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){u=!0,t&&(n.event=t.obj)}}))];case 1:if(r.sent(),!u)throw new i.b({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},596:function(t,e,n){"use strict";var r=Number.POSITIVE_INFINITY;t.exports=r},597:function(t,e,n){"use strict";var r=n(610).NEGATIVE_INFINITY;t.exports=r},598:function(t,e,n){"use strict";t.exports=1023},599:function(t,e,n){"use strict";var r=n(615);t.exports=r},600:function(t,e,n){"use strict";var r=n(616);t.exports=r},601:function(t,e,n){"use strict";var r=n(619);t.exports=r},602:function(t,e,n){"use strict";var r=Object.prototype.toString;t.exports=r},603:function(t,e,n){"use strict";var r=n(666);t.exports=r},604:function(t,e,n){"use strict";var r=n(668);t.exports=r},605:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var i=n(606);Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return r(i).default}});var o=n(680);Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return r(o).default}});var s=n(681);Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return r(s).default}})},606:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(607)),o=r(n(591)),s=r(n(608)),u=n(86),c=n(679);function a(t,e){for(var n in e.drop)if(e.drop.hasOwnProperty(n)){var r=""===n?t:(0,o.default)(t,n);if("object"==typeof r&&null!==r)for(var i=0,s=e.drop[n];i<s.length;i++){delete r[s[i]]}}}function f(t,e){for(var n in e.allow)if(e.allow.hasOwnProperty(n)){var r=""===n?t:(0,o.default)(t,n);if("object"==typeof r&&null!==r)for(var i in r)r.hasOwnProperty(i)&&-1===e.allow[n].indexOf(i)&&delete r[i]}}function l(t,e){var n=JSON.parse(JSON.stringify(t));for(var r in e.map)if(e.map.hasOwnProperty(r)){var i=e.map[r],s=r.split("."),a=void 0;if(s.length>1?(s.pop(),a=(0,o.default)(n,s.join("."))):a=t,"object"==typeof a){if(i.copy){var f=(0,o.default)(n,i.copy);void 0!==f&&(0,u.dset)(t,r,f)}else if(i.move){var l=(0,o.default)(n,i.move);void 0!==l&&(0,u.dset)(t,r,l),(0,c.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,u.dset)(t,r,i.set);if(i.to_string){var p=(0,o.default)(t,r);if("string"==typeof p||"object"==typeof p&&null!==p)continue;void 0!==p?(0,u.dset)(t,r,JSON.stringify(p)):(0,u.dset)(t,r,"undefined")}}}}function p(t,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(t,e){var n=(0,o.default)(t,e.sample.path),r=(0,i.default)(JSON.stringify(n)),u=-64,c=[];d(r.slice(0,8),c);for(var a=0,f=0;f<64&&1!==c[f];f++)a++;if(0!==a){var l=[];d(r.slice(9,16),l),u-=a,c.splice(0,a),l.splice(64-a),c=c.concat(l)}return c[63]=0===c[63]?1:0,(0,s.default)(parseInt(c.join(""),2),u)<e.sample.percent}(t,e):(n=e.sample.percent,Math.random()<=n)));var n}function d(t,e){for(var n=0;n<8;n++)for(var r=t[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,e.push(1)):e.push(0)}e.default=function(t,e){for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":a(n,o.config);break;case"allow_properties":f(n,o.config);break;case"sample_event":if(p(n,o.config))break;return null;case"map_properties":l(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n}},607:function(t,e,n){"use strict";n.r(e);for(var r=[],i=0;i<64;)r[i]=0|4294967296*Math.sin(++i%Math.PI);e.default=function(t){var e,n,o,s=[e=1732584193,n=4023233417,~e,~n],u=[],c=unescape(encodeURI(t))+"€",a=c.length;for(t=--a/4+2|15,u[--t]=8*a;~a;)u[a>>2]|=c.charCodeAt(a)<<8*a--;for(i=c=0;i<t;i+=16){for(a=s;c<64;a=[o=a[3],e+((o=a[0]+[e&n|~e&o,o&e|~o&n,e^n^o,n^(e|~o)][a=c>>4]+r[c]+~~u[i|15&[c,5*c+1,3*c+5,7*c][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+c++%4])|o>>>-a),e,n])e=0|a[1],n=a[2];for(c=4;c;)s[--c]+=a[c]}for(t="";c<32;)t+=(s[c>>3]>>4*(1^c++)&15).toString(16);return t}},608:function(t,e,n){"use strict";var r=n(609);t.exports=r},609:function(t,e,n){"use strict";var r=n(596),i=n(597),o=n(598),s=n(612),u=n(613),c=n(614),a=n(599),f=n(600),l=n(617),p=n(670),d=n(676),v=n(601),h=n(604),y=[0,0],b=[0,0];t.exports=function(t,e){var n,g;return 0===t||a(t)||f(t)?t:(p(y,t),e+=y[1],(e+=d(t=y[0]))<c?l(0,t):e>s?t<0?i:r:(e<=u?(e+=52,g=2220446049250313e-31):g=1,v(b,t),n=b[0],n&=2148532223,g*h(n|=e+o<<20,b[1])))}},610:function(t,e,n){"use strict";var r=n(611);t.exports=r},611:function(t,e,n){"use strict";t.exports=Number},612:function(t,e,n){"use strict";t.exports=1023},613:function(t,e,n){"use strict";t.exports=-1023},614:function(t,e,n){"use strict";t.exports=-1074},615:function(t,e,n){"use strict";t.exports=function(t){return t!=t}},616:function(t,e,n){"use strict";var r=n(596),i=n(597);t.exports=function(t){return t===r||t===i}},617:function(t,e,n){"use strict";var r=n(618);t.exports=r},618:function(t,e,n){"use strict";var r=n(601),i=n(603),o=n(604),s=[0,0];t.exports=function(t,e){var n,u;return r(s,t),n=s[0],n&=2147483647,u=i(e),o(n|=u&=2147483648,s[1])}},619:function(t,e,n){"use strict";var r=n(620);t.exports=function(t,e){return 1===arguments.length?r([0,0],t):r(t,e)}},620:function(t,e,n){"use strict";var r=n(592),i=n(593),o=n(645),s=new i(1),u=new r(s.buffer),c=o.HIGH,a=o.LOW;t.exports=function(t,e){return s[0]=e,t[0]=u[c],t[1]=u[a],t}},621:function(t,e,n){"use strict";var r=n(622);t.exports=r},622:function(t,e,n){"use strict";var r=n(623),i=n(634),o=n(635);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},623:function(t,e,n){"use strict";var r=n(624);t.exports=r},624:function(t,e,n){"use strict";var r=n(589),i="function"==typeof Uint32Array;t.exports=function(t){return i&&t instanceof Uint32Array||"[object Uint32Array]"===r(t)}},625:function(t,e,n){"use strict";var r=n(626);t.exports=r},626:function(t,e,n){"use strict";var r=n(627)();t.exports=function(){return r&&"symbol"==typeof Symbol.toStringTag}},627:function(t,e,n){"use strict";var r=n(628);t.exports=r},628:function(t,e,n){"use strict";t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},629:function(t,e,n){"use strict";var r=n(602);t.exports=function(t){return r.call(t)}},630:function(t,e,n){"use strict";var r=n(631),i=n(633),o=n(602);t.exports=function(t){var e,n,s;if(null==t)return o.call(t);n=t[i],e=r(t,i);try{t[i]=void 0}catch(e){return o.call(t)}return s=o.call(t),e?t[i]=n:delete t[i],s}},631:function(t,e,n){"use strict";var r=n(632);t.exports=r},632:function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},633:function(t,e,n){"use strict";var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},634:function(t,e,n){"use strict";t.exports=4294967295},635:function(t,e,n){"use strict";var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},636:function(t,e,n){"use strict";var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},637:function(t,e,n){"use strict";t.exports=function(){throw new Error("not implemented")}},638:function(t,e,n){"use strict";var r=n(639);t.exports=r},639:function(t,e,n){"use strict";var r=n(640),i=n(642);t.exports=function(){var t,e;if("function"!=typeof i)return!1;try{e=new i([1,3.14,-3.14,NaN]),t=r(e)&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}},640:function(t,e,n){"use strict";var r=n(641);t.exports=r},641:function(t,e,n){"use strict";var r=n(589),i="function"==typeof Float64Array;t.exports=function(t){return i&&t instanceof Float64Array||"[object Float64Array]"===r(t)}},642:function(t,e,n){"use strict";var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},643:function(t,e,n){"use strict";var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},644:function(t,e,n){"use strict";t.exports=function(){throw new Error("not implemented")}},645:function(t,e,n){"use strict";var r,i,o;!0===n(594)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},646:function(t,e,n){"use strict";var r,i,o=n(647);(i=new o.uint16(1))[0]=4660,r=52===new o.uint8(i.buffer)[0],t.exports=r},647:function(t,e,n){"use strict";var r=n(648),i={uint16:n(657),uint8:r};t.exports=i},648:function(t,e,n){"use strict";var r,i=n(649),o=n(655),s=n(656);r=i()?o:s,t.exports=r},649:function(t,e,n){"use strict";var r=n(650);t.exports=r},650:function(t,e,n){"use strict";var r=n(651),i=n(653),o=n(654);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},651:function(t,e,n){"use strict";var r=n(652);t.exports=r},652:function(t,e,n){"use strict";var r=n(589),i="function"==typeof Uint8Array;t.exports=function(t){return i&&t instanceof Uint8Array||"[object Uint8Array]"===r(t)}},653:function(t,e,n){"use strict";t.exports=255},654:function(t,e,n){"use strict";var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},655:function(t,e,n){"use strict";var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},656:function(t,e,n){"use strict";t.exports=function(){throw new Error("not implemented")}},657:function(t,e,n){"use strict";var r,i=n(658),o=n(664),s=n(665);r=i()?o:s,t.exports=r},658:function(t,e,n){"use strict";var r=n(659);t.exports=r},659:function(t,e,n){"use strict";var r=n(660),i=n(662),o=n(663);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}},660:function(t,e,n){"use strict";var r=n(661);t.exports=r},661:function(t,e,n){"use strict";var r=n(589),i="function"==typeof Uint16Array;t.exports=function(t){return i&&t instanceof Uint16Array||"[object Uint16Array]"===r(t)}},662:function(t,e,n){"use strict";t.exports=65535},663:function(t,e,n){"use strict";var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},664:function(t,e,n){"use strict";var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},665:function(t,e,n){"use strict";t.exports=function(){throw new Error("not implemented")}},666:function(t,e,n){"use strict";var r=n(592),i=n(593),o=n(667),s=new i(1),u=new r(s.buffer);t.exports=function(t){return s[0]=t,u[o]}},667:function(t,e,n){"use strict";var r;r=!0===n(594)?1:0,t.exports=r},668:function(t,e,n){"use strict";var r=n(592),i=n(593),o=n(669),s=new i(1),u=new r(s.buffer),c=o.HIGH,a=o.LOW;t.exports=function(t,e){return u[c]=t,u[a]=e,s[0]}},669:function(t,e,n){"use strict";var r,i,o;!0===n(594)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},670:function(t,e,n){"use strict";var r=n(671);t.exports=r},671:function(t,e,n){"use strict";var r=n(672);t.exports=function(t,e){return 1===arguments.length?r([0,0],t):r(t,e)}},672:function(t,e,n){"use strict";var r=n(673),i=n(600),o=n(599),s=n(674);t.exports=function(t,e){return o(e)||i(e)?(t[0]=e,t[1]=0,t):0!==e&&s(e)<r?(t[0]=4503599627370496*e,t[1]=-52,t):(t[0]=e,t[1]=0,t)}},673:function(t,e,n){"use strict";t.exports=22250738585072014e-324},674:function(t,e,n){"use strict";var r=n(675);t.exports=r},675:function(t,e,n){"use strict";t.exports=function(t){return Math.abs(t)}},676:function(t,e,n){"use strict";var r=n(677);t.exports=r},677:function(t,e,n){"use strict";var r=n(603),i=n(678),o=n(598);t.exports=function(t){var e=r(t);return(e=(e&i)>>>20)-o|0}},678:function(t,e,n){"use strict";t.exports=2146435072},679:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unset=void 0;var i=r(n(591));e.unset=function(t,e){if((0,i.default)(t,e)){for(var n=e.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)t=t[e=n.shift()];return delete t[r]}return!0}},680:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(591));function o(t,e){if(!Array.isArray(t))return!0===s(t,e);var n=t[0];switch(n){case"!":return!o(t[1],e);case"or":for(var r=1;r<t.length;r++)if(o(t[r],e))return!0;return!1;case"and":for(r=1;r<t.length;r++)if(!o(t[r],e))return!1;return!0;case"=":case"!=":return function(t,e,n,r){u(t)&&(t=o(t,r));u(e)&&(e=o(e,r));"object"==typeof t&&"object"==typeof e&&(t=JSON.stringify(t),e=JSON.stringify(e));switch(n){case"=":return t===e;case"!=":return t!==e;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(s(t[1],e),s(t[2],e),n,e);case"<=":case"<":case">":case">=":return function(t,e,n,r){u(t)&&(t=o(t,r));u(e)&&(e=o(e,r));if("number"!=typeof t||"number"!=typeof e)return!1;switch(n){case"<=":return t<=e;case">=":return t>=e;case"<":return t<e;case">":return t>e;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(s(t[1],e),s(t[2],e),n,e);case"contains":return function(t,e){if("string"!=typeof t||"string"!=typeof e)return!1;return-1!==t.indexOf(e)}(s(t[1],e),s(t[2],e));case"match":return function(t,e){if("string"!=typeof t||"string"!=typeof e)return!1;return function(t,e){var n,r;t:for(;t.length>0;){var i=void 0,o=void 0;if(i=(n=c(t)).star,o=n.chunk,t=n.pattern,i&&""===o)return!0;var s=a(o,e),u=s.t,f=s.ok,l=s.err;if(l)return!1;if(!f||!(0===u.length||t.length>0)){if(i)for(var p=0;p<e.length;p++){if(u=(r=a(o,e.slice(p+1))).t,f=r.ok,l=r.err,f){if(0===t.length&&u.length>0)continue;e=u;continue t}if(l)return!1}return!1}e=u}return 0===e.length}(e,t)}(s(t[1],e),s(t[2],e));case"lowercase":var i=s(t[1],e);return"string"!=typeof i?null:i.toLowerCase();case"typeof":return typeof s(t[1],e);case"length":return function(t){if(null===t)return 0;if(!Array.isArray(t)&&"string"!=typeof t)return NaN;return t.length}(s(t[1],e));default:throw new Error("FQL IR could not evaluate for token: ".concat(n))}}function s(t,e){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,i.default)(e,t)}function u(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var e={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),e.star=!0;var n,r=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break t}return e.chunk=t.slice(0,n),e.pattern=t.slice(n),e}function a(t,e){for(var n,r,i={t:"",ok:!1,err:!1};t.length>0;){if(0===e.length)return i;switch(t[0]){case"[":var o=e[0];e=e.slice(1);var s=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(s=!1,t=t.slice(1));for(var u=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var a,l="";if(a=(n=f(t)).char,t=n.newChunk,n.err)return i;if(l=a,"-"===t[0]&&(l=(r=f(t.slice(1))).char,t=r.newChunk,r.err))return i;a<=o&&o<=l&&(u=!0),c++}if(u!==s)return i;break;case"?":e=e.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return i.err=!0,i;default:if(t[0]!==e[0])return i;e=e.slice(1),t=t.slice(1)}}return i.t=e,i.ok=!0,i.err=!1,i}function f(t){var e={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(e.err=!0,e):(e.char=t[0],e.newChunk=t.slice(1),0===e.newChunk.length&&(e.err=!0),e)}e.default=function(t,e){if(!e)throw new Error("No matcher supplied!");switch(e.type){case"all":return!0;case"fql":return function(t,e){if(!t)return!1;try{t=JSON.parse(t)}catch(e){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(e))}var n=o(t,e);if("boolean"!=typeof n)return!1;return n}(e.ir,t);default:throw new Error("Matcher of type ".concat(e.type," unsupported."))}}},681:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var e=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==t&&void 0!==i.destinationName||e.push(i)}return e},t}();e.default=r},688:function(t,e,n){"use strict";n.r(e),n.d(e,"LegacyDestination",(function(){return x})),n.d(e,"ajsDestinations",(function(){return _}));var r=n(3),i=n(55),o=n(46),s=n(20),u=n(100),c=n(62),a=n(93),f=n(590),l=n(188),p=n(189),d=n(47),v=n(68),h=n(595),y=n(605),b=n(84),g=n(104);function w(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function m(t,e){return void 0===e&&(e=!1),e?btoa(t).replace(/=/g,""):void 0}function j(t,e,n,i,o,s){return Object(r.b)(this,void 0,void 0,(function(){var u,c,a,f,l,p,d,v;return Object(r.d)(this,(function(h){switch(h.label){case 0:u=w(n),c=m(u,s),a=Object(b.b)(),f="".concat(a,"/integrations/").concat(null!=c?c:u,"/").concat(i,"/").concat(null!=c?c:u,".dynamic.js.gz"),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,Object(g.a)(f)];case 2:return h.sent(),function(t,e,n){var i,o;try{var s=(null!==(o=null===(i=null===window||void 0===window?void 0:window.performance)||void 0===i?void 0:i.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];s&&e.stats.gauge("legacy_destination_time",Math.round(s.duration),Object(r.f)([n],s.duration<100?["cached"]:[],!0))}catch(t){}}(f,t,n),[3,4];case 3:throw l=h.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),l;case 4:return p=window["".concat(u,"Deps")],[4,Promise.all(p.map((function(t){return Object(g.a)(a+t+".gz")})))];case 5:return h.sent(),window["".concat(u,"Loader")](),(d=window["".concat(u,"Integration")]).Integration&&(d({user:function(){return e.user()},addIntegration:function(){}}),d=d.Integration),(v=new d(o)).analytics=e,[2,v]}}))}))}function O(t,e){return Object(r.b)(this,void 0,void 0,(function(){var n,i=this;return Object(r.d)(this,(function(u){switch(u.label){case 0:return n=[],Object(o.a)()?[2,e]:[4,Object(p.a)((function(){return e.length>0&&Object(o.b)()}),(function(){return Object(r.b)(i,void 0,void 0,(function(){var i,o;return Object(r.d)(this,(function(r){switch(r.label){case 0:return(i=e.pop())?[4,Object(c.a)(i,t)]:[2];case 1:return o=r.sent(),o instanceof s.a||n.push(i),[2]}}))}))}))];case 1:return u.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}var x=function(){function t(t,e,n,i){void 0===n&&(n={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=e,this.settings=Object(r.a)({},n),this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=i,this.buffer=i.disableClientPersistence?new d.b(4,[]):new v.a(4,"dest-".concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return this._ready},t.prototype.ready=function(){var t;return null!==(t=this.onReady)&&void 0!==t?t:Promise.resolve()},t.prototype.load=function(t,e){return Object(r.b)(this,void 0,void 0,(function(){var n,i=this;return Object(r.d)(this,(function(r){switch(r.label){case 0:return this._ready||void 0!==this.onReady?[2]:(n=this,[4,j(t,e,this.name,this.version,this.settings,this.options.obfuscate)]);case 1:n.integration=r.sent(),this.onReady=new Promise((function(t){i.integration.once("ready",(function(){i._ready=!0,t(!0)}))})),this.onInitialize=new Promise((function(t){i.integration.on("initialize",(function(){i._initialized=!0,t(!0)}))}));try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(e){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),e}return[2]}}))}))},t.prototype.unload=function(t,e){return function(t,e,n){return Object(r.b)(this,void 0,void 0,(function(){var i,o,s,u;return Object(r.d)(this,(function(r){return i=Object(b.b)(),o=w(t),s=m(t,n),u="".concat(i,"/integrations/").concat(null!=s?s:o,"/").concat(e,"/").concat(null!=s?s:o,".dynamic.js.gz"),[2,Object(g.b)(u)]}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.middleware=(t=this.middleware).concat.apply(t,e)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(Object(o.a)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,e,n){var i,o;return Object(r.b)(this,void 0,void 0,(function(){var u,c,l,p,d,v;return Object(r.d)(this,(function(y){switch(y.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(u=null===(o=null===(i=this.options)||void 0===i?void 0:i.plan)||void 0===o?void 0:o.track,c=t.event.event,u&&c&&"Segment.io"!==this.name){if(l=u[c],!Object(f.a)(u,l))return t.updateEvent("integrations",Object(r.a)(Object(r.a)({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new s.b({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t];if(t.updateEvent("integrations",Object(r.a)(Object(r.a)({},t.event.integrations),null==l?void 0:l.integrations)),(null==l?void 0:l.enabled)&&!1===(null==l?void 0:l.integrations[this.name]))return t.cancel(new s.b({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,Object(h.applyDestinationMiddleware)(this.name,(b=t.event,JSON.parse(JSON.stringify(b))),this.middleware)];case 1:if(null===(p=y.sent()))return[2,t];d=new e(p,{}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(n),"integration_name:".concat(this.name)]),y.label=2;case 2:return y.trys.push([2,5,,6]),this.integration?[4,Object(a.a)(this.integration.invoke.call(this.integration,n,d))]:[3,4];case 3:y.sent(),y.label=4;case 4:return[3,6];case 5:throw v=y.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(n),"integration_name:".concat(this.name)]),v;case 6:return[2,t]}var b}))}))},t.prototype.track=function(t){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){return[2,this.send(t,i.Track,"track")]}))}))},t.prototype.page=function(t){var e;return Object(r.b)(this,void 0,void 0,(function(){var n=this;return Object(r.d)(this,(function(r){return(null===(e=this.integration)||void 0===e?void 0:e._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return n.send(t,i.Page,"page")}))]}))}))},t.prototype.identify=function(t){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){return[2,this.send(t,i.Identify,"identify")]}))}))},t.prototype.alias=function(t){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){return[2,this.send(t,i.Alias,"alias")]}))}))},t.prototype.group=function(t){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){return[2,this.send(t,i.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return Object(r.b)(t,void 0,void 0,(function(){var t;return Object(r.d)(this,(function(e){switch(e.label){case 0:return this.flushing=!0,t=this,[4,O(this,this.buffer)];case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();function _(t,e,n){var r,i;if(void 0===e&&(e={}),void 0===n&&(n={}),Object(u.b)())return[];t.plan&&((n=null!=n?n:{}).plan=t.plan);var o,s=null!==(i=null===(r=t.middlewareSettings)||void 0===r?void 0:r.routingRules)&&void 0!==i?i:[],c=(o=s,function(t){var e=t.payload,n=t.integration,r=t.next;new y.Store(o).getRulesByDestinationName(n).forEach((function(t){for(var n=t.matchers,i=t.transformers,o=0;o<n.length;o++)if(y.matches(e.obj,n[o])&&(e.obj=y.transform(e.obj,i[o]),null===e.obj))return r(null)})),r(e)}),a=Object(l.a)(t,null!=n?n:{});return Object.entries(t.integrations).map((function(t){var r,i=t[0],o=t[1];if(!i.startsWith("Segment")){var u=!1===e.All&&void 0===e[i];if(!1!==e[i]&&!u){var f=o.type,l=o.bundlingStatus,p=o.versionSettings;if(("unbundled"!==l&&("browser"===f||(null===(r=null==p?void 0:p.componentTypes)||void 0===r?void 0:r.includes("browser")))||"Segment.io"===i)&&"Iterable"!==i){var d=function(t){var e,n,r,i;return null!==(i=null!==(n=null===(e=t.versionSettings)||void 0===e?void 0:e.override)&&void 0!==n?n:null===(r=t.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(o),v=new x(i,d,a[i],n);return s.filter((function(t){return t.destinationName===i})).length>0&&v.addMiddleware(c),v}}}})).filter((function(t){return void 0!==t}))}}}]);