ordering-components-external 13.0.35 → 13.0.37

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 (19) hide show
  1. package/_bundles/0.ordering-component.42e30ef3a2313ff758b5.js +1 -0
  2. package/_bundles/{1.ordering-component.94801bc40091dbe6e0c4.js → 1.ordering-component.42e30ef3a2313ff758b5.js} +1 -1
  3. package/_bundles/{2.ordering-component.94801bc40091dbe6e0c4.js → 2.ordering-component.42e30ef3a2313ff758b5.js} +1 -1
  4. package/_bundles/{4.ordering-component.94801bc40091dbe6e0c4.js → 4.ordering-component.42e30ef3a2313ff758b5.js} +1 -1
  5. package/_bundles/{5.ordering-component.94801bc40091dbe6e0c4.js → 5.ordering-component.42e30ef3a2313ff758b5.js} +1 -1
  6. package/_bundles/6.ordering-component.42e30ef3a2313ff758b5.js +1 -0
  7. package/_bundles/{7.ordering-component.94801bc40091dbe6e0c4.js → 7.ordering-component.42e30ef3a2313ff758b5.js} +2 -2
  8. package/_bundles/{8.ordering-component.94801bc40091dbe6e0c4.js → 8.ordering-component.42e30ef3a2313ff758b5.js} +1 -1
  9. package/_bundles/ordering-component.42e30ef3a2313ff758b5.js +2 -0
  10. package/_modules/components/AddressForm/index.js +16 -12
  11. package/_modules/components/PlaceSpot/index.js +21 -11
  12. package/package.json +1 -1
  13. package/src/components/AddressForm/index.js +5 -4
  14. package/src/components/PlaceSpot/index.js +11 -4
  15. package/_bundles/0.ordering-component.94801bc40091dbe6e0c4.js +0 -1
  16. package/_bundles/6.ordering-component.94801bc40091dbe6e0c4.js +0 -1
  17. package/_bundles/ordering-component.94801bc40091dbe6e0c4.js +0 -2
  18. /package/_bundles/{7.ordering-component.94801bc40091dbe6e0c4.js.LICENSE.txt → 7.ordering-component.42e30ef3a2313ff758b5.js.LICENSE.txt} +0 -0
  19. /package/_bundles/{ordering-component.94801bc40091dbe6e0c4.js.LICENSE.txt → ordering-component.42e30ef3a2313ff758b5.js.LICENSE.txt} +0 -0
@@ -207,18 +207,15 @@ var AddressForm = exports.AddressForm = function AddressForm(props) {
207
207
  onSaveAddress && onSaveAddress(formState.changes);
208
208
  return _context2.abrupt("return");
209
209
  case 7:
210
- if (userCustomerSetup) {
211
- setUserCustomer(userCustomerSetup, true);
212
- }
213
210
  setFormState(_objectSpread(_objectSpread({}, formState), {}, {
214
211
  loading: true
215
212
  }));
216
- _context2.prev = 9;
217
- _context2.next = 12;
213
+ _context2.prev = 8;
214
+ _context2.next = 11;
218
215
  return ordering.users(userId).addresses((_addressState$address = addressState.address) === null || _addressState$address === void 0 ? void 0 : _addressState$address.id).save(_objectSpread(_objectSpread({}, values), formState.changes), {
219
216
  accessToken: accessToken
220
217
  });
221
- case 12:
218
+ case 11:
222
219
  _yield$ordering$users2 = _context2.sent;
223
220
  content = _yield$ordering$users2.content;
224
221
  setFormState(_objectSpread(_objectSpread({}, formState), {}, {
@@ -240,22 +237,29 @@ var AddressForm = exports.AddressForm = function AddressForm(props) {
240
237
  });
241
238
  }
242
239
  }
240
+ if (!userCustomerSetup) {
241
+ _context2.next = 18;
242
+ break;
243
+ }
244
+ _context2.next = 18;
245
+ return setUserCustomer(userCustomerSetup, true);
246
+ case 18:
243
247
  refreshUserInfo();
244
- _context2.next = 22;
248
+ _context2.next = 24;
245
249
  break;
246
- case 19:
247
- _context2.prev = 19;
248
- _context2.t0 = _context2["catch"](9);
250
+ case 21:
251
+ _context2.prev = 21;
252
+ _context2.t0 = _context2["catch"](8);
249
253
  setFormState(_objectSpread(_objectSpread({}, formState), {}, {
250
254
  loading: false,
251
255
  error: [_context2.t0.message],
252
256
  address: {}
253
257
  }));
254
- case 22:
258
+ case 24:
255
259
  case "end":
256
260
  return _context2.stop();
257
261
  }
258
- }, _callee2, null, [[9, 19]]);
262
+ }, _callee2, null, [[8, 21]]);
259
263
  }));
260
264
  return function saveAddress(_x3, _x4) {
261
265
  return _ref2.apply(this, arguments);
@@ -12,6 +12,7 @@ var _ToastContext = require("../../contexts/ToastContext");
12
12
  var _SessionContext = require("../../contexts/SessionContext");
13
13
  var _LanguageContext = require("../../contexts/LanguageContext");
14
14
  var _WebsocketContext = require("../../contexts/WebsocketContext");
15
+ var _CustomerContext = require("../../contexts/CustomerContext");
15
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -39,7 +40,8 @@ var PlaceSpot = exports.PlaceSpot = function PlaceSpot(props) {
39
40
  cart = props.cart,
40
41
  spotNumberDefault = props.spotNumberDefault,
41
42
  vehicleDefault = props.vehicleDefault,
42
- onRemoveSpotNumber = props.onRemoveSpotNumber;
43
+ onRemoveSpotNumber = props.onRemoveSpotNumber,
44
+ isCustomerMode = props.isCustomerMode;
43
45
  var _useOrder = (0, _OrderContext.useOrder)(),
44
46
  _useOrder2 = _slicedToArray(_useOrder, 1),
45
47
  orderState = _useOrder2[0];
@@ -49,7 +51,12 @@ var PlaceSpot = exports.PlaceSpot = function PlaceSpot(props) {
49
51
  var socket = (0, _WebsocketContext.useWebsocket)();
50
52
  var _useSession = (0, _SessionContext.useSession)(),
51
53
  _useSession2 = _slicedToArray(_useSession, 1),
52
- token = _useSession2[0].token;
54
+ _useSession2$ = _useSession2[0],
55
+ user = _useSession2$.user,
56
+ token = _useSession2$.token;
57
+ var _useCustomer = (0, _CustomerContext.useCustomer)(),
58
+ _useCustomer2 = _slicedToArray(_useCustomer, 1),
59
+ customerState = _useCustomer2[0];
53
60
  var _useToast = (0, _ToastContext.useToast)(),
54
61
  _useToast2 = _slicedToArray(_useToast, 2),
55
62
  showToast = _useToast2[1].showToast;
@@ -190,7 +197,7 @@ var PlaceSpot = exports.PlaceSpot = function PlaceSpot(props) {
190
197
  }();
191
198
  var handleChangeSpot = /*#__PURE__*/function () {
192
199
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
193
- var _ref2$isCheckout, isCheckout, bodyToSend, id, endpointToFetch, _yield$endpointToFetc, _yield$endpointToFetc2, error, result, _cart$business;
200
+ var _ref2$isCheckout, isCheckout, bodyToSend, _customerState$user, _bodyToSend, id, endpointToFetch, _yield$endpointToFetc, _yield$endpointToFetc2, error, result, _cart$business;
194
201
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
195
202
  while (1) switch (_context2.prev = _context2.next) {
196
203
  case 0:
@@ -199,11 +206,14 @@ var PlaceSpot = exports.PlaceSpot = function PlaceSpot(props) {
199
206
  setSpotState(_objectSpread(_objectSpread({}, spotState), {}, {
200
207
  loading: true
201
208
  }));
209
+ _bodyToSend = _objectSpread(_objectSpread({}, bodyToSend), {}, {
210
+ user_id: isCustomerMode ? customerState === null || customerState === void 0 || (_customerState$user = customerState.user) === null || _customerState$user === void 0 ? void 0 : _customerState$user.id : user === null || user === void 0 ? void 0 : user.id
211
+ });
202
212
  id = isCheckout ? cart === null || cart === void 0 ? void 0 : cart.uuid : cart === null || cart === void 0 ? void 0 : cart.id;
203
- endpointToFetch = isCheckout ? ordering.setAccessToken(token).carts(id).set(bodyToSend) : ordering.setAccessToken(token).orders(id).save(bodyToSend);
204
- _context2.next = 7;
213
+ endpointToFetch = isCheckout ? ordering.setAccessToken(token).carts(id).set(_bodyToSend) : ordering.setAccessToken(token).orders(id).save(_bodyToSend);
214
+ _context2.next = 8;
205
215
  return endpointToFetch;
206
- case 7:
216
+ case 8:
207
217
  _yield$endpointToFetc = _context2.sent;
208
218
  _yield$endpointToFetc2 = _yield$endpointToFetc.content;
209
219
  error = _yield$endpointToFetc2.error;
@@ -218,20 +228,20 @@ var PlaceSpot = exports.PlaceSpot = function PlaceSpot(props) {
218
228
  loading: false,
219
229
  error: error ? result : null
220
230
  }));
221
- _context2.next = 19;
231
+ _context2.next = 20;
222
232
  break;
223
- case 16:
224
- _context2.prev = 16;
233
+ case 17:
234
+ _context2.prev = 17;
225
235
  _context2.t0 = _context2["catch"](1);
226
236
  setSpotState(_objectSpread(_objectSpread({}, spotState), {}, {
227
237
  loading: false,
228
238
  error: [_context2.t0.message]
229
239
  }));
230
- case 19:
240
+ case 20:
231
241
  case "end":
232
242
  return _context2.stop();
233
243
  }
234
- }, _callee2, null, [[1, 16]]);
244
+ }, _callee2, null, [[1, 17]]);
235
245
  }));
236
246
  return function handleChangeSpot(_x) {
237
247
  return _ref3.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-components-external",
3
- "version": "13.0.35",
3
+ "version": "13.0.37",
4
4
  "description": "Ordering Internal Dashboard",
5
5
  "main": "./_modules/index.js",
6
6
  "scripts": {
@@ -121,9 +121,7 @@ export const AddressForm = (props) => {
121
121
  onSaveAddress && onSaveAddress(formState.changes)
122
122
  return
123
123
  }
124
- if (userCustomerSetup) {
125
- setUserCustomer(userCustomerSetup, true)
126
- }
124
+
127
125
  setFormState({ ...formState, loading: true })
128
126
  try {
129
127
  const { content } = await ordering
@@ -151,6 +149,9 @@ export const AddressForm = (props) => {
151
149
  })
152
150
  }
153
151
  }
152
+ if (userCustomerSetup) {
153
+ await setUserCustomer(userCustomerSetup, true)
154
+ }
154
155
  refreshUserInfo()
155
156
  } catch (err) {
156
157
  setFormState({
@@ -163,7 +164,7 @@ export const AddressForm = (props) => {
163
164
  }
164
165
 
165
166
  const getBusinessDeliveryZones = async (location) => {
166
- if(!location) return
167
+ if (!location) return
167
168
  try {
168
169
  setBusinessesList({
169
170
  ...businessesList,
@@ -5,6 +5,7 @@ import { useToast, ToastType } from '../../contexts/ToastContext'
5
5
  import { useSession } from '../../contexts/SessionContext'
6
6
  import { useLanguage } from '../../contexts/LanguageContext'
7
7
  import { useWebsocket } from '../../contexts/WebsocketContext'
8
+ import { useCustomer } from '../../contexts/CustomerContext'
8
9
 
9
10
  export const PlaceSpot = (props) => {
10
11
  const {
@@ -12,13 +13,15 @@ export const PlaceSpot = (props) => {
12
13
  cart,
13
14
  spotNumberDefault,
14
15
  vehicleDefault,
15
- onRemoveSpotNumber
16
+ onRemoveSpotNumber,
17
+ isCustomerMode
16
18
  } = props
17
19
 
18
20
  const [orderState] = useOrder()
19
21
  const [ordering] = useApi()
20
22
  const socket = useWebsocket()
21
- const [{ token }] = useSession()
23
+ const [{ user, token }] = useSession()
24
+ const [customerState] = useCustomer()
22
25
  const [, { showToast }] = useToast()
23
26
  const [, t] = useLanguage()
24
27
 
@@ -103,10 +106,14 @@ export const PlaceSpot = (props) => {
103
106
  const handleChangeSpot = async ({ isCheckout = true, bodyToSend }) => {
104
107
  try {
105
108
  setSpotState({ ...spotState, loading: true })
109
+ const _bodyToSend = {
110
+ ...bodyToSend,
111
+ user_id: isCustomerMode ? customerState?.user?.id : user?.id
112
+ }
106
113
  const id = isCheckout ? cart?.uuid : cart?.id
107
114
  const endpointToFetch = isCheckout
108
- ? ordering.setAccessToken(token).carts(id).set(bodyToSend)
109
- : ordering.setAccessToken(token).orders(id).save(bodyToSend)
115
+ ? ordering.setAccessToken(token).carts(id).set(_bodyToSend)
116
+ : ordering.setAccessToken(token).orders(id).save(_bodyToSend)
110
117
 
111
118
  const { content: { error, result } } = await endpointToFetch
112
119
 
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingComponents=window.webpackJsonpOrderingComponents||[]).push([[0],{256: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}))},359:function(t,n,e){"use strict";e.r(n),e.d(n,"LegacyDestination",(function(){return I})),e.d(n,"ajsDestinations",(function(){return k}));var i=e(2),r=e(21),o=e(18),a=e(10),s=e(15),c=e(42),u=e(38),d=e(256),l=e(61),h=e(67),v=e(57),f=e(28),b=e(62),p=e(34),g=e(43);function y(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function O(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function j(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=O(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(23),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},z=e(36);function S(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,a){void 0===r&&(r={}),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)({},r),this.disableAutoISOConversion=o.disableAutoISOConversion||!1,this.integrationSource=a,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=o,this.buffer=o.disableClientPersistence?new v.b(4,[]):new f.a(4,"".concat(e,":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,j(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{Object(z.a)(t,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(n){throw Object(z.a)(t,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),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=O(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}),Object(z.a)(t,{integrationName:this.name,methodName:e,type:"classic"}),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(),Object(z.a)(t,{integrationName:this.name,methodName:e,type:"classic",didError:!0}),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,S(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 k(t,n,e,r,o,a){var s,u;if(void 0===e&&(e={}),void 0===r&&(r={}),Object(c.b)())return[];n.plan&&((r=null!=r?r:{}).plan=n.plan);var d=null!==(u=null===(s=n.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],h=n.integrations,v=r.integrations,f=Object(l.a)(n,null!=r?r:{}),b=null==a?void 0:a.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))}),{}),p=new Set(Object(i.f)(Object(i.f)([],Object.keys(h).filter((function(t){return w(t,h[t])})),!0),Object.keys(b||{}).filter((function(t){return Object(m.d)(h[t])||Object(m.d)(null==v?void 0:v[t])})),!0));return Array.from(p).filter((function(t){return!_(t,e)})).map((function(n){var e=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"}(h[n]),i=new I(n,e,t,f[n],r,null==b?void 0:b[n]);return d.filter((function(t){return t.destinationName===n})).length>0&&o&&i.addMiddleware(o),i}))}}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonpOrderingComponents=window.webpackJsonpOrderingComponents||[]).push([[6],{256:function(n,e,t){"use strict";function i(n,e){var t,i;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(i=null===(t=null==n?void 0:n.__default)||void 0===t?void 0:t.enabled)||void 0===i||i}t.d(e,"a",(function(){return i}))},356:function(n,e,t){"use strict";t.r(e),t.d(e,"schemaFilter",(function(){return o}));var i=t(2),r=t(256);function o(n,e){function t(t){var o=n,a=t.event.event;if(o&&a){var u=o[a];if(!Object(r.a)(o,u))return t.updateEvent("integrations",Object(i.a)(Object(i.a)({},t.event.integrations),{All:!1,"Segment.io":!0})),t;var c=function(n,e){var t,i;if(!n||!Object.keys(n))return{};var r=n.integrations?Object.keys(n.integrations).filter((function(e){return!1===n.integrations[e]})):[],o=[];return(null!==(t=e.remotePlugins)&&void 0!==t?t:[]).forEach((function(n){r.forEach((function(e){(n.name.includes(e)||e.includes(n.name))&&o.push(n.name)}))})),(null!==(i=e.remotePlugins)&&void 0!==i?i:[]).reduce((function(n,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach((function(t){return n["".concat(e.name," ").concat(t.partnerAction)]=!1})),n}),{})}(u,e);t.updateEvent("integrations",Object(i.a)(Object(i.a)(Object(i.a)({},t.event.integrations),null==u?void 0:u.integrations),c))}return t}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:t,alias:t,track:t,identify:t,group:t}}}}]);