| 1 |
(function() { |
| 2 |
|
| 3 |
//#region \0rolldown/runtime.js |
| 4 |
var __defProp = Object.defineProperty; |
| 5 |
var __name = (target, value) => __defProp(target, "name", { |
| 6 |
value, |
| 7 |
configurable: true |
| 8 |
}); |
| 9 |
|
| 10 |
//#endregion |
| 11 |
|
| 12 |
//#region modules/pro-install/assets/js/pro-install-events.js |
| 13 |
function getDispatchEvent() { |
| 14 |
var _window$elementorComm; |
| 15 |
var _window$elementorComm2; |
| 16 |
var _eventsManager$dispat; |
| 17 |
if (!((_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.config) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.experimentalFeatures) === null || _window$elementorComm === void 0 ? void 0 : _window$elementorComm.editor_events)) return null; |
| 18 |
var eventsManager = (_window$elementorComm2 = window.elementorCommon) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.eventsManager; |
| 19 |
return (eventsManager === null || eventsManager === void 0 || (_eventsManager$dispat = eventsManager.dispatchEvent) === null || _eventsManager$dispat === void 0 ? void 0 : _eventsManager$dispat.bind(eventsManager)) || null; |
| 20 |
} |
| 21 |
function trackEditorEvent(eventName, eventData) { |
| 22 |
var dispatchEvent = getDispatchEvent(); |
| 23 |
if (!dispatchEvent) return; |
| 24 |
dispatchEvent(eventName, eventData); |
| 25 |
} |
| 26 |
window.trackUpgradeNowClickEvent = function() { |
| 27 |
trackEditorEvent("upgrade_subscription", { |
| 28 |
location: "Elementor WP-admin pages", |
| 29 |
secondaryLocation: "Connect account page", |
| 30 |
trigger: "click" |
| 31 |
}); |
| 32 |
}; |
| 33 |
window.trackConnectAccountEvent = function() { |
| 34 |
Promise.resolve(trackEditorEvent("connect_account", { |
| 35 |
location: "Elementor WP-admin pages", |
| 36 |
secondaryLocation: "Connect account page", |
| 37 |
trigger: "click" |
| 38 |
})).catch(function() {}); |
| 39 |
}; |
| 40 |
window.trackOpenConnectPageEvent = function() { |
| 41 |
trackEditorEvent("open_connect_page", { |
| 42 |
location: "Elementor WP-admin pages", |
| 43 |
secondaryLocation: "Connect account page", |
| 44 |
trigger: "page_load" |
| 45 |
}); |
| 46 |
}; |
| 47 |
window.trackProInstallEvent = function() { |
| 48 |
trackEditorEvent("pro_install", { |
| 49 |
location: "Elementor WP-admin pages", |
| 50 |
secondaryLocation: "Connect account page", |
| 51 |
trigger: "click" |
| 52 |
}); |
| 53 |
}; |
| 54 |
document.addEventListener("DOMContentLoaded", function() { |
| 55 |
window.trackOpenConnectPageEvent(); |
| 56 |
var upgradeButton = document.querySelector(".elementor-pro-connect-promotion .elementor-box-action .button-upgrade"); |
| 57 |
if (upgradeButton) upgradeButton.addEventListener("click", window.trackUpgradeNowClickEvent); |
| 58 |
var connectButton = document.querySelector("#elementor-connect-license"); |
| 59 |
if (connectButton) connectButton.addEventListener("click", window.trackConnectAccountEvent); |
| 60 |
var proInstallButton = document.querySelector("#elementor-connect-install-pro"); |
| 61 |
if (proInstallButton) proInstallButton.addEventListener("click", window.trackProInstallEvent); |
| 62 |
}); |
| 63 |
|
| 64 |
//#endregion |
| 65 |
})(); |
| 66 |
//# sourceMappingURL=pro-install-events.js.map |