@fynd-design-engineering/fynd-one-v2 3.4.63 → 3.4.65
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/accordians/dropdown.js +1 -95
- package/dist/accordians/index.js +1 -391
- package/dist/cms-listing/index.js +1 -24
- package/dist/filters/clear-search.js +1 -32
- package/dist/filters/konnect.js +1 -165
- package/dist/filters/show-count.js +1 -66
- package/dist/form/country-dropdown.css +1 -160
- package/dist/form/cs-gated-redirection.js +1 -40
- package/dist/form/download-file.js +1 -70
- package/dist/form/validation.css +1 -1019
- package/dist/form/validation.js +7 -10611
- package/dist/global/anchor-scroll.js +1 -174
- package/dist/global/auth.js +1 -87
- package/dist/global/chat.js +1 -185
- package/dist/global/console-links.js +1 -89
- package/dist/global/contact-popup.js +2 -83
- package/dist/global/css/in-page-embed.css +1 -1043
- package/dist/global/css/in-project-settings.css +1 -173
- package/dist/global/css/temp.css +1 -89
- package/dist/global/custom-bg-video.js +1 -40
- package/dist/global/footer-accordion.js +1 -44
- package/dist/global/lazy-loader.js +1 -135
- package/dist/global/loader.js +2 -166
- package/dist/global/media-card.js +1 -166
- package/dist/global/miscellaneous.js +1 -136
- package/dist/global/number-count.js +1 -82
- package/dist/global/popup-video.js +1 -276
- package/dist/global/progressive-scroll.js +1 -222
- package/dist/global/responsive-video.js +1 -321
- package/dist/global/style.css +1 -1065
- package/dist/global/video-card.js +1 -50
- package/dist/hacktimus/2025.js +1 -177
- package/dist/hacktimus/styles.css +1 -91
- package/dist/home/index.js +1 -17
- package/dist/marquee/index.js +1 -3104
- package/dist/marquee/marquee-swiper.js +1 -36
- package/dist/navigation/announcement/index.js +1 -5169
- package/dist/navigation/context-menu/index.js +1 -31
- package/dist/navigation/desktop/index.js +1 -4603
- package/dist/navigation/initialization.js +1 -602
- package/dist/navigation/main.js +1 -4911
- package/dist/navigation/mobile/index.js +1 -286
- package/dist/navigation/scroll/index.js +1 -62
- package/dist/navigation/secondary-navigation/index.js +1 -437
- package/dist/navigation/style.css +1 -154
- package/dist/navigation/temp.css +0 -2
- package/dist/navigation/theme.css +1 -69
- package/dist/navigation-v2/index.js +1 -4990
- package/dist/navigation-v2/styles.css +1 -233
- package/dist/others/feature-detail.js +1 -75
- package/dist/others/geolocation.js +1 -50
- package/dist/others/hero-aniamtion.js +1 -53
- package/dist/others/hero-india-animation-2.js +1 -70
- package/dist/others/hero-india-animation.js +1 -93
- package/dist/others/home-solution-tab.js +1 -115
- package/dist/others/storefront-chat/index.js +1 -487
- package/dist/others/storefront-chat/styles.css +1 -107
- package/dist/playbook-2026/hero-reveal.js +1 -47
- package/dist/playbook-2026/index.js +1 -536
- package/dist/playbook-2026/styles.css +1 -110
- package/dist/posthog-and-ga/attributes.js +1 -190
- package/dist/posthog-and-ga/main.js +1 -528
- package/dist/progressive-scroll/index.js +1 -147
- package/dist/quick-fix/reload.js +1 -22
- package/dist/seo/schema.js +1 -465
- package/dist/slider/freescroll.js +1 -34
- package/dist/test/sample.js +1 -15
- package/dist/testimonials/index.js +1 -2654
- package/dist/timeline/index.js +1 -160
- package/dist/timeline/style.css +1 -42
- package/dist/tracking/custom-id.js +1 -75
- package/dist/tracking/fill-form-fields.js +1 -238
- package/dist/tracking/form-tracker.js +1 -146
- package/dist/tracking/page-categories.js +1 -20
- package/dist/tracking/user-journey.js +1 -839
- package/dist/tracking/utm-links.js +1 -194
- package/dist/utils/sample.js +1 -17
- package/dist/validations/localhost.js +1 -221
- package/package.json +1 -1
|
@@ -1,286 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// bin/live-reload.js
|
|
4
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
-
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
-
"change",
|
|
7
|
-
() => location.reload()
|
|
8
|
-
);
|
|
9
|
-
} else {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/navigation/mobile/index.ts
|
|
13
|
-
var ANIMATION_TIMINGS = {
|
|
14
|
-
NESTED_MENU_DELAY: 10,
|
|
15
|
-
NESTED_MENU_CLOSE_DELAY: 500,
|
|
16
|
-
MAIN_MENU_CLOSE_TIMEOUT: 300
|
|
17
|
-
// Add timeout for main menu close
|
|
18
|
-
};
|
|
19
|
-
var SELECTORS = {
|
|
20
|
-
NESTED_MENU: '[data-mobile-nav="nested-menu"]',
|
|
21
|
-
MAIN_MENU: '[data-mobile-nav="main-menu"]',
|
|
22
|
-
TOGGLE_MAIN_MENU: '[data-nav-toggle="main-menu"]',
|
|
23
|
-
TOGGLE_NESTED_MENU: '[data-nav-toggle="nested-menu"]',
|
|
24
|
-
MAIN_MENU_LINKS: "[data-mobile-link]",
|
|
25
|
-
NAV_OVERLAY: '[data-nav-element="overlay"]',
|
|
26
|
-
OPEN_ICON: '[data-menu-icon="open"]',
|
|
27
|
-
CLOSE_ICON: '[data-menu-icon="close"]',
|
|
28
|
-
MOBILE_MENU: "[data-mobile-menu]"
|
|
29
|
-
};
|
|
30
|
-
var MobileNavigation = class {
|
|
31
|
-
constructor() {
|
|
32
|
-
this.state = {
|
|
33
|
-
isMainMenuOpen: false,
|
|
34
|
-
isNestedMenuOpen: false
|
|
35
|
-
};
|
|
36
|
-
this.isAnimating = false;
|
|
37
|
-
this.elements = this.getElements();
|
|
38
|
-
this.init();
|
|
39
|
-
}
|
|
40
|
-
getElements() {
|
|
41
|
-
const nestedMenu = document.querySelector(SELECTORS.NESTED_MENU);
|
|
42
|
-
const mainMenu = document.querySelector(SELECTORS.MAIN_MENU);
|
|
43
|
-
const navOverlay = document.querySelector(SELECTORS.NAV_OVERLAY);
|
|
44
|
-
const openIcons = document.querySelectorAll(SELECTORS.OPEN_ICON);
|
|
45
|
-
const closeIcons = document.querySelectorAll(SELECTORS.CLOSE_ICON);
|
|
46
|
-
if (!nestedMenu || !mainMenu || !navOverlay || openIcons.length === 0 || closeIcons.length === 0) {
|
|
47
|
-
throw new Error("Required navigation elements not found");
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
nestedMenu,
|
|
51
|
-
mainMenu,
|
|
52
|
-
toggleMainMenuButtons: document.querySelectorAll(SELECTORS.TOGGLE_MAIN_MENU),
|
|
53
|
-
toggleNestedMenuButtons: document.querySelectorAll(SELECTORS.TOGGLE_NESTED_MENU),
|
|
54
|
-
mainMenuLinks: document.querySelectorAll(SELECTORS.MAIN_MENU_LINKS),
|
|
55
|
-
navOverlay,
|
|
56
|
-
openIcons,
|
|
57
|
-
closeIcons
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
init() {
|
|
61
|
-
this.setupInitialStyles();
|
|
62
|
-
this.bindEventListeners();
|
|
63
|
-
}
|
|
64
|
-
setupInitialStyles() {
|
|
65
|
-
this.elements.nestedMenu.style.display = "none";
|
|
66
|
-
this.elements.nestedMenu.style.transform = "translateX(100%)";
|
|
67
|
-
this.elements.nestedMenu.style.transition = "transform 0.5s ease";
|
|
68
|
-
this.elements.mainMenu.style.display = "block";
|
|
69
|
-
this.elements.mainMenu.style.height = "0dvh";
|
|
70
|
-
this.elements.mainMenu.style.transition = "height 0.3s ease-in-out";
|
|
71
|
-
this.elements.openIcons.forEach((icon) => {
|
|
72
|
-
icon.style.transition = "opacity 0.2s ease";
|
|
73
|
-
});
|
|
74
|
-
this.elements.closeIcons.forEach((icon) => {
|
|
75
|
-
icon.style.transition = "opacity 0.2s ease";
|
|
76
|
-
});
|
|
77
|
-
this.updateMenuIcons(false);
|
|
78
|
-
}
|
|
79
|
-
bindEventListeners() {
|
|
80
|
-
this.elements.toggleMainMenuButtons.forEach((button, index) => {
|
|
81
|
-
button.addEventListener("click", (e) => {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
console.log(`Main menu button ${index} clicked, current state:`, this.state.isMainMenuOpen);
|
|
84
|
-
this.handleMainMenuToggle(button);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
this.elements.toggleNestedMenuButtons.forEach((button, index) => {
|
|
88
|
-
button.addEventListener("click", (e) => {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
console.log(`Nested menu button ${index} clicked, current state:`, this.state.isNestedMenuOpen);
|
|
91
|
-
this.handleNestedMenuToggle(button);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
this.elements.mainMenuLinks.forEach((link) => {
|
|
95
|
-
link.addEventListener("click", (event) => {
|
|
96
|
-
const target = event.currentTarget;
|
|
97
|
-
const attrValue = target.getAttribute("data-mobile-link");
|
|
98
|
-
if (attrValue) {
|
|
99
|
-
console.log(`Menu link clicked: ${attrValue}`);
|
|
100
|
-
this.replaceContent(attrValue);
|
|
101
|
-
this.toggleNestedMenu();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
openMainMenu() {
|
|
107
|
-
if (this.state.isMainMenuOpen) {
|
|
108
|
-
console.log("Main menu already open, skipping");
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const { mainMenu } = this.elements;
|
|
112
|
-
this.isAnimating = true;
|
|
113
|
-
mainMenu.style.overflow = "hidden";
|
|
114
|
-
mainMenu.style.display = "block";
|
|
115
|
-
mainMenu.style.height = "0dvh";
|
|
116
|
-
this.state.isMainMenuOpen = true;
|
|
117
|
-
this.updateMenuIcons(true);
|
|
118
|
-
requestAnimationFrame(() => {
|
|
119
|
-
mainMenu.style.height = "100dvh";
|
|
120
|
-
const handleOpenComplete = () => {
|
|
121
|
-
this.isAnimating = false;
|
|
122
|
-
console.log("\u{1F354} Main menu OPENED (animation complete)");
|
|
123
|
-
};
|
|
124
|
-
mainMenu.addEventListener("transitionend", handleOpenComplete, { once: true });
|
|
125
|
-
setTimeout(() => {
|
|
126
|
-
this.isAnimating = false;
|
|
127
|
-
}, 350);
|
|
128
|
-
});
|
|
129
|
-
console.log("\u{1F354} Main menu OPENING...");
|
|
130
|
-
}
|
|
131
|
-
closeMainMenu() {
|
|
132
|
-
if (!this.state.isMainMenuOpen) {
|
|
133
|
-
console.log("Main menu already closed, skipping");
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const { mainMenu } = this.elements;
|
|
137
|
-
this.isAnimating = true;
|
|
138
|
-
this.state.isMainMenuOpen = false;
|
|
139
|
-
this.updateMenuIcons(false);
|
|
140
|
-
mainMenu.style.height = "0dvh";
|
|
141
|
-
let animationCompleted = false;
|
|
142
|
-
const completeClose = () => {
|
|
143
|
-
if (animationCompleted) return;
|
|
144
|
-
animationCompleted = true;
|
|
145
|
-
mainMenu.style.display = "none";
|
|
146
|
-
this.isAnimating = false;
|
|
147
|
-
console.log("\u{1F354} Main menu CLOSED (animation complete)");
|
|
148
|
-
};
|
|
149
|
-
const handleTransitionEnd = (e) => {
|
|
150
|
-
if (e.target === mainMenu && e.propertyName === "height") {
|
|
151
|
-
completeClose();
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
mainMenu.addEventListener("transitionend", handleTransitionEnd, { once: true });
|
|
155
|
-
setTimeout(() => {
|
|
156
|
-
completeClose();
|
|
157
|
-
}, ANIMATION_TIMINGS.MAIN_MENU_CLOSE_TIMEOUT);
|
|
158
|
-
console.log("\u{1F354} Main menu CLOSING...");
|
|
159
|
-
}
|
|
160
|
-
handleMainMenuToggle(clickedButton) {
|
|
161
|
-
console.log("Handling main menu toggle. Current state:", this.state.isMainMenuOpen, "Is animating:", this.isAnimating);
|
|
162
|
-
if (this.isAnimating) {
|
|
163
|
-
console.log("Animation in progress, ignoring click");
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
if (this.state.isMainMenuOpen) {
|
|
167
|
-
this.closeMainMenu();
|
|
168
|
-
if (this.state.isNestedMenuOpen) {
|
|
169
|
-
this.closeNestedMenu();
|
|
170
|
-
}
|
|
171
|
-
} else {
|
|
172
|
-
this.openMainMenu();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
handleNestedMenuToggle(clickedButton) {
|
|
176
|
-
console.log("Handling nested menu toggle. Current state:", this.state.isNestedMenuOpen, "Is animating:", this.isAnimating);
|
|
177
|
-
if (this.isAnimating) {
|
|
178
|
-
console.log("Animation in progress, ignoring click");
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
if (this.state.isNestedMenuOpen) {
|
|
182
|
-
this.closeNestedMenu();
|
|
183
|
-
} else {
|
|
184
|
-
this.openNestedMenu();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
toggleMainMenu() {
|
|
188
|
-
console.log("Toggling main menu. Current state:", this.state.isMainMenuOpen);
|
|
189
|
-
if (this.state.isMainMenuOpen) {
|
|
190
|
-
this.closeMainMenu();
|
|
191
|
-
if (this.state.isNestedMenuOpen) {
|
|
192
|
-
this.closeNestedMenu();
|
|
193
|
-
}
|
|
194
|
-
} else {
|
|
195
|
-
this.openMainMenu();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
openNestedMenu() {
|
|
199
|
-
if (this.state.isNestedMenuOpen) {
|
|
200
|
-
console.log("Nested menu already open, skipping");
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const { nestedMenu, navOverlay } = this.elements;
|
|
204
|
-
nestedMenu.style.display = "block";
|
|
205
|
-
navOverlay.style.opacity = "1";
|
|
206
|
-
setTimeout(() => {
|
|
207
|
-
nestedMenu.style.transform = "translateX(0%)";
|
|
208
|
-
}, ANIMATION_TIMINGS.NESTED_MENU_DELAY);
|
|
209
|
-
this.state.isNestedMenuOpen = true;
|
|
210
|
-
console.log("\u{1F4C2} Nested menu OPENED");
|
|
211
|
-
}
|
|
212
|
-
closeNestedMenu() {
|
|
213
|
-
if (!this.state.isNestedMenuOpen) {
|
|
214
|
-
console.log("Nested menu already closed, skipping");
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
const { nestedMenu, navOverlay } = this.elements;
|
|
218
|
-
nestedMenu.style.transform = "translateX(100%)";
|
|
219
|
-
navOverlay.style.opacity = "0";
|
|
220
|
-
this.state.isNestedMenuOpen = false;
|
|
221
|
-
setTimeout(() => {
|
|
222
|
-
nestedMenu.style.display = "none";
|
|
223
|
-
console.log("\u{1F4C2} Nested menu CLOSED (animation complete)");
|
|
224
|
-
}, ANIMATION_TIMINGS.NESTED_MENU_CLOSE_DELAY);
|
|
225
|
-
console.log("\u{1F4C2} Nested menu closing...");
|
|
226
|
-
}
|
|
227
|
-
toggleNestedMenu() {
|
|
228
|
-
console.log("Toggling nested menu. Current state:", this.state.isNestedMenuOpen);
|
|
229
|
-
if (this.state.isNestedMenuOpen) {
|
|
230
|
-
this.closeNestedMenu();
|
|
231
|
-
} else {
|
|
232
|
-
this.openNestedMenu();
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
updateMenuIcons(isOpen) {
|
|
236
|
-
const { openIcons, closeIcons } = this.elements;
|
|
237
|
-
if (isOpen) {
|
|
238
|
-
openIcons.forEach((icon) => {
|
|
239
|
-
icon.style.opacity = "0";
|
|
240
|
-
});
|
|
241
|
-
closeIcons.forEach((icon) => {
|
|
242
|
-
icon.style.opacity = "1";
|
|
243
|
-
});
|
|
244
|
-
} else {
|
|
245
|
-
openIcons.forEach((icon) => {
|
|
246
|
-
icon.style.opacity = "1";
|
|
247
|
-
});
|
|
248
|
-
closeIcons.forEach((icon) => {
|
|
249
|
-
icon.style.opacity = "0";
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
replaceContent(attrValue) {
|
|
254
|
-
document.querySelectorAll(SELECTORS.MOBILE_MENU).forEach((div) => {
|
|
255
|
-
div.style.display = "none";
|
|
256
|
-
});
|
|
257
|
-
const targetDiv = document.querySelector(`[data-mobile-menu="${attrValue}"]`);
|
|
258
|
-
if (targetDiv) {
|
|
259
|
-
targetDiv.style.display = "block";
|
|
260
|
-
console.log(`\u{1F4C4} Content switched to: ${attrValue}`);
|
|
261
|
-
} else {
|
|
262
|
-
console.warn(`Content element with data-mobile-menu="${attrValue}" not found`);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
// Public methods for external access if needed
|
|
266
|
-
getState() {
|
|
267
|
-
return { ...this.state };
|
|
268
|
-
}
|
|
269
|
-
closeAllMenus() {
|
|
270
|
-
if (this.state.isMainMenuOpen) {
|
|
271
|
-
this.closeMainMenu();
|
|
272
|
-
}
|
|
273
|
-
if (this.state.isNestedMenuOpen) {
|
|
274
|
-
this.closeNestedMenu();
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
279
|
-
try {
|
|
280
|
-
new MobileNavigation();
|
|
281
|
-
} catch (error) {
|
|
282
|
-
console.error("Failed to initialize mobile navigation:", error);
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
})();
|
|
286
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";(()=>{var l={NESTED_MENU_DELAY:10,NESTED_MENU_CLOSE_DELAY:500,MAIN_MENU_CLOSE_TIMEOUT:300},i={NESTED_MENU:'[data-mobile-nav="nested-menu"]',MAIN_MENU:'[data-mobile-nav="main-menu"]',TOGGLE_MAIN_MENU:'[data-nav-toggle="main-menu"]',TOGGLE_NESTED_MENU:'[data-nav-toggle="nested-menu"]',MAIN_MENU_LINKS:"[data-mobile-link]",NAV_OVERLAY:'[data-nav-element="overlay"]',OPEN_ICON:'[data-menu-icon="open"]',CLOSE_ICON:'[data-menu-icon="close"]',MOBILE_MENU:"[data-mobile-menu]"},a=class{constructor(){this.state={isMainMenuOpen:!1,isNestedMenuOpen:!1};this.isAnimating=!1;this.elements=this.getElements(),this.init()}getElements(){let e=document.querySelector(i.NESTED_MENU),t=document.querySelector(i.MAIN_MENU),s=document.querySelector(i.NAV_OVERLAY),n=document.querySelectorAll(i.OPEN_ICON),o=document.querySelectorAll(i.CLOSE_ICON);if(!e||!t||!s||n.length===0||o.length===0)throw new Error("Required navigation elements not found");return{nestedMenu:e,mainMenu:t,toggleMainMenuButtons:document.querySelectorAll(i.TOGGLE_MAIN_MENU),toggleNestedMenuButtons:document.querySelectorAll(i.TOGGLE_NESTED_MENU),mainMenuLinks:document.querySelectorAll(i.MAIN_MENU_LINKS),navOverlay:s,openIcons:n,closeIcons:o}}init(){this.setupInitialStyles(),this.bindEventListeners()}setupInitialStyles(){this.elements.nestedMenu.style.display="none",this.elements.nestedMenu.style.transform="translateX(100%)",this.elements.nestedMenu.style.transition="transform 0.5s ease",this.elements.mainMenu.style.display="block",this.elements.mainMenu.style.height="0dvh",this.elements.mainMenu.style.transition="height 0.3s ease-in-out",this.elements.openIcons.forEach(e=>{e.style.transition="opacity 0.2s ease"}),this.elements.closeIcons.forEach(e=>{e.style.transition="opacity 0.2s ease"}),this.updateMenuIcons(!1)}bindEventListeners(){this.elements.toggleMainMenuButtons.forEach((e,t)=>{e.addEventListener("click",s=>{s.preventDefault(),console.log(`Main menu button ${t} clicked, current state:`,this.state.isMainMenuOpen),this.handleMainMenuToggle(e)})}),this.elements.toggleNestedMenuButtons.forEach((e,t)=>{e.addEventListener("click",s=>{s.preventDefault(),console.log(`Nested menu button ${t} clicked, current state:`,this.state.isNestedMenuOpen),this.handleNestedMenuToggle(e)})}),this.elements.mainMenuLinks.forEach(e=>{e.addEventListener("click",t=>{let n=t.currentTarget.getAttribute("data-mobile-link");n&&(console.log(`Menu link clicked: ${n}`),this.replaceContent(n),this.toggleNestedMenu())})})}openMainMenu(){if(this.state.isMainMenuOpen){console.log("Main menu already open, skipping");return}let{mainMenu:e}=this.elements;this.isAnimating=!0,e.style.overflow="hidden",e.style.display="block",e.style.height="0dvh",this.state.isMainMenuOpen=!0,this.updateMenuIcons(!0),requestAnimationFrame(()=>{e.style.height="100dvh";let t=()=>{this.isAnimating=!1,console.log("\u{1F354} Main menu OPENED (animation complete)")};e.addEventListener("transitionend",t,{once:!0}),setTimeout(()=>{this.isAnimating=!1},350)}),console.log("\u{1F354} Main menu OPENING...")}closeMainMenu(){if(!this.state.isMainMenuOpen){console.log("Main menu already closed, skipping");return}let{mainMenu:e}=this.elements;this.isAnimating=!0,this.state.isMainMenuOpen=!1,this.updateMenuIcons(!1),e.style.height="0dvh";let t=!1,s=()=>{t||(t=!0,e.style.display="none",this.isAnimating=!1,console.log("\u{1F354} Main menu CLOSED (animation complete)"))},n=o=>{o.target===e&&o.propertyName==="height"&&s()};e.addEventListener("transitionend",n,{once:!0}),setTimeout(()=>{s()},l.MAIN_MENU_CLOSE_TIMEOUT),console.log("\u{1F354} Main menu CLOSING...")}handleMainMenuToggle(e){if(console.log("Handling main menu toggle. Current state:",this.state.isMainMenuOpen,"Is animating:",this.isAnimating),this.isAnimating){console.log("Animation in progress, ignoring click");return}this.state.isMainMenuOpen?(this.closeMainMenu(),this.state.isNestedMenuOpen&&this.closeNestedMenu()):this.openMainMenu()}handleNestedMenuToggle(e){if(console.log("Handling nested menu toggle. Current state:",this.state.isNestedMenuOpen,"Is animating:",this.isAnimating),this.isAnimating){console.log("Animation in progress, ignoring click");return}this.state.isNestedMenuOpen?this.closeNestedMenu():this.openNestedMenu()}toggleMainMenu(){console.log("Toggling main menu. Current state:",this.state.isMainMenuOpen),this.state.isMainMenuOpen?(this.closeMainMenu(),this.state.isNestedMenuOpen&&this.closeNestedMenu()):this.openMainMenu()}openNestedMenu(){if(this.state.isNestedMenuOpen){console.log("Nested menu already open, skipping");return}let{nestedMenu:e,navOverlay:t}=this.elements;e.style.display="block",t.style.opacity="1",setTimeout(()=>{e.style.transform="translateX(0%)"},l.NESTED_MENU_DELAY),this.state.isNestedMenuOpen=!0,console.log("\u{1F4C2} Nested menu OPENED")}closeNestedMenu(){if(!this.state.isNestedMenuOpen){console.log("Nested menu already closed, skipping");return}let{nestedMenu:e,navOverlay:t}=this.elements;e.style.transform="translateX(100%)",t.style.opacity="0",this.state.isNestedMenuOpen=!1,setTimeout(()=>{e.style.display="none",console.log("\u{1F4C2} Nested menu CLOSED (animation complete)")},l.NESTED_MENU_CLOSE_DELAY),console.log("\u{1F4C2} Nested menu closing...")}toggleNestedMenu(){console.log("Toggling nested menu. Current state:",this.state.isNestedMenuOpen),this.state.isNestedMenuOpen?this.closeNestedMenu():this.openNestedMenu()}updateMenuIcons(e){let{openIcons:t,closeIcons:s}=this.elements;e?(t.forEach(n=>{n.style.opacity="0"}),s.forEach(n=>{n.style.opacity="1"})):(t.forEach(n=>{n.style.opacity="1"}),s.forEach(n=>{n.style.opacity="0"}))}replaceContent(e){document.querySelectorAll(i.MOBILE_MENU).forEach(s=>{s.style.display="none"});let t=document.querySelector(`[data-mobile-menu="${e}"]`);t?(t.style.display="block",console.log(`\u{1F4C4} Content switched to: ${e}`)):console.warn(`Content element with data-mobile-menu="${e}" not found`)}getState(){return{...this.state}}closeAllMenus(){this.state.isMainMenuOpen&&this.closeMainMenu(),this.state.isNestedMenuOpen&&this.closeNestedMenu()}};document.addEventListener("DOMContentLoaded",()=>{try{new a}catch(u){console.error("Failed to initialize mobile navigation:",u)}});})();
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// bin/live-reload.js
|
|
4
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
-
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
-
"change",
|
|
7
|
-
() => location.reload()
|
|
8
|
-
);
|
|
9
|
-
} else {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/navigation/scroll/index.ts
|
|
13
|
-
var navigationDiv = document.querySelector("[navigation-scrolled]");
|
|
14
|
-
var mobileNavigationMenus = document.querySelectorAll("[navigation-scrolled-menu]");
|
|
15
|
-
var allNavigationScrolledDivs = document.querySelectorAll("[navigation-scrolled-dependent]");
|
|
16
|
-
function setNavigationScrolled() {
|
|
17
|
-
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
18
|
-
const isScrolled = scrollTop > 350;
|
|
19
|
-
if (!navigationDiv) {
|
|
20
|
-
console.warn("Navigation element not found");
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
navigationDiv.setAttribute("navigation-scrolled", isScrolled ? "true" : "false");
|
|
24
|
-
if (mobileNavigationMenus) {
|
|
25
|
-
mobileNavigationMenus.forEach((menu) => {
|
|
26
|
-
menu.setAttribute("navigation-scrolled-menu", isScrolled ? "true" : "false");
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
if (allNavigationScrolledDivs) {
|
|
30
|
-
allNavigationScrolledDivs.forEach((div) => {
|
|
31
|
-
div.setAttribute("navigation-scrolled-dependent", isScrolled ? "true" : "false");
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function checkAndDisableAnnouncementBars() {
|
|
36
|
-
const announcementBarElements = document.querySelectorAll("[announcementbar]");
|
|
37
|
-
const geoAnnouncementBarElements = document.querySelectorAll("[geolocation-announcementbar]");
|
|
38
|
-
if (announcementBarElements.length === 0 && geoAnnouncementBarElements.length === 0) {
|
|
39
|
-
console.warn("No announcement bar elements found");
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const shouldEnable = !(window.announcementSlides === 0 || window.announcementSlides === void 0);
|
|
43
|
-
announcementBarElements.forEach((element) => {
|
|
44
|
-
element.setAttribute("announcementbar", shouldEnable ? "true" : "false");
|
|
45
|
-
});
|
|
46
|
-
geoAnnouncementBarElements.forEach((element) => {
|
|
47
|
-
element.setAttribute("geolocation-announcementbar", shouldEnable ? "true" : "false");
|
|
48
|
-
});
|
|
49
|
-
if (!shouldEnable) {
|
|
50
|
-
console.log("No announcement slides found, disabling announcement bars.");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
navigationDiv.setAttribute("navigation-scrolled", "true");
|
|
54
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
checkAndDisableAnnouncementBars();
|
|
57
|
-
setNavigationScrolled();
|
|
58
|
-
}, 120);
|
|
59
|
-
});
|
|
60
|
-
window.addEventListener("scroll", setNavigationScrolled);
|
|
61
|
-
})();
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";(()=>{var l=document.querySelector("[navigation-scrolled]"),a=document.querySelectorAll("[navigation-scrolled-menu]"),c=document.querySelectorAll("[navigation-scrolled-dependent]");function i(){let n=(window.scrollY||document.documentElement.scrollTop)>350;if(!l){console.warn("Navigation element not found");return}l.setAttribute("navigation-scrolled",n?"true":"false"),a&&a.forEach(e=>{e.setAttribute("navigation-scrolled-menu",n?"true":"false")}),c&&c.forEach(e=>{e.setAttribute("navigation-scrolled-dependent",n?"true":"false")})}function r(){let t=document.querySelectorAll("[announcementbar]"),n=document.querySelectorAll("[geolocation-announcementbar]");if(t.length===0&&n.length===0){console.warn("No announcement bar elements found");return}let e=!(window.announcementSlides===0||window.announcementSlides===void 0);t.forEach(o=>{o.setAttribute("announcementbar",e?"true":"false")}),n.forEach(o=>{o.setAttribute("geolocation-announcementbar",e?"true":"false")}),e||console.log("No announcement slides found, disabling announcement bars.")}l.setAttribute("navigation-scrolled","true");document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{r(),i()},120)});window.addEventListener("scroll",i);})();
|