ordering-ui-external 2.6.8 → 2.7.1

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 (43) hide show
  1. package/_bundles/0.ordering-ui.0a58ae9fc1a4bce64c6e.js +1 -0
  2. package/_bundles/{1.ordering-ui.ba64d5c9c7490676feb5.js → 1.ordering-ui.0a58ae9fc1a4bce64c6e.js} +1 -1
  3. package/_bundles/4.ordering-ui.0a58ae9fc1a4bce64c6e.js +1 -0
  4. package/_bundles/{5.ordering-ui.ba64d5c9c7490676feb5.js → 5.ordering-ui.0a58ae9fc1a4bce64c6e.js} +1 -1
  5. package/_bundles/{6.ordering-ui.ba64d5c9c7490676feb5.js → 6.ordering-ui.0a58ae9fc1a4bce64c6e.js} +1 -1
  6. package/_bundles/{7.ordering-ui.ba64d5c9c7490676feb5.js → 7.ordering-ui.0a58ae9fc1a4bce64c6e.js} +2 -2
  7. package/_bundles/ordering-ui.0a58ae9fc1a4bce64c6e.js +2 -0
  8. package/_modules/themes/five/index.js +21 -0
  9. package/_modules/themes/five/src/components/BusinessController/index.js +6 -2
  10. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -4
  11. package/_modules/themes/five/src/components/BusinessReviews/index.js +5 -8
  12. package/_modules/themes/five/src/components/Cart/index.js +1 -1
  13. package/_modules/themes/five/src/components/Checkout/index.js +10 -5
  14. package/_modules/themes/five/src/components/Header/index.js +10 -4
  15. package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  16. package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +18 -8
  17. package/_modules/themes/five/src/components/ProductForm/styles.js +1 -1
  18. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  19. package/package.json +2 -2
  20. package/src/themes/five/index.js +6 -0
  21. package/src/themes/five/src/components/BusinessController/index.js +2 -2
  22. package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -4
  23. package/src/themes/five/src/components/BusinessReviews/index.js +5 -6
  24. package/src/themes/five/src/components/Cart/index.js +1 -1
  25. package/src/themes/five/src/components/Checkout/index.js +10 -7
  26. package/src/themes/five/src/components/Header/index.js +9 -4
  27. package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  28. package/src/themes/five/src/components/OrderDetails/OrderEta.js +21 -9
  29. package/src/themes/five/src/components/ProductForm/styles.js +1 -1
  30. package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
  31. package/template/app.js +13 -7
  32. package/template/pages/BusinessProductsList/index.js +4 -3
  33. package/template/pages/BusinessesList/index.js +2 -1
  34. package/template/pages/Checkout/index.js +1 -0
  35. package/template/pages/MyOrders/index.js +1 -0
  36. package/_bundles/0.ordering-ui.ba64d5c9c7490676feb5.js +0 -1
  37. package/_bundles/4.ordering-ui.ba64d5c9c7490676feb5.js +0 -1
  38. package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +0 -2
  39. /package/_bundles/{2.ordering-ui.ba64d5c9c7490676feb5.js → 2.ordering-ui.0a58ae9fc1a4bce64c6e.js} +0 -0
  40. /package/_bundles/{7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt → 7.ordering-ui.0a58ae9fc1a4bce64c6e.js.LICENSE.txt} +0 -0
  41. /package/_bundles/{8.ordering-ui.ba64d5c9c7490676feb5.js → 8.ordering-ui.0a58ae9fc1a4bce64c6e.js} +0 -0
  42. /package/_bundles/{9.ordering-ui.ba64d5c9c7490676feb5.js → 9.ordering-ui.0a58ae9fc1a4bce64c6e.js} +0 -0
  43. /package/_bundles/{ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt → ordering-ui.0a58ae9fc1a4bce64c6e.js.LICENSE.txt} +0 -0
@@ -12,14 +12,31 @@ export const OrderEta = (props) => {
12
12
  const [estimatedDeliveryTime, setEstimatedDeliveryTime] = useState(null)
13
13
 
14
14
  const getEstimatedDeliveryTime = () => {
15
- let _estimatedTime = null
15
+ let estimatedUtcTime = null
16
16
  let totalEta = 0
17
+ if (order?.delivered_in) totalEta += order?.delivered_in
18
+ if (order?.prepared_in) totalEta += order?.prepared_in
19
+ if (order?.delivery_type === 1 && order?.eta_drive_time) {
20
+ totalEta += order?.eta_drive_time
21
+ }
22
+
17
23
  const _delivery = order?.delivery_datetime_utc
18
24
  ? order?.delivery_datetime_utc
19
25
  : order?.delivery_datetime
26
+
20
27
  if (order?.eta_current_status_time) {
21
28
  const currentStatueEta = order?.eta_current_status_time
22
29
  totalEta += currentStatueEta
30
+ let previousStatusTimes = 0
31
+ if (order?.eta_previous_status_times) {
32
+ Object.keys(order.eta_previous_status_times).map(key => {
33
+ if (!key.includes('status_penalty')) {
34
+ previousStatusTimes += order.eta_previous_status_times[key]
35
+ }
36
+ })
37
+ }
38
+ totalEta += previousStatusTimes
39
+
23
40
  let nextStatusTimes = 0
24
41
  if (order?.eta_next_status_times) {
25
42
  Object.keys(order.eta_next_status_times).map(key => {
@@ -28,7 +45,6 @@ export const OrderEta = (props) => {
28
45
  }
29
46
  })
30
47
  }
31
-
32
48
  totalEta += nextStatusTimes
33
49
 
34
50
  const diffTimeAsSeconds = moment.utc(order?.reporting_data?.at[`status:${order.status}`]).add(order?.eta_current_status_time, 'minutes').diff(moment().utc(), 'seconds')
@@ -36,15 +52,11 @@ export const OrderEta = (props) => {
36
52
  if (diffTimeAsMinutes <= 0) {
37
53
  totalEta += (Math.floor(Math.abs(diffTimeAsMinutes / order?.eta_current_status_time) + 1) * order?.eta_current_status_penalty_time)
38
54
  }
39
- _estimatedTime = moment.utc(_delivery).add(totalEta, 'minutes')
40
55
  } else {
41
- let timesToAdd = 0
42
- if (order?.delivered_in) timesToAdd += order?.delivered_in
43
- if (order?.prepared_in) timesToAdd += order?.prepared_in
44
- const _etaTime = order?.eta_time + timesToAdd
45
- _estimatedTime = moment.utc(_delivery).add(_etaTime, 'minutes')
56
+ totalEta = order?.eta_time + totalEta
46
57
  }
47
- _estimatedTime = outputFormat ? moment(_estimatedTime).local().format(outputFormat) : parseDate(_estimatedTime, { utc: false })
58
+ estimatedUtcTime = moment.utc(_delivery).add(totalEta, 'minutes')
59
+ const _estimatedTime = outputFormat ? moment(estimatedUtcTime).local().format(outputFormat) : parseDate(estimatedUtcTime, { utc: false })
48
60
  setEstimatedDeliveryTime(_estimatedTime)
49
61
  }
50
62
 
@@ -398,7 +398,7 @@ export const ProductActions = styled.div`
398
398
  }
399
399
 
400
400
  div.incdec-control {
401
- padding-right: 18%;
401
+ margin-right: 18%;
402
402
  &.show-weight-unit{
403
403
  width: 30%;
404
404
  }
@@ -160,7 +160,7 @@ export const RenderProductsLayout = (props) => {
160
160
  <>
161
161
  {!isLoading && business?.id && (
162
162
  <WrappLayout isCartOnProductsList={isCartOnProductsList}>
163
- {((!hideBusinessNearCity && !useKioskApp) || props.forceShowNearBusiness) && (
163
+ {((!hideBusinessNearCity && !useKioskApp) || props.forceShowNearBusiness) && !isCustomLayout && (
164
164
  <NearBusiness>
165
165
  <BusinessesListing
166
166
  logosLayout
package/template/app.js CHANGED
@@ -110,6 +110,9 @@ export const App = () => {
110
110
  reviewStatus: { trigger: false, order: false, product: false, driver: false },
111
111
  reviewed: { isOrderReviewed: false, isProductReviewed: false, isDriverReviewed: false }
112
112
  })
113
+ const [oneSignalState, setOneSignalState] = useState({
114
+ notification_app: settings.notification_app
115
+ })
113
116
  const unaddressedTypes = configs?.unaddressed_order_types_allowed?.value.split('|').map(value => Number(value)) || []
114
117
  const isAllowUnaddressOrderType = unaddressedTypes.includes(orderStatus?.options?.type)
115
118
  const isShowReviewsPopupEnabled = configs?.show_reviews_popups_enabled?.value === '1'
@@ -169,12 +172,13 @@ export const App = () => {
169
172
 
170
173
  const businessesSlug = {
171
174
  marketplace: 'marketplace',
172
- kiosk: settings?.businessSlug
175
+ kiosk: settings?.businessSlug,
176
+ business: settings?.businessSlug
173
177
  }
174
178
 
175
179
  const singleBusinessConfig = {
176
- isActive: settings?.use_marketplace || isKioskApp,
177
- businessSlug: businessesSlug[isKioskApp ? 'kiosk' : 'marketplace']
180
+ isActive: settings?.use_marketplace || settings?.businessSlug || isKioskApp,
181
+ businessSlug: businessesSlug[isKioskApp ? 'kiosk' : settings?.use_marketplace ? 'marketplace' : 'business']
178
182
  }
179
183
 
180
184
  const signUpBusinesslayout = orderingTheme?.theme?.business_signup?.components?.layout?.type === 'old'
@@ -417,8 +421,8 @@ export const App = () => {
417
421
  }, [configs, loaded])
418
422
 
419
423
  useEffect(() => {
420
- if (isHome && settings?.use_marketplace) {
421
- goToPage('business', { store: 'marketplace' })
424
+ if (isHome && (settings?.use_marketplace || settings?.businessSlug)) {
425
+ goToPage('business', { store: settings?.use_marketplace ? 'marketplace' : settings?.businessSlug })
422
426
  }
423
427
  }, [])
424
428
 
@@ -479,6 +483,8 @@ export const App = () => {
479
483
  singleBusinessConfig={singleBusinessConfig}
480
484
  searchValue={searchValue}
481
485
  setSearchValue={setSearchValue}
486
+ businessSlug={settings?.businessSlug}
487
+ notificationState={oneSignalState}
482
488
  />
483
489
  )}
484
490
  <NotNetworkConnectivity />
@@ -606,7 +612,7 @@ export const App = () => {
606
612
  </Route>
607
613
  <Route exact path='/search'>
608
614
  {
609
- isKioskApp
615
+ isKioskApp || businessesSlug?.business
610
616
  ? <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
611
617
  : queryIntegrationToken && queryIntegrationCode === 'spoonity'
612
618
  ? <QueryLoginSpoonity token={queryIntegrationToken} />
@@ -629,7 +635,7 @@ export const App = () => {
629
635
  {isUserVerifyRequired ? (
630
636
  <Redirect to='/verify' />
631
637
  ) : (
632
- (orderStatus.options?.address?.location || isAllowUnaddressOrderType) && !isKioskApp ? (
638
+ (orderStatus.options?.address?.location || isAllowUnaddressOrderType) && !isKioskApp && !singleBusinessConfig.businessSlug ? (
633
639
  <BusinessListingSearch />
634
640
  ) : (
635
641
  <Redirect to={singleBusinessConfig.isActive ? `/${singleBusinessConfig.businessSlug}` : '/'} />
@@ -82,11 +82,11 @@ export const BusinessProductsList = (props) => {
82
82
  ...props,
83
83
  ordering,
84
84
  avoidBusinessLoading: true,
85
- isCustomLayout: settings?.use_marketplace,
85
+ isCustomLayout: settings?.use_marketplace || settings?.businessSlug,
86
86
  useKioskApp: settings?.use_kiosk,
87
87
  isSearchByName: true,
88
88
  isSearchByDescription: true,
89
- slug: businessSlug,
89
+ slug: settings?.businessSlug || businessSlug,
90
90
  categoryId,
91
91
  productId,
92
92
  businessProps: [
@@ -127,7 +127,8 @@ export const BusinessProductsList = (props) => {
127
127
  'pinterest_profile',
128
128
  'whatsapp_number',
129
129
  'snapchat_profile',
130
- 'previously_products'
130
+ 'previously_products',
131
+ 'configs'
131
132
  ],
132
133
  handleSearchRedirect: () => {
133
134
  events.emit('go_to_page', { page: 'search' })
@@ -16,6 +16,7 @@ export const BusinessesList = (props) => {
16
16
  isSearchByName: true,
17
17
  isSearchByDescription: true,
18
18
  franchiseId: settings?.franchiseSlug,
19
+ businessId: settings?.businessSlug,
19
20
  onBusinessClick: (business) => {
20
21
  if (businessUrlTemplate === '/store/:business_slug' || businessUrlTemplate === '/:business_slug') {
21
22
  events.emit('go_to_page', { page: 'business', params: { business_slug: business.slug } })
@@ -24,7 +25,7 @@ export const BusinessesList = (props) => {
24
25
  }
25
26
  },
26
27
  currentPageParam: 0,
27
- propsToFetch: ['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug', 'city', 'city_id'],
28
+ propsToFetch: ['id', 'name', 'header', 'logo', 'location', 'address', 'ribbon', 'timezone', 'schedule', 'open', 'delivery_price', 'distance', 'delivery_time', 'pickup_time', 'reviews', 'featured', 'offers', 'food', 'laundry', 'alcohol', 'groceries', 'slug', 'city', 'city_id', 'menus'],
28
29
  onRedirectPage: (data) => events.emit('go_to_page', data),
29
30
  }
30
31
 
@@ -101,6 +101,7 @@ export const CheckoutPage = (props) => {
101
101
  useValidationFields: true,
102
102
  validationFieldsType: 'checkout',
103
103
  useKioskApp: settings?.use_kiosk,
104
+ businessSlug: settings?.businessSlug,
104
105
  onPlaceOrderClick: (data, paymethod, cart) => {
105
106
  if (cart?.order?.uuid) {
106
107
  if (orderState?.options?.moment) {
@@ -16,6 +16,7 @@ export const MyOrders = (props) => {
16
16
  const ordersProps = {
17
17
  ...props,
18
18
  franchiseId: settings?.franchiseSlug,
19
+ businessId: settings?.businessSlug,
19
20
  hideOptions: windowSize.width < 576,
20
21
  onRedirectPage: (data) => {
21
22
  if (data.page === 'business') {
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[0],{636:function(t,n,e){"use strict";function i(t,n){var e,i;return"boolean"==typeof(null==n?void 0:n.enabled)?n.enabled:null===(i=null===(e=null==t?void 0:t.__default)||void 0===e?void 0:e.enabled)||void 0===i||i}e.d(n,"a",(function(){return i}))},649:function(t,n,e){"use strict";function i(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}e.d(n,"a",(function(){return i}))},741:function(t,n,e){"use strict";e.r(n),e.d(n,"LegacyDestination",(function(){return I})),e.d(n,"ajsDestinations",(function(){return S}));var i=e(4),r=e(56),o=e(63),a=e(31),s=e(37),c=e(108),u=e(100),d=e(636),l=e(202),h=e(207),v=e(185),f=e(72),b=e(203),p=e(91),g=e(113);function y(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function j(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function O(t,n,e,r){return Object(i.b)(this,void 0,void 0,(function(){var o,a,s,c,u,d;return Object(i.d)(this,(function(l){switch(l.label){case 0:o=y(n),a=j(o,r),s=Object(p.b)(),c="".concat(s,"/integrations/").concat(null!=a?a:o,"/").concat(e,"/").concat(null!=a?a:o,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Object(g.a)(c)];case 2:return l.sent(),function(t,n,e){var r,o;try{var a=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];a&&n.stats.gauge("legacy_destination_time",Math.round(a.duration),Object(i.f)([e],a.duration<100?["cached"]:[],!0))}catch(t){}}(c,t,n),[3,4];case 3:throw u=l.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),u;case 4:return d=window["".concat(o,"Deps")],[4,Promise.all(d.map((function(t){return Object(g.a)(s+t+".gz")})))];case 5:return l.sent(),window["".concat(o,"Loader")](),[2,window["".concat(o,"Integration")]]}}))}))}var m=e(649),w=function(t,n){var e,i=n.type,r=n.bundlingStatus,o=n.versionSettings,a="unbundled"!==r&&("browser"===i||(null===(e=null==o?void 0:o.componentTypes)||void 0===e?void 0:e.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&a},_=function(t,n){var e=!1===n.All&&void 0===n[t];return!1===n[t]||e};function k(t,n){return Object(i.b)(this,void 0,void 0,(function(){var e,r=this;return Object(i.d)(this,(function(s){switch(s.label){case 0:return e=[],Object(o.a)()?[2,n]:[4,Object(h.a)((function(){return n.length>0&&Object(o.b)()}),(function(){return Object(i.b)(r,void 0,void 0,(function(){var r,o;return Object(i.d)(this,(function(i){switch(i.label){case 0:return(r=n.pop())?[4,Object(u.a)(r,t)]:[2];case 1:return o=i.sent(),o instanceof a.a||e.push(r),[2]}}))}))}))];case 1:return s.sent(),e.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}var I=function(){function t(t,n,e,r,o){void 0===e&&(e={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=n,this.settings=Object(i.a)({},e),this.disableAutoISOConversion=r.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new v.b(4,[]):new f.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,n){var e;return Object(i.b)(this,void 0,void 0,(function(){var r,o,a=this;return Object(i.d)(this,(function(i){switch(i.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(e=this.integrationSource)||void 0===e?[3,1]:(o=e,[3,3]);case 1:return[4,O(t,this.name,this.version,this.options.obfuscate)];case 2:o=i.sent(),i.label=3;case 3:r=o,this.integration=function(t,n,e){var i;"Integration"in t?(t({user:function(){return e.user()},addIntegration:function(){}}),i=t.Integration):i=t;var r=new i(n);return r.analytics=e,r}(r,this.settings,n),this.onReady=new Promise((function(t){a.integration.once("ready",(function(){a._ready=!0,t(!0)}))})),this.onInitialize=new Promise((function(t){a.integration.on("initialize",(function(){a._initialized=!0,t(!0)}))}));try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(n){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),n}return[2]}}))}))},t.prototype.unload=function(t,n){return function(t,n,e){return Object(i.b)(this,void 0,void 0,(function(){var r,o,a,s;return Object(i.d)(this,(function(i){return r=Object(p.b)(),o=y(t),a=j(t,e),s="".concat(r,"/integrations/").concat(null!=a?a:o,"/").concat(n,"/").concat(null!=a?a:o,".dynamic.js.gz"),[2,Object(g.b)(s)]}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];this.middleware=(t=this.middleware).concat.apply(t,n)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(Object(o.a)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,n,e){var r,o;return Object(i.b)(this,void 0,void 0,(function(){var a,c,u,l,h,v;return Object(i.d)(this,(function(f){switch(f.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(a=null===(o=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===o?void 0:o.track,c=t.event.event,a&&c&&"Segment.io"!==this.name){if(u=a[c],!Object(d.a)(a,u))return t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new s.a({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(i.a)(Object(i.a)({},t.event.integrations),null==u?void 0:u.integrations)),(null==u?void 0:u.enabled)&&!1===(null==u?void 0:u.integrations[this.name]))return t.cancel(new s.a({retry:!1,reason:"Event ".concat(c," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,Object(b.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:if(null===(l=f.sent()))return[2,t];h=new n(l,{traverse:!this.disableAutoISOConversion}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(e),"integration_name:".concat(this.name)]),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,e,h)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw v=f.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(e),"integration_name:".concat(this.name)]),v;case 6:return[2,t]}}))}))},t.prototype.track=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Track,"track")]}))}))},t.prototype.page=function(t){var n;return Object(i.b)(this,void 0,void 0,(function(){var e=this;return Object(i.d)(this,(function(i){return(null===(n=this.integration)||void 0===n?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return e.send(t,r.Page,"page")}))]}))}))},t.prototype.identify=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Identify,"identify")]}))}))},t.prototype.alias=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Alias,"alias")]}))}))},t.prototype.group=function(t){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.send(t,r.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return Object(i.b)(t,void 0,void 0,(function(){var t;return Object(i.d)(this,(function(n){switch(n.label){case 0:return this.flushing=!0,t=this,[4,k(this,this.buffer)];case 1:return t.buffer=n.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();function S(t,n,e,r,o){var a,s;if(void 0===n&&(n={}),void 0===e&&(e={}),Object(c.b)())return[];t.plan&&((e=null!=e?e:{}).plan=t.plan);var u=null!==(s=null===(a=t.middlewareSettings)||void 0===a?void 0:a.routingRules)&&void 0!==s?s:[],d=t.integrations,h=e.integrations,v=Object(l.a)(t,null!=e?e:{}),f=null==o?void 0:o.reduce((function(t,n){var e;return Object(i.a)(Object(i.a)({},t),((e={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(n)]=n,e))}),{}),b=new Set(Object(i.f)(Object(i.f)([],Object.keys(d).filter((function(t){return w(t,d[t])})),!0),Object.keys(f||{}).filter((function(t){return Object(m.a)(d[t])||Object(m.a)(null==h?void 0:h[t])})),!0));return Array.from(b).filter((function(t){return!_(t,n)})).map((function(t){var n=function(t){var n,e,i,r;return null!==(r=null!==(e=null===(n=null==t?void 0:t.versionSettings)||void 0===n?void 0:n.override)&&void 0!==e?e:null===(i=null==t?void 0:t.versionSettings)||void 0===i?void 0:i.version)&&void 0!==r?r:"latest"}(d[t]),i=new I(t,n,v[t],e,null==f?void 0:f[t]);return u.filter((function(n){return n.destinationName===t})).length>0&&r&&i.addMiddleware(r),i}))}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingUI=window.webpackJsonpOrderingUI||[]).push([[4],{649:function(r,t,e){"use strict";function i(r){return"object"===Object.prototype.toString.call(r).slice(8,-1).toLowerCase()}e.d(t,"a",(function(){return i}))},742:function(r,t,e){"use strict";function i(r,t){return Object.keys(t).reduce((function(e,i){i.startsWith(r)&&(e[i.substr(r.length)]=t[i]);return e}),{})}e.r(t),e.d(t,"queryString",(function(){return s}));var a=e(201),n=e(649);function s(r,t){var e=document.createElement("a");e.href=t;var s=e.search.slice(1).split("&").reduce((function(r,t){var e=t.split("="),i=e[0],n=e[1];return r[i]=Object(a.a)(n),r}),{}),u=[],o=s.ajs_uid,c=s.ajs_event,d=s.ajs_aid,j=Object(n.a)(r.options.useQueryString)?r.options.useQueryString:{},_=j.aid,f=void 0===_?/.+/:_,p=j.uid,v=void 0===p?/.+/:p;if(d){var y=Array.isArray(s.ajs_aid)?s.ajs_aid[0]:s.ajs_aid;f.test(y)&&r.setAnonymousId(y)}if(o){var l=Array.isArray(s.ajs_uid)?s.ajs_uid[0]:s.ajs_uid;if(v.test(l)){var b=i("ajs_trait_",s);u.push(r.identify(l,b))}}if(c){var g=Array.isArray(s.ajs_event)?s.ajs_event[0]:s.ajs_event,h=i("ajs_prop_",s);u.push(r.track(g,h))}return Promise.all(u)}}}]);