useblocks 1.1.53 → 1.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/iframe/js/amp.BP7EklKo.js +1 -1
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.4N5s3OV-.js +1 -1
- package/npm-publish.manifest.json +7 -7
- package/package.json +1 -7
- package/runtime/THIRD_PARTY_LICENSES.txt +0 -235
- package/runtime/index.js +0 -2
- package/runtime/package.json +0 -6
- package/runtime/plugin-dev-manifest.json +0 -4
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{d1eb3c68.js → 12a9aa4e.js} +12892 -12866
- package/static/core/{b9f47840.js → 17d3ee0b.js} +8 -8
- package/static/core/{6895dd352.js → 195ca4a32.js} +15 -15
- package/static/core/{dc1f9e4f.js → 2569fac8.js} +26 -26
- package/static/core/{4ca527032.js → 26ddf93e2.js} +2 -2
- package/static/core/{c3058168.js → 289ba982.js} +334 -323
- package/static/core/{9929a348.js → 30c5fe5f.js} +90 -90
- package/static/core/{e93d55b92.js → 3af8f3592.js} +4 -4
- package/static/core/{542ea53f2.js → 4a27bba92.js} +8 -8
- package/static/core/4a5f1756.js +466 -0
- package/static/core/{5318562c.js → 4d493eba.js} +3 -3
- package/static/core/{ebd852b6.js → 4dadf572.js} +1019 -1032
- package/static/core/{e1d239ab.js → 5345bef8.js} +42 -42
- package/static/core/{27544e7e.js → 581ce428.js} +37 -19
- package/static/core/58c4b8d7.js +3150 -0
- package/static/core/{d8daf1142.js → 6156301b2.js} +3 -3
- package/static/core/{c3849484.js → 64bea1a9.js} +5 -5
- package/static/core/{ce4fc17f2.js → 680236f4.js} +1 -1
- package/static/core/{4b75d16c2.js → 687795b52.js} +4 -4
- package/static/core/{70407ac0.js → 72f86b2d.js} +3 -3
- package/static/core/{b77f0769.js → 8432f11e.js} +5 -5
- package/static/core/{31e98e6e.js → 87969347.js} +247 -250
- package/static/core/{f3cff4c9.js → 8a496b64.js} +158 -158
- package/static/core/{4e1b970f.js → 8ba13f332.js} +1 -1
- package/static/core/{75737a9d.js → 951903fb.js} +9096 -9074
- package/static/core/{bc7e3d2b.js → 988589a5.js} +10 -10
- package/static/core/{a95c02bb.js → a1355a35.js} +5 -5
- package/static/core/{7c6fb2162.js → a36c3ab62.js} +3 -3
- package/static/core/{e5e07f1d.js → a4c19e27.js} +13 -13
- package/static/core/{2da1d66b.js → abd3f34c.js} +5 -5
- package/static/core/{528ad9282.js → ae20f0992.js} +16 -16
- package/static/core/{ee0ddb51.js → b9bb2c5f.js} +6403 -4842
- package/static/core/bf446743.js +761 -0
- package/static/core/{f96d2049.js → d1a1d4902.js} +1 -1
- package/static/core/{5b48fd69.js → d8d6485e.js} +5 -5
- package/static/core/{59e92cc3.js → d9398296.js} +5 -5
- package/static/core/{139e4380.js → eb23332a.js} +3 -3
- package/static/core/{b408f33a.js → fa354fb5.js} +25 -25
- package/static/core/{1e5bf73c.js → ffee9a77.js} +7 -7
- package/static/esm/{d180c108.js → 3cde7cb6.js} +51 -70
- package/static/esm/{448d4bb0.js → 550bf3cb.js} +1 -1
- package/two_step_headless_plugin.html +1 -1
- package/{useblocks-core.2a5dade1.js → useblocks-core.1279854f.js} +6 -6
- package/useblocks-esm.js +352 -392
- package/useblocks.js +67 -152
- package/runtime/prop-types/index.js +0 -4
- package/runtime/react-router-dom/index.js +0 -2
- package/static/core/1995fb0a2.js +0 -602
- package/static/core/1f5e1fc9.js +0 -3097
- package/static/core/ce0410b1.js +0 -467
- package/static/runtime/dom-export-CHgQ7Ws9.js +0 -8069
- package/static/runtime/prop-types-p_yYKrF7.js +0 -47
- /package/iframe/{iframe-eblock.2a5dade1.html → iframe-eblock.1279854f.html} +0 -0
- /package/iframe/{iframe.2a5dade1.html → iframe.1279854f.html} +0 -0
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
(function(){try{if(typeof document<"u"){var o=document.createElement("style");o.setAttribute("data-useblocks","true"),o.appendChild(document.createTextNode('@import "https://fonts.googleapis.com/css2?family=Geologica:wght@300;600&display=swap";.blocks-app .ant-modal.premium-features-modal .ant-modal-container{border-radius:calc(var(--borderRadiusXL) * 2px);padding:20px 19px}.blocks-app .premium-features-modal .modal-title{text-align:center;margin-bottom:0;font-size:32px}.blocks-app .premium-features-modal .ant-carousel .slick-dots li button{opacity:.5;background:#fff}.blocks-app .premium-features-modal .ant-carousel .slick-dots li.slick-active button{opacity:1}.blocks-app .premium-features-modal .modal-subtitle{text-align:center;margin-bottom:20px;font-size:18px}.blocks-app .premium-features-modal .carousel-slider{margin-bottom:20px}.blocks-app .premium-features-modal .slick-list{border-radius:calc(var(--borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--borderRadiusXL) * 1.5px);justify-content:flex-end;align-items:center;height:480px;display:flex}.blocks-app .premium-features-modal .slide-item-image{width:50%;padding:24px 0 24px 32px}.blocks-app .premium-features-modal .slide-item-image img{border-radius:calc(var(--borderRadiusXL) * 1.3px);width:100%}.blocks-app .premium-features-modal .slide-item-content{width:50%;padding:48px}.blocks-app .premium-features-modal .slide-title{margin-bottom:48px;font-size:50px;font-weight:700;line-height:1}.blocks-app .premium-features-modal .slide-description{font-size:22px}.blocks-app .premium-features-modal .modal-buttons{justify-content:center;gap:10px;display:flex}.blocks-app .premium-features-modal .modal-buttons button{padding:0 30px}.blocks-app .trial-suggest-modal .ant-modal-content{border-radius:16px;padding:32px}.blocks-app .trial-suggest-modal__title{color:var(--colorText);margin:0 0 12px;font-size:22px;font-weight:600;line-height:1.3}.blocks-app .trial-suggest-modal__intro{color:var(--colorText);margin:0 0 12px}.blocks-app .trial-suggest-modal__features{color:var(--colorText);margin:0 0 20px;padding-left:20px}.blocks-app .trial-suggest-modal__features li{margin-bottom:6px}.blocks-app .trial-suggest-modal__disclaimer{color:var(--colorTextSecondary);margin:0 0 24px}.blocks-app .trial-suggest-modal__buttons{justify-content:flex-end;gap:12px;display:flex}.blocks-app .limit-upgrade-modal.ant-modal{max-width:calc(100vw - 24px)}.blocks-app .limit-upgrade-modal .ant-modal-content{border-radius:16px;padding:0;overflow:hidden;box-shadow:0 12px 24px -4px #191d3a14}.blocks-app .limit-upgrade-modal .ant-modal-header{display:none}.blocks-app .limit-upgrade-modal .ant-modal-content .ant-modal-body{padding:0}.blocks-app .limit-upgrade-modal__wrap{background:var(--colorBgContainer);flex-direction:column;align-items:center;width:400px;max-width:100%;display:flex}.blocks-app .limit-upgrade-modal__header{box-sizing:border-box;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;min-height:34px;padding:8px 8px 0;display:flex}.blocks-app .limit-upgrade-modal__close{background:var(--colorBgContainer);width:34px;height:34px;color:var(--colorTextSecondary);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;margin:0;padding:0;transition:background .15s,color .15s;display:flex}.blocks-app .limit-upgrade-modal__close:hover{background:var(--colorFillTertiary);color:var(--colorText)}.blocks-app .limit-upgrade-modal__close .anticon{font-size:16px}.blocks-app .limit-upgrade-modal__body{box-sizing:border-box;flex-direction:column;align-items:center;gap:16px;width:100%;padding:0 40px 24px;display:flex}.blocks-app .limit-upgrade-modal__title{text-align:center;max-width:320px;color:var(--colorText);margin:0;font-size:18px;font-weight:400;line-height:130%}.blocks-app .limit-upgrade-modal__subtitle{text-align:center;max-width:320px;color:var(--colorTextSecondary);margin:0;font-size:14px;font-weight:100;line-height:120%}.blocks-app .limit-upgrade-modal__limits-row{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;width:100%;max-width:320px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle{box-sizing:border-box;border:1px solid var(--colorText);width:34px;height:34px;color:var(--colorText);border-radius:32px;flex:none;justify-content:center;align-items:center;padding:8px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle .anticon{font-size:18px}.blocks-app .limit-upgrade-modal__icon-circle svg{flex-shrink:0;width:18px;height:18px;display:block}.blocks-app .limit-upgrade-modal__limit-old{color:#f85243;flex-shrink:0;font-size:40px;font-weight:100;line-height:100%}.blocks-app .limit-upgrade-modal__arrow-btn{color:#fff;background:#8946fb;border-radius:38px;flex:none;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.blocks-app .limit-upgrade-modal__arrow-icon{font-size:16px;transform:rotate(45deg)}.blocks-app .limit-upgrade-modal__limit-new{color:#7ed846;flex-shrink:0;font-size:40px;font-weight:400;line-height:100%}.blocks-app .limit-upgrade-modal__limit-new--infinity{font-size:36px;line-height:40px}.blocks-app .limit-upgrade-modal__divider{border:none;border-top:1px solid var(--colorBorderSecondary);width:100%;height:0;margin:0}.blocks-app .limit-upgrade-modal__footer{box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:16px 0;display:flex}.blocks-app .limit-upgrade-modal__footer--dual{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;padding:16px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary{min-width:147px;height:32px;box-shadow:none;background:#2884ff;border-color:#2884ff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary:hover{background:#1a75f0;border-color:#1a75f0}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default{border-color:var(--colorBorder);min-width:147px;height:32px;color:var(--colorText);box-shadow:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default:hover{color:#2884ff;border-color:#2884ff}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
__useblocks__.define("static/core/bf446743.js", [
|
|
3
|
+
"require",
|
|
4
|
+
"exports",
|
|
5
|
+
"module",
|
|
6
|
+
"static/core/bd36b180.js",
|
|
7
|
+
"static/core/b9bb2c5f.js",
|
|
8
|
+
"static/core/4d493eba.js",
|
|
9
|
+
"static/core/4dadf572.js",
|
|
10
|
+
"static/core/951903fb.js",
|
|
11
|
+
"react",
|
|
12
|
+
"react-dom",
|
|
13
|
+
"react/jsx-runtime",
|
|
14
|
+
"antd",
|
|
15
|
+
"react-dom/client",
|
|
16
|
+
"@ant-design/icons",
|
|
17
|
+
"@ant-design/cssinjs"
|
|
18
|
+
], function(y, m, q) {
|
|
19
|
+
const E = y("./bd36b180.js"), l = y("./b9bb2c5f.js"), k = y("./4d493eba.js"), h = y("./4dadf572.js");
|
|
20
|
+
y("./951903fb.js");
|
|
21
|
+
let u = y("react");
|
|
22
|
+
u = E.__toESM(u);
|
|
23
|
+
y("react-dom");
|
|
24
|
+
let a = y("react/jsx-runtime");
|
|
25
|
+
y("antd");
|
|
26
|
+
y("react-dom/client");
|
|
27
|
+
y("@ant-design/icons");
|
|
28
|
+
y("@ant-design/cssinjs");
|
|
29
|
+
function O(e, i) {
|
|
30
|
+
return e == null || i == null ? !1 : String(e) === String(i);
|
|
31
|
+
}
|
|
32
|
+
function x(e, i) {
|
|
33
|
+
if (e?.myRole === "owner" || e?.myRole === "admin") return e.myRole;
|
|
34
|
+
if (e?.myRole === "user" || e?.myRole === "viewer") return "user";
|
|
35
|
+
const r = Array.isArray(e?.members) ? e.members : [], n = Array.isArray(e?.invites) ? e.invites : [];
|
|
36
|
+
if (i?.id == null || i.id === "") return null;
|
|
37
|
+
const t = r.find((o) => O(o?.userId, i.id));
|
|
38
|
+
if (t) {
|
|
39
|
+
if (t.role === "owner" || t.role === "admin") return t.role;
|
|
40
|
+
if (t.role === "user" || t.role === "viewer") return "user";
|
|
41
|
+
}
|
|
42
|
+
const c = i.email?.trim().toLowerCase();
|
|
43
|
+
return c && n.some((o) => o?.email?.trim().toLowerCase() === c) ? "invited" : null;
|
|
44
|
+
}
|
|
45
|
+
function j(e, i) {
|
|
46
|
+
return x(e, i) === "owner";
|
|
47
|
+
}
|
|
48
|
+
function A(e) {
|
|
49
|
+
const { isUserPay: i, isProjectOwner: r, trialEnabled: n, isPlugin: t } = e;
|
|
50
|
+
return t || i || !r || n ? "upsell" : "trial";
|
|
51
|
+
}
|
|
52
|
+
var P = () => l.di.useInstance(l.COOKIE_MANAGER_ID);
|
|
53
|
+
function K(e, i, r) {
|
|
54
|
+
const n = e.data?.status, t = typeof e.status == "number" ? e.status : void 0;
|
|
55
|
+
return n === 403 || t === 403 ? {
|
|
56
|
+
kind: "failure",
|
|
57
|
+
userMessage: e.message && String(e.message).trim() || i
|
|
58
|
+
} : {
|
|
59
|
+
kind: "success",
|
|
60
|
+
title: e.code && String(e.code).trim() || r,
|
|
61
|
+
description: e.message && String(e.message).trim() || void 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
async function T(e, i, r, n, t, c, o) {
|
|
65
|
+
const d = await i(e), g = r("Could not activate the trial. Please try again later or contact support.");
|
|
66
|
+
if ("error" in d && d.error) {
|
|
67
|
+
const s = d.error, p = "data" in s ? s.data : void 0;
|
|
68
|
+
return o((p && typeof p == "object" && p !== null && "message" in p ? String(p.message) : void 0) || g), !1;
|
|
69
|
+
}
|
|
70
|
+
if ("data" in d && d.data && typeof d.data == "object") {
|
|
71
|
+
const s = K(d.data, g, r("Trial period activated."));
|
|
72
|
+
return s.kind === "failure" ? (o(s.userMessage), !1) : (n(l.changeConfig("pro")), await t(void 0), s.description ? c({
|
|
73
|
+
title: s.title,
|
|
74
|
+
description: s.description
|
|
75
|
+
}) : c(s.title), !0);
|
|
76
|
+
}
|
|
77
|
+
return n(l.changeConfig("pro")), await t(void 0), c(r("Trial period activated.")), !0;
|
|
78
|
+
}
|
|
79
|
+
function R() {
|
|
80
|
+
const { __: e } = h.useI18n(), i = l.useDispatch(), r = P(), { success: n, notify: t } = h.useNotification(), c = l.usePushToDataLayer(), [o] = l.useLazyGetMeQuery(), [d, { isLoading: g }] = l.useActivateTrialMutation(), s = (0, u.useCallback)((p) => {
|
|
81
|
+
t({
|
|
82
|
+
title: p,
|
|
83
|
+
type: "error"
|
|
84
|
+
});
|
|
85
|
+
}, [t]);
|
|
86
|
+
return {
|
|
87
|
+
activate: (0, u.useCallback)(async () => {
|
|
88
|
+
const p = r.get(l.APP_COOKIES.em_token);
|
|
89
|
+
if (!p) return s(e("Sign in to your account to activate the trial period.")), !1;
|
|
90
|
+
try {
|
|
91
|
+
const f = await T(p, d, e, i, o, n, s);
|
|
92
|
+
return f && c({
|
|
93
|
+
event: "change",
|
|
94
|
+
action: "activate_trial"
|
|
95
|
+
}), f;
|
|
96
|
+
} catch (f) {
|
|
97
|
+
return s(f?.data?.message || e("Could not activate the trial. Please try again later or contact support.")), !1;
|
|
98
|
+
}
|
|
99
|
+
}, [
|
|
100
|
+
e,
|
|
101
|
+
d,
|
|
102
|
+
r,
|
|
103
|
+
i,
|
|
104
|
+
o,
|
|
105
|
+
s,
|
|
106
|
+
n,
|
|
107
|
+
c
|
|
108
|
+
]),
|
|
109
|
+
isActivating: g
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
var M = ({ open: e, sideOnOk: i, onCancel: r, initialSlide: n = 0 }) => {
|
|
113
|
+
const { __: t } = h.useI18n(), c = l.useNavigate(), [o, d] = (0, u.useState)(n), g = (0, u.useRef)(null), s = l.usePushToDataLayer(), p = () => {
|
|
114
|
+
i && i(), c("/billing"), r(!1);
|
|
115
|
+
};
|
|
116
|
+
(0, u.useEffect)(() => {
|
|
117
|
+
e && g.current && (g.current.goTo(n, !0), d(n));
|
|
118
|
+
}, [e, n]);
|
|
119
|
+
const f = (0, u.useMemo)(() => [
|
|
120
|
+
{
|
|
121
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),
|
|
122
|
+
backgroundColor: "var(--blue-2)",
|
|
123
|
+
title: t("More editing features"),
|
|
124
|
+
description: t("Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.")
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png"),
|
|
128
|
+
backgroundColor: "var(--purple-2)",
|
|
129
|
+
title: t("Work with the HTML code"),
|
|
130
|
+
description: t("Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions — you can create templates of any complexity!")
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png"),
|
|
134
|
+
backgroundColor: "var(--cyan-2)",
|
|
135
|
+
title: t("AI image generation"),
|
|
136
|
+
description: t("Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.")
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png"),
|
|
140
|
+
backgroundColor: "var(--green-2)",
|
|
141
|
+
title: t("Stock photos and GIFs"),
|
|
142
|
+
description: t("Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.")
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_NDYloAO.png"),
|
|
146
|
+
backgroundColor: "var(--magenta-2)",
|
|
147
|
+
title: t("Version history"),
|
|
148
|
+
description: t("Check who and when made changes to the email template and, if necessary, restore one of the previous versions.")
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png"),
|
|
152
|
+
backgroundColor: "var(--red-2)",
|
|
153
|
+
title: t("Image editor"),
|
|
154
|
+
description: t("Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.")
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png"),
|
|
158
|
+
backgroundColor: "var(--orange-2)",
|
|
159
|
+
title: t("Email optimization"),
|
|
160
|
+
description: t("Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.")
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png"),
|
|
164
|
+
backgroundColor: "var(--volcano-2)",
|
|
165
|
+
title: t("Team collaboration"),
|
|
166
|
+
description: t("Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.")
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png"),
|
|
170
|
+
backgroundColor: "var(--geekblue-2)",
|
|
171
|
+
title: t("Email testing"),
|
|
172
|
+
description: t("Check how your email appears across various devices and email clients.")
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
image: t("https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png"),
|
|
176
|
+
backgroundColor: "var(--geekblue-2)",
|
|
177
|
+
title: t("AI assistant"),
|
|
178
|
+
description: t("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")
|
|
179
|
+
}
|
|
180
|
+
], [t]);
|
|
181
|
+
return (0, u.useEffect)(() => {
|
|
182
|
+
if (e && g.current) {
|
|
183
|
+
g.current.goTo(n, !0), d(n);
|
|
184
|
+
const _ = f[n];
|
|
185
|
+
s({
|
|
186
|
+
event: "open_modal",
|
|
187
|
+
action: "open_premium-features_modal",
|
|
188
|
+
modal_id: "premium-features",
|
|
189
|
+
offer_id: _.title
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}, [
|
|
193
|
+
e,
|
|
194
|
+
f,
|
|
195
|
+
n,
|
|
196
|
+
s
|
|
197
|
+
]), (0, a.jsxs)(h.Modal, {
|
|
198
|
+
open: e,
|
|
199
|
+
footer: null,
|
|
200
|
+
onCancel: r,
|
|
201
|
+
closable: !1,
|
|
202
|
+
className: "premium-features-modal",
|
|
203
|
+
classNames: { mask: "premium-features-modal-mask" },
|
|
204
|
+
styles: { mask: { background: "rgba(0, 0, 0, 0.65)" } },
|
|
205
|
+
width: 1100,
|
|
206
|
+
style: { maxWidth: "80%" },
|
|
207
|
+
children: [
|
|
208
|
+
(0, a.jsx)(h.Carousel, {
|
|
209
|
+
dots: !0,
|
|
210
|
+
slidesToShow: 1,
|
|
211
|
+
slidesToScroll: 1,
|
|
212
|
+
autoplay: !0,
|
|
213
|
+
className: "carousel-slider",
|
|
214
|
+
draggable: !0,
|
|
215
|
+
autoplaySpeed: 5e3,
|
|
216
|
+
initialSlide: o,
|
|
217
|
+
ref: g,
|
|
218
|
+
children: f.map((_, v) => (0, a.jsx)("div", { children: (0, a.jsxs)("div", {
|
|
219
|
+
className: "carousel-slide",
|
|
220
|
+
style: { background: `${_.backgroundColor}` },
|
|
221
|
+
children: [(0, a.jsx)("div", {
|
|
222
|
+
className: "slide-item-image",
|
|
223
|
+
children: (0, a.jsx)("img", {
|
|
224
|
+
src: _.image,
|
|
225
|
+
alt: `slide-${v}`
|
|
226
|
+
})
|
|
227
|
+
}), (0, a.jsxs)("div", {
|
|
228
|
+
className: "slide-item-content",
|
|
229
|
+
children: [(0, a.jsx)("h3", {
|
|
230
|
+
className: "slide-title",
|
|
231
|
+
children: _.title
|
|
232
|
+
}), (0, a.jsx)("p", {
|
|
233
|
+
className: "slide-description",
|
|
234
|
+
children: _.description
|
|
235
|
+
})]
|
|
236
|
+
})]
|
|
237
|
+
}) }, v))
|
|
238
|
+
}),
|
|
239
|
+
(0, a.jsx)("div", {
|
|
240
|
+
className: "modal-subtitle",
|
|
241
|
+
children: t("This and other features are available for you on any paid plan.")
|
|
242
|
+
}),
|
|
243
|
+
(0, a.jsxs)("div", {
|
|
244
|
+
className: "modal-buttons",
|
|
245
|
+
children: [(0, a.jsx)(h.Button, {
|
|
246
|
+
size: "large",
|
|
247
|
+
onClick: () => r(!1),
|
|
248
|
+
children: t("Cancel")
|
|
249
|
+
}), (0, a.jsx)(h.Button, {
|
|
250
|
+
type: "primary",
|
|
251
|
+
size: "large",
|
|
252
|
+
onClick: p,
|
|
253
|
+
style: { padding: "0 30px" },
|
|
254
|
+
children: t("Select plan")
|
|
255
|
+
})]
|
|
256
|
+
})
|
|
257
|
+
]
|
|
258
|
+
});
|
|
259
|
+
}, B = ({ open: e, onCancel: i, onConfirm: r, loading: n = !1 }) => {
|
|
260
|
+
const { __: t } = h.useI18n();
|
|
261
|
+
return (0, a.jsxs)(h.Modal, {
|
|
262
|
+
open: e,
|
|
263
|
+
onCancel: i,
|
|
264
|
+
footer: null,
|
|
265
|
+
closable: !1,
|
|
266
|
+
centered: !0,
|
|
267
|
+
width: 520,
|
|
268
|
+
className: "trial-suggest-modal",
|
|
269
|
+
children: [
|
|
270
|
+
(0, a.jsxs)("h2", {
|
|
271
|
+
className: "trial-suggest-modal__title",
|
|
272
|
+
children: [t("Try every editor feature — free"), " "]
|
|
273
|
+
}),
|
|
274
|
+
(0, a.jsx)("p", {
|
|
275
|
+
className: "trial-suggest-modal__intro",
|
|
276
|
+
children: t("Turn on a 14-day trial and the whole editor opens up:")
|
|
277
|
+
}),
|
|
278
|
+
(0, a.jsxs)("ul", {
|
|
279
|
+
className: "trial-suggest-modal__features",
|
|
280
|
+
children: [
|
|
281
|
+
(0, a.jsx)("li", { children: t("Export to HTML, AMP, PDF and PNG") }),
|
|
282
|
+
(0, a.jsx)("li", { children: t("Code editing and version history") }),
|
|
283
|
+
(0, a.jsx)("li", { children: t("AI assistant and AI image generation") }),
|
|
284
|
+
(0, a.jsx)("li", { children: t("Stock photos, GIFs and icons, plus the image editor") }),
|
|
285
|
+
(0, a.jsx)("li", { children: t("Email checks and teamwork") })
|
|
286
|
+
]
|
|
287
|
+
}),
|
|
288
|
+
(0, a.jsx)("p", {
|
|
289
|
+
className: "trial-suggest-modal__disclaimer",
|
|
290
|
+
children: t("No card required: we ask for no payment or personal details. When the trial ends, the service switches to the free plan.")
|
|
291
|
+
}),
|
|
292
|
+
(0, a.jsxs)("div", {
|
|
293
|
+
className: "trial-suggest-modal__buttons",
|
|
294
|
+
children: [(0, a.jsxs)(h.Button, {
|
|
295
|
+
size: "large",
|
|
296
|
+
onClick: i,
|
|
297
|
+
children: [t("Not now"), " "]
|
|
298
|
+
}), (0, a.jsxs)(h.Button, {
|
|
299
|
+
type: "primary",
|
|
300
|
+
size: "large",
|
|
301
|
+
loading: n,
|
|
302
|
+
onClick: r,
|
|
303
|
+
children: [t("Start the trial"), " "]
|
|
304
|
+
})]
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
});
|
|
308
|
+
}, Y = ({ open: e, onCancel: i, initialSlide: r = 0, onTrialActivated: n, sideOnOk: t }) => {
|
|
309
|
+
const c = l.useSelector(l.selectedIsUserPaySmth), o = l.useSelector(l.selectedCurrentUser), d = l.useSelector(l.selectProject), g = l.usePushToDataLayer(), { activate: s, isActivating: p } = R(), f = A({
|
|
310
|
+
isUserPay: c,
|
|
311
|
+
isProjectOwner: j(d, o),
|
|
312
|
+
trialEnabled: !!o?.trial_enabled,
|
|
313
|
+
isPlugin: l.PLUGIN.isPlugin
|
|
314
|
+
}) === "trial";
|
|
315
|
+
(0, u.useEffect)(() => {
|
|
316
|
+
!e || !f || g({
|
|
317
|
+
event: "open_modal",
|
|
318
|
+
action: "open_trial-suggest_modal",
|
|
319
|
+
modal_id: "trial-suggest"
|
|
320
|
+
});
|
|
321
|
+
}, [
|
|
322
|
+
e,
|
|
323
|
+
f,
|
|
324
|
+
g
|
|
325
|
+
]);
|
|
326
|
+
const _ = (0, u.useCallback)(() => {
|
|
327
|
+
(async () => {
|
|
328
|
+
if (await s()) {
|
|
329
|
+
(n ?? i)();
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
i();
|
|
333
|
+
})();
|
|
334
|
+
}, [
|
|
335
|
+
s,
|
|
336
|
+
i,
|
|
337
|
+
n
|
|
338
|
+
]);
|
|
339
|
+
return f ? (0, a.jsx)(B, {
|
|
340
|
+
open: e,
|
|
341
|
+
onCancel: i,
|
|
342
|
+
onConfirm: _,
|
|
343
|
+
loading: p
|
|
344
|
+
}) : (0, a.jsx)(M, {
|
|
345
|
+
open: e,
|
|
346
|
+
onCancel: i,
|
|
347
|
+
initialSlide: r,
|
|
348
|
+
sideOnOk: t
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
function w(e) {
|
|
352
|
+
return e = e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), e = e.replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi, ""), e = e.replace(/ on\w+="[^"]*"/g, ""), e = e.replace(/ on\w+='[^']*'/g, ""), e;
|
|
353
|
+
}
|
|
354
|
+
var b = u.default.forwardRef(({ icon: e, ...i }, r) => {
|
|
355
|
+
const n = l.useAppConfig();
|
|
356
|
+
return (0, a.jsx)(h.EmIcons, {
|
|
357
|
+
ref: r,
|
|
358
|
+
icon: e,
|
|
359
|
+
configIcons: (0, u.useMemo)(() => {
|
|
360
|
+
if (!n?.icons) return;
|
|
361
|
+
const t = {};
|
|
362
|
+
for (const [c, o] of Object.entries(n.icons)) typeof o == "string" && (t[c] = w(o));
|
|
363
|
+
return Object.keys(t).length > 0 ? t : void 0;
|
|
364
|
+
}, [n?.icons]),
|
|
365
|
+
strokeWidth: n?.iconStrokeWidth,
|
|
366
|
+
...i
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
b.displayName = "EmIcons";
|
|
370
|
+
var L = {
|
|
371
|
+
ai: "AIRequests",
|
|
372
|
+
email_generate: "EmailEnvelope",
|
|
373
|
+
image_generate: "Image",
|
|
374
|
+
optimization: "Optimization",
|
|
375
|
+
preview: "SendOutlined",
|
|
376
|
+
link_check: "Web",
|
|
377
|
+
image_check: "Image",
|
|
378
|
+
spam_check: "Block",
|
|
379
|
+
projects: "FolderOpen",
|
|
380
|
+
emails: "EmailEnvelope",
|
|
381
|
+
blocks: "Block",
|
|
382
|
+
users: "SliderGroup"
|
|
383
|
+
};
|
|
384
|
+
function I(e, i) {
|
|
385
|
+
if (e == null) return null;
|
|
386
|
+
if (typeof e == "number" || typeof e == "string") {
|
|
387
|
+
const r = e === "∞" || typeof e == "string" && e.toLowerCase() === "infinity";
|
|
388
|
+
return (0, a.jsx)("span", {
|
|
389
|
+
className: i === "old" ? "limit-upgrade-modal__limit-old" : `limit-upgrade-modal__limit-new${r ? " limit-upgrade-modal__limit-new--infinity" : ""}`,
|
|
390
|
+
children: r ? "∞" : e
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
return e;
|
|
394
|
+
}
|
|
395
|
+
var F = ({ open: e, onClose: i, title: r, subtitle: n, usageResource: t, icon: c, previousDisplay: o, nextDisplay: d, onChangePlan: g, secondaryAction: s, changePlanLabel: p }) => {
|
|
396
|
+
const { __: f } = h.useI18n(), _ = p ?? f("Change plan"), v = !!s, J = t != null ? (0, a.jsx)(b, { icon: L[t] }) : c ?? null;
|
|
397
|
+
return (0, a.jsx)(h.Modal, {
|
|
398
|
+
open: e,
|
|
399
|
+
onCancel: i,
|
|
400
|
+
footer: null,
|
|
401
|
+
closable: !1,
|
|
402
|
+
width: 400,
|
|
403
|
+
centered: !0,
|
|
404
|
+
className: "limit-upgrade-modal",
|
|
405
|
+
destroyOnHidden: !0,
|
|
406
|
+
mask: { closable: !0 },
|
|
407
|
+
children: (0, a.jsxs)("div", {
|
|
408
|
+
className: "limit-upgrade-modal__wrap",
|
|
409
|
+
children: [
|
|
410
|
+
(0, a.jsx)("div", {
|
|
411
|
+
className: "limit-upgrade-modal__header",
|
|
412
|
+
children: (0, a.jsx)("button", {
|
|
413
|
+
type: "button",
|
|
414
|
+
className: "limit-upgrade-modal__close",
|
|
415
|
+
onClick: i,
|
|
416
|
+
"aria-label": f("Close"),
|
|
417
|
+
children: (0, a.jsx)(b, { icon: "CloseOutlined" })
|
|
418
|
+
})
|
|
419
|
+
}),
|
|
420
|
+
(0, a.jsxs)("div", {
|
|
421
|
+
className: "limit-upgrade-modal__body",
|
|
422
|
+
children: [
|
|
423
|
+
(0, a.jsx)("h1", {
|
|
424
|
+
className: "limit-upgrade-modal__title",
|
|
425
|
+
children: r
|
|
426
|
+
}),
|
|
427
|
+
(0, a.jsx)("p", {
|
|
428
|
+
className: "limit-upgrade-modal__subtitle",
|
|
429
|
+
children: n
|
|
430
|
+
}),
|
|
431
|
+
(0, a.jsxs)("div", {
|
|
432
|
+
className: "limit-upgrade-modal__limits-row",
|
|
433
|
+
children: [
|
|
434
|
+
(0, a.jsx)("div", {
|
|
435
|
+
className: "limit-upgrade-modal__icon-circle",
|
|
436
|
+
"aria-hidden": !0,
|
|
437
|
+
children: J
|
|
438
|
+
}),
|
|
439
|
+
I(o, "old"),
|
|
440
|
+
(0, a.jsx)("div", {
|
|
441
|
+
className: "limit-upgrade-modal__arrow-btn",
|
|
442
|
+
"aria-hidden": !0,
|
|
443
|
+
children: (0, a.jsx)(b, {
|
|
444
|
+
icon: "ArrowUpOutlined",
|
|
445
|
+
className: "limit-upgrade-modal__arrow-icon"
|
|
446
|
+
})
|
|
447
|
+
}),
|
|
448
|
+
I(d, "new")
|
|
449
|
+
]
|
|
450
|
+
})
|
|
451
|
+
]
|
|
452
|
+
}),
|
|
453
|
+
(0, a.jsx)("hr", { className: "limit-upgrade-modal__divider" }),
|
|
454
|
+
(0, a.jsx)("div", {
|
|
455
|
+
className: v ? "limit-upgrade-modal__footer limit-upgrade-modal__footer--dual" : "limit-upgrade-modal__footer",
|
|
456
|
+
children: s ? (0, a.jsxs)(a.Fragment, { children: [(0, a.jsx)(h.Button, {
|
|
457
|
+
className: "limit-upgrade-modal__cta-secondary",
|
|
458
|
+
onClick: s.onClick,
|
|
459
|
+
children: s.label
|
|
460
|
+
}), (0, a.jsx)(h.Button, {
|
|
461
|
+
type: "primary",
|
|
462
|
+
className: "limit-upgrade-modal__cta",
|
|
463
|
+
onClick: g,
|
|
464
|
+
children: _
|
|
465
|
+
})] }) : (0, a.jsx)(h.Button, {
|
|
466
|
+
type: "primary",
|
|
467
|
+
className: "limit-upgrade-modal__cta",
|
|
468
|
+
onClick: g,
|
|
469
|
+
children: _
|
|
470
|
+
})
|
|
471
|
+
})
|
|
472
|
+
]
|
|
473
|
+
})
|
|
474
|
+
});
|
|
475
|
+
}, D = {
|
|
476
|
+
email_10_30: {
|
|
477
|
+
id: "email_10_30",
|
|
478
|
+
titleKey: "You have used up the number of emails you can create on your current plan",
|
|
479
|
+
subtitleKey: "You can increase the number of emails right now.",
|
|
480
|
+
usageResource: "email_generate",
|
|
481
|
+
previous: 10,
|
|
482
|
+
next: 30,
|
|
483
|
+
showSecondaryBuy: !1,
|
|
484
|
+
debugLabelKey: "Limit modal: emails 10→30"
|
|
485
|
+
},
|
|
486
|
+
email_30_300: {
|
|
487
|
+
id: "email_30_300",
|
|
488
|
+
titleKey: "You have used up the number of emails you can create on your current plan",
|
|
489
|
+
subtitleKey: "You can increase the number of emails right now.",
|
|
490
|
+
usageResource: "email_generate",
|
|
491
|
+
previous: 30,
|
|
492
|
+
next: 300,
|
|
493
|
+
showSecondaryBuy: !1,
|
|
494
|
+
debugLabelKey: "Limit modal: emails 30→300"
|
|
495
|
+
},
|
|
496
|
+
email_300_inf: {
|
|
497
|
+
id: "email_300_inf",
|
|
498
|
+
titleKey: "You have used up the number of emails you can create on your current plan",
|
|
499
|
+
subtitleKey: "You can increase the number of emails right now.",
|
|
500
|
+
usageResource: "email_generate",
|
|
501
|
+
previous: 300,
|
|
502
|
+
next: "infinity",
|
|
503
|
+
showSecondaryBuy: !1,
|
|
504
|
+
debugLabelKey: "Limit modal: emails 300→∞"
|
|
505
|
+
},
|
|
506
|
+
ai_10_50: {
|
|
507
|
+
id: "ai_10_50",
|
|
508
|
+
titleKey: "You have used up your AI generations",
|
|
509
|
+
subtitleKey: "You can add more generations right now; they are billed separately from the generations included in your plan.",
|
|
510
|
+
usageResource: "ai",
|
|
511
|
+
previous: 10,
|
|
512
|
+
next: 50,
|
|
513
|
+
showSecondaryBuy: !1,
|
|
514
|
+
debugLabelKey: "Limit modal: AI 10→50"
|
|
515
|
+
},
|
|
516
|
+
ai_30_150: {
|
|
517
|
+
id: "ai_30_150",
|
|
518
|
+
titleKey: "You have used up your AI generations",
|
|
519
|
+
subtitleKey: "You can add more generations right now; they are billed separately from the generations included in your plan.",
|
|
520
|
+
usageResource: "ai",
|
|
521
|
+
previous: 30,
|
|
522
|
+
next: 150,
|
|
523
|
+
showSecondaryBuy: !1,
|
|
524
|
+
debugLabelKey: "Limit modal: AI 30→150"
|
|
525
|
+
},
|
|
526
|
+
ai_150_inf: {
|
|
527
|
+
id: "ai_150_inf",
|
|
528
|
+
titleKey: "You have used up your AI generations",
|
|
529
|
+
subtitleKey: "You can add more generations right now; they are billed separately from the generations included in your plan.",
|
|
530
|
+
usageResource: "ai",
|
|
531
|
+
previous: 150,
|
|
532
|
+
next: "infinity",
|
|
533
|
+
showSecondaryBuy: !1,
|
|
534
|
+
debugLabelKey: "Limit modal: AI 150→∞"
|
|
535
|
+
},
|
|
536
|
+
optimization_exceeded: {
|
|
537
|
+
id: "optimization_exceeded",
|
|
538
|
+
titleKey: "You have used up your optimisation limit",
|
|
539
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
540
|
+
usageResource: "optimization",
|
|
541
|
+
previous: 0,
|
|
542
|
+
next: "infinity",
|
|
543
|
+
showSecondaryBuy: !1,
|
|
544
|
+
debugLabelKey: "Limit modal: optimization exhausted"
|
|
545
|
+
},
|
|
546
|
+
image_generate_exceeded: {
|
|
547
|
+
id: "image_generate_exceeded",
|
|
548
|
+
titleKey: "You have used up your image generation limit",
|
|
549
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
550
|
+
usageResource: "image_generate",
|
|
551
|
+
previous: 0,
|
|
552
|
+
next: "infinity",
|
|
553
|
+
showSecondaryBuy: !1,
|
|
554
|
+
debugLabelKey: "Limit modal: image_generate exhausted"
|
|
555
|
+
},
|
|
556
|
+
preview_exceeded: {
|
|
557
|
+
id: "preview_exceeded",
|
|
558
|
+
titleKey: "You have used up your preview (test send) limit",
|
|
559
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
560
|
+
usageResource: "preview",
|
|
561
|
+
previous: 0,
|
|
562
|
+
next: "infinity",
|
|
563
|
+
showSecondaryBuy: !1,
|
|
564
|
+
debugLabelKey: "Limit modal: preview exhausted"
|
|
565
|
+
},
|
|
566
|
+
link_check_exceeded: {
|
|
567
|
+
id: "link_check_exceeded",
|
|
568
|
+
titleKey: "You have used up your link check limit",
|
|
569
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
570
|
+
usageResource: "link_check",
|
|
571
|
+
previous: 0,
|
|
572
|
+
next: "infinity",
|
|
573
|
+
showSecondaryBuy: !1,
|
|
574
|
+
debugLabelKey: "Limit modal: link_check exhausted"
|
|
575
|
+
},
|
|
576
|
+
image_check_exceeded: {
|
|
577
|
+
id: "image_check_exceeded",
|
|
578
|
+
titleKey: "You have used up your image check limit",
|
|
579
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
580
|
+
usageResource: "image_check",
|
|
581
|
+
previous: 0,
|
|
582
|
+
next: "infinity",
|
|
583
|
+
showSecondaryBuy: !1,
|
|
584
|
+
debugLabelKey: "Limit modal: image_check exhausted"
|
|
585
|
+
},
|
|
586
|
+
spam_check_exceeded: {
|
|
587
|
+
id: "spam_check_exceeded",
|
|
588
|
+
titleKey: "You have used up your spam check limit",
|
|
589
|
+
subtitleKey: "You can increase the limit by changing your plan or buying an extra package.",
|
|
590
|
+
usageResource: "spam_check",
|
|
591
|
+
previous: 0,
|
|
592
|
+
next: "infinity",
|
|
593
|
+
showSecondaryBuy: !1,
|
|
594
|
+
debugLabelKey: "Limit modal: spam_check exhausted"
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
function U(e) {
|
|
598
|
+
return D[e];
|
|
599
|
+
}
|
|
600
|
+
function z(e) {
|
|
601
|
+
return e === "infinity" ? "∞" : e;
|
|
602
|
+
}
|
|
603
|
+
var G = {
|
|
604
|
+
ai: "ai_150_inf",
|
|
605
|
+
email_generate: "email_300_inf",
|
|
606
|
+
image_generate: "image_generate_exceeded",
|
|
607
|
+
preview: "preview_exceeded",
|
|
608
|
+
link_check: "link_check_exceeded",
|
|
609
|
+
image_check: "image_check_exceeded",
|
|
610
|
+
spam_check: "spam_check_exceeded"
|
|
611
|
+
};
|
|
612
|
+
function C(e) {
|
|
613
|
+
return !e || e.is_unlimited || e.total_limit <= 0 ? !1 : e.remaining <= 0 || e.used >= e.total_limit;
|
|
614
|
+
}
|
|
615
|
+
function S(e, i) {
|
|
616
|
+
return C(i) ? {
|
|
617
|
+
presetId: G[e],
|
|
618
|
+
previousLimit: i?.total_limit ?? 0,
|
|
619
|
+
nextLimit: "infinity"
|
|
620
|
+
} : null;
|
|
621
|
+
}
|
|
622
|
+
function W(e, i) {
|
|
623
|
+
return S(e, i);
|
|
624
|
+
}
|
|
625
|
+
function H(e) {
|
|
626
|
+
for (let i = e.length - 1; i >= 0; i--) {
|
|
627
|
+
const r = e[i];
|
|
628
|
+
if (typeof r == "string" && r) return r;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
function Z(e) {
|
|
632
|
+
for (let i = 0; i < e.length; i++) {
|
|
633
|
+
const r = e[i];
|
|
634
|
+
if (r instanceof Blob) return r;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
function $(e, i) {
|
|
638
|
+
for (let r = e.length - 1; r >= 0; r--) {
|
|
639
|
+
const n = e[r];
|
|
640
|
+
if (typeof n == "string" && n && n !== i) return n;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
var N = (0, u.createContext)(null), Q = (e) => e.includes("UPLOAD_IMAGE_") || e.includes("UPLOAD_BACKGROUND_"), V = ({ children: e }) => {
|
|
644
|
+
const i = l.useDispatch(), r = l.useSelector(k.selectActiveModal), [n, t] = (0, u.useState)(null), c = (0, u.useRef)(null), o = (0, u.useCallback)((s) => {
|
|
645
|
+
c.current?.(s), c.current = null;
|
|
646
|
+
}, []), d = (0, u.useCallback)((s) => (o(null), t(s), i(k.openModal(s.entryModal)), new Promise((p) => {
|
|
647
|
+
c.current = p;
|
|
648
|
+
})), [i, o]);
|
|
649
|
+
(0, u.useEffect)(() => {
|
|
650
|
+
Q(r) || (t(null), c.current && o(null));
|
|
651
|
+
}, [r, o]);
|
|
652
|
+
const g = (0, u.useMemo)(() => ({
|
|
653
|
+
request: n,
|
|
654
|
+
openImagePicker: d,
|
|
655
|
+
resolveImagePicker: o
|
|
656
|
+
}), [
|
|
657
|
+
n,
|
|
658
|
+
d,
|
|
659
|
+
o
|
|
660
|
+
]);
|
|
661
|
+
return (0, a.jsx)(N.Provider, {
|
|
662
|
+
value: g,
|
|
663
|
+
children: e
|
|
664
|
+
});
|
|
665
|
+
}, X = () => {
|
|
666
|
+
const e = (0, u.useContext)(N);
|
|
667
|
+
if (!e) throw new Error("useImagePicker must be used within ImagePickerProvider");
|
|
668
|
+
return e;
|
|
669
|
+
};
|
|
670
|
+
Object.defineProperty(m, "EmIcons", {
|
|
671
|
+
enumerable: !0,
|
|
672
|
+
get: function() {
|
|
673
|
+
return b;
|
|
674
|
+
}
|
|
675
|
+
}), Object.defineProperty(m, "ImagePickerProvider", {
|
|
676
|
+
enumerable: !0,
|
|
677
|
+
get: function() {
|
|
678
|
+
return V;
|
|
679
|
+
}
|
|
680
|
+
}), Object.defineProperty(m, "LIMIT_TYPE_TO_USAGE_CARD_ICON", {
|
|
681
|
+
enumerable: !0,
|
|
682
|
+
get: function() {
|
|
683
|
+
return L;
|
|
684
|
+
}
|
|
685
|
+
}), Object.defineProperty(m, "LimitUpgradeModal", {
|
|
686
|
+
enumerable: !0,
|
|
687
|
+
get: function() {
|
|
688
|
+
return F;
|
|
689
|
+
}
|
|
690
|
+
}), Object.defineProperty(m, "PlanUpgradePrompt", {
|
|
691
|
+
enumerable: !0,
|
|
692
|
+
get: function() {
|
|
693
|
+
return Y;
|
|
694
|
+
}
|
|
695
|
+
}), Object.defineProperty(m, "getLimitUpgradePresetDefinition", {
|
|
696
|
+
enumerable: !0,
|
|
697
|
+
get: function() {
|
|
698
|
+
return U;
|
|
699
|
+
}
|
|
700
|
+
}), Object.defineProperty(m, "getMyProjectRole", {
|
|
701
|
+
enumerable: !0,
|
|
702
|
+
get: function() {
|
|
703
|
+
return x;
|
|
704
|
+
}
|
|
705
|
+
}), Object.defineProperty(m, "isLimitStatsBlockExhausted", {
|
|
706
|
+
enumerable: !0,
|
|
707
|
+
get: function() {
|
|
708
|
+
return C;
|
|
709
|
+
}
|
|
710
|
+
}), Object.defineProperty(m, "isProjectOwner", {
|
|
711
|
+
enumerable: !0,
|
|
712
|
+
get: function() {
|
|
713
|
+
return j;
|
|
714
|
+
}
|
|
715
|
+
}), Object.defineProperty(m, "pickFileProxyBlobFromFireResults", {
|
|
716
|
+
enumerable: !0,
|
|
717
|
+
get: function() {
|
|
718
|
+
return Z;
|
|
719
|
+
}
|
|
720
|
+
}), Object.defineProperty(m, "pickProxyUrlOverrideFromFireResults", {
|
|
721
|
+
enumerable: !0,
|
|
722
|
+
get: function() {
|
|
723
|
+
return $;
|
|
724
|
+
}
|
|
725
|
+
}), Object.defineProperty(m, "pickUploadImageUrlFromFireResults", {
|
|
726
|
+
enumerable: !0,
|
|
727
|
+
get: function() {
|
|
728
|
+
return H;
|
|
729
|
+
}
|
|
730
|
+
}), Object.defineProperty(m, "presetLimitDisplay", {
|
|
731
|
+
enumerable: !0,
|
|
732
|
+
get: function() {
|
|
733
|
+
return z;
|
|
734
|
+
}
|
|
735
|
+
}), Object.defineProperty(m, "resolveLimitActionPreflightExceeded", {
|
|
736
|
+
enumerable: !0,
|
|
737
|
+
get: function() {
|
|
738
|
+
return S;
|
|
739
|
+
}
|
|
740
|
+
}), Object.defineProperty(m, "resolveLimitActionPreflightExceededForType", {
|
|
741
|
+
enumerable: !0,
|
|
742
|
+
get: function() {
|
|
743
|
+
return W;
|
|
744
|
+
}
|
|
745
|
+
}), Object.defineProperty(m, "sanitizeHtml", {
|
|
746
|
+
enumerable: !0,
|
|
747
|
+
get: function() {
|
|
748
|
+
return w;
|
|
749
|
+
}
|
|
750
|
+
}), Object.defineProperty(m, "useCookieManager", {
|
|
751
|
+
enumerable: !0,
|
|
752
|
+
get: function() {
|
|
753
|
+
return P;
|
|
754
|
+
}
|
|
755
|
+
}), Object.defineProperty(m, "useImagePicker", {
|
|
756
|
+
enumerable: !0,
|
|
757
|
+
get: function() {
|
|
758
|
+
return X;
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
});
|