@surfside/ads-core 2.0.1 → 2.0.2
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/README.md +15 -15
- package/lib/cjs/Api.js +195 -0
- package/lib/cjs/Api.js.map +1 -0
- package/lib/cjs/helpers/Generator.js +50 -0
- package/lib/cjs/helpers/Generator.js.map +1 -0
- package/lib/cjs/helpers/Handlebars.js +270 -0
- package/lib/cjs/helpers/Handlebars.js.map +1 -0
- package/lib/cjs/helpers/NativeRequestBuilder.js +174 -0
- package/lib/cjs/helpers/NativeRequestBuilder.js.map +1 -0
- package/lib/cjs/helpers/RequestBuilder.js +160 -0
- package/lib/cjs/helpers/RequestBuilder.js.map +1 -0
- package/lib/cjs/helpers/TryGet.js +14 -0
- package/lib/cjs/helpers/TryGet.js.map +1 -0
- package/lib/cjs/helpers/Window.js +24 -0
- package/lib/cjs/helpers/Window.js.map +1 -0
- package/lib/cjs/helpers/index.js +24 -0
- package/lib/cjs/helpers/index.js.map +1 -0
- package/lib/cjs/helpers/response/Banner.js +4 -0
- package/lib/cjs/helpers/response/Banner.js.map +1 -0
- package/lib/cjs/helpers/response/BuiltResponse.js +27 -0
- package/lib/cjs/helpers/response/BuiltResponse.js.map +1 -0
- package/lib/cjs/helpers/response/Carousel.js +282 -0
- package/lib/cjs/helpers/response/Carousel.js.map +1 -0
- package/lib/cjs/helpers/response/Clickthrough.js +24 -0
- package/lib/cjs/helpers/response/Clickthrough.js.map +1 -0
- package/lib/cjs/helpers/response/ProductCard.js +198 -0
- package/lib/cjs/helpers/response/ProductCard.js.map +1 -0
- package/lib/cjs/helpers/response/Video.js +4 -0
- package/lib/cjs/helpers/response/Video.js.map +1 -0
- package/lib/cjs/helpers/response/index.js +23 -0
- package/lib/cjs/helpers/response/index.js.map +1 -0
- package/lib/cjs/index.js +21 -3488
- package/lib/cjs/index.js.map +1 -54
- package/lib/cjs/models/dynamic/DynamicZone.js +12 -0
- package/lib/cjs/models/dynamic/DynamicZone.js.map +1 -0
- package/lib/cjs/models/dynamic/index.js +18 -0
- package/lib/cjs/models/dynamic/index.js.map +1 -0
- package/lib/cjs/models/index.js +22 -0
- package/lib/cjs/models/index.js.map +1 -0
- package/lib/cjs/models/retail/Configuration.js +10 -0
- package/lib/cjs/models/retail/Configuration.js.map +1 -0
- package/lib/cjs/models/retail/Product.js +4 -0
- package/lib/cjs/models/retail/Product.js.map +1 -0
- package/lib/cjs/models/retail/Recommended.js +3 -0
- package/lib/cjs/models/retail/Recommended.js.map +1 -0
- package/lib/cjs/models/retail/index.js +20 -0
- package/lib/cjs/models/retail/index.js.map +1 -0
- package/lib/cjs/models/rtb/BidRequest.js +20 -0
- package/lib/cjs/models/rtb/BidRequest.js.map +1 -0
- package/lib/cjs/models/rtb/BidResponse.js +3 -0
- package/lib/cjs/models/rtb/BidResponse.js.map +1 -0
- package/lib/cjs/models/rtb/NativeRequest.js +122 -0
- package/lib/cjs/models/rtb/NativeRequest.js.map +1 -0
- package/lib/cjs/models/rtb/NativeResponse.js +26 -0
- package/lib/cjs/models/rtb/NativeResponse.js.map +1 -0
- package/lib/cjs/models/rtb/index.js +21 -0
- package/lib/cjs/models/rtb/index.js.map +1 -0
- package/lib/cjs/models/tracking/Geo.js +3 -0
- package/lib/cjs/models/tracking/Geo.js.map +1 -0
- package/lib/cjs/models/tracking/index.js +18 -0
- package/lib/cjs/models/tracking/index.js.map +1 -0
- package/lib/cjs/models/vast/Vast.js +4 -0
- package/lib/cjs/models/vast/Vast.js.map +1 -0
- package/lib/cjs/models/vast/index.js +18 -0
- package/lib/cjs/models/vast/index.js.map +1 -0
- package/lib/cjs/services/Bidder.js +128 -0
- package/lib/cjs/services/Bidder.js.map +1 -0
- package/lib/cjs/services/Configuration.js +93 -0
- package/lib/cjs/services/Configuration.js.map +1 -0
- package/lib/cjs/services/Device.js +236 -0
- package/lib/cjs/services/Device.js.map +1 -0
- package/lib/cjs/services/Dynamic.js +129 -0
- package/lib/cjs/services/Dynamic.js.map +1 -0
- package/lib/cjs/services/Geo.js +35 -0
- package/lib/cjs/services/Geo.js.map +1 -0
- package/lib/cjs/services/Logger.js +57 -0
- package/lib/cjs/services/Logger.js.map +1 -0
- package/lib/cjs/services/Memoization.js +17 -0
- package/lib/cjs/services/Memoization.js.map +1 -0
- package/lib/cjs/services/Product.js +127 -0
- package/lib/cjs/services/Product.js.map +1 -0
- package/lib/cjs/services/Recommender.js +83 -0
- package/lib/cjs/services/Recommender.js.map +1 -0
- package/lib/cjs/services/Result.js +220 -0
- package/lib/cjs/services/Result.js.map +1 -0
- package/lib/cjs/services/Template.js +43 -0
- package/lib/cjs/services/Template.js.map +1 -0
- package/lib/cjs/services/index.js +28 -0
- package/lib/cjs/services/index.js.map +1 -0
- package/lib/cjs/services/mock/Bidder.js +3 -0
- package/lib/cjs/services/mock/Bidder.js.map +1 -0
- package/lib/cjs/services/mock/index.js +18 -0
- package/lib/cjs/services/mock/index.js.map +1 -0
- package/lib/esm/Api.js +183 -0
- package/lib/esm/Api.js.map +1 -0
- package/lib/esm/helpers/Generator.js +42 -0
- package/lib/esm/helpers/Generator.js.map +1 -0
- package/lib/esm/helpers/Handlebars.js +251 -0
- package/lib/esm/helpers/Handlebars.js.map +1 -0
- package/lib/esm/helpers/NativeRequestBuilder.js +169 -0
- package/lib/esm/helpers/NativeRequestBuilder.js.map +1 -0
- package/lib/esm/helpers/RequestBuilder.js +157 -0
- package/lib/esm/helpers/RequestBuilder.js.map +1 -0
- package/lib/esm/helpers/TryGet.js +10 -0
- package/lib/esm/helpers/TryGet.js.map +1 -0
- package/lib/esm/helpers/Window.js +20 -0
- package/lib/esm/helpers/Window.js.map +1 -0
- package/lib/esm/helpers/index.js +8 -0
- package/lib/esm/helpers/index.js.map +1 -0
- package/lib/esm/helpers/response/Banner.js +3 -0
- package/lib/esm/helpers/response/Banner.js.map +1 -0
- package/lib/esm/helpers/response/BuiltResponse.js +22 -0
- package/lib/esm/helpers/response/BuiltResponse.js.map +1 -0
- package/lib/esm/helpers/response/Carousel.js +273 -0
- package/lib/esm/helpers/response/Carousel.js.map +1 -0
- package/lib/esm/helpers/response/Clickthrough.js +20 -0
- package/lib/esm/helpers/response/Clickthrough.js.map +1 -0
- package/lib/esm/helpers/response/ProductCard.js +189 -0
- package/lib/esm/helpers/response/ProductCard.js.map +1 -0
- package/lib/esm/helpers/response/Video.js +3 -0
- package/lib/esm/helpers/response/Video.js.map +1 -0
- package/lib/esm/helpers/response/index.js +7 -0
- package/lib/esm/helpers/response/index.js.map +1 -0
- package/lib/esm/index.js +5 -3460
- package/lib/esm/index.js.map +1 -54
- package/lib/esm/models/dynamic/DynamicZone.js +11 -0
- package/lib/esm/models/dynamic/DynamicZone.js.map +1 -0
- package/lib/esm/models/dynamic/index.js +2 -0
- package/lib/esm/models/dynamic/index.js.map +1 -0
- package/lib/esm/models/index.js +6 -0
- package/lib/esm/models/index.js.map +1 -0
- package/lib/esm/models/retail/Configuration.js +9 -0
- package/lib/esm/models/retail/Configuration.js.map +1 -0
- package/lib/esm/models/retail/Product.js +3 -0
- package/lib/esm/models/retail/Product.js.map +1 -0
- package/lib/esm/models/retail/Recommended.js +2 -0
- package/lib/esm/models/retail/Recommended.js.map +1 -0
- package/lib/esm/models/retail/index.js +4 -0
- package/lib/esm/models/retail/index.js.map +1 -0
- package/lib/esm/models/rtb/BidRequest.js +17 -0
- package/lib/esm/models/rtb/BidRequest.js.map +1 -0
- package/lib/esm/models/rtb/BidResponse.js +2 -0
- package/lib/esm/models/rtb/BidResponse.js.map +1 -0
- package/lib/esm/models/rtb/NativeRequest.js +119 -0
- package/lib/esm/models/rtb/NativeRequest.js.map +1 -0
- package/lib/esm/models/rtb/NativeResponse.js +23 -0
- package/lib/esm/models/rtb/NativeResponse.js.map +1 -0
- package/lib/esm/models/rtb/index.js +5 -0
- package/lib/esm/models/rtb/index.js.map +1 -0
- package/lib/esm/models/tracking/Geo.js +2 -0
- package/lib/esm/models/tracking/Geo.js.map +1 -0
- package/lib/esm/models/tracking/index.js +2 -0
- package/lib/esm/models/tracking/index.js.map +1 -0
- package/lib/esm/models/vast/Vast.js +3 -0
- package/lib/esm/models/vast/Vast.js.map +1 -0
- package/lib/esm/models/vast/index.js +2 -0
- package/lib/esm/models/vast/index.js.map +1 -0
- package/lib/esm/services/Bidder.js +119 -0
- package/lib/esm/services/Bidder.js.map +1 -0
- package/lib/esm/services/Configuration.js +56 -0
- package/lib/esm/services/Configuration.js.map +1 -0
- package/lib/esm/services/Device.js +232 -0
- package/lib/esm/services/Device.js.map +1 -0
- package/lib/esm/services/Dynamic.js +120 -0
- package/lib/esm/services/Dynamic.js.map +1 -0
- package/lib/esm/services/Geo.js +30 -0
- package/lib/esm/services/Geo.js.map +1 -0
- package/lib/esm/services/Logger.js +52 -0
- package/lib/esm/services/Logger.js.map +1 -0
- package/lib/esm/services/Memoization.js +13 -0
- package/lib/esm/services/Memoization.js.map +1 -0
- package/lib/esm/services/Product.js +120 -0
- package/lib/esm/services/Product.js.map +1 -0
- package/lib/esm/services/Recommender.js +78 -0
- package/lib/esm/services/Recommender.js.map +1 -0
- package/lib/esm/services/Result.js +199 -0
- package/lib/esm/services/Result.js.map +1 -0
- package/lib/esm/services/Template.js +38 -0
- package/lib/esm/services/Template.js.map +1 -0
- package/lib/esm/services/index.js +12 -0
- package/lib/esm/services/index.js.map +1 -0
- package/lib/esm/services/mock/Bidder.js +2 -0
- package/lib/esm/services/mock/Bidder.js.map +1 -0
- package/lib/esm/services/mock/index.js +2 -0
- package/lib/esm/services/mock/index.js.map +1 -0
- package/lib/types/Api.d.ts +5 -5
- package/lib/types/helpers/Handlebars.d.ts +3 -3
- package/lib/types/helpers/NativeRequestBuilder.d.ts +1 -1
- package/lib/types/helpers/RequestBuilder.d.ts +1 -1
- package/lib/types/helpers/TryGet.d.ts +1 -1
- package/lib/types/helpers/Window.d.ts +2 -2
- package/lib/types/helpers/response/Banner.d.ts +1 -1
- package/lib/types/helpers/response/BuiltResponse.d.ts +1 -1
- package/lib/types/helpers/response/Carousel.d.ts +1 -1
- package/lib/types/helpers/response/Clickthrough.d.ts +1 -1
- package/lib/types/helpers/response/ProductCard.d.ts +3 -3
- package/lib/types/helpers/response/Video.d.ts +2 -2
- package/lib/types/services/Bidder.d.ts +3 -3
- package/lib/types/services/Configuration.d.ts +1 -1
- package/lib/types/services/Dynamic.d.ts +6 -6
- package/lib/types/services/Geo.d.ts +1 -1
- package/lib/types/services/Product.d.ts +1 -1
- package/lib/types/services/Template.d.ts +3 -3
- package/package.json +41 -33
- package/lib/index.js +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types/constant-values/index.d.ts +0 -46
- package/lib/types/errors/index.d.ts +0 -3
- package/lib/types/helpers/generators/CollectN.d.ts +0 -2
- package/lib/types/helpers/generators/index.d.ts +0 -1
- package/lib/types/helpers/handlebars/index.d.ts +0 -119
- package/lib/types/helpers/requests/RequestBuilder.d.ts +0 -124
- package/lib/types/helpers/requests/SimpleBannerRequest.d.ts +0 -26
- package/lib/types/helpers/requests/index.d.ts +0 -2
- package/lib/types/helpers/responses/BuildBannerResponse.d.ts +0 -10
- package/lib/types/helpers/responses/BuildNativeResponse.d.ts +0 -21
- package/lib/types/helpers/responses/BuildVideoResponse.d.ts +0 -0
- package/lib/types/helpers/responses/ClickthroughHelpers.d.ts +0 -2
- package/lib/types/helpers/responses/VastHelpers.d.ts +0 -4
- package/lib/types/helpers/responses/index.d.ts +0 -4
- package/lib/types/middleware/DeviceMiddleware.d.ts +0 -3
- package/lib/types/middleware/GeoMiddleware.d.ts +0 -3
- package/lib/types/middleware/IdentityMiddleware.d.ts +0 -4
- package/lib/types/middleware/index.d.ts +0 -3
- package/lib/types/models/retail/IProductInformation.d.ts +0 -37
- package/lib/types/models/retail/IPublisherConfiguration.d.ts +0 -64
- package/lib/types/models/retail/IRecommenderResponse.d.ts +0 -10
- package/lib/types/models/rtb/IBidRequest.d.ts +0 -399
- package/lib/types/models/rtb/IBidResponse.d.ts +0 -47
- package/lib/types/models/rtb/native/Constants.d.ts +0 -60
- package/lib/types/models/rtb/native/INativeRequest.d.ts +0 -54
- package/lib/types/models/rtb/native/INativeResponse.d.ts +0 -60
- package/lib/types/models/rtb/native/NativeConstants.d.ts +0 -120
- package/lib/types/models/rtb/native/NativeRequestBuilder.d.ts +0 -158
- package/lib/types/models/rtb/native/index.d.ts +0 -4
- package/lib/types/models/tracking/IEvents.d.ts +0 -82
- package/lib/types/models/tracking/IGeoContext.d.ts +0 -14
- package/lib/types/models/tracking/IUserID.d.ts +0 -1
- package/lib/types/services/OverrideService.d.ts +0 -10
- package/lib/types/services/logger/ILoggerService.d.ts +0 -39
- package/lib/types/services/logger/LocalLoggerService.d.ts +0 -19
- package/lib/types/services/logger/index.d.ts +0 -2
- package/lib/types/services/product-feed/IProductFeedService.d.ts +0 -5
- package/lib/types/services/product-feed/SurfsideProductFeedService.d.ts +0 -11
- package/lib/types/services/product-feed/index.d.ts +0 -2
- package/lib/types/services/recommender/IRecommenderService.d.ts +0 -47
- package/lib/types/services/recommender/SurfsideRecommenderService.d.ts +0 -31
- package/lib/types/services/recommender/index.d.ts +0 -2
- package/lib/types/services/rtb/bidder/IBidderService.d.ts +0 -12
- package/lib/types/services/rtb/bidder/SurfsideBidderService.d.ts +0 -28
- package/lib/types/services/rtb/bidder/index.d.ts +0 -2
- package/lib/types/services/rtb/configuration/IConfigurationService.d.ts +0 -14
- package/lib/types/services/rtb/configuration/SurfsideConfigurationService.d.ts +0 -29
- package/lib/types/services/rtb/configuration/index.d.ts +0 -2
- package/lib/types/services/rtb/index.d.ts +0 -2
- package/lib/types/services/tracking/device/DeviceOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/device/IDeviceService.d.ts +0 -4
- package/lib/types/services/tracking/device/SurfsideDeviceService.d.ts +0 -16
- package/lib/types/services/tracking/device/index.d.ts +0 -3
- package/lib/types/services/tracking/events/IEventService.d.ts +0 -5
- package/lib/types/services/tracking/events/SurfsideEventService.d.ts +0 -42
- package/lib/types/services/tracking/events/index.d.ts +0 -2
- package/lib/types/services/tracking/geo/GeoOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/geo/IGeoService.d.ts +0 -12
- package/lib/types/services/tracking/geo/SurfsideGeoService.d.ts +0 -7
- package/lib/types/services/tracking/geo/index.d.ts +0 -3
- package/lib/types/services/tracking/index.d.ts +0 -4
- package/lib/types/services/tracking/user/IUserIDService.d.ts +0 -4
- package/lib/types/services/tracking/user/SurfsideUserIDService.d.ts +0 -7
- package/lib/types/services/tracking/user/UserOverrideService.d.ts +0 -8
- package/lib/types/services/tracking/user/index.d.ts +0 -3
- package/lib/types/utils/Protocol.d.ts +0 -1
- package/lib/types/utils/Rendering.d.ts +0 -44
- package/lib/types/utils/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@surfside/ads-core",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"module": "./lib/esm/index.js",
|
|
5
|
-
"main": "./lib/cjs/index.js",
|
|
6
|
-
"types": "./lib/types/index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"lib/",
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@surfside/ads-core",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"module": "./lib/esm/index.js",
|
|
5
|
+
"main": "./lib/cjs/index.js",
|
|
6
|
+
"types": "./lib/types/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./lib/esm/index.js",
|
|
10
|
+
"require": "./lib/cjs/index.js",
|
|
11
|
+
"types": "./lib/types/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"license": "UNLICENSED",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@eslint/js": "^9.25.1",
|
|
22
|
+
"@types/bun": "latest",
|
|
23
|
+
"@types/handlebars": "^4.1.0",
|
|
24
|
+
"@types/jest": "^29.5.14",
|
|
25
|
+
"eslint": "^9.25.1",
|
|
26
|
+
"jest": "^29.7.0",
|
|
27
|
+
"ts-jest": "^29.3.2",
|
|
28
|
+
"typedoc": "^0.28.5",
|
|
29
|
+
"typescript-eslint": "^8.31.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"typescript": "^5.8.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"handlebars": "^4.7.8"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"clean": "rm -rf ./lib",
|
|
39
|
+
"build": "tsc -p ./tsconfig.types.json && tsc -p ./tsconfig.esm.json && tsc -p tsconfig.cjs.json",
|
|
40
|
+
"lint": "npx eslint"
|
|
41
|
+
}
|
|
34
42
|
}
|
package/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SurfAdsCore=t():e.SurfAdsCore=t()}(self,(()=>(()=>{var e={261:(e,t,i)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}t.__esModule=!0;var o=n(i(2871)),l=r(i(9613)),s=r(i(3769)),u=n(i(2849)),a=n(i(7624)),d=r(i(1148));function c(){var e=new o.HandlebarsEnvironment;return u.extend(e,o),e.SafeString=l.default,e.Exception=s.default,e.Utils=u,e.escapeExpression=u.escapeExpression,e.VM=a,e.template=function(t){return a.template(t,e)},e}var v=c();v.create=c,d.default(v),v.default=v,t.default=v,e.exports=t.default},2871:(e,t,i)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.HandlebarsEnvironment=c;var n=i(2849),o=r(i(3769)),l=i(2277),s=i(5940),u=r(i(566)),a=i(3865);t.VERSION="4.7.8";t.COMPILER_REVISION=8;t.LAST_COMPATIBLE_COMPILER_REVISION=7;t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};var d="[object Object]";function c(e,t,i){this.helpers=e||{},this.partials=t||{},this.decorators=i||{},l.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:u.default,log:u.default.log,registerHelper:function(e,t){if(n.toString.call(e)===d){if(t)throw new o.default("Arg not supported with multiple helpers");n.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(n.toString.call(e)===d)n.extend(this.partials,e);else{if(void 0===t)throw new o.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(n.toString.call(e)===d){if(t)throw new o.default("Arg not supported with multiple decorators");n.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){a.resetLoggedProperties()}};var v=u.default.log;t.log=v,t.createFrame=n.createFrame,t.logger=u.default},5940:(e,t,i)=>{"use strict";t.__esModule=!0,t.registerDefaultDecorators=function(e){o.default(e)};var r,n=i(7430),o=(r=n)&&r.__esModule?r:{default:r}},7430:(e,t,i)=>{"use strict";t.__esModule=!0;var r=i(2849);t.default=function(e){e.registerDecorator("inline",(function(e,t,i,n){var o=e;return t.partials||(t.partials={},o=function(n,o){var l=i.partials;i.partials=r.extend({},l,t.partials);var s=e(n,o);return i.partials=l,s}),t.partials[n.args[0]]=n.fn,o}))},e.exports=t.default},3769:(e,t)=>{"use strict";t.__esModule=!0;var i=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(e,t){var n=t&&t.loc,o=void 0,l=void 0,s=void 0,u=void 0;n&&(o=n.start.line,l=n.end.line,s=n.start.column,u=n.end.column,e+=" - "+o+":"+s);for(var a=Error.prototype.constructor.call(this,e),d=0;d<i.length;d++)this[i[d]]=a[i[d]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{n&&(this.lineNumber=o,this.endLineNumber=l,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:u,enumerable:!0})):(this.column=s,this.endColumn=u))}catch(e){}}r.prototype=new Error,t.default=r,e.exports=t.default},2277:(e,t,i)=>{"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.registerDefaultHelpers=function(e){n.default(e),o.default(e),l.default(e),s.default(e),u.default(e),a.default(e),d.default(e)},t.moveHelperToHooks=function(e,t,i){e.helpers[t]&&(e.hooks[t]=e.helpers[t],i||delete e.helpers[t])};var n=r(i(6097)),o=r(i(6785)),l=r(i(4353)),s=r(i(2355)),u=r(i(5300)),a=r(i(7466)),d=r(i(908))},6097:(e,t,i)=>{"use strict";t.__esModule=!0;var r=i(2849);t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,i){var n=i.inverse,o=i.fn;if(!0===t)return o(this);if(!1===t||null==t)return n(this);if(r.isArray(t))return t.length>0?(i.ids&&(i.ids=[i.name]),e.helpers.each(t,i)):n(this);if(i.data&&i.ids){var l=r.createFrame(i.data);l.contextPath=r.appendContextPath(i.data.contextPath,i.name),i={data:l}}return o(t,i)}))},e.exports=t.default},6785:(e,t,i)=>{"use strict";t.__esModule=!0;var r,n=i(2849),o=i(3769),l=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new l.default("Must pass iterator to #each");var i,r=t.fn,o=t.inverse,s=0,u="",a=void 0,d=void 0;function c(t,i,o){a&&(a.key=t,a.index=i,a.first=0===i,a.last=!!o,d&&(a.contextPath=d+t)),u+=r(e[t],{data:a,blockParams:n.blockParams([e[t],t],[d+t,null])})}if(t.data&&t.ids&&(d=n.appendContextPath(t.data.contextPath,t.ids[0])+"."),n.isFunction(e)&&(e=e.call(this)),t.data&&(a=n.createFrame(t.data)),e&&"object"==typeof e)if(n.isArray(e))for(var v=e.length;s<v;s++)s in e&&c(s,s,s===e.length-1);else if("function"==typeof Symbol&&e[Symbol.iterator]){for(var h=[],f=e[Symbol.iterator](),p=f.next();!p.done;p=f.next())h.push(p.value);for(v=(e=h).length;s<v;s++)c(s,s,s===e.length-1)}else i=void 0,Object.keys(e).forEach((function(e){void 0!==i&&c(i,s-1),i=e,s++})),void 0!==i&&c(i,s-1,!0);return 0===s&&(u=o(this)),u}))},e.exports=t.default},4353:(e,t,i)=>{"use strict";t.__esModule=!0;var r,n=i(3769),o=(r=n)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new o.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default},2355:(e,t,i)=>{"use strict";t.__esModule=!0;var r,n=i(2849),o=i(3769),l=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new l.default("#if requires exactly one argument");return n.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||n.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,i){if(2!=arguments.length)throw new l.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:i.inverse,inverse:i.fn,hash:i.hash})}))},e.exports=t.default},5300:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],i=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var n=1;null!=i.hash.level?n=i.hash.level:i.data&&null!=i.data.level&&(n=i.data.level),t[0]=n,e.log.apply(e,t)}))},e.exports=t.default},7466:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,i){return e?i.lookupProperty(e,t):e}))},e.exports=t.default},908:(e,t,i)=>{"use strict";t.__esModule=!0;var r,n=i(2849),o=i(3769),l=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new l.default("#with requires exactly one argument");n.isFunction(e)&&(e=e.call(this));var i=t.fn;if(n.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&((r=n.createFrame(t.data)).contextPath=n.appendContextPath(t.data.contextPath,t.ids[0])),i(e,{data:r,blockParams:n.blockParams([e],[r&&r.contextPath])})}))},e.exports=t.default},9726:(e,t,i)=>{"use strict";t.__esModule=!0,t.createNewLookupObject=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return r.extend.apply(void 0,[Object.create(null)].concat(t))};var r=i(2849)},3865:(e,t,i)=>{"use strict";t.__esModule=!0,t.createProtoAccessControl=function(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var i=Object.create(null);return i.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(i,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},t.resultIsAllowed=function(e,t,i){return u("function"==typeof e?t.methods:t.properties,i)},t.resetLoggedProperties=function(){Object.keys(s).forEach((function(e){delete s[e]}))};var r,n=i(9726),o=i(566),l=(r=o)&&r.__esModule?r:{default:r},s=Object.create(null);function u(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==s[e]&&(s[e]=!0,l.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}},2614:(e,t)=>{"use strict";t.__esModule=!0,t.wrapHelper=function(e,t){if("function"!=typeof e)return e;return function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}}},566:(e,t,i)=>{"use strict";t.__esModule=!0;var r=i(2849),n={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=r.indexOf(n.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=n.lookupLevel(e),"undefined"!=typeof console&&n.lookupLevel(n.level)<=e){var t=n.methodMap[e];console[t]||(t="log");for(var i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];console[t].apply(console,r)}}};t.default=n,e.exports=t.default},1148:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",(function(){return this})),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}},e.exports=t.default},7624:(e,t,i)=>{"use strict";t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,i=s.COMPILER_REVISION;if(t>=s.LAST_COMPATIBLE_COMPILER_REVISION&&t<=s.COMPILER_REVISION)return;if(t<s.LAST_COMPATIBLE_COMPILER_REVISION){var r=s.REVISION_CHANGES[i],n=s.REVISION_CHANGES[t];throw new l.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+n+").")}throw new l.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")},t.template=function(e,t){if(!t)throw new l.default("No environment passed to template");if(!e||!e.main)throw new l.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var i=e.compiler&&7===e.compiler[0];var r={strict:function(e,t,i){if(!e||!(t in e))throw new l.default('"'+t+'" not defined in '+e,{loc:i});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var i=e[t];return null==i||Object.prototype.hasOwnProperty.call(e,t)||d.resultIsAllowed(i,r.protoAccessControl,t)?i:void 0},lookup:function(e,t){for(var i=e.length,n=0;n<i;n++){if(null!=(e[n]&&r.lookupProperty(e[n],t)))return e[n][t]}},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:n.escapeExpression,invokePartial:function(i,r,o){o.hash&&(r=n.extend({},r,o.hash),o.ids&&(o.ids[0]=!0)),i=t.VM.resolvePartial.call(this,i,r,o);var s=n.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),u=t.VM.invokePartial.call(this,i,r,s);if(null==u&&t.compile&&(o.partials[o.name]=t.compile(i,e.compilerOptions,t),u=o.partials[o.name](r,s)),null!=u){if(o.indent){for(var a=u.split("\n"),d=0,c=a.length;d<c&&(a[d]||d+1!==c);d++)a[d]=o.indent+a[d];u=a.join("\n")}return u}throw new l.default("The partial "+o.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var i=e[t];return i.decorator=e[t+"_d"],i},programs:[],program:function(e,t,i,r,n){var o=this.programs[e],l=this.fn(e);return t||n||r||i?o=c(this,e,l,t,i,r,n):o||(o=this.programs[e]=c(this,e,l)),o},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var i=e||t;return e&&t&&e!==t&&(i=n.extend({},t,e)),i},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=i.data;o._setup(i),!i.partial&&e.useData&&(n=function(e,t){t&&"root"in t||((t=t?s.createFrame(t):{}).root=e);return t}(t,n));var l=void 0,u=e.useBlockParams?[]:void 0;function a(t){return""+e.main(r,t,r.helpers,r.partials,n,u,l)}return e.useDepths&&(l=i.depths?t!=i.depths[0]?[t].concat(i.depths):i.depths:[t]),(a=h(e.main,a,r,i.depths||[],n,u))(t,i)}return o.isTop=!0,o._setup=function(o){if(o.partial)r.protoAccessControl=o.protoAccessControl,r.helpers=o.helpers,r.partials=o.partials,r.decorators=o.decorators,r.hooks=o.hooks;else{var l=n.extend({},t.helpers,o.helpers);!function(e,t){Object.keys(e).forEach((function(i){var r=e[i];e[i]=function(e,t){var i=t.lookupProperty;return a.wrapHelper(e,(function(e){return n.extend({lookupProperty:i},e)}))}(r,t)}))}(l,r),r.helpers=l,e.usePartial&&(r.partials=r.mergeIfNeeded(o.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=n.extend({},t.decorators,o.decorators)),r.hooks={},r.protoAccessControl=d.createProtoAccessControl(o);var s=o.allowCallsToHelperMissing||i;u.moveHelperToHooks(r,"helperMissing",s),u.moveHelperToHooks(r,"blockHelperMissing",s)}},o._child=function(t,i,n,o){if(e.useBlockParams&&!n)throw new l.default("must pass block params");if(e.useDepths&&!o)throw new l.default("must pass parent depths");return c(r,t,e[t],i,0,n,o)},o},t.wrapProgram=c,t.resolvePartial=function(e,t,i){e?e.call||i.name||(i.name=e,e=i.partials[e]):e="@partial-block"===i.name?i.data["partial-block"]:i.partials[i.name];return e},t.invokePartial=function(e,t,i){var r=i.data&&i.data["partial-block"];i.partial=!0,i.ids&&(i.data.contextPath=i.ids[0]||i.data.contextPath);var o=void 0;i.fn&&i.fn!==v&&function(){i.data=s.createFrame(i.data);var e=i.fn;o=i.data["partial-block"]=function(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return i.data=s.createFrame(i.data),i.data["partial-block"]=r,e(t,i)},e.partials&&(i.partials=n.extend({},i.partials,e.partials))}();void 0===e&&o&&(e=o);if(void 0===e)throw new l.default("The partial "+i.name+" could not be found");if(e instanceof Function)return e(t,i)},t.noop=v;var r,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(2849)),o=i(3769),l=(r=o)&&r.__esModule?r:{default:r},s=i(2871),u=i(2277),a=i(2614),d=i(3865);function c(e,t,i,r,n,o,l){function s(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=l;return!l||t==l[0]||t===e.nullContext&&null===l[0]||(s=[t].concat(l)),i(e,t,e.helpers,e.partials,n.data||r,o&&[n.blockParams].concat(o),s)}return(s=h(i,s,e,l,r,o)).program=t,s.depth=l?l.length:0,s.blockParams=n||0,s}function v(){return""}function h(e,t,i,r,o,l){if(e.decorator){var s={};t=e.decorator(t,s,i,r&&r[0],o,l,r),n.extend(t,s)}return t}},9613:(e,t)=>{"use strict";function i(e){this.string=e}t.__esModule=!0,i.prototype.toString=i.prototype.toHTML=function(){return""+this.string},t.default=i,e.exports=t.default},2849:(e,t)=>{"use strict";t.__esModule=!0,t.extend=l,t.indexOf=function(e,t){for(var i=0,r=e.length;i<r;i++)if(e[i]===t)return i;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!n.test(e))return e;return e.replace(r,o)},t.isEmpty=function(e){return!e&&0!==e||!(!a(e)||0!==e.length)},t.createFrame=function(e){var t=l({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var i={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,n=/[&<>"'`=]/;function o(e){return i[e]}function l(e){for(var t=1;t<arguments.length;t++)for(var i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&(e[i]=arguments[t][i]);return e}var s=Object.prototype.toString;t.toString=s;var u=function(e){return"function"==typeof e};u(/x/)&&(t.isFunction=u=function(e){return"function"==typeof e&&"[object Function]"===s.call(e)}),t.isFunction=u;var a=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===s.call(e)};t.isArray=a},3633:(e,t,i)=>{e.exports=i(261).default},8658:(e,t,i)=>{"use strict";var r,n,o,l,s,u;i.d(t,{$J:()=>o,DH:()=>n,Ev:()=>l,OH:()=>u,iF:()=>s,t3:()=>r}),function(e){e[e.OK=200]="OK",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.FORBIDDEN=403]="FORBIDDEN"}(r||(r={})),function(e){e[e.SUCCESS=2]="SUCCESS",e[e.CLIENT_ERROR=4]="CLIENT_ERROR",e[e.SERVER_ERROR=5]="SERVER_ERROR"}(n||(n={})),function(e){e.INDIGO="#331c7a",e.ULTRAMARINE="#1f69ff",e.AQUAMARINE="#4ceaaa",e.ELECTRIC_LIME="#c5f700",e.CRAYOLA="#f7a800",e.ORANGE="#f66d18",e.RED="#e72024",e.LAVENDER="#c0abff",e.ULTRA_RED="#f97585",e.SOFT_GOLD="#f4bd5d",e.MAGIC_MINT="#baf7db",e.SKY_BLUE="#7eceeb",e.CARIBBEAN_GREN="#0dcc91",e.LAVENDER_GRAY="#d3d3e0"}(o||(o={})),function(e){e[e.IP2LOCATION=1]="IP2LOCATION",e[e.NEUSTAR=2]="NEUSTAR",e[e.MAXMIND=3]="MAXMIND",e[e.NETACUITY=4]="NETACUITY"}(l||(l={})),function(e){e[e.GPS=1]="GPS",e[e.IP=2]="IP",e[e.USER=3]="USER"}(s||(s={})),function(e){e.PROD="PROD",e.STAGING="STAGING",e.LOCAL="LOCAL",e.MOCK="MOCK"}(u||(u={}))},110:(e,t,i)=>{"use strict";i.d(t,{e:()=>r});class r extends Error{constructor(e){super(`No bid response. Got "${e}"`),this.name="NoBidResponseError"}}},4041:(e,t,i)=>{"use strict";function r(e,t){const i=[];for(let r=0;r<t;r++){const t=e.next();if(!0===t.done)break;i.push(t.value)}return i}async function n(e,t){const i=[];for(let r=0;r<t;r++){const t=await e.next();if(!0===t.done)break;i.push(t.value)}return i}i.d(t,{D:()=>r,J:()=>n})},545:(e,t,i)=>{"use strict";i.d(t,{D:()=>r.D,J:()=>r.J});var r=i(4041)},4051:(e,t,i)=>{"use strict";i.d(t,{$P:()=>d,Ae:()=>l,Hr:()=>h,S1:()=>m,Sf:()=>s,Uo:()=>g,YO:()=>_,Yc:()=>c,eq:()=>f,fj:()=>v,hl:()=>u,ib:()=>o,or:()=>p,yR:()=>n});const r=5;function n(e,t){var i;if(null==e||"string"!=typeof e)return"";const n=void 0!==t.hash.hyphenate?new RegExp(t.hash.hyphenate,"ig"):/[\s_\-,]/gi,o=void 0!==t.hash.drop?new RegExp(t.hash.drop,"ig"):/[^A-Za-z0-9-]/gi,l=null!==(i=t.hash.length)&&void 0!==i?i:r;return e.replace(n,"-").replace(o,"").toLowerCase().split("-").slice(0,l).join("-")}function o(e){return null==e||"string"!=typeof e?"":e.toLowerCase()}function l(e){if(0===e||null==e)return"";const t=window.location.pathname.split("/");return t.length<=e?"":t[e]}function s(){let e=window;const t=[...arguments];for(;t.length>0&&void 0!==e;){const i=t.shift();if(void 0===i||"string"!=typeof i)break;e=e[i]}return e}function u(e,t,i){return e.replace(new RegExp(t),((...e)=>{const t=e.slice(1,-2);let r=i;return r=r.replace(/\\(\d+)/g,((e,i)=>{var r;return null!==(r=t[i-1])&&void 0!==r?r:""})),r=r.replace(/\\U(\d+)/g,((e,i)=>{var r;return(null!==(r=t[i-1])&&void 0!==r?r:"").toUpperCase()})),r=a(r,"U",t,(e=>e.toUpperCase())),r=a(r,"L",t,(e=>e.toLowerCase())),r=a(r,"I",t,(e=>e[0])),r}))}function a(e,t,i,r){return e.replace(new RegExp(`\\\\${t}(\\d+)`,"g"),((e,t)=>{var n;return r(null!==(n=i[t-1])&&void 0!==n?n:"")}))}function d(e){var t;if(void 0===(null==e?void 0:e.length)||0===e.length)return"";const i=window.location.search;if(0===i.length)return"";return null!==(t=new URLSearchParams(i).get(e))&&void 0!==t?t:""}function c(){for(let e=0;e<arguments.length-1;e++){const t=arguments[e];if(null!=t&&""!==t&&!1!==t)return t}return""}function v(){var e;const t=[...arguments].slice(0,arguments.length-1),i=null!==(e=arguments[arguments.length-1].hash.separator)&&void 0!==e?e:"/";return t.filter((e=>null!=e&&""!==e)).join(i)}function h(e){if(void 0===(null==e?void 0:e.length)||0===e.length)return"";return encodeURIComponent(e).replaceAll("'","%27")}function f(e,t){return e===t}function p(e,t){return Boolean(e)||Boolean(t)}function g(e,t){return Boolean(e)&&Boolean(t)}function m(e,t){return void 0!==(null==t?void 0:t.length)&&0!==t.length&&t.includes(e)}function _(){return Array.from(arguments).slice(0,-1)}},9730:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BuildBanner:()=>n.Vq,BuildBannerFromBid:()=>n.kH,BuildClickThroughUrl:()=>n.He,BuildNativeResponse:()=>n.l7,BuildProductInfoFromElement:()=>n.Od,CollectN:()=>l.D,CollectNAsync:()=>l.J,DeserializeVast:()=>n.Kr,DeserializeVideo:()=>n.rS,RequestBuilder:()=>r.t,SimpleBannerRequest:()=>r.Y,and:()=>o.Uo,array:()=>o.YO,coalesce:()=>o.Yc,eq:()=>o.eq,global:()=>o.Sf,isIn:()=>o.S1,join:()=>o.fj,lower:()=>o.ib,or:()=>o.or,path:()=>o.Ae,search:()=>o.$P,sed:()=>o.hl,slug:()=>o.yR,uri:()=>o.Hr});var r=i(3569),n=i(5509),o=i(4051),l=i(545)},3641:(e,t,i)=>{"use strict";var r;i.d(t,{t:()=>n}),function(e){e[e.BANNER=0]="BANNER",e[e.VIDEO=1]="VIDEO",e[e.NATIVE=2]="NATIVE"}(r||(r={}));class n{constructor(e){this._builderState=void 0,this._request={id:null!=e?e:this._generateId(),imp:[]}}build(){this._appendBuilderState();for(const e of this._request.imp)e.ext=this._request.ext;return this._request.app={name:window.location.hostname,domain:window.location.hostname,id:window.location.hostname},this._request.site={name:window.location.hostname,domain:window.location.hostname,id:window.location.hostname},this._request}withSurfContext(e,t,i,r,n,o){return this._request.ext={accountId:e,siteId:t,channelId:n,zoneId:r,locationId:i,storeId:i,keywords:o},this}withBanner(e,t,i){return this._appendBuilderState(),this._builderState={type:r.BANNER,imp:{id:this._generateId()},currentCreative:{w:e,h:t,...i}},this}withVideo(e,t,i,n,o=["video/mp4","video/webm"],l){return this._appendBuilderState(),this._builderState={type:r.VIDEO,imp:{id:this._generateId()},currentCreative:{w:e,h:t,minduration:i,maxduration:n,mimes:o,...l}},this}withNative(e,t){return this._appendBuilderState(),this._builderState={type:r.NATIVE,imp:{id:this._generateId()},currentCreative:{request:e,ver:"1.2",...t}},this}withBidFloor(e,t="USD"){if(void 0===this._builderState)throw new Error("Invalid state");return this._builderState.imp.bidfloor=e,this._builderState.imp.bidfloorcur=t,this}withImpExt(e){if(void 0===this._builderState)throw new Error("Invalid state");return this._builderState.imp.ext=e,this}withSite(e){return this._request.site=null!=e?e:{name:window.location.hostname,domain:window.location.hostname},this}withApp(e){return this._request.app=null!=e?e:{name:window.location.hostname,domain:window.location.hostname},this}withDevice(e){return this._request.device=e,this}withUser(e){return this._request.user=e,this}withRegulations(e){return this._request.regs=e,this}_appendBuilderState(){if(void 0!==this._builderState){switch(this._builderState.type){case r.BANNER:this._builderState.imp.banner=this._builderState.currentCreative;break;case r.NATIVE:this._builderState.imp.native=this._builderState.currentCreative;break;case r.VIDEO:this._builderState.imp.video=this._builderState.currentCreative}this._appendImpression()}}_appendImpression(){var e;void 0!==this._builderState&&(this._request.imp=null!==(e=this._request.imp)&&void 0!==e?e:[],this._request.imp.push(this._builderState.imp))}_generateId(){return crypto.randomUUID()}}},1892:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r});class r{constructor(e,t,i){const r=crypto.randomUUID();this.id=e,this.imp=[{id:r,banner:{w:t,h:i}}]}}},3569:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r.Y,t:()=>n.t});var r=i(1892),n=i(3641)},8624:(e,t,i)=>{"use strict";i.d(t,{Od:()=>l,Vq:()=>n,kH:()=>o});var r=i(1191);function n(e,t){var i,n,s;if(null===e)return{element:null,product:null,clickThrough:null};const u=null===(s=null===(n=null===(i=null==e?void 0:e.seatbid)||void 0===i?void 0:i[0])||void 0===n?void 0:n.bid)||void 0===s?void 0:s[0];if(void 0===u)return{element:null,product:null,clickThrough:null};const a=o(u);if(null===a)return{element:null,product:null,clickThrough:null};if(void 0===t)return{element:a,product:null,clickThrough:null};const d=l(a);let c=null;if(null!==d&&(c=(0,r.H)(t,d,{image:null,price:null,salePrice:null,thc:null,strain:null,cbd:null,name:null,brand_name:null,brandName:null,productType:null,details:null,cta:null,clickthroughUrl:null,winUrl:null,pixelUrl:null}),null!==c)){const e=a.querySelectorAll("a[href*=\\{SURF_COMMERCE_URL\\}]"),t=c;e.forEach((e=>{const i=e.getAttribute("href");if(null===i)return;const r=i.replace("{SURF_COMMERCE_URL}",t);e.setAttribute("href",r)}))}return{element:a,product:l(a),clickThrough:c}}function o(e){if(void 0===e.adm)return null;const t=document.createElement("div");if(t.innerHTML=e.adm,void 0!==e.nurl){const i=new Image(1,1);i.src=e.nurl,i.style.display="none",t.appendChild(i)}return t}function l(e){var t,i,r,n,o,l,s,u,a,d,c,v,h,f,p;const g=e.querySelector("#surf-product-info");if(null===g)return null;const m=g.dataset;return{image:null!==(t=m.image)&&void 0!==t?t:null,price:null!==(i=m.price)&&void 0!==i?i:null,salePrice:null!==(r=m.saleprice)&&void 0!==r?r:null,thc:null!==(n=m.thc)&&void 0!==n?n:null,strain:null!==(o=m.strain)&&void 0!==o?o:null,cbd:null!==(l=m.cbd)&&void 0!==l?l:null,name:null!==(s=m.name)&&void 0!==s?s:null,brand_name:null!==(u=m.brandname)&&void 0!==u?u:null,brandName:null!==(a=m.brandname)&&void 0!==a?a:null,productType:null!==(d=m.producttype)&&void 0!==d?d:null,details:null!==(c=m.details)&&void 0!==c?c:null,cta:null!==(v=m.cta)&&void 0!==v?v:null,clickthroughUrl:null!==(h=m.clickthroughurl)&&void 0!==h?h:null,winUrl:null!==(f=m.winurl)&&void 0!==f?f:null,pixelUrl:null!==(p=m.pixelurl)&&void 0!==p?p:null,ext:m}}},6577:(e,t,i)=>{"use strict";i.d(t,{l:()=>l});var r=i(6131),n=i(1191),o=i(4842);async function l(e,t,i){var l,s,u,a,d,c,v,h,f,p;const g=null===(s=null===(l=null==e?void 0:e.seatbid)||void 0===l?void 0:l[0])||void 0===s?void 0:s.bid;if(void 0===g||0===g.length)return null==i||i.error("BuildNativeResponse No bids"),[];const m=[];for(const e of g){const l=e.adm;if(void 0===l||0===l.length){null==i||i.warn("BuildNativeResponse no adm in bid");continue}let s;try{s=JSON.parse(decodeURIComponent(null!=l?l:"").replaceAll(/\\"/gi,'"'))}catch(e){try{s=JSON.parse(l)}catch(e){null==i||i.warn("BuildNativeResponse failed to deserialized adm data");continue}}const g=e.nurl;if(void 0===g){null==i||i.warn("BuildNativeResponse failed to load winUrl");continue}const _=[],S=[];for(const e of null!==(u=s.native.eventtrackers)&&void 0!==u?u:[])e.event===r.wf.IMP&&void 0!==e.url&&(e.method===r.i_.IMG?_.push(e.url):e.method===r.i_.JS&&S.push(e.url));let w,E=s.native.link.url,b=null;if(void 0!==t){const e=(0,r.LO)(s),l=null===(c=null===(d=null===(a=s.native.assets)||void 0===a?void 0:a.find((e=>e.id===r.vU.SURF_META_PRODUCT)))||void 0===d?void 0:d.data)||void 0===c?void 0:c.value;let u;if(void 0===l)u={image:null,price:null,salePrice:null,thc:null,strain:null,cbd:null,name:null,brand_name:null,brandName:null,productType:null,details:null,cta:null,clickthroughUrl:null,winUrl:null,pixelUrl:null};else{if(b=await t.productService.getNativeProduct(t.accountId,t.siteId,t.locationId,l),null===b){console.warn("catalog response is null");continue}u=b}E.includes("{SURF_COMMERCE_URL}")&&(E=E.replace("{SURF_COMMERCE_URL}",(0,n.H)(t.config,e,u,b)));const m=(0,o.N7)(t.config.templates.productCardTemplate,e,t.config,E,u);if(w=document.createElement("div"),w.attachShadow({mode:"open"}),null===w.shadowRoot){null==i||i.warn("BuildNativeResponse failed to load shadow room of built element");continue}const _=document.createElement("style");_.innerHTML=t.config.templates.productCardStylesheet,w.shadowRoot.appendChild(_),w.shadowRoot.appendChild(m);const S=null!==(h=null===(v=s.native.eventtrackers)||void 0===v?void 0:v.filter((e=>e.method===r.i_.IMG&&e.event===r.wf.IMP&&void 0!==e.url)).map((e=>`${e.url}`)))&&void 0!==h?h:[];S.push(g);const I=null!==(p=null===(f=s.native.eventtrackers)||void 0===f?void 0:f.filter((e=>e.method===r.i_.JS&&e.event===r.wf.IMP&&void 0!==e.url)).map((e=>`<script type="text/javascript" src="${e.url}"><\/script>`)))&&void 0!==p?p:[];for(const e of S){const t=document.createElement("img");t.width=1,t.height=1,t.src=e,w.shadowRoot.appendChild(t)}for(const e of I)w.shadowRoot.innerHTML+=e}m.push({data:s,clickThrough:E,winUrl:g,trackers:{pixels:_,js:S},element:w})}return m}},1191:(e,t,i)=>{"use strict";i.d(t,{H:()=>n});var r=i(9730);function n(e,t,i,n){return e.templates.clickThroughUrlTemplate({product:t,catalog:i,window:{origin:window.location.origin,port:window.location.port,path:window.location.pathname,host:window.location.host,host_name:window.location.hostname,search:window.location.search,hash:window.location.hash,protocol:window.location.protocol},publisher:e,ext:n},{helpers:r})}},5306:(e,t,i)=>{"use strict";function r(e,t,i){null==e||e.debug("getOrThrow name",i);const r=t.querySelector(i);if(null===r)throw new Error(`No ${i} tag found`);return null==e||e.debug("getOrThrow child "+i,r),r}function n(e,t,i){null==e||e.debug("getAttributeOrThrow name",i);const r=t.getAttribute(i);if(null===r)throw new Error(`No ${i} attribute found`);return null==e||e.debug("getAttributeOrThrow attribute "+i,r),r}function o(e,t,i){const r=n(e,t,i),o=Number(r);if(isNaN(o))throw new Error(`${i} is not a number`);return o}function l(e,t){var i,r;const n=null===(r=null===(i=e.seatbid)||void 0===i?void 0:i[0].bid)||void 0===r?void 0:r[0].adm;return void 0===n?null:s(t,n)}function s(e,t){null==e||e.debug("DeserializeVast adm",t);const i=(new DOMParser).parseFromString(t,"text/xml");null==e||e.debug("DeserializeVast doc",i);const r=i.querySelector("VAST");if(null===r)throw new Error("No VAST tag found");null==e||e.debug("DeserializeVast root",r);const o=n(e,r,"version"),l=Array.from(r.querySelectorAll("Ad")).map(u.bind(null,e));return null==e||e.debug("DeserializeVast ads",l),{version:o,ads:l}}function u(e,t){null==e||e.debug("deserializeAd element",t);const i=t.getAttribute("id"),o=function(e,t){var i,o,l,s,u,d,c,v,h,f,p,g,m,_,S,w,E,b,I,R,T,O,C,y;null==e||e.debug("deserializeInline element",t);const N=null===(i=t.querySelector("AdSystem"))||void 0===i?void 0:i.textContent;if(null==N)throw new Error("No AdSystem tag found in InLine");null==e||e.debug("deserializeInline adSystem",N);const D=null===(o=t.querySelector("AdTitle"))||void 0===o?void 0:o.textContent;if(null==D)throw new Error("No AdTitle tag found in InLine");null==e||e.debug("deserializeInline adTitle",D);const A=r(e,t,"Impression"),P=function(e,t){null==e||e.debug("deserializeImpression element",t);const i=n(e,t,"id"),r=t.textContent;if(null===r)throw new Error("No value found on Impression");return null==e||e.debug("deserializeImpression value",r),{id:i,value:r}}(e,A),U=Array.from(t.querySelectorAll("Linear")).map(a.bind(null,e)),x=Array.from(t.querySelectorAll("Extensions Extension"));let M;if(x.length>0){const e=x[0],t=null!==(s=null===(l=e.querySelector("Image"))||void 0===l?void 0:l.textContent)&&void 0!==s?s:null,i=null!==(d=null===(u=e.querySelector("Price"))||void 0===u?void 0:u.textContent)&&void 0!==d?d:null,r=null!==(v=null===(c=e.querySelector("SalePrice"))||void 0===c?void 0:c.textContent)&&void 0!==v?v:null,n=null!==(f=null===(h=e.querySelector("THC"))||void 0===h?void 0:h.textContent)&&void 0!==f?f:null,o=null!==(g=null===(p=e.querySelector("Strain"))||void 0===p?void 0:p.textContent)&&void 0!==g?g:null,a=null!==(_=null===(m=e.querySelector("CBD"))||void 0===m?void 0:m.textContent)&&void 0!==_?_:null,N=null!==(w=null===(S=e.querySelector("Name"))||void 0===S?void 0:S.textContent)&&void 0!==w?w:null,D=null!==(b=null===(E=e.querySelector("BrandName"))||void 0===E?void 0:E.textContent)&&void 0!==b?b:null;M={image:t,price:i,salePrice:r,thc:n,strain:o,cbd:a,name:N,brandName:D,brand_name:D,productType:null!==(R=null===(I=e.querySelector("ProductType"))||void 0===I?void 0:I.textContent)&&void 0!==R?R:null,details:null!==(O=null===(T=e.querySelector("Details"))||void 0===T?void 0:T.textContent)&&void 0!==O?O:null,cta:null!==(y=null===(C=e.querySelector("CTA"))||void 0===C?void 0:C.textContent)&&void 0!==y?y:null,clickthroughUrl:null,winUrl:null,pixelUrl:null}}return{impression:P,adSystem:N,adTitle:D,creatives:U,product:M}}(e,r(e,t,"InLine"));return{id:i,inline:o}}function a(e,t){var i;null==e||e.debug("deserializeLinear element",t);const r=null===(i=t.querySelector("Duration"))||void 0===i?void 0:i.textContent;if(null==r)throw new Error("No Duration tag found in Linear");null==e||e.debug("deserializeLinear duration",r);const n=Array.from(t.querySelectorAll("TrackingEvents Tracking")).map(d.bind(null,e));null==e||e.debug("deserializeLinear trackingEvents",n);const o=Array.from(t.querySelectorAll("MediaFiles MediaFile")).map(c.bind(null,e));null==e||e.debug("deserializeLinear mediaFiles",o);const l=Array.from(t.querySelectorAll("VideoClicks ClickThrough")).map(v.bind(null,e));return null==e||e.debug("deserializeLinear videoClicks",l),{duration:r,trackingEvents:n,mediaFiles:o,videoClicks:l}}function d(e,t){null==e||e.debug("deserializeTrackingEvent element",t);const i=n(e,t,"event"),r=t.textContent;if(null===r)throw new Error("No url found on Tracking");return null==e||e.debug("deserializeTrackingEvent url",r),{event:i,url:r}}function c(e,t){null==e||e.debug("deserializeMediaFile element",t);const i=t.getAttribute("id");null==e||e.debug("deserializeMediaFile id",i);const r=n(e,t,"delivery"),l=n(e,t,"type"),s=o(e,t,"width"),u=o(e,t,"height"),a=function(e,t,i){null==e||e.debug("getAttribute name",i);const r=t.getAttribute(i);return null==e||e.debug("getAttribute attribute "+i,r),r}(e,t,"bitrate"),d=t.textContent;if(null===d)throw new Error("No url found on MediaFile");return null==e||e.debug("deserializeMediaFile url",d),{id:i,delivery:r,type:l,width:s,height:u,bitrate:a,url:d}}function v(e,t){null==e||e.debug("deserializeVideoClick element",t);const i=t.getAttribute("id");null==e||e.debug("deserializeVideoClick id",i);const r=t.textContent;if(null===r)throw new Error("No url found on Clickthrough");return null==e||e.debug("deserializeVideoClick url",r),{id:i,url:r}}i.d(t,{K:()=>s,r:()=>l})},5509:(e,t,i)=>{"use strict";i.d(t,{He:()=>o.H,Kr:()=>l.K,Od:()=>r.Od,Vq:()=>r.Vq,kH:()=>r.kH,l7:()=>n.l,rS:()=>l.r});var r=i(8624),n=i(6577),o=i(1191),l=i(5306)},8971:(e,t,i)=>{"use strict";async function r(e,t,i){null==e||e.info("DeviceMiddleware.intercept",i);const r=await(null==t?void 0:t.getDeviceInfo());return i.device={...i.device,...r},i}i.d(t,{t:()=>r})},7308:(e,t,i)=>{"use strict";i.d(t,{F:()=>n});var r=i(8658);async function n(e,t,i,n,o){const l=await e.getGeo();return null!==l?(null==t||t.debug("GeoMiddleware.intercept found geocontext",l),void 0===i.device&&(i.device={}),n&&(i.device.geo={lat:l.coords.latitude,lon:l.coords.longitude,city:l.city,region:l.region,country:l.country,zip:l.zip,type:r.iF.IP,accuracy:l.coords.accuracy,utcoffset:l.utcoffset,ipservice:r.Ev.MAXMIND}),o&&(i.device.ip=l.ip)):null==t||t.warn("GeoMiddleware.intercept did not find geocontext"),null==t||t.debug("GeoMiddleware.intercept returning",i),i}},4723:(e,t,i)=>{"use strict";i.d(t,{N:()=>o,T:()=>n});var r=i(6131);async function n(e,t,i){null==t||t.info("IdentityMiddleware.intercept",i);const n=await e.getUserId();if(null==t||t.debug("IdentityMiddleware.intercept userId",n),null!==n){const e={source:"surf-domain-id",uids:[{id:n,atype:r.ZV.SESSION}]};void 0!==i.user?i.user.eids=[e]:i.user={eids:[e]}}return null==t||t.debug("IdentityMiddleware.intercept returning",i),i}const o=(e,t)=>async i=>await n(e,t,i)},3957:(e,t,i)=>{"use strict";i.d(t,{Fp:()=>r.F,NW:()=>o.N,Tw:()=>o.T,tX:()=>n.t});var r=i(7308),n=i(8971),o=i(4723)},6131:(e,t,i)=>{"use strict";i.d(t,{Bz:()=>r.Bz,Im:()=>r.Im,JQ:()=>r.JQ,JY:()=>r.JY,LO:()=>r.LO,Lp:()=>r.Lp,Ph:()=>r.Ph,V5:()=>r.V5,ZV:()=>r.ZV,bU:()=>r.bU,i_:()=>r.i_,qU:()=>r.qU,vU:()=>r.vU,wf:()=>r.wf});var r=i(2160)},4231:(e,t,i)=>{"use strict";var r,n;i.d(t,{V:()=>n,Z:()=>r}),function(e){e[e.SESSION=1]="SESSION",e[e.DEVICE=2]="DEVICE",e[e.USER=3]="USER"}(r||(r={})),function(e){e[e.MOBILE=1]="MOBILE",e[e.PC=2]="PC",e[e.CTV=3]="CTV",e[e.PHONE=4]="PHONE",e[e.TABLET=5]="TABLET",e[e.CONNECTED=6]="CONNECTED",e[e.SET_TOP=7]="SET_TOP",e[e.OOH=8]="OOH"}(n||(n={}))},2160:(e,t,i)=>{"use strict";i.d(t,{Bz:()=>n.Bz,Im:()=>n.Im,JQ:()=>n.JQ,JY:()=>n.JY,LO:()=>n.LO,Lp:()=>n.Lp,Ph:()=>n.Ph,V5:()=>r.V,ZV:()=>r.Z,bU:()=>n.bU,i_:()=>n.i_,qU:()=>n.qU,vU:()=>n.vU,wf:()=>n.wf});var r=i(4231),n=i(8906)},7973:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var r=i(6131);function n(e,t){var i,r,n;return null!==(n=null===(r=null===(i=null==e?void 0:e.find((e=>e.id===t)))||void 0===i?void 0:i.data)||void 0===r?void 0:r.value)&&void 0!==n?n:null}function o(e){var t,i,o,l,s,u,a,d,c,v,h,f,p,g,m,_;const S=n(e.native.assets,r.vU.SPONSORED);return{image:null!==(l=null===(o=null===(i=null===(t=e.native.assets)||void 0===t?void 0:t.find((e=>{var t;return(null===(t=e.img)||void 0===t?void 0:t.type)===r.qU.MAIN})))||void 0===i?void 0:i.img)||void 0===o?void 0:o.url)&&void 0!==l?l:null,name:null!==(d=null===(a=null===(u=null===(s=e.native.assets)||void 0===s?void 0:s.find((e=>void 0!==e.title)))||void 0===u?void 0:u.title)||void 0===a?void 0:a.text)&&void 0!==d?d:null,price:n(e.native.assets,r.vU.PRICE),salePrice:n(e.native.assets,r.vU.SALEPRICE),thc:n(e.native.assets,r.vU.SURF_THC),cbd:n(e.native.assets,r.vU.SURF_CBD),strain:n(e.native.assets,r.vU.SURF_STRAIN),brand_name:S,brandName:S,productType:n(e.native.assets,r.vU.SURF_CATEGORY),details:n(e.native.assets,r.vU.DESC),cta:n(e.native.assets,r.vU.CTATEXT),clickthroughUrl:null!==(v=null===(c=e.native.link)||void 0===c?void 0:c.url)&&void 0!==v?v:null,winUrl:null!==(p=null===(f=null===(h=e.native.eventtrackers)||void 0===h?void 0:h.find((e=>e.event===r.wf.SURF_WIN)))||void 0===f?void 0:f.url)&&void 0!==p?p:null,pixelUrl:null!==(_=null===(m=null===(g=e.native.eventtrackers)||void 0===g?void 0:g.find((e=>e.event===r.wf.IMP)))||void 0===m?void 0:m.url)&&void 0!==_?_:null}}},9946:(e,t,i)=>{"use strict";var r,n,o,l,s,u,a,d,c,v;i.d(t,{Bz:()=>o,JQ:()=>r,JY:()=>c,Lp:()=>u,Ph:()=>d,bU:()=>a,i_:()=>v,qU:()=>n,vU:()=>l,wf:()=>s}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ABOVE_THE_FOLD=1]="ABOVE_THE_FOLD",e[e.BELOW_THE_FOLD=3]="BELOW_THE_FOLD",e[e.HEADER=4]="HEADER",e[e.FOOTER=5]="FOOTER",e[e.SIDEBAR=6]="SIDEBAR",e[e.FULL_SCREN=7]="FULL_SCREN"}(r||(r={})),function(e){e[e.ICON=1]="ICON",e[e.MAIN=3]="MAIN"}(n||(n={})),function(e){e[e.SPONSORED=1]="SPONSORED",e[e.DESC=2]="DESC",e[e.RATING=3]="RATING",e[e.LIKES=4]="LIKES",e[e.DOWNLOADS=5]="DOWNLOADS",e[e.PRICE=6]="PRICE",e[e.SALEPRICE=7]="SALEPRICE",e[e.PHONE=8]="PHONE",e[e.ADDRESS=9]="ADDRESS",e[e.DESC2=10]="DESC2",e[e.DISPLAYURL=11]="DISPLAYURL",e[e.CTATEXT=12]="CTATEXT",e[e.SURF_STRAIN=500]="SURF_STRAIN",e[e.SURF_THC=501]="SURF_THC",e[e.SURF_CBD=502]="SURF_CBD",e[e.SURF_CATEGORY=503]="SURF_CATEGORY",e[e.SURF_META_PRODUCT=599]="SURF_META_PRODUCT"}(o||(o={})),function(e){e[e.TITLE=0]="TITLE",e[e.IMAGE=1]="IMAGE",e[e.SPONSORED=2]="SPONSORED",e[e.DESC=3]="DESC",e[e.RATING=4]="RATING",e[e.PRICE=5]="PRICE",e[e.SALEPRICE=6]="SALEPRICE",e[e.DISPLAYURL=7]="DISPLAYURL",e[e.CTATEXT=8]="CTATEXT",e[e.SURF_STRAIN=500]="SURF_STRAIN",e[e.SURF_THC=501]="SURF_THC",e[e.SURF_CBD=502]="SURF_CBD",e[e.SURF_CATEGORY=503]="SURF_CATEGORY",e[e.SURF_META_PRODUCT=599]="SURF_META_PRODUCT"}(l||(l={})),function(e){e[e.IMP=1]="IMP",e[e.VIEWABLE_MRC50=2]="VIEWABLE_MRC50",e[e.VIEWABLE_MRC100=3]="VIEWABLE_MRC100",e[e.VIEWABLE_VIDEO50=4]="VIEWABLE_VIDEO50",e[e.SURF_WIN=500]="SURF_WIN",e[e.SURF_CLICK=501]="SURF_CLICK"}(s||(s={})),function(e){e[e.CONTENT=1]="CONTENT",e[e.SOCIAL=2]="SOCIAL",e[e.PRODUCT=3]="PRODUCT"}(u||(u={})),function(e){e[e.GENERAL=10]="GENERAL",e[e.ARTICLE=11]="ARTICLE",e[e.VIDEO=12]="VIDEO",e[e.AUDIO=13]="AUDIO",e[e.IMAGE=14]="IMAGE",e[e.USER_GENERATED=15]="USER_GENERATED",e[e.GENERAL_SOCIAL=20]="GENERAL_SOCIAL",e[e.EMAIL=21]="EMAIL",e[e.CHAT=22]="CHAT",e[e.PRODUCT=30]="PRODUCT",e[e.APPLICATION=31]="APPLICATION",e[e.PRODUCT_REVIEWS=32]="PRODUCT_REVIEWS"}(a||(a={})),function(e){e[e.IN_FEED=1]="IN_FEED",e[e.ATOMIC=2]="ATOMIC",e[e.OUTSIDE_CORE=3]="OUTSIDE_CORE",e[e.RECOMMENDATION=4]="RECOMMENDATION"}(d||(d={})),function(e){e.MP4="video/mp4",e.WEBM="video/webm"}(c||(c={})),function(e){e[e.IMG=1]="IMG",e[e.JS=2]="JS"}(v||(v={}))},3839:(e,t,i)=>{"use strict";i.d(t,{I:()=>n});var r=i(6131);class n{constructor(){this._request={ver:"1.2",context:r.Lp.PRODUCT,contextsubtype:r.bU.PRODUCT,plcmttype:r.Ph.RECOMMENDATION,assets:[],eventtrackers:[{event:r.wf.IMP,methods:[r.i_.IMG]},{event:r.wf.SURF_CLICK,methods:[r.i_.IMG]},{event:r.wf.IMP,methods:[r.i_.JS]}]}}withVer(e){return this._request.ver=e,this}withContext(e){return this._request.context=e,this}withTitle(e=80,t=!0){return void 0===this._request.assets&&(this._request.assets=[]),this._request.assets.push({id:0,required:t?1:0,title:{len:e}}),this}withImage(e,t,i,r,n=!0){return void 0===this._request.assets&&(this._request.assets=[]),this._request.assets.push({id:0,required:n?1:0,img:{w:e,wmin:i,h:t,hmin:r}}),this}withVideo(e,t,i,r=!0){return void 0===this._request.assets&&(this._request.assets=[]),this._request.assets.push({id:0,required:r?1:0,video:{mimes:e,minduration:t,maxduration:i,protocols:[3]}}),this}withData(e,t,i=80,r=!0){return void 0===this._request.assets&&(this._request.assets=[]),this._request.assets.push({id:t,required:r?1:0,data:{type:e,len:i}}),this}withSponsored(e=80,t=!0){return this.withData(r.Bz.SPONSORED,r.vU.SPONSORED,e,t)}withDescription(e=80,t=!0){return this.withData(r.Bz.DESC,r.vU.DESC,e,t)}withRating(e=80,t=!0){return this.withData(r.Bz.RATING,r.vU.RATING,e,t)}withPrice(e=80,t=!0){return this.withData(r.Bz.PRICE,r.vU.PRICE,e,t)}withSalePrice(e=80,t=!0){return this.withData(r.Bz.SALEPRICE,r.vU.SALEPRICE,e,t)}withDisplayUrl(e=80,t=!0){return this.withData(r.Bz.DISPLAYURL,r.vU.DISPLAYURL,e,t)}withCtaText(e=80,t=!0){return this.withData(r.Bz.CTATEXT,r.vU.CTATEXT,e,t)}withCategory(e=80,t=!0){return this.withData(r.Bz.SURF_CATEGORY,r.vU.SURF_CATEGORY,e,t)}withTHC(e=80,t=!0){return this.withData(r.Bz.SURF_THC,r.vU.SURF_THC,e,t)}withCBD(e=80,t=!0){return this.withData(r.Bz.SURF_CBD,r.vU.SURF_CBD,e,t)}withStrain(e=80,t=!0){return this.withData(r.Bz.SURF_STRAIN,r.vU.SURF_STRAIN,e,t)}withMetaProduct(e=80,t=!0){return this.withData(r.Bz.SURF_META_PRODUCT,r.vU.SURF_META_PRODUCT,e,t)}withEventTracker(e,t){return void 0===this._request.eventtrackers&&(this._request.eventtrackers=[]),this._request.eventtrackers.push({event:e,methods:t}),this}build(){return this._request}}},8906:(e,t,i)=>{"use strict";i.d(t,{Bz:()=>o.Bz,Im:()=>n.I,JQ:()=>o.JQ,JY:()=>o.JY,LO:()=>r.L,Lp:()=>o.Lp,Ph:()=>o.Ph,bU:()=>o.bU,i_:()=>o.i_,qU:()=>o.qU,vU:()=>o.vU,wf:()=>o.wf});var r=i(7973),n=i(3839),o=i(9946)},102:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});class r{constructor(e,t){var i;this._selector=e,this.logger=t,null===(i=this.logger)||void 0===i||i.info("OverrideService.constructor"),this.overrideNode=this.getOverrideNode(),null!==this.overrideNode?this.overrideData=this.mapDataSetToData(this.overrideNode.dataset):this.overrideData=null}getOverrideNode(){return document.querySelector(this._selector)}}},4545:(e,t,i)=>{"use strict";i.d(t,{$9:()=>s.$9,$b:()=>r.$,Dj:()=>s.Dj,EJ:()=>s.EJ,I:()=>s.I,L8:()=>r.L,MM:()=>s.MM,N8:()=>s.N8,RT:()=>s.RT,Vh:()=>n.V,WX:()=>o.W,j8:()=>n.j,td:()=>s.td,wh:()=>l.w});var r=i(3642),n=i(6458),o=i(7327),l=i(220),s=i(9955)},386:(e,t,i)=>{"use strict";var r;i.d(t,{$:()=>r}),function(e){e[e.NONE=0]="NONE",e[e.ERRORS=1]="ERRORS",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG"}(r||(r={}))},8382:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var r=i(8658),n=i(4545);class o{constructor(e){this._logLevel=e,this.debug("Logging enabled")}debug(...e){this._logLevel>=n.$b.DEBUG&&this._log(console.log,e,r.$J.MAGIC_MINT)}info(...e){this._logLevel>=n.$b.INFO&&this._log(console.log,e,r.$J.LAVENDER)}warn(...e){this._logLevel>=n.$b.INFO&&this._log(console.warn,e,r.$J.SOFT_GOLD)}error(...e){this._logLevel>=n.$b.ERRORS&&this._log(console.error,e,r.$J.ULTRA_RED)}_log(e,t,i){t.unshift(`border-radius: 3px; margin-left: 10px; background: ${i}; font-size: 12px; font-weight: bold;`),t.unshift("%c [SURF] "),e.apply(console,t)}}},3642:(e,t,i)=>{"use strict";i.d(t,{$:()=>r.$,L:()=>n.L});var r=i(386),n=i(8382)},4227:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});var r=i(9266),n=i(8658);class o{constructor(e,t){var i;this._logger=t,null===(i=this._logger)||void 0===i||i.info("SurfsideProductFeedService.constructor initialized",this),this._url=(0,r.r)(e)}async getProduct(e,t,i,r){var o,l,s,u,a;try{null===(o=this._logger)||void 0===o||o.info("SurfsideProductFeedService.getProduct request",e,t,i,r);const a=await fetch(`${this._url}product/${e}/${i}/${r}.json`);if(a.status!==n.t3.OK)return null;const d=await a.json();if(void 0!==d.quantity&&0===d.quantity)return null===(l=this._logger)||void 0===l||l.warn("SurfsideProductFeedService.getProduct quantity is 0; skipping.",d),null;null===(s=this._logger)||void 0===s||s.debug("SurfsideProductFeedService.getProduct response",d);const c=this._mapResponseToProductInformation(d);return null===(u=this._logger)||void 0===u||u.debug("SurfsideProductFeedService.getProduct mapped",c),c}catch(e){return null===(a=this._logger)||void 0===a||a.warn("SurfsideProductFeedService.getProduct Failed to get product! got",e),null}}async getNativeProduct(e,t,i,r){var o,l,s,u;null===(o=this._logger)||void 0===o||o.info("SurfsideProductFeedService.getProduct request",e,t,i,r);try{const t=await fetch(`${this._url}native/${e}/${i}/${r}.json`);if(t.status!==n.t3.OK)return null;const o=await t.json();null===(l=this._logger)||void 0===l||l.debug("SurfsideProductFeedService.getProduct response",o);const u=this._mapResponseToProductInformation(o);return null===(s=this._logger)||void 0===s||s.debug("SurfsideProductFeedService.getProduct mapped",u),u}catch(e){return null===(u=this._logger)||void 0===u||u.warn("SurfsideProductFeedService.getNativeProduct Failed to get product! got",e),null}}_mapResponseToProductInformation(e){return{image:this._getFieldOrNull(e,"image_link"),price:this._getFieldOrNull(e,"price"),salePrice:this._getFieldOrNull(e,"sale_price"),thc:this._getFieldOrNull(e,"thc"),cbd:this._getFieldOrNull(e,"cbd"),strain:this._getFieldOrNull(e,"strain"),name:this._getFieldOrNull(e,"name"),brand_name:this._getFieldOrNull(e,"brand"),brandName:this._getFieldOrNull(e,"brand"),productType:this._getFieldOrNull(e,"productType"),details:this._getFieldOrNull(e,"details"),cta:this._getFieldOrNull(e,"cta"),clickthroughUrl:this._getFieldOrNull(e,"clickthroughUrl"),winUrl:this._getFieldOrNull(e,"winUrl"),pixelUrl:this._getFieldOrNull(e,"pixelUrl"),ext:e}}_getFieldOrNull(e,t){return t in e?String(e[t]):null}}},220:(e,t,i)=>{"use strict";i.d(t,{w:()=>r.w});var r=i(4227)},3e3:(e,t,i)=>{"use strict";i.d(t,{W:()=>o});var r,n=i(9266);!function(e){e.TOP_ALL="top-products",e.FOR_YOU="for-you",e.PAST_PURCHASE="buy-again"}(r||(r={}));class o{constructor(e,t,i){var r;this._productFeedService=t,this._logger=i,this._cache=new Map,null===(r=this._logger)||void 0===r||r.info("SurfsideRecommenderService.constructor initialized",this),this._url=(0,n.r)(e)}async getTopProducts(e,t,i,n){var o;return null===(o=this._logger)||void 0===o||o.info("SurfsideRecommenderService.getTopProducts request",e,t,i),await this._fetchRecommendations(e,t,i,null,r.TOP_ALL,n)}async*generateTopProduct(e,t,i){var n;null===(n=this._logger)||void 0===n||n.info("SurfsideRecommenderService.generateTopProduct request",e,t,i),yield*this._generateProductRecommendation(e,t,i,null,r.TOP_ALL)}async getForYou(e,t,i,n,o){var l;return null===(l=this._logger)||void 0===l||l.info("SurfsideRecommenderService.getForYou request",e,t,i,n),await this._fetchRecommendations(e,t,i,n,r.FOR_YOU,o)}async*generateForYou(e,t,i,n){var o;null===(o=this._logger)||void 0===o||o.info("SurfsideRecommenderService.generateForYou request",e,t,i,n),yield*this._generateProductRecommendation(e,t,i,n,r.FOR_YOU)}async getPreviousPurchases(e,t,i,n,o){var l;return null===(l=this._logger)||void 0===l||l.info("SurfsideRecommenderService.getPreviousPurchases request",e,t,i,n),await this._fetchRecommendations(e,t,i,n,r.PAST_PURCHASE,o)}async*generatePreviousPurchase(e,t,i,n){var o;null===(o=this._logger)||void 0===o||o.info("SurfsideRecommenderService.generatePreviousPurchase request",e,t,i,n),yield*this._generateProductRecommendation(e,t,i,n,r.PAST_PURCHASE)}async*_generateProductRecommendation(e,t,i,r,n){var o,l,s;null===(o=this._logger)||void 0===o||o.info("SurfsideRecommenderService._generateProductRecommendation request",e,t,i,r,n);const u=await this._fetchRecommendationList(e,t,i,r,n);null!==u?(yield*this._generateProduct(e,t,i,u),null===(s=this._logger)||void 0===s||s.debug("SurfsideRecommenderService._generateProductRecommendation No more products, exiting",e,t,i,r,n)):null===(l=this._logger)||void 0===l||l.warn("SurfsideRecommenderService._generateProductRecommendation No recommendations available",e,t,i,r,n)}async _fetchRecommendations(e,t,i,r,n,o){var l,s;null===(l=this._logger)||void 0===l||l.debug("SurfsideRecommenderService._fetchRecommendations request",e,t,i,r,n);const u=`accountId=${e}&siteId=${t}&locationId=${i}&userId=${null!=r?r:"null"}&type=${n}`,a=this._cache.get(u);if(void 0!==a){const[e,t]=a,i=[];let r=t;for(r=t;r<t+o;r++)i.push(e[r%e.length]);return r%=e.length,this._cache.set(u,[e,r]),i}const d=await(await fetch(`${this._url.toString()}r/${n}/?accountId=${e}&siteId=${t}&locationId=${i}&user=${r}&limit=100`+(null===r?"":`&userId=${r}`))).json();if(void 0!==d.error)return null===(s=this._logger)||void 0===s||s.warn("SurfsideRecommenderService._fetchRecommendations no results",d),null;{const e=d;return this._cache.set(u,[e,o]),e.splice(0,o)}}async _fetchRecommendationList(e,t,i,r,n){var o,l,s;null===(o=this._logger)||void 0===o||o.debug("SurfsideRecommenderService._fetchRecommendations request",e,t,i,r,n);try{const o=await(await fetch(`${this._url.toString()}r/${n}/?accountId=${e}&siteId=${t}&locationId=${i}&user=${r}&limit=100`+(null===r?"":`&userId=${r}`))).json();return void 0!==o.error?(null===(l=this._logger)||void 0===l||l.warn("SurfsideRecommenderService._fetchRecommendations no results",o),null):o}catch(e){return null===(s=this._logger)||void 0===s||s.error(e),null}}async*_generateProduct(e,t,i,r){var n,o,l,s,u,a,d;null===(n=this._logger)||void 0===n||n.info("SurfsideRecommenderService._generateProduct entering generation request",e,t,i,r);for(const n of r){const r=n.item_id;try{null===(o=this._logger)||void 0===o||o.debug("SurfsideRecommenderService._generateProduct itemId",r,e,t,i);const n=await this._productFeedService.getProduct(e,t,i,r);if(null===(l=this._logger)||void 0===l||l.debug("SurfsideRecommenderService._generateProduct product",n,e,t,i),null===n){null===(u=this._logger)||void 0===u||u.warn("SurfsideRecommenderService._generateProduct product is null",e,t,i);continue}null===(s=this._logger)||void 0===s||s.debug("SurfsideRecommenderService._generateProduct product is not null",e,t,i),yield n}catch(e){null===(a=this._logger)||void 0===a||a.warn("SurfsideRecommenderService._generateProduct Missing product from recommender: ",r);continue}}null===(d=this._logger)||void 0===d||d.debug("SurfsideRecommenderService._generateProduct no more products, exiting",e,t,i)}}},7327:(e,t,i)=>{"use strict";i.d(t,{W:()=>r.W});var r=i(3e3)},2961:(e,t,i)=>{"use strict";i.d(t,{j:()=>u});var r=i(8658),n=i(110),o=i(9266),l=i(3957);const s=/(?:\$|%24)?(?:\{|%7b)auction_price(?:\}|%7d)/gi;class u{constructor(e,t,i,r,n,l){var s;this._configService=t,this._geoService=i,this._deviceService=r,this._userService=n,this._logger=l,null===(s=this._logger)||void 0===s||s.info("SurfsideBidderService.constructor initialized",this),this._url=(0,o.r)(e)}async requestBids(e){var t,i,o,u,a,d,c,v,h,f,p,g,m,_;null===(t=this._logger)||void 0===t||t.info("SurfsideBidderService.bid request",e);const S=null===(i=e.ext)||void 0===i?void 0:i.accountId,w=null===(o=e.ext)||void 0===o?void 0:o.siteId;if(void 0!==S&&void 0!==w){const t=await this._configService.getConfiguration(S,w);null!==t&&(e=await(0,l.Fp)(this._geoService,this._logger,e,t.settings.geoTargetingEnabled,t.settings.ipTargetingEnabled),e=await(0,l.tX)(this._logger,this._deviceService,e),e=await(0,l.Tw)(this._userService,this._logger,e))}const E=await fetch(this._url,{method:"POST",body:JSON.stringify(e)});if(null===(u=this._logger)||void 0===u||u.debug("SurfsideBidderService.bid response",E),null===(a=this._logger)||void 0===a||a.debug("SurfsideBidderService.bid response status",E.status),E.status!==r.t3.OK){const e=null!==(d=E.status===r.t3.NO_CONTENT?E.headers.get("X-REASON"):await E.text())&&void 0!==d?d:`${E.status} - ${E.statusText}`;throw null===(c=this._logger)||void 0===c||c.debug("SurfsideBidderService.bid response no-bid reason:",e),new n.e(e)}const b=await E.json();for(let e=0;e<(null!==(h=null===(v=b.seatbid)||void 0===v?void 0:v.length)&&void 0!==h?h:0);e++){const t=null===(f=b.seatbid)||void 0===f?void 0:f[e];for(let e=0;e<(null!==(p=null==t?void 0:t.bid.length)&&void 0!==p?p:0);e++){const i=null==t?void 0:t.bid[e];if(void 0!==i)try{i.adm=decodeURIComponent(null!==(g=null==i?void 0:i.adm)&&void 0!==g?g:"").replaceAll(/\\"/gi,'"'),i.nurl=null===(m=i.nurl)||void 0===m?void 0:m.replace(s,i.price.toString()),i.adm=i.adm.replaceAll(s,i.price.toString())}catch(e){continue}}}return null===(_=this._logger)||void 0===_||_.debug("SurfsideBidderService.bid bidResponse",b),b}}},785:(e,t,i)=>{"use strict";i.d(t,{j:()=>r.j});var r=i(2961)},7797:(e,t,i)=>{"use strict";i.d(t,{V:()=>n});var r=i(9266);class n{constructor(e,t,i){var n;this._handlebars=t,this._logger=i,null===(n=this._logger)||void 0===n||n.info("SurfsideConfigurationService.constructor initialized",this),this._url=(0,r.r)(e)}async getConfiguration(e,t){var i,r,n,o;null===(i=this._logger)||void 0===i||i.info("SurfsideConfigurationService.getConfiguration request",e,t);const l=await fetch(this._url+`${e}/${t}/config.json`);if(!l.ok)return null===(r=this._logger)||void 0===r||r.error("SurfsideConfigurationService.getConfiguration failed to fetch",l),null;const s=await l.json();return void 0===s.settings||void 0===s.templates?(null===(n=this._logger)||void 0===n||n.debug("SurfsideConfigurationService.getConfiguration response was invalid format!",s),null):(null===(o=this._logger)||void 0===o||o.debug("SurfsideConfigurationService.getConfiguration response",s),await this._mapConfig(s))}async _mapConfig(e){var t,i,r,n,o,l,s,u,a;return null===(t=this._logger)||void 0===t||t.debug("IConfigurationService.mapConfig mapping:",e),{settings:e.settings,templates:{clickThroughUrlTemplate:this._handlebars.template((await this._importModule(`export default ${null!==(r=null===(i=e.templates)||void 0===i?void 0:i.clickThroughUrlTemplate)&&void 0!==r?r:""}`)).default),productCardTemplate:this._handlebars.template((await this._importModule(`export default ${null!==(o=null===(n=e.templates)||void 0===n?void 0:n.productCardTemplate)&&void 0!==o?o:""}`)).default),javascriptCallbacks:await this._importModule(null!==(s=null===(l=e.templates)||void 0===l?void 0:l.javascriptCallbacks)&&void 0!==s?s:""),productCardStylesheet:null===(u=e.templates)||void 0===u?void 0:u.productCardStylesheet,carouselStylesheet:null===(a=e.templates)||void 0===a?void 0:a.carouselStylesheet}}}async _importModule(e){var t,i,r;null===(t=this._logger)||void 0===t||t.debug("IConfigurationService.importDynamicModule importing:",e);const n=new Blob([e],{type:"text/javascript"}),o=URL.createObjectURL(n);null===(i=this._logger)||void 0===i||i.debug("IConfigurationService.importDynamicModule moduleUrl",o);const l=await import(/* webpackIgnore: true */o);return null===(r=this._logger)||void 0===r||r.debug("IConfigurationService.importDynamicModule module:",l),l}}},2551:(e,t,i)=>{"use strict";i.d(t,{V:()=>r.V});var r=i(7797)},6458:(e,t,i)=>{"use strict";i.d(t,{V:()=>n.V,j:()=>r.j});var r=i(785),n=i(2551)},4423:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});var r=i(102);class n extends r.S{constructor(e){var t;super("div#surf-device-override",e),null===(t=this.logger)||void 0===t||t.info("DeviceOverrideService.constructor")}async getDeviceInfo(){const e=this.getOverrideNode();return void 0===(null==e?void 0:e.dataset)||(this.overrideData=this.mapDataSetToData(e.dataset)),this.overrideData}mapDataSetToData(e){var t,i,r,n,l;const{ua:s,dnt:u,ip:a,ipv6:d,devicetype:c,make:v,model:h,os:f,osv:p,h:g,w:m,language:_}=e,S={ua:s,dnt:"true"===(null==u?void 0:u.toLowerCase())?1:0,ip:a,ipv6:d,devicetype:o(c),make:v,model:h,os:f,osv:p,h:o(g),w:o(m),language:_},w=null!==(i=null===(t=this.overrideNode)||void 0===t?void 0:t.querySelector("div#surf-device-sua-override"))&&void 0!==i?i:null;if(null===w)return S;const{mobile:E,architecture:b,bitness:I,useragentmodel:R,source:T}=w.dataset,O="true"===(null==E?void 0:E.toLowerCase())?1:0,C="true"===(null==T?void 0:T.toLowerCase())?1:0;let y;const N=[...w.querySelectorAll("div.surf-device-sua-browser-override")];if(N.length>0){y=[];for(const e of N){const{brand:t,version:i}=e.dataset;void 0!==t?y.push({brand:t,version:null==i?void 0:i.split(",")}):null===(r=this.logger)||void 0===r||r.warn("DeviceOverrideService.mapDataSetToData Browser brandInfo is missing brand field. Skipping browser override")}}let D;const A=null!==(n=w.querySelector("div#surf-device-sua-platform-override"))&&void 0!==n?n:null;if(null!==A){const{brand:e,version:t}=A.dataset;void 0===e?null===(l=this.logger)||void 0===l||l.warn("DeviceOverrideService.mapDataSetToData Platform brandinfo is missing brand field. Skipping platform override"):D={brand:e,version:null==t?void 0:t.split(",")}}const P={mobile:O,architecture:b,bitness:I,model:R,source:C,browsers:y,platform:D};return S.sua=P,S}}function o(e){if(void 0===e)return;const t=Number(e);return isNaN(t)?void 0:t}},5550:(e,t,i)=>{"use strict";i.d(t,{E:()=>a,t:()=>o});var r=i(4423),n=i(6131);class o extends r.M{constructor(e){super(e),null==e||e.info("SurfsideDeviceService.constructor")}async getDeviceInfo(){var e,t;const i=await super.getDeviceInfo();if(null!==i)return i;const r=l()?1:0,n=a();null!==n&&(null===(e=this.logger)||void 0===e||e.warn("SurfsideDeviceService.getDeviceInfo failure; TryGetDeviceInfo() returned null"));const o={model:null==n?void 0:n.model,mobile:r,browsers:void 0!==(null==n?void 0:n.browser)?[n.browser]:void 0,platform:void 0!==(null==n?void 0:n.os)?{brand:null==n?void 0:n.os,version:null===(t=null==n?void 0:n.osv)||void 0===t?void 0:t.split(".")}:void 0,architecture:u(navigator.userAgent),source:3};return{make:null==n?void 0:n.make,model:null==n?void 0:n.model,w:screen.width,h:screen.height,language:navigator.language,ua:navigator.userAgent,devicetype:s(),os:null==n?void 0:n.os,osv:null==n?void 0:n.osv,sua:o}}}function l(){return void 0!==window.ontouchstart}function s(){const e=l();if(!e)return n.V5.PC;const t=window.screen.width,i=window.screen.height,[r,o]=[t,i].sort(((e,t)=>e-t));return e&&r>=600&&o>=960?n.V5.TABLET:n.V5.MOBILE}function u(e){return/Win64|x64|x86_64|WOW64/.test(e)?"x64":/Win32|x86/.test(e)?"x86":/aarch64|arm64/.test(e)?"ARM64":/armv\d+/.test(e)||l()?"ARM":void 0}function a(){var e,t,i,r,n,o;const l=navigator.userAgent,s=l.toLowerCase();let u={};return s.includes("android")?u={...d(l)}:s.includes("iphone")||s.includes("ipad")?u={...c(l)}:s.includes("windows nt")?u={make:"Microsoft",model:"Windows",os:"Windows",osv:null===(t=null===(e=/Windows NT (?<osv>[0-9.]+)/gi.exec(l))||void 0===e?void 0:e.groups)||void 0===t?void 0:t.osv}:s.includes("macintosh")&&(u={make:"Apple",model:"Macintosh",os:"MacOS",osv:null===(n=null===(r=null===(i=/Mac OS X (?<osv>[0-9_]+)/gi.exec(l))||void 0===i?void 0:i.groups)||void 0===r?void 0:r.osv)||void 0===n?void 0:n.replaceAll("_",".")}),u.browser=null!==(o=function(e){var t,i,r;try{let n,o;if(e.includes("Firefox/"))n=e.split("Firefox/")[1],o="Firefox";else if(e.includes("Chrome/"))n=null===(t=e.split("Chrome/")[1])||void 0===t?void 0:t.split(" ")[0],o="Chrome";else if(e.includes("CriOS"))n=null===(i=e.split("CriOS/")[1])||void 0===i?void 0:i.split(" ")[0],o="Chrome";else if(e.includes("Safari/")&&!e.includes("Chrome"))n=null===(r=e.split("Version/")[1])||void 0===r?void 0:r.split(" ")[0],o="Safari";else{if(!e.includes("Edg/"))return null;n=e.split("Edg/")[1],o="Edge"}return{brand:o,version:n.split(".")}}catch(e){return null}}(navigator.userAgent))&&void 0!==o?o:void 0,u}function d(e){var t,i;const r=/^[^\s]+\s\((?<Linux>.*);\s*(?<osv>[^)]+);\s*(?<Model>[^)]+)\)/gi.exec(e),n=null===(t=null==r?void 0:r.groups)||void 0===t?void 0:t.osv,o=null===(i=null==r?void 0:r.groups)||void 0===i?void 0:i.Model;let l;return void 0!==o&&(l=o.includes("Pixel")?"Google":o.includes("SM-")?"Samsung":o.startsWith("LG-")?"LG":o.startsWith("moto")?"Motorola":o.startsWith("Redmi")?"Xiaomi":"Android"),{os:"Android",osv:n,model:o,make:l}}function c(e){var t,i,r,n;const o=/^[^\s]+\s*\((?<Device>[^;]+);\s(?<Model>[^;)]+[;)])\s(?<ModelExt>[^;)]+[;)])?/gi.exec(e),l=null===(t=null==o?void 0:o.groups)||void 0===t?void 0:t.Device;let s;void 0!==l&&(s=l.toLowerCase().includes("ipad")?"iPad":"iPhone");let u,a=null===(i=null==o?void 0:o.groups)||void 0===i?void 0:i.Model;if("U"===a&&(a=null===(r=null==o?void 0:o.groups)||void 0===r?void 0:r.ModelExt),void 0!==a){const e=/OS (?<ver>[0-9_]+)/gi.exec(a);u=null===(n=null==e?void 0:e.groups)||void 0===n?void 0:n.ver}return{make:"Apple",model:s,os:"iOS",osv:u}}},9442:(e,t,i)=>{"use strict";i.d(t,{EJ:()=>n.E,MM:()=>r.M,td:()=>n.t});var r=i(4423),n=i(5550)},9225:(e,t,i)=>{"use strict";i.d(t,{N:()=>s});var r,n=i(9266);!function(e){e.NEW_TRACKER="newTracker",e.BID_REQUESTED="bidRequested",e.BIDDER_DONE="bidderDone"}(r||(r={}));const o="ads",l="surf";class s{constructor(e={lazyLoad:!1,appId:o},t){var i,s,u,a,d,c,v,h;if(this._logger=t,null===(i=this._logger)||void 0===i||i.info("SurfsideEventService.constructor"),this._appId=null!==(s=e.appId)&&void 0!==s?s:o,this._collectorUrl=(0,n.r)(null!==(u=e.collectorUrl)&&void 0!==u?u:"//col.surfside.io"),e.lazyLoad&&void 0===window.surf){this._src=(0,n.r)(e.src),window.surfContext=null!==(a=window.surfContext)&&void 0!==a?a:[],window.surfContext.push("surf"),window.surf=function(){var e;void 0!==window.surf&&(window.surf.q=null!==(e=window.surf.q)&&void 0!==e?e:[]).push(arguments)},this._surf=window.surf,window.surf.q=null!==(d=window.surf.q)&&void 0!==d?d:[];const t=document.createElement("script");t.src=this._src,t.async=!0,t.onload=()=>{var t,i,n,s;null===(t=this._logger)||void 0===t||t.info("SurfsideEventService script loaded"),this._surf=window.surf,this._surf(`${r.NEW_TRACKER}:${this._appId}`,null!==(i=e.appId)&&void 0!==i?i:o,this._collectorUrl,{appId:null!==(n=e.appId)&&void 0!==n?n:o,cookieName:null!==(s=e.cookieName)&&void 0!==s?s:l,discoverRootDomain:!0,cookieSameSite:"Lax"})},document.head.appendChild(t)}else this._surf=window.surf,this._surf(`${r.NEW_TRACKER}:${this._appId}`,null!==(c=e.appId)&&void 0!==c?c:o,this._collectorUrl,{appId:null!==(v=e.appId)&&void 0!==v?v:o,cookieName:null!==(h=e.cookieName)&&void 0!==h?h:l,discoverRootDomain:!0,cookieSameSite:"Lax"})}async raiseBidRequested(e){var t,i,n,o,l;null===(t=this._logger)||void 0===t||t.info("SurfsideEventService.raiseBidRequested"),null===(i=this._logger)||void 0===i||i.debug("SurfsideEventService.raiseBidRequested",e);const s=e.id;null===(n=this._logger)||void 0===n||n.info("SurfsideEventService.raiseBidRequested requestId",s);const u={auctionId:s,bidderRequestId:s,bids:null===(o=e.imp)||void 0===o?void 0:o.map((t=>{var i,r,n,o,l,s,u,a,d,c,v,h,f,p,g,m,_,S,w,E,b,I;return{params:{accountId:null!==(r=null===(i=e.ext)||void 0===i?void 0:i.accountId)&&void 0!==r?r:null,channelId:null!==(o=null===(n=e.ext)||void 0===n?void 0:n.channelId)&&void 0!==o?o:null,siteId:null!==(s=null===(l=e.ext)||void 0===l?void 0:l.siteId)&&void 0!==s?s:null,placementId:null!==(a=null===(u=e.ext)||void 0===u?void 0:u.zoneId)&&void 0!==a?a:null,zone:null!==(c=null===(d=e.ext)||void 0===d?void 0:d.zone)&&void 0!==c?c:null,type:null!==(h=null===(v=e.ext)||void 0===v?void 0:v.type)&&void 0!==h?h:null,storeId:null!==(p=null===(f=e.ext)||void 0===f?void 0:f.storeId)&&void 0!==p?p:null},user:void 0!==(null===(g=null==e?void 0:e.user)||void 0===g?void 0:g.geo)?{geo:e.user.geo}:void 0,ortb2Imp:{ext:{tid:void 0!==(null===(m=null==e?void 0:e.source)||void 0===m?void 0:m.tid)?e.source.tid:""}},mediaTypes:{banner:void 0!==(null===(_=null==t?void 0:t.banner)||void 0===_?void 0:_.w)&&void 0!==(null===(S=null==t?void 0:t.banner)||void 0===S?void 0:S.h)?{sizes:[[t.banner.w,t.banner.h]]}:void 0},transactionId:null!==(E=null===(w=null==e?void 0:e.source)||void 0===w?void 0:w.tid)&&void 0!==E?E:"",sizes:void 0!==(null===(b=null==t?void 0:t.banner)||void 0===b?void 0:b.w)&&void 0!==(null===(I=null==t?void 0:t.banner)||void 0===I?void 0:I.h)?[[t.banner.w,t.banner.h]]:[[0,0]],bidId:t.id,ortb2:{site:{domain:window.location.hostname,page:window.location.pathname},device:{w:window.screen.width,h:window.screen.height,dnt:0,ua:window.navigator.userAgent,language:window.navigator.language}}}})),auctionStart:Date.now(),timeout:0,refererInfo:{stack:[document.referrer],location:window.location.href,page:window.location.href,domain:window.location.hostname},start:Date.now()};null===(l=this._logger)||void 0===l||l.debug("SurfsideEventService.raiseBidRequested snowplowBidRequestPayload",u),this._surf(`${r.BID_REQUESTED}:${this._appId}`,u)}async raiseBidResponded(e,t){var i,n,o,l;null===(i=this._logger)||void 0===i||i.info("SurfsideEventService.raiseBidderDone"),null===(n=this._logger)||void 0===n||n.debug("SurfsideEventService.raiseBidderDone",e);const s=void 0!==(null==e?void 0:e.seatbid)?null===(o=e.seatbid[0])||void 0===o?void 0:o.bid:[],u={auctionId:t.id,bidderRequestId:t.id,bids:s.map((i=>{var r,n,o,l,s,u,a,d,c,v,h,f,p,g,m,_,S,w,E,b,I,R,T,O,C,y,N,D;return{params:{accountId:null!==(l=null!==(n=null===(r=e.ext)||void 0===r?void 0:r.accountId)&&void 0!==n?n:null===(o=t.ext)||void 0===o?void 0:o.accountId)&&void 0!==l?l:null,channelId:null!==(d=null!==(u=null===(s=e.ext)||void 0===s?void 0:s.channelId)&&void 0!==u?u:null===(a=t.ext)||void 0===a?void 0:a.channelId)&&void 0!==d?d:null,siteId:null!==(f=null!==(v=null===(c=e.ext)||void 0===c?void 0:c.siteId)&&void 0!==v?v:null===(h=t.ext)||void 0===h?void 0:h.siteId)&&void 0!==f?f:null,placementId:null!==(_=null!==(g=null===(p=e.ext)||void 0===p?void 0:p.zoneId)&&void 0!==g?g:null===(m=t.ext)||void 0===m?void 0:m.zoneId)&&void 0!==_?_:null,zone:null!==(b=null!==(w=null===(S=e.ext)||void 0===S?void 0:S.zone)&&void 0!==w?w:null===(E=t.ext)||void 0===E?void 0:E.zone)&&void 0!==b?b:null,type:null!==(O=null!==(R=null===(I=e.ext)||void 0===I?void 0:I.type)&&void 0!==R?R:null===(T=t.ext)||void 0===T?void 0:T.type)&&void 0!==O?O:null,storeId:null!==(D=null!==(y=null===(C=e.ext)||void 0===C?void 0:C.storeId)&&void 0!==y?y:null===(N=t.ext)||void 0===N?void 0:N.storeId)&&void 0!==D?D:null},bidId:i.id,transactionId:i.impid,ortb2:{site:{domain:window.location.hostname,page:window.location.pathname},device:{w:window.screen.width,h:window.screen.height,dnt:0,ua:window.navigator.userAgent,language:window.navigator.language}},ortb2Imp:{},sizes:void 0!==i.w&&void 0!==i.h?[[i.w,i.h]]:[[0,0]],mediaTypes:void 0!==i.w&&void 0!==i.h?{banner:{sizes:[[i.w,i.h]]}}:{}}})),auctionStart:0,refererInfo:{stack:[document.referrer],location:window.location.href,page:window.location.href,domain:window.location.hostname},timeout:0,start:Date.now()};null===(l=this._logger)||void 0===l||l.debug("SurfsideEventService.raiseBidderDone snowplowBidderDoneEvent",u),this._surf(`${r.BIDDER_DONE}:${this._appId}`,u)}}},4305:(e,t,i)=>{"use strict";i.d(t,{N:()=>r.N});var r=i(9225)},2781:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});var r=i(102);class n extends r.S{constructor(e){super("div#surf-geo-override",e)}mapDataSetToData(e){var t,i,r,n,o;null===(t=this.logger)||void 0===t||t.info("GeoOverrideService.mapDataSetToData");const{country:l,region:s,city:u,zip:a,coords:d,utcoffset:c,ip:v}=e;if(void 0===c||void 0===l||void 0===d||void 0===s||void 0===u||void 0===a||void 0===v)return null===(i=this.logger)||void 0===i||i.warn("GeoOverrideService.mapDataSetToData missing a value in geo override, returning null"),null;const h=Number(c);if(isNaN(h))return null===(r=this.logger)||void 0===r||r.warn("GeoOverrideService.mapDataSetToData utcOffset is not a number, returning null"),null;const[f,p,g]=d.split(",").map((e=>Number(e)));if(void 0===f||isNaN(f)||void 0===p||isNaN(p)||void 0===g||isNaN(g))return null===(n=this.logger)||void 0===n||n.warn("GeoOverrideService.mapDataSetToData coords string is malformed, returning null"),null;const m={country:l,region:s,city:u,zip:a,coords:{latitude:f,longitude:p,accuracy:g},utcoffset:h,ip:v};return null===(o=this.logger)||void 0===o||o.warn("GeoOverrideService.mapDataSetToData override success",m),m}async getGeo(){const e=this.getOverrideNode();return void 0===(null==e?void 0:e.dataset)||(this.overrideData=this.mapDataSetToData(e.dataset)),this.overrideData}}},9058:(e,t,i)=>{"use strict";i.d(t,{I:()=>n});var r=i(2781);class n extends r.D{constructor(e){var t;super(e),null===(t=this.logger)||void 0===t||t.info("SurfsideGeoService.constructor initialized",this)}async getGeo(){var e,t,i;null===(e=this.logger)||void 0===e||e.info("SurfsideGeoService.getGeo");const r=await super.getGeo();if(null!==r)return r;try{const e=await fetch("https://g.surfside.io/enrich");return null===(t=this.logger)||void 0===t||t.debug("SurfsideGeoService.getGeo response",e),await e.json()}catch(e){return null===(i=this.logger)||void 0===i||i.error("Failed to get geolocation information",e),null}}}},6181:(e,t,i)=>{"use strict";i.d(t,{D:()=>n.D,I:()=>r.I});var r=i(9058),n=i(2781)},9955:(e,t,i)=>{"use strict";i.d(t,{$9:()=>n.$,Dj:()=>r.D,EJ:()=>l.EJ,I:()=>r.I,MM:()=>l.MM,N8:()=>o.N,RT:()=>n.R,td:()=>l.td});var r=i(6181),n=i(4831),o=i(4305),l=i(9442)},8831:(e,t,i)=>{"use strict";i.d(t,{R:()=>o});var r=i(1133);const n=/surfid.(?<site_hash>[a-z0-9]+)=(?<domain_userid>[^.]+).*/gi;class o extends r.${constructor(e){var t;super(e),null===(t=this.logger)||void 0===t||t.info("SurfsideUserIDService.constructor initialized")}async getUserId(){var e,t,i,r,o,l,s,u;null===(e=this.logger)||void 0===e||e.info("SurfsideUserIDService.getUserId");const a=null!==(s=null!==(t=await super.getUserId())&&void 0!==t?t:null===(l=null===(o=null===(r=null===(i=document.cookie.split(";").map((e=>e.trim())).filter((e=>e.startsWith("surfid."))).map((e=>e.matchAll(n))).map((e=>[...e])))||void 0===i?void 0:i[0])||void 0===r?void 0:r[0])||void 0===o?void 0:o.groups)||void 0===l?void 0:l.domain_userid)&&void 0!==s?s:null;return null===(u=this.logger)||void 0===u||u.debug("SurfsideUserIDService.getUserId userId",a),a}}},1133:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});var r=i(102);class n extends r.S{constructor(e){var t;super("div#surf-user-override",e),null===(t=this.logger)||void 0===t||t.info("UserOverrideService.constructor initialized UserOverrideService")}async getUserId(){const e=this.getOverrideNode();return void 0===(null==e?void 0:e.dataset)||(this.overrideData=this.mapDataSetToData(e.dataset)),this.overrideData}mapDataSetToData(e){var t,i;return void 0===e.userid?(null===(t=this.logger)||void 0===t||t.warn("UserOverrideService.getUserId found userId Div block, but no userId was set.Hint: it needs dataset - userid"),null):(null===(i=this.logger)||void 0===i||i.debug(`UserOverrideService.getUserId found userId: ${e.userid}`),e.userid)}}},4831:(e,t,i)=>{"use strict";i.d(t,{$:()=>n.$,R:()=>r.R});var r=i(8831),n=i(1133)},7836:(e,t,i)=>{"use strict";function r(e){if(e.includes("://"))return e;const t=e.startsWith("//")?"":"//";let i=window.location.protocol;return i.startsWith("http")||(i="https:"),`${i}${t}${e}`}i.d(t,{r:()=>r})},4842:(e,t,i)=>{"use strict";i.d(t,{N7:()=>s,TT:()=>l,V0:()=>a,fc:()=>n});var r=i(9730);function n(e,t){null==t||t.info("InitHandlebars initializing"),o("slug",e,r.slug,t),o("lower",e,r.lower,t),o("path",e,r.path,t),o("search",e,r.search,t),o("coalesce",e,r.coalesce,t),o("sed",e,r.sed,t),o("join",e,r.join,t),o("uri",e,r.uri,t),o("eq",e,r.eq,t),o("or",e,r.or,t),o("and",e,r.and,t),o("in",e,r.isIn,t),o("array",e,r.array,t),o("global",e,r.global,t)}function o(e,t,i,r){null==r||r.debug(`Registering Handlebars Helper ${e}`),t.registerHelper(e,i)}function l(){const e=window.location;return{origin:e.origin,port:e.port,path:e.pathname,host:e.host,host_name:e.hostname,search:e.search,hash:e.hash,protocol:e.protocol}}function s(e,t,i,r,n={image:null,price:null,salePrice:null,thc:null,cbd:null,strain:null,name:null,brand_name:null,brandName:null,productType:null,details:null,cta:null,clickthroughUrl:null,winUrl:null,pixelUrl:null,ext:null}){return a(e,{product:null!=t?t:{},window:l(),catalog:n,publisher:i,ext:null==t?void 0:t.ext,clickthrough:r})}function u(e,t,i){const r=Array.from(e.querySelectorAll(`[_${i}_]`));for(const e of r){const r=t[e.getAttribute(`_${i}_`)];e.addEventListener(i,r)}}function a(e,t){const i=e(t,{helpers:{slug:r.slug,lower:r.lower,path:r.path,search:r.search,coalesce:r.coalesce,join:r.join,uri:r.uri,sed:r.sed,eq:r.eq,or:r.or,and:r.and,isIn:r.isIn,array:r.array}}),n=document.createElement("div");return n.innerHTML=i,u(n,t,"click"),u(n,t,"mousedown"),u(n,t,"loadeddata"),u(n,t,"error"),u(n,t,"touchend"),u(n,t,"touchstart"),u(n,t,"touchmove"),n}},9266:(e,t,i)=>{"use strict";i.d(t,{N7:()=>n.N7,TT:()=>n.TT,V0:()=>n.V0,fc:()=>n.fc,r:()=>r.r});var r=i(7836),n=i(4842)}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.r(r),i.d(r,{AdCom10DeviceTypes:()=>o.V5,AgentTypes:()=>o.ZV,BuildBanner:()=>u.BuildBanner,BuildBannerFromBid:()=>u.BuildBannerFromBid,BuildClickThroughUrl:()=>u.BuildClickThroughUrl,BuildNativeResponse:()=>u.BuildNativeResponse,BuildProductInfoFromElement:()=>u.BuildProductInfoFromElement,CollectN:()=>u.CollectN,CollectNAsync:()=>u.CollectNAsync,ContextSubTypes:()=>o.bU,ContextTypes:()=>o.Lp,DeserializeVast:()=>u.DeserializeVast,DeserializeVideo:()=>u.DeserializeVideo,DeviceMiddleware:()=>d.tX,DeviceOverrideService:()=>e.MM,Environment:()=>s.OH,EventTrackingMethods:()=>o.i_,EventTypes:()=>o.wf,GeoMiddlewareImmediate:()=>d.Fp,GeoOverrideService:()=>e.Dj,GetSafeUrl:()=>a.r,HttpStatus:()=>s.t3,HttpStatusClass:()=>s.DH,IPServices:()=>s.Ev,IdentityMiddleware:()=>d.Tw,LocalLoggerService:()=>e.L8,LocationType:()=>s.iF,LogLevel:()=>e.$b,NativeAssetId:()=>o.vU,NativeDataTypes:()=>o.Bz,NativeImageTypes:()=>o.qU,NativePosition:()=>o.JQ,NativeRequestBuilder:()=>o.Im,NativeResponseToProductInformation:()=>o.LO,NoBidResponseError:()=>l.e,PlacementTypes:()=>o.Ph,RenderAndBind:()=>a.V0,RenderTemplate:()=>a.N7,RequestBuilder:()=>u.RequestBuilder,SimpleBannerRequest:()=>u.SimpleBannerRequest,SurfColors:()=>s.$J,SurfsideBidderService:()=>e.j8,SurfsideConfigurationService:()=>e.Vh,SurfsideDeviceService:()=>e.td,SurfsideEventService:()=>e.N8,SurfsideGeoService:()=>e.I,SurfsideProductFeedService:()=>e.wh,SurfsideRecommenderService:()=>e.WX,SurfsideUserIDService:()=>e.RT,TryGetDeviceInfo:()=>e.EJ,UserOverrideService:()=>e.$9,VideoMimes:()=>o.JY,and:()=>u.and,array:()=>u.array,buildIdentityMiddleware:()=>d.NW,coalesce:()=>u.coalesce,eq:()=>u.eq,getNativeTemplateDelegateWindow:()=>a.TT,global:()=>u.global,initHandlebars:()=>a.fc,initSurfsideCore:()=>c,isIn:()=>u.isIn,join:()=>u.join,lower:()=>u.lower,or:()=>u.or,path:()=>u.path,search:()=>u.search,sed:()=>u.sed,slug:()=>u.slug,uri:()=>u.uri});var e=i(4545),t=i(3633),n=i.n(t),o=i(6131),l=i(110),s=i(8658),u=i(9730),a=i(9266),d=i(3957);function c(){const t=n().create(),i="true"===(r="surf_debug",null===(o=window.location.search.replace("?","").split("&").map((e=>e.split("="))).filter((e=>e[0]===r)).map((e=>e.length>1?e[1]:"true")))||void 0===o?void 0:o[0])?new e.L8(e.$b.DEBUG):void 0;var r,o;const l=new e.Vh("//r.surfside.io/",t,i),s=new e.I(i),u=new e.td(i),a=new e.RT(i),d=new e.j8("//bid.surfside.io/rtb/bids/surfside",l,s,u,a,i),c=new e.wh("//creative.surfside.io/",i);return{bidder:d,config:l,geo:s,productFeed:c,userId:a,recommender:new e.WX("//t.surfside.io/",c,i),events:new e.N8({lazyLoad:!0,src:"//cdn.surfside.io/sdk/1.0.0/edge.js"},i),device:u}}})(),r})()));
|