webs-sdk 0.16.9 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +398 -398
- package/dist/components/ARFilters/ARFilters.js +54 -54
- package/dist/components/AvatarAI.js +4 -4
- package/dist/components/CookieConsent/constants.js +31 -31
- package/dist/components/CreativeFaceSwap.js +12 -12
- package/dist/components/MemeGenerator.js +12 -12
- package/dist/components/SpinningWheel/SpinningWheel.js +7 -7
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/libraries/content.d.ts +1 -0
- package/dist/libraries/content.d.ts.map +1 -1
- package/dist/libraries/content.js +19 -0
- package/dist/libraries/content.js.map +1 -1
- package/dist/utils/useVideoValidation.d.ts +16 -0
- package/dist/utils/useVideoValidation.d.ts.map +1 -0
- package/dist/utils/useVideoValidation.js +82 -0
- package/dist/utils/useVideoValidation.js.map +1 -0
- package/dist/utils/videoValidation.d.ts +26 -0
- package/dist/utils/videoValidation.d.ts.map +1 -0
- package/dist/utils/videoValidation.js +182 -0
- package/dist/utils/videoValidation.js.map +1 -0
- package/package.json +43 -43
- package/public/spin2win/assets/border-afristream.svg +26 -26
- package/public/spin2win/assets/border-efc.svg +23 -23
- package/public/spin2win/assets/border-totalgym.svg +27 -27
- package/public/spin2win/assets/border-womantoday.svg +26 -26
- package/public/spin2win/assets/indicator-afristream.svg +28 -28
- package/public/spin2win/assets/indicator-efc.svg +29 -29
- package/public/spin2win/assets/indicator-totalgym.svg +29 -29
- package/public/spin2win/fonts/switzer/README.md +22 -22
- package/dist/client.d.ts +0 -2
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -7
- package/dist/client.js.map +0 -1
- package/dist/context/TranslationContext.d.ts +0 -12
- package/dist/context/TranslationContext.d.ts.map +0 -1
- package/dist/context/TranslationContext.js +0 -60
- package/dist/context/TranslationContext.js.map +0 -1
|
@@ -39,60 +39,60 @@ const useDeepAR_1 = require("./useDeepAR");
|
|
|
39
39
|
const FilterCarousel_1 = require("./FilterCarousel");
|
|
40
40
|
const Popups_1 = require("./Popups");
|
|
41
41
|
const constants_1 = require("./constants");
|
|
42
|
-
const DEEPAR_CSS = `
|
|
43
|
-
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
44
|
-
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
45
|
-
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
46
|
-
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
47
|
-
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
48
|
-
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
49
|
-
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
50
|
-
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
51
|
-
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:16px;z-index:20}
|
|
52
|
-
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
|
|
53
|
-
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.8);border-color:rgba(255,255,255,.5)}
|
|
54
|
-
.deepar-fullscreen-button:active{transform:scale(.95);background:rgba(0,0,0,.9)}
|
|
55
|
-
@media(max-width:768px){.deepar-fullscreen-button{width:56px;height:56px;background:rgba(0,0,0,.7)}}
|
|
56
|
-
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
57
|
-
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
58
|
-
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
59
|
-
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
60
|
-
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
61
|
-
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
62
|
-
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
63
|
-
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
64
|
-
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
65
|
-
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
66
|
-
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
67
|
-
.deepar-carousel-slides{display:flex;gap:16px}
|
|
68
|
-
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
69
|
-
.deepar-carousel-slide:hover{opacity:.8}
|
|
70
|
-
.deepar-carousel-slide.active{opacity:1}
|
|
71
|
-
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
72
|
-
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
73
|
-
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
74
|
-
.deepar-carousel-arrow.prev{left:16px}
|
|
75
|
-
.deepar-carousel-arrow.next{right:16px}
|
|
76
|
-
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
77
|
-
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
78
|
-
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
79
|
-
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
80
|
-
.deepar-selection-ring-camera{color:#fff}
|
|
81
|
-
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
82
|
-
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
83
|
-
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
84
|
-
.deepar-creation-buttons>*{pointer-events:all}
|
|
85
|
-
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
86
|
-
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
87
|
-
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
88
|
-
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
89
|
-
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
90
|
-
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
91
|
-
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
92
|
-
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
93
|
-
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
94
|
-
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
95
|
-
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
42
|
+
const DEEPAR_CSS = `
|
|
43
|
+
.deepar-container{position:relative;width:100%;max-width:800px;margin:0 auto;aspect-ratio:4/3;background-color:#000;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5),0 8px 16px rgba(0,0,0,.3)}
|
|
44
|
+
@media(max-width:768px){.deepar-container{max-width:100%;aspect-ratio:auto;height:70vh;max-height:600px;border-radius:8px}}
|
|
45
|
+
.deepar-canvas{width:100%;height:100%;object-fit:contain}
|
|
46
|
+
.deepar-loading-veil{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:10}
|
|
47
|
+
.deepar-loading-items{display:flex;flex-direction:column;align-items:center;gap:16px}
|
|
48
|
+
.deepar-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.1);border-top-color:#fff;border-radius:50%;animation:deepar-spin 1s linear infinite}
|
|
49
|
+
@keyframes deepar-spin{to{transform:rotate(360deg)}}
|
|
50
|
+
.deepar-loading-text{color:#fff;font-size:16px;font-weight:500}
|
|
51
|
+
.deepar-top-buttons{position:absolute;top:0;right:0;display:flex;gap:12px;padding:16px;z-index:20}
|
|
52
|
+
.deepar-fullscreen-button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:rgba(0,0,0,.6);border:2px solid rgba(255,255,255,.3);border-radius:8px;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
|
|
53
|
+
.deepar-fullscreen-button:hover{background:rgba(0,0,0,.8);border-color:rgba(255,255,255,.5)}
|
|
54
|
+
.deepar-fullscreen-button:active{transform:scale(.95);background:rgba(0,0,0,.9)}
|
|
55
|
+
@media(max-width:768px){.deepar-fullscreen-button{width:56px;height:56px;background:rgba(0,0,0,.7)}}
|
|
56
|
+
.deepar-recording-progress-bar{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:400px;height:8px;background:rgba(255,255,255,.2);border-radius:17px;overflow:hidden;z-index:5}
|
|
57
|
+
.deepar-time-progress{height:100%;background:#dc2626;border-radius:17px;transition:width 100ms linear}
|
|
58
|
+
.deepar-pause-recording-container{position:absolute;bottom:48px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;z-index:5}
|
|
59
|
+
.deepar-pause-recording-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
60
|
+
.deepar-pause-recording-inner{width:24px;height:24px;background:#dc2626;border-radius:4px}
|
|
61
|
+
.deepar-carousel-container{position:absolute;bottom:0;left:0;width:100%;visibility:hidden;opacity:0;transition:opacity .3s;z-index:4}
|
|
62
|
+
.deepar-carousel-container.visible{visibility:visible;opacity:1}
|
|
63
|
+
.deepar-carousel-wrapper{position:relative;display:flex;align-items:center;justify-content:center;padding:24px 0;background:linear-gradient(to top,rgba(0,0,0,1) 0%,rgba(0,0,0,.95) 50%,rgba(0,0,0,0) 100%)}
|
|
64
|
+
.deepar-carousel-content{position:relative;display:flex;align-items:center;justify-content:center;flex:1}
|
|
65
|
+
.deepar-carousel{max-width:368px;overflow:hidden;padding:0 20px}
|
|
66
|
+
@media(max-width:768px){.deepar-carousel{max-width:280px;padding:0 10px}}
|
|
67
|
+
.deepar-carousel-slides{display:flex;gap:16px}
|
|
68
|
+
.deepar-carousel-slide{flex:0 0 auto;cursor:pointer;transition:all .3s ease;opacity:.6}
|
|
69
|
+
.deepar-carousel-slide:hover{opacity:.8}
|
|
70
|
+
.deepar-carousel-slide.active{opacity:1}
|
|
71
|
+
.deepar-filter-thumb{width:64px;height:64px;border-radius:50%;overflow:hidden;transition:all .3s ease;border:3px solid rgba(255,255,255,.2)}
|
|
72
|
+
.deepar-carousel-slide.active .deepar-filter-thumb{width:76px;height:76px;border:3px solid rgba(255,255,255,1);box-shadow:0 0 0 8px rgba(0,0,0,.4)}
|
|
73
|
+
.deepar-carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.3);border-radius:50%;cursor:pointer;transition:all .3s;z-index:5;color:#fff}
|
|
74
|
+
.deepar-carousel-arrow.prev{left:16px}
|
|
75
|
+
.deepar-carousel-arrow.next{right:16px}
|
|
76
|
+
.deepar-carousel-arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.1);background:rgba(0,0,0,.6)}
|
|
77
|
+
.deepar-carousel-arrow:disabled{opacity:.3;cursor:not-allowed}
|
|
78
|
+
.deepar-selection-ring{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:110px;height:110px;background:rgba(0,0,0,.4);border:4px solid rgba(255,255,255,.9);border-radius:50%;cursor:pointer;z-index:6;transition:all .3s;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 8px rgba(0,0,0,.3)}
|
|
79
|
+
.deepar-selection-ring:hover{transform:translate(-50%,-50%) scale(1.05);border-color:#fff}
|
|
80
|
+
.deepar-selection-ring-camera{color:#fff}
|
|
81
|
+
.deepar-creation-container{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;z-index:8}
|
|
82
|
+
.deepar-created-video,.deepar-created-image{width:100%;height:100%;object-fit:cover}
|
|
83
|
+
.deepar-creation-buttons{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}
|
|
84
|
+
.deepar-creation-buttons>*{pointer-events:all}
|
|
85
|
+
.deepar-discard-button{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:8px;padding:12px 20px;background:rgba(0,0,0,.5);color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
|
|
86
|
+
.deepar-bottom-buttons-creation{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);display:flex;gap:16px}
|
|
87
|
+
.deepar-creation-button{display:flex;align-items:center;justify-content:center;width:80px;height:80px;background:rgba(0,0,0,.5);border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all .2s}
|
|
88
|
+
.deepar-creation-button:hover{background:rgba(0,0,0,.7);transform:scale(1.1)}
|
|
89
|
+
.deepar-popup{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:50}
|
|
90
|
+
.deepar-popup-box{background:#fff;border-radius:12px;padding:48px 32px;max-width:400px;width:90%;text-align:center}
|
|
91
|
+
.deepar-popup-image{margin:0 auto 20px;display:flex;align-items:center;justify-content:center}
|
|
92
|
+
.deepar-popup-title{font-size:18px;font-weight:600;color:#111;margin-bottom:24px}
|
|
93
|
+
.deepar-popup-button{display:inline-block;padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .2s}
|
|
94
|
+
.deepar-popup-button:hover{transform:scale(1.05)}
|
|
95
|
+
.deepar-download-success{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:16px 32px;background:rgba(34,197,94,.95);color:#fff;border-radius:8px;font-size:16px;font-weight:600;z-index:100}
|
|
96
96
|
`;
|
|
97
97
|
function ARFilters(props) {
|
|
98
98
|
(0, react_1.useEffect)(() => {
|
|
@@ -37,10 +37,10 @@ exports.AvatarAI = AvatarAI;
|
|
|
37
37
|
exports.AvatarAIForYouCard = AvatarAIForYouCard;
|
|
38
38
|
exports.AvatarAIPage = AvatarAIPage;
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
-
const AVATAR_AI_CSS = `
|
|
41
|
-
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
42
|
-
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
43
|
-
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
40
|
+
const AVATAR_AI_CSS = `
|
|
41
|
+
.avatarai-styles-grid::-webkit-scrollbar { width: 6px; }
|
|
42
|
+
.avatarai-styles-grid::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
|
|
43
|
+
.avatarai-styles-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
44
44
|
`;
|
|
45
45
|
const defaultStyles = [
|
|
46
46
|
{ id: 1, name: 'Pirate', image: 'https://cdn.smarthubtech.net/upload/20240426_135427_99796_1_cuadrada.png' },
|
|
@@ -5,36 +5,36 @@ exports.COOKIE_CONSENT_COOKIE_NAME = 'cookieConsent';
|
|
|
5
5
|
exports.COOKIE_CONSENT_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;
|
|
6
6
|
exports.TRACKING_PERMISSION_KEY = 'TRACKING_PERMISSION';
|
|
7
7
|
exports.FUNCTIONAL_PERMISSION_KEY = 'FUNCTIONAL_PERMISSION';
|
|
8
|
-
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
-
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
-
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
-
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
-
.cc-content{flex:1;min-width:0}
|
|
13
|
-
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
-
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
-
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
-
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
-
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
-
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
-
.cc-btn:hover{opacity:.88}
|
|
20
|
-
.cc-btn-essential{background:transparent}
|
|
21
|
-
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
-
.cc-config-link:hover{opacity:1}
|
|
23
|
-
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
-
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
-
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
-
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
-
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
-
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
-
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
-
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
-
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
-
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
-
.cc-checkbox:disabled{cursor:default}
|
|
34
|
-
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
-
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
-
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
-
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
-
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
8
|
+
exports.COOKIE_CONSENT_CSS = `
|
|
9
|
+
.cc-overlay{position:fixed;bottom:0;left:0;right:0;z-index:9999;padding:16px;box-sizing:border-box}
|
|
10
|
+
.cc-banner{max-width:960px;margin:0 auto;padding:24px 28px;border-radius:12px;box-shadow:0 -4px 32px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12);display:flex;gap:20px;align-items:flex-start;flex-wrap:wrap}
|
|
11
|
+
@media(min-width:640px){.cc-banner{flex-wrap:nowrap;align-items:center}}
|
|
12
|
+
.cc-content{flex:1;min-width:0}
|
|
13
|
+
.cc-title{font-size:16px;font-weight:700;margin:0 0 6px 0;line-height:1.3}
|
|
14
|
+
.cc-description{font-size:13px;line-height:1.55;margin:0;opacity:.85}
|
|
15
|
+
.cc-link{text-decoration:underline;cursor:pointer;margin-left:4px}
|
|
16
|
+
.cc-actions{display:flex;gap:8px;flex-shrink:0;flex-direction:column;align-items:stretch}
|
|
17
|
+
@media(min-width:480px){.cc-actions{flex-direction:row;align-items:center}}
|
|
18
|
+
.cc-btn{padding:10px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:opacity .2s;white-space:nowrap;line-height:1}
|
|
19
|
+
.cc-btn:hover{opacity:.88}
|
|
20
|
+
.cc-btn-essential{background:transparent}
|
|
21
|
+
.cc-config-link{background:none;border:none;cursor:pointer;font-size:12px;text-decoration:underline;padding:4px 0;font-family:inherit;line-height:1;opacity:.7;white-space:nowrap;display:block;text-align:center}
|
|
22
|
+
.cc-config-link:hover{opacity:1}
|
|
23
|
+
.cc-banner.cc-settings-mode{display:block}
|
|
24
|
+
.cc-settings-title{font-size:15px;font-weight:700;margin:0 0 14px 0}
|
|
25
|
+
.cc-settings-sep{border:none;border-top:1px solid rgba(255,255,255,.12);margin:0 0 16px}
|
|
26
|
+
.cc-category{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
|
|
27
|
+
.cc-category:last-of-type{margin-bottom:0}
|
|
28
|
+
.cc-category-row{display:flex;align-items:center;gap:10px}
|
|
29
|
+
.cc-category-label{font-size:13px;font-weight:600;cursor:pointer;user-select:none;line-height:1.3}
|
|
30
|
+
.cc-category-label.cc-mandatory{cursor:default;opacity:.55}
|
|
31
|
+
.cc-category-desc{font-size:12px;line-height:1.55;opacity:.7;padding-left:26px;margin:0}
|
|
32
|
+
.cc-checkbox{width:15px;height:15px;flex-shrink:0;cursor:pointer;margin:0}
|
|
33
|
+
.cc-checkbox:disabled{cursor:default}
|
|
34
|
+
.cc-settings-footer{display:flex;justify-content:flex-end;margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12)}
|
|
35
|
+
.cc-enter{animation:cc-slideup .28s ease-out}
|
|
36
|
+
.cc-exit{animation:cc-slidedown .22s ease-in forwards}
|
|
37
|
+
@keyframes cc-slideup{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}
|
|
38
|
+
@keyframes cc-slidedown{from{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}
|
|
39
39
|
`;
|
|
40
40
|
//# sourceMappingURL=constants.js.map
|
|
@@ -41,18 +41,18 @@ exports.CreativeFaceSwapPage = CreativeFaceSwapPage;
|
|
|
41
41
|
exports.CreativeFaceSwap = CreativeFaceSwap;
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const link_1 = __importDefault(require("next/link"));
|
|
44
|
-
const FACESWAP_CSS = `
|
|
45
|
-
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
46
|
-
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
47
|
-
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
48
|
-
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
49
|
-
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
50
|
-
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
51
|
-
@media (max-width: 768px) {
|
|
52
|
-
.faceswap-layout { flex-direction: column; }
|
|
53
|
-
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
54
|
-
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
55
|
-
}
|
|
44
|
+
const FACESWAP_CSS = `
|
|
45
|
+
.faceswap-layout { display: flex; flex-direction: row; align-items: stretch; }
|
|
46
|
+
.faceswap-col-left { width: 30%; min-width: 280px; background: white; border: 1px solid #e5e7eb; display: flex; flex-direction: column; }
|
|
47
|
+
.faceswap-col-right { flex: 1; background: white; border: 1px solid #e5e7eb; border-left: none; display: flex; flex-direction: column; }
|
|
48
|
+
.faceswap-col-right > div:first-child { flex: 0 0 auto; }
|
|
49
|
+
.faceswap-col-right > div:last-child { flex: 1; display: flex; flex-direction: column; }
|
|
50
|
+
.faceswap-col-right > div:last-child > .faceswap-result-area { flex: 1; min-height: 0; }
|
|
51
|
+
@media (max-width: 768px) {
|
|
52
|
+
.faceswap-layout { flex-direction: column; }
|
|
53
|
+
.faceswap-col-left { width: 100%; min-width: unset; }
|
|
54
|
+
.faceswap-col-right { border-left: 1px solid #e5e7eb; border-top: none; width: 100%; }
|
|
55
|
+
}
|
|
56
56
|
`;
|
|
57
57
|
function CreativeFaceSwapForYouCard({ title, description, ctaText, ctaHref, desktopImage, mobileImage, imageAlt = '', imageOnRight = true, titleColor = '#001B5E', descriptionColor = '#001B5E', ctaColor = '#FF5500', ctaHoverColor = '#ff1600', backgroundColor = '#F9F9F9', paddingClass = 'py-12 md:py-16 lg:py-20', }) {
|
|
58
58
|
const effectiveMobileImage = mobileImage || desktopImage;
|
|
@@ -63,18 +63,18 @@ const defaultTexts = {
|
|
|
63
63
|
noMemes: 'No memes available',
|
|
64
64
|
};
|
|
65
65
|
const TEXT_SHADOW = '2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000';
|
|
66
|
-
const MEME_CSS = `
|
|
67
|
-
.memegen-grid {
|
|
68
|
-
display: grid;
|
|
69
|
-
grid-template-columns: 1fr;
|
|
70
|
-
gap: 24px;
|
|
71
|
-
align-items: stretch;
|
|
72
|
-
}
|
|
73
|
-
@media (min-width: 1024px) {
|
|
74
|
-
.memegen-grid {
|
|
75
|
-
grid-template-columns: 1fr 1fr;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
66
|
+
const MEME_CSS = `
|
|
67
|
+
.memegen-grid {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: 1fr;
|
|
70
|
+
gap: 24px;
|
|
71
|
+
align-items: stretch;
|
|
72
|
+
}
|
|
73
|
+
@media (min-width: 1024px) {
|
|
74
|
+
.memegen-grid {
|
|
75
|
+
grid-template-columns: 1fr 1fr;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
78
|
`;
|
|
79
79
|
function MemeGenerator({ memes: memesProp, config, fonts = defaultFonts, defaultMemeIndex = 0, theme = {}, texts = {}, imageProxyUrl, onDownload, }) {
|
|
80
80
|
const mergedTheme = Object.assign(Object.assign({}, defaultTheme), theme);
|
|
@@ -269,13 +269,13 @@ function SpinningWheel({ config: configProp, onResult, onError, canSpin = true,
|
|
|
269
269
|
const backgroundAsset = currentTheme.backgroundAsset;
|
|
270
270
|
return (react_1.default.createElement("div", { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '32px', padding: '32px', minHeight: '100vh', overflow: 'hidden' } },
|
|
271
271
|
backgroundAsset && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
272
|
-
react_1.default.createElement("style", null, `
|
|
273
|
-
.sw-bg-desktop { display: block; }
|
|
274
|
-
.sw-bg-mobile { display: none; }
|
|
275
|
-
@media (max-width: 767px) {
|
|
276
|
-
.sw-bg-desktop { display: none; }
|
|
277
|
-
.sw-bg-mobile { display: block; }
|
|
278
|
-
}
|
|
272
|
+
react_1.default.createElement("style", null, `
|
|
273
|
+
.sw-bg-desktop { display: block; }
|
|
274
|
+
.sw-bg-mobile { display: none; }
|
|
275
|
+
@media (max-width: 767px) {
|
|
276
|
+
.sw-bg-desktop { display: none; }
|
|
277
|
+
.sw-bg-mobile { display: block; }
|
|
278
|
+
}
|
|
279
279
|
`),
|
|
280
280
|
react_1.default.createElement("img", { src: backgroundAsset.desktop, alt: "", className: "sw-bg-desktop", style: {
|
|
281
281
|
position: 'absolute',
|
package/dist/index.d.ts
CHANGED
|
@@ -70,5 +70,8 @@ declare const WebsSDK: {
|
|
|
70
70
|
Calypso: CalypsoManager;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
+
export { validateVideoUrl, validateVideoBatch, clearValidationCache, getCacheStats, cleanExpiredCache, validationCache, } from './utils/videoValidation';
|
|
74
|
+
export type { VideoValidationState, VideoValidationConfig, } from './utils/videoValidation';
|
|
75
|
+
export { useValidateVideoOnMount, useLazyVideoValidation, } from './utils/useVideoValidation';
|
|
73
76
|
export default WebsSDK;
|
|
74
77
|
//# sourceMappingURL=index.d.ts.map
|
package/d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4B,CAAC;AAGpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,GACX,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAG7D,KAAK,YAAY,GAAG;IAChB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;CAC3B,GAAG,IAAI,CAAC;AAET,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;mBAkBc,YAAY;;qBAxBtB,gBAAgB;cACvB,gBAAgB;mBACX,cAAc;iBAChB,cAAc;;CAkC1B,CAAC;AAGF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,eAAe,OAAO,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.trackGAEvent = exports.updateGAConsent = exports.initGoogleAnalytics = exports.handleCDNRequest = exports.getCookieConsentTexts = exports.CookieConsent = exports.getBestImage = exports.addImageSuffix = exports.formatTimeAgo = exports.EsportsLiveAPI = exports.createEsportsLiveAPI = exports.EsportsLive = exports.EsportsVideosAPI = exports.createEsportsVideosAPI = exports.EsportsVideos = exports.EsportsNewsAPI = exports.createEsportsNewsAPI = exports.EsportsNews = exports.StickersForYouCard = exports.Stickers = exports.QuizForYouCard = exports.Quiz = exports.createSpinningWheelAPI = exports.SpinningWheelAPI = exports.afristreamConfig = exports.womanTodayConfig = exports.totalGymConfig = exports.vodacomConfig = exports.wheelThemes = exports.SpinningWheel = exports.ARFiltersForYouCard = exports.getARFiltersTexts = exports.ARFilters = exports.MemeGeneratorForYouCard = exports.MemeGenerator = exports.AETemplatesSection = exports.WallpapersNameForYouCard = exports.WallpapersNamePage = exports.WallpapersName = exports.RingtoneForYouCard = exports.Ringtone = exports.WallpapersForYouCard = exports.WallpapersPage = exports.Wallpapers = exports.CreativeFaceSwapPage = exports.CreativeFaceSwapForYouCard = exports.CreativeFaceSwap = exports.AvatarAIForYouCard = exports.AvatarAIPage = exports.AvatarAI = void 0;
|
|
7
|
-
exports.isGALoaded = exports.trackGAPageView = void 0;
|
|
7
|
+
exports.useLazyVideoValidation = exports.useValidateVideoOnMount = exports.validationCache = exports.cleanExpiredCache = exports.getCacheStats = exports.clearValidationCache = exports.validateVideoBatch = exports.validateVideoUrl = exports.isGALoaded = exports.trackGAPageView = void 0;
|
|
8
8
|
const networking_1 = __importDefault(require("./libraries/networking"));
|
|
9
9
|
const auth_1 = __importDefault(require("./libraries/auth"));
|
|
10
10
|
const i18n_1 = __importDefault(require("./libraries/i18n"));
|
|
@@ -115,5 +115,15 @@ const WebsSDK = {
|
|
|
115
115
|
return this._preInstances;
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
+
var videoValidation_1 = require("./utils/videoValidation");
|
|
119
|
+
Object.defineProperty(exports, "validateVideoUrl", { enumerable: true, get: function () { return videoValidation_1.validateVideoUrl; } });
|
|
120
|
+
Object.defineProperty(exports, "validateVideoBatch", { enumerable: true, get: function () { return videoValidation_1.validateVideoBatch; } });
|
|
121
|
+
Object.defineProperty(exports, "clearValidationCache", { enumerable: true, get: function () { return videoValidation_1.clearValidationCache; } });
|
|
122
|
+
Object.defineProperty(exports, "getCacheStats", { enumerable: true, get: function () { return videoValidation_1.getCacheStats; } });
|
|
123
|
+
Object.defineProperty(exports, "cleanExpiredCache", { enumerable: true, get: function () { return videoValidation_1.cleanExpiredCache; } });
|
|
124
|
+
Object.defineProperty(exports, "validationCache", { enumerable: true, get: function () { return videoValidation_1.validationCache; } });
|
|
125
|
+
var useVideoValidation_1 = require("./utils/useVideoValidation");
|
|
126
|
+
Object.defineProperty(exports, "useValidateVideoOnMount", { enumerable: true, get: function () { return useVideoValidation_1.useValidateVideoOnMount; } });
|
|
127
|
+
Object.defineProperty(exports, "useLazyVideoValidation", { enumerable: true, get: function () { return useVideoValidation_1.useLazyVideoValidation; } });
|
|
118
128
|
exports.default = WebsSDK;
|
|
119
129
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,wEAAqD;AACrD,4DAAgD;AAChD,4DAAgD;AAChD,kEAA+C;AAC/C,8DAA2C;AAC3C,sEAAmD;AACnD,kEAAsD;AACtD,kEAA+C;AAC/C,oEAAiD;AACjD,8DAA2C;AAC3C,sEAA8D;AAC9D,8DAAkD;AAClD,kEAAiD;AACjD,4DAAgD;AAChD,sDAA8B;AAE9B,kDAI+B;AAH7B,oGAAA,QAAQ,OAAA;AACR,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAapB,kEAIuC;AAHrC,oHAAA,gBAAgB,OAAA;AAChB,8HAAA,0BAA0B,OAAA;AAC1B,wHAAA,oBAAoB,OAAA;AAYtB,sDAIiC;AAH/B,wGAAA,UAAU,OAAA;AACV,4GAAA,cAAc,OAAA;AACd,kHAAA,oBAAoB,OAAA;AAYtB,kDAG+B;AAF7B,oGAAA,QAAQ,OAAA;AACR,8GAAA,kBAAkB,OAAA;AAWpB,8DAKqC;AAJnC,gHAAA,cAAc,OAAA;AACd,oHAAA,k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AAgB,CAAC,eAAe,CAAC;gBAC3C,SAAS,EAAE,IAAI,mBAAc,CAAC,eAAe,CAAC;gBAC9C,OAAO,EAAE,IAAI,iBAAc,CAAC,eAAe,CAAC;aAC/C,CAAC;QACN,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ,CAAC;AAGF,2DAOiC;AAN/B,mHAAA,gBAAgB,OAAA;AAChB,qHAAA,kBAAkB,OAAA;AAClB,uHAAA,oBAAoB,OAAA;AACpB,gHAAA,aAAa,OAAA;AACb,oHAAA,iBAAiB,OAAA;AACjB,kHAAA,eAAe,OAAA;AAOjB,iEAGoC;AAFlC,6HAAA,uBAAuB,OAAA;AACvB,4HAAA,sBAAsB,OAAA;AAGxB,kBAAe,OAAO,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare class ContentManager {
|
|
2
2
|
constructor();
|
|
3
3
|
getContentByPreset(preset: string, params: Record<string, any>): Promise<any>;
|
|
4
|
+
getCollection(tags: string[], language?: string, preprod?: boolean): Promise<any>;
|
|
4
5
|
}
|
|
5
6
|
export default ContentManager;
|
|
6
7
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/libraries/content.ts"],"names":[],"mappings":"AAKA,qBAAa,cAAc;;IAKjB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/libraries/content.ts"],"names":[],"mappings":"AAKA,qBAAa,cAAc;;IAKjB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAc7E,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAa,EAAE,OAAO,GAAE,OAAe,GAAG,OAAO,CAAC,GAAG,CAAC;CAmBvG;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -21,6 +21,25 @@ class ContentManager {
|
|
|
21
21
|
throw error;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
async getCollection(tags, language = 'en', preprod = false) {
|
|
25
|
+
const base = preprod ? config_1.default.preprodBackendBaseUrl : config_1.default.backendBaseUrl;
|
|
26
|
+
const url = `${base}/fluver/get-collection`;
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetch(url, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
|
|
31
|
+
body: JSON.stringify({ tags, language }),
|
|
32
|
+
});
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
throw new Error(`getCollection upstream error: ${response.status}`);
|
|
35
|
+
}
|
|
36
|
+
return await response.json();
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error('Failed to fetch collection by tags:', error);
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
24
43
|
}
|
|
25
44
|
exports.ContentManager = ContentManager;
|
|
26
45
|
exports.default = ContentManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/libraries/content.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA2C;AAC3C,uDAA+B;AAE/B,MAAM,UAAU,GAAG,IAAI,oBAAe,EAAE,CAAC;AAEzC,MAAa,cAAc;IACvB;IAEA,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,MAAc,EAAE,MAA2B;QAChE,MAAM,GAAG,GAAG,GAAG,gBAAM,CAAC,UAAU,GAAG,gBAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC/D,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC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AAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAE;gBAC7E,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;aAC3C,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;YAC5D,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CAEJ;AAtCD,wCAsCC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VideoValidationState, type VideoValidationConfig } from './videoValidation';
|
|
2
|
+
export declare function useValidateVideoOnMount(videoUrl: string | undefined, config?: VideoValidationConfig): {
|
|
3
|
+
validationState: VideoValidationState;
|
|
4
|
+
isValidating: boolean;
|
|
5
|
+
isValid: boolean;
|
|
6
|
+
isInvalid: boolean;
|
|
7
|
+
isUnknown: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function useLazyVideoValidation(config?: VideoValidationConfig): {
|
|
10
|
+
validate: (videoUrl: string) => Promise<VideoValidationState>;
|
|
11
|
+
validationState: VideoValidationState;
|
|
12
|
+
isValidating: boolean;
|
|
13
|
+
isValid: boolean;
|
|
14
|
+
isInvalid: boolean;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useVideoValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVideoValidation.d.ts","sourceRoot":"","sources":["../../src/utils/useVideoValidation.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAe3B,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,MAAM,GAAE,qBAA0B;;;;;;EAgDnC;AAeD,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,qBAA0B;yBAIrC,MAAM,KAAG,OAAO,CAAC,oBAAoB,CAAC;;;;;EAgCzE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useValidateVideoOnMount = useValidateVideoOnMount;
|
|
4
|
+
exports.useLazyVideoValidation = useLazyVideoValidation;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const videoValidation_1 = require("./videoValidation");
|
|
7
|
+
function useValidateVideoOnMount(videoUrl, config = {}) {
|
|
8
|
+
const [validationState, setValidationState] = (0, react_1.useState)('unknown');
|
|
9
|
+
const [isValidating, setIsValidating] = (0, react_1.useState)(false);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
let cancelled = false;
|
|
12
|
+
const performValidation = async () => {
|
|
13
|
+
if (!videoUrl || videoUrl.trim() === '') {
|
|
14
|
+
if (!cancelled) {
|
|
15
|
+
setValidationState('unknown');
|
|
16
|
+
setIsValidating(false);
|
|
17
|
+
}
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!cancelled) {
|
|
21
|
+
setIsValidating(true);
|
|
22
|
+
setValidationState('validating');
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const state = await (0, videoValidation_1.validateVideoUrl)(videoUrl, Object.assign({ verbose: process.env.NODE_ENV === 'development' }, config));
|
|
26
|
+
if (!cancelled)
|
|
27
|
+
setValidationState(state);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error('[useVideoValidation] Validation error:', error);
|
|
31
|
+
if (!cancelled)
|
|
32
|
+
setValidationState('invalid');
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
if (!cancelled)
|
|
36
|
+
setIsValidating(false);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
performValidation();
|
|
40
|
+
return () => { cancelled = true; };
|
|
41
|
+
}, [videoUrl]);
|
|
42
|
+
return {
|
|
43
|
+
validationState,
|
|
44
|
+
isValidating,
|
|
45
|
+
isValid: validationState === 'valid',
|
|
46
|
+
isInvalid: validationState === 'invalid',
|
|
47
|
+
isUnknown: validationState === 'unknown',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function useLazyVideoValidation(config = {}) {
|
|
51
|
+
const [validationState, setValidationState] = (0, react_1.useState)('unknown');
|
|
52
|
+
const [isValidating, setIsValidating] = (0, react_1.useState)(false);
|
|
53
|
+
const validate = async (videoUrl) => {
|
|
54
|
+
if (!videoUrl || videoUrl.trim() === '') {
|
|
55
|
+
setValidationState('invalid');
|
|
56
|
+
return 'invalid';
|
|
57
|
+
}
|
|
58
|
+
setIsValidating(true);
|
|
59
|
+
setValidationState('validating');
|
|
60
|
+
try {
|
|
61
|
+
const state = await (0, videoValidation_1.validateVideoUrl)(videoUrl, Object.assign({ verbose: process.env.NODE_ENV === 'development' }, config));
|
|
62
|
+
setValidationState(state);
|
|
63
|
+
return state;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error('[useLazyVideoValidation] Validation error:', error);
|
|
67
|
+
setValidationState('invalid');
|
|
68
|
+
return 'invalid';
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
setIsValidating(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
validate,
|
|
76
|
+
validationState,
|
|
77
|
+
isValidating,
|
|
78
|
+
isValid: validationState === 'valid',
|
|
79
|
+
isInvalid: validationState === 'invalid',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=useVideoValidation.js.map
|
|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EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,KAAK,CAAC,CAAC;YACnE,kBAAkB,CAAC,SAAS,CAAC,CAAC;YAC9B,OAAO,SAAS,CAAC;QACnB,CAAC;gBAAS,CAAC;YACT,eAAe,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,eAAe;QACf,YAAY;QACZ,OAAO,EAAE,eAAe,KAAK,OAAO;QACpC,SAAS,EAAE,eAAe,KAAK,SAAS;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type VideoValidationState = 'unknown' | 'valid' | 'invalid' | 'validating';
|
|
2
|
+
interface CacheEntry {
|
|
3
|
+
state: VideoValidationState;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
}
|
|
6
|
+
export interface VideoValidationConfig {
|
|
7
|
+
cacheTTL?: number;
|
|
8
|
+
headRequestTimeout?: number;
|
|
9
|
+
videoElementTimeout?: number;
|
|
10
|
+
verbose?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const validationCache: Map<string, CacheEntry>;
|
|
13
|
+
export declare function getCacheStats(): {
|
|
14
|
+
size: number;
|
|
15
|
+
entries: {
|
|
16
|
+
url: string;
|
|
17
|
+
state: VideoValidationState;
|
|
18
|
+
age: number;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
export declare function clearValidationCache(): void;
|
|
22
|
+
export declare function cleanExpiredCache(ttl?: number): number;
|
|
23
|
+
export declare function validateVideoUrl(url: string, config?: VideoValidationConfig): Promise<VideoValidationState>;
|
|
24
|
+
export declare function validateVideoBatch(urls: string[], concurrency?: number, config?: VideoValidationConfig): Promise<Map<string, VideoValidationState>>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=videoValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoValidation.d.ts","sourceRoot":"","sources":["../../src/utils/videoValidation.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAC;AAElF,UAAU,UAAU;IAClB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,qBAAqB;IAEpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAUD,eAAO,MAAM,eAAe,yBAAgC,CAAC;AAG7D,wBAAgB,aAAa;;;;;;;EAS5B;AAGD,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAGD,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAgC,GAAG,MAAM,CAU/E;AAUD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,MAAM,GAAE,qBAA0B,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAiD/B;AAQD,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EAAE,EACd,WAAW,SAAI,EACf,MAAM,GAAE,qBAA0B,GACjC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAa5C"}
|