PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0
Elementor Website Builder – more than just a page builder v4.3.0
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
elementor / assets / js / packages / onboarding / onboarding.js

onboarding.js in Elementor Website Builder – more than just a page builder 4.3.0, at assets/js/packages/onboarding/onboarding.js

3,256 lines 131.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function(react, _elementor_query, _elementor_store, _elementor_ui, _elementor_events, _elementor_utils, _elementor_icons) {
2
3 //#region \0rolldown/runtime.js
4 var __create = Object.create;
5 var __defProp = Object.defineProperty;
6 var __name = (target, value) => __defProp(target, "name", {
7 value,
8 configurable: true
9 });
10 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11 var __getOwnPropNames = Object.getOwnPropertyNames;
12 var __getProtoOf = Object.getPrototypeOf;
13 var __hasOwnProp = Object.prototype.hasOwnProperty;
14 var __exportAll = (all, no_symbols) => {
15 let target = {};
16 for (var name in all) {
17 __defProp(target, name, {
18 get: all[name],
19 enumerable: true
20 });
21 }
22 if (!no_symbols) {
23 __defProp(target, Symbol.toStringTag, { value: "Module" });
24 }
25 return target;
26 };
27 var __copyProps = (to, from, except, desc) => {
28 if (from && typeof from === "object" || typeof from === "function") {
29 for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
30 key = keys[i];
31 if (!__hasOwnProp.call(to, key) && key !== except) {
32 __defProp(to, key, {
33 get: ((k) => from[k]).bind(null, key),
34 enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
35 });
36 }
37 }
38 }
39 return to;
40 };
41 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
42 value: mod,
43 enumerable: true
44 }) : target, mod));
45
46 //#endregion
47 react = __toESM(react);
48
49 //#region packages/apps/onboarding/src/store/selectors.ts
50 var selectSteps = (state) => state.onboarding.steps;
51 var selectCurrentStepId = (state) => state.onboarding.currentStepId;
52 var selectCurrentStepIndex = (state) => state.onboarding.currentStepIndex;
53 var selectCompletedSteps = (state) => state.onboarding.completedSteps;
54 var selectChoices = (state) => state.onboarding.choices;
55 var selectIsLoading = (state) => state.onboarding.isLoading;
56 var selectError = (state) => state.onboarding.error;
57 var selectHadUnexpectedExit = (state) => state.onboarding.hadUnexpectedExit;
58 var selectResumeStepIdForTracking = (state) => state.onboarding.resumeStepIdForTracking;
59 var selectIsConnected = (state) => state.onboarding.isConnected;
60 var selectIsGuest = (state) => state.onboarding.isGuest;
61 var selectUserName = (state) => state.onboarding.userName;
62 var selectUrls = (state) => state.onboarding.urls;
63 var selectShouldShowProInstallScreen = (state) => state.onboarding.shouldShowProInstallScreen;
64 var selectHasProInstallScreenDismissed = (state) => state.onboarding.hasProInstallScreenDismissed;
65 var selectCurrentStep = (0, _elementor_store.__createSelector)([selectSteps, selectCurrentStepIndex], (steps, index) => steps[index] ?? null);
66 var selectIsFirstStep = (0, _elementor_store.__createSelector)([selectCurrentStepIndex], (index) => index === 0);
67 var selectIsLastStep = (0, _elementor_store.__createSelector)([selectSteps, selectCurrentStepIndex], (steps, index) => index === steps.length - 1);
68 var selectTotalSteps = (0, _elementor_store.__createSelector)([selectSteps], (steps) => steps.length);
69 var selectIsStepCompleted = (0, _elementor_store.__createSelector)([selectCompletedSteps, (_state, stepId) => stepId], (completedSteps, stepId) => completedSteps.includes(stepId));
70 var selectHasPassedLogin = (0, _elementor_store.__createSelector)([selectIsConnected, selectIsGuest], (isConnected, isGuest) => isConnected || isGuest);
71 var selectShouldShowProInstall = (0, _elementor_store.__createSelector)([
72 selectIsConnected,
73 selectShouldShowProInstallScreen,
74 selectHasProInstallScreenDismissed
75 ], (isConnected, shouldShowProInstallScreen, isDismissed) => isConnected && shouldShowProInstallScreen && !isDismissed);
76
77 //#endregion
78 //#region packages/apps/onboarding/src/analytics/init-tracking.ts
79 function updateLibraryConnectConfig(data) {
80 const config = window.elementorCommon?.config;
81 if (!config?.library_connect) return;
82 const libraryConnectConfig = config.library_connect;
83 libraryConnectConfig.is_connected = true;
84 libraryConnectConfig.current_access_level = data.kits_access_level ?? data.access_level ?? 0;
85 libraryConnectConfig.current_access_tier = data.access_tier;
86 libraryConnectConfig.plan_type = data.plan_type;
87 libraryConnectConfig.user_id = data.user_id ? String(data.user_id) : null;
88 }
89
90 //#endregion
91 //#region packages/apps/onboarding/src/icons/login/apple-icon.tsx
92 function AppleIcon() {
93 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
94 viewBox: "0 0 24 24",
95 "aria-label": "Apple"
96 }, /* @__PURE__ */ react.createElement("path", {
97 d: "M18.8456 19.5C18.0156 20.74 17.1356 21.95 15.7956 21.97C14.4556 22 14.0256 21.18 12.5056 21.18C10.9756 21.18 10.5056 21.95 9.23559 22C7.92559 22.05 6.93559 20.68 6.09559 19.47C4.38559 17 3.07559 12.45 4.83559 9.39C5.70559 7.87 7.26559 6.91 8.95559 6.88C10.2356 6.86 11.4556 7.75 12.2456 7.75C13.0256 7.75 14.5056 6.68 16.0556 6.84C16.7056 6.87 18.5256 7.1 19.6956 8.82C19.6056 8.88 17.5256 10.1 17.5456 12.63C17.5756 15.65 20.1956 16.66 20.2256 16.67C20.1956 16.74 19.8056 18.11 18.8456 19.5ZM13.1356 3.5C13.8656 2.67 15.0756 2.04 16.0756 2C16.2056 3.17 15.7356 4.35 15.0356 5.19C14.3456 6.04 13.2056 6.7 12.0856 6.61C11.9356 5.46 12.4956 4.26 13.1356 3.5Z",
98 fill: "currentColor"
99 }));
100 }
101
102 //#endregion
103 //#region packages/apps/onboarding/src/icons/login/facebook-icon.tsx
104 function FacebookIcon() {
105 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
106 viewBox: "0 0 24 24",
107 "aria-label": "Facebook"
108 }, /* @__PURE__ */ react.createElement("g", { clipPath: "url(#fb-clip)" }, /* @__PURE__ */ react.createElement("path", {
109 d: "M21 12C21 7.02947 16.9705 3 12 3C7.02947 3 3 7.02947 3 12C3 16.4921 6.29119 20.2155 10.5938 20.8907V14.6016H8.30859V12H10.5938V10.0172C10.5938 7.76156 11.9374 6.51562 13.9932 6.51562C14.9779 6.51562 16.0078 6.69141 16.0078 6.69141V8.90625H14.873C13.7549 8.90625 13.4062 9.60002 13.4062 10.3118V12H15.9023L15.5033 14.6016H13.4062V20.8907C17.7088 20.2155 21 16.4922 21 12Z",
110 fill: "#3975EA"
111 }), /* @__PURE__ */ react.createElement("path", {
112 d: "M15.5033 14.6016L15.9023 12H13.4062V10.3118C13.4062 9.59995 13.7549 8.90625 14.873 8.90625H16.0078V6.69141C16.0078 6.69141 14.9779 6.51562 13.9931 6.51562C11.9374 6.51562 10.5938 7.76156 10.5938 10.0172V12H8.30859V14.6016H10.5938V20.8907C11.059 20.9636 11.5291 21.0001 12 21C12.4709 21.0001 12.941 20.9636 13.4062 20.8907V14.6016H15.5033Z",
113 fill: "white"
114 })), /* @__PURE__ */ react.createElement("defs", null, /* @__PURE__ */ react.createElement("clipPath", { id: "fb-clip" }, /* @__PURE__ */ react.createElement("rect", {
115 width: "18",
116 height: "18",
117 fill: "white",
118 transform: "translate(3 3)"
119 }))));
120 }
121
122 //#endregion
123 //#region packages/apps/onboarding/src/icons/login/google-icon.tsx
124 function GoogleIcon() {
125 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
126 viewBox: "0 0 24 24",
127 "aria-label": "Google"
128 }, /* @__PURE__ */ react.createElement("path", {
129 d: "M9.32142 4.43335C7.72278 4.98794 6.3441 6.04056 5.38791 7.4366C4.43172 8.83265 3.94841 10.4985 4.00898 12.1896C4.06954 13.8806 4.67078 15.5076 5.72439 16.8317C6.77801 18.1558 8.22845 19.1071 9.86267 19.5459C11.1876 19.8877 12.5757 19.9027 13.9077 19.5896C15.1143 19.3186 16.2299 18.7388 17.1452 17.9071C18.0978 17.015 18.7892 15.8802 19.1452 14.6246C19.5321 13.2592 19.6009 11.8233 19.3464 10.4271H11.9064V13.5134H16.2152C16.1291 14.0056 15.9445 14.4754 15.6726 14.8946C15.4007 15.3139 15.047 15.674 14.6327 15.9534C14.1065 16.3014 13.5134 16.5356 12.8914 16.6409C12.2676 16.7568 11.6277 16.7568 11.0039 16.6409C10.3717 16.5101 9.77355 16.2492 9.24767 15.8746C8.40286 15.2766 7.76852 14.427 7.43517 13.4471C7.09619 12.4488 7.09619 11.3666 7.43517 10.3684C7.67246 9.66862 8.06472 9.03152 8.58267 8.5046C9.17541 7.89054 9.92584 7.4516 10.7516 7.23595C11.5774 7.0203 12.4466 7.03627 13.2639 7.2821C13.9024 7.47809 14.4862 7.82052 14.9689 8.2821C15.4548 7.79877 15.9398 7.31419 16.4239 6.82835C16.6739 6.5671 16.9464 6.31835 17.1927 6.05085C16.4559 5.3652 15.591 4.83167 14.6477 4.48085C12.9298 3.85709 11.0501 3.84033 9.32142 4.43335Z",
130 fill: "#515962"
131 }), /* @__PURE__ */ react.createElement("path", {
132 d: "M9.32128 4.43347C11.0499 3.84004 12.9295 3.85636 14.6475 4.47972C15.591 4.83293 16.4555 5.36902 17.1913 6.05722C16.9413 6.32472 16.6775 6.57472 16.4225 6.83472C15.9375 7.31889 15.4529 7.80139 14.9688 8.28222C14.4861 7.82064 13.9022 7.47821 13.2638 7.28222C12.4467 7.03552 11.5776 7.01863 10.7516 7.2334C9.92555 7.44817 9.17467 7.8863 8.58128 8.49972C8.06332 9.02664 7.67106 9.66374 7.43378 10.3635L4.84253 8.35722C5.77004 6.51792 7.37597 5.111 9.32128 4.43347Z",
133 fill: "#E33629"
134 }), /* @__PURE__ */ react.createElement("path", {
135 d: "M4.155 10.3449C4.29427 9.65466 4.5255 8.9862 4.8425 8.35742L7.43375 10.3687C7.09476 11.3669 7.09476 12.4492 7.43375 13.4474C6.57041 14.1141 5.70666 14.7841 4.8425 15.4574C4.04893 13.8778 3.80691 12.078 4.155 10.3449Z",
136 fill: "#F8BD00"
137 }), /* @__PURE__ */ react.createElement("path", {
138 d: "M11.9063 10.4258H19.3463C19.6008 11.8219 19.532 13.2579 19.1451 14.6233C18.7891 15.8789 18.0977 17.0137 17.1451 17.9058C16.3088 17.2533 15.4688 16.6058 14.6326 15.9533C15.0472 15.6736 15.401 15.3131 15.673 14.8934C15.9449 14.4737 16.1293 14.0035 16.2151 13.5108H11.9063C11.9051 12.4833 11.9063 11.4545 11.9063 10.4258Z",
139 fill: "#587DBD"
140 }), /* @__PURE__ */ react.createElement("path", {
141 d: "M4.84131 15.4573C5.70548 14.7906 6.56923 14.1206 7.43256 13.4473C7.76657 14.4275 8.40181 15.2771 9.24756 15.8748C9.77507 16.2476 10.3745 16.5064 11.0076 16.6348C11.6314 16.7508 12.2712 16.7508 12.8951 16.6348C13.5171 16.5295 14.1102 16.2953 14.6363 15.9473C15.4726 16.5998 16.3126 17.2473 17.1488 17.8998C16.2337 18.7319 15.1181 19.3121 13.9113 19.5835C12.5793 19.8966 11.1912 19.8816 9.86631 19.5398C8.81844 19.26 7.83965 18.7668 6.99131 18.091C6.09339 17.3781 5.36 16.4797 4.84131 15.4573Z",
142 fill: "#319F43"
143 }));
144 }
145
146 //#endregion
147 //#region packages/apps/onboarding/src/icons/site-features/accessibility-tools-icon.tsx
148 var AccessibilityToolsIcon = react.forwardRef((props, ref) => {
149 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
150 viewBox: "0 0 32 32",
151 ...props,
152 ref,
153 width: "32",
154 height: "32"
155 }, /* @__PURE__ */ react.createElement("circle", {
156 cx: "16.4814",
157 cy: "5.64844",
158 r: "2.25",
159 fill: "none",
160 stroke: "currentColor",
161 strokeWidth: "1.5"
162 }), /* @__PURE__ */ react.createElement("path", {
163 d: "M6.3341 10.6687L10.8605 11.3515C14.2811 11.8671 17.7598 11.8666 21.18 11.3492L25.6649 10.6698C26.6404 10.5223 27.5187 11.2782 27.5187 12.2649V12.9296C27.5186 13.7277 26.9344 14.4061 26.1452 14.5247L21.7875 15.1786C21.1891 15.2684 20.5856 15.3434 19.986 15.4357C19.5122 15.5086 19.1722 15.9214 19.1722 16.4007V17.9094C19.1722 18.3051 19.2445 18.7152 19.5101 19.0086L24.5906 24.6215C25.1883 25.2818 25.1373 26.3017 24.477 26.8993L23.7211 27.5832C23.0608 28.1807 22.042 28.1298 21.4444 27.4696L16.8529 22.3973C16.3956 21.8921 15.6022 21.8921 15.145 22.3973L10.5535 27.4696C9.95579 28.1299 8.93591 28.1809 8.27561 27.5832L7.5197 26.8993C6.85956 26.3018 6.80874 25.2818 7.40609 24.6215L12.497 18.9966C12.7597 18.7064 12.8324 18.3009 12.8324 17.9094V16.4085C12.8324 15.9237 12.4847 15.5082 12.0054 15.4354C11.4147 15.3457 10.8218 15.2669 10.2316 15.1786L5.8549 14.5236C5.06549 14.4052 4.48145 13.7268 4.48145 12.9285V12.2637C4.4815 11.2775 5.35894 10.5219 6.3341 10.6687Z",
164 fill: "none",
165 stroke: "currentColor",
166 strokeWidth: "1.5"
167 }));
168 });
169
170 //#endregion
171 //#region packages/apps/onboarding/src/icons/site-features/ai-generator-icon.tsx
172 var AIGeneratorIcon = react.forwardRef((props, ref) => {
173 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
174 viewBox: "0 0 32 32",
175 ...props,
176 ref,
177 width: "32",
178 height: "32"
179 }, /* @__PURE__ */ react.createElement("path", {
180 d: "M23.2273 4.83321C23.4152 4.47883 23.9229 4.47883 24.1108 4.83321L24.4249 5.42564C24.8747 6.27415 25.5688 6.9682 26.4173 7.41807L27.0097 7.73216C27.3641 7.92005 27.3641 8.42778 27.0097 8.61567L26.4173 8.92976C25.5688 9.37962 24.8747 10.0737 24.4249 10.9222L24.1108 11.5146C23.9229 11.869 23.4152 11.869 23.2273 11.5146L22.9132 10.9222C22.4633 10.0737 21.7693 9.37962 20.9208 8.92976L20.3283 8.61567C19.9739 8.42778 19.9739 7.92005 20.3283 7.73216L20.9208 7.41807C21.7693 6.9682 22.4633 6.27415 22.9132 5.42564L23.2273 4.83321Z",
181 fill: "none",
182 stroke: "currentColor",
183 strokeWidth: "1.25"
184 }), /* @__PURE__ */ react.createElement("path", {
185 d: "M13.7075 8.79729C14.0833 8.08851 15.0988 8.08851 15.4745 8.79729L17.3436 12.3226C17.9059 13.3832 18.7735 14.2508 19.8341 14.8131L23.3594 16.6821C24.0682 17.0579 24.0682 18.0734 23.3594 18.4491L19.8341 20.3182C18.7735 20.8805 17.9059 21.7481 17.3436 22.8087L15.4745 26.334C15.0988 27.0428 14.0833 27.0428 13.7075 26.334L11.8385 22.8087C11.2762 21.7481 10.4086 20.8805 9.34796 20.3182L5.82268 18.4492C5.1139 18.0734 5.1139 17.0579 5.82268 16.6821L9.34796 14.8131C10.4086 14.2508 11.2762 13.3832 11.8385 12.3226L13.7075 8.79729Z",
186 fill: "none",
187 stroke: "currentColor",
188 strokeWidth: "1.5"
189 }));
190 });
191
192 //#endregion
193 //#region packages/apps/onboarding/src/icons/site-features/classes-variables-icon.tsx
194 var ClassesVariablesIcon = react.forwardRef((props, ref) => {
195 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
196 viewBox: "0 0 32 32",
197 ...props,
198 ref,
199 width: "32",
200 height: "32"
201 }, /* @__PURE__ */ react.createElement("path", {
202 d: "M6.66797 4H12.0013C12.7085 4 13.3868 4.28095 13.8869 4.78105C14.387 5.28115 14.668 5.95942 14.668 6.66667V22.6667C14.668 24.0812 14.1061 25.4377 13.1059 26.4379C12.1057 27.4381 10.7491 28 9.33464 28C7.92015 28 6.56359 27.4381 5.5634 26.4379C4.56321 25.4377 4.0013 24.0812 4.0013 22.6667V6.66667C4.0013 5.95942 4.28225 5.28115 4.78235 4.78105C5.28245 4.28095 5.96072 4 6.66797 4Z",
203 fill: "none",
204 stroke: "currentColor",
205 strokeWidth: "1.5",
206 strokeLinecap: "round",
207 strokeLinejoin: "round"
208 }), /* @__PURE__ */ react.createElement("path", {
209 d: "M14.6685 9.8029L17.3351 7.13623C17.8352 6.63631 18.5134 6.35547 19.2205 6.35547C19.9276 6.35547 20.6057 6.63631 21.1058 7.13623L24.8765 10.9069C25.3764 11.407 25.6572 12.0851 25.6572 12.7922C25.6572 13.4993 25.3764 14.1775 24.8765 14.6776L12.8765 26.6776",
210 fill: "none",
211 stroke: "currentColor",
212 strokeWidth: "1.5",
213 strokeLinecap: "round",
214 strokeLinejoin: "round"
215 }), /* @__PURE__ */ react.createElement("path", {
216 d: "M22.2686 17.332H25.3353C26.0425 17.332 26.7208 17.613 27.2209 18.1131C27.721 18.6132 28.002 19.2915 28.002 19.9987V25.332C28.002 26.0393 27.721 26.7176 27.2209 27.2176C26.7208 27.7177 26.0425 27.9987 25.3353 27.9987H9.33529",
217 fill: "none",
218 stroke: "currentColor",
219 strokeWidth: "1.5",
220 strokeLinecap: "round",
221 strokeLinejoin: "round"
222 }), /* @__PURE__ */ react.createElement("path", {
223 d: "M9.33496 22.668V22.6813",
224 fill: "none",
225 stroke: "currentColor",
226 strokeWidth: "2",
227 strokeLinecap: "round",
228 strokeLinejoin: "round"
229 }));
230 });
231
232 //#endregion
233 //#region packages/apps/onboarding/src/icons/site-features/cookie-consent-icon.tsx
234 var CookieConsentIcon = react.forwardRef((props, ref) => {
235 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
236 viewBox: "0 0 32 32",
237 ...props,
238 ref,
239 width: "32",
240 height: "32"
241 }, /* @__PURE__ */ react.createElement("circle", {
242 cx: "14.56",
243 cy: "12.317",
244 r: "2.16",
245 fill: "none",
246 stroke: "currentColor",
247 strokeWidth: "1.5"
248 }), /* @__PURE__ */ react.createElement("circle", {
249 cx: "11.801",
250 cy: "19.158",
251 r: "1.8",
252 fill: "none",
253 stroke: "currentColor",
254 strokeWidth: "1.5"
255 }), /* @__PURE__ */ react.createElement("circle", {
256 cx: "19.96",
257 cy: "19.96",
258 r: "1.56",
259 fill: "none",
260 stroke: "currentColor",
261 strokeWidth: "1.5"
262 }), /* @__PURE__ */ react.createElement("path", {
263 d: "M16 3.999C16.19 3.999 16.378 4.004 16.566 4.013C17.055 4.037 17.446 4.395 17.654 4.838C18.421 6.47 20.078 7.599 22 7.599C22.609 7.599 23.2 8.19 23.2 8.799C23.2 11.049 24.748 12.938 26.837 13.458C27.369 13.59 27.84 13.969 27.908 14.513C27.969 15 28 15.496 28 16C28 22.627 22.628 28 16 28C9.372 28 4 22.627 4 16C4.001 9.372 9.373 3.999 16 3.999Z",
264 fill: "none",
265 stroke: "currentColor",
266 strokeWidth: "1.5"
267 }));
268 });
269
270 //#endregion
271 //#region packages/apps/onboarding/src/icons/site-features/core-placeholder-icon.tsx
272 var CorePlaceholderIcon = react.forwardRef((props, ref) => {
273 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
274 viewBox: "0 0 32 32",
275 ...props,
276 ref,
277 width: "32",
278 height: "32"
279 }, /* @__PURE__ */ react.createElement("path", {
280 d: "M15.333 15.9997C15.333 16.1765 15.4032 16.3461 15.5283 16.4711C15.6533 16.5961 15.8229 16.6663 15.9997 16.6663C16.1765 16.6663 16.3461 16.5961 16.4711 16.4711C16.5961 16.3461 16.6663 16.1765 16.6663 15.9997C16.6663 15.8229 16.5961 15.6533 16.4711 15.5283C16.3461 15.4032 16.1765 15.333 15.9997 15.333C15.8229 15.333 15.6533 15.4032 15.5283 15.5283C15.4032 15.6533 15.333 15.8229 15.333 15.9997Z",
281 fill: "currentColor",
282 stroke: "currentColor",
283 strokeWidth: "2",
284 strokeLinecap: "round",
285 strokeLinejoin: "round"
286 }), /* @__PURE__ */ react.createElement("path", {
287 d: "M6.66699 16.0003C6.66699 17.226 6.90841 18.4397 7.37745 19.572C7.84649 20.7044 8.53398 21.7333 9.40066 22.6C10.2673 23.4667 11.2962 24.1542 12.4286 24.6232C13.561 25.0922 14.7747 25.3337 16.0003 25.3337C17.226 25.3337 18.4397 25.0922 19.572 24.6232C20.7044 24.1542 21.7333 23.4667 22.6 22.6C23.4667 21.7333 24.1542 20.7044 24.6232 19.572C25.0922 18.4397 25.3337 17.226 25.3337 16.0003C25.3337 14.7747 25.0922 13.561 24.6232 12.4286C24.1542 11.2962 23.4667 10.2673 22.6 9.40066C21.7333 8.53398 20.7044 7.84649 19.572 7.37745C18.4397 6.90841 17.226 6.66699 16.0003 6.66699C14.7747 6.66699 13.561 6.90841 12.4286 7.37745C11.2962 7.84649 10.2673 8.53398 9.40066 9.40066C8.53398 10.2673 7.84649 11.2962 7.37745 12.4286C6.90841 13.561 6.66699 14.7747 6.66699 16.0003Z",
288 fill: "none",
289 stroke: "currentColor",
290 strokeWidth: "1.5",
291 strokeLinecap: "round",
292 strokeLinejoin: "round"
293 }), /* @__PURE__ */ react.createElement("path", {
294 d: "M16 4V6.66667",
295 fill: "none",
296 stroke: "currentColor",
297 strokeWidth: "1.5",
298 strokeLinecap: "round",
299 strokeLinejoin: "round"
300 }), /* @__PURE__ */ react.createElement("path", {
301 d: "M4 16H6.66667",
302 fill: "none",
303 stroke: "currentColor",
304 strokeWidth: "1.5",
305 strokeLinecap: "round",
306 strokeLinejoin: "round"
307 }), /* @__PURE__ */ react.createElement("path", {
308 d: "M16 25.333V27.9997",
309 fill: "none",
310 stroke: "currentColor",
311 strokeWidth: "1.5",
312 strokeLinecap: "round",
313 strokeLinejoin: "round"
314 }), /* @__PURE__ */ react.createElement("path", {
315 d: "M25.333 16H27.9997",
316 fill: "none",
317 stroke: "currentColor",
318 strokeWidth: "1.5",
319 strokeLinecap: "round",
320 strokeLinejoin: "round"
321 }));
322 });
323
324 //#endregion
325 //#region packages/apps/onboarding/src/icons/site-features/custom-code-icon.tsx
326 var CustomCodeIcon = react.forwardRef((props, ref) => {
327 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
328 viewBox: "0 0 32 32",
329 ...props,
330 ref,
331 width: "32",
332 height: "32"
333 }, /* @__PURE__ */ react.createElement("path", {
334 d: "M9.33333 10.666L4 15.9993L9.33333 21.3327",
335 fill: "none",
336 stroke: "currentColor",
337 strokeWidth: "1.5",
338 strokeLinecap: "round",
339 strokeLinejoin: "round"
340 }), /* @__PURE__ */ react.createElement("path", {
341 d: "M22.667 10.666L28.0003 15.9993L22.667 21.3327",
342 fill: "none",
343 stroke: "currentColor",
344 strokeWidth: "1.5",
345 strokeLinecap: "round",
346 strokeLinejoin: "round"
347 }), /* @__PURE__ */ react.createElement("path", {
348 d: "M18.6663 5.33301L13.333 26.6663",
349 fill: "none",
350 stroke: "currentColor",
351 strokeWidth: "1.5",
352 strokeLinecap: "round",
353 strokeLinejoin: "round"
354 }));
355 });
356
357 //#endregion
358 //#region packages/apps/onboarding/src/icons/site-features/interactions-icon.tsx
359 var InteractionsIcon = react.forwardRef((props, ref) => {
360 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
361 viewBox: "0 0 32 32",
362 ...props,
363 ref,
364 width: "32",
365 height: "32"
366 }, /* @__PURE__ */ react.createElement("path", {
367 d: "M12.3001 24.5497C12.1024 24.7925 11.8534 24.9888 11.5711 25.1243C11.2887 25.2598 10.9799 25.3313 10.6667 25.3337C10.0427 25.3337 9.44807 25.0483 9.03341 24.5497L3.21874 17.5523C2.86185 17.1138 2.66699 16.5657 2.66699 16.0003C2.66699 15.4349 2.86185 14.8868 3.21874 14.4483L9.03341 7.45099C9.23113 7.2081 9.48006 7.01189 9.76241 6.87636C10.0448 6.74083 10.3536 6.66934 10.6667 6.66699C11.2907 6.66699 11.8854 6.95233 12.3001 7.45099L18.1147 14.4483C18.4716 14.8868 18.6665 15.4349 18.6665 16.0003C18.6665 16.5657 18.4716 17.1138 18.1147 17.5523L12.3001 24.5497Z",
368 fill: "none",
369 stroke: "currentColor",
370 strokeWidth: "1.5",
371 strokeLinecap: "round",
372 strokeLinejoin: "round"
373 }), /* @__PURE__ */ react.createElement("path", {
374 d: "M22.667 6.66699L28.7817 14.4483C29.1386 14.8868 29.3334 15.4349 29.3334 16.0003C29.3334 16.5657 29.1386 17.1138 28.7817 17.5523L22.667 25.3337",
375 fill: "none",
376 stroke: "currentColor",
377 strokeWidth: "1.5",
378 strokeLinecap: "round",
379 strokeLinejoin: "round"
380 }), /* @__PURE__ */ react.createElement("path", {
381 d: "M17.333 6.66699L23.4477 14.4483C23.8046 14.8868 23.9994 15.4349 23.9994 16.0003C23.9994 16.5657 23.8046 17.1138 23.4477 17.5523L17.333 25.3337",
382 fill: "none",
383 stroke: "currentColor",
384 strokeWidth: "1.5",
385 strokeLinecap: "round",
386 strokeLinejoin: "round"
387 }));
388 });
389
390 //#endregion
391 //#region packages/apps/onboarding/src/icons/site-features/email-deliverability-icon.tsx
392 var EmailDeliverabilityIcon = react.forwardRef((props, ref) => {
393 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
394 viewBox: "0 0 32 32",
395 ...props,
396 ref,
397 width: "32",
398 height: "32"
399 }, /* @__PURE__ */ react.createElement("path", {
400 d: "M13.8998 26.8185H8.91711C6.32659 26.8185 4.22656 24.7185 4.22656 22.128V9.15636C4.22656 7.17638 5.82548 5.56771 7.80544 5.55962C13.2372 5.53744 18.6688 5.5374 24.1005 5.5596C26.0804 5.56769 27.6793 7.17636 27.6793 9.15632V16.6031",
401 fill: "none",
402 stroke: "currentColor",
403 strokeWidth: "1.5",
404 strokeLinecap: "round"
405 }), /* @__PURE__ */ react.createElement("path", {
406 d: "M5.35254 6.66406L13.4831 11.7007C14.9964 12.6381 16.91 12.6381 18.4233 11.7007L26.5538 6.66406",
407 fill: "none",
408 stroke: "currentColor",
409 strokeWidth: "1.5",
410 strokeLinecap: "round"
411 }), /* @__PURE__ */ react.createElement("path", {
412 d: "M28.2246 21.62L19.5512 16.2156C18.5501 15.5918 17.344 16.6355 17.8176 17.7158L19.6501 21.8962C19.7847 22.2033 19.7847 22.5527 19.6501 22.8598L17.7337 27.2315C17.268 28.2939 18.4308 29.3331 19.4344 28.7515L28.1917 23.6767C28.9747 23.223 28.9927 22.0987 28.2246 21.62Z",
413 fill: "none",
414 stroke: "currentColor",
415 strokeWidth: "1.5"
416 }), /* @__PURE__ */ react.createElement("path", {
417 d: "M12.7002 22.6016L15.1002 22.6016",
418 fill: "none",
419 stroke: "currentColor",
420 strokeWidth: "1.5",
421 strokeLinecap: "round"
422 }), /* @__PURE__ */ react.createElement("path", {
423 d: "M10 18.3984L14.2 18.3984",
424 fill: "none",
425 stroke: "currentColor",
426 strokeWidth: "1.5",
427 strokeLinecap: "round"
428 }));
429 });
430
431 //#endregion
432 //#region packages/apps/onboarding/src/icons/site-features/explore-more-icon.tsx
433 var ExploreMoreIcon = react.forwardRef((props, ref) => {
434 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
435 viewBox: "0 0 24 24",
436 ...props,
437 ref,
438 width: "24",
439 height: "24"
440 }, /* @__PURE__ */ react.createElement("path", {
441 d: "M6.74805 3.75L12.748 9.75L6.74805 15.75",
442 fill: "none",
443 stroke: "currentColor",
444 strokeWidth: "1.5",
445 strokeLinecap: "round",
446 strokeLinejoin: "round"
447 }));
448 });
449
450 //#endregion
451 //#region packages/apps/onboarding/src/icons/site-features/hello-theme-icon.tsx
452 var HelloThemeIcon = react.forwardRef((props, ref) => {
453 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
454 viewBox: "0 0 32 32",
455 ...props,
456 ref,
457 width: "32",
458 height: "32"
459 }, /* @__PURE__ */ react.createElement("rect", {
460 x: "4",
461 y: "4",
462 width: "24",
463 height: "24",
464 rx: "1.25",
465 fill: "none",
466 stroke: "currentColor",
467 strokeWidth: "1.5"
468 }), /* @__PURE__ */ react.createElement("path", {
469 d: "M12 11.75V21.36M20 11.75V21.36M4 11.22H28M4 20.82H28",
470 fill: "none",
471 stroke: "currentColor",
472 strokeWidth: "1.5"
473 }));
474 });
475
476 //#endregion
477 //#region packages/apps/onboarding/src/icons/site-features/image-optimization-icon.tsx
478 var ImageOptimizationIcon = react.forwardRef((props, ref) => {
479 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
480 viewBox: "0 0 32 32",
481 ...props,
482 ref,
483 width: "32",
484 height: "32"
485 }, /* @__PURE__ */ react.createElement("rect", {
486 x: "4.59961",
487 y: "4.60156",
488 width: "22.8",
489 height: "22.8",
490 rx: "4.56",
491 fill: "none",
492 stroke: "currentColor",
493 strokeWidth: "1.5"
494 }), /* @__PURE__ */ react.createElement("path", {
495 d: "M5.74023 26.2611L11.8306 18.6481C12.2446 18.1306 12.9998 18.0467 13.5173 18.4607L17.3432 21.5215C17.8607 21.9355 18.6159 21.8516 19.0299 21.3341L27.4002 10.8711",
496 fill: "none",
497 stroke: "currentColor",
498 strokeWidth: "1.5"
499 }), /* @__PURE__ */ react.createElement("circle", {
500 cx: "10.4802",
501 cy: "10.4792",
502 r: "2.28",
503 fill: "none",
504 stroke: "currentColor",
505 strokeWidth: "1.5"
506 }));
507 });
508
509 //#endregion
510 //#region packages/apps/onboarding/src/icons/site-features/theme-builder-icon.tsx
511 var ThemeBuilderIcon = react.forwardRef((props, ref) => {
512 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
513 viewBox: "0 0 32 32",
514 ...props,
515 ref,
516 width: "32",
517 height: "32"
518 }, /* @__PURE__ */ react.createElement("path", {
519 d: "M4.5 5.9375C4.5 5.55625 4.65145 5.19062 4.92103 4.92103C5.19062 4.65145 5.55625 4.5 5.9375 4.5H26.0625C26.4437 4.5 26.8094 4.65145 27.079 4.92103C27.3486 5.19062 27.5 5.55625 27.5 5.9375V8.8125C27.5 9.19375 27.3486 9.55938 27.079 9.82897C26.8094 10.0985 26.4437 10.25 26.0625 10.25H5.9375C5.55625 10.25 5.19062 10.0985 4.92103 9.82897C4.65145 9.55938 4.5 9.19375 4.5 8.8125V5.9375Z",
520 fill: "none",
521 stroke: "currentColor",
522 strokeWidth: "1.5",
523 strokeLinecap: "round",
524 strokeLinejoin: "round"
525 }), /* @__PURE__ */ react.createElement("path", {
526 d: "M4.5 17.4375C4.5 17.0563 4.65145 16.6906 4.92103 16.421C5.19062 16.1515 5.55625 16 5.9375 16H11.6875C12.0687 16 12.4344 16.1515 12.704 16.421C12.9735 16.6906 13.125 17.0563 13.125 17.4375V26.0625C13.125 26.4437 12.9735 26.8094 12.704 27.079C12.4344 27.3486 12.0687 27.5 11.6875 27.5H5.9375C5.55625 27.5 5.19062 27.3486 4.92103 27.079C4.65145 26.8094 4.5 26.4437 4.5 26.0625V17.4375Z",
527 fill: "none",
528 stroke: "currentColor",
529 strokeWidth: "1.5",
530 strokeLinecap: "round",
531 strokeLinejoin: "round"
532 }), /* @__PURE__ */ react.createElement("path", {
533 d: "M18.875 16H27.5",
534 fill: "none",
535 stroke: "currentColor",
536 strokeWidth: "1.5",
537 strokeLinecap: "round",
538 strokeLinejoin: "round"
539 }), /* @__PURE__ */ react.createElement("path", {
540 d: "M18.875 21.75H27.5",
541 fill: "none",
542 stroke: "currentColor",
543 strokeWidth: "1.5",
544 strokeLinecap: "round",
545 strokeLinejoin: "round"
546 }), /* @__PURE__ */ react.createElement("path", {
547 d: "M18.875 27.5H27.5",
548 fill: "none",
549 stroke: "currentColor",
550 strokeWidth: "1.5",
551 strokeLinecap: "round",
552 strokeLinejoin: "round"
553 }));
554 });
555
556 //#endregion
557 //#region packages/apps/onboarding/src/icons/site-features/woocommerce-icon.tsx
558 var WoocommerceIcon = react.forwardRef((props, ref) => {
559 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
560 viewBox: "0 0 32 32",
561 ...props,
562 ref,
563 width: "32",
564 height: "32"
565 }, /* @__PURE__ */ react.createElement("path", {
566 d: "M17.9998 28V18C17.9998 17.7348 18.1052 17.4804 18.2927 17.2929C18.4803 17.1054 18.7346 17 18.9998 17H22.9998C23.265 17 23.5194 17.1054 23.7069 17.2929C23.8945 17.4804 23.9998 17.7348 23.9998 18V28M17.9998 28H3.14649M17.9998 28H23.9998M23.9998 28H28.8532M26.9998 28V12.4653M26.9998 12.4653C26.1999 12.9268 25.2651 13.0974 24.3537 12.9482C23.4424 12.799 22.6108 12.3391 21.9998 11.6467C21.2665 12.476 20.1945 13 18.9998 13C18.4322 13.0005 17.871 12.88 17.3536 12.6464C16.8363 12.4128 16.3748 12.0715 15.9998 11.6453C15.2665 12.476 14.1945 13 12.9998 13C12.4322 13.0005 11.871 12.88 11.3536 12.6464C10.8363 12.4128 10.3748 12.0715 9.99982 11.6453C9.38905 12.338 8.55748 12.7981 7.64615 12.9476C6.73482 13.097 5.79985 12.9266 4.99982 12.4653M26.9998 12.4653C27.5313 12.1585 27.985 11.7336 28.326 11.2234C28.6669 10.7131 28.8858 10.1313 28.9659 9.52287C29.0459 8.91446 28.9849 8.29579 28.7876 7.71473C28.5902 7.13368 28.2618 6.60582 27.8278 6.172L26.2412 4.58667C25.8664 4.21149 25.3581 4.00047 24.8278 4H7.17049C6.64043 4.00011 6.13209 4.21064 5.75716 4.58533L4.17182 6.172C3.73881 6.60632 3.41131 7.13427 3.21458 7.71516C3.01786 8.29605 2.95715 8.91436 3.03715 9.52242C3.11715 10.1305 3.33572 10.712 3.67601 11.2223C4.01629 11.7325 4.4692 12.1578 4.99982 12.4653M4.99982 28V12.4653M8.99982 24H13.9998C14.265 24 14.5194 23.8946 14.7069 23.7071C14.8945 23.5196 14.9998 23.2652 14.9998 23V18C14.9998 17.7348 14.8945 17.4804 14.7069 17.2929C14.5194 17.1054 14.265 17 13.9998 17H8.99982C8.73461 17 8.48025 17.1054 8.29272 17.2929C8.10518 17.4804 7.99982 17.7348 7.99982 18V23C7.99982 23.552 8.44782 24 8.99982 24Z",
567 fill: "none",
568 stroke: "currentColor",
569 strokeWidth: "1.5",
570 strokeLinecap: "round",
571 strokeLinejoin: "round"
572 }));
573 });
574
575 //#endregion
576 //#region packages/apps/onboarding/src/icons/theme-selection/elementor-logo-icon.tsx
577 var ElementorLogoIcon = react.forwardRef((props, ref) => {
578 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
579 viewBox: "0 0 44 44",
580 ...props,
581 ref
582 }, /* @__PURE__ */ react.createElement("circle", {
583 cx: "22",
584 cy: "22",
585 r: "22",
586 fill: "#ffffff"
587 }), /* @__PURE__ */ react.createElement("path", {
588 d: "M22 0C9.85 0 0 9.85 0 22s9.85 22 22 22 22-9.85 22-22S34.15 0 22 0ZM15.4 33H11V11h4.4v22Zm17.6 0H19.8v-4.4H33V33Zm0-8.8H19.8v-4.4H33v4.4Zm0-8.8H19.8V11H33v4.4Z",
589 fill: "#515962",
590 fillOpacity: "0.38"
591 }));
592 });
593
594 //#endregion
595 //#region packages/apps/onboarding/src/icons/theme-selection/hello-layout-icon.tsx
596 var HelloLayoutIcon = react.forwardRef((props, ref) => {
597 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
598 viewBox: "0 0 48 48",
599 ...props,
600 ref
601 }, /* @__PURE__ */ react.createElement("rect", {
602 x: "1.66",
603 y: "1.66",
604 width: "44.68",
605 height: "44.68",
606 rx: "3.88",
607 ry: "3.88",
608 fill: "none",
609 stroke: "currentColor",
610 strokeWidth: "3.33"
611 }), /* @__PURE__ */ react.createElement("path", {
612 d: "M3.33 17.11H44.67M3.33 30.89H44.67",
613 fill: "none",
614 stroke: "currentColor",
615 strokeWidth: "3.33"
616 }), /* @__PURE__ */ react.createElement("path", {
617 d: "M17.11 17.11V30.89M30.89 17.11V30.89",
618 fill: "none",
619 stroke: "currentColor",
620 strokeWidth: "3.33"
621 }));
622 });
623
624 //#endregion
625 //#region packages/apps/onboarding/src/icons/theme-selection/plus-icon.tsx
626 var PLUS_PATH = "M20.7273 2.72725C21.8317 2.72726 22.7271 3.62279 22.7273 4.72725V11.8171H29.8181C30.9226 11.8171 31.818 12.7126 31.8181 13.8171V20.7263C31.818 21.8308 30.9226 22.7263 29.8181 22.7263H22.7273V29.8181C22.7273 30.9226 21.8318 31.8181 20.7273 31.8181H13.8181C12.7136 31.818 11.8181 30.9226 11.8181 29.8181V22.7263H4.72725C3.62282 22.7261 2.72729 21.8307 2.72725 20.7263V13.8171C2.72731 12.7127 3.62284 11.8172 4.72725 11.8171H11.8181V4.72725C11.8182 3.62283 12.7136 2.72733 13.8181 2.72725H20.7273Z";
627 var PlusIcon = react.forwardRef(({ sx, strokeColor = "#ffffff", ...props }, ref) => {
628 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
629 viewBox: "0 0 34.545 34.545",
630 ...props,
631 ref,
632 sx: {
633 overflow: "visible",
634 ...sx
635 }
636 }, /* @__PURE__ */ react.createElement("path", {
637 d: PLUS_PATH,
638 fill: "none",
639 stroke: strokeColor,
640 strokeWidth: "5.454",
641 strokeLinejoin: "round"
642 }), /* @__PURE__ */ react.createElement("path", {
643 d: PLUS_PATH,
644 fill: "currentColor"
645 }));
646 });
647
648 //#endregion
649 //#region packages/apps/onboarding/src/steps/components/site-features/feature-options.ts
650 var COOKIE_CONSENT_FEATURE_ID = "cookie_consent";
651 var FEATURE_OPTIONS = [
652 {
653 id: "classes_variables",
654 labelKey: "steps.site_features.option_classes_variables",
655 Icon: ClassesVariablesIcon,
656 licenseType: "core"
657 },
658 {
659 id: "interactions",
660 labelKey: "steps.site_features.option_interactions",
661 Icon: InteractionsIcon,
662 licenseType: "core"
663 },
664 {
665 id: "theme_builder",
666 labelKey: "steps.site_features.option_theme_builder",
667 Icon: ThemeBuilderIcon,
668 licenseType: "pro"
669 },
670 {
671 id: "lead_collection",
672 labelKey: "steps.site_features.option_lead_collection",
673 Icon: CorePlaceholderIcon,
674 licenseType: "pro"
675 },
676 {
677 id: "custom_code_css",
678 labelKey: "steps.site_features.option_custom_code",
679 Icon: CustomCodeIcon,
680 licenseType: "pro"
681 },
682 {
683 id: "email_deliverability",
684 labelKey: "steps.site_features.option_email_deliverability",
685 Icon: EmailDeliverabilityIcon,
686 licenseType: "one"
687 },
688 {
689 id: COOKIE_CONSENT_FEATURE_ID,
690 labelKey: "steps.site_features.option_cookie_consent",
691 Icon: CookieConsentIcon,
692 licenseType: "one"
693 },
694 {
695 id: "ai_features",
696 labelKey: "steps.site_features.option_ai_generator",
697 Icon: AIGeneratorIcon,
698 licenseType: "one"
699 },
700 {
701 id: "image_optimization",
702 labelKey: "steps.site_features.option_image_optimization",
703 Icon: ImageOptimizationIcon,
704 licenseType: "one"
705 },
706 {
707 id: "accessibility",
708 labelKey: "steps.site_features.option_accessibility_tools",
709 Icon: AccessibilityToolsIcon,
710 licenseType: "one"
711 }
712 ];
713 var CORE_FEATURE_IDS = new Set(FEATURE_OPTIONS.flatMap((option) => option.licenseType === "core" ? [option.id] : []));
714
715 //#endregion
716 //#region packages/apps/onboarding/src/analytics/event-queue.ts
717 var STORAGE_KEY = "elementor_ob_event_queue";
718 function enqueueEvent(name, payload) {
719 try {
720 const queue = getEventQueue();
721 queue.push({
722 name,
723 payload,
724 timestamp: Date.now()
725 });
726 sessionStorage.setItem(STORAGE_KEY, JSON.stringify(queue));
727 } catch {}
728 }
729 function getEventQueue() {
730 try {
731 const raw = sessionStorage.getItem(STORAGE_KEY);
732 return raw ? JSON.parse(raw) : [];
733 } catch {
734 return [];
735 }
736 }
737 function clearEventQueue() {
738 try {
739 sessionStorage.removeItem(STORAGE_KEY);
740 } catch {}
741 }
742
743 //#endregion
744 //#region packages/apps/onboarding/src/analytics/events.ts
745 var OnboardingEventName = {
746 INITIALIZED: "ob_onboarding_initialized",
747 LOGIN_TYPE: "ob_login_type",
748 CONNECT: "ob_connect",
749 PRO_INSTALL: "ob_pro_install",
750 STEP_VIEWED: "ob_step_viewed",
751 PERSONA_SELECTED: "ob_persona_selected",
752 SITE_TOPIC_SELECTED: "ob_site_topic_selected",
753 EXPERIENCE_SELECTED: "ob_experience_selected",
754 THEME_SELECTED: "ob_theme_selected",
755 THEME_UNSELECTED: "ob_theme_unselected",
756 PRO_FEATURES_SELECTED: "ob_pro_features_selected",
757 BACK_CLICKED: "ob_back_clicked",
758 SKIP_CLICKED: "ob_skip_clicked",
759 UPGRADE_CLICKED: "ob_upgrade_clicked",
760 RESUME_ONBOARDING: "ob_resume_onboarding",
761 SITE_STARTER_SELECTED: "ob_site_starter_selected",
762 SUMMARY: "ob_summary",
763 ERROR_REPORTED: "ob_error_reported"
764 };
765 var STEP_NUMBERS = {
766 login: "0",
767 pro_install: "0",
768 theme_selection: "1",
769 site_features: "1"
770 };
771 var PERSONA_VALUE_MAP = {
772 myself: "myself_or_someone_i_know",
773 business: "my_business_or_workplace",
774 client: "a_client",
775 exploring: "just_exploring"
776 };
777 var EXPERIENCE_VALUE_MAP = {
778 beginner: "beginner",
779 intermediate: "intermediate",
780 advanced: "expert"
781 };
782 var THEME_VALUE_MAP = { "hello-elementor": "hello" };
783 var STEP_SPEC_NAMES = {
784 login: "login",
785 pro_install: "pro_install",
786 building_for: "who_are_you_building_for",
787 site_about: "what_is_your_site_about",
788 experience_level: "how_experienced_are_you",
789 theme_selection: "theme_install",
790 site_features: "pro_features"
791 };
792
793 //#endregion
794 //#region packages/apps/onboarding/src/analytics/onboarding-tracking.ts
795 function dispatchDirectly(eventName, payload) {
796 const { dispatchEvent } = (0, _elementor_events.getMixpanel)();
797 dispatchEvent?.(eventName, payload);
798 }
799 function trackEvent(isActive, eventName, payload) {
800 const fullPayload = {
801 window_name: "core_onboarding",
802 ...payload
803 };
804 if (isActive && (0, _elementor_events.canSendEvents)()) dispatchDirectly(eventName, fullPayload);
805 else enqueueEvent(eventName, fullPayload);
806 }
807 function flushQueue() {
808 getEventQueue().sort((a, b) => a.timestamp - b.timestamp).forEach((event) => {
809 if (event.name && event.payload) dispatchDirectly(event.name, event.payload);
810 });
811 clearEventQueue();
812 }
813 function trackOnboardingInitialized(isActive) {
814 clearEventQueue();
815 trackEvent(isActive, OnboardingEventName.INITIALIZED, {
816 interaction_type: "load",
817 target_type: "loaded",
818 target_name: "onboarding_first_load",
819 interaction_result: "onboarding_loaded",
820 target_location: "onboarding",
821 interaction_description: "first step of the onboarding funnel"
822 });
823 }
824 function trackLoginType(isActive, loginType) {
825 trackEvent(isActive, OnboardingEventName.LOGIN_TYPE, {
826 interaction_type: "click",
827 target_type: "button",
828 target_name: "login",
829 interaction_result: loginType === "guest" ? "skip_and_onboarding_initialization" : "login_option selected",
830 target_value: loginType,
831 target_location: "onboarding",
832 location_l1: "login_step",
833 interaction_description: "user connect process loaded from onboarding"
834 });
835 }
836 function trackConnect(isActive, success, error) {
837 trackEvent(isActive, OnboardingEventName.CONNECT, {
838 interaction_type: "click",
839 target_type: "button",
840 target_name: "connect",
841 interaction_result: "user_connect",
842 target_value: success,
843 target_location: "onboarding",
844 location_l1: "connect_flow",
845 interaction_description: "user connect process loaded from onboarding",
846 metadata: !success && error ? { error } : void 0
847 });
848 }
849 function trackProInstall(isActive, action) {
850 trackEvent(isActive, OnboardingEventName.PRO_INSTALL, {
851 interaction_type: "click",
852 target_type: "button",
853 target_name: action === "install" ? "install_pro_on_this_site" : "i'll_do_it_later",
854 interaction_result: action === "install" ? "pro_installed_onboarding_initialization" : "skip_and_onboarding_initialization",
855 target_location: "onboarding",
856 location_l1: "install_pro_step",
857 state: action === "install"
858 });
859 }
860 function trackStepViewed(isActive, viewedStepId) {
861 trackEvent(isActive, OnboardingEventName.STEP_VIEWED, {
862 interaction_type: "step_load",
863 target_type: "loaded",
864 target_name: STEP_SPEC_NAMES[viewedStepId] ?? viewedStepId,
865 interaction_result: "step_load",
866 target_value: STEP_NUMBERS[viewedStepId],
867 target_location: "onboarding",
868 location_l1: STEP_NUMBERS[viewedStepId],
869 interaction_description: "onboarding step loaded"
870 });
871 }
872 function trackThemeSelected(isActive, theme, source) {
873 const isSiteFeatures = source === "site_features";
874 trackEvent(isActive, OnboardingEventName.THEME_SELECTED, {
875 interaction_type: "click",
876 target_type: "button",
877 target_name: isSiteFeatures ? "continue_with_free" : "continue_with_hello",
878 interaction_result: "theme_installed",
879 target_value: THEME_VALUE_MAP[theme] ?? theme,
880 target_location: "onboarding",
881 location_l1: isSiteFeatures ? "pro_features" : "select_theme",
882 location_l2: isSiteFeatures ? STEP_NUMBERS.site_features : STEP_NUMBERS.theme_selection,
883 interaction_description: isSiteFeatures ? "user installed hello theme on pro features step" : "user installed a certain theme"
884 });
885 }
886 function trackThemeUnselected(isActive) {
887 trackEvent(isActive, OnboardingEventName.THEME_UNSELECTED, {
888 interaction_type: "click",
889 target_type: "button",
890 target_name: "hello_theme",
891 interaction_result: "theme_install_skipped",
892 target_value: "hello_theme",
893 target_location: "onboarding",
894 location_l1: "pro_features",
895 location_l2: STEP_NUMBERS.site_features,
896 interaction_description: "user unselected hello theme box and continued"
897 });
898 }
899 function trackProFeaturesSelected(isActive, params) {
900 const featuresWithoutCore = params.features.filter((id) => !CORE_FEATURE_IDS.has(id));
901 trackEvent(isActive, OnboardingEventName.PRO_FEATURES_SELECTED, {
902 interaction_type: "click",
903 target_type: "cards",
904 target_name: params.targetName,
905 interaction_result: params.targetName === "continue_with_free" ? "finish_onboarding" : "pricing_page",
906 target_value: featuresWithoutCore,
907 target_location: "onboarding",
908 location_l1: "pro_features",
909 location_l2: STEP_NUMBERS.site_features,
910 interaction_description: "user selected pro features and continued"
911 });
912 }
913 function trackBackClicked(isActive, currentStepId) {
914 trackEvent(isActive, OnboardingEventName.BACK_CLICKED, {
915 interaction_type: "click",
916 target_type: "button",
917 target_name: "back",
918 interaction_result: "redirect_back",
919 target_value: STEP_NUMBERS[currentStepId],
920 target_location: "onboarding_navigation",
921 location_l1: "footer",
922 location_l2: STEP_NUMBERS[currentStepId]
923 });
924 }
925 function trackSkipClicked(isActive, currentStepId) {
926 trackEvent(isActive, OnboardingEventName.SKIP_CLICKED, {
927 interaction_type: "click",
928 target_type: "button",
929 target_name: "skip",
930 interaction_result: "skip_step",
931 target_value: STEP_NUMBERS[currentStepId],
932 target_location: "onboarding_navigation",
933 location_l1: "footer",
934 location_l2: STEP_NUMBERS[currentStepId]
935 });
936 }
937 function trackUpgradeClicked(isActive, currentStepId) {
938 trackEvent(isActive, OnboardingEventName.UPGRADE_CLICKED, {
939 interaction_type: "click",
940 target_type: "button",
941 target_name: "upgrade",
942 interaction_result: "pricing_page_opened",
943 target_value: STEP_NUMBERS[currentStepId],
944 target_location: "onboarding_navigation",
945 location_l1: "header",
946 location_l2: STEP_NUMBERS[currentStepId]
947 });
948 }
949 function trackResumeOnboarding(isActive, resumeStepId) {
950 trackEvent(isActive, OnboardingEventName.RESUME_ONBOARDING, {
951 interaction_type: "onboarding_load",
952 target_type: "reloaded",
953 target_name: "reloaded",
954 interaction_result: "onboarding_load",
955 target_value: STEP_NUMBERS[resumeStepId],
956 target_location: "onboarding",
957 location_l1: STEP_NUMBERS[resumeStepId],
958 interaction_description: "onboarding step loaded"
959 });
960 }
961 function trackSiteStarterSelected(isActive, params) {
962 trackEvent(isActive, OnboardingEventName.SITE_STARTER_SELECTED, {
963 window_name: "editor",
964 interaction_type: "click",
965 target_type: "card",
966 target_name: params.targetName,
967 interaction_result: params.interactionResult,
968 target_location: "start_building",
969 location_l1: "",
970 interaction_description: "user selected or ignored site starters on first load of canvas"
971 });
972 }
973 function toSummaryValue(v) {
974 if (v === null || v === void 0 || v === "") return "skip";
975 if (Array.isArray(v) && v.length === 0) return "skip";
976 return v;
977 }
978 function trackSummary(isActive, snapshot) {
979 const proFeaturesOnly = (snapshot.choices.site_features ?? []).filter((id) => !CORE_FEATURE_IDS.has(id));
980 const metadata = [
981 {
982 key: "login_type",
983 value: toSummaryValue(snapshot.isGuest ? "guest" : "elementor_login")
984 },
985 {
986 key: "connect",
987 value: snapshot.isConnected
988 },
989 {
990 key: "pro_install",
991 value: toSummaryValue(snapshot.proInstall ?? false)
992 },
993 {
994 key: "persona",
995 value: toSummaryValue(snapshot.choices.building_for !== null && snapshot.choices.building_for !== void 0 ? PERSONA_VALUE_MAP[snapshot.choices.building_for] ?? snapshot.choices.building_for : null)
996 },
997 {
998 key: "site_topic",
999 value: toSummaryValue(snapshot.choices.site_about ?? [])
1000 },
1001 {
1002 key: "experience_level",
1003 value: toSummaryValue(snapshot.choices.experience_level !== null && snapshot.choices.experience_level !== void 0 ? EXPERIENCE_VALUE_MAP[snapshot.choices.experience_level] ?? snapshot.choices.experience_level : null)
1004 },
1005 {
1006 key: "theme_installed",
1007 value: (() => {
1008 if (snapshot.choices.theme_selection !== null && snapshot.choices.theme_selection !== void 0) return THEME_VALUE_MAP[snapshot.choices.theme_selection] ?? snapshot.choices.theme_selection;
1009 if ((snapshot.choices.site_features ?? []).includes("hello_theme")) return "hello";
1010 return "none";
1011 })()
1012 },
1013 {
1014 key: "pro_features",
1015 value: toSummaryValue(proFeaturesOnly.length ? proFeaturesOnly : "skip")
1016 },
1017 {
1018 key: "steps_completed",
1019 value: snapshot.completedSteps.length
1020 }
1021 ];
1022 trackEvent(isActive, OnboardingEventName.SUMMARY, {
1023 interaction_type: "onboarding_complete",
1024 target_type: "summary",
1025 target_name: "ob_summary",
1026 interaction_result: "onboarding_final_choices",
1027 target_location: "onboarding",
1028 location_l1: "summary",
1029 interaction_description: "trigger event upon onboarding completion or when flow is closed abruptly",
1030 metadata: { summary: metadata }
1031 });
1032 }
1033 function trackErrorReported(isActive, params) {
1034 trackEvent(isActive, OnboardingEventName.ERROR_REPORTED, {
1035 interaction_type: "action_failed",
1036 target_type: params.targetType,
1037 target_name: params.targetName,
1038 interaction_result: "error_reported",
1039 target_value: STEP_NUMBERS[params.stepId] ?? params.stepId,
1040 target_location: "onboarding",
1041 location_l1: STEP_NUMBERS[params.stepId] ?? params.stepId,
1042 interaction_description: "onboarding step loaded",
1043 metadata: { error_title: params.errorBody }
1044 });
1045 }
1046
1047 //#endregion
1048 //#region packages/apps/onboarding/src/analytics/tracking-context.tsx
1049 var TrackingContext = (0, react.createContext)(null);
1050 function TrackingProvider({ children }) {
1051 const [isActive, setIsActive] = (0, react.useState)(false);
1052 const activate = (0, react.useCallback)(() => setIsActive(true), []);
1053 const isConnected = (0, _elementor_store.__useSelector)(selectIsConnected);
1054 const isGuest = (0, _elementor_store.__useSelector)(selectIsGuest);
1055 const hasActivated = (0, react.useRef)(false);
1056 (0, react.useEffect)(() => {
1057 if (hasActivated.current || isActive || !isConnected || isGuest) return;
1058 if ((0, _elementor_events.canSendEvents)()) {
1059 hasActivated.current = true;
1060 (0, _elementor_events.initializeAndEnableTracking)((mp) => {
1061 mp?.set_config?.({ api_transport: "sendbeacon" });
1062 setIsActive(true);
1063 flushQueue();
1064 });
1065 }
1066 }, [
1067 isConnected,
1068 isGuest,
1069 isActive
1070 ]);
1071 const value = {
1072 isActive,
1073 activate
1074 };
1075 return /* @__PURE__ */ react.createElement(TrackingContext.Provider, { value }, children);
1076 }
1077 function useTrackingState() {
1078 const ctx = (0, react.useContext)(TrackingContext);
1079 if (!ctx) throw new Error("useTrackingState must be used within TrackingProvider");
1080 return ctx;
1081 }
1082
1083 //#endregion
1084 //#region packages/apps/onboarding/src/types.ts
1085 var StepId = {
1086 THEME_SELECTION: "theme_selection",
1087 SITE_FEATURES: "site_features"
1088 };
1089
1090 //#endregion
1091 //#region packages/apps/onboarding/src/utils/default-strings.ts
1092 var DEFAULT_STRINGS = {
1093 "common.continue": "Continue",
1094 "common.skip": "Skip",
1095 "common.back": "Back",
1096 "common.finish": "Finish",
1097 "common.loading": "Loading…",
1098 "common.upgrade": "Upgrade",
1099 "common.close_onboarding": "Close onboarding",
1100 "common.installed": "Installed",
1101 "common.recommended": "Recommended",
1102 "error.failed_mark_exit": "Failed to mark user exit.",
1103 "error.failed_complete_step": "Failed to complete step.",
1104 "error.pro_install_failed": "Couldn't install Elementor Pro. Please try again later",
1105 "error.theme_install_failed": "Theme installation didn't complete. Please try again later",
1106 "login.title": "Let's get to work.",
1107 "login.sign_in": "Sign in to Elementor",
1108 "login.continue_another_way": "Continue another way",
1109 "login.continue_as_guest": "Continue as a guest",
1110 "steps.building_for.title": "Who are you building for?",
1111 "steps.building_for.greeting_with_name": "Hey %1$s %2$s Let's get your site set up.",
1112 "steps.building_for.greeting_without_name": "Hey%s Let's get your site set up.",
1113 "steps.building_for.option_myself": "Myself or someone I know",
1114 "steps.building_for.option_business": "My business or workplace",
1115 "steps.building_for.option_client": "A client",
1116 "steps.building_for.option_exploring": "Just exploring",
1117 "steps.site_about.title": "What is your site about?",
1118 "steps.site_about.subtitle": "Choose anything that applies.",
1119 "steps.site_about.option_small_med_business": "Small-Med Business",
1120 "steps.site_about.option_online_store": "Online store",
1121 "steps.site_about.option_company_site": "Company site",
1122 "steps.site_about.option_blog": "Blog",
1123 "steps.site_about.option_landing_page": "Landing page",
1124 "steps.site_about.option_booking": "Booking",
1125 "steps.site_about.option_organization": "Organization",
1126 "steps.site_about.option_other": "Other",
1127 "steps.site_about.greeting_myself": "Got it! We'll keep things simple.",
1128 "steps.site_about.greeting_business": "Great! Let's set up your business site.",
1129 "steps.site_about.greeting_client": "Nice! Let's create something for your client.",
1130 "steps.site_about.greeting_fallback": "Let's get started!",
1131 "steps.experience_level.title": "How experienced are you with Elementor?",
1132 "steps.experience_level.subtitle": "This helps us adjust the editor to your workflow.",
1133 "steps.experience_level.option_beginner": "I'm just getting started",
1134 "steps.experience_level.option_intermediate": "I have some experience",
1135 "steps.experience_level.option_advanced": "I'm very comfortable with Elementor",
1136 "steps.theme_selection.title": "Start with a theme that fits your needs",
1137 "steps.theme_selection.subtitle": "Hello themes are built to work seamlessly with Elementor.",
1138 "steps.theme_selection.v2.title": "Build faster with Hello Theme",
1139 "steps.theme_selection.v2.subtitle": "Use Elementor's lightweight theme for faster setup and full design control.",
1140 "steps.theme_selection.aria_label": "Theme selection",
1141 "steps.theme_selection.theme_hello_label": "Hello",
1142 "steps.theme_selection.theme_hello_description": "A flexible canvas theme you can shape from the ground up",
1143 "steps.theme_selection.by_elementor": "by Elementor",
1144 "steps.theme_selection.greeting_beginner": "Glad you're here!",
1145 "steps.theme_selection.greeting_default": "Great. Let's take it to the next step",
1146 "steps.theme_selection.continue_with_theme": "Continue with this theme",
1147 "steps.theme_selection.v2.continue_with_theme": "Continue with Hello",
1148 "steps.theme_selection.highlight_fast": "Fast by design",
1149 "steps.theme_selection.highlight_responsive": "Responsive from the start",
1150 "steps.theme_selection.highlight_built_for_elementor": "Built for Elementor",
1151 "steps.site_features.title": "What do you want to include in your site?",
1152 "steps.site_features.subtitle": "We'll use this to tailor suggestions for you.",
1153 "steps.site_features.continue_with_free": "Continue with Free",
1154 "steps.site_features.option_classes_variables": "Design system",
1155 "steps.site_features.option_interactions": "Interactions",
1156 "steps.site_features.option_cookie_consent": "Cookie Consent",
1157 "steps.site_features.option_theme_builder": "Theme builder",
1158 "steps.site_features.option_lead_collection": "Forms & leads",
1159 "steps.site_features.option_custom_code": "Custom Code",
1160 "steps.site_features.option_email_deliverability": "Email deliverability",
1161 "steps.site_features.option_ai_generator": "AI tools",
1162 "steps.site_features.option_image_optimization": "Image optimization",
1163 "steps.site_features.option_accessibility_tools": "Accessibility",
1164 "steps.site_features.included": "Included",
1165 "steps.site_features.plan_recommendation_one": "Nice picks 🙂 Elementor One has you covered.",
1166 "steps.site_features.plan_recommendation_pro": "Advanced tools? Elementor Pro includes them.",
1167 "steps.site_features.compare_plans": "View plans",
1168 "pro_install.title": "You already have a Pro subscription",
1169 "pro_install.subtitle": "Would you like to install it on this site now?",
1170 "pro_install.installing": "Installing Elementor Pro…",
1171 "pro_install.installing_short": "Installing…",
1172 "pro_install.install_button": "Install Pro on this site",
1173 "pro_install.logo_alt": "Elementor + Elementor Pro",
1174 "pro_install.do_it_later": "I'll do it later",
1175 "completion.title": "Getting things ready",
1176 "completion.subtitle": "Tailoring the editor to your goals and workflow…"
1177 };
1178
1179 //#endregion
1180 //#region packages/apps/onboarding/src/utils/translations.ts
1181 var t = (0, _elementor_utils.createTranslate)({
1182 configKey: "onboarding",
1183 defaultStrings: DEFAULT_STRINGS
1184 });
1185
1186 //#endregion
1187 //#region packages/apps/onboarding/src/store/slice.ts
1188 function createThemeSelectionStep() {
1189 return {
1190 id: StepId.THEME_SELECTION,
1191 label: t("steps.theme_selection.title"),
1192 type: "single"
1193 };
1194 }
1195 function getDefaultSteps() {
1196 return [{
1197 id: StepId.SITE_FEATURES,
1198 label: t("steps.site_features.title"),
1199 type: "multiple"
1200 }];
1201 }
1202 function applyProInstalledSteps(steps) {
1203 const withoutSiteFeatures = steps.filter((step) => step.id !== StepId.SITE_FEATURES);
1204 if (withoutSiteFeatures.some((step) => step.id === StepId.THEME_SELECTION)) return withoutSiteFeatures;
1205 return [...withoutSiteFeatures, createThemeSelectionStep()];
1206 }
1207 function parseStepsFromConfig(configSteps) {
1208 if (!configSteps || configSteps.length === 0) return getDefaultSteps();
1209 return configSteps.map((step) => ({
1210 id: step.id,
1211 label: step.label,
1212 type: step.type || "single"
1213 }));
1214 }
1215 function parseCompletedSteps(completedSteps) {
1216 if (!completedSteps) return [];
1217 return completedSteps;
1218 }
1219 function getDefaultChoices() {
1220 return {
1221 building_for: null,
1222 site_about: [],
1223 experience_level: null,
1224 theme_selection: null,
1225 site_features: []
1226 };
1227 }
1228 function getEmptyState() {
1229 const steps = getDefaultSteps();
1230 return {
1231 steps,
1232 currentStepId: steps[0]?.id ?? StepId.SITE_FEATURES,
1233 currentStepIndex: 0,
1234 completedSteps: [],
1235 exitType: null,
1236 lastActiveTimestamp: null,
1237 startedAt: null,
1238 choices: getDefaultChoices(),
1239 isLoading: false,
1240 error: null,
1241 hadUnexpectedExit: false,
1242 resumeStepIdForTracking: null,
1243 isConnected: false,
1244 isGuest: false,
1245 userName: "",
1246 urls: {
1247 dashboard: "",
1248 editor: "",
1249 connect: "",
1250 signUp: "",
1251 comparePlans: "",
1252 upgradeUrl: ""
1253 },
1254 shouldShowProInstallScreen: false,
1255 hasProInstallScreenDismissed: false
1256 };
1257 }
1258 function buildStateFromConfig(config) {
1259 if (!config) return getEmptyState();
1260 const steps = parseStepsFromConfig(config.steps);
1261 const firstStepId = steps[0]?.id ?? StepId.SITE_FEATURES;
1262 const progress = config.progress ?? {};
1263 let currentStepIndex = progress.current_step_index ?? 0;
1264 const progressStepId = progress.current_step_id;
1265 const isInvalidStepIndex = currentStepIndex < 0 || currentStepIndex >= steps.length;
1266 const isInvalidStepId = Boolean(progressStepId) && !steps.some((step) => step.id === progressStepId);
1267 if (isInvalidStepIndex || isInvalidStepId) currentStepIndex = 0;
1268 const currentStepId = steps[currentStepIndex]?.id ?? firstStepId;
1269 return {
1270 steps,
1271 currentStepId,
1272 currentStepIndex,
1273 completedSteps: parseCompletedSteps(progress.completed_steps),
1274 exitType: progress.exit_type ?? null,
1275 lastActiveTimestamp: progress.last_active_timestamp ?? null,
1276 startedAt: progress.started_at ?? null,
1277 choices: {
1278 ...getDefaultChoices(),
1279 ...config.choices
1280 },
1281 isLoading: false,
1282 error: null,
1283 hadUnexpectedExit: false,
1284 resumeStepIdForTracking: config.hadUnexpectedExit ? currentStepId : null,
1285 isConnected: config.isConnected ?? false,
1286 isGuest: false,
1287 userName: config.userName ?? "",
1288 urls: config.urls ?? {
1289 dashboard: "",
1290 editor: "",
1291 connect: "",
1292 signUp: "",
1293 comparePlans: "",
1294 upgradeUrl: ""
1295 },
1296 shouldShowProInstallScreen: config.shouldShowProInstallScreen ?? false,
1297 hasProInstallScreenDismissed: false
1298 };
1299 }
1300 var slice = (0, _elementor_store.__createSlice)({
1301 name: "onboarding",
1302 initialState: getEmptyState(),
1303 reducers: {
1304 initFromConfig: (state) => {
1305 const config = window.elementorAppConfig?.onboarding;
1306 if (config) return buildStateFromConfig(config);
1307 return state;
1308 },
1309 goToStep: (state, action) => {
1310 const stepId = action.payload;
1311 const stepIndex = state.steps.findIndex((s) => s.id === stepId);
1312 if (stepIndex !== -1) {
1313 state.currentStepId = stepId;
1314 state.currentStepIndex = stepIndex;
1315 }
1316 },
1317 goToStepIndex: (state, action) => {
1318 const index = action.payload;
1319 if (index >= 0 && index < state.steps.length) {
1320 state.currentStepId = state.steps[index].id;
1321 state.currentStepIndex = index;
1322 }
1323 },
1324 nextStep: (state) => {
1325 const nextIndex = state.currentStepIndex + 1;
1326 if (nextIndex < state.steps.length) {
1327 state.currentStepId = state.steps[nextIndex].id;
1328 state.currentStepIndex = nextIndex;
1329 }
1330 },
1331 prevStep: (state) => {
1332 const prevIndex = state.currentStepIndex - 1;
1333 if (prevIndex >= 0) {
1334 state.currentStepId = state.steps[prevIndex].id;
1335 state.currentStepIndex = prevIndex;
1336 }
1337 },
1338 completeStep: (state, action) => {
1339 const stepId = action.payload;
1340 if (!state.completedSteps.includes(stepId)) state.completedSteps.push(stepId);
1341 },
1342 setUserChoice: (state, action) => {
1343 const { key, value } = action.payload;
1344 state.choices[key] = value;
1345 },
1346 setUserChoices: (state, action) => {
1347 state.choices = {
1348 ...state.choices,
1349 ...action.payload
1350 };
1351 },
1352 setExitType: (state, action) => {
1353 state.exitType = action.payload;
1354 },
1355 startOnboarding: (state) => {
1356 state.startedAt = Date.now();
1357 state.exitType = null;
1358 state.hadUnexpectedExit = false;
1359 },
1360 completeOnboarding: (state) => {
1361 state.exitType = "user_exit";
1362 },
1363 setLoading: (state, action) => {
1364 state.isLoading = action.payload;
1365 },
1366 setError: (state, action) => {
1367 state.error = action.payload;
1368 },
1369 clearUnexpectedExit: (state) => {
1370 state.hadUnexpectedExit = false;
1371 },
1372 clearResumeStepIdForTracking: (state) => {
1373 state.resumeStepIdForTracking = null;
1374 },
1375 setConnected: (state, action) => {
1376 state.isConnected = action.payload;
1377 },
1378 setGuest: (state, action) => {
1379 state.isGuest = action.payload;
1380 },
1381 setShouldShowProInstallScreen: (state, action) => {
1382 state.shouldShowProInstallScreen = action.payload;
1383 },
1384 dismissProInstallScreen: (state) => {
1385 state.hasProInstallScreenDismissed = true;
1386 },
1387 markProInstalled: (state) => {
1388 state.hasProInstallScreenDismissed = true;
1389 state.steps = applyProInstalledSteps(state.steps);
1390 state.currentStepIndex = 0;
1391 state.currentStepId = state.steps[0]?.id ?? StepId.THEME_SELECTION;
1392 }
1393 }
1394 });
1395 var { initFromConfig, goToStep, goToStepIndex, nextStep, prevStep, completeStep, setUserChoice, setUserChoices, setExitType, startOnboarding, completeOnboarding, setLoading, setError, clearUnexpectedExit, clearResumeStepIdForTracking, setConnected, setGuest, setShouldShowProInstallScreen, dismissProInstallScreen, markProInstalled } = slice.actions;
1396 function registerOnboardingSlice() {
1397 (0, _elementor_store.__registerSlice)(slice);
1398 }
1399
1400 //#endregion
1401 //#region packages/apps/onboarding/src/utils/get-config.ts
1402 function getConfig() {
1403 return window.elementorAppConfig?.onboarding ?? null;
1404 }
1405
1406 //#endregion
1407 //#region packages/apps/onboarding/src/hooks/use-check-pro-install-screen.ts
1408 function useCheckProInstallScreen() {
1409 return (0, react.useCallback)(async () => {
1410 const config = getConfig();
1411 if (!config) return { shouldShowProInstallScreen: false };
1412 const response = await fetch(`${config.restUrl}pro-install-screen`, {
1413 method: "GET",
1414 headers: { "X-WP-Nonce": config.nonce }
1415 });
1416 if (!response.ok) return { shouldShowProInstallScreen: false };
1417 return { shouldShowProInstallScreen: (await response.json()).data?.shouldShowProInstallScreen ?? false };
1418 }, []);
1419 }
1420
1421 //#endregion
1422 //#region packages/apps/onboarding/src/hooks/use-elementor-connect.ts
1423 var POPUP_WIDTH = 600;
1424 var POPUP_HEIGHT = 700;
1425 var POPUP_TOP = 200;
1426 var POPUP_LEFT = 0;
1427 var CONNECT_SUCCESS_EVENT = "elementor/connect/success";
1428 function useElementorConnect({ connectUrl, onSuccess }) {
1429 const onSuccessRef = (0, react.useRef)(onSuccess);
1430 onSuccessRef.current = onSuccess;
1431 (0, react.useEffect)(() => {
1432 const handleNativeSuccess = (event) => {
1433 const data = event.detail ?? {};
1434 onSuccessRef.current?.(data);
1435 };
1436 window.addEventListener(CONNECT_SUCCESS_EVENT, handleNativeSuccess);
1437 return () => {
1438 window.removeEventListener(CONNECT_SUCCESS_EVENT, handleNativeSuccess);
1439 };
1440 }, []);
1441 return (0, react.useCallback)(() => {
1442 if (!connectUrl) return;
1443 const popupUrl = `${connectUrl}${connectUrl.includes("?") ? "&" : "?"}mode=popup`;
1444 const features = `toolbar=no,menubar=no,width=${POPUP_WIDTH},height=${POPUP_HEIGHT},top=${POPUP_TOP},left=${POPUP_LEFT}`;
1445 if (!window.open(popupUrl, "elementorConnect", features)) window.location.href = connectUrl;
1446 }, [connectUrl]);
1447 }
1448
1449 //#endregion
1450 //#region packages/apps/onboarding/src/utils/retry.ts
1451 async function withRetry(fn, maxRetries = 1, delayMs = 1e3) {
1452 let lastError = /* @__PURE__ */ new Error("withRetry: all attempts failed");
1453 for (let attempt = 0; attempt <= maxRetries; attempt++) try {
1454 return await fn();
1455 } catch (error) {
1456 lastError = error instanceof Error ? error : new Error(String(error));
1457 if (attempt < maxRetries) await new Promise((r) => setTimeout(r, delayMs));
1458 }
1459 throw lastError;
1460 }
1461
1462 //#endregion
1463 //#region packages/apps/onboarding/src/hooks/use-install-theme.ts
1464 async function installThemeRequest(themeSlug) {
1465 const config = getConfig();
1466 if (!config) throw new Error("Onboarding config not found");
1467 const response = await fetch(`${config.restUrl}install-theme`, {
1468 method: "POST",
1469 headers: {
1470 "Content-Type": "application/json",
1471 "X-WP-Nonce": config.nonce
1472 },
1473 body: JSON.stringify({ theme_slug: themeSlug })
1474 });
1475 if (!response.ok) {
1476 const error = await response.json().catch(() => null);
1477 throw new Error(error?.message || "Failed to install theme");
1478 }
1479 return (await response.json()).data;
1480 }
1481 function useInstallTheme() {
1482 return (0, _elementor_query.useMutation)({ mutationFn: (themeSlug) => withRetry(() => installThemeRequest(themeSlug)) });
1483 }
1484
1485 //#endregion
1486 //#region packages/apps/onboarding/src/hooks/use-onboarding.ts
1487 function useOnboarding() {
1488 const dispatch = (0, _elementor_store.__useDispatch)();
1489 return {
1490 stepId: (0, _elementor_store.__useSelector)(selectCurrentStepId),
1491 stepIndex: (0, _elementor_store.__useSelector)(selectCurrentStepIndex),
1492 step: (0, _elementor_store.__useSelector)(selectCurrentStep),
1493 steps: (0, _elementor_store.__useSelector)(selectSteps),
1494 isFirst: (0, _elementor_store.__useSelector)(selectIsFirstStep),
1495 isLast: (0, _elementor_store.__useSelector)(selectIsLastStep),
1496 totalSteps: (0, _elementor_store.__useSelector)(selectTotalSteps),
1497 completedSteps: (0, _elementor_store.__useSelector)(selectCompletedSteps),
1498 choices: (0, _elementor_store.__useSelector)(selectChoices),
1499 isLoading: (0, _elementor_store.__useSelector)(selectIsLoading),
1500 error: (0, _elementor_store.__useSelector)(selectError),
1501 hadUnexpectedExit: (0, _elementor_store.__useSelector)(selectHadUnexpectedExit),
1502 resumeStepIdForTracking: (0, _elementor_store.__useSelector)(selectResumeStepIdForTracking),
1503 isConnected: (0, _elementor_store.__useSelector)(selectIsConnected),
1504 isGuest: (0, _elementor_store.__useSelector)(selectIsGuest),
1505 hasPassedLogin: (0, _elementor_store.__useSelector)(selectHasPassedLogin),
1506 shouldShowProInstall: (0, _elementor_store.__useSelector)(selectShouldShowProInstall),
1507 userName: (0, _elementor_store.__useSelector)(selectUserName),
1508 urls: (0, _elementor_store.__useSelector)(selectUrls),
1509 actions: (0, react.useMemo)(() => ({
1510 goToStep: (id) => dispatch(goToStep(id)),
1511 goToStepIndex: (index) => dispatch(goToStepIndex(index)),
1512 nextStep: () => dispatch(nextStep()),
1513 prevStep: () => dispatch(prevStep()),
1514 completeStep: (id) => dispatch(completeStep(id)),
1515 setUserChoice: (key, value) => dispatch(setUserChoice({
1516 key,
1517 value
1518 })),
1519 setUserChoices: (data) => dispatch(setUserChoices(data)),
1520 setExitType: (type) => dispatch(setExitType(type)),
1521 startOnboarding: () => dispatch(startOnboarding()),
1522 completeOnboarding: () => dispatch(completeOnboarding()),
1523 setLoading: (loading) => dispatch(setLoading(loading)),
1524 setError: (err) => dispatch(setError(err)),
1525 clearUnexpectedExit: () => dispatch(clearUnexpectedExit()),
1526 clearResumeStepIdForTracking: () => dispatch(clearResumeStepIdForTracking()),
1527 setConnected: (connected) => dispatch(setConnected(connected)),
1528 setGuest: (guest) => dispatch(setGuest(guest)),
1529 setShouldShowProInstallScreen: (value) => dispatch(setShouldShowProInstallScreen(value)),
1530 dismissProInstallScreen: () => dispatch(dismissProInstallScreen()),
1531 markProInstalled: () => dispatch(markProInstalled())
1532 }), [dispatch])
1533 };
1534 }
1535
1536 //#endregion
1537 //#region packages/apps/onboarding/src/hooks/use-onboarding-event.ts
1538 function useOnboardingEvent() {
1539 const { isActive, activate } = useTrackingState();
1540 return (0, react.useMemo)(() => ({
1541 trackOnboardingInitialized: () => trackOnboardingInitialized(isActive),
1542 trackLoginType: (loginType) => trackLoginType(isActive, loginType),
1543 trackConnect: (success, error) => trackConnect(isActive, success, error),
1544 trackProInstall: (action) => trackProInstall(isActive, action),
1545 trackStepViewed: (viewedStepId) => trackStepViewed(isActive, viewedStepId),
1546 trackThemeSelected: (theme, source) => trackThemeSelected(isActive, theme, source),
1547 trackThemeUnselected: () => trackThemeUnselected(isActive),
1548 trackProFeaturesSelected: (params) => trackProFeaturesSelected(isActive, params),
1549 trackBackClicked: (currentStepId) => trackBackClicked(isActive, currentStepId),
1550 trackSkipClicked: (currentStepId) => trackSkipClicked(isActive, currentStepId),
1551 trackUpgradeClicked: (currentStepId) => trackUpgradeClicked(isActive, currentStepId),
1552 trackResumeOnboarding: (resumeStepId) => trackResumeOnboarding(isActive, resumeStepId),
1553 trackSiteStarterSelected: (params) => trackSiteStarterSelected(isActive, params),
1554 trackSummary: (snapshot) => trackSummary(isActive, snapshot),
1555 trackErrorReported: (params) => trackErrorReported(isActive, params),
1556 activateTracking: activate,
1557 flushQueue
1558 }), [isActive, activate]);
1559 }
1560
1561 //#endregion
1562 //#region packages/apps/onboarding/src/hooks/use-update-choices.ts
1563 async function updateChoices(params) {
1564 const config = getConfig();
1565 if (!config) throw new Error("Onboarding config not found");
1566 if (!(await fetch(`${config.restUrl}user-choices`, {
1567 method: "POST",
1568 headers: {
1569 "Content-Type": "application/json",
1570 "X-WP-Nonce": config.nonce
1571 },
1572 body: JSON.stringify(params)
1573 })).ok) throw new Error("Failed to update choices");
1574 }
1575 function useUpdateChoices() {
1576 return (0, _elementor_query.useMutation)({ mutationFn: updateChoices });
1577 }
1578
1579 //#endregion
1580 //#region packages/apps/onboarding/src/hooks/use-update-progress.ts
1581 async function updateProgress(params) {
1582 const config = getConfig();
1583 if (!config) throw new Error("Onboarding config not found");
1584 if (!(await fetch(`${config.restUrl}user-progress`, {
1585 method: "POST",
1586 headers: {
1587 "Content-Type": "application/json",
1588 "X-WP-Nonce": config.nonce
1589 },
1590 body: JSON.stringify(params)
1591 })).ok) throw new Error("Failed to update progress");
1592 }
1593 function useUpdateProgress() {
1594 return (0, _elementor_query.useMutation)({ mutationFn: updateProgress });
1595 }
1596
1597 //#endregion
1598 //#region packages/apps/onboarding/src/steps/step-visuals.ts
1599 var ONBOARDING_ASSETS_PATH = "images/app/onboarding/";
1600 var VIDEOS_BASE_URL = "https://assets.elementor.com/onboarding/v1/videos/";
1601 var CONTENT_MAX_WIDTH_WIDE_ELEMENT = 724;
1602 var getAssetsBaseUrl = () => window.elementorCommon?.config?.urls?.assets ?? "";
1603 var getOnboardingAssetUrl = (fileName) => {
1604 const baseUrl = getAssetsBaseUrl();
1605 const path = `${ONBOARDING_ASSETS_PATH}${fileName}`;
1606 return baseUrl ? `${baseUrl}${path}` : path;
1607 };
1608 var getOnboardingVideoUrl = (fileName) => `${VIDEOS_BASE_URL}${fileName}`;
1609 var buildBackground = (fileName) => {
1610 return `url(${getOnboardingAssetUrl(fileName)}) center / cover no-repeat`;
1611 };
1612 var DEFAULT_CONFIG = { background: buildBackground("step-1.webp") };
1613 var LOGIN_CONFIG = { background: buildBackground("login.webp") };
1614 var stepVisuals = {
1615 [StepId.THEME_SELECTION]: {
1616 background: "",
1617 video: getOnboardingVideoUrl("step-4-v2.webm"),
1618 contentMaxWidth: CONTENT_MAX_WIDTH_WIDE_ELEMENT
1619 },
1620 [StepId.SITE_FEATURES]: {
1621 background: "",
1622 video: getOnboardingVideoUrl("step-4-v2.webm"),
1623 contentMaxWidth: CONTENT_MAX_WIDTH_WIDE_ELEMENT
1624 }
1625 };
1626 var getLoginVisualConfig = () => LOGIN_CONFIG;
1627 var getStepVisualConfig = (stepId) => stepVisuals[stepId] ?? DEFAULT_CONFIG;
1628 var getVideoUrls = () => {
1629 const urls = Object.values(stepVisuals).flatMap((config) => config.video ? [config.video] : []);
1630 return [...new Set(urls)];
1631 };
1632
1633 //#endregion
1634 //#region packages/apps/onboarding/src/hooks/use-video-preload.ts
1635 var preloadedUrls = /* @__PURE__ */ new Set();
1636 function useVideoPreload() {
1637 (0, react.useEffect)(() => {
1638 let isMounted = true;
1639 const preloadSequentially = async () => {
1640 for (const url of getVideoUrls()) {
1641 if (!isMounted) break;
1642 if (preloadedUrls.has(url)) continue;
1643 await waitForVideo(url);
1644 }
1645 };
1646 preloadSequentially();
1647 return () => {
1648 isMounted = false;
1649 };
1650 }, []);
1651 }
1652 var waitForVideo = (url) => new Promise((resolve) => {
1653 const video = document.createElement("video");
1654 const cleanup = () => {
1655 video.removeEventListener("canplaythrough", onCanPlayThrough);
1656 video.removeEventListener("error", onError);
1657 video.src = "";
1658 video.load();
1659 };
1660 const onCanPlayThrough = () => {
1661 preloadedUrls.add(url);
1662 cleanup();
1663 resolve();
1664 };
1665 const onError = () => {
1666 cleanup();
1667 resolve();
1668 };
1669 video.addEventListener("canplaythrough", onCanPlayThrough);
1670 video.addEventListener("error", onError);
1671 video.preload = "auto";
1672 video.src = url;
1673 video.load();
1674 });
1675
1676 //#endregion
1677 //#region packages/apps/onboarding/src/components/fullscreen-card.tsx
1678 var BACKDROP_OPACITY = .6;
1679 var FullscreenCardRoot = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => prop !== "background" })(({ theme, background }) => ({
1680 position: "relative",
1681 minHeight: "100%",
1682 width: "100%",
1683 display: "flex",
1684 alignItems: "center",
1685 justifyContent: "center",
1686 padding: theme.spacing(4),
1687 background
1688 }));
1689 var Backdrop = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
1690 position: "absolute",
1691 inset: 0,
1692 backgroundColor: theme.palette.mode === "dark" ? theme.palette.common.black : theme.palette.text.primary,
1693 opacity: BACKDROP_OPACITY
1694 }));
1695 var Card = (0, _elementor_ui.styled)(_elementor_ui.Paper)(({ theme }) => ({
1696 width: 512,
1697 maxWidth: "90%",
1698 padding: theme.spacing(6, 6, 5),
1699 borderRadius: theme.shape.borderRadius * 2,
1700 boxShadow: theme.shadows[24],
1701 display: "flex",
1702 flexDirection: "column",
1703 alignItems: "center",
1704 gap: theme.spacing(3),
1705 position: "relative",
1706 zIndex: 1
1707 }));
1708 var PrimaryButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => ({
1709 borderRadius: theme.shape.borderRadius,
1710 textTransform: "none",
1711 fontSize: theme.typography.pxToRem(15),
1712 fontWeight: 500,
1713 letterSpacing: "0.46px",
1714 lineHeight: theme.typography.pxToRem(26),
1715 padding: theme.spacing(1, 2.75),
1716 minHeight: theme.spacing(6)
1717 }));
1718 var SecondaryButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => ({
1719 display: "flex",
1720 alignItems: "center",
1721 justifyContent: "center",
1722 flexWrap: "wrap",
1723 gap: theme.spacing(1),
1724 border: `1px solid ${theme.palette.divider}`,
1725 borderRadius: theme.shape.borderRadius,
1726 textTransform: "none",
1727 fontSize: theme.typography.pxToRem(15),
1728 fontWeight: 500,
1729 letterSpacing: "0.46px",
1730 lineHeight: theme.typography.pxToRem(26),
1731 padding: theme.spacing(1, 3)
1732 }));
1733 var SocialIconWrapper = (0, _elementor_ui.styled)(_elementor_ui.Paper)(({ theme }) => ({
1734 backgroundColor: theme.palette.background.paper,
1735 backgroundImage: theme.palette.mode === "dark" ? "linear-gradient(rgba(255, 255, 255, 0.165), rgba(255, 255, 255, 0.165))" : "none",
1736 width: theme.spacing(3.5),
1737 height: theme.spacing(3.5),
1738 borderRadius: "50%",
1739 border: `1px solid ${theme.palette.divider}`,
1740 boxShadow: "none",
1741 display: "flex",
1742 alignItems: "center",
1743 justifyContent: "center",
1744 marginLeft: theme.spacing(-1),
1745 "&:first-of-type": {
1746 marginLeft: 0,
1747 zIndex: 1
1748 },
1749 "&:nth-of-type(2)": { zIndex: 2 },
1750 "&:nth-of-type(3)": { zIndex: 3 },
1751 "& svg": {
1752 width: theme.spacing(2.5),
1753 height: theme.spacing(2.5)
1754 }
1755 }));
1756 var TextButton = (0, _elementor_ui.styled)(_elementor_ui.Link)(({ theme }) => ({
1757 textTransform: "none",
1758 fontSize: theme.typography.pxToRem(13),
1759 fontWeight: 500,
1760 letterSpacing: "0.46px",
1761 lineHeight: theme.typography.pxToRem(22)
1762 }));
1763 function FullscreenCard({ children, "data-testid": testId }) {
1764 const { background } = getLoginVisualConfig();
1765 return /* @__PURE__ */ react.createElement(FullscreenCardRoot, {
1766 background,
1767 "data-testid": testId
1768 }, /* @__PURE__ */ react.createElement(Backdrop, null), /* @__PURE__ */ react.createElement(Card, { elevation: 24 }, children));
1769 }
1770
1771 //#endregion
1772 //#region packages/apps/onboarding/src/components/ui/elementor-icon.tsx
1773 function ElementorIcon(props) {
1774 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
1775 viewBox: "0 0 32 32",
1776 ...props
1777 }, /* @__PURE__ */ react.createElement("path", {
1778 d: "M15.93 0C7.13 0 0 7.16 0 16s7.13 16 15.93 16c8.8 0 15.93-7.16 15.93-16S24.73 0 15.93 0zM11.15 24H7.97V8h3.18v16zm12.74 0h-9.56v-3.2h9.56V24zm0-6.4h-9.56v-3.2h9.56v3.2zm0-6.4h-9.56V8h9.56v3.2z",
1779 fill: "currentColor"
1780 }));
1781 }
1782
1783 //#endregion
1784 //#region packages/apps/onboarding/src/steps/screens/login.tsx
1785 function Login({ onConnect, onSignUp, onContinueAsGuest }) {
1786 const theme = (0, _elementor_ui.useTheme)();
1787 return /* @__PURE__ */ react.createElement(FullscreenCard, { "data-testid": "login-screen" }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
1788 display: "flex",
1789 alignItems: "center",
1790 marginBottom: -1
1791 }, /* @__PURE__ */ react.createElement(ElementorIcon, { sx: {
1792 width: 32,
1793 height: 32
1794 } })), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
1795 variant: "h5",
1796 color: "text.primary",
1797 align: "center",
1798 fontWeight: 500,
1799 fontFamily: "Poppins"
1800 }, t("login.title")), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
1801 width: "100%",
1802 gap: theme.spacing(2)
1803 }, /* @__PURE__ */ react.createElement(PrimaryButton, {
1804 variant: "contained",
1805 color: "primary",
1806 fullWidth: true,
1807 size: "large",
1808 onClick: onConnect
1809 }, t("login.sign_in")), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, { spacing: 6 }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
1810 spacing: 2,
1811 alignItems: "center"
1812 }, /* @__PURE__ */ react.createElement(SecondaryButton, {
1813 onClick: onSignUp,
1814 variant: "outlined",
1815 color: "primary",
1816 fullWidth: true
1817 }, /* @__PURE__ */ react.createElement(_elementor_ui.Box, {
1818 display: "flex",
1819 alignItems: "center"
1820 }, /* @__PURE__ */ react.createElement(SocialIconWrapper, { elevation: 24 }, /* @__PURE__ */ react.createElement(GoogleIcon, null)), /* @__PURE__ */ react.createElement(SocialIconWrapper, { elevation: 24 }, /* @__PURE__ */ react.createElement(FacebookIcon, null)), /* @__PURE__ */ react.createElement(SocialIconWrapper, { elevation: 24 }, /* @__PURE__ */ react.createElement(AppleIcon, null))), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
1821 variant: "button",
1822 fontWeight: "500"
1823 }, t("login.continue_another_way")))), /* @__PURE__ */ react.createElement(TextButton, {
1824 href: "#",
1825 color: "info.main",
1826 align: "center",
1827 variant: "body2",
1828 onClick: (event) => onContinueAsGuest?.(event),
1829 sx: { textDecoration: "none" }
1830 }, t("common.skip")))));
1831 }
1832
1833 //#endregion
1834 //#region packages/apps/onboarding/src/components/toast/toast-context.tsx
1835 var AUTO_HIDE_DURATION = 8e3;
1836 var ToastContext = (0, react.createContext)(null);
1837 function ToastProvider({ children }) {
1838 const [toasts, setToasts] = (0, react.useState)([]);
1839 const idCounter = (0, react.useRef)(0);
1840 const showToast = (0, react.useCallback)((message) => {
1841 const id = String(++idCounter.current);
1842 setToasts((prev) => [...prev, {
1843 id,
1844 message
1845 }]);
1846 }, []);
1847 const dismissToast = (0, react.useCallback)((id) => {
1848 setToasts((prev) => prev.filter((t) => t.id !== id));
1849 }, []);
1850 const value = (0, react.useMemo)(() => ({
1851 showToast,
1852 dismissToast
1853 }), [showToast, dismissToast]);
1854 const currentToast = toasts[0] ?? null;
1855 const handleClose = (0, react.useCallback)((_event, reason) => {
1856 if (reason === "clickaway") return;
1857 if (currentToast) dismissToast(currentToast.id);
1858 }, [currentToast, dismissToast]);
1859 return /* @__PURE__ */ react.createElement(ToastContext.Provider, { value }, children, /* @__PURE__ */ react.createElement(_elementor_ui.Snackbar, {
1860 open: !!currentToast,
1861 autoHideDuration: AUTO_HIDE_DURATION,
1862 onClose: handleClose,
1863 anchorOrigin: {
1864 vertical: "top",
1865 horizontal: "center"
1866 },
1867 ContentProps: {
1868 elevation: 6,
1869 sx: {
1870 borderRadius: "4px",
1871 "& .MuiSnackbarContent-action": {
1872 gap: "4px",
1873 marginInlineStart: "4px"
1874 }
1875 }
1876 },
1877 message: currentToast?.message,
1878 action: /* @__PURE__ */ react.createElement(_elementor_ui.IconButton, {
1879 size: "small",
1880 "aria-label": "close",
1881 color: "inherit",
1882 onClick: handleClose
1883 }, /* @__PURE__ */ react.createElement(_elementor_icons.XIcon, { fontSize: "small" }))
1884 }));
1885 }
1886 function useToast() {
1887 const ctx = (0, react.useContext)(ToastContext);
1888 if (!ctx) throw new Error("useToast must be used within a ToastProvider");
1889 return ctx;
1890 }
1891
1892 //#endregion
1893 //#region packages/apps/onboarding/src/hooks/use-install-pro.ts
1894 async function installProRequest() {
1895 const config = getConfig();
1896 if (!config) throw new Error("Onboarding config not found");
1897 const response = await fetch(`${config.restUrl}install-pro`, {
1898 method: "POST",
1899 headers: {
1900 "Content-Type": "application/json",
1901 "X-WP-Nonce": config.nonce
1902 }
1903 });
1904 if (!response.ok) {
1905 const error = await response.json().catch(() => null);
1906 throw new Error(error?.message || "Failed to install Elementor Pro");
1907 }
1908 return (await response.json()).data;
1909 }
1910 function useInstallPro() {
1911 return (0, _elementor_query.useMutation)({ mutationFn: () => withRetry(installProRequest) });
1912 }
1913
1914 //#endregion
1915 //#region packages/apps/onboarding/src/steps/screens/pro-install.tsx
1916 var ProLogo = (0, _elementor_ui.styled)("img")(({ theme }) => ({
1917 maxWidth: 200,
1918 height: "auto",
1919 margin: theme.spacing(1, 0)
1920 }));
1921 function ProInstall() {
1922 const { actions } = useOnboarding();
1923 const installPro = useInstallPro();
1924 const { showToast } = useToast();
1925 const { trackProInstall, trackStepViewed, trackErrorReported } = useOnboardingEvent();
1926 const hasTrackedView = (0, react.useRef)(false);
1927 (0, react.useEffect)(() => {
1928 if (!hasTrackedView.current) {
1929 hasTrackedView.current = true;
1930 trackStepViewed("pro_install");
1931 }
1932 }, [trackStepViewed]);
1933 function handleInstall() {
1934 trackProInstall("install");
1935 installPro.mutate(void 0, {
1936 onSuccess: () => {
1937 actions.markProInstalled();
1938 },
1939 onError: (error) => {
1940 trackErrorReported({
1941 targetType: "install",
1942 targetName: "install_pro_on_this_site",
1943 stepId: "pro_install",
1944 errorBody: error instanceof Error ? error.message : "Failed to install Elementor Pro"
1945 });
1946 showToast(t("error.pro_install_failed"));
1947 actions.dismissProInstallScreen();
1948 }
1949 });
1950 }
1951 function handleDismiss(event) {
1952 event.preventDefault();
1953 trackProInstall("later");
1954 actions.dismissProInstallScreen();
1955 }
1956 const isInstalling = installPro.isPending;
1957 return /* @__PURE__ */ react.createElement(FullscreenCard, { "data-testid": "pro-install-screen" }, /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
1958 variant: "h5",
1959 color: "text.primary",
1960 align: "center",
1961 fontWeight: 500,
1962 fontFamily: "Poppins",
1963 marginBottom: -2
1964 }, t("pro_install.title")), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
1965 variant: "body2",
1966 align: "center",
1967 color: "text.secondary"
1968 }, isInstalling ? t("pro_install.installing") : t("pro_install.subtitle")), /* @__PURE__ */ react.createElement(ProLogo, {
1969 src: getOnboardingAssetUrl("install-pro-logo.png"),
1970 alt: t("pro_install.logo_alt")
1971 }), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
1972 spacing: 2,
1973 width: "100%",
1974 alignItems: "center"
1975 }, /* @__PURE__ */ react.createElement(PrimaryButton, {
1976 variant: "contained",
1977 color: "primary",
1978 fullWidth: true,
1979 size: "large",
1980 onClick: handleInstall,
1981 disabled: isInstalling,
1982 startIcon: isInstalling ? /* @__PURE__ */ react.createElement(_elementor_ui.CircularProgress, {
1983 size: 18,
1984 color: "inherit"
1985 }) : void 0
1986 }, isInstalling ? t("pro_install.installing_short") : t("pro_install.install_button")), /* @__PURE__ */ react.createElement(TextButton, {
1987 href: "#",
1988 align: "center",
1989 onClick: (event) => handleDismiss(event),
1990 disabled: isInstalling,
1991 sx: { textDecoration: "none" }
1992 }, t("pro_install.do_it_later"))));
1993 }
1994
1995 //#endregion
1996 //#region packages/apps/onboarding/src/components/ui/styled-components.ts
1997 var GREETING_BANNER_BG_COLOR_LIGHT = "#fae4fa";
1998 var GREETING_BANNER_BG_COLOR_DARK = "#491146";
1999 var StepTitle = (0, _elementor_ui.styled)(_elementor_ui.Typography)({
2000 fontWeight: 500,
2001 fontFamily: "Poppins"
2002 });
2003 var GreetingBannerRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2004 display: "inline-flex",
2005 alignItems: "center",
2006 justifyContent: "center",
2007 paddingInline: theme.spacing(3),
2008 paddingBlock: theme.spacing(1.5),
2009 borderRadius: 16,
2010 backgroundColor: theme.palette.mode === "dark" ? GREETING_BANNER_BG_COLOR_DARK : GREETING_BANNER_BG_COLOR_LIGHT,
2011 alignSelf: "flex-start"
2012 }));
2013
2014 //#endregion
2015 //#region packages/apps/onboarding/src/components/ui/selection-badge.tsx
2016 var SelectionBadgeRoot = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => "variant" !== prop })(({ theme, variant }) => ({
2017 position: "absolute",
2018 top: theme.spacing(-1),
2019 insetInlineEnd: theme.spacing(-1),
2020 display: "flex",
2021 alignItems: "center",
2022 justifyContent: "center",
2023 width: theme.spacing(2.25),
2024 height: theme.spacing(2.25),
2025 borderRadius: "50%",
2026 backgroundColor: variant === "paid" ? theme.palette.promotion.main : theme.palette.text.primary,
2027 color: theme.palette.common.white,
2028 "& .MuiSvgIcon-root": { fontSize: theme.typography.pxToRem(14) }
2029 }));
2030 function SelectionBadge({ icon: Icon, variant = "free" }) {
2031 const theme = (0, _elementor_ui.useTheme)();
2032 return /* @__PURE__ */ react.createElement(SelectionBadgeRoot, { variant }, /* @__PURE__ */ react.createElement(Icon, { sx: { fill: variant === "paid" ? theme.palette.common.white : theme.palette.secondary.contrastText } }));
2033 }
2034
2035 //#endregion
2036 //#region packages/apps/onboarding/src/steps/components/site-features/pro-plan-notice.tsx
2037 var PRO_PLAN_NOTICE_BG_LIGHT = "#FAE4FA";
2038 var PRO_PLAN_NOTICE_BG_DARK = "#491146";
2039 var ProPlanNoticeRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2040 display: "flex",
2041 alignItems: "center",
2042 gap: theme.spacing(1),
2043 padding: theme.spacing(1.5, 3),
2044 borderRadius: theme.spacing(2),
2045 backgroundColor: theme.palette.mode === "dark" ? PRO_PLAN_NOTICE_BG_DARK : PRO_PLAN_NOTICE_BG_LIGHT,
2046 width: "max-content",
2047 gridColumn: "1 / -1",
2048 marginBlockStart: theme.spacing(2),
2049 [theme.breakpoints.down("sm")]: {
2050 flexDirection: "column",
2051 justifyContent: "center",
2052 justifySelf: "center"
2053 }
2054 }));
2055 function ProPlanNotice({ planName }) {
2056 const { urls, choices } = useOnboarding();
2057 const { trackProFeaturesSelected } = useOnboardingEvent();
2058 const comparePlansUrl = urls.comparePlans;
2059 const theme = (0, _elementor_ui.useTheme)();
2060 const isOne = "One" === planName;
2061 const handleComparePlansClick = (0, react.useCallback)(() => {
2062 trackProFeaturesSelected({
2063 targetName: "compare plans",
2064 features: choices.site_features || []
2065 });
2066 }, [trackProFeaturesSelected, choices.site_features]);
2067 return /* @__PURE__ */ react.createElement(ProPlanNoticeRoot, null, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2068 direction: "row",
2069 spacing: 1.5,
2070 alignItems: "center"
2071 }, /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2072 variant: "body2",
2073 color: "text.primary",
2074 fontSize: theme.spacing(2)
2075 }, isOne ? t("steps.site_features.plan_recommendation_one") : t("steps.site_features.plan_recommendation_pro"))), /* @__PURE__ */ react.createElement(_elementor_ui.Link, {
2076 href: comparePlansUrl,
2077 target: "_blank",
2078 color: theme.palette.mode === "dark" ? "common.white" : "promotion.main",
2079 onClick: handleComparePlansClick,
2080 sx: {
2081 display: "flex",
2082 alignItems: "center",
2083 gap: theme.spacing(.25),
2084 fontSize: theme.spacing(2),
2085 "&:hover": {
2086 textDecoration: "underline",
2087 textDecorationColor: "rgba(147, 0, 63, 0.4)"
2088 },
2089 "& > svg": { fontSize: "inherit" }
2090 }
2091 }, t("steps.site_features.compare_plans"), /* @__PURE__ */ react.createElement(_elementor_icons.ArrowUpRightIcon, null)));
2092 }
2093
2094 //#endregion
2095 //#region packages/apps/onboarding/src/steps/components/site-features/feature-grid.tsx
2096 var CornerChip = (0, _elementor_ui.styled)(_elementor_ui.Chip)(({ theme }) => ({
2097 position: "absolute",
2098 insetBlockStart: theme.spacing(.75),
2099 insetInlineStart: theme.spacing(.75),
2100 height: theme.spacing(2.25),
2101 "& .MuiChip-label": {
2102 fontSize: theme.spacing(1.5),
2103 padding: `${theme.spacing(.375)} ${theme.spacing(.625)}`
2104 }
2105 }));
2106 var FeatureCard = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => !["isSelected", "isCore"].includes(prop) })(({ theme, isSelected, isCore }) => ({
2107 position: "relative",
2108 display: "flex",
2109 flexDirection: "column",
2110 alignItems: "center",
2111 justifyContent: "center",
2112 aspectRatio: "1",
2113 minHeight: theme.spacing(12),
2114 padding: theme.spacing(2),
2115 borderRadius: theme.spacing(1),
2116 border: isSelected ? `2px solid ${theme.palette.text.primary}` : `1px solid ${theme.palette.divider}`,
2117 cursor: isCore ? "default" : "pointer",
2118 transition: "border-color 0.2s ease, background-color 0.2s ease",
2119 ...!isCore && { "&:hover": { backgroundColor: theme.palette.action.hover } }
2120 }));
2121 function FeatureGrid({ options, selectedValues, onFeatureClick }) {
2122 const theme = (0, _elementor_ui.useTheme)();
2123 const isPaid = (licenseType) => licenseType === "pro" || licenseType === "one";
2124 const selectedPaidFeatures = selectedValues.filter((id) => {
2125 const featureOption = options.find((item) => item.id === id);
2126 return featureOption && isPaid(featureOption.licenseType);
2127 });
2128 const shouldDisplayProPlanNotice = selectedPaidFeatures.length > 0;
2129 const planName = selectedPaidFeatures.some((id) => {
2130 return options.find((item) => item.id === id)?.licenseType === "one";
2131 }) ? "One" : "Pro";
2132 const handleKeyDown = (event, handler) => {
2133 if (["Enter", " "].includes(event.key)) {
2134 event.preventDefault();
2135 handler();
2136 }
2137 };
2138 return /* @__PURE__ */ react.createElement(_elementor_ui.Box, {
2139 justifyContent: "center",
2140 sx: {
2141 display: "grid",
2142 gridTemplateColumns: {
2143 xs: "repeat(auto-fit, minmax(100px, 135px))",
2144 sm: "repeat(4, 140px)",
2145 md: "repeat(5, 140px)"
2146 },
2147 gap: 2,
2148 width: "100%"
2149 }
2150 }, options.map((option) => {
2151 const isSelected = selectedValues.includes(option.id);
2152 const Icon = option.Icon;
2153 const isOptionPaid = isPaid(option.licenseType);
2154 const BadgeIcon = isOptionPaid ? _elementor_icons.CrownFilledIcon : _elementor_icons.CheckIcon;
2155 const isCore = option.licenseType === "core";
2156 const handleClick = () => onFeatureClick(option.id);
2157 const handleKeyDownEvent = isCore ? void 0 : (event) => handleKeyDown(event, handleClick);
2158 return /* @__PURE__ */ react.createElement(FeatureCard, {
2159 key: option.id,
2160 "data-testid": `feature-card-${option.id}`,
2161 isSelected,
2162 isCore,
2163 onClick: isCore ? void 0 : handleClick,
2164 role: isCore ? void 0 : "button",
2165 tabIndex: isCore ? void 0 : 0,
2166 onKeyDown: handleKeyDownEvent,
2167 "aria-pressed": isCore ? void 0 : isSelected,
2168 "aria-label": isCore ? void 0 : t(option.labelKey)
2169 }, isCore && /* @__PURE__ */ react.createElement(CornerChip, {
2170 label: t("steps.site_features.included"),
2171 size: "small"
2172 }), isSelected && /* @__PURE__ */ react.createElement(SelectionBadge, {
2173 icon: BadgeIcon,
2174 variant: isOptionPaid ? "paid" : "free"
2175 }), /* @__PURE__ */ react.createElement(_elementor_ui.Box, {
2176 className: "feature-icon",
2177 display: "flex",
2178 alignItems: "center",
2179 justifyContent: "center",
2180 color: "primary.dark",
2181 width: theme.spacing(4),
2182 height: theme.spacing(4),
2183 sx: {
2184 mt: 2,
2185 mb: 1
2186 }
2187 }, /* @__PURE__ */ react.createElement(Icon, { sx: {
2188 width: theme.spacing(4),
2189 height: theme.spacing(4),
2190 fontSize: theme.spacing(4)
2191 } })), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2192 variant: "body2",
2193 color: "text.secondary",
2194 display: "flex",
2195 alignItems: "center",
2196 align: "center",
2197 sx: { minHeight: theme.spacing(5) }
2198 }, t(option.labelKey)));
2199 }), shouldDisplayProPlanNotice && /* @__PURE__ */ react.createElement(ProPlanNotice, { planName }));
2200 }
2201
2202 //#endregion
2203 //#region packages/apps/onboarding/src/steps/screens/site-features.tsx
2204 var FEATURE_OPTION_IDS = new Set(FEATURE_OPTIONS.map((featureOption) => featureOption.id));
2205 function SiteFeatures() {
2206 const { choices, actions } = useOnboarding();
2207 const theme = (0, _elementor_ui.useTheme)();
2208 const rawSiteFeatures = choices.site_features;
2209 const storedSelectableFeatures = (0, react.useMemo)(() => (rawSiteFeatures || []).filter((id) => FEATURE_OPTION_IDS.has(id) && !CORE_FEATURE_IDS.has(id)), [rawSiteFeatures]);
2210 const selectedValues = (0, react.useMemo)(() => {
2211 const combined = [...CORE_FEATURE_IDS, ...storedSelectableFeatures];
2212 return combined.filter((id, index) => combined.indexOf(id) === index);
2213 }, [storedSelectableFeatures]);
2214 function handleFeatureClick(id) {
2215 if (CORE_FEATURE_IDS.has(id)) return;
2216 const updatedSelectableFeatures = storedSelectableFeatures.includes(id) ? storedSelectableFeatures.filter((featureId) => featureId !== id) : [...storedSelectableFeatures, id];
2217 actions.setUserChoice("site_features", updatedSelectableFeatures);
2218 }
2219 return /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2220 spacing: 4,
2221 width: "100%",
2222 "data-testid": "site-features-step"
2223 }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2224 spacing: 1,
2225 textAlign: "center",
2226 alignItems: "center"
2227 }, /* @__PURE__ */ react.createElement(StepTitle, {
2228 color: "text.primary",
2229 variant: "h5",
2230 align: "center",
2231 paddingBlockStart: theme.spacing(2.5)
2232 }, t("steps.site_features.title")), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2233 variant: "body1",
2234 color: "text.secondary"
2235 }, t("steps.site_features.subtitle"))), /* @__PURE__ */ react.createElement(FeatureGrid, {
2236 options: FEATURE_OPTIONS,
2237 selectedValues,
2238 onFeatureClick: handleFeatureClick
2239 }));
2240 }
2241
2242 //#endregion
2243 //#region packages/apps/onboarding/src/components/theme-selection/constants.ts
2244 var HELLO_THEME = {
2245 slug: "hello-elementor",
2246 labelKey: "steps.theme_selection.theme_hello_label",
2247 descriptionKey: "steps.theme_selection.theme_hello_description",
2248 previewBgColor: "#f6f6f6"
2249 };
2250 function getGreetingText(experienceLevel) {
2251 if (experienceLevel === "beginner") return t("steps.theme_selection.greeting_beginner");
2252 return t("steps.theme_selection.greeting_default");
2253 }
2254
2255 //#endregion
2256 //#region packages/apps/onboarding/src/components/theme-selection/styled-components.ts
2257 var InstalledChip = (0, _elementor_ui.styled)(_elementor_ui.Chip)(({ theme }) => ({
2258 position: "absolute",
2259 insetBlockStart: theme.spacing(1),
2260 insetInlineStart: theme.spacing(1),
2261 zIndex: 1,
2262 backgroundColor: theme.palette.success.main,
2263 color: theme.palette.success.contrastText,
2264 "& .MuiChip-icon": { color: "inherit" }
2265 }));
2266
2267 //#endregion
2268 //#region packages/apps/onboarding/src/components/theme-selection/hello-theme-preview.tsx
2269 var HELLO_BADGE_BG_COLOR = "#ED01EE";
2270 var LEFT_CARD_SIZE = 120;
2271 var RIGHT_CARD_SIZE = 144;
2272 var CARDS_OVERLAP = 15;
2273 var PLUS_SIZE = 32;
2274 var PreviewRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)({
2275 position: "relative",
2276 display: "flex",
2277 alignItems: "center",
2278 justifyContent: "center"
2279 });
2280 var ElementorPlaceholderCard = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2281 display: "flex",
2282 alignItems: "center",
2283 justifyContent: "center",
2284 inlineSize: LEFT_CARD_SIZE,
2285 blockSize: LEFT_CARD_SIZE,
2286 borderRadius: theme.spacing(1.25),
2287 border: `2px dashed ${theme.palette.divider}`,
2288 backgroundColor: "#F4F4F4",
2289 flexShrink: 0
2290 }));
2291 var HelloCard = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2292 position: "relative",
2293 display: "flex",
2294 flexDirection: "column",
2295 alignItems: "center",
2296 justifyContent: "flex-start",
2297 gap: theme.spacing(1.5),
2298 inlineSize: RIGHT_CARD_SIZE,
2299 blockSize: RIGHT_CARD_SIZE,
2300 paddingBlockStart: theme.spacing(5.5),
2301 paddingBlockEnd: theme.spacing(2.5),
2302 borderRadius: theme.spacing(1.25),
2303 border: `2px solid ${theme.palette.text.primary}`,
2304 backgroundColor: theme.palette.background.paper,
2305 marginInlineStart: `-${CARDS_OVERLAP}px`,
2306 flexShrink: 0,
2307 zIndex: 1
2308 }));
2309 var HelloBadge = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2310 position: "absolute",
2311 insetBlockStart: theme.spacing(-1.5),
2312 insetInlineEnd: theme.spacing(-1.5),
2313 paddingBlock: theme.spacing(.375),
2314 paddingInline: theme.spacing(1),
2315 borderRadius: theme.spacing(2.5),
2316 backgroundColor: HELLO_BADGE_BG_COLOR,
2317 color: theme.palette.common.white,
2318 zIndex: 2
2319 }));
2320 var PlusOverlay = (0, _elementor_ui.styled)(_elementor_ui.Box)({
2321 position: "absolute",
2322 insetBlockStart: "50%",
2323 insetInlineStart: `${LEFT_CARD_SIZE - CARDS_OVERLAP}px`,
2324 transform: "translate(-50%, -50%)",
2325 display: "flex",
2326 alignItems: "center",
2327 justifyContent: "center",
2328 zIndex: 3,
2329 pointerEvents: "none"
2330 });
2331 function HelloThemePreview({ isInstalled = false }) {
2332 const theme = (0, _elementor_ui.useTheme)();
2333 return /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2334 alignItems: "center",
2335 width: "100%",
2336 "data-testid": "hello-theme-preview"
2337 }, /* @__PURE__ */ react.createElement(PreviewRoot, null, /* @__PURE__ */ react.createElement(ElementorPlaceholderCard, null, /* @__PURE__ */ react.createElement(ElementorLogoIcon, { sx: { fontSize: theme.spacing(5.5) } })), /* @__PURE__ */ react.createElement(HelloCard, null, isInstalled ? /* @__PURE__ */ react.createElement(InstalledChip, {
2338 label: t("common.installed"),
2339 size: "small",
2340 color: "success",
2341 icon: /* @__PURE__ */ react.createElement(_elementor_icons.CheckedCircleIcon, null),
2342 sx: {
2343 position: "absolute",
2344 insetBlockStart: theme.spacing(1),
2345 insetInlineStart: theme.spacing(1),
2346 zIndex: 2
2347 }
2348 }) : /* @__PURE__ */ react.createElement(HelloBadge, null, /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2349 variant: "caption",
2350 color: "inherit",
2351 sx: {
2352 fontWeight: 400,
2353 lineHeight: 1.5
2354 }
2355 }, t("steps.theme_selection.theme_hello_label"))), /* @__PURE__ */ react.createElement(HelloLayoutIcon, { sx: {
2356 fontSize: theme.spacing(6),
2357 color: "text.primary"
2358 } }), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2359 variant: "caption",
2360 color: "text.secondary"
2361 }, t("steps.theme_selection.by_elementor"))), /* @__PURE__ */ react.createElement(PlusOverlay, null, /* @__PURE__ */ react.createElement(PlusIcon, {
2362 sx: {
2363 width: PLUS_SIZE,
2364 height: PLUS_SIZE,
2365 color: "text.primary"
2366 },
2367 strokeColor: theme.palette.mode === "dark" ? theme.palette.common.black : theme.palette.common.white
2368 }))));
2369 }
2370
2371 //#endregion
2372 //#region packages/apps/onboarding/src/components/ui/footer-highlights.tsx
2373 function FooterHighlights({ items, testId = "footer-highlights", sx }) {
2374 return /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2375 direction: "row",
2376 alignItems: "center",
2377 justifyContent: "center",
2378 gap: 3,
2379 "data-testid": testId,
2380 sx
2381 }, items.map((item) => /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2382 key: item.labelKey,
2383 direction: "row",
2384 alignItems: "center",
2385 gap: .75
2386 }, /* @__PURE__ */ react.createElement(_elementor_icons.CircleCheckFilledIcon, {
2387 fontSize: "tiny",
2388 sx: { color: "text.secondary" }
2389 }), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2390 variant: "body2",
2391 sx: { color: "text.secondary" }
2392 }, t(item.labelKey)))));
2393 }
2394
2395 //#endregion
2396 //#region packages/apps/onboarding/src/components/ui/greeting-banner.tsx
2397 function GreetingBanner({ children }) {
2398 return /* @__PURE__ */ react.createElement(GreetingBannerRoot, null, /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2399 variant: "body1",
2400 color: "text.primary",
2401 align: "center"
2402 }, children));
2403 }
2404
2405 //#endregion
2406 //#region packages/apps/onboarding/src/steps/theme-selection-footer.ts
2407 var THEME_SELECTION_FOOTER_HIGHLIGHTS = [
2408 { labelKey: "steps.theme_selection.highlight_fast" },
2409 { labelKey: "steps.theme_selection.highlight_responsive" },
2410 { labelKey: "steps.theme_selection.highlight_built_for_elementor" }
2411 ];
2412
2413 //#endregion
2414 //#region packages/apps/onboarding/src/steps/screens/theme-selection.tsx
2415 function ThemeSelection() {
2416 const { choices, completedSteps } = useOnboarding();
2417 const isStepCompleted = completedSteps.includes(StepId.THEME_SELECTION);
2418 const isInstalled = (getConfig()?.isHelloThemeActive ?? false) || isStepCompleted && choices.theme_selection === HELLO_THEME.slug;
2419 const greetingText = (0, react.useMemo)(() => getGreetingText(null), []);
2420 return /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2421 spacing: 7.5,
2422 width: "100%",
2423 sx: { flex: 1 },
2424 "data-testid": "theme-selection-step"
2425 }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2426 width: "100%",
2427 maxWidth: 386,
2428 alignSelf: "center"
2429 }, /* @__PURE__ */ react.createElement(GreetingBanner, null, greetingText)), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2430 useFlexGap: true,
2431 spacing: 4,
2432 alignItems: "center",
2433 width: "100%"
2434 }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2435 spacing: 1,
2436 textAlign: "center",
2437 alignItems: "center"
2438 }, /* @__PURE__ */ react.createElement(StepTitle, {
2439 color: "text.primary",
2440 variant: "h5",
2441 align: "center"
2442 }, t("steps.theme_selection.v2.title")), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2443 variant: "body1",
2444 color: "text.secondary"
2445 }, t("steps.theme_selection.v2.subtitle"))), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2446 useFlexGap: true,
2447 alignItems: "center",
2448 width: "100%",
2449 sx: { gap: "60px" }
2450 }, /* @__PURE__ */ react.createElement(HelloThemePreview, { isInstalled }), /* @__PURE__ */ react.createElement(FooterHighlights, {
2451 items: THEME_SELECTION_FOOTER_HIGHLIGHTS,
2452 testId: "theme-selection-highlights"
2453 }))));
2454 }
2455
2456 //#endregion
2457 //#region packages/apps/onboarding/src/components/ui/base-layout.tsx
2458 var TOPBAR_HEIGHT = 48;
2459 var FOOTER_HEIGHT = 68;
2460 var LayoutRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2461 position: "fixed",
2462 inset: 0,
2463 display: "flex",
2464 flexDirection: "column",
2465 background: theme.palette.background.default,
2466 zIndex: theme.zIndex?.modal || 1300
2467 }));
2468 var ContentArea = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => !["topBarHeight", "footerHeight"].includes(prop) })(({ topBarHeight, footerHeight }) => ({
2469 flex: 1,
2470 display: "flex",
2471 flexDirection: "column",
2472 overflow: "auto",
2473 paddingTop: topBarHeight,
2474 paddingBottom: footerHeight
2475 }));
2476 function BaseLayout({ children, topBar, footer, testId }) {
2477 const topBarHeight = topBar ? 48 : 0;
2478 const footerHeight = footer ? 68 : 0;
2479 return /* @__PURE__ */ react.createElement(LayoutRoot, {
2480 "data-module": "onboarding",
2481 "data-testid": testId
2482 }, topBar, /* @__PURE__ */ react.createElement(ContentArea, {
2483 topBarHeight,
2484 footerHeight
2485 }, children), footer);
2486 }
2487
2488 //#endregion
2489 //#region packages/apps/onboarding/src/components/ui/completion-screen.tsx
2490 var PROGRESS_BAR_WIDTH = 192;
2491 var ProgressTrack = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2492 width: PROGRESS_BAR_WIDTH,
2493 height: 4,
2494 borderRadius: 22,
2495 backgroundColor: theme.palette.action.hover,
2496 position: "relative",
2497 overflow: "hidden"
2498 }));
2499 var FAKE_PROGRESS_KEYFRAMES = {
2500 "0%": { width: "0%" },
2501 "30%": { width: "35%" },
2502 "60%": { width: "55%" },
2503 "80%": { width: "68%" },
2504 "100%": { width: "75%" }
2505 };
2506 var ProgressFill = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2507 position: "absolute",
2508 left: 0,
2509 top: 0,
2510 height: "100%",
2511 borderRadius: 22,
2512 backgroundColor: theme.palette.text.primary,
2513 animation: "onboarding-fake-progress 3s ease-out forwards",
2514 "@keyframes onboarding-fake-progress": FAKE_PROGRESS_KEYFRAMES
2515 }));
2516 function CompletionScreen() {
2517 return /* @__PURE__ */ react.createElement(_elementor_ui.Box, { sx: {
2518 width: "100%",
2519 height: "100vh",
2520 display: "flex",
2521 alignItems: "center",
2522 justifyContent: "center",
2523 bgcolor: "background.paper"
2524 } }, /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2525 spacing: 4,
2526 alignItems: "center",
2527 sx: {
2528 maxWidth: 463,
2529 width: "100%",
2530 px: 3
2531 }
2532 }, /* @__PURE__ */ react.createElement(ProgressTrack, null, /* @__PURE__ */ react.createElement(ProgressFill, null)), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2533 spacing: 1,
2534 textAlign: "center"
2535 }, /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2536 variant: "h5",
2537 fontWeight: 500,
2538 color: "text.primary"
2539 }, t("completion.title")), /* @__PURE__ */ react.createElement(_elementor_ui.Typography, {
2540 variant: "body1",
2541 color: "text.secondary"
2542 }, t("completion.subtitle")))));
2543 }
2544
2545 //#endregion
2546 //#region packages/apps/onboarding/src/components/ui/footer.tsx
2547 var FooterRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2548 position: "fixed",
2549 bottom: 0,
2550 left: 0,
2551 right: 0,
2552 height: 68,
2553 display: "flex",
2554 alignItems: "center",
2555 justifyContent: "space-between",
2556 padding: theme.spacing(2, 3),
2557 background: theme.palette.background.paper,
2558 boxShadow: theme.shadows[4],
2559 zIndex: theme.zIndex?.appBar || 1100
2560 }));
2561 function Footer({ children }) {
2562 return /* @__PURE__ */ react.createElement(FooterRoot, { component: "footer" }, children);
2563 }
2564
2565 //#endregion
2566 //#region packages/apps/onboarding/src/components/ui/footer-actions.tsx
2567 var LeftActions = (0, _elementor_ui.styled)(_elementor_ui.Box)({
2568 display: "flex",
2569 alignItems: "center",
2570 gap: 8
2571 });
2572 var RightActions = (0, _elementor_ui.styled)(_elementor_ui.Box)({
2573 display: "flex",
2574 alignItems: "center",
2575 gap: 8
2576 });
2577 var DirectionalArrowLeftIcon = (0, _elementor_ui.withDirection)(_elementor_icons.ArrowLeftIcon);
2578 var BackButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => ({
2579 color: theme.palette.text.primary,
2580 padding: theme.spacing(.75, 1),
2581 minHeight: 0,
2582 borderRadius: theme.shape.borderRadius,
2583 textTransform: "none",
2584 fontSize: theme.typography.pxToRem(14),
2585 fontWeight: 500,
2586 lineHeight: theme.typography.pxToRem(24),
2587 letterSpacing: "0.4px"
2588 }));
2589 var SkipButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => {
2590 const outlinedBorderColor = theme.palette.primary?.states?.outlinedBorder ?? theme.palette.divider;
2591 return {
2592 color: theme.palette.text.primary,
2593 borderColor: outlinedBorderColor,
2594 padding: theme.spacing(.75, 2),
2595 minHeight: 0,
2596 borderRadius: theme.shape.borderRadius,
2597 textTransform: "none",
2598 fontSize: theme.typography.pxToRem(14),
2599 fontWeight: 500,
2600 lineHeight: theme.typography.pxToRem(24),
2601 letterSpacing: "0.4px",
2602 "&:hover": { borderColor: outlinedBorderColor }
2603 };
2604 });
2605 var ContinueButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => ({
2606 padding: theme.spacing(.75, 2),
2607 minHeight: 0,
2608 borderRadius: theme.shape.borderRadius,
2609 textTransform: "none",
2610 fontSize: theme.typography.pxToRem(14),
2611 fontWeight: 500,
2612 lineHeight: theme.typography.pxToRem(24),
2613 letterSpacing: "0.4px",
2614 "&:focus-visible": { backgroundColor: theme.palette.promotion.main }
2615 }));
2616 function FooterActions({ showBack = true, showSkip = true, showContinue = true, backLabel = t("common.back"), skipLabel = t("common.skip"), continueLabel = t("common.continue"), isBackDisabled = false, continueDisabled = false, continueLoading = false, onBack, onSkip, onContinue }) {
2617 const { direction } = (0, _elementor_ui.useTheme)();
2618 const isRtl = direction === "rtl";
2619 const backIcon = /* @__PURE__ */ react.createElement(DirectionalArrowLeftIcon, { fontSize: "tiny" });
2620 return /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__PURE__ */ react.createElement(LeftActions, null, showBack && /* @__PURE__ */ react.createElement(BackButton, {
2621 variant: "text",
2622 onClick: onBack,
2623 disabled: isBackDisabled,
2624 startIcon: isRtl ? void 0 : backIcon,
2625 endIcon: isRtl ? backIcon : void 0
2626 }, backLabel)), /* @__PURE__ */ react.createElement(RightActions, null, showSkip && /* @__PURE__ */ react.createElement(SkipButton, {
2627 variant: "outlined",
2628 onClick: onSkip
2629 }, skipLabel), showContinue && /* @__PURE__ */ react.createElement(ContinueButton, {
2630 color: "primary",
2631 variant: "contained",
2632 onClick: onContinue,
2633 disabled: continueDisabled || continueLoading
2634 }, continueLoading ? t("common.loading") : continueLabel)));
2635 }
2636
2637 //#endregion
2638 //#region packages/apps/onboarding/src/components/ui/right-panel.tsx
2639 var PANEL_RADIUS_MULTIPLIER = 2;
2640 var PANEL_MIN_HEIGHT = 36;
2641 var VIDEO_TRANSITION_MS = 400;
2642 var ALL_VIDEO_URLS = getVideoUrls();
2643 var RightPanelRoot = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => prop !== "background" })(({ theme, background }) => {
2644 return {
2645 position: "relative",
2646 width: "100%",
2647 height: `calc(100vh - ${48}px - ${68}px - ${theme.spacing(4 * 2)})`,
2648 minHeight: theme.spacing(PANEL_MIN_HEIGHT),
2649 borderRadius: theme.shape.borderRadius * PANEL_RADIUS_MULTIPLIER,
2650 overflow: "hidden",
2651 background
2652 };
2653 });
2654 var VideoStack = react.memo(function({ activeUrl }) {
2655 const videoRefs = (0, react.useRef)(/* @__PURE__ */ new Map());
2656 const [readyUrls, setReadyUrls] = (0, react.useState)(() => /* @__PURE__ */ new Set());
2657 (0, react.useLayoutEffect)(() => {
2658 videoRefs.current.forEach((element, videoUrl) => {
2659 if (videoUrl === activeUrl) {
2660 element.currentTime = 0;
2661 element.play()?.catch(() => {});
2662 } else element.pause();
2663 });
2664 }, [activeUrl]);
2665 const markReady = (0, react.useCallback)((videoUrl) => {
2666 setReadyUrls((prev) => {
2667 if (prev.has(videoUrl)) return prev;
2668 const next = new Set(prev);
2669 next.add(videoUrl);
2670 return next;
2671 });
2672 }, []);
2673 const visibleUrl = activeUrl && readyUrls.has(activeUrl) ? activeUrl : void 0;
2674 return /* @__PURE__ */ react.createElement(react.Fragment, null, ALL_VIDEO_URLS.map((videoUrl) => /* @__PURE__ */ react.createElement(_elementor_ui.Box, {
2675 key: videoUrl,
2676 component: "video",
2677 src: videoUrl,
2678 preload: "auto",
2679 muted: true,
2680 playsInline: true,
2681 onLoadedData: () => markReady(videoUrl),
2682 ref: (element) => {
2683 if (element) videoRefs.current.set(videoUrl, element);
2684 },
2685 sx: {
2686 position: "absolute",
2687 inset: 0,
2688 width: "100%",
2689 height: "100%",
2690 objectFit: "cover",
2691 opacity: videoUrl === visibleUrl ? 1 : 0,
2692 transition: `opacity ${VIDEO_TRANSITION_MS}ms ease`
2693 }
2694 })));
2695 });
2696 var RightPanel = react.memo(function({ config }) {
2697 return /* @__PURE__ */ react.createElement(RightPanelRoot, { background: config.background }, /* @__PURE__ */ react.createElement(VideoStack, { activeUrl: config.video }));
2698 });
2699
2700 //#endregion
2701 //#region packages/apps/onboarding/src/components/ui/split-layout.tsx
2702 var LAYOUT_GAP = 4;
2703 var LAYOUT_TRANSITION_MS = 300;
2704 var LEFT_PANEL_CONTENT_WIDTH = 386;
2705 var LEFT_PANEL_PADDING_X = 80;
2706 var LEFT_PANEL_PADDING_TOP = 40;
2707 var LEFT_PANEL_GAP = 32;
2708 var SplitLayoutRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => {
2709 const hideImageBreakpoint = 1122;
2710 return {
2711 flex: 1,
2712 display: "grid",
2713 gridTemplateColumns: `2fr 1fr`,
2714 gap: theme.spacing(LAYOUT_GAP),
2715 padding: theme.spacing(4),
2716 transition: `grid-template-columns ${300}ms ease`,
2717 [theme.breakpoints.up("md")]: { minHeight: 0 },
2718 [`@media (max-width: ${hideImageBreakpoint}px)`]: {
2719 gridTemplateColumns: "1fr",
2720 "& > *:last-child": { display: "none" }
2721 }
2722 };
2723 });
2724 var LeftPanel = (0, _elementor_ui.styled)(_elementor_ui.Box, { shouldForwardProp: (prop) => "contentMaxWidth" !== prop })(({ theme, contentMaxWidth }) => ({
2725 display: "flex",
2726 flexDirection: "column",
2727 alignItems: "center",
2728 gap: LEFT_PANEL_GAP,
2729 minHeight: 0,
2730 paddingBlockStart: LEFT_PANEL_PADDING_TOP,
2731 paddingInline: LEFT_PANEL_PADDING_X,
2732 "& > *": { width: "100%" },
2733 "& > *:last-of-type": {
2734 maxWidth: contentMaxWidth,
2735 flex: 1,
2736 display: "flex",
2737 flexDirection: "column",
2738 minHeight: 0
2739 },
2740 [theme.breakpoints.down("sm")]: {
2741 padding: 0,
2742 gap: LEFT_PANEL_GAP / 2,
2743 "& > *": { maxWidth: "none" }
2744 }
2745 }));
2746 function SplitLayout({ left, rightConfig }) {
2747 const contentMaxWidth = rightConfig.contentMaxWidth ?? LEFT_PANEL_CONTENT_WIDTH;
2748 return /* @__PURE__ */ react.createElement(SplitLayoutRoot, null, /* @__PURE__ */ react.createElement(LeftPanel, { contentMaxWidth }, left), /* @__PURE__ */ react.createElement(RightPanel, { config: rightConfig }));
2749 }
2750
2751 //#endregion
2752 //#region packages/apps/onboarding/src/components/ui/top-bar.tsx
2753 var TopBarRoot = (0, _elementor_ui.styled)(_elementor_ui.Box)(({ theme }) => ({
2754 position: "fixed",
2755 top: 0,
2756 left: 0,
2757 right: 0,
2758 height: 48,
2759 display: "flex",
2760 alignItems: "center",
2761 justifyContent: "space-between",
2762 paddingInlineStart: 41,
2763 paddingInlineEnd: 16,
2764 background: theme.palette.background.paper,
2765 zIndex: theme.zIndex?.appBar || 1100
2766 }));
2767 function TopBar({ children }) {
2768 return /* @__PURE__ */ react.createElement(TopBarRoot, { component: "header" }, children, /* @__PURE__ */ react.createElement(_elementor_ui.Divider, { absolute: true }));
2769 }
2770
2771 //#endregion
2772 //#region packages/apps/onboarding/src/components/ui/elementor-wordmark.tsx
2773 function ElementorWordmark(props) {
2774 return /* @__PURE__ */ react.createElement(_elementor_ui.SvgIcon, {
2775 viewBox: "0 0 90 15",
2776 ...props
2777 }, /* @__PURE__ */ react.createElement("path", {
2778 d: "M2.96457 11.7721C3.50632 12.322 4.19354 12.5969 5.01619 12.5969C5.70843 12.5969 6.27526 12.4519 6.71668 12.162C7.16313 11.8721 7.44905 11.4622 7.58449 10.9323H9.69631C9.51071 11.977 8.99404 12.8119 8.14129 13.4417C7.29355 14.0716 6.25018 14.3815 5.01619 14.3815C4.02299 14.3815 3.15017 14.1666 2.39774 13.7367C1.65033 13.3068 1.06343 12.7269 0.64709 12.002C0.230745 11.2772 0.0150486 10.4874 0 9.64254H2.05162C2.11683 10.5174 2.42282 11.2272 2.96959 11.7771L2.96457 11.7721ZM2.01149 8.98768C2.01149 8.76273 2.03657 8.46779 2.09175 8.09287H7.48416C7.42898 7.37802 7.16814 6.80314 6.69662 6.36823C6.2251 5.93333 5.59807 5.71337 4.81555 5.71337C4.08318 5.71337 3.48625 5.92333 3.01473 6.34824C2.54321 6.77315 2.23722 7.35303 2.08674 8.09287H0.0351132C0.155502 7.33803 0.42136 6.65317 0.832688 6.0383C1.24402 5.42343 1.79078 4.93854 2.47298 4.58861C3.15519 4.23868 3.93771 4.06372 4.81053 4.06372C5.83383 4.06372 6.70665 4.28367 7.42898 4.72858C8.15131 5.17349 8.69808 5.75336 9.05925 6.47321C9.42543 7.19306 9.60601 7.98289 9.60601 8.84271C9.60601 9.08266 9.59096 9.3476 9.56588 9.63754H2.04159C2.01651 9.32261 2.00146 9.10266 2.00146 8.98268L2.01149 8.98768Z",
2779 fill: "currentColor"
2780 }), /* @__PURE__ */ react.createElement("path", {
2781 d: "M11.0857 1.82461H9.49561V0H13.2176V14.222H11.0857V1.82461Z",
2782 fill: "currentColor"
2783 }), /* @__PURE__ */ react.createElement("path", {
2784 d: "M17.3762 11.7721C17.9179 12.322 18.6052 12.5969 19.4278 12.5969C20.12 12.5969 20.6869 12.4519 21.1283 12.162C21.5747 11.8721 21.8607 11.4622 21.9961 10.9323H24.1079C23.9223 11.977 23.4057 12.8119 22.5529 13.4417C21.7052 14.0716 20.6618 14.3815 19.4278 14.3815C18.4346 14.3815 17.5618 14.1666 16.8094 13.7367C16.0619 13.3068 15.4751 12.7269 15.0587 12.002C14.6424 11.2772 14.4267 10.4874 14.4116 9.64254H16.4632C16.5285 10.5174 16.8344 11.2272 17.3812 11.7771L17.3762 11.7721ZM16.4231 8.98768C16.4231 8.76273 16.4482 8.46779 16.5034 8.09287H21.8958C21.8406 7.37802 21.5798 6.80314 21.1082 6.36823C20.6367 5.93333 20.0097 5.71337 19.2272 5.71337C18.4948 5.71337 17.8979 5.92333 17.4264 6.34824C16.9548 6.77315 16.6488 7.35303 16.4984 8.09287H14.4467C14.5671 7.33803 14.833 6.65317 15.2443 6.0383C15.6556 5.42343 16.2024 4.93854 16.8846 4.58861C17.5668 4.23868 18.3493 4.06372 19.2221 4.06372C20.2455 4.06372 21.1183 4.28367 21.8406 4.72858C22.5629 5.17349 23.1097 5.75336 23.4709 6.47321C23.837 7.19306 24.0176 7.98289 24.0176 8.84271C24.0176 9.08266 24.0026 9.3476 23.9775 9.63754H16.4532C16.4281 9.32261 16.4131 9.10266 16.4131 8.98268L16.4231 8.98768Z",
2785 fill: "currentColor"
2786 }), /* @__PURE__ */ react.createElement("path", {
2787 d: "M26.1243 6.03319H24.5342V4.22857H28.2361V5.91321C28.4769 5.34333 28.8531 4.89343 29.3698 4.5635C29.8865 4.23357 30.5034 4.0686 31.2208 4.0686C31.9782 4.0686 32.6454 4.24857 33.2222 4.60349C33.7991 4.95842 34.1853 5.44831 34.386 6.07318C34.6117 5.4933 35.0331 5.0134 35.6501 4.63348C36.2671 4.25856 36.9392 4.0686 37.6716 4.0686C38.7601 4.0686 39.6229 4.41353 40.2599 5.09839C40.897 5.78824 41.213 6.69805 41.213 7.83781V14.2265H39.1012V8.43268C39.1012 7.66784 38.9156 7.05297 38.5444 6.58807C38.1732 6.12317 37.6766 5.89322 37.0496 5.89322C36.3473 5.89322 35.7805 6.17316 35.3591 6.72804C34.9327 7.28292 34.7221 7.95778 34.7221 8.75261V14.2265H32.5902V8.43268C32.5902 7.66784 32.4096 7.05297 32.0434 6.58807C31.6772 6.12317 31.1857 5.89322 30.5586 5.89322C29.8664 5.89322 29.3096 6.17316 28.8782 6.73804C28.4468 7.29792 28.2311 7.97278 28.2311 8.75261V14.2265H26.1193V6.03319H26.1243Z",
2788 fill: "currentColor"
2789 }), /* @__PURE__ */ react.createElement("path", {
2790 d: "M45.3518 11.7721C45.8935 12.322 46.5807 12.5969 47.4034 12.5969C48.0956 12.5969 48.6625 12.4519 49.1039 12.162C49.5503 11.8721 49.8363 11.4622 49.9717 10.9323H52.0835C51.8979 11.977 51.3812 12.8119 50.5285 13.4417C49.6808 14.0716 48.6374 14.3815 47.4034 14.3815C46.4102 14.3815 45.5374 14.1666 44.7849 13.7367C44.0375 13.3068 43.4506 12.7269 43.0343 12.002C42.6179 11.2772 42.4023 10.4874 42.3872 9.64254H44.4388C44.504 10.5174 44.81 11.2272 45.3568 11.7771L45.3518 11.7721ZM44.3987 8.98768C44.3987 8.76273 44.4238 8.46779 44.479 8.09287H49.8714C49.8162 7.37802 49.5554 6.80314 49.0838 6.36823C48.6123 5.93333 47.9853 5.71337 47.2028 5.71337C46.4704 5.71337 45.8735 5.92333 45.4019 6.34824C44.9304 6.77315 44.6244 7.35303 44.4739 8.09287H42.4223C42.5427 7.33803 42.8086 6.65317 43.2199 6.0383C43.6312 5.42343 44.178 4.93854 44.8602 4.58861C45.5424 4.23868 46.3249 4.06372 47.1977 4.06372C48.221 4.06372 49.0939 4.28367 49.8162 4.72858C50.5385 5.17349 51.0853 5.75336 51.4465 6.47321C51.8126 7.19306 51.9932 7.98289 51.9932 8.84271C51.9932 9.08266 51.9782 9.3476 51.9531 9.63754H44.4288C44.4037 9.32261 44.3887 9.10266 44.3887 8.98268L44.3987 8.98768Z",
2791 fill: "currentColor"
2792 }), /* @__PURE__ */ react.createElement("path", {
2793 d: "M54.0144 6.03319H52.4243V4.22857H56.1263V5.91321C56.3921 5.31834 56.8085 4.86344 57.3703 4.5435C57.9321 4.22857 58.5892 4.0686 59.3316 4.0686C60.4603 4.0686 61.3632 4.43353 62.0504 5.16837C62.7326 5.90322 63.0737 6.86301 63.0737 8.05276V14.2215H60.9418V8.48767C60.9418 7.73283 60.7362 7.12796 60.3248 6.66305C59.9135 6.19815 59.3717 5.9682 58.6946 5.9682C57.9522 5.9682 57.3352 6.23315 56.8536 6.76303C56.367 7.29292 56.1263 7.96778 56.1263 8.78761V14.2215H54.0144V6.03319Z",
2794 fill: "currentColor"
2795 }), /* @__PURE__ */ react.createElement("path", {
2796 d: "M66.8009 13.3318C66.1839 12.7369 65.8729 11.9171 65.8729 10.8723V6.03336H63.8413V4.22875H65.8729V1.1344H67.9847V4.22875H70.8891V6.03336H67.9847V10.7924C67.9847 11.3072 68.1201 11.7072 68.391 11.9921C68.6619 12.277 69.0381 12.417 69.5146 12.417H70.8891V14.2216H69.2989C68.2505 14.2216 67.4179 13.9217 66.8009 13.3268V13.3318Z",
2797 fill: "currentColor"
2798 }), /* @__PURE__ */ react.createElement("path", {
2799 d: "M74.024 13.7167C73.2364 13.2718 72.6195 12.6619 72.173 11.8821C71.7266 11.1022 71.5059 10.2174 71.5059 9.22263C71.5059 8.22784 71.7266 7.34303 72.173 6.56319C72.6195 5.78336 73.2364 5.17349 74.024 4.72858C74.8115 4.28367 75.7044 4.06372 76.7026 4.06372C77.7009 4.06372 78.5887 4.28367 79.3813 4.72858C80.1688 5.17349 80.7858 5.78336 81.2323 6.56319C81.6787 7.34303 81.8994 8.22784 81.8994 9.22263C81.8994 10.2174 81.6787 11.1022 81.2323 11.8821C80.7858 12.6619 80.1688 13.2718 79.3813 13.7167C78.5937 14.1616 77.7009 14.3815 76.7026 14.3815C75.7044 14.3815 74.8165 14.1616 74.024 13.7167ZM78.8997 11.6171C79.4615 11.0023 79.7475 10.2074 79.7475 9.22763C79.7475 8.24784 79.4666 7.453 78.8997 6.83813C78.3379 6.22326 77.6005 5.91333 76.7026 5.91333C75.8047 5.91333 75.0724 6.21827 74.5106 6.83813C73.9538 7.453 73.6729 8.24784 73.6729 9.22763C73.6729 10.2074 73.9538 11.0023 74.5106 11.6171C75.0674 12.232 75.7997 12.5419 76.7026 12.5419C77.6056 12.5419 78.3379 12.237 78.8997 11.6171Z",
2800 fill: "currentColor"
2801 }), /* @__PURE__ */ react.createElement("path", {
2802 d: "M83.8411 6.03362H82.251V4.229H85.9529V6.09361C86.1937 5.44375 86.5198 4.97385 86.9361 4.67391C87.3524 4.37397 87.9092 4.229 88.5965 4.229H89.7903V6.03362H88.2955C87.4728 6.03362 86.8759 6.35355 86.5047 6.99342C86.1335 7.63328 85.9479 8.5131 85.9479 9.62286V14.2269H83.8361V6.03362H83.8411Z",
2803 fill: "currentColor"
2804 }));
2805 }
2806
2807 //#endregion
2808 //#region packages/apps/onboarding/src/components/ui/elementor-logo.tsx
2809 function ElementorLogo({ height = 20, sx, ...props }) {
2810 const theme = (0, _elementor_ui.useTheme)();
2811 const iconSize = height;
2812 const wordmarkHeight = height * .8;
2813 const wordmarkWidth = wordmarkHeight * 6;
2814 return /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2815 direction: "row",
2816 alignItems: "center",
2817 spacing: .5,
2818 sx: {
2819 color: theme.palette.text.primary,
2820 ...sx
2821 },
2822 ...props
2823 }, /* @__PURE__ */ react.createElement(ElementorIcon, { sx: {
2824 width: iconSize,
2825 height: iconSize
2826 } }), /* @__PURE__ */ react.createElement(ElementorWordmark, { sx: {
2827 width: wordmarkWidth,
2828 height: wordmarkHeight
2829 } }));
2830 }
2831
2832 //#endregion
2833 //#region packages/apps/onboarding/src/components/ui/top-bar-content.tsx
2834 var UpgradeButton = (0, _elementor_ui.styled)(_elementor_ui.Button)(({ theme }) => ({
2835 backgroundColor: theme.palette.promotion.main,
2836 color: theme.palette.promotion.contrastText,
2837 padding: theme.spacing(.5, 1.25),
2838 minHeight: 0,
2839 borderRadius: 8,
2840 textTransform: "none",
2841 fontSize: theme.typography.pxToRem(13),
2842 fontWeight: 500,
2843 lineHeight: theme.typography.pxToRem(22),
2844 letterSpacing: "0.46px"
2845 }));
2846 var Divider = (0, _elementor_ui.styled)("div")(({ theme }) => ({
2847 width: 2,
2848 height: 20,
2849 backgroundColor: theme.palette.divider
2850 }));
2851 function TopBarContent({ showUpgrade = true, showClose = true, onUpgrade, onClose }) {
2852 const theme = (0, _elementor_ui.useTheme)();
2853 return /* @__PURE__ */ react.createElement(react.Fragment, null, /* @__PURE__ */ react.createElement(ElementorLogo, { height: 20 }), /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2854 direction: "row",
2855 alignItems: "center",
2856 spacing: 2
2857 }, showUpgrade && /* @__PURE__ */ react.createElement(UpgradeButton, {
2858 color: "promotion",
2859 variant: "contained",
2860 onClick: onUpgrade
2861 }, t("common.upgrade")), showClose && /* @__PURE__ */ react.createElement(_elementor_ui.Stack, {
2862 direction: "row",
2863 alignItems: "center",
2864 spacing: 1.5
2865 }, /* @__PURE__ */ react.createElement(Divider, null), /* @__PURE__ */ react.createElement(_elementor_ui.IconButton, {
2866 "aria-label": t("common.close_onboarding"),
2867 onClick: onClose,
2868 size: "small",
2869 sx: {
2870 color: theme.palette.text.secondary,
2871 padding: 0
2872 }
2873 }, /* @__PURE__ */ react.createElement(_elementor_icons.XIcon, { fontSize: "tiny" })))));
2874 }
2875
2876 //#endregion
2877 //#region packages/apps/onboarding/src/components/app-content.tsx
2878 var isChoiceEmpty = (choice) => {
2879 return choice === null || choice === void 0 || Array.isArray(choice) && choice.length === 0;
2880 };
2881 var isContinueDisabled = (stepId, isLast, choiceForStep) => {
2882 if (stepId === StepId.THEME_SELECTION) return false;
2883 if (isLast) return false;
2884 return isChoiceEmpty(choiceForStep);
2885 };
2886 function AppContent({ onClose }) {
2887 const { stepId, stepIndex, isFirst, isLast, totalSteps, resumeStepIdForTracking, isLoading, isConnected, hasPassedLogin, shouldShowProInstall, choices, completedSteps, urls, actions, isGuest } = useOnboarding();
2888 const [isCompleting, setIsCompleting] = (0, react.useState)(false);
2889 const isCompletingRef = (0, react.useRef)(false);
2890 const { showToast } = useToast();
2891 useVideoPreload();
2892 const updateProgress = useUpdateProgress();
2893 const updateChoices = useUpdateChoices();
2894 const installTheme = useInstallTheme();
2895 const { trackOnboardingInitialized, trackLoginType, trackConnect, trackStepViewed, trackProFeaturesSelected, trackBackClicked, trackSkipClicked, trackUpgradeClicked, trackResumeOnboarding, trackSummary, trackThemeSelected, trackErrorReported, activateTracking, flushQueue } = useOnboardingEvent();
2896 const hasTrackedInit = (0, react.useRef)(false);
2897 (0, react.useEffect)(() => {
2898 if (!hasTrackedInit.current) {
2899 hasTrackedInit.current = true;
2900 trackOnboardingInitialized();
2901 if (resumeStepIdForTracking) {
2902 trackResumeOnboarding(resumeStepIdForTracking);
2903 actions.clearResumeStepIdForTracking();
2904 } else trackStepViewed("login");
2905 return;
2906 }
2907 if (hasPassedLogin && stepId && !isCompletingRef.current) trackStepViewed(stepId);
2908 }, [
2909 stepId,
2910 resumeStepIdForTracking,
2911 hasPassedLogin,
2912 actions,
2913 trackOnboardingInitialized,
2914 trackResumeOnboarding,
2915 trackStepViewed
2916 ]);
2917 const checkProInstallScreen = useCheckProInstallScreen();
2918 const handleConnectSuccess = (0, react.useCallback)(async (data, loginType) => {
2919 trackConnect(true);
2920 trackLoginType(loginType);
2921 const shouldEnableTracking = data.tracking_opted_in || (0, _elementor_events.canSendEvents)();
2922 if (data.tracking_opted_in) (0, _elementor_events.setCanSendEvents)(true);
2923 updateLibraryConnectConfig(data);
2924 if (shouldEnableTracking) (0, _elementor_events.initializeAndEnableTracking)((mp) => {
2925 mp?.set_config?.({ api_transport: "sendbeacon" });
2926 activateTracking();
2927 flushQueue();
2928 });
2929 const result = await checkProInstallScreen();
2930 actions.setShouldShowProInstallScreen(result.shouldShowProInstallScreen);
2931 actions.setConnected(true);
2932 }, [
2933 actions,
2934 checkProInstallScreen,
2935 trackConnect,
2936 trackLoginType,
2937 activateTracking,
2938 flushQueue
2939 ]);
2940 const handleConnect = useElementorConnect({
2941 connectUrl: urls.connect,
2942 onSuccess: (data) => handleConnectSuccess(data, "elementor_login")
2943 });
2944 const handleSignUp = useElementorConnect({
2945 connectUrl: urls.signUp,
2946 onSuccess: (data) => handleConnectSuccess(data, "social_login")
2947 });
2948 function handleContinueAsGuest(event) {
2949 event.preventDefault();
2950 trackLoginType("guest");
2951 actions.setGuest(true);
2952 }
2953 const handleClose = (0, react.useCallback)(() => {
2954 trackSummary({
2955 choices,
2956 completedSteps: [...completedSteps],
2957 isConnected,
2958 isGuest
2959 });
2960 window.dispatchEvent(new CustomEvent("onboarding-user-exit"));
2961 updateProgress.mutate({ user_exit: true }, {
2962 onSuccess: () => {
2963 actions.setExitType("user_exit");
2964 onClose?.();
2965 },
2966 onError: () => {
2967 actions.setExitType("user_exit");
2968 onClose?.();
2969 }
2970 });
2971 }, [
2972 actions,
2973 choices,
2974 completedSteps,
2975 isConnected,
2976 isGuest,
2977 onClose,
2978 trackSummary,
2979 updateProgress
2980 ]);
2981 function handleBack() {
2982 trackBackClicked(stepId);
2983 if (isFirst) actions.setGuest(false);
2984 else actions.prevStep();
2985 }
2986 const redirectToNewPage = (0, react.useCallback)(() => {
2987 const redirectUrl = urls.createNewPage || urls.editor || urls.dashboard;
2988 ((0, _elementor_events.getMixpanel)().getMixpanelInstance?.())?.request_batchers?.events?.flush?.();
2989 window.location.href = redirectUrl;
2990 }, [urls]);
2991 const completeAndRedirect = (0, react.useCallback)(() => {
2992 updateProgress.mutate({
2993 complete_step: stepId,
2994 complete: true,
2995 step_index: stepIndex,
2996 total_steps: totalSteps
2997 }, {
2998 onSuccess: redirectToNewPage,
2999 onError: () => {
3000 redirectToNewPage();
3001 }
3002 });
3003 }, [
3004 updateProgress,
3005 stepId,
3006 stepIndex,
3007 totalSteps,
3008 redirectToNewPage
3009 ]);
3010 const handleSkip = (0, react.useCallback)(() => {
3011 trackSkipClicked(stepId);
3012 if (isLast) {
3013 trackSummary({
3014 choices,
3015 completedSteps: [...completedSteps, stepId],
3016 isConnected,
3017 isGuest
3018 });
3019 isCompletingRef.current = true;
3020 setIsCompleting(true);
3021 updateProgress.mutate({
3022 skip_step: true,
3023 complete: true,
3024 step_index: stepIndex,
3025 total_steps: totalSteps
3026 }, {
3027 onSuccess: redirectToNewPage,
3028 onError: () => {
3029 redirectToNewPage();
3030 }
3031 });
3032 return;
3033 }
3034 updateProgress.mutate({
3035 skip_step: true,
3036 step_index: stepIndex,
3037 total_steps: totalSteps
3038 }, {
3039 onSuccess: () => {
3040 actions.nextStep();
3041 },
3042 onError: () => {
3043 actions.nextStep();
3044 }
3045 });
3046 }, [
3047 actions,
3048 choices,
3049 completedSteps,
3050 isConnected,
3051 isGuest,
3052 isLast,
3053 stepId,
3054 stepIndex,
3055 totalSteps,
3056 trackSkipClicked,
3057 trackSummary,
3058 updateProgress,
3059 redirectToNewPage
3060 ]);
3061 const saveChoicesFireAndForget = (0, react.useCallback)((choiceData) => {
3062 updateChoices.mutate(choiceData);
3063 }, [updateChoices]);
3064 const handleContinue = (0, react.useCallback)((directChoice) => {
3065 if (stepId === StepId.SITE_FEATURES) trackProFeaturesSelected({
3066 targetName: "continue_with_free",
3067 features: choices.site_features || []
3068 });
3069 let effectiveDirectChoice = directChoice;
3070 if (stepId === StepId.THEME_SELECTION && !effectiveDirectChoice) effectiveDirectChoice = { theme_selection: "hello-elementor" };
3071 const storedChoice = choices[stepId];
3072 const choiceData = effectiveDirectChoice ?? (isChoiceEmpty(storedChoice) ? null : { [stepId]: storedChoice });
3073 if (choiceData) saveChoicesFireAndForget(choiceData);
3074 if (stepId === StepId.THEME_SELECTION) {
3075 const themeSlug = choiceData?.theme_selection ?? choices.theme_selection ?? "hello-elementor";
3076 if (themeSlug && isLast) {
3077 trackThemeSelected(themeSlug, "theme_selection");
3078 isCompletingRef.current = true;
3079 setIsCompleting(true);
3080 installTheme.mutate(themeSlug, {
3081 onSuccess: completeAndRedirect,
3082 onError: (error) => {
3083 trackErrorReported({
3084 targetType: "install",
3085 targetName: "continue_with_hello",
3086 stepId: "theme_selection",
3087 errorBody: error instanceof Error ? error.message : "Failed to install theme"
3088 });
3089 showToast(t("error.theme_install_failed"));
3090 completeAndRedirect();
3091 }
3092 });
3093 return;
3094 }
3095 if (themeSlug) {
3096 trackThemeSelected(themeSlug, "theme_selection");
3097 installTheme.mutate(themeSlug, { onError: (error) => {
3098 trackErrorReported({
3099 targetType: "install",
3100 targetName: "continue_with_hello",
3101 stepId: "theme_selection",
3102 errorBody: error instanceof Error ? error.message : "Failed to install theme"
3103 });
3104 showToast(t("error.theme_install_failed"));
3105 } });
3106 }
3107 }
3108 if (isLast) {
3109 trackSummary({
3110 choices,
3111 completedSteps: [...completedSteps, stepId],
3112 isConnected,
3113 isGuest
3114 });
3115 isCompletingRef.current = true;
3116 setIsCompleting(true);
3117 completeAndRedirect();
3118 return;
3119 }
3120 updateProgress.mutate({
3121 complete_step: stepId,
3122 step_index: stepIndex,
3123 total_steps: totalSteps
3124 }, {
3125 onSuccess: () => {
3126 actions.completeStep(stepId);
3127 actions.nextStep();
3128 },
3129 onError: () => {
3130 actions.completeStep(stepId);
3131 actions.nextStep();
3132 }
3133 });
3134 }, [
3135 actions,
3136 choices,
3137 completedSteps,
3138 isConnected,
3139 isGuest,
3140 isLast,
3141 stepId,
3142 stepIndex,
3143 totalSteps,
3144 updateProgress,
3145 saveChoicesFireAndForget,
3146 installTheme,
3147 showToast,
3148 completeAndRedirect,
3149 trackErrorReported,
3150 trackProFeaturesSelected,
3151 trackSummary,
3152 trackThemeSelected
3153 ]);
3154 const rightPanelConfig = (0, react.useMemo)(() => getStepVisualConfig(stepId), [stepId]);
3155 const isPending = updateProgress.isPending || isLoading;
3156 const choiceForStep = choices[stepId];
3157 const continueDisabled = isContinueDisabled(stepId, isLast, choiceForStep);
3158 const isBackDisabled = isFirst && isConnected;
3159 const getContinueLabel = () => {
3160 if (stepId === StepId.THEME_SELECTION && !completedSteps.includes(StepId.THEME_SELECTION)) return t("steps.theme_selection.v2.continue_with_theme");
3161 if (stepId === StepId.SITE_FEATURES && !completedSteps.includes(StepId.SITE_FEATURES)) return t("steps.site_features.continue_with_free");
3162 if (isLast) return t("common.finish");
3163 return t("common.continue");
3164 };
3165 const renderStepContent = () => {
3166 switch (stepId) {
3167 case StepId.THEME_SELECTION: return /* @__PURE__ */ react.createElement(ThemeSelection, null);
3168 case StepId.SITE_FEATURES: return /* @__PURE__ */ react.createElement(SiteFeatures, null);
3169 default: return /* @__PURE__ */ react.createElement(_elementor_ui.Box, { sx: {
3170 flex: 1,
3171 width: "100%"
3172 } });
3173 }
3174 };
3175 if (isCompleting) return /* @__PURE__ */ react.createElement(CompletionScreen, null);
3176 if (!hasPassedLogin) return /* @__PURE__ */ react.createElement(BaseLayout, { topBar: /* @__PURE__ */ react.createElement(TopBar, null, /* @__PURE__ */ react.createElement(TopBarContent, {
3177 showUpgrade: true,
3178 showClose: false,
3179 onUpgrade: () => {
3180 trackUpgradeClicked("login");
3181 window.open(urls.upgradeUrl, "_blank");
3182 }
3183 })) }, /* @__PURE__ */ react.createElement(Login, {
3184 onConnect: handleConnect,
3185 onSignUp: handleSignUp,
3186 onContinueAsGuest: handleContinueAsGuest
3187 }));
3188 if (shouldShowProInstall) return /* @__PURE__ */ react.createElement(BaseLayout, { topBar: /* @__PURE__ */ react.createElement(TopBar, null, /* @__PURE__ */ react.createElement(TopBarContent, {
3189 showUpgrade: false,
3190 showClose: false
3191 })) }, /* @__PURE__ */ react.createElement(ProInstall, null));
3192 return /* @__PURE__ */ react.createElement(BaseLayout, {
3193 testId: "onboarding-steps",
3194 topBar: /* @__PURE__ */ react.createElement(TopBar, null, /* @__PURE__ */ react.createElement(TopBarContent, {
3195 showClose: false,
3196 onClose: handleClose,
3197 onUpgrade: () => {
3198 trackUpgradeClicked(stepId);
3199 window.open(urls.upgradeUrl, "_blank");
3200 }
3201 })),
3202 footer: /* @__PURE__ */ react.createElement(Footer, null, /* @__PURE__ */ react.createElement(FooterActions, {
3203 showBack: true,
3204 showSkip: true,
3205 showContinue: true,
3206 isBackDisabled,
3207 continueLabel: getContinueLabel(),
3208 continueDisabled,
3209 continueLoading: isPending,
3210 onBack: handleBack,
3211 onSkip: handleSkip,
3212 onContinue: () => handleContinue()
3213 }))
3214 }, /* @__PURE__ */ react.createElement(SplitLayout, {
3215 left: renderStepContent(),
3216 rightConfig: rightPanelConfig
3217 }));
3218 }
3219
3220 //#endregion
3221 //#region packages/apps/onboarding/src/components/app.tsx
3222 function resolveColorScheme(preference) {
3223 if (preference === "dark") return "dark";
3224 if (preference === "light") return "light";
3225 return window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
3226 }
3227 function App(props) {
3228 const store = (0, react.useMemo)(() => {
3229 registerOnboardingSlice();
3230 let existingStore = (0, _elementor_store.__getStore)();
3231 if (!existingStore) existingStore = (0, _elementor_store.__createStore)();
3232 existingStore.dispatch(initFromConfig());
3233 return existingStore;
3234 }, []);
3235 const queryClient = (0, react.useMemo)(() => (0, _elementor_query.createQueryClient)(), []);
3236 const uiTheme = window.elementorAppConfig?.onboarding?.uiTheme ?? "auto";
3237 const colorScheme = (0, react.useMemo)(() => resolveColorScheme(uiTheme), [uiTheme]);
3238 const isRtl = window.elementorCommon?.config?.isRTL ?? false;
3239 return /* @__PURE__ */ react.createElement(_elementor_store.__StoreProvider, { store }, /* @__PURE__ */ react.createElement(_elementor_query.QueryClientProvider, { client: queryClient }, /* @__PURE__ */ react.createElement(_elementor_ui.DirectionProvider, { rtl: isRtl }, /* @__PURE__ */ react.createElement(_elementor_ui.ThemeProvider, {
3240 colorScheme,
3241 palette: "argon-beta"
3242 }, /* @__PURE__ */ react.createElement(ToastProvider, null, /* @__PURE__ */ react.createElement(TrackingProvider, null, /* @__PURE__ */ react.createElement(AppContent, { ...props })))))));
3243 }
3244
3245 //#endregion
3246 //#region packages/apps/onboarding/src/index.ts
3247 var src_exports = /* @__PURE__ */ __exportAll({ App: () => App });
3248
3249 //#endregion
3250 //#region \0elementor-package-library-entry
3251 (window.elementorV2 = window.elementorV2 || {}).onboarding = src_exports;
3252
3253 //#endregion
3254 })(React, elementorV2.query, elementorV2.store, elementorV2.ui, elementorV2.events, elementorV2.utils, elementorV2.icons);
3255 window.elementorV2.onboarding?.init?.();
3256 //# sourceMappingURL=onboarding.js.map