tabexseriescomponents 0.2.1279 → 0.2.1280
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/index.cjs.js +250 -0
- package/dist/index.esm.js +250 -0
- package/dist/index.umd.js +250 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -74633,6 +74633,255 @@ var MapsSection = function MapsSection(props) {
|
|
|
74633
74633
|
}))));
|
|
74634
74634
|
};
|
|
74635
74635
|
|
|
74636
|
+
// import { FetchingContext } from '../../Contexts/FetchingContext';
|
|
74637
|
+
// import { FetchingContext } from '../../../FetchingContext/FetchingContext';
|
|
74638
|
+
|
|
74639
|
+
var colorTheme = {
|
|
74640
|
+
wheelSegments: ['#ff8a5b', '#f7b801', '#58c4dd', '#7dd87d', '#6c63ff', '#ff5d8f', '#00b894', '#3d405b'],
|
|
74641
|
+
pageGlowStart: '#fff4df',
|
|
74642
|
+
pageGlowMiddle: '#ffe3ec',
|
|
74643
|
+
pageGlowEnd: '#ffffff',
|
|
74644
|
+
floatingButtonStart: '#ffd166',
|
|
74645
|
+
floatingButtonMiddle: '#ff9f1c',
|
|
74646
|
+
floatingButtonEnd: '#ff4d6d',
|
|
74647
|
+
floatingButtonShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74648
|
+
floatingButtonShadowHover: 'rgba(35, 25, 66, 0.28)',
|
|
74649
|
+
floatingButtonRing: 'rgba(255, 255, 255, 0.22)',
|
|
74650
|
+
floatingButtonRingHover: 'rgba(255, 255, 255, 0.28)',
|
|
74651
|
+
floatingButtonDash: 'rgba(255, 255, 255, 0.52)',
|
|
74652
|
+
floatingButtonLabel: '#231942',
|
|
74653
|
+
overlay: 'rgba(24, 18, 43, 0.64)',
|
|
74654
|
+
cardBackground: 'rgba(255, 255, 255, 0.88)',
|
|
74655
|
+
cardShadow: 'rgba(41, 24, 66, 0.16)',
|
|
74656
|
+
closeButtonBackground: '#f4ecff',
|
|
74657
|
+
closeButtonText: '#231942',
|
|
74658
|
+
eyebrowBackground: '#fff3c4',
|
|
74659
|
+
eyebrowText: '#9a6400',
|
|
74660
|
+
headingText: '#231942',
|
|
74661
|
+
bodyText: '#5e548e',
|
|
74662
|
+
pointer: '#ff4d6d',
|
|
74663
|
+
pointerShadow: 'rgba(255, 77, 109, 0.28)',
|
|
74664
|
+
wheelBorder: '#ffffff',
|
|
74665
|
+
wheelOuterShadow: 'rgba(35, 25, 66, 0.18)',
|
|
74666
|
+
wheelInnerRing: 'rgba(255, 255, 255, 0.2)',
|
|
74667
|
+
wheelDash: 'rgba(255, 255, 255, 0.55)',
|
|
74668
|
+
wheelLabelText: '#ffffff',
|
|
74669
|
+
wheelLabelShadow: 'rgba(0, 0, 0, 0.25)',
|
|
74670
|
+
wheelCenterStart: '#231942',
|
|
74671
|
+
wheelCenterEnd: '#5e548e',
|
|
74672
|
+
wheelCenterShadow: 'rgba(35, 25, 66, 0.28)',
|
|
74673
|
+
primaryButtonStart: '#ff4d6d',
|
|
74674
|
+
primaryButtonEnd: '#ff9f1c',
|
|
74675
|
+
primaryButtonShadow: 'rgba(255, 77, 109, 0.24)',
|
|
74676
|
+
primaryButtonShadowHover: 'rgba(255, 77, 109, 0.3)',
|
|
74677
|
+
resultBoxBackground: '#fff7fb',
|
|
74678
|
+
resultBoxBorder: '#ffd6e0',
|
|
74679
|
+
celebrationTop: 'rgba(255, 255, 255, 0.95)',
|
|
74680
|
+
celebrationBottom: 'rgba(255, 240, 229, 0.96)',
|
|
74681
|
+
celebrationAccentStart: '#fff4df',
|
|
74682
|
+
celebrationAccentEnd: '#ffe0f0',
|
|
74683
|
+
celebrationBorder: '#ffd4a8',
|
|
74684
|
+
successBadgeStart: '#ff9f1c',
|
|
74685
|
+
successBadgeEnd: '#ff4d6d',
|
|
74686
|
+
successBadgeText: '#ffffff',
|
|
74687
|
+
successBadgeShadow: 'rgba(255, 77, 109, 0.2)',
|
|
74688
|
+
prizeHighlightStart: '#231942',
|
|
74689
|
+
prizeHighlightEnd: '#5e548e',
|
|
74690
|
+
prizeHighlightText: '#ffffff',
|
|
74691
|
+
prizeHighlightShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74692
|
+
confettiOne: '#ff4d6d',
|
|
74693
|
+
confettiTwo: '#f7b801',
|
|
74694
|
+
confettiThree: '#58c4dd',
|
|
74695
|
+
confettiFour: '#7dd87d'
|
|
74696
|
+
};
|
|
74697
|
+
|
|
74698
|
+
// const gifts = [
|
|
74699
|
+
// { label: '10% OFF', color: colorTheme.wheelSegments[0] },
|
|
74700
|
+
// { label: 'Free Shipping', color: colorTheme.wheelSegments[1] },
|
|
74701
|
+
// { label: '15% OFF', color: colorTheme.wheelSegments[2] },
|
|
74702
|
+
// { label: 'Buy 1 Get 1', color: colorTheme.wheelSegments[3] },
|
|
74703
|
+
// { label: '20% OFF', color: colorTheme.wheelSegments[4] },
|
|
74704
|
+
// { label: 'Free Gift Box', color: colorTheme.wheelSegments[5] },
|
|
74705
|
+
// { label: '$5 Coupon', color: colorTheme.wheelSegments[6] },
|
|
74706
|
+
// { label: 'Try Again', color: colorTheme.wheelSegments[7] },
|
|
74707
|
+
// ];
|
|
74708
|
+
|
|
74709
|
+
var WheelSpin = function WheelSpin(props) {
|
|
74710
|
+
var GeneralAPIMutationContext = props.actions.GeneralAPIMutationContext;
|
|
74711
|
+
var ApplyPromoCodeMutationContext = props.actions.ApplyPromoCodeMutationContext;
|
|
74712
|
+
var _useState = React.useState(false),
|
|
74713
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
74714
|
+
isOpen = _useState2[0],
|
|
74715
|
+
setIsOpen = _useState2[1];
|
|
74716
|
+
var _useState3 = React.useState(0),
|
|
74717
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
74718
|
+
rotation = _useState4[0],
|
|
74719
|
+
setRotation = _useState4[1];
|
|
74720
|
+
var _useState5 = React.useState(null),
|
|
74721
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
74722
|
+
selectedGift = _useState6[0],
|
|
74723
|
+
setSelectedGift = _useState6[1];
|
|
74724
|
+
var _useState7 = React.useState(false),
|
|
74725
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
74726
|
+
isSpinning = _useState8[0],
|
|
74727
|
+
setIsSpinning = _useState8[1];
|
|
74728
|
+
var _useState9 = React.useState(false),
|
|
74729
|
+
_useState0 = _slicedToArray__default["default"](_useState9, 2),
|
|
74730
|
+
showCelebration = _useState0[0],
|
|
74731
|
+
setShowCelebration = _useState0[1];
|
|
74732
|
+
var _useState1 = React.useState([]),
|
|
74733
|
+
_useState10 = _slicedToArray__default["default"](_useState1, 2),
|
|
74734
|
+
gifts = _useState10[0],
|
|
74735
|
+
setgifts = _useState10[1];
|
|
74736
|
+
var segmentAngle = 360 / gifts.length;
|
|
74737
|
+
var wheelBackground = "conic-gradient(".concat(gifts.map(function (gift, index) {
|
|
74738
|
+
var start = index * segmentAngle;
|
|
74739
|
+
var end = start + segmentAngle;
|
|
74740
|
+
return "".concat(gift.spinner_color, " ").concat(start, "deg ").concat(end, "deg");
|
|
74741
|
+
}).join(', '), ")");
|
|
74742
|
+
var handleSpin = function handleSpin() {
|
|
74743
|
+
if (isSpinning) {
|
|
74744
|
+
return;
|
|
74745
|
+
}
|
|
74746
|
+
var randomIndex = Math.floor(Math.random() * gifts.length);
|
|
74747
|
+
var extraTurns = 360 * (5 + Math.floor(Math.random() * 3));
|
|
74748
|
+
var landingAngle = randomIndex * segmentAngle + segmentAngle / 2;
|
|
74749
|
+
var targetRotation = extraTurns + (360 - landingAngle);
|
|
74750
|
+
setIsSpinning(true);
|
|
74751
|
+
setSelectedGift(null);
|
|
74752
|
+
setShowCelebration(false);
|
|
74753
|
+
setRotation(function (previousRotation) {
|
|
74754
|
+
return previousRotation + targetRotation;
|
|
74755
|
+
});
|
|
74756
|
+
window.setTimeout(function () {
|
|
74757
|
+
var chosen_gift = gifts[randomIndex];
|
|
74758
|
+
if (chosen_gift.copounid == 'tryagain') {
|
|
74759
|
+
setIsOpen(false);
|
|
74760
|
+
} else {
|
|
74761
|
+
setSelectedGift(chosen_gift);
|
|
74762
|
+
setIsSpinning(false);
|
|
74763
|
+
setShowCelebration(true);
|
|
74764
|
+
ApplyPromoCodeMutationContext.mutate({
|
|
74765
|
+
couponname: chosen_gift.couponname,
|
|
74766
|
+
functype: 'add'
|
|
74767
|
+
});
|
|
74768
|
+
}
|
|
74769
|
+
}, 5200);
|
|
74770
|
+
};
|
|
74771
|
+
var handleClose = function handleClose() {
|
|
74772
|
+
if (isSpinning) {
|
|
74773
|
+
return;
|
|
74774
|
+
}
|
|
74775
|
+
setIsOpen(false);
|
|
74776
|
+
};
|
|
74777
|
+
var fetchGifts_Api = function fetchGifts_Api() {
|
|
74778
|
+
GeneralAPIMutationContext.mutate({
|
|
74779
|
+
endpointurl: '/fetch_coupons_spinner',
|
|
74780
|
+
// productid: productid,
|
|
74781
|
+
// reviewpayloadobj: reviewpayloadobj,
|
|
74782
|
+
mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
|
|
74783
|
+
if (data.data.status) {
|
|
74784
|
+
var gifts_array_temp = data.data.data;
|
|
74785
|
+
gifts_array_temp.push({
|
|
74786
|
+
copounid: 'tryagain',
|
|
74787
|
+
spinner_color: 'black',
|
|
74788
|
+
description_en: 'Better luck next time'
|
|
74789
|
+
});
|
|
74790
|
+
setgifts(gifts_array_temp);
|
|
74791
|
+
// var data_gifts = data.data.data
|
|
74792
|
+
|
|
74793
|
+
// alert(JSON.stringify(data.data));
|
|
74794
|
+
// NotificationManager.success('', 'Success');
|
|
74795
|
+
// addreviewcallback();
|
|
74796
|
+
// window.location.reload();
|
|
74797
|
+
} else {
|
|
74798
|
+
NotificationManager.warning('', data.data.reason);
|
|
74799
|
+
}
|
|
74800
|
+
}
|
|
74801
|
+
});
|
|
74802
|
+
};
|
|
74803
|
+
var handleOpen = function handleOpen() {
|
|
74804
|
+
fetchGifts_Api();
|
|
74805
|
+
setSelectedGift(null);
|
|
74806
|
+
setRotation(0);
|
|
74807
|
+
setIsSpinning(false);
|
|
74808
|
+
setShowCelebration(false);
|
|
74809
|
+
setIsOpen(true);
|
|
74810
|
+
};
|
|
74811
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74812
|
+
className: "wheel-spin-section"
|
|
74813
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74814
|
+
className: "open-popup-button",
|
|
74815
|
+
onClick: handleOpen,
|
|
74816
|
+
type: "button",
|
|
74817
|
+
"aria-label": "Open lucky wheel"
|
|
74818
|
+
}, "Spin"), isOpen ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74819
|
+
className: "popup-overlay",
|
|
74820
|
+
onClick: handleClose
|
|
74821
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74822
|
+
className: "content-card",
|
|
74823
|
+
onClick: function onClick(event) {
|
|
74824
|
+
return event.stopPropagation();
|
|
74825
|
+
}
|
|
74826
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74827
|
+
className: "close-button",
|
|
74828
|
+
onClick: handleClose,
|
|
74829
|
+
disabled: isSpinning,
|
|
74830
|
+
type: "button"
|
|
74831
|
+
}, "\xD7"), !showCelebration ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("h2", null, "Spin the wheel and unlock your surprise gift"), /*#__PURE__*/React__default["default"].createElement("p", null, "Tap the button, watch the wheel rotate, and get a random reward."), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74832
|
+
className: "wheel-stage"
|
|
74833
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74834
|
+
className: "pointer"
|
|
74835
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74836
|
+
className: "wheel",
|
|
74837
|
+
style: {
|
|
74838
|
+
transform: "rotate(".concat(rotation, "deg)"),
|
|
74839
|
+
background: wheelBackground
|
|
74840
|
+
}
|
|
74841
|
+
}, gifts.map(function (gift, index) {
|
|
74842
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74843
|
+
className: "label",
|
|
74844
|
+
key: gift.description_en,
|
|
74845
|
+
style: {
|
|
74846
|
+
transform: "rotate(".concat(index * segmentAngle + segmentAngle / 2, "deg)")
|
|
74847
|
+
}
|
|
74848
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
74849
|
+
style: {
|
|
74850
|
+
transform: 'translateX(-50%)'
|
|
74851
|
+
}
|
|
74852
|
+
}, gift.description_en));
|
|
74853
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74854
|
+
className: "wheel-center"
|
|
74855
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, "WIN")))), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74856
|
+
className: "spin-button",
|
|
74857
|
+
onClick: handleSpin,
|
|
74858
|
+
disabled: isSpinning,
|
|
74859
|
+
type: "button"
|
|
74860
|
+
}, isSpinning ? 'Spinning...' : 'Spin Now')) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74861
|
+
className: "celebration-card"
|
|
74862
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74863
|
+
className: "confetti confetti-one"
|
|
74864
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74865
|
+
className: "confetti confetti-two"
|
|
74866
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74867
|
+
className: "confetti confetti-three"
|
|
74868
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74869
|
+
className: "confetti confetti-four"
|
|
74870
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74871
|
+
className: "success-badge"
|
|
74872
|
+
}, "Congratulations"), /*#__PURE__*/React__default["default"].createElement("h2", null, "You unlocked a special reward"), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
74873
|
+
className: "celebration-copy"
|
|
74874
|
+
}, "Your lucky spin landed on", /*#__PURE__*/React__default["default"].createElement("strong", null, " ", selectedGift.description_en)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74875
|
+
className: "prize-highlight"
|
|
74876
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, selectedGift.description_en)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74877
|
+
className: "claim-button",
|
|
74878
|
+
onClick: handleClose,
|
|
74879
|
+
type: "button"
|
|
74880
|
+
}, "Awesome")))) : null, /*#__PURE__*/React__default["default"].createElement("style", {
|
|
74881
|
+
jsx: true
|
|
74882
|
+
}, "\n .wheel-spin-section {\n position: relative;\n min-height: 0;\n padding: 0;\n background: none;\n }\n\n .open-popup-button {\n position: fixed;\n right: 18px;\n bottom: 24px;\n z-index: 9998;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 84px;\n height: 84px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: radial-gradient(circle at 30% 30%, ".concat(colorTheme.floatingButtonStart, " 0%, ").concat(colorTheme.floatingButtonMiddle, " 34%, ").concat(colorTheme.floatingButtonEnd, " 100%);\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 16px;\n font-weight: 800;\n cursor: pointer;\n box-shadow:\n 0 18px 30px ").concat(colorTheme.floatingButtonShadow, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRing, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .open-popup-button:hover {\n transform: scale(1.04);\n box-shadow:\n 0 22px 36px ").concat(colorTheme.floatingButtonShadowHover, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRingHover, ";\n }\n\n .open-popup-button::before {\n content: '';\n position: absolute;\n inset: 8px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.floatingButtonDash, ";\n }\n\n .open-popup-button::after {\n content: '';\n position: absolute;\n bottom: -28px;\n left: 50%;\n color: ").concat(colorTheme.floatingButtonLabel, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.04em;\n white-space: nowrap;\n transform: translateX(-50%);\n }\n\n .popup-overlay {\n position: fixed;\n inset: 0;\n z-index: 9999;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background: ").concat(colorTheme.overlay, ";\n backdrop-filter: blur(8px);\n }\n\n .content-card {\n position: relative;\n width: 100%;\n max-width: 560px;\n padding: 20px 20px 18px;\n border-radius: 28px;\n background: ").concat(colorTheme.cardBackground, ";\n box-shadow: 0 24px 80px ").concat(colorTheme.cardShadow, ";\n text-align: center;\n backdrop-filter: blur(12px);\n animation: popup-enter 0.3s ease;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 16px;\n width: 42px;\n height: 42px;\n border: none;\n border-radius: 50%;\n background: ").concat(colorTheme.closeButtonBackground, ";\n color: ").concat(colorTheme.closeButtonText, ";\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n }\n\n .close-button:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .eyebrow {\n display: inline-block;\n margin-bottom: 8px;\n padding: 6px 12px;\n border-radius: 999px;\n background: ").concat(colorTheme.eyebrowBackground, ";\n color: ").concat(colorTheme.eyebrowText, ";\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n }\n\n h2 {\n margin: 0;\n color: ").concat(colorTheme.headingText, ";\n font-size: clamp(22px, 4vw, 34px);\n line-height: 1.08;\n }\n\n p {\n margin: 8px auto 0;\n max-width: 420px;\n color: ").concat(colorTheme.bodyText, ";\n font-size: 14px;\n line-height: 1.45;\n }\n\n .wheel-stage {\n position: relative;\n display: flex;\n justify-content: center;\n margin: 18px 0 14px;\n }\n\n .pointer {\n position: absolute;\n top: -10px;\n left: 50%;\n z-index: 3;\n width: 0;\n height: 0;\n border-left: 18px solid transparent;\n border-right: 18px solid transparent;\n border-top: 34px solid ").concat(colorTheme.pointer, ";\n transform: translateX(-50%);\n filter: drop-shadow(0 10px 14px ").concat(colorTheme.pointerShadow, ");\n }\n\n .wheel {\n position: relative;\n width: min(78vw, 400px, 52vh);\n height: min(78vw, 400px, 52vh);\n border: 10px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n box-shadow:\n 0 18px 42px ").concat(colorTheme.wheelOuterShadow, ",\n inset 0 0 0 10px ").concat(colorTheme.wheelInnerRing, ";\n transition: transform 4.8s cubic-bezier(0.18, 0.89, 0.32, 1.08);\n overflow: hidden;\n }\n\n .wheel::after {\n content: '';\n position: absolute;\n inset: 18px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.wheelDash, ";\n }\n\n .label {\n position: absolute;\n inset: 0;\n transform-origin: center;\n }\n\n .label span {\n position: absolute;\n top: 16px;\n left: 50%;\n width: 132px;\n padding: 0 6px;\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.03em;\n text-align: center;\n text-shadow: 0 2px 10px ").concat(colorTheme.wheelLabelShadow, ";\n white-space: nowrap;\n }\n\n .wheel-center {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 2;\n display: grid;\n place-items: center;\n width: 88px;\n height: 88px;\n border: 7px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n background: linear-gradient(135deg, ").concat(colorTheme.wheelCenterStart, ", ").concat(colorTheme.wheelCenterEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 22px;\n font-weight: 800;\n transform: translate(-50%, -50%);\n box-shadow: 0 14px 26px ").concat(colorTheme.wheelCenterShadow, ";\n }\n\n .spin-button {\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease,\n opacity 0.2s ease;\n }\n\n .spin-button:hover {\n transform: translateY(-2px);\n box-shadow: 0 20px 34px ").concat(colorTheme.primaryButtonShadowHover, ";\n }\n\n .spin-button:disabled {\n cursor: not-allowed;\n opacity: 0.7;\n transform: none;\n }\n\n .result-box {\n margin-top: 12px;\n padding: 12px 14px;\n border-radius: 16px;\n background: ").concat(colorTheme.resultBoxBackground, ";\n border: 1px solid ").concat(colorTheme.resultBoxBorder, ";\n }\n\n .result-box p {\n margin: 0;\n }\n\n .celebration-card {\n position: relative;\n overflow: hidden;\n margin-top: 10px;\n padding: 22px 18px 18px;\n border-radius: 24px;\n background:\n radial-gradient(circle at top, ").concat(colorTheme.celebrationTop, ", ").concat(colorTheme.celebrationBottom, "),\n linear-gradient(135deg, ").concat(colorTheme.celebrationAccentStart, ", ").concat(colorTheme.celebrationAccentEnd, ");\n border: 1px solid ").concat(colorTheme.celebrationBorder, ";\n }\n\n .success-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 10px;\n padding: 8px 14px;\n border-radius: 999px;\n background: linear-gradient(135deg, ").concat(colorTheme.successBadgeStart, ", ").concat(colorTheme.successBadgeEnd, ");\n color: ").concat(colorTheme.successBadgeText, ";\n font-size: 12px;\n font-weight: 800;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n box-shadow: 0 14px 24px ").concat(colorTheme.successBadgeShadow, ";\n }\n\n .celebration-copy {\n max-width: 420px;\n }\n\n .prize-highlight {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 220px;\n margin-top: 14px;\n padding: 16px 20px;\n border-radius: 20px;\n background: linear-gradient(135deg, ").concat(colorTheme.prizeHighlightStart, ", ").concat(colorTheme.prizeHighlightEnd, ");\n color: ").concat(colorTheme.prizeHighlightText, ";\n box-shadow: 0 24px 40px ").concat(colorTheme.prizeHighlightShadow, ";\n }\n\n .prize-highlight span {\n font-size: 22px;\n font-weight: 800;\n letter-spacing: 0.02em;\n }\n\n .claim-button {\n margin-top: 16px;\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n }\n\n .claim-button:hover {\n transform: translateY(-2px);\n }\n\n .confetti {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n opacity: 0.9;\n animation: float-confetti 2.8s ease-in-out infinite;\n }\n\n .confetti-one {\n top: 18px;\n left: 18px;\n background: ").concat(colorTheme.confettiOne, ";\n transform: rotate(12deg);\n }\n\n .confetti-two {\n top: 28px;\n right: 40px;\n background: ").concat(colorTheme.confettiTwo, ";\n animation-delay: 0.25s;\n transform: rotate(24deg);\n }\n\n .confetti-three {\n bottom: 34px;\n left: 46px;\n background: ").concat(colorTheme.confettiThree, ";\n animation-delay: 0.45s;\n transform: rotate(42deg);\n }\n\n .confetti-four {\n right: 22px;\n bottom: 44px;\n background: ").concat(colorTheme.confettiFour, ";\n animation-delay: 0.65s;\n transform: rotate(18deg);\n }\n\n @media (max-width: 640px) {\n .open-popup-button {\n right: 12px;\n width: 72px;\n height: 72px;\n font-size: 14px;\n }\n\n .open-popup-button::after {\n bottom: -24px;\n font-size: 10px;\n }\n\n .content-card {\n max-width: 92vw;\n padding: 48px 14px 16px;\n border-radius: 24px;\n }\n\n .label span {\n top: 14px;\n width: 100px;\n font-size: 9px;\n }\n\n .wheel-center {\n width: 74px;\n height: 74px;\n font-size: 18px;\n }\n\n .wheel {\n width: min(82vw, 330px, 44vh);\n height: min(82vw, 330px, 44vh);\n }\n\n .prize-highlight {\n min-width: 100%;\n }\n\n .prize-highlight span {\n font-size: 20px;\n }\n }\n\n @keyframes popup-enter {\n from {\n opacity: 0;\n transform: translateY(18px) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @keyframes float-confetti {\n 0%,\n 100% {\n transform: translateY(0) rotate(0deg);\n }\n\n 50% {\n transform: translateY(-12px) rotate(18deg);\n }\n }\n ")));
|
|
74883
|
+
};
|
|
74884
|
+
|
|
74636
74885
|
var css_248z$j = ".Freetext-module_background__oUp-J {\r\n background-size: cover !important;\r\n background-position: center !important;\r\n background-attachment: fixed !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: cover !important;\r\n -moz-background-size: cover !important;\r\n}\r\n@media (max-width: 800px) {\r\n .Freetext-module_background__oUp-J {\r\n background-size: contain !important;\r\n background-position: center !important;\r\n background-attachment: initial !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: contain !important;\r\n -moz-background-size: contain !important;\r\n }\r\n}\r\n";
|
|
74637
74886
|
var sectionstyles$2 = {"background":"Freetext-module_background__oUp-J"};
|
|
74638
74887
|
styleInject(css_248z$j);
|
|
@@ -98374,6 +98623,7 @@ var returnLibrary = function returnLibrary() {
|
|
|
98374
98623
|
VideosSection: VideosSection,
|
|
98375
98624
|
FullVideoSection: FullVideoSection,
|
|
98376
98625
|
Popupcomponent: Popupcomponent,
|
|
98626
|
+
WheelSpin: WheelSpin,
|
|
98377
98627
|
PopupCountryComponent: PopupCountryComponent,
|
|
98378
98628
|
TextSectionConnectToWA: TextSectionConnectToWA,
|
|
98379
98629
|
DynamicForm: DynamicForm,
|
package/dist/index.esm.js
CHANGED
|
@@ -74582,6 +74582,255 @@ var MapsSection = function MapsSection(props) {
|
|
|
74582
74582
|
}))));
|
|
74583
74583
|
};
|
|
74584
74584
|
|
|
74585
|
+
// import { FetchingContext } from '../../Contexts/FetchingContext';
|
|
74586
|
+
// import { FetchingContext } from '../../../FetchingContext/FetchingContext';
|
|
74587
|
+
|
|
74588
|
+
var colorTheme = {
|
|
74589
|
+
wheelSegments: ['#ff8a5b', '#f7b801', '#58c4dd', '#7dd87d', '#6c63ff', '#ff5d8f', '#00b894', '#3d405b'],
|
|
74590
|
+
pageGlowStart: '#fff4df',
|
|
74591
|
+
pageGlowMiddle: '#ffe3ec',
|
|
74592
|
+
pageGlowEnd: '#ffffff',
|
|
74593
|
+
floatingButtonStart: '#ffd166',
|
|
74594
|
+
floatingButtonMiddle: '#ff9f1c',
|
|
74595
|
+
floatingButtonEnd: '#ff4d6d',
|
|
74596
|
+
floatingButtonShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74597
|
+
floatingButtonShadowHover: 'rgba(35, 25, 66, 0.28)',
|
|
74598
|
+
floatingButtonRing: 'rgba(255, 255, 255, 0.22)',
|
|
74599
|
+
floatingButtonRingHover: 'rgba(255, 255, 255, 0.28)',
|
|
74600
|
+
floatingButtonDash: 'rgba(255, 255, 255, 0.52)',
|
|
74601
|
+
floatingButtonLabel: '#231942',
|
|
74602
|
+
overlay: 'rgba(24, 18, 43, 0.64)',
|
|
74603
|
+
cardBackground: 'rgba(255, 255, 255, 0.88)',
|
|
74604
|
+
cardShadow: 'rgba(41, 24, 66, 0.16)',
|
|
74605
|
+
closeButtonBackground: '#f4ecff',
|
|
74606
|
+
closeButtonText: '#231942',
|
|
74607
|
+
eyebrowBackground: '#fff3c4',
|
|
74608
|
+
eyebrowText: '#9a6400',
|
|
74609
|
+
headingText: '#231942',
|
|
74610
|
+
bodyText: '#5e548e',
|
|
74611
|
+
pointer: '#ff4d6d',
|
|
74612
|
+
pointerShadow: 'rgba(255, 77, 109, 0.28)',
|
|
74613
|
+
wheelBorder: '#ffffff',
|
|
74614
|
+
wheelOuterShadow: 'rgba(35, 25, 66, 0.18)',
|
|
74615
|
+
wheelInnerRing: 'rgba(255, 255, 255, 0.2)',
|
|
74616
|
+
wheelDash: 'rgba(255, 255, 255, 0.55)',
|
|
74617
|
+
wheelLabelText: '#ffffff',
|
|
74618
|
+
wheelLabelShadow: 'rgba(0, 0, 0, 0.25)',
|
|
74619
|
+
wheelCenterStart: '#231942',
|
|
74620
|
+
wheelCenterEnd: '#5e548e',
|
|
74621
|
+
wheelCenterShadow: 'rgba(35, 25, 66, 0.28)',
|
|
74622
|
+
primaryButtonStart: '#ff4d6d',
|
|
74623
|
+
primaryButtonEnd: '#ff9f1c',
|
|
74624
|
+
primaryButtonShadow: 'rgba(255, 77, 109, 0.24)',
|
|
74625
|
+
primaryButtonShadowHover: 'rgba(255, 77, 109, 0.3)',
|
|
74626
|
+
resultBoxBackground: '#fff7fb',
|
|
74627
|
+
resultBoxBorder: '#ffd6e0',
|
|
74628
|
+
celebrationTop: 'rgba(255, 255, 255, 0.95)',
|
|
74629
|
+
celebrationBottom: 'rgba(255, 240, 229, 0.96)',
|
|
74630
|
+
celebrationAccentStart: '#fff4df',
|
|
74631
|
+
celebrationAccentEnd: '#ffe0f0',
|
|
74632
|
+
celebrationBorder: '#ffd4a8',
|
|
74633
|
+
successBadgeStart: '#ff9f1c',
|
|
74634
|
+
successBadgeEnd: '#ff4d6d',
|
|
74635
|
+
successBadgeText: '#ffffff',
|
|
74636
|
+
successBadgeShadow: 'rgba(255, 77, 109, 0.2)',
|
|
74637
|
+
prizeHighlightStart: '#231942',
|
|
74638
|
+
prizeHighlightEnd: '#5e548e',
|
|
74639
|
+
prizeHighlightText: '#ffffff',
|
|
74640
|
+
prizeHighlightShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74641
|
+
confettiOne: '#ff4d6d',
|
|
74642
|
+
confettiTwo: '#f7b801',
|
|
74643
|
+
confettiThree: '#58c4dd',
|
|
74644
|
+
confettiFour: '#7dd87d'
|
|
74645
|
+
};
|
|
74646
|
+
|
|
74647
|
+
// const gifts = [
|
|
74648
|
+
// { label: '10% OFF', color: colorTheme.wheelSegments[0] },
|
|
74649
|
+
// { label: 'Free Shipping', color: colorTheme.wheelSegments[1] },
|
|
74650
|
+
// { label: '15% OFF', color: colorTheme.wheelSegments[2] },
|
|
74651
|
+
// { label: 'Buy 1 Get 1', color: colorTheme.wheelSegments[3] },
|
|
74652
|
+
// { label: '20% OFF', color: colorTheme.wheelSegments[4] },
|
|
74653
|
+
// { label: 'Free Gift Box', color: colorTheme.wheelSegments[5] },
|
|
74654
|
+
// { label: '$5 Coupon', color: colorTheme.wheelSegments[6] },
|
|
74655
|
+
// { label: 'Try Again', color: colorTheme.wheelSegments[7] },
|
|
74656
|
+
// ];
|
|
74657
|
+
|
|
74658
|
+
var WheelSpin = function WheelSpin(props) {
|
|
74659
|
+
var GeneralAPIMutationContext = props.actions.GeneralAPIMutationContext;
|
|
74660
|
+
var ApplyPromoCodeMutationContext = props.actions.ApplyPromoCodeMutationContext;
|
|
74661
|
+
var _useState = useState(false),
|
|
74662
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
74663
|
+
isOpen = _useState2[0],
|
|
74664
|
+
setIsOpen = _useState2[1];
|
|
74665
|
+
var _useState3 = useState(0),
|
|
74666
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
74667
|
+
rotation = _useState4[0],
|
|
74668
|
+
setRotation = _useState4[1];
|
|
74669
|
+
var _useState5 = useState(null),
|
|
74670
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
74671
|
+
selectedGift = _useState6[0],
|
|
74672
|
+
setSelectedGift = _useState6[1];
|
|
74673
|
+
var _useState7 = useState(false),
|
|
74674
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
74675
|
+
isSpinning = _useState8[0],
|
|
74676
|
+
setIsSpinning = _useState8[1];
|
|
74677
|
+
var _useState9 = useState(false),
|
|
74678
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
74679
|
+
showCelebration = _useState0[0],
|
|
74680
|
+
setShowCelebration = _useState0[1];
|
|
74681
|
+
var _useState1 = useState([]),
|
|
74682
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
74683
|
+
gifts = _useState10[0],
|
|
74684
|
+
setgifts = _useState10[1];
|
|
74685
|
+
var segmentAngle = 360 / gifts.length;
|
|
74686
|
+
var wheelBackground = "conic-gradient(".concat(gifts.map(function (gift, index) {
|
|
74687
|
+
var start = index * segmentAngle;
|
|
74688
|
+
var end = start + segmentAngle;
|
|
74689
|
+
return "".concat(gift.spinner_color, " ").concat(start, "deg ").concat(end, "deg");
|
|
74690
|
+
}).join(', '), ")");
|
|
74691
|
+
var handleSpin = function handleSpin() {
|
|
74692
|
+
if (isSpinning) {
|
|
74693
|
+
return;
|
|
74694
|
+
}
|
|
74695
|
+
var randomIndex = Math.floor(Math.random() * gifts.length);
|
|
74696
|
+
var extraTurns = 360 * (5 + Math.floor(Math.random() * 3));
|
|
74697
|
+
var landingAngle = randomIndex * segmentAngle + segmentAngle / 2;
|
|
74698
|
+
var targetRotation = extraTurns + (360 - landingAngle);
|
|
74699
|
+
setIsSpinning(true);
|
|
74700
|
+
setSelectedGift(null);
|
|
74701
|
+
setShowCelebration(false);
|
|
74702
|
+
setRotation(function (previousRotation) {
|
|
74703
|
+
return previousRotation + targetRotation;
|
|
74704
|
+
});
|
|
74705
|
+
window.setTimeout(function () {
|
|
74706
|
+
var chosen_gift = gifts[randomIndex];
|
|
74707
|
+
if (chosen_gift.copounid == 'tryagain') {
|
|
74708
|
+
setIsOpen(false);
|
|
74709
|
+
} else {
|
|
74710
|
+
setSelectedGift(chosen_gift);
|
|
74711
|
+
setIsSpinning(false);
|
|
74712
|
+
setShowCelebration(true);
|
|
74713
|
+
ApplyPromoCodeMutationContext.mutate({
|
|
74714
|
+
couponname: chosen_gift.couponname,
|
|
74715
|
+
functype: 'add'
|
|
74716
|
+
});
|
|
74717
|
+
}
|
|
74718
|
+
}, 5200);
|
|
74719
|
+
};
|
|
74720
|
+
var handleClose = function handleClose() {
|
|
74721
|
+
if (isSpinning) {
|
|
74722
|
+
return;
|
|
74723
|
+
}
|
|
74724
|
+
setIsOpen(false);
|
|
74725
|
+
};
|
|
74726
|
+
var fetchGifts_Api = function fetchGifts_Api() {
|
|
74727
|
+
GeneralAPIMutationContext.mutate({
|
|
74728
|
+
endpointurl: '/fetch_coupons_spinner',
|
|
74729
|
+
// productid: productid,
|
|
74730
|
+
// reviewpayloadobj: reviewpayloadobj,
|
|
74731
|
+
mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
|
|
74732
|
+
if (data.data.status) {
|
|
74733
|
+
var gifts_array_temp = data.data.data;
|
|
74734
|
+
gifts_array_temp.push({
|
|
74735
|
+
copounid: 'tryagain',
|
|
74736
|
+
spinner_color: 'black',
|
|
74737
|
+
description_en: 'Better luck next time'
|
|
74738
|
+
});
|
|
74739
|
+
setgifts(gifts_array_temp);
|
|
74740
|
+
// var data_gifts = data.data.data
|
|
74741
|
+
|
|
74742
|
+
// alert(JSON.stringify(data.data));
|
|
74743
|
+
// NotificationManager.success('', 'Success');
|
|
74744
|
+
// addreviewcallback();
|
|
74745
|
+
// window.location.reload();
|
|
74746
|
+
} else {
|
|
74747
|
+
NotificationManager.warning('', data.data.reason);
|
|
74748
|
+
}
|
|
74749
|
+
}
|
|
74750
|
+
});
|
|
74751
|
+
};
|
|
74752
|
+
var handleOpen = function handleOpen() {
|
|
74753
|
+
fetchGifts_Api();
|
|
74754
|
+
setSelectedGift(null);
|
|
74755
|
+
setRotation(0);
|
|
74756
|
+
setIsSpinning(false);
|
|
74757
|
+
setShowCelebration(false);
|
|
74758
|
+
setIsOpen(true);
|
|
74759
|
+
};
|
|
74760
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74761
|
+
className: "wheel-spin-section"
|
|
74762
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
74763
|
+
className: "open-popup-button",
|
|
74764
|
+
onClick: handleOpen,
|
|
74765
|
+
type: "button",
|
|
74766
|
+
"aria-label": "Open lucky wheel"
|
|
74767
|
+
}, "Spin"), isOpen ? /*#__PURE__*/React.createElement("div", {
|
|
74768
|
+
className: "popup-overlay",
|
|
74769
|
+
onClick: handleClose
|
|
74770
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74771
|
+
className: "content-card",
|
|
74772
|
+
onClick: function onClick(event) {
|
|
74773
|
+
return event.stopPropagation();
|
|
74774
|
+
}
|
|
74775
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
74776
|
+
className: "close-button",
|
|
74777
|
+
onClick: handleClose,
|
|
74778
|
+
disabled: isSpinning,
|
|
74779
|
+
type: "button"
|
|
74780
|
+
}, "\xD7"), !showCelebration ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h2", null, "Spin the wheel and unlock your surprise gift"), /*#__PURE__*/React.createElement("p", null, "Tap the button, watch the wheel rotate, and get a random reward."), /*#__PURE__*/React.createElement("div", {
|
|
74781
|
+
className: "wheel-stage"
|
|
74782
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74783
|
+
className: "pointer"
|
|
74784
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74785
|
+
className: "wheel",
|
|
74786
|
+
style: {
|
|
74787
|
+
transform: "rotate(".concat(rotation, "deg)"),
|
|
74788
|
+
background: wheelBackground
|
|
74789
|
+
}
|
|
74790
|
+
}, gifts.map(function (gift, index) {
|
|
74791
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74792
|
+
className: "label",
|
|
74793
|
+
key: gift.description_en,
|
|
74794
|
+
style: {
|
|
74795
|
+
transform: "rotate(".concat(index * segmentAngle + segmentAngle / 2, "deg)")
|
|
74796
|
+
}
|
|
74797
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
74798
|
+
style: {
|
|
74799
|
+
transform: 'translateX(-50%)'
|
|
74800
|
+
}
|
|
74801
|
+
}, gift.description_en));
|
|
74802
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74803
|
+
className: "wheel-center"
|
|
74804
|
+
}, /*#__PURE__*/React.createElement("span", null, "WIN")))), /*#__PURE__*/React.createElement("button", {
|
|
74805
|
+
className: "spin-button",
|
|
74806
|
+
onClick: handleSpin,
|
|
74807
|
+
disabled: isSpinning,
|
|
74808
|
+
type: "button"
|
|
74809
|
+
}, isSpinning ? 'Spinning...' : 'Spin Now')) : /*#__PURE__*/React.createElement("div", {
|
|
74810
|
+
className: "celebration-card"
|
|
74811
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74812
|
+
className: "confetti confetti-one"
|
|
74813
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74814
|
+
className: "confetti confetti-two"
|
|
74815
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74816
|
+
className: "confetti confetti-three"
|
|
74817
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74818
|
+
className: "confetti confetti-four"
|
|
74819
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74820
|
+
className: "success-badge"
|
|
74821
|
+
}, "Congratulations"), /*#__PURE__*/React.createElement("h2", null, "You unlocked a special reward"), /*#__PURE__*/React.createElement("p", {
|
|
74822
|
+
className: "celebration-copy"
|
|
74823
|
+
}, "Your lucky spin landed on", /*#__PURE__*/React.createElement("strong", null, " ", selectedGift.description_en)), /*#__PURE__*/React.createElement("div", {
|
|
74824
|
+
className: "prize-highlight"
|
|
74825
|
+
}, /*#__PURE__*/React.createElement("span", null, selectedGift.description_en)), /*#__PURE__*/React.createElement("button", {
|
|
74826
|
+
className: "claim-button",
|
|
74827
|
+
onClick: handleClose,
|
|
74828
|
+
type: "button"
|
|
74829
|
+
}, "Awesome")))) : null, /*#__PURE__*/React.createElement("style", {
|
|
74830
|
+
jsx: true
|
|
74831
|
+
}, "\n .wheel-spin-section {\n position: relative;\n min-height: 0;\n padding: 0;\n background: none;\n }\n\n .open-popup-button {\n position: fixed;\n right: 18px;\n bottom: 24px;\n z-index: 9998;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 84px;\n height: 84px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: radial-gradient(circle at 30% 30%, ".concat(colorTheme.floatingButtonStart, " 0%, ").concat(colorTheme.floatingButtonMiddle, " 34%, ").concat(colorTheme.floatingButtonEnd, " 100%);\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 16px;\n font-weight: 800;\n cursor: pointer;\n box-shadow:\n 0 18px 30px ").concat(colorTheme.floatingButtonShadow, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRing, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .open-popup-button:hover {\n transform: scale(1.04);\n box-shadow:\n 0 22px 36px ").concat(colorTheme.floatingButtonShadowHover, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRingHover, ";\n }\n\n .open-popup-button::before {\n content: '';\n position: absolute;\n inset: 8px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.floatingButtonDash, ";\n }\n\n .open-popup-button::after {\n content: '';\n position: absolute;\n bottom: -28px;\n left: 50%;\n color: ").concat(colorTheme.floatingButtonLabel, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.04em;\n white-space: nowrap;\n transform: translateX(-50%);\n }\n\n .popup-overlay {\n position: fixed;\n inset: 0;\n z-index: 9999;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background: ").concat(colorTheme.overlay, ";\n backdrop-filter: blur(8px);\n }\n\n .content-card {\n position: relative;\n width: 100%;\n max-width: 560px;\n padding: 20px 20px 18px;\n border-radius: 28px;\n background: ").concat(colorTheme.cardBackground, ";\n box-shadow: 0 24px 80px ").concat(colorTheme.cardShadow, ";\n text-align: center;\n backdrop-filter: blur(12px);\n animation: popup-enter 0.3s ease;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 16px;\n width: 42px;\n height: 42px;\n border: none;\n border-radius: 50%;\n background: ").concat(colorTheme.closeButtonBackground, ";\n color: ").concat(colorTheme.closeButtonText, ";\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n }\n\n .close-button:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .eyebrow {\n display: inline-block;\n margin-bottom: 8px;\n padding: 6px 12px;\n border-radius: 999px;\n background: ").concat(colorTheme.eyebrowBackground, ";\n color: ").concat(colorTheme.eyebrowText, ";\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n }\n\n h2 {\n margin: 0;\n color: ").concat(colorTheme.headingText, ";\n font-size: clamp(22px, 4vw, 34px);\n line-height: 1.08;\n }\n\n p {\n margin: 8px auto 0;\n max-width: 420px;\n color: ").concat(colorTheme.bodyText, ";\n font-size: 14px;\n line-height: 1.45;\n }\n\n .wheel-stage {\n position: relative;\n display: flex;\n justify-content: center;\n margin: 18px 0 14px;\n }\n\n .pointer {\n position: absolute;\n top: -10px;\n left: 50%;\n z-index: 3;\n width: 0;\n height: 0;\n border-left: 18px solid transparent;\n border-right: 18px solid transparent;\n border-top: 34px solid ").concat(colorTheme.pointer, ";\n transform: translateX(-50%);\n filter: drop-shadow(0 10px 14px ").concat(colorTheme.pointerShadow, ");\n }\n\n .wheel {\n position: relative;\n width: min(78vw, 400px, 52vh);\n height: min(78vw, 400px, 52vh);\n border: 10px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n box-shadow:\n 0 18px 42px ").concat(colorTheme.wheelOuterShadow, ",\n inset 0 0 0 10px ").concat(colorTheme.wheelInnerRing, ";\n transition: transform 4.8s cubic-bezier(0.18, 0.89, 0.32, 1.08);\n overflow: hidden;\n }\n\n .wheel::after {\n content: '';\n position: absolute;\n inset: 18px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.wheelDash, ";\n }\n\n .label {\n position: absolute;\n inset: 0;\n transform-origin: center;\n }\n\n .label span {\n position: absolute;\n top: 16px;\n left: 50%;\n width: 132px;\n padding: 0 6px;\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.03em;\n text-align: center;\n text-shadow: 0 2px 10px ").concat(colorTheme.wheelLabelShadow, ";\n white-space: nowrap;\n }\n\n .wheel-center {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 2;\n display: grid;\n place-items: center;\n width: 88px;\n height: 88px;\n border: 7px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n background: linear-gradient(135deg, ").concat(colorTheme.wheelCenterStart, ", ").concat(colorTheme.wheelCenterEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 22px;\n font-weight: 800;\n transform: translate(-50%, -50%);\n box-shadow: 0 14px 26px ").concat(colorTheme.wheelCenterShadow, ";\n }\n\n .spin-button {\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease,\n opacity 0.2s ease;\n }\n\n .spin-button:hover {\n transform: translateY(-2px);\n box-shadow: 0 20px 34px ").concat(colorTheme.primaryButtonShadowHover, ";\n }\n\n .spin-button:disabled {\n cursor: not-allowed;\n opacity: 0.7;\n transform: none;\n }\n\n .result-box {\n margin-top: 12px;\n padding: 12px 14px;\n border-radius: 16px;\n background: ").concat(colorTheme.resultBoxBackground, ";\n border: 1px solid ").concat(colorTheme.resultBoxBorder, ";\n }\n\n .result-box p {\n margin: 0;\n }\n\n .celebration-card {\n position: relative;\n overflow: hidden;\n margin-top: 10px;\n padding: 22px 18px 18px;\n border-radius: 24px;\n background:\n radial-gradient(circle at top, ").concat(colorTheme.celebrationTop, ", ").concat(colorTheme.celebrationBottom, "),\n linear-gradient(135deg, ").concat(colorTheme.celebrationAccentStart, ", ").concat(colorTheme.celebrationAccentEnd, ");\n border: 1px solid ").concat(colorTheme.celebrationBorder, ";\n }\n\n .success-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 10px;\n padding: 8px 14px;\n border-radius: 999px;\n background: linear-gradient(135deg, ").concat(colorTheme.successBadgeStart, ", ").concat(colorTheme.successBadgeEnd, ");\n color: ").concat(colorTheme.successBadgeText, ";\n font-size: 12px;\n font-weight: 800;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n box-shadow: 0 14px 24px ").concat(colorTheme.successBadgeShadow, ";\n }\n\n .celebration-copy {\n max-width: 420px;\n }\n\n .prize-highlight {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 220px;\n margin-top: 14px;\n padding: 16px 20px;\n border-radius: 20px;\n background: linear-gradient(135deg, ").concat(colorTheme.prizeHighlightStart, ", ").concat(colorTheme.prizeHighlightEnd, ");\n color: ").concat(colorTheme.prizeHighlightText, ";\n box-shadow: 0 24px 40px ").concat(colorTheme.prizeHighlightShadow, ";\n }\n\n .prize-highlight span {\n font-size: 22px;\n font-weight: 800;\n letter-spacing: 0.02em;\n }\n\n .claim-button {\n margin-top: 16px;\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n }\n\n .claim-button:hover {\n transform: translateY(-2px);\n }\n\n .confetti {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n opacity: 0.9;\n animation: float-confetti 2.8s ease-in-out infinite;\n }\n\n .confetti-one {\n top: 18px;\n left: 18px;\n background: ").concat(colorTheme.confettiOne, ";\n transform: rotate(12deg);\n }\n\n .confetti-two {\n top: 28px;\n right: 40px;\n background: ").concat(colorTheme.confettiTwo, ";\n animation-delay: 0.25s;\n transform: rotate(24deg);\n }\n\n .confetti-three {\n bottom: 34px;\n left: 46px;\n background: ").concat(colorTheme.confettiThree, ";\n animation-delay: 0.45s;\n transform: rotate(42deg);\n }\n\n .confetti-four {\n right: 22px;\n bottom: 44px;\n background: ").concat(colorTheme.confettiFour, ";\n animation-delay: 0.65s;\n transform: rotate(18deg);\n }\n\n @media (max-width: 640px) {\n .open-popup-button {\n right: 12px;\n width: 72px;\n height: 72px;\n font-size: 14px;\n }\n\n .open-popup-button::after {\n bottom: -24px;\n font-size: 10px;\n }\n\n .content-card {\n max-width: 92vw;\n padding: 48px 14px 16px;\n border-radius: 24px;\n }\n\n .label span {\n top: 14px;\n width: 100px;\n font-size: 9px;\n }\n\n .wheel-center {\n width: 74px;\n height: 74px;\n font-size: 18px;\n }\n\n .wheel {\n width: min(82vw, 330px, 44vh);\n height: min(82vw, 330px, 44vh);\n }\n\n .prize-highlight {\n min-width: 100%;\n }\n\n .prize-highlight span {\n font-size: 20px;\n }\n }\n\n @keyframes popup-enter {\n from {\n opacity: 0;\n transform: translateY(18px) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @keyframes float-confetti {\n 0%,\n 100% {\n transform: translateY(0) rotate(0deg);\n }\n\n 50% {\n transform: translateY(-12px) rotate(18deg);\n }\n }\n ")));
|
|
74832
|
+
};
|
|
74833
|
+
|
|
74585
74834
|
var css_248z$j = ".Freetext-module_background__oUp-J {\r\n background-size: cover !important;\r\n background-position: center !important;\r\n background-attachment: fixed !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: cover !important;\r\n -moz-background-size: cover !important;\r\n}\r\n@media (max-width: 800px) {\r\n .Freetext-module_background__oUp-J {\r\n background-size: contain !important;\r\n background-position: center !important;\r\n background-attachment: initial !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: contain !important;\r\n -moz-background-size: contain !important;\r\n }\r\n}\r\n";
|
|
74586
74835
|
var sectionstyles$2 = {"background":"Freetext-module_background__oUp-J"};
|
|
74587
74836
|
styleInject(css_248z$j);
|
|
@@ -98323,6 +98572,7 @@ var returnLibrary = function returnLibrary() {
|
|
|
98323
98572
|
VideosSection: VideosSection,
|
|
98324
98573
|
FullVideoSection: FullVideoSection,
|
|
98325
98574
|
Popupcomponent: Popupcomponent,
|
|
98575
|
+
WheelSpin: WheelSpin,
|
|
98326
98576
|
PopupCountryComponent: PopupCountryComponent,
|
|
98327
98577
|
TextSectionConnectToWA: TextSectionConnectToWA,
|
|
98328
98578
|
DynamicForm: DynamicForm,
|
package/dist/index.umd.js
CHANGED
|
@@ -74439,6 +74439,255 @@
|
|
|
74439
74439
|
}))));
|
|
74440
74440
|
};
|
|
74441
74441
|
|
|
74442
|
+
// import { FetchingContext } from '../../Contexts/FetchingContext';
|
|
74443
|
+
// import { FetchingContext } from '../../../FetchingContext/FetchingContext';
|
|
74444
|
+
|
|
74445
|
+
var colorTheme = {
|
|
74446
|
+
wheelSegments: ['#ff8a5b', '#f7b801', '#58c4dd', '#7dd87d', '#6c63ff', '#ff5d8f', '#00b894', '#3d405b'],
|
|
74447
|
+
pageGlowStart: '#fff4df',
|
|
74448
|
+
pageGlowMiddle: '#ffe3ec',
|
|
74449
|
+
pageGlowEnd: '#ffffff',
|
|
74450
|
+
floatingButtonStart: '#ffd166',
|
|
74451
|
+
floatingButtonMiddle: '#ff9f1c',
|
|
74452
|
+
floatingButtonEnd: '#ff4d6d',
|
|
74453
|
+
floatingButtonShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74454
|
+
floatingButtonShadowHover: 'rgba(35, 25, 66, 0.28)',
|
|
74455
|
+
floatingButtonRing: 'rgba(255, 255, 255, 0.22)',
|
|
74456
|
+
floatingButtonRingHover: 'rgba(255, 255, 255, 0.28)',
|
|
74457
|
+
floatingButtonDash: 'rgba(255, 255, 255, 0.52)',
|
|
74458
|
+
floatingButtonLabel: '#231942',
|
|
74459
|
+
overlay: 'rgba(24, 18, 43, 0.64)',
|
|
74460
|
+
cardBackground: 'rgba(255, 255, 255, 0.88)',
|
|
74461
|
+
cardShadow: 'rgba(41, 24, 66, 0.16)',
|
|
74462
|
+
closeButtonBackground: '#f4ecff',
|
|
74463
|
+
closeButtonText: '#231942',
|
|
74464
|
+
eyebrowBackground: '#fff3c4',
|
|
74465
|
+
eyebrowText: '#9a6400',
|
|
74466
|
+
headingText: '#231942',
|
|
74467
|
+
bodyText: '#5e548e',
|
|
74468
|
+
pointer: '#ff4d6d',
|
|
74469
|
+
pointerShadow: 'rgba(255, 77, 109, 0.28)',
|
|
74470
|
+
wheelBorder: '#ffffff',
|
|
74471
|
+
wheelOuterShadow: 'rgba(35, 25, 66, 0.18)',
|
|
74472
|
+
wheelInnerRing: 'rgba(255, 255, 255, 0.2)',
|
|
74473
|
+
wheelDash: 'rgba(255, 255, 255, 0.55)',
|
|
74474
|
+
wheelLabelText: '#ffffff',
|
|
74475
|
+
wheelLabelShadow: 'rgba(0, 0, 0, 0.25)',
|
|
74476
|
+
wheelCenterStart: '#231942',
|
|
74477
|
+
wheelCenterEnd: '#5e548e',
|
|
74478
|
+
wheelCenterShadow: 'rgba(35, 25, 66, 0.28)',
|
|
74479
|
+
primaryButtonStart: '#ff4d6d',
|
|
74480
|
+
primaryButtonEnd: '#ff9f1c',
|
|
74481
|
+
primaryButtonShadow: 'rgba(255, 77, 109, 0.24)',
|
|
74482
|
+
primaryButtonShadowHover: 'rgba(255, 77, 109, 0.3)',
|
|
74483
|
+
resultBoxBackground: '#fff7fb',
|
|
74484
|
+
resultBoxBorder: '#ffd6e0',
|
|
74485
|
+
celebrationTop: 'rgba(255, 255, 255, 0.95)',
|
|
74486
|
+
celebrationBottom: 'rgba(255, 240, 229, 0.96)',
|
|
74487
|
+
celebrationAccentStart: '#fff4df',
|
|
74488
|
+
celebrationAccentEnd: '#ffe0f0',
|
|
74489
|
+
celebrationBorder: '#ffd4a8',
|
|
74490
|
+
successBadgeStart: '#ff9f1c',
|
|
74491
|
+
successBadgeEnd: '#ff4d6d',
|
|
74492
|
+
successBadgeText: '#ffffff',
|
|
74493
|
+
successBadgeShadow: 'rgba(255, 77, 109, 0.2)',
|
|
74494
|
+
prizeHighlightStart: '#231942',
|
|
74495
|
+
prizeHighlightEnd: '#5e548e',
|
|
74496
|
+
prizeHighlightText: '#ffffff',
|
|
74497
|
+
prizeHighlightShadow: 'rgba(35, 25, 66, 0.22)',
|
|
74498
|
+
confettiOne: '#ff4d6d',
|
|
74499
|
+
confettiTwo: '#f7b801',
|
|
74500
|
+
confettiThree: '#58c4dd',
|
|
74501
|
+
confettiFour: '#7dd87d'
|
|
74502
|
+
};
|
|
74503
|
+
|
|
74504
|
+
// const gifts = [
|
|
74505
|
+
// { label: '10% OFF', color: colorTheme.wheelSegments[0] },
|
|
74506
|
+
// { label: 'Free Shipping', color: colorTheme.wheelSegments[1] },
|
|
74507
|
+
// { label: '15% OFF', color: colorTheme.wheelSegments[2] },
|
|
74508
|
+
// { label: 'Buy 1 Get 1', color: colorTheme.wheelSegments[3] },
|
|
74509
|
+
// { label: '20% OFF', color: colorTheme.wheelSegments[4] },
|
|
74510
|
+
// { label: 'Free Gift Box', color: colorTheme.wheelSegments[5] },
|
|
74511
|
+
// { label: '$5 Coupon', color: colorTheme.wheelSegments[6] },
|
|
74512
|
+
// { label: 'Try Again', color: colorTheme.wheelSegments[7] },
|
|
74513
|
+
// ];
|
|
74514
|
+
|
|
74515
|
+
var WheelSpin = function WheelSpin(props) {
|
|
74516
|
+
var GeneralAPIMutationContext = props.actions.GeneralAPIMutationContext;
|
|
74517
|
+
var ApplyPromoCodeMutationContext = props.actions.ApplyPromoCodeMutationContext;
|
|
74518
|
+
var _useState = React.useState(false),
|
|
74519
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
74520
|
+
isOpen = _useState2[0],
|
|
74521
|
+
setIsOpen = _useState2[1];
|
|
74522
|
+
var _useState3 = React.useState(0),
|
|
74523
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
74524
|
+
rotation = _useState4[0],
|
|
74525
|
+
setRotation = _useState4[1];
|
|
74526
|
+
var _useState5 = React.useState(null),
|
|
74527
|
+
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
74528
|
+
selectedGift = _useState6[0],
|
|
74529
|
+
setSelectedGift = _useState6[1];
|
|
74530
|
+
var _useState7 = React.useState(false),
|
|
74531
|
+
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
74532
|
+
isSpinning = _useState8[0],
|
|
74533
|
+
setIsSpinning = _useState8[1];
|
|
74534
|
+
var _useState9 = React.useState(false),
|
|
74535
|
+
_useState0 = _slicedToArray__default["default"](_useState9, 2),
|
|
74536
|
+
showCelebration = _useState0[0],
|
|
74537
|
+
setShowCelebration = _useState0[1];
|
|
74538
|
+
var _useState1 = React.useState([]),
|
|
74539
|
+
_useState10 = _slicedToArray__default["default"](_useState1, 2),
|
|
74540
|
+
gifts = _useState10[0],
|
|
74541
|
+
setgifts = _useState10[1];
|
|
74542
|
+
var segmentAngle = 360 / gifts.length;
|
|
74543
|
+
var wheelBackground = "conic-gradient(".concat(gifts.map(function (gift, index) {
|
|
74544
|
+
var start = index * segmentAngle;
|
|
74545
|
+
var end = start + segmentAngle;
|
|
74546
|
+
return "".concat(gift.spinner_color, " ").concat(start, "deg ").concat(end, "deg");
|
|
74547
|
+
}).join(', '), ")");
|
|
74548
|
+
var handleSpin = function handleSpin() {
|
|
74549
|
+
if (isSpinning) {
|
|
74550
|
+
return;
|
|
74551
|
+
}
|
|
74552
|
+
var randomIndex = Math.floor(Math.random() * gifts.length);
|
|
74553
|
+
var extraTurns = 360 * (5 + Math.floor(Math.random() * 3));
|
|
74554
|
+
var landingAngle = randomIndex * segmentAngle + segmentAngle / 2;
|
|
74555
|
+
var targetRotation = extraTurns + (360 - landingAngle);
|
|
74556
|
+
setIsSpinning(true);
|
|
74557
|
+
setSelectedGift(null);
|
|
74558
|
+
setShowCelebration(false);
|
|
74559
|
+
setRotation(function (previousRotation) {
|
|
74560
|
+
return previousRotation + targetRotation;
|
|
74561
|
+
});
|
|
74562
|
+
window.setTimeout(function () {
|
|
74563
|
+
var chosen_gift = gifts[randomIndex];
|
|
74564
|
+
if (chosen_gift.copounid == 'tryagain') {
|
|
74565
|
+
setIsOpen(false);
|
|
74566
|
+
} else {
|
|
74567
|
+
setSelectedGift(chosen_gift);
|
|
74568
|
+
setIsSpinning(false);
|
|
74569
|
+
setShowCelebration(true);
|
|
74570
|
+
ApplyPromoCodeMutationContext.mutate({
|
|
74571
|
+
couponname: chosen_gift.couponname,
|
|
74572
|
+
functype: 'add'
|
|
74573
|
+
});
|
|
74574
|
+
}
|
|
74575
|
+
}, 5200);
|
|
74576
|
+
};
|
|
74577
|
+
var handleClose = function handleClose() {
|
|
74578
|
+
if (isSpinning) {
|
|
74579
|
+
return;
|
|
74580
|
+
}
|
|
74581
|
+
setIsOpen(false);
|
|
74582
|
+
};
|
|
74583
|
+
var fetchGifts_Api = function fetchGifts_Api() {
|
|
74584
|
+
GeneralAPIMutationContext.mutate({
|
|
74585
|
+
endpointurl: '/fetch_coupons_spinner',
|
|
74586
|
+
// productid: productid,
|
|
74587
|
+
// reviewpayloadobj: reviewpayloadobj,
|
|
74588
|
+
mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
|
|
74589
|
+
if (data.data.status) {
|
|
74590
|
+
var gifts_array_temp = data.data.data;
|
|
74591
|
+
gifts_array_temp.push({
|
|
74592
|
+
copounid: 'tryagain',
|
|
74593
|
+
spinner_color: 'black',
|
|
74594
|
+
description_en: 'Better luck next time'
|
|
74595
|
+
});
|
|
74596
|
+
setgifts(gifts_array_temp);
|
|
74597
|
+
// var data_gifts = data.data.data
|
|
74598
|
+
|
|
74599
|
+
// alert(JSON.stringify(data.data));
|
|
74600
|
+
// NotificationManager.success('', 'Success');
|
|
74601
|
+
// addreviewcallback();
|
|
74602
|
+
// window.location.reload();
|
|
74603
|
+
} else {
|
|
74604
|
+
NotificationManager.warning('', data.data.reason);
|
|
74605
|
+
}
|
|
74606
|
+
}
|
|
74607
|
+
});
|
|
74608
|
+
};
|
|
74609
|
+
var handleOpen = function handleOpen() {
|
|
74610
|
+
fetchGifts_Api();
|
|
74611
|
+
setSelectedGift(null);
|
|
74612
|
+
setRotation(0);
|
|
74613
|
+
setIsSpinning(false);
|
|
74614
|
+
setShowCelebration(false);
|
|
74615
|
+
setIsOpen(true);
|
|
74616
|
+
};
|
|
74617
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74618
|
+
className: "wheel-spin-section"
|
|
74619
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74620
|
+
className: "open-popup-button",
|
|
74621
|
+
onClick: handleOpen,
|
|
74622
|
+
type: "button",
|
|
74623
|
+
"aria-label": "Open lucky wheel"
|
|
74624
|
+
}, "Spin"), isOpen ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74625
|
+
className: "popup-overlay",
|
|
74626
|
+
onClick: handleClose
|
|
74627
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74628
|
+
className: "content-card",
|
|
74629
|
+
onClick: function onClick(event) {
|
|
74630
|
+
return event.stopPropagation();
|
|
74631
|
+
}
|
|
74632
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74633
|
+
className: "close-button",
|
|
74634
|
+
onClick: handleClose,
|
|
74635
|
+
disabled: isSpinning,
|
|
74636
|
+
type: "button"
|
|
74637
|
+
}, "\xD7"), !showCelebration ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("h2", null, "Spin the wheel and unlock your surprise gift"), /*#__PURE__*/React__default["default"].createElement("p", null, "Tap the button, watch the wheel rotate, and get a random reward."), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74638
|
+
className: "wheel-stage"
|
|
74639
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74640
|
+
className: "pointer"
|
|
74641
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74642
|
+
className: "wheel",
|
|
74643
|
+
style: {
|
|
74644
|
+
transform: "rotate(".concat(rotation, "deg)"),
|
|
74645
|
+
background: wheelBackground
|
|
74646
|
+
}
|
|
74647
|
+
}, gifts.map(function (gift, index) {
|
|
74648
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74649
|
+
className: "label",
|
|
74650
|
+
key: gift.description_en,
|
|
74651
|
+
style: {
|
|
74652
|
+
transform: "rotate(".concat(index * segmentAngle + segmentAngle / 2, "deg)")
|
|
74653
|
+
}
|
|
74654
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
74655
|
+
style: {
|
|
74656
|
+
transform: 'translateX(-50%)'
|
|
74657
|
+
}
|
|
74658
|
+
}, gift.description_en));
|
|
74659
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74660
|
+
className: "wheel-center"
|
|
74661
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, "WIN")))), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74662
|
+
className: "spin-button",
|
|
74663
|
+
onClick: handleSpin,
|
|
74664
|
+
disabled: isSpinning,
|
|
74665
|
+
type: "button"
|
|
74666
|
+
}, isSpinning ? 'Spinning...' : 'Spin Now')) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74667
|
+
className: "celebration-card"
|
|
74668
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74669
|
+
className: "confetti confetti-one"
|
|
74670
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74671
|
+
className: "confetti confetti-two"
|
|
74672
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74673
|
+
className: "confetti confetti-three"
|
|
74674
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74675
|
+
className: "confetti confetti-four"
|
|
74676
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74677
|
+
className: "success-badge"
|
|
74678
|
+
}, "Congratulations"), /*#__PURE__*/React__default["default"].createElement("h2", null, "You unlocked a special reward"), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
74679
|
+
className: "celebration-copy"
|
|
74680
|
+
}, "Your lucky spin landed on", /*#__PURE__*/React__default["default"].createElement("strong", null, " ", selectedGift.description_en)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
74681
|
+
className: "prize-highlight"
|
|
74682
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, selectedGift.description_en)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
74683
|
+
className: "claim-button",
|
|
74684
|
+
onClick: handleClose,
|
|
74685
|
+
type: "button"
|
|
74686
|
+
}, "Awesome")))) : null, /*#__PURE__*/React__default["default"].createElement("style", {
|
|
74687
|
+
jsx: true
|
|
74688
|
+
}, "\n .wheel-spin-section {\n position: relative;\n min-height: 0;\n padding: 0;\n background: none;\n }\n\n .open-popup-button {\n position: fixed;\n right: 18px;\n bottom: 24px;\n z-index: 9998;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 84px;\n height: 84px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: radial-gradient(circle at 30% 30%, ".concat(colorTheme.floatingButtonStart, " 0%, ").concat(colorTheme.floatingButtonMiddle, " 34%, ").concat(colorTheme.floatingButtonEnd, " 100%);\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 16px;\n font-weight: 800;\n cursor: pointer;\n box-shadow:\n 0 18px 30px ").concat(colorTheme.floatingButtonShadow, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRing, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .open-popup-button:hover {\n transform: scale(1.04);\n box-shadow:\n 0 22px 36px ").concat(colorTheme.floatingButtonShadowHover, ",\n inset 0 0 0 4px ").concat(colorTheme.floatingButtonRingHover, ";\n }\n\n .open-popup-button::before {\n content: '';\n position: absolute;\n inset: 8px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.floatingButtonDash, ";\n }\n\n .open-popup-button::after {\n content: '';\n position: absolute;\n bottom: -28px;\n left: 50%;\n color: ").concat(colorTheme.floatingButtonLabel, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.04em;\n white-space: nowrap;\n transform: translateX(-50%);\n }\n\n .popup-overlay {\n position: fixed;\n inset: 0;\n z-index: 9999;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n background: ").concat(colorTheme.overlay, ";\n backdrop-filter: blur(8px);\n }\n\n .content-card {\n position: relative;\n width: 100%;\n max-width: 560px;\n padding: 20px 20px 18px;\n border-radius: 28px;\n background: ").concat(colorTheme.cardBackground, ";\n box-shadow: 0 24px 80px ").concat(colorTheme.cardShadow, ";\n text-align: center;\n backdrop-filter: blur(12px);\n animation: popup-enter 0.3s ease;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 16px;\n width: 42px;\n height: 42px;\n border: none;\n border-radius: 50%;\n background: ").concat(colorTheme.closeButtonBackground, ";\n color: ").concat(colorTheme.closeButtonText, ";\n font-size: 24px;\n line-height: 1;\n cursor: pointer;\n }\n\n .close-button:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .eyebrow {\n display: inline-block;\n margin-bottom: 8px;\n padding: 6px 12px;\n border-radius: 999px;\n background: ").concat(colorTheme.eyebrowBackground, ";\n color: ").concat(colorTheme.eyebrowText, ";\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n }\n\n h2 {\n margin: 0;\n color: ").concat(colorTheme.headingText, ";\n font-size: clamp(22px, 4vw, 34px);\n line-height: 1.08;\n }\n\n p {\n margin: 8px auto 0;\n max-width: 420px;\n color: ").concat(colorTheme.bodyText, ";\n font-size: 14px;\n line-height: 1.45;\n }\n\n .wheel-stage {\n position: relative;\n display: flex;\n justify-content: center;\n margin: 18px 0 14px;\n }\n\n .pointer {\n position: absolute;\n top: -10px;\n left: 50%;\n z-index: 3;\n width: 0;\n height: 0;\n border-left: 18px solid transparent;\n border-right: 18px solid transparent;\n border-top: 34px solid ").concat(colorTheme.pointer, ";\n transform: translateX(-50%);\n filter: drop-shadow(0 10px 14px ").concat(colorTheme.pointerShadow, ");\n }\n\n .wheel {\n position: relative;\n width: min(78vw, 400px, 52vh);\n height: min(78vw, 400px, 52vh);\n border: 10px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n box-shadow:\n 0 18px 42px ").concat(colorTheme.wheelOuterShadow, ",\n inset 0 0 0 10px ").concat(colorTheme.wheelInnerRing, ";\n transition: transform 4.8s cubic-bezier(0.18, 0.89, 0.32, 1.08);\n overflow: hidden;\n }\n\n .wheel::after {\n content: '';\n position: absolute;\n inset: 18px;\n border-radius: 50%;\n border: 1px dashed ").concat(colorTheme.wheelDash, ";\n }\n\n .label {\n position: absolute;\n inset: 0;\n transform-origin: center;\n }\n\n .label span {\n position: absolute;\n top: 16px;\n left: 50%;\n width: 132px;\n padding: 0 6px;\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 11px;\n font-weight: 800;\n letter-spacing: 0.03em;\n text-align: center;\n text-shadow: 0 2px 10px ").concat(colorTheme.wheelLabelShadow, ";\n white-space: nowrap;\n }\n\n .wheel-center {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 2;\n display: grid;\n place-items: center;\n width: 88px;\n height: 88px;\n border: 7px solid ").concat(colorTheme.wheelBorder, ";\n border-radius: 50%;\n background: linear-gradient(135deg, ").concat(colorTheme.wheelCenterStart, ", ").concat(colorTheme.wheelCenterEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 22px;\n font-weight: 800;\n transform: translate(-50%, -50%);\n box-shadow: 0 14px 26px ").concat(colorTheme.wheelCenterShadow, ";\n }\n\n .spin-button {\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n transition:\n transform 0.2s ease,\n box-shadow 0.2s ease,\n opacity 0.2s ease;\n }\n\n .spin-button:hover {\n transform: translateY(-2px);\n box-shadow: 0 20px 34px ").concat(colorTheme.primaryButtonShadowHover, ";\n }\n\n .spin-button:disabled {\n cursor: not-allowed;\n opacity: 0.7;\n transform: none;\n }\n\n .result-box {\n margin-top: 12px;\n padding: 12px 14px;\n border-radius: 16px;\n background: ").concat(colorTheme.resultBoxBackground, ";\n border: 1px solid ").concat(colorTheme.resultBoxBorder, ";\n }\n\n .result-box p {\n margin: 0;\n }\n\n .celebration-card {\n position: relative;\n overflow: hidden;\n margin-top: 10px;\n padding: 22px 18px 18px;\n border-radius: 24px;\n background:\n radial-gradient(circle at top, ").concat(colorTheme.celebrationTop, ", ").concat(colorTheme.celebrationBottom, "),\n linear-gradient(135deg, ").concat(colorTheme.celebrationAccentStart, ", ").concat(colorTheme.celebrationAccentEnd, ");\n border: 1px solid ").concat(colorTheme.celebrationBorder, ";\n }\n\n .success-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 10px;\n padding: 8px 14px;\n border-radius: 999px;\n background: linear-gradient(135deg, ").concat(colorTheme.successBadgeStart, ", ").concat(colorTheme.successBadgeEnd, ");\n color: ").concat(colorTheme.successBadgeText, ";\n font-size: 12px;\n font-weight: 800;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n box-shadow: 0 14px 24px ").concat(colorTheme.successBadgeShadow, ";\n }\n\n .celebration-copy {\n max-width: 420px;\n }\n\n .prize-highlight {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 220px;\n margin-top: 14px;\n padding: 16px 20px;\n border-radius: 20px;\n background: linear-gradient(135deg, ").concat(colorTheme.prizeHighlightStart, ", ").concat(colorTheme.prizeHighlightEnd, ");\n color: ").concat(colorTheme.prizeHighlightText, ";\n box-shadow: 0 24px 40px ").concat(colorTheme.prizeHighlightShadow, ";\n }\n\n .prize-highlight span {\n font-size: 22px;\n font-weight: 800;\n letter-spacing: 0.02em;\n }\n\n .claim-button {\n margin-top: 16px;\n border: none;\n border-radius: 999px;\n padding: 14px 28px;\n background: linear-gradient(135deg, ").concat(colorTheme.primaryButtonStart, ", ").concat(colorTheme.primaryButtonEnd, ");\n color: ").concat(colorTheme.wheelLabelText, ";\n font-size: 15px;\n font-weight: 800;\n cursor: pointer;\n box-shadow: 0 18px 28px ").concat(colorTheme.primaryButtonShadow, ";\n }\n\n .claim-button:hover {\n transform: translateY(-2px);\n }\n\n .confetti {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n opacity: 0.9;\n animation: float-confetti 2.8s ease-in-out infinite;\n }\n\n .confetti-one {\n top: 18px;\n left: 18px;\n background: ").concat(colorTheme.confettiOne, ";\n transform: rotate(12deg);\n }\n\n .confetti-two {\n top: 28px;\n right: 40px;\n background: ").concat(colorTheme.confettiTwo, ";\n animation-delay: 0.25s;\n transform: rotate(24deg);\n }\n\n .confetti-three {\n bottom: 34px;\n left: 46px;\n background: ").concat(colorTheme.confettiThree, ";\n animation-delay: 0.45s;\n transform: rotate(42deg);\n }\n\n .confetti-four {\n right: 22px;\n bottom: 44px;\n background: ").concat(colorTheme.confettiFour, ";\n animation-delay: 0.65s;\n transform: rotate(18deg);\n }\n\n @media (max-width: 640px) {\n .open-popup-button {\n right: 12px;\n width: 72px;\n height: 72px;\n font-size: 14px;\n }\n\n .open-popup-button::after {\n bottom: -24px;\n font-size: 10px;\n }\n\n .content-card {\n max-width: 92vw;\n padding: 48px 14px 16px;\n border-radius: 24px;\n }\n\n .label span {\n top: 14px;\n width: 100px;\n font-size: 9px;\n }\n\n .wheel-center {\n width: 74px;\n height: 74px;\n font-size: 18px;\n }\n\n .wheel {\n width: min(82vw, 330px, 44vh);\n height: min(82vw, 330px, 44vh);\n }\n\n .prize-highlight {\n min-width: 100%;\n }\n\n .prize-highlight span {\n font-size: 20px;\n }\n }\n\n @keyframes popup-enter {\n from {\n opacity: 0;\n transform: translateY(18px) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n }\n\n @keyframes float-confetti {\n 0%,\n 100% {\n transform: translateY(0) rotate(0deg);\n }\n\n 50% {\n transform: translateY(-12px) rotate(18deg);\n }\n }\n ")));
|
|
74689
|
+
};
|
|
74690
|
+
|
|
74442
74691
|
var css_248z$j = ".Freetext-module_background__oUp-J {\r\n background-size: cover !important;\r\n background-position: center !important;\r\n background-attachment: fixed !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: cover !important;\r\n -moz-background-size: cover !important;\r\n}\r\n@media (max-width: 800px) {\r\n .Freetext-module_background__oUp-J {\r\n background-size: contain !important;\r\n background-position: center !important;\r\n background-attachment: initial !important;\r\n background-repeat: no-repeat !important;\r\n -webkit-background-size: contain !important;\r\n -moz-background-size: contain !important;\r\n }\r\n}\r\n";
|
|
74443
74692
|
var sectionstyles$2 = {"background":"Freetext-module_background__oUp-J"};
|
|
74444
74693
|
styleInject(css_248z$j);
|
|
@@ -98180,6 +98429,7 @@
|
|
|
98180
98429
|
VideosSection: VideosSection,
|
|
98181
98430
|
FullVideoSection: FullVideoSection,
|
|
98182
98431
|
Popupcomponent: Popupcomponent,
|
|
98432
|
+
WheelSpin: WheelSpin,
|
|
98183
98433
|
PopupCountryComponent: PopupCountryComponent,
|
|
98184
98434
|
TextSectionConnectToWA: TextSectionConnectToWA,
|
|
98185
98435
|
DynamicForm: DynamicForm,
|