storyly-placement 1.13.2 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseStory-Bf6sbB7L.js → BaseStory-BrdLeEg5.js} +55 -55
- package/dist/{create-product-feed-impl-ARR_d2m1.js → create-product-feed-impl-BeMwJuXI.js} +1 -1
- package/dist/{index-IHsrQXZ0.js → index-3UIkgw48.js} +2 -2
- package/dist/{index-BYBgd1_0.js → index-B5quCK2e.js} +3 -3
- package/dist/{index-g-W6OMw7.js → index-B8yh8iR9.js} +7 -7
- package/dist/{index-Lx2PfwIj.js → index-BJHJR8BN.js} +2 -2
- package/dist/{index-Drgm5RS6.js → index-BR7E84Sw.js} +3 -3
- package/dist/{index-BU9qdpbw.js → index-BV1Cj9-Z.js} +3 -3
- package/dist/{index-dQ3NkK6g.js → index-BZWk36Y7.js} +2 -2
- package/dist/{index-DlR9NPWA.js → index-BbbSbOEE.js} +34 -23
- package/dist/{index-Cws9PRZp.js → index-BeMGryZf.js} +2 -2
- package/dist/{index-QYpodDh5.js → index-Bn0Mab6_.js} +168 -156
- package/dist/{index-nFUssBfv.js → index-BpE85es5.js} +2 -2
- package/dist/{index-c2rb_HJs.js → index-BwDvswsL.js} +1 -1
- package/dist/{index-DbNwPfjl.js → index-CK94rHGE.js} +2 -2
- package/dist/index-CLPzv5ei.js +1428 -0
- package/dist/{index-BIweDRiG.js → index-Cjvr4QPx.js} +1 -1
- package/dist/{index-DsF7s7a6.js → index-Cm8nu-Fn.js} +3 -3
- package/dist/{index-CdynpGvC.js → index-Cv1ZfRpD.js} +8 -8
- package/dist/{index-DkIErTwa.js → index-D23F2h6O.js} +101 -101
- package/dist/{index-DP8s94Mv.js → index-D5kitJfJ.js} +12 -12
- package/dist/{index-BrYWntd5.js → index-DAVPqo8F.js} +2 -2
- package/dist/{index-Ds4Afg-o.js → index-DESZKzJn.js} +3 -3
- package/dist/{index-BLj6MB_0.js → index-Dme41DS7.js} +518 -502
- package/dist/{index-0zcpy8Y8.js → index-DvyjwDXR.js} +2 -2
- package/dist/{index-DEgdrTBV.js → index-EmdpqfvS.js} +2 -2
- package/dist/{index-BHUxrYmM.js → index-HsFXkG-8.js} +2 -2
- package/dist/{index-hGDqnioT.js → index-LP7wOE2o.js} +3 -3
- package/dist/{index-Y03xesDK.js → index-LSr-ZqkP.js} +1 -1
- package/dist/{index-D-UG1u_v.js → index-PcXaZXvJ.js} +2 -2
- package/dist/{index-DfoIwoFJ.js → index-gA4DIZT-.js} +2 -2
- package/dist/{index-BeIO4ROj.js → index-kzHFY_c2.js} +2 -2
- package/dist/{index-r-jSSGYX.js → index-nmddYDgq.js} +612 -594
- package/dist/index.d.ts +3 -0
- package/dist/{intersection-observer-impl-3NaVTVSt.js → intersection-observer-impl-DpA0W7tq.js} +1 -1
- package/dist/{nudge-story-groups-impl-BIgJpAFB.js → nudge-story-groups-impl-BScqlMN0.js} +1 -1
- package/dist/{ref-nyou1xza.js → ref-Dc9ZmyfB.js} +1 -1
- package/dist/rule-engine-CXGUQuxB.js +52 -0
- package/dist/{story-group-animation-impl-VWVJMIK6.js → story-group-animation-impl-DXtY6578.js} +1 -1
- package/dist/storyly-placement.js +1 -1
- package/package.json +1 -1
- package/dist/index-QNZ9CMq_.js +0 -1404
- package/dist/rule-engine-DPw_feBx.js +0 -43
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { d as k } from "./intersection-observer-impl-
|
|
3
|
-
import { H as W, C as B, r as g, A as R, S as G } from "./index-
|
|
4
|
-
class
|
|
1
|
+
import { S as E, s as _, h as r, J as L, m as y, j as d, a1 as p, M as n, C as l, a2 as A, b as v, a3 as c, u as a, $ as h, P as u, o as S, _ as w, a4 as x, K as b, n as P, a5 as O, c as q, a6 as I, f as m, l as V } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { d as k } from "./intersection-observer-impl-DpA0W7tq.js";
|
|
3
|
+
import { H as W, C as B, r as g, A as R, S as G } from "./index-DvyjwDXR.js";
|
|
4
|
+
class H {
|
|
5
5
|
constructor({
|
|
6
6
|
story: t,
|
|
7
7
|
key: s,
|
|
@@ -11,9 +11,9 @@ class Q {
|
|
|
11
11
|
progressDoms: f,
|
|
12
12
|
instanceId: D,
|
|
13
13
|
condition: C,
|
|
14
|
-
getActiveStory:
|
|
14
|
+
getActiveStory: T
|
|
15
15
|
}) {
|
|
16
|
-
this.storyDom_ = null, this.layersContainer_ = document.createElement("div"), this.story_ = t, this.storyData_ = {}, this.layers_ = [], this.group_ = e, this.key_ = s, this.storiesContainer_ = o, this.groupWrapper_ = i, this.progressDoms_ = new Proxy(f, []), this.storyProgressSecond_ = 7, this.progressPaused_ = !0, this.imageAsset_ = null, this.videoAsset_ = null, this.videoAssetLoadingStarted_ = !1, this.storyProgressRemain_ = this.storyProgressSecond_, this.progressTime_ = 0, this.isBlankStory_ = !1, this.imageAssetLoaded_ = !1, this.instanceId_ = D, this.timedLayers_ = [], this.condition_ = C, this.getActiveStory =
|
|
16
|
+
this.storyDom_ = null, this.layersContainer_ = document.createElement("div"), this.story_ = t, this.storyData_ = {}, this.layers_ = [], this.group_ = e, this.key_ = s, this.storiesContainer_ = o, this.groupWrapper_ = i, this.progressDoms_ = new Proxy(f, []), this.storyProgressSecond_ = 7, this.progressPaused_ = !0, this.imageAsset_ = null, this.videoAsset_ = null, this.videoAssetLoadingStarted_ = !1, this.storyProgressRemain_ = this.storyProgressSecond_, this.progressTime_ = 0, this.isBlankStory_ = !1, this.imageAssetLoaded_ = !1, this.instanceId_ = D, this.timedLayers_ = [], this.condition_ = C, this.getActiveStory = T, this.storylyContext = E.getContext(this.instanceId_), this.isSharing_ = !1, _(this.layersContainer_, "layers-container"), r(this.layersContainer_, "dir", k.LTR), this.attachCallbacksToElement_();
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Attaches callbacks to the DOM element for them to be used by publishers.
|
|
@@ -92,7 +92,7 @@ class Q {
|
|
|
92
92
|
height: this.videoAsset_.videoHeight,
|
|
93
93
|
width: this.videoAsset_.videoWidth
|
|
94
94
|
}), this.storyProgressRemain_ = this.videoAsset_.duration, this.storyProgressSecond_ = this.videoAsset_.duration, this.videoAsset_.duration >= 120 && !p(this.storyData_.video_type)) {
|
|
95
|
-
const t = await (await import("./index-
|
|
95
|
+
const t = await (await import("./index-Cjvr4QPx.js")).default;
|
|
96
96
|
this.videoSeekbar_ = new t({
|
|
97
97
|
storyDom: this.storyDom_,
|
|
98
98
|
videoDom: this.videoAsset_,
|
|
@@ -179,64 +179,64 @@ class Q {
|
|
|
179
179
|
};
|
|
180
180
|
if (t.is_bg && (t.bg_color || t.gradient_colors)) {
|
|
181
181
|
this.isBlankStory_ = !0;
|
|
182
|
-
const i = (await import("./index-
|
|
182
|
+
const i = (await import("./index-BJHJR8BN.js")).default;
|
|
183
183
|
e.instance = new i({ ...o });
|
|
184
184
|
}
|
|
185
|
-
if (t.type ===
|
|
186
|
-
const i = (await import("./index-
|
|
185
|
+
if (t.type === a.EMOJI) {
|
|
186
|
+
const i = (await import("./index-BpE85es5.js")).default;
|
|
187
187
|
e.instance = new i({ ...o });
|
|
188
|
-
} else if (t.type ===
|
|
189
|
-
const i = (await import("./index-
|
|
188
|
+
} else if (t.type === a.POLL) {
|
|
189
|
+
const i = (await import("./index-EmdpqfvS.js")).default;
|
|
190
190
|
e.instance = new i({ ...o });
|
|
191
|
-
} else if (t.type ===
|
|
192
|
-
const i = (await import("./index-
|
|
191
|
+
} else if (t.type === a.RATING) {
|
|
192
|
+
const i = (await import("./index-HsFXkG-8.js")).default;
|
|
193
193
|
e.instance = new i({ ...o });
|
|
194
|
-
} else if (t.type ===
|
|
195
|
-
const i = (await import("./index-
|
|
194
|
+
} else if (t.type === a.QUIZ) {
|
|
195
|
+
const i = (await import("./index-gA4DIZT-.js")).default;
|
|
196
196
|
e.instance = new i({ ...o });
|
|
197
|
-
} else if (t.type ===
|
|
198
|
-
const i = (await import("./index-
|
|
197
|
+
} else if (t.type === a.COUNTDOWN) {
|
|
198
|
+
const i = (await import("./index-BZWk36Y7.js")).default;
|
|
199
199
|
e.instance = new i({ ...o });
|
|
200
|
-
} else if (t.type ===
|
|
201
|
-
const i = (await import("./index-
|
|
200
|
+
} else if (t.type === a.IMAGE_CTA) {
|
|
201
|
+
const i = (await import("./index-DAVPqo8F.js")).default;
|
|
202
202
|
e.instance = new i({
|
|
203
203
|
...o,
|
|
204
|
-
type:
|
|
204
|
+
type: a.IMAGE_CTA
|
|
205
205
|
});
|
|
206
|
-
} else if (t.type ===
|
|
206
|
+
} else if (t.type === a.BUTTON || t.type === a.SWIPE)
|
|
207
207
|
this.ctaLayer_ = new B({
|
|
208
208
|
...o,
|
|
209
|
-
type: t.type ===
|
|
209
|
+
type: t.type === a.BUTTON ? a.BUTTON : a.SWIPE
|
|
210
210
|
}), e.instance = this.ctaLayer_;
|
|
211
211
|
else if ((t.image_path || t.video_path || t.image_url) && t.studio_component_type) {
|
|
212
|
-
const i = (await import("./index-
|
|
212
|
+
const i = (await import("./index-CK94rHGE.js")).default;
|
|
213
213
|
e.instance = new i({
|
|
214
214
|
...o,
|
|
215
215
|
mediaHost: this.group_.media_host
|
|
216
216
|
});
|
|
217
|
-
} else if (t.type ===
|
|
218
|
-
const i = (await import("./index-
|
|
217
|
+
} else if (t.type === a.TEXT) {
|
|
218
|
+
const i = (await import("./index-kzHFY_c2.js")).default;
|
|
219
219
|
e.instance = new i({ ...o });
|
|
220
|
-
} else if (t.type ===
|
|
221
|
-
const i = (await import("./index-
|
|
220
|
+
} else if (t.type === a.PRODUCT_TAG) {
|
|
221
|
+
const i = (await import("./index-DESZKzJn.js")).default;
|
|
222
222
|
e.instance = new i({ ...o });
|
|
223
|
-
} else if (t.type ===
|
|
224
|
-
const i = (await import("./index-
|
|
223
|
+
} else if (t.type === a.PROMO_CODE) {
|
|
224
|
+
const i = (await import("./index-Cm8nu-Fn.js")).default;
|
|
225
225
|
e.instance = new i({ ...o });
|
|
226
|
-
} else if (t.type ===
|
|
227
|
-
const i = (await import("./index-
|
|
226
|
+
} else if (t.type === a.QUESTION) {
|
|
227
|
+
const i = (await import("./index-BR7E84Sw.js")).default;
|
|
228
228
|
e.instance = new i({
|
|
229
229
|
...o,
|
|
230
230
|
storiesContainer: this.storiesContainer_
|
|
231
231
|
});
|
|
232
|
-
} else if (t.type ===
|
|
233
|
-
const i = (await import("./index-
|
|
232
|
+
} else if (t.type === a.PRODUCT_CARD) {
|
|
233
|
+
const i = (await import("./index-3UIkgw48.js")).default;
|
|
234
234
|
e.instance = new i({ ...o });
|
|
235
|
-
} else if (t.type ===
|
|
236
|
-
const i = (await import("./index-
|
|
235
|
+
} else if (t.type === a.PRODUCT_CATALOG) {
|
|
236
|
+
const i = (await import("./index-BeMGryZf.js")).default;
|
|
237
237
|
e.instance = new i({ ...o });
|
|
238
|
-
} else if (t.type ===
|
|
239
|
-
const i = (await import("./index-
|
|
238
|
+
} else if (t.type === a.IMAGE_QUIZ) {
|
|
239
|
+
const i = (await import("./index-LP7wOE2o.js")).default;
|
|
240
240
|
e.instance = new i({ ...o });
|
|
241
241
|
}
|
|
242
242
|
(e.start_time || e.end_time) && (e.instance.hideLayer(), this.timedLayers_.push(e));
|
|
@@ -292,7 +292,7 @@ class Q {
|
|
|
292
292
|
);
|
|
293
293
|
this.playPauseAction_ = t.querySelector(
|
|
294
294
|
'button[data-type="play-pause"]'
|
|
295
|
-
), o && (h(o, "hidden"), u(o, this.handleCloseGroup_)), v() ? (
|
|
295
|
+
), o && (h(o, "hidden"), u(o, this.handleCloseGroup_)), v() ? (r(this.playPauseAction_, "hidden", !0), this.accessibilityAction_ = this.storiesContainer_.querySelector(
|
|
296
296
|
".accessibility-switch-button"
|
|
297
297
|
), this.accessibilityAction_ && (this.accessibilityAction_.addEventListener(
|
|
298
298
|
"pointerdown",
|
|
@@ -301,7 +301,7 @@ class Q {
|
|
|
301
301
|
accessibilityEnabled: !0
|
|
302
302
|
})) : (this.accessibilityAction_.setAttribute("data-pressed", "false"), n(this.storyDom_, "onAccessibilityTriggered", {
|
|
303
303
|
accessibilityEnabled: !1
|
|
304
|
-
})))) : (h(this.playPauseAction_, "hidden"), this.playPauseAction_.classList.replace("play", "pause"), u(this.playPauseAction_, this.playAndPauseStory)), this.videoAsset_ ? (h(s, "hidden"), u(s, this.handleSoundStory_), this.story_.alt_text && (h(i, "hidden"), u(i, this.handleTranscript_))) : (
|
|
304
|
+
})))) : (h(this.playPauseAction_, "hidden"), this.playPauseAction_.classList.replace("play", "pause"), u(this.playPauseAction_, this.playAndPauseStory)), this.videoAsset_ ? (h(s, "hidden"), u(s, this.handleSoundStory_), this.story_.alt_text && (h(i, "hidden"), u(i, this.handleTranscript_))) : (r(s, "hidden", !0), r(i, "hidden", !0)), this.storylyContext.getState().videoMuted === !1 && this.videoAsset_ ? (this.videoAsset_.muted = !1, this.soundOn_ = !0, s.classList.replace("sound-off", "sound-on")) : this.videoAsset_ && (this.videoAsset_.muted = !0, this.soundOn_ = !1, s.classList.replace("sound-on", "sound-off")), this.story_.is_sharable && (h(e, "hidden"), u(e, this.renderShareWidget));
|
|
305
305
|
}
|
|
306
306
|
/**
|
|
307
307
|
* @param {PointerEvent} e
|
|
@@ -381,14 +381,14 @@ class Q {
|
|
|
381
381
|
* @private
|
|
382
382
|
*/
|
|
383
383
|
exposeAccessibilityElements_() {
|
|
384
|
-
this.storyDom_.querySelectorAll(".cta-button").forEach((t) => {
|
|
385
|
-
|
|
384
|
+
r(this.storyDom_, "aria-hidden", "false"), this.storyDom_.querySelectorAll(".cta-button").forEach((t) => {
|
|
385
|
+
r(t, "tabindex", "21"), r(t, "aria-hidden", "false");
|
|
386
386
|
}), this.storyDom_.querySelectorAll(".swipe-up-button").forEach((t) => {
|
|
387
|
-
|
|
387
|
+
r(t, "tabindex", "21"), r(t, "aria-hidden", "false");
|
|
388
388
|
}), this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach((t) => {
|
|
389
|
-
|
|
389
|
+
r(t, "tabindex", "21"), r(t, "aria-hidden", "false");
|
|
390
390
|
}), this.storyDom_.querySelectorAll(".poll-component").forEach((t) => {
|
|
391
|
-
t.querySelectorAll("button").forEach((s) =>
|
|
391
|
+
t.querySelectorAll("button").forEach((s) => r(s, "tabindex", "22")), r(t, "tabindex", "22"), r(t, "aria-hidden", "false");
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
@@ -396,14 +396,14 @@ class Q {
|
|
|
396
396
|
* @private
|
|
397
397
|
*/
|
|
398
398
|
hideAccessibilityElements_() {
|
|
399
|
-
this.storyDom_.querySelectorAll(".cta-button").forEach((t) => {
|
|
400
|
-
h(t, "tabindex"),
|
|
399
|
+
r(this.storyDom_, "aria-hidden", "true"), this.storyDom_.querySelectorAll(".cta-button").forEach((t) => {
|
|
400
|
+
h(t, "tabindex"), r(t, "aria-hidden", "true");
|
|
401
401
|
}), this.storyDom_.querySelectorAll(".swipe-up-button").forEach((t) => {
|
|
402
|
-
h(t, "tabindex"),
|
|
402
|
+
h(t, "tabindex"), r(t, "aria-hidden", "true");
|
|
403
403
|
}), this.storyDom_.querySelectorAll(".product-tag-tooltip").forEach((t) => {
|
|
404
|
-
h(t, "tabindex"),
|
|
404
|
+
h(t, "tabindex"), r(t, "aria-hidden", "true");
|
|
405
405
|
}), this.storyDom_.querySelectorAll(".poll-component").forEach((t) => {
|
|
406
|
-
t.querySelectorAll("button").forEach((s) => h(s, "tabindex")), h(t, "tabindex"),
|
|
406
|
+
t.querySelectorAll("button").forEach((s) => h(s, "tabindex")), h(t, "tabindex"), r(t, "aria-hidden", "true");
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
@@ -470,7 +470,7 @@ class Q {
|
|
|
470
470
|
path: this.story_.media.thumbnail_url,
|
|
471
471
|
story: this.storyData_
|
|
472
472
|
});
|
|
473
|
-
|
|
473
|
+
r(this.storyDom_.querySelector("video"), "poster", t);
|
|
474
474
|
}
|
|
475
475
|
/**
|
|
476
476
|
* handle pause or play of active story
|
|
@@ -548,8 +548,8 @@ class Q {
|
|
|
548
548
|
this.group_.group_id,
|
|
549
549
|
this.story_.story_id,
|
|
550
550
|
this.storylyContext.getState().shareParams
|
|
551
|
-
), this.handleStoryActions_(), this.handleStoryTitleOnChange_(), this.progressPaused_ = !1, this.storyProgressRemain_ = this.storyProgressSecond_, this.progressTime_ = 0, m(this.progressDoms_[this.key_], "seen"), this.videoAsset_ ? this.onVideoShown_() : this.isBlankStory_ || this.imageAssetLoaded_ ? this.handleProgressBar_() : this.imageAsset_.style.paddingBottom = "0.5px", this.storylyContext.getState().accessibility && d(this.playPauseAction_, ["display", "none"]), this.exposeAccessibilityElements_(), _(this.progressDoms_[this.key_], "active"), _(this.storyDom_, "active"), setTimeout(() => {
|
|
552
|
-
this.storyDom_.focus();
|
|
551
|
+
), this.handleStoryActions_(), this.handleStoryTitleOnChange_(), this.progressPaused_ = !1, this.storyProgressRemain_ = this.storyProgressSecond_, this.progressTime_ = 0, m(this.progressDoms_[this.key_], "seen"), this.videoAsset_ ? this.onVideoShown_() : this.isBlankStory_ || this.imageAssetLoaded_ ? this.handleProgressBar_() : this.imageAsset_.style.paddingBottom = "0.5px", this.storylyContext.getState().accessibility && d(this.playPauseAction_, ["display", "none"]), this.exposeAccessibilityElements_(), _(this.progressDoms_[this.key_], "active"), _(this.storyDom_, "active"), clearTimeout(this.storyFocusTimeout_), this.storyFocusTimeout_ = setTimeout(() => {
|
|
552
|
+
this.storyFocusTimeout_ = null, this.storyDom_.getAttribute("aria-hidden") !== "true" && this.storyDom_.focus();
|
|
553
553
|
}, 500), this.sendStoryViewedEvent_(), n(this.storyDom_, "onShortcut", {
|
|
554
554
|
is_sharable: this.story_.is_sharable
|
|
555
555
|
});
|
|
@@ -562,7 +562,7 @@ class Q {
|
|
|
562
562
|
*/
|
|
563
563
|
hide({ isBack: t = !1, holdActive: s = !1 } = {}) {
|
|
564
564
|
var e;
|
|
565
|
-
if (this.storyDom_.removeAttribute("show"), this.storyDom_.hasAttribute("paused") && this.storyDom_.removeAttribute("paused"), this.hideAccessibilityElements_(), clearInterval(this.progressInterval_), clearInterval(this.startInterval_), this.progressInterval_ = null, this.startInterval_ = null, this.videoAsset_) {
|
|
565
|
+
if (this.storyDom_.removeAttribute("show"), this.storyDom_.hasAttribute("paused") && this.storyDom_.removeAttribute("paused"), this.hideAccessibilityElements_(), clearTimeout(this.storyFocusTimeout_), this.storyFocusTimeout_ = null, clearInterval(this.progressInterval_), clearInterval(this.startInterval_), this.progressInterval_ = null, this.startInterval_ = null, this.videoAsset_) {
|
|
566
566
|
if (this.videoAsset_.currentTime = 0, this.videoPlayedPromise_ ? this.videoPlayedPromise_.then(() => {
|
|
567
567
|
this.videoPausedPromise_ = this.videoAsset_.pause();
|
|
568
568
|
}) : this.videoPausedPromise_ = this.videoAsset_.pause(), this.hls_) {
|
|
@@ -663,5 +663,5 @@ class Q {
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
export {
|
|
666
|
-
|
|
666
|
+
H as B
|
|
667
667
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as h, b as u, u as d, P as _, Z as l, ae as y, E as n, af as c, A as p, Q as v } from "./index-
|
|
2
|
-
import { a as m, b } from "./index-
|
|
1
|
+
import { O as h, b as u, u as d, P as _, Z as l, ae as y, E as n, af as c, A as p, Q as v } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { a as m, b } from "./index-DvyjwDXR.js";
|
|
3
3
|
const g = (t) => {
|
|
4
4
|
const e = {
|
|
5
5
|
...t,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as qt, a as be, E as P, A as xe, O as K, x as M, r as Ce, i as ke, F as ot, Q as Kt, t as Se } from "./index-
|
|
2
|
-
import { e as Ae, n as $e } from "./ref-
|
|
1
|
+
import { S as qt, a as be, E as P, A as xe, O as K, x as M, r as Ce, i as ke, F as ot, Q as Kt, t as Se } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { e as Ae, n as $e } from "./ref-Dc9ZmyfB.js";
|
|
3
3
|
import { F as Me } from "./focal-point-impl-TAwl5dAO.js";
|
|
4
|
-
import { e as Gt } from "./rule-engine-
|
|
4
|
+
import { e as Gt } from "./rule-engine-CXGUQuxB.js";
|
|
5
5
|
const Ee = ".canvas-widget-root{position:relative}.canvas-widget,.canvas-widget-root{box-sizing:border-box;height:100%;width:100%}.canvas-widget{background-color:#000;background-color:var(--canvas-bg-color,#000);color:#fff;display:flex;flex-direction:column;overflow:hidden;padding:16px;padding:var(--canvas-v-padding,16px) var(--canvas-h-padding,16px)}.canvas-widget__header{align-items:center;display:flex;font-size:16px;font-size:var(--canvas-title-fs,16px);font-weight:600;justify-content:space-between;line-height:1.25;margin-bottom:16px;margin-bottom:var(--canvas-title-spacing,16px)}.canvas-widget__title{color:#fff;color:var(--canvas-title-color,#fff);font-family:inherit;font-family:var(--canvas-title-font,inherit);margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.canvas-widget__grid{display:grid;grid-auto-rows:120px;grid-auto-rows:var(--canvas-row-h,120px);grid-gap:12px;grid-gap:var(--canvas-spacing,12px);gap:12px;gap:var(--canvas-spacing,12px)}.canvas-widget__grid--4-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.canvas-widget__grid--6-grid,.canvas-widget__grid--7-grid{grid-auto-flow:dense;grid-template-columns:repeat(3,minmax(0,1fr))}.canvas-widget__tile{background-color:#1a1a1a;border:none;border-radius:0;cursor:pointer;height:100%;overflow:hidden;padding:0;position:relative;width:100%}.canvas-widget__tile img,.canvas-widget__tile video{border-radius:inherit;display:block;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;width:100%}.canvas-widget__tile--primary-large{grid-column:span 2;grid-row:span 2}.canvas-widget__tile--span2{grid-row:span 2}.canvas-widget__video-indicator{align-items:center;background-color:transparent;border:2px solid #fff;border-radius:999px;box-sizing:border-box;display:flex;height:28px;justify-content:center;left:10px;pointer-events:none;position:absolute;top:10px;width:28px;z-index:4}.canvas-widget__video-indicator-icon{border-color:transparent transparent transparent #fff;border-style:solid;border-width:6px 0 6px 10px;height:0;margin-left:0;width:0}.canvas-widget__footer{align-items:center;display:flex;margin-top:16px;margin-top:var(--canvas-button-spacing,16px)}.canvas-widget__button{background:transparent;border:none;color:#fff;color:var(--canvas-button-color,#fff);cursor:pointer;font-family:inherit;font-family:var(--canvas-button-font,inherit);font-size:14px;font-size:var(--canvas-button-fs,14px);font-weight:500;line-height:1.2;outline:none;padding:0;text-align:left;-webkit-text-decoration:underline;text-decoration:underline;width:100%}", jt = {
|
|
6
6
|
CanvasActionClicked: "CanvasActionClicked",
|
|
7
7
|
WidgetViewed: "WidgetViewed"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as E } from "./intersection-observer-impl-
|
|
2
|
-
import { K as P, O as $, S as w,
|
|
3
|
-
import { B as L } from "./BaseStory-
|
|
4
|
-
import { x as T, i as q, j as F, k as M, P as W } from "./story-group-animation-impl-
|
|
5
|
-
import { B as O } from "./index-
|
|
1
|
+
import { d as E } from "./intersection-observer-impl-DpA0W7tq.js";
|
|
2
|
+
import { K as P, O as $, S as w, a0 as k, o as g, s as v, h as b, m as u, q as A, Z as p, M as d, _ as G, A as S, f as x, C as y, U as m, P as C, b as B } from "./index-BbbSbOEE.js";
|
|
3
|
+
import { B as L } from "./BaseStory-BrdLeEg5.js";
|
|
4
|
+
import { x as T, i as q, j as F, k as M, P as W } from "./story-group-animation-impl-DXtY6578.js";
|
|
5
|
+
import { B as O } from "./index-DvyjwDXR.js";
|
|
6
6
|
import { F as R } from "./focal-point-impl-TAwl5dAO.js";
|
|
7
7
|
const j = ({ story: _, type: t, mediaHost: e, altText: s, storyBg: r } = { story: {} }) => {
|
|
8
8
|
const { sizing: o, position: a, thumbnail_url: i } = _, n = P({ host: e, story: _ });
|
|
@@ -19,7 +19,7 @@ const j = ({ story: _, type: t, mediaHost: e, altText: s, storyBg: r } = { story
|
|
|
19
19
|
style="background: ${r == null ? void 0 : r.bg_color};"
|
|
20
20
|
>
|
|
21
21
|
${`
|
|
22
|
-
<div class="story-bg"
|
|
22
|
+
<div class="story-bg" aria-hidden="true">
|
|
23
23
|
${t === "video" ? `
|
|
24
24
|
<video
|
|
25
25
|
muted
|
|
@@ -180,7 +180,7 @@ class H {
|
|
|
180
180
|
*/
|
|
181
181
|
async renderProductCart_() {
|
|
182
182
|
if (A(this.group_).length && this.storylyContext.getState().placementConfig.isStorylyCartActive) {
|
|
183
|
-
const e = await (await import("./index-
|
|
183
|
+
const e = await (await import("./index-BV1Cj9-Z.js")).default;
|
|
184
184
|
this.storylyCart = new e({
|
|
185
185
|
instanceId: this.instanceId_,
|
|
186
186
|
parentDom: this.groupWrapper_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as r, ah as f, S as h, O as c, u,
|
|
2
|
-
import { a as p, o as k } from "./index-
|
|
3
|
-
import { z as _, A as C, B as $ } from "./story-group-animation-impl-
|
|
1
|
+
import { F as r, ah as f, S as h, O as c, u, a0 as g, P as b, z as x, b as o, Z as n, M as l, ae as v } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { a as p, o as k } from "./index-DvyjwDXR.js";
|
|
3
|
+
import { z as _, A as C, B as $ } from "./story-group-animation-impl-DXtY6578.js";
|
|
4
4
|
const S = (t) => {
|
|
5
5
|
const i = {
|
|
6
6
|
w: 100,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as n, L as y, O as p, W as u, G as P, P as _, Z as h, M as c, _ as g, ae as m, ad as f, D as C, C as v } from "./index-
|
|
2
|
-
import { a as I, L as $ } from "./index-
|
|
3
|
-
import { s as b, q as S, v as M } from "./story-group-animation-impl-
|
|
1
|
+
import { S as n, L as y, O as p, W as u, G as P, P as _, Z as h, M as c, _ as g, ae as m, ad as f, D as C, C as v } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { a as I, L as $ } from "./index-DvyjwDXR.js";
|
|
3
|
+
import { s as b, q as S, v as M } from "./story-group-animation-impl-DXtY6578.js";
|
|
4
4
|
class x {
|
|
5
5
|
constructor({ dom: t }) {
|
|
6
6
|
this.countDom_ = t.querySelector(".storyly__story-product-cart-count span"), this.currNum_ = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ah as ge, O as be, u as Me, ai as D } from "./index-
|
|
2
|
-
import { a as we } from "./index-
|
|
1
|
+
import { ah as ge, O as be, u as Me, ai as D } from "./index-BbbSbOEE.js";
|
|
2
|
+
import { a as we } from "./index-DvyjwDXR.js";
|
|
3
3
|
var N = {};
|
|
4
4
|
(function p(i, h, v, M) {
|
|
5
5
|
var A = !!(i.Worker && i.Blob && i.Promise && i.OffscreenCanvas && i.OffscreenCanvasRenderingContext2D && i.HTMLCanvasElement && i.HTMLCanvasElement.prototype.transferControlToOffscreen && i.URL && i.URL.createObjectURL), P = typeof Path2D == "function" && typeof DOMMatrix == "function", L = function() {
|
|
@@ -2466,7 +2466,7 @@ function fe(e, t, o) {
|
|
|
2466
2466
|
throw new Error("Random bytes length must be >= 16");
|
|
2467
2467
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Rf(s);
|
|
2468
2468
|
}
|
|
2469
|
-
const Ff = "1.
|
|
2469
|
+
const Ff = "1.14.1", Wf = {
|
|
2470
2470
|
version: Ff
|
|
2471
2471
|
};
|
|
2472
2472
|
class X {
|
|
@@ -2658,8 +2658,9 @@ let Mt = class extends lt {
|
|
|
2658
2658
|
placementConfig: this.placementConfig,
|
|
2659
2659
|
languageJSON: {},
|
|
2660
2660
|
shareParams: {},
|
|
2661
|
-
ApiClient: f
|
|
2662
|
-
|
|
2661
|
+
ApiClient: f,
|
|
2662
|
+
eventCallbacks: this.pendingEventCallbacks || {}
|
|
2663
|
+
}), this.pendingEventCallbacks = void 0, L.setItemToGlobal("Storyly_userConfig", this.placementConfig), o && Object.getPrototypeOf(o).constructor.name === "Object" ? a.userProperties = o : this.setPropsByParams(), this.uuid = L.setInstanceId(this.instanceId).getItemFromInstance(
|
|
2663
2664
|
"Storyly_uuid",
|
|
2664
2665
|
!1
|
|
2665
2666
|
) || L.setInstanceId(this.instanceId).setItemToInstance(
|
|
@@ -2779,18 +2780,21 @@ let Mt = class extends lt {
|
|
|
2779
2780
|
async handleRecipe(e) {
|
|
2780
2781
|
this.storylyContext.setState({
|
|
2781
2782
|
rules: e.rules || []
|
|
2782
|
-
}), this.activeWidget = e.widgets.find((
|
|
2783
|
+
}), this.activeWidget = e.widgets.find((s) => s.w_id === e.initial_w) || e.widgets[0];
|
|
2783
2784
|
const t = e.widgets.filter(
|
|
2784
|
-
(
|
|
2785
|
+
(s) => s.w_id !== e.initial_w
|
|
2785
2786
|
);
|
|
2786
|
-
this.activeWidget && await this.handleWidgets(this.activeWidget)
|
|
2787
|
+
this.activeWidget && await this.handleWidgets(this.activeWidget);
|
|
2788
|
+
const o = Promise.all(
|
|
2787
2789
|
t.map(
|
|
2788
|
-
(
|
|
2789
|
-
...
|
|
2790
|
+
(s) => this.handleWidgets({
|
|
2791
|
+
...s,
|
|
2790
2792
|
recipeWidget: !0
|
|
2791
2793
|
})
|
|
2792
2794
|
)
|
|
2793
|
-
)
|
|
2795
|
+
).then(() => this.updateComplete.then(() => {
|
|
2796
|
+
}));
|
|
2797
|
+
this.storylyContext.setState({ recipeWidgetsReady: o });
|
|
2794
2798
|
}
|
|
2795
2799
|
hasStoryGroups(e) {
|
|
2796
2800
|
const t = e.w_content;
|
|
@@ -2800,7 +2804,7 @@ let Mt = class extends lt {
|
|
|
2800
2804
|
if (e.w_type === M.STORIES) {
|
|
2801
2805
|
if (!e.recipeWidget && !this.hasStoryGroups(e)) return;
|
|
2802
2806
|
try {
|
|
2803
|
-
const t = await import("./index-
|
|
2807
|
+
const t = await import("./index-nmddYDgq.js");
|
|
2804
2808
|
new t.StoriesWidget(), this.widgetData = [...this.widgetData, e];
|
|
2805
2809
|
} catch (t) {
|
|
2806
2810
|
const o = {
|
|
@@ -2820,7 +2824,7 @@ let Mt = class extends lt {
|
|
|
2820
2824
|
} else if (e.w_type === M.VIDEO_FEED) {
|
|
2821
2825
|
if (!e.recipeWidget && !this.hasStoryGroups(e)) return;
|
|
2822
2826
|
try {
|
|
2823
|
-
const t = await import("./index-
|
|
2827
|
+
const t = await import("./index-Dme41DS7.js");
|
|
2824
2828
|
new t.VideoFeedWidget(), this.widgetData = [...this.widgetData, e];
|
|
2825
2829
|
} catch (t) {
|
|
2826
2830
|
const o = {
|
|
@@ -2839,19 +2843,19 @@ let Mt = class extends lt {
|
|
|
2839
2843
|
}
|
|
2840
2844
|
} else if (e.w_type === M.BANNER)
|
|
2841
2845
|
try {
|
|
2842
|
-
const t = await import("./index-
|
|
2846
|
+
const t = await import("./index-CLPzv5ei.js");
|
|
2843
2847
|
new t.BannerWidget(), this.widgetData = [...this.widgetData, e];
|
|
2844
2848
|
} catch {
|
|
2845
2849
|
}
|
|
2846
2850
|
else if (e.w_type === M.SWIPE_CARD)
|
|
2847
2851
|
try {
|
|
2848
|
-
const t = await import("./index-
|
|
2852
|
+
const t = await import("./index-PcXaZXvJ.js");
|
|
2849
2853
|
new t.SwipeCardWidget(), this.widgetData = [...this.widgetData, e];
|
|
2850
2854
|
} catch {
|
|
2851
2855
|
}
|
|
2852
2856
|
else if (e.w_type === M.CANVAS)
|
|
2853
2857
|
try {
|
|
2854
|
-
const t = await import("./index-
|
|
2858
|
+
const t = await import("./index-B5quCK2e.js");
|
|
2855
2859
|
new t.CanvasWidget(), this.widgetData = [...this.widgetData, e];
|
|
2856
2860
|
} catch {
|
|
2857
2861
|
}
|
|
@@ -2946,6 +2950,13 @@ let Mt = class extends lt {
|
|
|
2946
2950
|
* ```
|
|
2947
2951
|
*/
|
|
2948
2952
|
async on(e, t) {
|
|
2953
|
+
if (!this.storylyContext) {
|
|
2954
|
+
this.pendingEventCallbacks = {
|
|
2955
|
+
...this.pendingEventCallbacks,
|
|
2956
|
+
[e]: t
|
|
2957
|
+
};
|
|
2958
|
+
return;
|
|
2959
|
+
}
|
|
2949
2960
|
await this.initPromise, this.storylyContext.setState({
|
|
2950
2961
|
eventCallbacks: {
|
|
2951
2962
|
...this.storylyContext.getState().eventCallbacks,
|
|
@@ -3006,7 +3017,7 @@ Mt = we([
|
|
|
3006
3017
|
Ze("storyly-placement")
|
|
3007
3018
|
], Mt);
|
|
3008
3019
|
export {
|
|
3009
|
-
|
|
3020
|
+
Xl as $,
|
|
3010
3021
|
St as A,
|
|
3011
3022
|
Kl as B,
|
|
3012
3023
|
D0 as C,
|
|
@@ -3035,10 +3046,10 @@ export {
|
|
|
3035
3046
|
a0 as Z,
|
|
3036
3047
|
_0 as _,
|
|
3037
3048
|
lt as a,
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3049
|
+
Nt as a0,
|
|
3050
|
+
m0 as a1,
|
|
3051
|
+
b0 as a2,
|
|
3052
|
+
n0 as a3,
|
|
3042
3053
|
g0 as a4,
|
|
3043
3054
|
R0 as a5,
|
|
3044
3055
|
w0 as a6,
|
|
@@ -3063,11 +3074,11 @@ export {
|
|
|
3063
3074
|
Ef as e,
|
|
3064
3075
|
Yl as f,
|
|
3065
3076
|
E0 as g,
|
|
3066
|
-
|
|
3077
|
+
Vl as h,
|
|
3067
3078
|
Re as i,
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3079
|
+
jl as j,
|
|
3080
|
+
L0 as k,
|
|
3081
|
+
Jl as l,
|
|
3071
3082
|
Eo as m,
|
|
3072
3083
|
U0 as n,
|
|
3073
3084
|
L as o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as L, b as x, w as $ } from "./index-
|
|
2
|
-
import { W as h, F as p, O as E, S as d, u as A, b as C, s as u, Z as f, L as m, M as b, ak as P, ae as D, E as y, af as v, A as S, Q as T, n as w } from "./index-
|
|
1
|
+
import { a as L, b as x, w as $ } from "./index-DvyjwDXR.js";
|
|
2
|
+
import { W as h, F as p, O as E, S as d, u as A, b as C, s as u, Z as f, L as m, M as b, ak as P, ae as D, E as y, af as v, A as S, Q as T, n as w } from "./index-BbbSbOEE.js";
|
|
3
3
|
const g = {
|
|
4
4
|
heart: (t) => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="${t ?? "none"}"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.8931 3.07333C13.2054 2.38532 12.2725 1.99878 11.2998 1.99878C10.327 1.99878 9.3941 2.38532 8.70642 3.07333L7.99975 3.78L7.29309 3.07333C5.86083 1.64107 3.53868 1.64107 2.10642 3.07333C0.674162 4.50559 0.674162 6.82774 2.10642 8.26L2.81309 8.96666L7.99975 14.1533L13.1864 8.96666L13.8931 8.26C14.5811 7.57231 14.9676 6.63942 14.9676 5.66666C14.9676 4.6939 14.5811 3.76101 13.8931 3.07333Z" stroke="#242450" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
|
|
5
5
|
bookmark: (t) => `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="${t ?? "none"}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.6668 14L8.00016 10.6667L3.3335 14V3.33333C3.3335 2.59695 3.93045 2 4.66683 2H11.3335C12.0699 2 12.6668 2.59695 12.6668 3.33333V14Z" stroke="#242450" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
|