| 1 |
(function(react, _wordpress_i18n) { |
| 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 __copyProps = (to, from, except, desc) => { |
| 15 |
if (from && typeof from === "object" || typeof from === "function") { |
| 16 |
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { |
| 17 |
key = keys[i]; |
| 18 |
if (!__hasOwnProp.call(to, key) && key !== except) { |
| 19 |
__defProp(to, key, { |
| 20 |
get: ((k) => from[k]).bind(null, key), |
| 21 |
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable |
| 22 |
}); |
| 23 |
} |
| 24 |
} |
| 25 |
} |
| 26 |
return to; |
| 27 |
}; |
| 28 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { |
| 29 |
value: mod, |
| 30 |
enumerable: true |
| 31 |
}) : target, mod)); |
| 32 |
|
| 33 |
//#endregion |
| 34 |
react = __toESM(react); |
| 35 |
|
| 36 |
//#region modules/mcp/assets/dev/js/mcp-upgrade-promotion.jsx |
| 37 |
function getUpgradeUrl() { |
| 38 |
var _window$elementorMcpP; |
| 39 |
var _window$elementorMcpP2; |
| 40 |
return (_window$elementorMcpP = (_window$elementorMcpP2 = window.elementorMcpPromotionConfig) === null || _window$elementorMcpP2 === void 0 ? void 0 : _window$elementorMcpP2.upgradeUrl) !== null && _window$elementorMcpP !== void 0 ? _window$elementorMcpP : ""; |
| 41 |
} |
| 42 |
var containerStyle = { |
| 43 |
marginTop: 32, |
| 44 |
padding: "20px 24px", |
| 45 |
border: "1px solid #d5d8dc", |
| 46 |
borderRadius: 4, |
| 47 |
backgroundColor: "#fff" |
| 48 |
}; |
| 49 |
var rowStyle = { |
| 50 |
display: "flex", |
| 51 |
flexWrap: "wrap", |
| 52 |
gap: 16, |
| 53 |
alignItems: "center", |
| 54 |
justifyContent: "space-between" |
| 55 |
}; |
| 56 |
var titleStyle = { |
| 57 |
margin: 0, |
| 58 |
fontSize: 16, |
| 59 |
fontWeight: 600, |
| 60 |
lineHeight: "24px" |
| 61 |
}; |
| 62 |
var bodyStyle = { |
| 63 |
margin: "4px 0 0", |
| 64 |
fontSize: 14, |
| 65 |
lineHeight: "20px", |
| 66 |
color: "#69727d" |
| 67 |
}; |
| 68 |
var buttonStyle = { |
| 69 |
display: "inline-block", |
| 70 |
padding: "8px 16px", |
| 71 |
border: "1px solid #93003f", |
| 72 |
borderRadius: 4, |
| 73 |
color: "#93003f", |
| 74 |
textDecoration: "none", |
| 75 |
fontSize: 14, |
| 76 |
fontWeight: 500, |
| 77 |
whiteSpace: "nowrap" |
| 78 |
}; |
| 79 |
function McpUpgradePromotion() { |
| 80 |
var upgradeUrl = getUpgradeUrl(); |
| 81 |
return /*#__PURE__*/ react.default.createElement("div", { style: containerStyle }, /*#__PURE__*/ react.default.createElement("div", { style: rowStyle }, /*#__PURE__*/ react.default.createElement("div", { style: { |
| 82 |
minWidth: 0, |
| 83 |
flex: "1 1 240px" |
| 84 |
} }, /*#__PURE__*/ react.default.createElement("p", { style: titleStyle }, (0, _wordpress_i18n.__)("Build more with your AI agent", "elementor")), /*#__PURE__*/ react.default.createElement("p", { style: bodyStyle }, (0, _wordpress_i18n.__)("With Pro, your agent can build with Theme Builder, forms, popups, and more advanced Elementor capabilities.", "elementor"))), /*#__PURE__*/ react.default.createElement("a", { |
| 85 |
href: upgradeUrl, |
| 86 |
target: "_blank", |
| 87 |
rel: "noopener noreferrer", |
| 88 |
style: buttonStyle |
| 89 |
}, (0, _wordpress_i18n.__)("Upgrade", "elementor")))); |
| 90 |
} |
| 91 |
|
| 92 |
//#endregion |
| 93 |
//#region modules/mcp/assets/dev/js/mcp-promotion-registrar.js |
| 94 |
var INJECTION_ID = "elementor-core-mcp-upgrade"; |
| 95 |
var RETRY_MS = 50; |
| 96 |
var RETRY_TIMEOUT_MS = 5e3; |
| 97 |
function tryRegisterPromotion() { |
| 98 |
var _window$elementorMcpC; |
| 99 |
var injectIntoMcpAdminPromotion = (_window$elementorMcpC = window.elementorMcpComposer) === null || _window$elementorMcpC === void 0 ? void 0 : _window$elementorMcpC.injectIntoMcpAdminPromotion; |
| 100 |
if (!injectIntoMcpAdminPromotion) return false; |
| 101 |
injectIntoMcpAdminPromotion({ |
| 102 |
id: INJECTION_ID, |
| 103 |
component: McpUpgradePromotion |
| 104 |
}); |
| 105 |
return true; |
| 106 |
} |
| 107 |
if (!tryRegisterPromotion()) { |
| 108 |
var startedAt = Date.now(); |
| 109 |
var intervalId = window.setInterval(function() { |
| 110 |
if (tryRegisterPromotion() || Date.now() - startedAt >= RETRY_TIMEOUT_MS) window.clearInterval(intervalId); |
| 111 |
}, RETRY_MS); |
| 112 |
} |
| 113 |
|
| 114 |
//#endregion |
| 115 |
})(React, wp.i18n); |
| 116 |
//# sourceMappingURL=mcp-promotion-registrar.js.map |