ordering-ui-external 2.6.5 → 2.6.8
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.
- package/_bundles/0.ordering-ui.ba64d5c9c7490676feb5.js +1 -0
- package/_bundles/{5.ordering-ui.80bc71775c11b08c37b2.js → 5.ordering-ui.ba64d5c9c7490676feb5.js} +1 -1
- package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js → 7.ordering-ui.ba64d5c9c7490676feb5.js} +2 -2
- package/_bundles/ordering-ui.ba64d5c9c7490676feb5.js +2 -0
- package/_modules/components/LanguageSelector/index.js +1 -0
- package/_modules/components/OrderTypeSelectorHeader/index.js +3 -1
- package/_modules/components/SmartAppBanner/index.js +5 -2
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/styles/Select/index.js +14 -2
- package/_modules/styles/Selects/index.js +11 -8
- package/_modules/themes/callcenterOriginal/src/components/Orders/OrderMetaFields/index.js +1 -1
- package/_modules/themes/eight/src/components/AddressForm/index.js +4 -1
- package/_modules/themes/eight/src/components/SingleProductCard/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +168 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +39 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +19 -0
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +35 -156
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +45 -35
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +1 -1
- package/_modules/themes/five/src/components/CardForm/index.js +16 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +13 -9
- package/_modules/themes/five/src/components/CardFormCustom/cardUtils.js +102 -0
- package/_modules/themes/five/src/components/CardFormCustom/index.js +148 -0
- package/_modules/themes/five/src/components/CardFormCustom/styles.js +16 -0
- package/_modules/themes/five/src/components/CartPopover/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/index.js +31 -22
- package/_modules/themes/five/src/components/LanguageSelector/index.js +4 -1
- package/_modules/themes/five/src/components/LoginForm/index.js +11 -8
- package/_modules/themes/five/src/components/Modal/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderContextUI/index.js +13 -1
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +7 -3
- package/_modules/themes/five/src/components/OrderDetails/index.js +4 -2
- package/_modules/themes/five/src/components/PaymentOptionCard/index.js +84 -0
- package/_modules/themes/five/src/components/PaymentOptionStripe/index.js +48 -22
- package/_modules/themes/five/src/components/PaymentOptionStripe/styles.js +3 -1
- package/_modules/themes/five/src/components/PaymentOptions/index.js +46 -24
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +1 -1
- package/_modules/themes/five/src/styles/Select/index.js +4 -2
- package/_modules/themes/five/src/styles/Selects/index.js +7 -4
- package/_modules/themes/four/src/components/LoginForm/index.js +1 -1
- package/_modules/themes/pwa/src/components/MomentPopover/styles.js +1 -1
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +3 -1
- package/_modules/themes/six/src/components/BusinessesListing/index.js +1 -1
- package/index.html +1 -1
- package/package.json +4 -2
- package/src/components/LanguageSelector/index.js +1 -0
- package/src/components/OrderTypeSelectorHeader/index.js +3 -1
- package/src/components/SmartAppBanner/index.js +4 -2
- package/src/contexts/ThemeContext/index.js +1 -1
- package/src/styles/Select/index.js +11 -2
- package/src/styles/Selects/index.js +1 -1
- package/src/themes/five/src/components/BusinessBasicInformation/BusinessInfoComponent.js +230 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SearchComponent.js +40 -0
- package/src/themes/five/src/components/BusinessBasicInformation/SocialNetWork.js +10 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +39 -247
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +14 -4
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +1 -1
- package/src/themes/five/src/components/CardForm/index.js +25 -4
- package/src/themes/five/src/components/CardForm/styles.js +35 -0
- package/src/themes/five/src/components/CardFormCustom/cardUtils.js +111 -0
- package/src/themes/five/src/components/CardFormCustom/index.js +161 -0
- package/src/themes/five/src/components/CardFormCustom/styles.js +20 -0
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +34 -25
- package/src/themes/five/src/components/LanguageSelector/index.js +2 -1
- package/src/themes/five/src/components/LoginForm/index.js +6 -4
- package/src/themes/five/src/components/Modal/styles.js +1 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +10 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +4 -3
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/PaymentOptionCard/index.js +70 -0
- package/src/themes/five/src/components/PaymentOptionStripe/index.js +46 -20
- package/src/themes/five/src/components/PaymentOptionStripe/styles.js +6 -1
- package/src/themes/five/src/components/PaymentOptions/index.js +28 -3
- package/src/themes/five/src/components/ProductForm/index.js +0 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserPopover/styles.js +1 -1
- package/src/themes/five/src/styles/Select/index.js +3 -2
- package/src/themes/five/src/styles/Selects/index.js +1 -1
- package/src/themes/pwa/src/components/MomentPopover/styles.js +4 -1
- package/template/theme.json +3 -1
- package/_bundles/0.ordering-ui.80bc71775c11b08c37b2.js +0 -1
- package/_bundles/ordering-ui.80bc71775c11b08c37b2.js +0 -2
- /package/_bundles/{1.ordering-ui.80bc71775c11b08c37b2.js → 1.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{2.ordering-ui.80bc71775c11b08c37b2.js → 2.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{4.ordering-ui.80bc71775c11b08c37b2.js → 4.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{6.ordering-ui.80bc71775c11b08c37b2.js → 6.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{7.ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → 7.ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.80bc71775c11b08c37b2.js → 8.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{9.ordering-ui.80bc71775c11b08c37b2.js → 9.ordering-ui.ba64d5c9c7490676feb5.js} +0 -0
- /package/_bundles/{ordering-ui.80bc71775c11b08c37b2.js.LICENSE.txt → ordering-ui.ba64d5c9c7490676feb5.js.LICENSE.txt} +0 -0
|
@@ -35,11 +35,16 @@ export const CardItem = styled.div`
|
|
|
35
35
|
export const CardItemContent = styled.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
|
+
|
|
39
|
+
.checks svg {
|
|
40
|
+
color: ${props => props.theme.colors.primary};
|
|
41
|
+
font-size: 22px;
|
|
42
|
+
}
|
|
38
43
|
|
|
39
44
|
> div {
|
|
40
45
|
display: flex;
|
|
41
46
|
align-items: center;
|
|
42
|
-
margin
|
|
47
|
+
margin: 0 13px 0 5px;
|
|
43
48
|
${props => props.theme?.rtl && css`
|
|
44
49
|
margin-left: 13px;
|
|
45
50
|
margin-right: 0;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import Skeleton from 'react-loading-skeleton'
|
|
3
3
|
import IosRadioButtonOn from '@meronex/icons/ios/IosRadioButtonOn'
|
|
4
|
+
import BilStripe from '@meronex/icons/bi/BilStripe'
|
|
4
5
|
import FaCcStripe from '@meronex/icons/fa/FaCcStripe'
|
|
5
6
|
import FaStripeS from '@meronex/icons/fa/FaStripeS'
|
|
6
7
|
import GrStripe from '@meronex/icons/gr/GrStripe'
|
|
@@ -19,6 +20,7 @@ import { Alert } from '../Confirm'
|
|
|
19
20
|
import { PaymentOptionCash } from '../PaymentOptionCash'
|
|
20
21
|
import { PaymentOptionStripe } from '../PaymentOptionStripe'
|
|
21
22
|
import { PaymentOptionPaypal } from '../../../../../components/PaymentOptionPaypal'
|
|
23
|
+
import { PaymentOptionCard } from '../PaymentOptionCard'
|
|
22
24
|
import { StripeElementsForm } from '../StripeElementsForm'
|
|
23
25
|
import { StripeRedirectForm } from '../StripeRedirectForm'
|
|
24
26
|
import { NotFoundSource } from '../NotFoundSource'
|
|
@@ -42,6 +44,8 @@ const stripeRedirectOptions = [
|
|
|
42
44
|
{ name: 'iDEAL', value: 'ideal' }
|
|
43
45
|
]
|
|
44
46
|
|
|
47
|
+
const cardsPaymethods = ['credomatic']
|
|
48
|
+
|
|
45
49
|
const getPayIcon = (method) => {
|
|
46
50
|
switch (method) {
|
|
47
51
|
case 1:
|
|
@@ -97,7 +101,8 @@ const PaymentOptionsUI = (props) => {
|
|
|
97
101
|
setCreateOrder,
|
|
98
102
|
onPlaceOrderClick,
|
|
99
103
|
handlePlaceOrder,
|
|
100
|
-
paymethods
|
|
104
|
+
paymethods,
|
|
105
|
+
setCardList
|
|
101
106
|
} = props
|
|
102
107
|
const [, t] = useLanguage()
|
|
103
108
|
const [{ token }] = useSession()
|
|
@@ -246,19 +251,38 @@ const PaymentOptionsUI = (props) => {
|
|
|
246
251
|
setErrorCash={props.setErrorCash}
|
|
247
252
|
/>
|
|
248
253
|
)}
|
|
249
|
-
{isOpenMethod?.paymethod?.gateway === 'stripe'
|
|
254
|
+
{(isOpenMethod?.paymethod?.gateway === 'stripe' || paymethodSelected?.gateway === 'stripe') && (
|
|
250
255
|
<PaymentOptionStripe
|
|
256
|
+
setCardList={setCardList}
|
|
257
|
+
paymethod={isOpenMethod?.paymethod}
|
|
258
|
+
businessId={props.businessId}
|
|
259
|
+
publicKey={isOpenMethod?.paymethod?.credentials?.publishable}
|
|
260
|
+
onPaymentChange={onPaymentChange}
|
|
261
|
+
payType={isOpenMethod?.paymethod?.name}
|
|
262
|
+
onSelectCard={handlePaymethodDataChange}
|
|
263
|
+
onCancel={() => handlePaymethodClick(null)}
|
|
264
|
+
paymethodSelected={paymethodSelected?.data?.id}
|
|
265
|
+
handlePaymentMethodClick={handlePaymentMethodClick}
|
|
266
|
+
/>
|
|
267
|
+
)}
|
|
268
|
+
|
|
269
|
+
{(cardsPaymethods.includes(isOpenMethod?.paymethod?.gateway) || cardsPaymethods.includes(paymethodSelected?.gateway)) && (
|
|
270
|
+
<PaymentOptionCard
|
|
271
|
+
setCardList={setCardList}
|
|
251
272
|
paymethod={isOpenMethod?.paymethod}
|
|
252
273
|
businessId={props.businessId}
|
|
253
274
|
publicKey={isOpenMethod?.paymethod?.credentials?.publishable}
|
|
275
|
+
gateway={isOpenMethod?.paymethod?.gateway || paymethodSelected?.gateway}
|
|
254
276
|
onPaymentChange={onPaymentChange}
|
|
255
277
|
payType={isOpenMethod?.paymethod?.name}
|
|
256
278
|
onSelectCard={handlePaymethodDataChange}
|
|
257
279
|
onCancel={() => handlePaymethodClick(null)}
|
|
280
|
+
paymethodSelected={paymethodSelected?.data?.id}
|
|
281
|
+
handlePaymentMethodClick={handlePaymentMethodClick}
|
|
258
282
|
/>
|
|
259
283
|
)}
|
|
260
284
|
|
|
261
|
-
{stripeOptions.includes(paymethodSelected?.gateway) && paymethodData?.card && !isCustomerMode && (
|
|
285
|
+
{stripeOptions.includes(paymethodSelected?.gateway) && paymethodData?.card && !isCustomerMode && paymethodSelected?.gateway !== 'stripe' && (
|
|
262
286
|
<PayCardSelected>
|
|
263
287
|
<CardItemContent>
|
|
264
288
|
<span className='checks'>
|
|
@@ -317,6 +341,7 @@ const PaymentOptionsUI = (props) => {
|
|
|
317
341
|
payType={paymethodsList?.name}
|
|
318
342
|
onSelectCard={handlePaymethodDataChange}
|
|
319
343
|
onCancel={() => handlePaymethodClick(null)}
|
|
344
|
+
paymethodSelected={paymethodSelected}
|
|
320
345
|
/>
|
|
321
346
|
)}
|
|
322
347
|
</Modal>
|
|
@@ -172,7 +172,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
172
172
|
</NearBusiness>
|
|
173
173
|
)}
|
|
174
174
|
<div className='bp-list'>
|
|
175
|
-
{!
|
|
175
|
+
{!useKioskApp && (
|
|
176
176
|
<BusinessBasicInformationComponent
|
|
177
177
|
{...props}
|
|
178
178
|
businessState={businessState}
|
|
@@ -190,7 +190,7 @@ const UserDetailsUI = (props) => {
|
|
|
190
190
|
<CountryFlag>
|
|
191
191
|
{
|
|
192
192
|
userData?.country_phone_code && (
|
|
193
|
-
<PhoneInput onChange={() => { }} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone}`)?.country} />
|
|
193
|
+
<PhoneInput onChange={() => { }} defaultCountry={parsePhoneNumber(`+${(userData?.country_phone_code?.replace('+', ''))} ${userData?.cellphone.replace(`+${userData?.country_phone_code}`, '')}`)?.country} />
|
|
194
194
|
)
|
|
195
195
|
}
|
|
196
196
|
</CountryFlag>
|
|
@@ -21,7 +21,8 @@ export const Select = (props) => {
|
|
|
21
21
|
notReload,
|
|
22
22
|
CustomArrow,
|
|
23
23
|
isHomeStyle,
|
|
24
|
-
disableOneOption
|
|
24
|
+
disableOneOption,
|
|
25
|
+
zIndex
|
|
25
26
|
} = props
|
|
26
27
|
|
|
27
28
|
const isHome = window.location.pathname === '/' || window.location.pathname === '/home' || isHomeStyle
|
|
@@ -105,7 +106,7 @@ export const Select = (props) => {
|
|
|
105
106
|
</Selected>
|
|
106
107
|
)}
|
|
107
108
|
{open && options && (
|
|
108
|
-
<Options id='list' position='right' ref={dropdownReference} isHome={isHome}>
|
|
109
|
+
<Options id='list' position='right' ref={dropdownReference} isHome={isHome} zIndex={zIndex}>
|
|
109
110
|
{
|
|
110
111
|
options.map((option, i) => (
|
|
111
112
|
<Option
|
|
@@ -32,11 +32,14 @@ export const PopoverBody = styled.div`
|
|
|
32
32
|
padding-top: 30px;
|
|
33
33
|
border-radius: 10px;
|
|
34
34
|
max-width: 500px;
|
|
35
|
-
z-index:
|
|
35
|
+
z-index: 10002;
|
|
36
36
|
box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;
|
|
37
37
|
#moment_control h1{
|
|
38
38
|
margin-bottom: 30px;
|
|
39
39
|
}
|
|
40
|
+
@media (min-width: 576px) {
|
|
41
|
+
z-index: 1001;
|
|
42
|
+
}
|
|
40
43
|
`
|
|
41
44
|
|
|
42
45
|
export const PopoverArrow = styled.div`
|
package/template/theme.json
CHANGED
|
@@ -123,7 +123,9 @@
|
|
|
123
123
|
"NOT_FOUND_ORDER": "Sorry, we couldn't find the requested order.",
|
|
124
124
|
"ORDERS_REDIRECT": "Go to Orders",
|
|
125
125
|
"WRITE_A_REVIEW": "Write a Review",
|
|
126
|
-
"ADD": "Add"
|
|
126
|
+
"ADD": "Add",
|
|
127
|
+
"MOBILE_APPNAME": "Ordering app",
|
|
128
|
+
"MOBILE_APPNAME_AUTHOR": "Ordering, Inc."
|
|
127
129
|
},
|
|
128
130
|
"layouts": {
|
|
129
131
|
"general": {
|
|
@@ -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(58),o=e(65),a=e(29),s=e(37),c=e(105),u=e(97),d=e(636),l=e(202),h=e(207),v=e(185),f=e(71),b=e(203),p=e(88),g=e(110);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}))}}}]);
|