ghost 5.93.0 → 5.94.0
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/components/{tryghost-adapter-cache-memory-ttl-5.93.0.tgz → tryghost-adapter-cache-memory-ttl-5.94.0.tgz} +0 -0
- package/components/tryghost-adapter-cache-redis-5.94.0.tgz +0 -0
- package/components/{tryghost-adapter-manager-5.93.0.tgz → tryghost-adapter-manager-5.94.0.tgz} +0 -0
- package/components/{tryghost-announcement-bar-settings-5.93.0.tgz → tryghost-announcement-bar-settings-5.94.0.tgz} +0 -0
- package/components/{tryghost-api-framework-5.93.0.tgz → tryghost-api-framework-5.94.0.tgz} +0 -0
- package/components/{tryghost-api-version-compatibility-service-5.93.0.tgz → tryghost-api-version-compatibility-service-5.94.0.tgz} +0 -0
- package/components/tryghost-audience-feedback-5.94.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.94.0.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.93.0.tgz → tryghost-bootstrap-socket-5.94.0.tgz} +0 -0
- package/components/{tryghost-collections-5.93.0.tgz → tryghost-collections-5.94.0.tgz} +0 -0
- package/components/tryghost-constants-5.94.0.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.93.0.tgz → tryghost-custom-theme-settings-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-data-generator-5.93.0.tgz → tryghost-data-generator-5.94.0.tgz} +0 -0
- package/components/{tryghost-domain-events-5.93.0.tgz → tryghost-domain-events-5.94.0.tgz} +0 -0
- package/components/tryghost-donations-5.94.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.94.0.tgz +0 -0
- package/components/{tryghost-email-addresses-5.93.0.tgz → tryghost-email-addresses-5.94.0.tgz} +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.94.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.94.0.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.93.0.tgz → tryghost-email-content-generator-5.94.0.tgz} +0 -0
- package/components/tryghost-email-events-5.94.0.tgz +0 -0
- package/components/tryghost-email-service-5.94.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.94.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.94.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.94.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.94.0.tgz +0 -0
- package/components/tryghost-ghost-5.94.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.94.0.tgz +0 -0
- package/components/tryghost-i18n-5.94.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.94.0.tgz +0 -0
- package/components/{tryghost-importer-revue-5.93.0.tgz → tryghost-importer-revue-5.94.0.tgz} +0 -0
- package/components/tryghost-in-memory-repository-5.94.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.93.0.tgz → tryghost-job-manager-5.94.0.tgz} +0 -0
- package/components/{tryghost-link-redirects-5.93.0.tgz → tryghost-link-redirects-5.94.0.tgz} +0 -0
- package/components/tryghost-link-replacer-5.94.0.tgz +0 -0
- package/components/{tryghost-link-tracking-5.93.0.tgz → tryghost-link-tracking-5.94.0.tgz} +0 -0
- package/components/{tryghost-magic-link-5.93.0.tgz → tryghost-magic-link-5.94.0.tgz} +0 -0
- package/components/{tryghost-mail-events-5.93.0.tgz → tryghost-mail-events-5.94.0.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.94.0.tgz +0 -0
- package/components/{tryghost-member-attribution-5.93.0.tgz → tryghost-member-attribution-5.94.0.tgz} +0 -0
- package/components/{tryghost-member-events-5.93.0.tgz → tryghost-member-events-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-api-5.93.0.tgz → tryghost-members-api-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-csv-5.93.0.tgz → tryghost-members-csv-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-events-service-5.93.0.tgz → tryghost-members-events-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-importer-5.93.0.tgz → tryghost-members-importer-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-offers-5.93.0.tgz → tryghost-members-offers-5.94.0.tgz} +0 -0
- package/components/tryghost-members-payments-5.94.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.93.0.tgz → tryghost-members-ssr-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-stripe-service-5.93.0.tgz → tryghost-members-stripe-service-5.94.0.tgz} +0 -0
- package/components/tryghost-mentions-email-report-5.94.0.tgz +0 -0
- package/components/{tryghost-milestones-5.93.0.tgz → tryghost-milestones-5.94.0.tgz} +0 -0
- package/components/tryghost-minifier-5.94.0.tgz +0 -0
- package/components/{tryghost-model-to-domain-event-interceptor-5.93.0.tgz → tryghost-model-to-domain-event-interceptor-5.94.0.tgz} +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.94.0.tgz +0 -0
- package/components/{tryghost-mw-cache-control-5.93.0.tgz → tryghost-mw-cache-control-5.94.0.tgz} +0 -0
- package/components/tryghost-mw-error-handler-5.94.0.tgz +0 -0
- package/components/{tryghost-mw-session-from-token-5.93.0.tgz → tryghost-mw-session-from-token-5.94.0.tgz} +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.94.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.94.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.94.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.94.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.94.0.tgz +0 -0
- package/components/tryghost-package-json-5.94.0.tgz +0 -0
- package/components/{tryghost-post-events-5.93.0.tgz → tryghost-post-events-5.94.0.tgz} +0 -0
- package/components/{tryghost-post-revisions-5.93.0.tgz → tryghost-post-revisions-5.94.0.tgz} +0 -0
- package/components/{tryghost-posts-service-5.93.0.tgz → tryghost-posts-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-recommendations-5.93.0.tgz → tryghost-recommendations-5.94.0.tgz} +0 -0
- package/components/{tryghost-referrers-5.93.0.tgz → tryghost-referrers-5.94.0.tgz} +0 -0
- package/components/{tryghost-security-5.93.0.tgz → tryghost-security-5.94.0.tgz} +0 -0
- package/components/tryghost-session-service-5.94.0.tgz +0 -0
- package/components/{tryghost-settings-path-manager-5.93.0.tgz → tryghost-settings-path-manager-5.94.0.tgz} +0 -0
- package/components/tryghost-slack-notifications-5.94.0.tgz +0 -0
- package/components/{tryghost-staff-service-5.93.0.tgz → tryghost-staff-service-5.94.0.tgz} +0 -0
- package/components/tryghost-stats-service-5.94.0.tgz +0 -0
- package/components/tryghost-tiers-5.94.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.94.0.tgz +0 -0
- package/components/{tryghost-verification-trigger-5.93.0.tgz → tryghost-verification-trigger-5.94.0.tgz} +0 -0
- package/components/{tryghost-version-notifications-data-service-5.93.0.tgz → tryghost-version-notifications-data-service-5.94.0.tgz} +0 -0
- package/components/tryghost-webmentions-5.94.0.tgz +0 -0
- package/core/app.js +22 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-5eac6af1.mjs → index-51277f76.mjs} +3000 -2661
- package/core/built/admin/assets/admin-x-activitypub/modals-c85985ad.mjs +815 -0
- package/core/built/admin/assets/{chunk.524.b8e3b4aa87fcd581b137.js → chunk.524.b9da8e9c62fc112baf2b.js} +5 -5
- package/core/built/admin/assets/{chunk.582.a3c9ecefa2618454961c.js → chunk.582.27ddbcbd7a6e7a439db8.js} +6 -6
- package/core/built/admin/assets/{chunk.217.2bd17b550359ea58831b.js → chunk.785.78610bd253a9e2419ec9.js} +27 -20
- package/core/built/admin/assets/{ghost-9767eb06282ff32f4c204945b30f2ee5.js → ghost-535088daf62c8cbea78a012bb6bbafc6.js} +866 -827
- package/core/built/admin/assets/ghost-d1c51d3a2d840dda5aa7b4ffe6057756.css +1 -0
- package/core/built/admin/assets/ghost-dark-98b3a7e593292a7cb410609e17727a3c.css +1 -0
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +201 -194
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +25 -25
- package/core/built/admin/assets/{vendor-bff75d127fcf4a75c8a83b473bdb308f.js → vendor-649dc64bfd9ecc1bd7361b53680dfdc2.js} +19 -17
- package/core/built/admin/index.html +6 -6
- package/core/server/data/migrations/versions/5.94/2024-09-03-20-09-40-null-analytics-jobs-timings.js +20 -0
- package/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js +49 -11
- package/core/server/services/email-analytics/lib/queries.js +154 -30
- package/core/server/services/oembed/service.js +2 -1
- package/package.json +150 -150
- package/yarn.lock +38 -38
- package/components/tryghost-adapter-cache-redis-5.93.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.93.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.93.0.tgz +0 -0
- package/components/tryghost-constants-5.93.0.tgz +0 -0
- package/components/tryghost-donations-5.93.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.93.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.93.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.93.0.tgz +0 -0
- package/components/tryghost-email-events-5.93.0.tgz +0 -0
- package/components/tryghost-email-service-5.93.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.93.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.93.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.93.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.93.0.tgz +0 -0
- package/components/tryghost-ghost-5.93.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.93.0.tgz +0 -0
- package/components/tryghost-i18n-5.93.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.93.0.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.93.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.93.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.93.0.tgz +0 -0
- package/components/tryghost-members-payments-5.93.0.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.93.0.tgz +0 -0
- package/components/tryghost-minifier-5.93.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.93.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.93.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.93.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.93.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.93.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.93.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.93.0.tgz +0 -0
- package/components/tryghost-package-json-5.93.0.tgz +0 -0
- package/components/tryghost-session-service-5.93.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.93.0.tgz +0 -0
- package/components/tryghost-stats-service-5.93.0.tgz +0 -0
- package/components/tryghost-tiers-5.93.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.93.0.tgz +0 -0
- package/components/tryghost-webmentions-5.93.0.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/modals-62a088d9.mjs +0 -965
- package/core/built/admin/assets/ghost-8c20f019d522f17d318e799568924958.css +0 -1
- package/core/built/admin/assets/ghost-dark-b27530aaada81101d641ff1ca5f5df6b.css +0 -1
- /package/core/built/admin/assets/{chunk.217.2bd17b550359ea58831b.js.LICENSE.txt → chunk.785.78610bd253a9e2419ec9.js.LICENSE.txt} +0 -0
|
@@ -7,7 +7,7 @@ import dj, { createPortal as hj } from "react-dom";
|
|
|
7
7
|
(function() {
|
|
8
8
|
try {
|
|
9
9
|
var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, e = new Error().stack;
|
|
10
|
-
e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "
|
|
10
|
+
e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "bce9c4fc-f97a-4a3d-9b4b-4a3277a2ce17", t._sentryDebugIdIdentifier = "sentry-dbid-bce9c4fc-f97a-4a3d-9b4b-4a3277a2ce17");
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
})();
|
|
@@ -2636,15 +2636,15 @@ function ef(t, e) {
|
|
|
2636
2636
|
let Tt = L.anchorNode, Lt = L.focusNode, Fe = L.anchorOffset, De = L.focusOffset, oe = document.activeElement;
|
|
2637
2637
|
if (!(M.has("collaboration") && oe !== i || oe !== null && z6(oe)))
|
|
2638
2638
|
if (kt(a)) {
|
|
2639
|
-
var Z = a.anchor, G = a.focus, H = Z.key, R = G.key, q = By(t, H), V = By(t, R), K = Z.offset, te = G.offset, se = a.format, fe = a.style, U = a.isCollapsed(), F = q, ae = V,
|
|
2639
|
+
var Z = a.anchor, G = a.focus, H = Z.key, R = G.key, q = By(t, H), V = By(t, R), K = Z.offset, te = G.offset, se = a.format, fe = a.style, U = a.isCollapsed(), F = q, ae = V, ue = !1;
|
|
2640
2640
|
if (Z.type === "text") {
|
|
2641
2641
|
F = Ry(q);
|
|
2642
2642
|
let Re = Z.getNode();
|
|
2643
|
-
|
|
2643
|
+
ue = Re.getFormat() !== se || Re.getStyle() !== fe;
|
|
2644
2644
|
} else
|
|
2645
|
-
kt(o) && o.anchor.type === "text" && (
|
|
2645
|
+
kt(o) && o.anchor.type === "text" && (ue = !0);
|
|
2646
2646
|
if (G.type === "text" && (ae = Ry(V)), F !== null && ae !== null) {
|
|
2647
|
-
if (U && (o === null ||
|
|
2647
|
+
if (U && (o === null || ue || kt(o) && (o.format !== se || o.style !== fe))) {
|
|
2648
2648
|
var ve = performance.now();
|
|
2649
2649
|
wF = [se, fe, K, H, ve];
|
|
2650
2650
|
}
|
|
@@ -7303,13 +7303,13 @@ function Bo() {
|
|
|
7303
7303
|
return K;
|
|
7304
7304
|
const te = this.options.loose, se = te ? l[u.HYPHENRANGELOOSE] : l[u.HYPHENRANGE];
|
|
7305
7305
|
R = R.replace(se, Z(this.options.includePrerelease)), o("hyphen replace", R), R = R.replace(l[u.COMPARATORTRIM], f), o("comparator trim", R), R = R.replace(l[u.TILDETRIM], d), o("tilde trim", R), R = R.replace(l[u.CARETTRIM], h), o("caret trim", R);
|
|
7306
|
-
let fe = R.split(" ").map((
|
|
7307
|
-
te && (fe = fe.filter((
|
|
7308
|
-
const U = /* @__PURE__ */ new Map(), F = fe.map((
|
|
7309
|
-
for (const
|
|
7310
|
-
if (k(
|
|
7311
|
-
return [
|
|
7312
|
-
U.set(
|
|
7306
|
+
let fe = R.split(" ").map((ue) => S(ue, this.options)).join(" ").split(/\s+/).map((ue) => L(ue, this.options));
|
|
7307
|
+
te && (fe = fe.filter((ue) => (o("loose invalid filter", ue, this.options), !!ue.match(l[u.COMPARATORLOOSE])))), o("range list", fe);
|
|
7308
|
+
const U = /* @__PURE__ */ new Map(), F = fe.map((ue) => new s(ue, this.options));
|
|
7309
|
+
for (const ue of F) {
|
|
7310
|
+
if (k(ue))
|
|
7311
|
+
return [ue];
|
|
7312
|
+
U.set(ue.value, ue);
|
|
7313
7313
|
}
|
|
7314
7314
|
U.size > 1 && U.has("") && U.delete("");
|
|
7315
7315
|
const ae = [...U.values()];
|
|
@@ -7370,10 +7370,10 @@ function Bo() {
|
|
|
7370
7370
|
const q = R.loose ? l[u.XRANGELOOSE] : l[u.XRANGE];
|
|
7371
7371
|
return H.replace(q, (V, K, te, se, fe, U) => {
|
|
7372
7372
|
o("xRange", H, V, K, te, se, fe, U);
|
|
7373
|
-
const F = C(te), ae = F || C(se),
|
|
7374
|
-
return K === "=" && ve && (K = ""), U = R.includePrerelease ? "-0" : "", F ? K === ">" || K === "<" ? V = "<0.0.0-0" : V = "*" : K && ve ? (ae && (se = 0), fe = 0, K === ">" ? (K = ">=", ae ? (te = +te + 1, se = 0, fe = 0) : (se = +se + 1, fe = 0)) : K === "<=" && (K = "<", ae ? te = +te + 1 : se = +se + 1), K === "<" && (U = "-0"), V = `${K + te}.${se}.${fe}${U}`) : ae ? V = `>=${te}.0.0${U} <${+te + 1}.0.0-0` :
|
|
7373
|
+
const F = C(te), ae = F || C(se), ue = ae || C(fe), ve = ue;
|
|
7374
|
+
return K === "=" && ve && (K = ""), U = R.includePrerelease ? "-0" : "", F ? K === ">" || K === "<" ? V = "<0.0.0-0" : V = "*" : K && ve ? (ae && (se = 0), fe = 0, K === ">" ? (K = ">=", ae ? (te = +te + 1, se = 0, fe = 0) : (se = +se + 1, fe = 0)) : K === "<=" && (K = "<", ae ? te = +te + 1 : se = +se + 1), K === "<" && (U = "-0"), V = `${K + te}.${se}.${fe}${U}`) : ae ? V = `>=${te}.0.0${U} <${+te + 1}.0.0-0` : ue && (V = `>=${te}.${se}.0${U} <${te}.${+se + 1}.0-0`), o("xRange return", V), V;
|
|
7375
7375
|
});
|
|
7376
|
-
}, Q = (H, R) => (o("replaceStars", H, R), H.trim().replace(l[u.STAR], "")), L = (H, R) => (o("replaceGTE0", H, R), H.trim().replace(l[R.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Z = (H) => (R, q, V, K, te, se, fe, U, F, ae,
|
|
7376
|
+
}, Q = (H, R) => (o("replaceStars", H, R), H.trim().replace(l[u.STAR], "")), L = (H, R) => (o("replaceGTE0", H, R), H.trim().replace(l[R.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Z = (H) => (R, q, V, K, te, se, fe, U, F, ae, ue, ve) => (C(V) ? q = "" : C(K) ? q = `>=${V}.0.0${H ? "-0" : ""}` : C(te) ? q = `>=${V}.${K}.0${H ? "-0" : ""}` : se ? q = `>=${q}` : q = `>=${q}${H ? "-0" : ""}`, C(F) ? U = "" : C(ae) ? U = `<${+F + 1}.0.0-0` : C(ue) ? U = `<${F}.${+ae + 1}.0-0` : ve ? U = `<=${F}.${ae}.${ue}-${ve}` : H ? U = `<${F}.${ae}.${+ue + 1}-0` : U = `<=${U}`, `${q} ${U}`.trim()), G = (H, R, q) => {
|
|
7377
7377
|
for (let V = 0; V < H.length; V++)
|
|
7378
7378
|
if (!H[V].test(R))
|
|
7379
7379
|
return !1;
|
|
@@ -16081,7 +16081,7 @@ function ui({
|
|
|
16081
16081
|
static get urlTransformMap() {
|
|
16082
16082
|
let s = {};
|
|
16083
16083
|
return e.forEach((o) => {
|
|
16084
|
-
o.urlType && (s[o.name] = o.urlType);
|
|
16084
|
+
o.urlType && (o.urlPath ? s[o.urlPath] = o.urlType : s[o.name] = o.urlType);
|
|
16085
16085
|
}), s;
|
|
16086
16086
|
}
|
|
16087
16087
|
/**
|
|
@@ -17762,10 +17762,12 @@ let p1 = class extends ui({
|
|
|
17762
17762
|
default: ""
|
|
17763
17763
|
}, {
|
|
17764
17764
|
name: "icon",
|
|
17765
|
+
urlPath: "metadata.icon",
|
|
17765
17766
|
default: "",
|
|
17766
17767
|
urlType: "url"
|
|
17767
17768
|
}, {
|
|
17768
17769
|
name: "thumbnail",
|
|
17770
|
+
urlPath: "metadata.thumbnail",
|
|
17769
17771
|
default: "",
|
|
17770
17772
|
urlType: "url"
|
|
17771
17773
|
}]
|
|
@@ -30713,10 +30715,10 @@ function Fye(t) {
|
|
|
30713
30715
|
} else {
|
|
30714
30716
|
let se = a.pos - H;
|
|
30715
30717
|
a.next();
|
|
30716
|
-
let fe = [], U = [], F = L >= o ? L : -1, ae = 0,
|
|
30718
|
+
let fe = [], U = [], F = L >= o ? L : -1, ae = 0, ue = G;
|
|
30717
30719
|
for (; a.pos > se; )
|
|
30718
|
-
F >= 0 && a.id == F && a.size >= 0 ? (a.end <=
|
|
30719
|
-
if (F >= 0 && ae > 0 && ae < fe.length && g(fe, U, Z, ae, Z,
|
|
30720
|
+
F >= 0 && a.id == F && a.size >= 0 ? (a.end <= ue - r && (g(fe, U, Z, ae, a.end, ue, F, R), ae = fe.length, ue = a.end), a.next()) : Q > 2500 ? h(Z, se, fe, U) : d(Z, se, fe, U, F, Q + 1);
|
|
30721
|
+
if (F >= 0 && ae > 0 && ae < fe.length && g(fe, U, Z, ae, Z, ue, F, R), fe.reverse(), U.reverse(), F > -1 && ae > 0) {
|
|
30720
30722
|
let ve = m(q);
|
|
30721
30723
|
V = nE(q, fe, U, 0, fe.length, 0, G - Z, ve, ve);
|
|
30722
30724
|
} else
|
|
@@ -86882,7 +86884,7 @@ function yq() {
|
|
|
86882
86884
|
const U = Rt({}, [...jD, ...aO, ...lO, ...uO, ...FD]);
|
|
86883
86885
|
let F = null;
|
|
86884
86886
|
const ae = Rt({}, [...BD, ...cO, ...zD, ...Sb]);
|
|
86885
|
-
let
|
|
86887
|
+
let ue = Object.seal(gq(null, {
|
|
86886
86888
|
tagNameCheck: {
|
|
86887
86889
|
writable: !0,
|
|
86888
86890
|
configurable: !1,
|
|
@@ -86934,7 +86936,7 @@ function yq() {
|
|
|
86934
86936
|
// eslint-disable-line indent
|
|
86935
86937
|
$t
|
|
86936
86938
|
// eslint-disable-line indent
|
|
86937
|
-
) : Ha, Dt = Co(ie, "FORBID_CONTENTS") ? Rt({}, ie.FORBID_CONTENTS, $t) : ti, ve = Co(ie, "FORBID_TAGS") ? Rt({}, ie.FORBID_TAGS, $t) : {}, Qe = Co(ie, "FORBID_ATTR") ? Rt({}, ie.FORBID_ATTR, $t) : {}, Ln = Co(ie, "USE_PROFILES") ? ie.USE_PROFILES : !1, Xe = ie.ALLOW_ARIA_ATTR !== !1, rt = ie.ALLOW_DATA_ATTR !== !1, _t = ie.ALLOW_UNKNOWN_PROTOCOLS || !1, qe = ie.ALLOW_SELF_CLOSE_IN_ATTR !== !1, lt = ie.SAFE_FOR_TEMPLATES || !1, mt = ie.SAFE_FOR_XML !== !1, Pt = ie.WHOLE_DOCUMENT || !1, Le = ie.RETURN_DOM || !1, Tt = ie.RETURN_DOM_FRAGMENT || !1, Lt = ie.RETURN_TRUSTED_TYPE || !1, tn = ie.FORCE_BODY || !1, Fe = ie.SANITIZE_DOM !== !1, De = ie.SANITIZE_NAMED_PROPS || !1, Re = ie.KEEP_CONTENT !== !1, Wt = ie.IN_PLACE || !1, se = ie.ALLOWED_URI_REGEXP || vq, Us = ie.NAMESPACE || $r,
|
|
86939
|
+
) : Ha, Dt = Co(ie, "FORBID_CONTENTS") ? Rt({}, ie.FORBID_CONTENTS, $t) : ti, ve = Co(ie, "FORBID_TAGS") ? Rt({}, ie.FORBID_TAGS, $t) : {}, Qe = Co(ie, "FORBID_ATTR") ? Rt({}, ie.FORBID_ATTR, $t) : {}, Ln = Co(ie, "USE_PROFILES") ? ie.USE_PROFILES : !1, Xe = ie.ALLOW_ARIA_ATTR !== !1, rt = ie.ALLOW_DATA_ATTR !== !1, _t = ie.ALLOW_UNKNOWN_PROTOCOLS || !1, qe = ie.ALLOW_SELF_CLOSE_IN_ATTR !== !1, lt = ie.SAFE_FOR_TEMPLATES || !1, mt = ie.SAFE_FOR_XML !== !1, Pt = ie.WHOLE_DOCUMENT || !1, Le = ie.RETURN_DOM || !1, Tt = ie.RETURN_DOM_FRAGMENT || !1, Lt = ie.RETURN_TRUSTED_TYPE || !1, tn = ie.FORCE_BODY || !1, Fe = ie.SANITIZE_DOM !== !1, De = ie.SANITIZE_NAMED_PROPS || !1, Re = ie.KEEP_CONTENT !== !1, Wt = ie.IN_PLACE || !1, se = ie.ALLOWED_URI_REGEXP || vq, Us = ie.NAMESPACE || $r, ue = ie.CUSTOM_ELEMENT_HANDLING || {}, ie.CUSTOM_ELEMENT_HANDLING && Nr(ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (ue.tagNameCheck = ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck), ie.CUSTOM_ELEMENT_HANDLING && Nr(ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (ue.attributeNameCheck = ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), ie.CUSTOM_ELEMENT_HANDLING && typeof ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), lt && (rt = !1), Tt && (Le = !0), Ln && (fe = Rt({}, FD), F = [], Ln.html === !0 && (Rt(fe, jD), Rt(F, BD)), Ln.svg === !0 && (Rt(fe, aO), Rt(F, cO), Rt(F, Sb)), Ln.svgFilters === !0 && (Rt(fe, lO), Rt(F, cO), Rt(F, Sb)), Ln.mathMl === !0 && (Rt(fe, uO), Rt(F, zD), Rt(F, Sb))), ie.ADD_TAGS && (fe === U && (fe = Pc(fe)), Rt(fe, ie.ADD_TAGS, $t)), ie.ADD_ATTR && (F === ae && (F = Pc(F)), Rt(F, ie.ADD_ATTR, $t)), ie.ADD_URI_SAFE_ATTR && Rt(Zo, ie.ADD_URI_SAFE_ATTR, $t), ie.FORBID_CONTENTS && (Dt === ti && (Dt = Pc(Dt)), Rt(Dt, ie.FORBID_CONTENTS, $t)), Re && (fe["#text"] = !0), Pt && Rt(fe, ["html", "head", "body"]), fe.table && (Rt(fe, ["tbody"]), delete ve.tbody), ie.TRUSTED_TYPES_POLICY) {
|
|
86938
86940
|
if (typeof ie.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
86939
86941
|
throw Em('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
86940
86942
|
if (typeof ie.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -87035,7 +87037,7 @@ function yq() {
|
|
|
87035
87037
|
}), ie.hasChildNodes() && !Hf(ie.firstElementChild) && Rr(/<[/\w]/g, ie.innerHTML) && Rr(/<[/\w]/g, ie.textContent) || ie.nodeType === $m.progressingInstruction || mt && ie.nodeType === $m.comment && Rr(/<[/\w]/g, ie.data))
|
|
87036
87038
|
return qs(ie), !0;
|
|
87037
87039
|
if (!fe[ze] || ve[ze]) {
|
|
87038
|
-
if (!ve[ze] && J1(ze) && (
|
|
87040
|
+
if (!ve[ze] && J1(ze) && (ue.tagNameCheck instanceof RegExp && Rr(ue.tagNameCheck, ze) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(ze)))
|
|
87039
87041
|
return !1;
|
|
87040
87042
|
if (Re && !Dt[ze]) {
|
|
87041
87043
|
const Ht = C(ie) || ie.parentNode, Di = S(ie) || ie.childNodes;
|
|
@@ -87064,9 +87066,9 @@ function yq() {
|
|
|
87064
87066
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
87065
87067
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
87066
87068
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
87067
|
-
!(J1(ie) && (
|
|
87069
|
+
!(J1(ie) && (ue.tagNameCheck instanceof RegExp && Rr(ue.tagNameCheck, ie) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(ie)) && (ue.attributeNameCheck instanceof RegExp && Rr(ue.attributeNameCheck, xe) || ue.attributeNameCheck instanceof Function && ue.attributeNameCheck(xe)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
87068
87070
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
87069
|
-
xe === "is" &&
|
|
87071
|
+
xe === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && Rr(ue.tagNameCheck, ze) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(ze)))
|
|
87070
87072
|
)
|
|
87071
87073
|
return !1;
|
|
87072
87074
|
} else if (!Zo[xe]) {
|
|
@@ -89505,10 +89507,10 @@ function JEe({ nodeKey: t, initialFile: e, src: n, altText: i, captionEditor: r,
|
|
|
89505
89507
|
const [u] = _e.useLexicalComposerContext(), [f, d] = j.useState(!1), { fileUploader: h, cardConfig: m } = j.useContext(ct), { isSelected: g, cardWidth: k, setCardWidth: x } = j.useContext(Dn), _ = j.useRef(), S = j.useRef(), [C, E] = j.useState(!1), M = h.useFileUpload("image"), T = Ea({ handleDrop: K }), I = j.useCallback((se) => se.type === "card" && se.cardName === "image" && se.nodeKey !== t, [t]), z = j.useCallback((se) => {
|
|
89506
89508
|
const { type: fe, cardName: U, nodeKey: F, dataset: ae } = se;
|
|
89507
89509
|
fe === "card" && U === "image" && F && ae && u.update(() => {
|
|
89508
|
-
const
|
|
89510
|
+
const ue = N.$getNodeByKey(t), ve = N.$getNodeByKey(F), Qe = Fq();
|
|
89509
89511
|
ae.fileName = (ae == null ? void 0 : ae.fileName) || $C(ae.src);
|
|
89510
|
-
const Xe =
|
|
89511
|
-
Xe.fileName = (Xe == null ? void 0 : Xe.fileName) || $C(Xe.src), Qe.addImages([Xe, ae]),
|
|
89512
|
+
const Xe = ue.getDataset();
|
|
89513
|
+
Xe.fileName = (Xe == null ? void 0 : Xe.fileName) || $C(Xe.src), Qe.addImages([Xe, ae]), ue.replace(Qe), ve.remove();
|
|
89512
89514
|
});
|
|
89513
89515
|
}, [u, t]), W = gCe({
|
|
89514
89516
|
canDrop: I,
|
|
@@ -89523,17 +89525,22 @@ function JEe({ nodeKey: t, initialFile: e, src: n, altText: i, captionEditor: r,
|
|
|
89523
89525
|
se && await Jm([U], t, u, M.upload);
|
|
89524
89526
|
})(), () => se = !1;
|
|
89525
89527
|
}, [u, M.isLoading, M.upload, t, n]), j.useEffect(() => {
|
|
89526
|
-
(async (
|
|
89527
|
-
|
|
89528
|
-
})(e)
|
|
89528
|
+
(async (F) => {
|
|
89529
|
+
F && !n && await Jm([F], t, u, M.upload);
|
|
89530
|
+
})(e);
|
|
89531
|
+
const fe = async () => {
|
|
89529
89532
|
if (n && !e && !o) {
|
|
89530
|
-
const { width:
|
|
89533
|
+
const { width: F, height: ae } = await rp(n);
|
|
89531
89534
|
u.update(() => {
|
|
89532
|
-
const
|
|
89533
|
-
|
|
89535
|
+
const ue = N.$getNodeByKey(t);
|
|
89536
|
+
ue.width = F, ue.height = ae;
|
|
89534
89537
|
});
|
|
89535
89538
|
}
|
|
89536
|
-
}
|
|
89539
|
+
};
|
|
89540
|
+
u.getEditorState().read(() => {
|
|
89541
|
+
const F = N.$getNodeByKey(t);
|
|
89542
|
+
return !F.width || !F.height;
|
|
89543
|
+
}) && fe();
|
|
89537
89544
|
}, []);
|
|
89538
89545
|
const Z = async (se) => {
|
|
89539
89546
|
const fe = se.target.files;
|
|
@@ -89884,13 +89891,13 @@ const lTe = 540, uTe = 940, cTe = ({ onGifInsert: t, onClickOutside: e, updateSe
|
|
|
89884
89891
|
K ? m(K) : _();
|
|
89885
89892
|
}
|
|
89886
89893
|
function I(K) {
|
|
89887
|
-
var
|
|
89894
|
+
var ue;
|
|
89888
89895
|
const se = document.querySelector(`[data-tenor-index="${h.index}"]`).getBoundingClientRect();
|
|
89889
89896
|
let fe;
|
|
89890
89897
|
K === "left" ? fe = se.left - se.width / 2 : fe = se.right + se.width / 2;
|
|
89891
89898
|
let U = se.top + se.height / 3, F, ae = 0;
|
|
89892
89899
|
for (; !F; ) {
|
|
89893
|
-
let ve = (
|
|
89900
|
+
let ve = (ue = document.elementFromPoint(fe, U)) == null ? void 0 : ue.closest("[data-tenor-index]");
|
|
89894
89901
|
if ((ve == null ? void 0 : ve.dataset.tenorIndex) !== void 0) {
|
|
89895
89902
|
F = ve;
|
|
89896
89903
|
break;
|
|
@@ -98353,8 +98360,8 @@ var In = {}, vi = {}, dV = { exports: {} };
|
|
|
98353
98360
|
K = K.next, ae += K.value.length;
|
|
98354
98361
|
if (ae -= K.value.length, te = ae, K.value instanceof l)
|
|
98355
98362
|
continue;
|
|
98356
|
-
for (var
|
|
98357
|
-
fe++, ae +=
|
|
98363
|
+
for (var ue = K; ue !== C.tail && (ae < F || typeof ue.value == "string"); ue = ue.next)
|
|
98364
|
+
fe++, ae += ue.value.length;
|
|
98358
98365
|
fe--, se = S.slice(te, ae), U.index -= te;
|
|
98359
98366
|
} else if (U = u(V, 0, se, G), !U)
|
|
98360
98367
|
continue;
|
|
@@ -107177,7 +107184,7 @@ function oG({
|
|
|
107177
107184
|
handleButtonUrl: fe,
|
|
107178
107185
|
setFileInputRef: U
|
|
107179
107186
|
}) {
|
|
107180
|
-
const [F, ae] = wt(!1), [
|
|
107187
|
+
const [F, ae] = wt(!1), [ue, ve] = wt(!1), Qe = (oe) => oe === "transparent" ? "" : nG(Yt(oe)).hex(), Xe = ({ r: oe, g: Re, b: Wt, a: Ln }) => {
|
|
107181
107188
|
const Dt = Ln / 255;
|
|
107182
107189
|
return Tg({
|
|
107183
107190
|
r: oe * Dt + 255 * (1 - Dt),
|
|
@@ -107516,7 +107523,7 @@ function oG({
|
|
|
107516
107523
|
{
|
|
107517
107524
|
dataTestId: "header-button-color",
|
|
107518
107525
|
eyedropper: z === "split",
|
|
107519
|
-
isExpanded:
|
|
107526
|
+
isExpanded: ue,
|
|
107520
107527
|
label: "Button Color",
|
|
107521
107528
|
swatches: [
|
|
107522
107529
|
{ title: "White", hex: "#ffffff" },
|
|
@@ -107643,12 +107650,12 @@ function DPe({
|
|
|
107643
107650
|
});
|
|
107644
107651
|
}, ae = (oe) => {
|
|
107645
107652
|
oe.preventDefault(), oe.stopPropagation(), T.dispatchCommand(co, { cardKey: d, focusEditor: !1 });
|
|
107646
|
-
},
|
|
107653
|
+
}, ue = z.useFileUpload("image"), ve = async (oe) => {
|
|
107647
107654
|
T.update(() => {
|
|
107648
107655
|
const Dt = N.$getNodeByKey(d);
|
|
107649
107656
|
Dt.backgroundImageSrc = "";
|
|
107650
107657
|
});
|
|
107651
|
-
const { imageSrc: Re, width: Wt, height: Ln } = await VE(oe,
|
|
107658
|
+
const { imageSrc: Re, width: Wt, height: Ln } = await VE(oe, ue.upload);
|
|
107652
107659
|
T.update(() => {
|
|
107653
107660
|
const Dt = N.$getNodeByKey(d);
|
|
107654
107661
|
Dt.backgroundImageSrc = Re, Dt.backgroundImageWidth = Wt, Dt.backgroundImageHeight = Ln;
|
|
@@ -107736,7 +107743,7 @@ function DPe({
|
|
|
107736
107743
|
buttonText: a,
|
|
107737
107744
|
buttonTextColor: l,
|
|
107738
107745
|
buttonUrl: u,
|
|
107739
|
-
fileUploader:
|
|
107746
|
+
fileUploader: ue,
|
|
107740
107747
|
handleAlignment: U,
|
|
107741
107748
|
handleBackgroundColor: Yt,
|
|
107742
107749
|
handleBackgroundSize: F,
|
|
@@ -109303,9 +109310,9 @@ var gG = { exports: {} };
|
|
|
109303
109310
|
return c.display.wrapper.ownerDocument;
|
|
109304
109311
|
}
|
|
109305
109312
|
function ae(c) {
|
|
109306
|
-
return
|
|
109313
|
+
return ue(c.display.wrapper);
|
|
109307
109314
|
}
|
|
109308
|
-
function
|
|
109315
|
+
function ue(c) {
|
|
109309
109316
|
return c.getRootNode ? c.getRootNode() : c.ownerDocument;
|
|
109310
109317
|
}
|
|
109311
109318
|
function ve(c) {
|
|
@@ -109453,8 +109460,8 @@ var gG = { exports: {} };
|
|
|
109453
109460
|
var J = X == "ltr" ? "L" : "R";
|
|
109454
109461
|
if (B.length == 0 || X == "ltr" && !v.test(B))
|
|
109455
109462
|
return !1;
|
|
109456
|
-
for (var re = B.length, ne = [],
|
|
109457
|
-
ne.push(b(B.charCodeAt(
|
|
109463
|
+
for (var re = B.length, ne = [], ce = 0; ce < re; ++ce)
|
|
109464
|
+
ne.push(b(B.charCodeAt(ce)));
|
|
109458
109465
|
for (var de = 0, we = J; de < re; ++de) {
|
|
109459
109466
|
var Oe = ne[de];
|
|
109460
109467
|
Oe == "m" ? ne[de] = we : we = Oe;
|
|
@@ -109924,18 +109931,18 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
109924
109931
|
for (var $ = b.state, A = function(B) {
|
|
109925
109932
|
b.baseTokens = w;
|
|
109926
109933
|
var X = c.state.overlays[B], J = 1, re = 0;
|
|
109927
|
-
b.state = !0, j8(c, p.text, X.mode, b, function(ne,
|
|
109934
|
+
b.state = !0, j8(c, p.text, X.mode, b, function(ne, ce) {
|
|
109928
109935
|
for (var de = J; re < ne; ) {
|
|
109929
109936
|
var we = w[J];
|
|
109930
109937
|
we > ne && w.splice(J, 1, ne, w[J + 1], we), J += 2, re = Math.min(ne, we);
|
|
109931
109938
|
}
|
|
109932
|
-
if (
|
|
109939
|
+
if (ce)
|
|
109933
109940
|
if (X.opaque)
|
|
109934
|
-
w.splice(de, J - de, ne, "overlay " +
|
|
109941
|
+
w.splice(de, J - de, ne, "overlay " + ce), J = de + 2;
|
|
109935
109942
|
else
|
|
109936
109943
|
for (; de < J; de += 2) {
|
|
109937
109944
|
var Oe = w[de + 1];
|
|
109938
|
-
w[de + 1] = (Oe ? Oe + " " : "") + "overlay " +
|
|
109945
|
+
w[de + 1] = (Oe ? Oe + " " : "") + "overlay " + ce;
|
|
109939
109946
|
}
|
|
109940
109947
|
}, O), b.state = $, b.baseTokens = null, b.baseTokenPos = 1;
|
|
109941
109948
|
}, D = 0; D < c.state.overlays.length; ++D)
|
|
@@ -110023,8 +110030,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110023
110030
|
X.start = X.pos;
|
|
110024
110031
|
}
|
|
110025
110032
|
for (; D < X.pos; ) {
|
|
110026
|
-
var
|
|
110027
|
-
w(
|
|
110033
|
+
var ce = Math.min(X.pos, D + 5e3);
|
|
110034
|
+
w(ce, B), D = ce;
|
|
110028
110035
|
}
|
|
110029
110036
|
}
|
|
110030
110037
|
function aee(c, p, b) {
|
|
@@ -110122,8 +110129,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110122
110129
|
}
|
|
110123
110130
|
}
|
|
110124
110131
|
if (D)
|
|
110125
|
-
for (var
|
|
110126
|
-
var de = D[
|
|
110132
|
+
for (var ce = 0; ce < D.length; ++ce) {
|
|
110133
|
+
var de = D[ce];
|
|
110127
110134
|
if (de.to != null && (de.to += X), de.from == null) {
|
|
110128
110135
|
var we = xp(A, de.marker);
|
|
110129
110136
|
we || (de.from = X, B && (A || (A = [])).push(de));
|
|
@@ -110154,8 +110161,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110154
110161
|
var v = null;
|
|
110155
110162
|
if (c.iter(p.line, b.line + 1, function(ne) {
|
|
110156
110163
|
if (ne.markedSpans)
|
|
110157
|
-
for (var
|
|
110158
|
-
var de = ne.markedSpans[
|
|
110164
|
+
for (var ce = 0; ce < ne.markedSpans.length; ++ce) {
|
|
110165
|
+
var de = ne.markedSpans[ce].marker;
|
|
110159
110166
|
de.readOnly && (!v || qe(v, de) == -1) && (v || (v = [])).push(de);
|
|
110160
110167
|
}
|
|
110161
110168
|
}), !v)
|
|
@@ -110383,8 +110390,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110383
110390
|
D.lastIndex = J;
|
|
110384
110391
|
var re = D.exec(p), ne = re ? re.index - J : p.length - J;
|
|
110385
110392
|
if (ne) {
|
|
110386
|
-
var
|
|
110387
|
-
l && u < 9 ? X.appendChild(R("span", [
|
|
110393
|
+
var ce = document.createTextNode(A.slice(J, J + ne));
|
|
110394
|
+
l && u < 9 ? X.appendChild(R("span", [ce])) : X.appendChild(ce), c.map.push(c.pos, c.pos + ne, ce), c.col += ne, c.pos += ne;
|
|
110388
110395
|
}
|
|
110389
110396
|
if (!re)
|
|
110390
110397
|
break;
|
|
@@ -110443,15 +110450,15 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110443
110450
|
p.addToken(p, w.slice(O, O = b[$]), q8(b[$ + 1], p.cm.options));
|
|
110444
110451
|
return;
|
|
110445
110452
|
}
|
|
110446
|
-
for (var A = w.length, D = 0, B = 1, X = "", J, re, ne = 0,
|
|
110453
|
+
for (var A = w.length, D = 0, B = 1, X = "", J, re, ne = 0, ce, de, we, Oe, Ce; ; ) {
|
|
110447
110454
|
if (ne == D) {
|
|
110448
|
-
|
|
110455
|
+
ce = de = we = re = "", Ce = null, Oe = null, ne = 1 / 0;
|
|
110449
110456
|
for (var Se = [], Ne = void 0, Je = 0; Je < v.length; ++Je) {
|
|
110450
110457
|
var Ze = v[Je], St = Ze.marker;
|
|
110451
110458
|
if (St.type == "bookmark" && Ze.from == D && St.widgetNode)
|
|
110452
110459
|
Se.push(St);
|
|
110453
110460
|
else if (Ze.from <= D && (Ze.to == null || Ze.to > D || St.collapsed && Ze.to == D && Ze.from == D)) {
|
|
110454
|
-
if (Ze.to != null && Ze.to != D && ne > Ze.to && (ne = Ze.to, de = ""), St.className && (
|
|
110461
|
+
if (Ze.to != null && Ze.to != D && ne > Ze.to && (ne = Ze.to, de = ""), St.className && (ce += " " + St.className), St.css && (re = (re ? re + ";" : "") + St.css), St.startStyle && Ze.from == D && (we += " " + St.startStyle), St.endStyle && Ze.to == ne && (Ne || (Ne = [])).push(St.endStyle, Ze.to), St.title && ((Ce || (Ce = {})).title = St.title), St.attributes)
|
|
110455
110462
|
for (var nn in St.attributes)
|
|
110456
110463
|
(Ce || (Ce = {}))[nn] = St.attributes[nn];
|
|
110457
110464
|
St.collapsed && (!Oe || Wx(Oe.marker, St) < 0) && (Oe = Ze);
|
|
@@ -110485,7 +110492,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110485
110492
|
p.addToken(
|
|
110486
110493
|
p,
|
|
110487
110494
|
ni,
|
|
110488
|
-
J ? J +
|
|
110495
|
+
J ? J + ce : ce,
|
|
110489
110496
|
we,
|
|
110490
110497
|
D + ni.length == ne ? de : "",
|
|
110491
110498
|
re,
|
|
@@ -110806,7 +110813,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110806
110813
|
var re = O.parentNode.getClientRects()[0];
|
|
110807
110814
|
re ? B = { left: re.left, right: re.left + Gf(c.display), top: re.top, bottom: re.bottom } : B = s9;
|
|
110808
110815
|
}
|
|
110809
|
-
for (var ne = B.top - p.rect.top,
|
|
110816
|
+
for (var ne = B.top - p.rect.top, ce = B.bottom - p.rect.top, de = (ne + ce) / 2, we = p.view.measure.heights, Oe = 0; Oe < we.length - 1 && !(de < we[Oe]); Oe++)
|
|
110810
110817
|
;
|
|
110811
110818
|
var Ce = Oe ? we[Oe - 1] : 0, Se = we[Oe], Ne = {
|
|
110812
110819
|
left: (D == "right" ? B.right : B.left) - p.rect.left,
|
|
@@ -110814,7 +110821,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110814
110821
|
top: Ce,
|
|
110815
110822
|
bottom: Se
|
|
110816
110823
|
};
|
|
110817
|
-
return !B.left && !B.right && (Ne.bogus = !0), c.options.singleCursorHeightPerLine || (Ne.rtop = ne, Ne.rbottom =
|
|
110824
|
+
return !B.left && !B.right && (Ne.bogus = !0), c.options.singleCursorHeightPerLine || (Ne.rtop = ne, Ne.rbottom = ce), Ne;
|
|
110818
110825
|
}
|
|
110819
110826
|
function zee(c, p) {
|
|
110820
110827
|
if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !J1(c))
|
|
@@ -110888,16 +110895,16 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110888
110895
|
}
|
|
110889
110896
|
function ko(c, p, b, v, w, O) {
|
|
110890
110897
|
v = v || $e(c.doc, p.line), w || (w = Vf(c, v));
|
|
110891
|
-
function $(
|
|
110892
|
-
var we = Ko(c, w,
|
|
110898
|
+
function $(ce, de) {
|
|
110899
|
+
var we = Ko(c, w, ce, de ? "right" : "left", O);
|
|
110893
110900
|
return de ? we.left = we.right : we.right = we.left, cv(c, v, we, b);
|
|
110894
110901
|
}
|
|
110895
110902
|
var A = bs(v, c.doc.direction), D = p.ch, B = p.sticky;
|
|
110896
110903
|
if (D >= v.text.length ? (D = v.text.length, B = "before") : D <= 0 && (D = 0, B = "after"), !A)
|
|
110897
110904
|
return $(B == "before" ? D - 1 : D, B == "before");
|
|
110898
|
-
function X(
|
|
110905
|
+
function X(ce, de, we) {
|
|
110899
110906
|
var Oe = A[de], Ce = Oe.level == 1;
|
|
110900
|
-
return $(we ?
|
|
110907
|
+
return $(we ? ce - 1 : ce, Ce != we);
|
|
110901
110908
|
}
|
|
110902
110909
|
var J = Us(A, D, B), re = $r, ne = X(D, J, B == "before");
|
|
110903
110910
|
return re != null && (ne.other = X(D, re, B != "before")), ne;
|
|
@@ -110954,19 +110961,19 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110954
110961
|
var J = (c.options.lineWrapping ? Qee : Hee)(c, p, b, O, X, v, w);
|
|
110955
110962
|
B = J.level != 1, A = B ? J.from : J.to - 1, D = B ? J.to : J.from - 1;
|
|
110956
110963
|
}
|
|
110957
|
-
var re = null, ne = null,
|
|
110964
|
+
var re = null, ne = null, ce = Uo(function(Je) {
|
|
110958
110965
|
var Ze = Ko(c, O, Je);
|
|
110959
110966
|
return Ze.top += $, Ze.bottom += $, Jx(Ze, v, w, !1) ? (Ze.top <= w && Ze.left <= v && (re = Je, ne = Ze), !0) : !1;
|
|
110960
110967
|
}, A, D), de, we, Oe = !1;
|
|
110961
110968
|
if (ne) {
|
|
110962
110969
|
var Ce = v - ne.left < ne.right - v, Se = Ce == B;
|
|
110963
|
-
|
|
110970
|
+
ce = re + (Se ? 0 : 1), we = Se ? "after" : "before", de = Ce ? ne.left : ne.right;
|
|
110964
110971
|
} else {
|
|
110965
|
-
!B && (
|
|
110966
|
-
var Ne = ko(c, be(b,
|
|
110972
|
+
!B && (ce == D || ce == A) && ce++, we = ce == 0 ? "after" : ce == p.text.length ? "before" : Ko(c, O, ce - (B ? 1 : 0)).bottom + $ <= w == B ? "after" : "before";
|
|
110973
|
+
var Ne = ko(c, be(b, ce, we), "line", p, O);
|
|
110967
110974
|
de = Ne.left, Oe = w < Ne.top ? -1 : w >= Ne.bottom ? 1 : 0;
|
|
110968
110975
|
}
|
|
110969
|
-
return
|
|
110976
|
+
return ce = mp(p.text, ce, 1), Gx(b, ce, we, Oe, v - de);
|
|
110970
110977
|
}
|
|
110971
110978
|
function Hee(c, p, b, v, w, O, $) {
|
|
110972
110979
|
var A = Uo(function(J) {
|
|
@@ -110997,7 +111004,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
110997
111004
|
for (var X = null, J = null, re = 0; re < w.length; re++) {
|
|
110998
111005
|
var ne = w[re];
|
|
110999
111006
|
if (!(ne.from >= B || ne.to <= D)) {
|
|
111000
|
-
var
|
|
111007
|
+
var ce = ne.level != 1, de = Ko(c, v, ce ? Math.min(B, ne.to) - 1 : Math.max(D, ne.from)).right, we = de < O ? O - de + 1e9 : de - O;
|
|
111001
111008
|
(!X || J > we) && (X = ne, J = we);
|
|
111002
111009
|
}
|
|
111003
111010
|
}
|
|
@@ -111222,7 +111229,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111222
111229
|
if (re.line == ne.line)
|
|
111223
111230
|
J(re.line, re.ch, ne.ch);
|
|
111224
111231
|
else {
|
|
111225
|
-
var
|
|
111232
|
+
var ce = $e(w, re.line), de = $e(w, ne.line), we = wo(ce) == wo(de), Oe = J(re.line, re.ch, we ? ce.text.length + 1 : null).end, Ce = J(ne.line, we ? 0 : null, ne.ch).start;
|
|
111226
111233
|
we && (Oe.top < Ce.top - 2 ? (X(Oe.right, Oe.top, null, Oe.bottom), X(A, Ce.top, Ce.left, Ce.bottom)) : X(Oe.right, Oe.top, Ce.left - Oe.right, Oe.bottom)), Oe.bottom < Ce.top && X(A, Oe.bottom, null, Ce.top);
|
|
111227
111234
|
}
|
|
111228
111235
|
b.appendChild(O);
|
|
@@ -111268,8 +111275,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111268
111275
|
}
|
|
111269
111276
|
var ne = A.line.height - B;
|
|
111270
111277
|
if ((ne > 5e-3 || ne < -5e-3) && (w < v && (O -= ne), Vo(A.line, B), y9(A.line), A.rest))
|
|
111271
|
-
for (var
|
|
111272
|
-
y9(A.rest[
|
|
111278
|
+
for (var ce = 0; ce < A.rest.length; ce++)
|
|
111279
|
+
y9(A.rest[ce]);
|
|
111273
111280
|
if (X > c.display.sizerWidth) {
|
|
111274
111281
|
var de = Math.ceil(X / Gf(c.display));
|
|
111275
111282
|
de > c.display.maxLineLength && (c.display.maxLineLength = de, c.display.maxLine = A.line, c.display.maxLineChanged = !0);
|
|
@@ -111341,8 +111348,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111341
111348
|
var X = Math.min(p.top, (B ? A : p.bottom) - O);
|
|
111342
111349
|
X != w && ($.scrollTop = X);
|
|
111343
111350
|
}
|
|
111344
|
-
var J = c.options.fixedGutter ? 0 : b.gutters.offsetWidth, re = c.curOp && c.curOp.scrollLeft != null ? c.curOp.scrollLeft : b.scroller.scrollLeft - J, ne = mc(c) - b.gutters.offsetWidth,
|
|
111345
|
-
return
|
|
111351
|
+
var J = c.options.fixedGutter ? 0 : b.gutters.offsetWidth, re = c.curOp && c.curOp.scrollLeft != null ? c.curOp.scrollLeft : b.scroller.scrollLeft - J, ne = mc(c) - b.gutters.offsetWidth, ce = p.right - p.left > ne;
|
|
111352
|
+
return ce && (p.right = p.left + ne), p.left < 10 ? $.scrollLeft = 0 : p.left < re ? $.scrollLeft = Math.max(0, p.left + J - (ce ? 0 : 10)) : p.right > ne + re - 3 && ($.scrollLeft = p.right + (ce ? 0 : 10) - ne), $;
|
|
111346
111353
|
}
|
|
111347
111354
|
function l_(c, p) {
|
|
111348
111355
|
p != null && (gv(c), c.curOp.scrollTop = (c.curOp.scrollTop == null ? c.doc.scrollTop : c.curOp.scrollTop) + p);
|
|
@@ -111666,7 +111673,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111666
111673
|
return b;
|
|
111667
111674
|
}
|
|
111668
111675
|
function ate(c) {
|
|
111669
|
-
if (!(!c || !c.activeElt || c.activeElt == te(
|
|
111676
|
+
if (!(!c || !c.activeElt || c.activeElt == te(ue(c.activeElt))) && (c.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(c.activeElt.nodeName) && c.anchorNode && K(document.body, c.anchorNode) && K(document.body, c.focusNode))) {
|
|
111670
111677
|
var p = c.activeElt.ownerDocument, b = p.defaultView.getSelection(), v = p.createRange();
|
|
111671
111678
|
v.setEnd(c.anchorNode, c.anchorOffset), v.collapse(!1), b.removeAllRanges(), b.addRange(v), b.extend(c.focusNode, c.focusOffset);
|
|
111672
111679
|
}
|
|
@@ -111713,9 +111720,9 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111713
111720
|
}
|
|
111714
111721
|
function lte(c, p, b) {
|
|
111715
111722
|
var v = c.display, w = c.options.lineNumbers, O = v.lineDiv, $ = O.firstChild;
|
|
111716
|
-
function A(
|
|
111717
|
-
var de =
|
|
111718
|
-
return f && M && c.display.currentWheelTarget ==
|
|
111723
|
+
function A(ce) {
|
|
111724
|
+
var de = ce.nextSibling;
|
|
111725
|
+
return f && M && c.display.currentWheelTarget == ce ? ce.style.display = "none" : ce.parentNode.removeChild(ce), de;
|
|
111719
111726
|
}
|
|
111720
111727
|
for (var D = v.view, B = v.viewFrom, X = 0; X < D.length; X++) {
|
|
111721
111728
|
var J = D[X];
|
|
@@ -111836,8 +111843,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111836
111843
|
return;
|
|
111837
111844
|
}
|
|
111838
111845
|
if (w && O != null) {
|
|
111839
|
-
var ne = w * O,
|
|
111840
|
-
ne < 0 ?
|
|
111846
|
+
var ne = w * O, ce = c.doc.scrollTop, de = ce + $.wrapper.clientHeight;
|
|
111847
|
+
ne < 0 ? ce = Math.max(0, ce + ne - 50) : de = Math.min(c.doc.height, de + ne + 50), c_(c, { top: ce, bottom: de });
|
|
111841
111848
|
}
|
|
111842
111849
|
bv < 20 && p.deltaMode !== 0 && ($.wheelStartX == null ? ($.wheelStartX = A.scrollLeft, $.wheelStartY = A.scrollTop, $.wheelDX = v, $.wheelDY = w, setTimeout(function() {
|
|
111843
111850
|
if ($.wheelStartX != null) {
|
|
@@ -111969,12 +111976,12 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111969
111976
|
Ne.push(new qf(B[Je], w(Je), v));
|
|
111970
111977
|
return Ne;
|
|
111971
111978
|
}
|
|
111972
|
-
var A = p.from, D = p.to, B = p.text, X = $e(c, A.line), J = $e(c, D.line), re = Fe(B), ne = w(B.length - 1),
|
|
111979
|
+
var A = p.from, D = p.to, B = p.text, X = $e(c, A.line), J = $e(c, D.line), re = Fe(B), ne = w(B.length - 1), ce = D.line - A.line;
|
|
111973
111980
|
if (p.full)
|
|
111974
111981
|
c.insert(0, $(0, B.length)), c.remove(B.length, c.size - B.length);
|
|
111975
111982
|
else if (P9(c, p)) {
|
|
111976
111983
|
var de = $(0, B.length - 1);
|
|
111977
|
-
O(J, J.text, ne),
|
|
111984
|
+
O(J, J.text, ne), ce && c.remove(A.line, ce), de.length && c.insert(A.line, de);
|
|
111978
111985
|
} else if (X == J)
|
|
111979
111986
|
if (B.length == 1)
|
|
111980
111987
|
O(X, X.text.slice(0, A.ch) + re + X.text.slice(D.ch), ne);
|
|
@@ -111983,11 +111990,11 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
111983
111990
|
we.push(new qf(re + X.text.slice(D.ch), ne, v)), O(X, X.text.slice(0, A.ch) + B[0], w(0)), c.insert(A.line + 1, we);
|
|
111984
111991
|
}
|
|
111985
111992
|
else if (B.length == 1)
|
|
111986
|
-
O(X, X.text.slice(0, A.ch) + B[0] + J.text.slice(D.ch), w(0)), c.remove(A.line + 1,
|
|
111993
|
+
O(X, X.text.slice(0, A.ch) + B[0] + J.text.slice(D.ch), w(0)), c.remove(A.line + 1, ce);
|
|
111987
111994
|
else {
|
|
111988
111995
|
O(X, X.text.slice(0, A.ch) + B[0], w(0)), O(J, re + J.text.slice(D.ch), ne);
|
|
111989
111996
|
var Oe = $(1, B.length - 1);
|
|
111990
|
-
|
|
111997
|
+
ce > 1 && c.remove(A.line + 1, ce - 1), c.insert(A.line + 1, Oe);
|
|
111991
111998
|
}
|
|
111992
111999
|
bi(c, "change", c, p);
|
|
111993
112000
|
}
|
|
@@ -112306,9 +112313,9 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
112306
112313
|
!Ne && qe(Ce, Se.history) == -1 && (J9(Se.history, we), Ce.push(Se.history)), Ip(Se, we, null, F9(Se, we));
|
|
112307
112314
|
});
|
|
112308
112315
|
}, ne = O.changes.length - 1; ne >= 0; --ne) {
|
|
112309
|
-
var
|
|
112310
|
-
if (
|
|
112311
|
-
return
|
|
112316
|
+
var ce = re(ne);
|
|
112317
|
+
if (ce)
|
|
112318
|
+
return ce.v;
|
|
112312
112319
|
}
|
|
112313
112320
|
}
|
|
112314
112321
|
}
|
|
@@ -112357,8 +112364,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
112357
112364
|
if (ne == w.maxLine)
|
|
112358
112365
|
return A = !0, !0;
|
|
112359
112366
|
})), v.sel.contains(p.from, p.to) > -1 && Y1(c), g_(v, p, b, m9(c)), c.options.lineWrapping || (v.iter(D, O.line + p.text.length, function(ne) {
|
|
112360
|
-
var
|
|
112361
|
-
|
|
112367
|
+
var ce = av(ne);
|
|
112368
|
+
ce > w.maxLineLength && (w.maxLine = ne, w.maxLineLength = ce, w.maxLineChanged = !0, A = !1);
|
|
112362
112369
|
}), A && (c.curOp.updateMaxLine = !0)), lee(v, O.line), Ap(c, 400);
|
|
112363
112370
|
var B = p.text.length - ($.line - O.line) - 1;
|
|
112364
112371
|
p.full ? Ar(c) : O.line == $.line && p.text.length == 1 && !P9(c.doc, p) ? Hl(c, O.line, "text") : Ar(c, O.line, $.line + 1, B);
|
|
@@ -113108,15 +113115,15 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
113108
113115
|
from: b,
|
|
113109
113116
|
to: b,
|
|
113110
113117
|
text: p.doc.splitLines(
|
|
113111
|
-
O.filter(function(
|
|
113112
|
-
return
|
|
113118
|
+
O.filter(function(ce) {
|
|
113119
|
+
return ce != null;
|
|
113113
113120
|
}).join(p.doc.lineSeparator())
|
|
113114
113121
|
),
|
|
113115
113122
|
origin: "paste"
|
|
113116
113123
|
};
|
|
113117
113124
|
id(p.doc, ne), W9(p.doc, Zl(dt(p.doc, b), dt(p.doc, Ul(ne))));
|
|
113118
113125
|
})();
|
|
113119
|
-
}, D = function(ne,
|
|
113126
|
+
}, D = function(ne, ce) {
|
|
113120
113127
|
if (p.options.allowDropFileTypes && qe(p.options.allowDropFileTypes, ne.type) == -1) {
|
|
113121
113128
|
A();
|
|
113122
113129
|
return;
|
|
@@ -113130,7 +113137,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
113130
113137
|
A();
|
|
113131
113138
|
return;
|
|
113132
113139
|
}
|
|
113133
|
-
O[
|
|
113140
|
+
O[ce] = we, A();
|
|
113134
113141
|
}, de.readAsText(ne);
|
|
113135
113142
|
}, B = 0; B < v.length; B++)
|
|
113136
113143
|
D(v[B], B);
|
|
@@ -113507,7 +113514,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
113507
113514
|
return new be(b.line, re, ne);
|
|
113508
113515
|
}
|
|
113509
113516
|
}
|
|
113510
|
-
var
|
|
113517
|
+
var ce = function(Oe, Ce, Se) {
|
|
113511
113518
|
for (var Ne = function(nn, ki) {
|
|
113512
113519
|
return ki ? new be(b.line, A(nn, 1), "before") : new be(b.line, nn, "after");
|
|
113513
113520
|
}; Oe >= 0 && Oe < w.length; Oe += Ce) {
|
|
@@ -113515,11 +113522,11 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
113515
113522
|
if (Je.from <= St && St < Je.to || (St = Ze ? Je.from : A(Je.to, -1), Se.begin <= St && St < Se.end))
|
|
113516
113523
|
return Ne(St, Ze);
|
|
113517
113524
|
}
|
|
113518
|
-
}, de =
|
|
113525
|
+
}, de = ce(O + v, v, X);
|
|
113519
113526
|
if (de)
|
|
113520
113527
|
return de;
|
|
113521
113528
|
var we = v > 0 ? X.end : A(X.begin, -1);
|
|
113522
|
-
return we != null && !(v > 0 && we == p.text.length) && (de =
|
|
113529
|
+
return we != null && !(v > 0 && we == p.text.length) && (de = ce(v > 0 ? 0 : w.length - 1, v, B(we)), de) ? de : null;
|
|
113523
113530
|
}
|
|
113524
113531
|
var Hp = {
|
|
113525
113532
|
selectAll: q9,
|
|
@@ -113976,25 +113983,25 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
113976
113983
|
Rn[A] = Ute(c, new Ut(dt(O, di), ii)), Gi(O, xo(c, Rn, A), Yt);
|
|
113977
113984
|
}
|
|
113978
113985
|
}
|
|
113979
|
-
var ne = w.wrapper.getBoundingClientRect(),
|
|
113986
|
+
var ne = w.wrapper.getBoundingClientRect(), ce = 0;
|
|
113980
113987
|
function de(Se) {
|
|
113981
|
-
var Ne = ++
|
|
113988
|
+
var Ne = ++ce, Je = vc(c, Se, !0, v.unit == "rectangle");
|
|
113982
113989
|
if (Je)
|
|
113983
113990
|
if (ft(Je, J) != 0) {
|
|
113984
113991
|
c.curOp.focus = te(ae(c)), re(Je);
|
|
113985
113992
|
var Ze = mv(w, O);
|
|
113986
113993
|
(Je.line >= Ze.to || Je.line < Ze.from) && setTimeout(yi(c, function() {
|
|
113987
|
-
|
|
113994
|
+
ce == Ne && de(Se);
|
|
113988
113995
|
}), 150);
|
|
113989
113996
|
} else {
|
|
113990
113997
|
var St = Se.clientY < ne.top ? -20 : Se.clientY > ne.bottom ? 20 : 0;
|
|
113991
113998
|
St && setTimeout(yi(c, function() {
|
|
113992
|
-
|
|
113999
|
+
ce == Ne && (w.scroller.scrollTop += St, de(Se));
|
|
113993
114000
|
}), 50);
|
|
113994
114001
|
}
|
|
113995
114002
|
}
|
|
113996
114003
|
function we(Se) {
|
|
113997
|
-
c.state.selectingText = !1,
|
|
114004
|
+
c.state.selectingText = !1, ce = 1 / 0, Se && (Pi(Se), w.input.focus()), Mr(w.wrapper.ownerDocument, "mousemove", Oe), Mr(w.wrapper.ownerDocument, "mouseup", Ce), O.history.lastSelOrigin = null;
|
|
113998
114005
|
}
|
|
113999
114006
|
var Oe = yi(c, function(Se) {
|
|
114000
114007
|
Se.buttons === 0 || !V1(Se) ? we(Se) : de(Se);
|
|
@@ -114021,8 +114028,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114021
114028
|
var X = Us(O, v.ch, v.sticky), J = X - $ || (v.ch - b.ch) * (A.level == 1 ? -1 : 1);
|
|
114022
114029
|
X == D - 1 || X == D ? B = J < 0 : B = J > 0;
|
|
114023
114030
|
}
|
|
114024
|
-
var re = O[D + (B ? -1 : 0)], ne = B == (re.level == 1),
|
|
114025
|
-
return b.ch ==
|
|
114031
|
+
var re = O[D + (B ? -1 : 0)], ne = B == (re.level == 1), ce = ne ? re.from : re.to, de = ne ? "after" : "before";
|
|
114032
|
+
return b.ch == ce && b.sticky == de ? p : new Ut(new be(b.line, ce, de), v);
|
|
114026
114033
|
}
|
|
114027
114034
|
function y$(c, p, b, v) {
|
|
114028
114035
|
var w, O;
|
|
@@ -114305,11 +114312,11 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114305
114312
|
re += $, J += " ";
|
|
114306
114313
|
if (re < X && (J += Lt(X - re)), J != B)
|
|
114307
114314
|
return rd(w, J, be(p, 0), be(p, B.length), "+input"), A.stateAfter = null, !0;
|
|
114308
|
-
for (var
|
|
114309
|
-
var de = w.sel.ranges[
|
|
114315
|
+
for (var ce = 0; ce < w.sel.ranges.length; ce++) {
|
|
114316
|
+
var de = w.sel.ranges[ce];
|
|
114310
114317
|
if (de.head.line == p && de.head.ch < B.length) {
|
|
114311
114318
|
var we = be(p, B.length);
|
|
114312
|
-
y_(w,
|
|
114319
|
+
y_(w, ce, new Ut(we, we));
|
|
114313
114320
|
break;
|
|
114314
114321
|
}
|
|
114315
114322
|
}
|
|
@@ -114335,12 +114342,12 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114335
114342
|
return [Oe];
|
|
114336
114343
|
}));
|
|
114337
114344
|
for (var J = c.curOp.updateInput, re = v.ranges.length - 1; re >= 0; re--) {
|
|
114338
|
-
var ne = v.ranges[re],
|
|
114339
|
-
ne.empty() && (b && b > 0 ?
|
|
114345
|
+
var ne = v.ranges[re], ce = ne.from(), de = ne.to();
|
|
114346
|
+
ne.empty() && (b && b > 0 ? ce = be(ce.line, ce.ch - b) : c.state.overwrite && !A ? de = be(de.line, Math.min($e(O, de.line).text.length, de.ch + Fe(D).length)) : A && _o && _o.lineWise && _o.text.join(`
|
|
114340
114347
|
`) == D.join(`
|
|
114341
|
-
`) && (
|
|
114348
|
+
`) && (ce = de = be(ce.line, 0)));
|
|
114342
114349
|
var we = {
|
|
114343
|
-
from:
|
|
114350
|
+
from: ce,
|
|
114344
114351
|
to: de,
|
|
114345
114352
|
text: B ? B[re % B.length] : D,
|
|
114346
114353
|
origin: w || (A ? "paste" : c.state.cutIncoming > $ ? "cut" : "+input")
|
|
@@ -114746,15 +114753,15 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114746
114753
|
else if (v == "column")
|
|
114747
114754
|
X(!0);
|
|
114748
114755
|
else if (v == "word" || v == "group")
|
|
114749
|
-
for (var J = null, re = v == "group", ne = c.cm && c.cm.getHelper(p, "wordChars"),
|
|
114756
|
+
for (var J = null, re = v == "group", ne = c.cm && c.cm.getHelper(p, "wordChars"), ce = !0; !(b < 0 && !X(!ce)); ce = !1) {
|
|
114750
114757
|
var de = A.text.charAt(p.ch) || `
|
|
114751
114758
|
`, we = ti(de, ne) ? "w" : re && de == `
|
|
114752
114759
|
` ? "n" : !re || /\s/.test(de) ? null : "p";
|
|
114753
|
-
if (re && !
|
|
114760
|
+
if (re && !ce && !we && (we = "s"), J && J != we) {
|
|
114754
114761
|
b < 0 && (b = 1, X(), p.sticky = "after");
|
|
114755
114762
|
break;
|
|
114756
114763
|
}
|
|
114757
|
-
if (we && (J = we), b > 0 && !X(!
|
|
114764
|
+
if (we && (J = we), b > 0 && !X(!ce))
|
|
114758
114765
|
break;
|
|
114759
114766
|
}
|
|
114760
114767
|
var Oe = _v(c, p, O, $, !0);
|
|
@@ -114829,7 +114836,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114829
114836
|
var X = C$(), J = X.firstChild;
|
|
114830
114837
|
T_(J), v.display.lineSpace.insertBefore(X, v.display.lineSpace.firstChild), J.value = _o.text.join(`
|
|
114831
114838
|
`);
|
|
114832
|
-
var re = te(
|
|
114839
|
+
var re = te(ue(w));
|
|
114833
114840
|
U(J), setTimeout(function() {
|
|
114834
114841
|
v.display.lineSpace.removeChild(X), re.focus(), re == w && b.showPrimarySelection();
|
|
114835
114842
|
}, 50);
|
|
@@ -114840,7 +114847,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114840
114847
|
c ? this.div.setAttribute("aria-label", c) : this.div.removeAttribute("aria-label");
|
|
114841
114848
|
}, Xt.prototype.prepareSelection = function() {
|
|
114842
114849
|
var c = v9(this.cm, !1);
|
|
114843
|
-
return c.focus = te(
|
|
114850
|
+
return c.focus = te(ue(this.div)) == this.div, c;
|
|
114844
114851
|
}, Xt.prototype.showSelection = function(c, p) {
|
|
114845
114852
|
!c || !this.cm.display.view.length || ((c.focus || p) && this.showPrimarySelection(), this.showMultipleSelections(c));
|
|
114846
114853
|
}, Xt.prototype.getSelection = function() {
|
|
@@ -114888,7 +114895,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114888
114895
|
var p = c.getRangeAt(0).commonAncestorContainer;
|
|
114889
114896
|
return K(this.div, p);
|
|
114890
114897
|
}, Xt.prototype.focus = function() {
|
|
114891
|
-
this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || te(
|
|
114898
|
+
this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || te(ue(this.div)) != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus());
|
|
114892
114899
|
}, Xt.prototype.blur = function() {
|
|
114893
114900
|
this.div.blur();
|
|
114894
114901
|
}, Xt.prototype.getField = function() {
|
|
@@ -114941,18 +114948,18 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
114941
114948
|
J.shift(), re.shift(), $++;
|
|
114942
114949
|
else
|
|
114943
114950
|
break;
|
|
114944
|
-
for (var ne = 0,
|
|
114951
|
+
for (var ne = 0, ce = 0, de = J[0], we = re[0], Oe = Math.min(de.length, we.length); ne < Oe && de.charCodeAt(ne) == we.charCodeAt(ne); )
|
|
114945
114952
|
++ne;
|
|
114946
114953
|
for (var Ce = Fe(J), Se = Fe(re), Ne = Math.min(
|
|
114947
114954
|
Ce.length - (J.length == 1 ? ne : 0),
|
|
114948
114955
|
Se.length - (re.length == 1 ? ne : 0)
|
|
114949
|
-
);
|
|
114950
|
-
++
|
|
114956
|
+
); ce < Ne && Ce.charCodeAt(Ce.length - ce - 1) == Se.charCodeAt(Se.length - ce - 1); )
|
|
114957
|
+
++ce;
|
|
114951
114958
|
if (J.length == 1 && re.length == 1 && $ == v.line)
|
|
114952
|
-
for (; ne && ne > v.ch && Ce.charCodeAt(Ce.length -
|
|
114953
|
-
ne--,
|
|
114954
|
-
J[J.length - 1] = Ce.slice(0, Ce.length -
|
|
114955
|
-
var Je = be($, ne), Ze = be(B, re.length ? Fe(re).length -
|
|
114959
|
+
for (; ne && ne > v.ch && Ce.charCodeAt(Ce.length - ce - 1) == Se.charCodeAt(Se.length - ce - 1); )
|
|
114960
|
+
ne--, ce++;
|
|
114961
|
+
J[J.length - 1] = Ce.slice(0, Ce.length - ce).replace(/^\u200b+/, ""), J[0] = J[0].slice(ne).replace(/\u200b+$/, "");
|
|
114962
|
+
var Je = be($, ne), Ze = be(B, re.length ? Fe(re).length - ce : 0);
|
|
114956
114963
|
if (J.length > 1 || J[0] || ft(Je, Ze))
|
|
114957
114964
|
return rd(c.doc, J, Je, Ze, "+input"), !0;
|
|
114958
114965
|
}, Xt.prototype.ensurePolled = function() {
|
|
@@ -115009,8 +115016,8 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115009
115016
|
function ene(c, p, b, v, w) {
|
|
115010
115017
|
var O = "", $ = !1, A = c.doc.lineSeparator(), D = !1;
|
|
115011
115018
|
function B(ne) {
|
|
115012
|
-
return function(
|
|
115013
|
-
return
|
|
115019
|
+
return function(ce) {
|
|
115020
|
+
return ce.id == ne;
|
|
115014
115021
|
};
|
|
115015
115022
|
}
|
|
115016
115023
|
function X() {
|
|
@@ -115021,9 +115028,9 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115021
115028
|
}
|
|
115022
115029
|
function re(ne) {
|
|
115023
115030
|
if (ne.nodeType == 1) {
|
|
115024
|
-
var
|
|
115025
|
-
if (
|
|
115026
|
-
J(
|
|
115031
|
+
var ce = ne.getAttribute("cm-text");
|
|
115032
|
+
if (ce) {
|
|
115033
|
+
J(ce);
|
|
115027
115034
|
return;
|
|
115028
115035
|
}
|
|
115029
115036
|
var de = ne.getAttribute("cm-marker"), we;
|
|
@@ -115097,10 +115104,10 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115097
115104
|
return ud(be(J.line, J.ch - ne), w);
|
|
115098
115105
|
ne += re.textContent.length;
|
|
115099
115106
|
}
|
|
115100
|
-
for (var
|
|
115101
|
-
if (J = X(
|
|
115107
|
+
for (var ce = A.previousSibling, de = b; ce; ce = ce.previousSibling) {
|
|
115108
|
+
if (J = X(ce, ce.firstChild, -1), J)
|
|
115102
115109
|
return ud(be(J.line, J.ch + de), w);
|
|
115103
|
-
de +=
|
|
115110
|
+
de += ce.textContent.length;
|
|
115104
115111
|
}
|
|
115105
115112
|
}
|
|
115106
115113
|
var Qn = function(c) {
|
|
@@ -115186,7 +115193,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115186
115193
|
}, Qn.prototype.supportsTouch = function() {
|
|
115187
115194
|
return !1;
|
|
115188
115195
|
}, Qn.prototype.focus = function() {
|
|
115189
|
-
if (this.cm.options.readOnly != "nocursor" && (!E || te(
|
|
115196
|
+
if (this.cm.options.readOnly != "nocursor" && (!E || te(ue(this.textarea)) != this.textarea))
|
|
115190
115197
|
try {
|
|
115191
115198
|
this.textarea.focus();
|
|
115192
115199
|
} catch {
|
|
@@ -115276,10 +115283,10 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115276
115283
|
}
|
|
115277
115284
|
if (l && u >= 9 && re(), Q) {
|
|
115278
115285
|
Fl(c);
|
|
115279
|
-
var
|
|
115280
|
-
Mr(window, "mouseup",
|
|
115286
|
+
var ce = function() {
|
|
115287
|
+
Mr(window, "mouseup", ce), setTimeout(ne, 20);
|
|
115281
115288
|
};
|
|
115282
|
-
Ye(window, "mouseup",
|
|
115289
|
+
Ye(window, "mouseup", ce);
|
|
115283
115290
|
} else
|
|
115284
115291
|
setTimeout(ne, 50);
|
|
115285
115292
|
}, Qn.prototype.readOnlyChanged = function(c) {
|
|
@@ -115288,7 +115295,7 @@ b`.split(/\n/).length != 3 ? function(c) {
|
|
|
115288
115295
|
}, Qn.prototype.needsContentAttribute = !1;
|
|
115289
115296
|
function nne(c, p) {
|
|
115290
115297
|
if (p = p ? Xe(p) : {}, p.value = c.value, !p.tabindex && c.tabIndex && (p.tabindex = c.tabIndex), !p.placeholder && c.placeholder && (p.placeholder = c.placeholder), p.autofocus == null) {
|
|
115291
|
-
var b = te(
|
|
115298
|
+
var b = te(ue(c));
|
|
115292
115299
|
p.autofocus = b == c || c.getAttribute("autofocus") != null && b == document.body;
|
|
115293
115300
|
}
|
|
115294
115301
|
function v() {
|
|
@@ -116050,7 +116057,7 @@ function tDe() {
|
|
|
116050
116057
|
return U.trailingSpace = 0, U.trailingSpaceNewLine = !1, U.prevLine = U.thisLine, U.thisLine = { stream: null }, null;
|
|
116051
116058
|
}
|
|
116052
116059
|
function z(U, F) {
|
|
116053
|
-
var ae = U.column() === F.indentation,
|
|
116060
|
+
var ae = U.column() === F.indentation, ue = T(F.prevLine.stream), ve = F.indentedCode, Qe = F.prevLine.hr, Xe = F.list !== !1, rt = (F.listStack[F.listStack.length - 1] || 0) + 3;
|
|
116054
116061
|
F.indentedCode = !1;
|
|
116055
116062
|
var _t = F.indentation;
|
|
116056
116063
|
if (F.indentationDiff === null && (F.indentationDiff = F.indentation, Xe)) {
|
|
@@ -116058,8 +116065,8 @@ function tDe() {
|
|
|
116058
116065
|
F.listStack.pop(), F.listStack.length ? F.indentation = F.listStack[F.listStack.length - 1] : F.list = !1;
|
|
116059
116066
|
F.list !== !1 && (F.indentationDiff = _t - F.listStack[F.listStack.length - 1]);
|
|
116060
116067
|
}
|
|
116061
|
-
var qe = !
|
|
116062
|
-
if (F.indentationDiff >= 4 && (ve || F.prevLine.fencedCodeEnd || F.prevLine.header ||
|
|
116068
|
+
var qe = !ue && !Qe && !F.prevLine.header && (!Xe || !ve) && !F.prevLine.fencedCodeEnd, lt = (F.list === !1 || Qe || ue) && F.indentation <= rt && U.match(f), mt = null;
|
|
116069
|
+
if (F.indentationDiff >= 4 && (ve || F.prevLine.fencedCodeEnd || F.prevLine.header || ue))
|
|
116063
116070
|
return U.skipToEnd(), F.indentedCode = !0, l.code;
|
|
116064
116071
|
if (U.eatSpace())
|
|
116065
116072
|
return null;
|
|
@@ -116089,17 +116096,17 @@ function tDe() {
|
|
|
116089
116096
|
function W(U, F) {
|
|
116090
116097
|
var ae = s.token(U, F.htmlState);
|
|
116091
116098
|
if (!o) {
|
|
116092
|
-
var
|
|
116093
|
-
(
|
|
116099
|
+
var ue = n.innerMode(s, F.htmlState);
|
|
116100
|
+
(ue.mode.name == "xml" && ue.state.tagStart === null && !ue.state.context && ue.state.tokenize.isInText || F.md_inside && U.current().indexOf(">") > -1) && (F.f = G, F.block = z, F.htmlState = null);
|
|
116094
116101
|
}
|
|
116095
116102
|
return ae;
|
|
116096
116103
|
}
|
|
116097
116104
|
function Q(U, F) {
|
|
116098
|
-
var ae = F.listStack[F.listStack.length - 1] || 0,
|
|
116099
|
-
if (F.fencedEndRE && F.indentation <= ve && (
|
|
116105
|
+
var ae = F.listStack[F.listStack.length - 1] || 0, ue = F.indentation < ae, ve = ae + 3;
|
|
116106
|
+
if (F.fencedEndRE && F.indentation <= ve && (ue || U.match(F.fencedEndRE))) {
|
|
116100
116107
|
r.highlightFormatting && (F.formatting = "code-block");
|
|
116101
116108
|
var Qe;
|
|
116102
|
-
return
|
|
116109
|
+
return ue || (Qe = L(F)), F.localMode = F.localState = null, F.block = z, F.f = G, F.fencedEndRE = null, F.code = 0, F.thisLine.fencedCodeEnd = !0, ue ? M(U, F, F.block) : Qe;
|
|
116103
116110
|
} else
|
|
116104
116111
|
return F.localMode ? F.localMode.token(U, F.localState) : (U.skipToEnd(), l.code);
|
|
116105
116112
|
}
|
|
@@ -116115,8 +116122,8 @@ function tDe() {
|
|
|
116115
116122
|
if (U.taskClosed)
|
|
116116
116123
|
return F.push("property"), F.length ? F.join(" ") : null;
|
|
116117
116124
|
if (U.linkHref ? F.push(l.linkHref, "url") : (U.strong && F.push(l.strong), U.em && F.push(l.em), U.strikethrough && F.push(l.strikethrough), U.emoji && F.push(l.emoji), U.linkText && F.push(l.linkText), U.code && F.push(l.code), U.image && F.push(l.image), U.imageAltText && F.push(l.imageAltText, "link"), U.imageMarker && F.push(l.imageMarker)), U.header && F.push(l.header, l.header + "-" + U.header), U.quote && (F.push(l.quote), !r.maxBlockquoteDepth || r.maxBlockquoteDepth >= U.quote ? F.push(l.quote + "-" + U.quote) : F.push(l.quote + "-" + r.maxBlockquoteDepth)), U.list !== !1) {
|
|
116118
|
-
var
|
|
116119
|
-
|
|
116125
|
+
var ue = (U.listStack.length - 1) % 3;
|
|
116126
|
+
ue ? ue === 1 ? F.push(l.list2) : F.push(l.list3) : F.push(l.list1);
|
|
116120
116127
|
}
|
|
116121
116128
|
return U.trailingSpaceNewLine ? F.push("trailing-space-new-line") : U.trailingSpace && F.push("trailing-space-" + (U.trailingSpace % 2 ? "a" : "b")), F.length ? F.join(" ") : null;
|
|
116122
116129
|
}
|
|
@@ -116131,8 +116138,8 @@ function tDe() {
|
|
|
116131
116138
|
if (F.list)
|
|
116132
116139
|
return F.list = null, L(F);
|
|
116133
116140
|
if (F.taskList) {
|
|
116134
|
-
var
|
|
116135
|
-
return
|
|
116141
|
+
var ue = U.match(h, !0)[1] === " ";
|
|
116142
|
+
return ue ? F.taskOpen = !0 : F.taskClosed = !0, r.highlightFormatting && (F.formatting = "task"), F.taskList = !1, L(F);
|
|
116136
116143
|
}
|
|
116137
116144
|
if (F.taskOpen = !1, F.taskClosed = !1, F.header && U.match(/^#+$/, !0))
|
|
116138
116145
|
return r.highlightFormatting && (F.formatting = "header"), L(F);
|
|
@@ -116237,8 +116244,8 @@ function tDe() {
|
|
|
116237
116244
|
var ae = U.next();
|
|
116238
116245
|
if (ae === ">") {
|
|
116239
116246
|
F.f = F.inline = G, r.highlightFormatting && (F.formatting = "link");
|
|
116240
|
-
var
|
|
116241
|
-
return
|
|
116247
|
+
var ue = L(F);
|
|
116248
|
+
return ue ? ue += " " : ue = "", ue + l.linkInline;
|
|
116242
116249
|
}
|
|
116243
116250
|
return U.match(/^[^>]+/, !0), l.linkInline;
|
|
116244
116251
|
}
|
|
@@ -116254,8 +116261,8 @@ function tDe() {
|
|
|
116254
116261
|
};
|
|
116255
116262
|
function V(U) {
|
|
116256
116263
|
return function(F, ae) {
|
|
116257
|
-
var
|
|
116258
|
-
if (
|
|
116264
|
+
var ue = F.next();
|
|
116265
|
+
if (ue === U) {
|
|
116259
116266
|
ae.f = ae.inline = G, r.highlightFormatting && (ae.formatting = "link-string");
|
|
116260
116267
|
var ve = L(ae);
|
|
116261
116268
|
return ae.linkHref = !1, ve;
|
|
@@ -118551,53 +118558,53 @@ function NDe({
|
|
|
118551
118558
|
j.useEffect(() => {
|
|
118552
118559
|
f.setEditable(x), h.setEditable(x);
|
|
118553
118560
|
}, [x, f, h]);
|
|
118554
|
-
const H = async (
|
|
118561
|
+
const H = async (ue) => {
|
|
118555
118562
|
var qe;
|
|
118556
|
-
const ve = URL.createObjectURL(
|
|
118563
|
+
const ve = URL.createObjectURL(ue[0]);
|
|
118557
118564
|
L(ve);
|
|
118558
|
-
const { width: Qe, height: Xe } = await rp(ve), rt = await W.upload(
|
|
118565
|
+
const { width: Qe, height: Xe } = await rp(ve), rt = await W.upload(ue), _t = (qe = rt == null ? void 0 : rt[0]) == null ? void 0 : qe.url;
|
|
118559
118566
|
_t && k.update(() => {
|
|
118560
118567
|
const lt = N.$getNodeByKey(t);
|
|
118561
118568
|
lt.productImageSrc = _t, lt.productImageHeight = Xe, lt.productImageWidth = Qe;
|
|
118562
118569
|
}), L(""), URL.revokeObjectURL(ve);
|
|
118563
|
-
}, R = async (
|
|
118564
|
-
|
|
118570
|
+
}, R = async (ue) => {
|
|
118571
|
+
ue.target.files[0] && await H(ue.target.files);
|
|
118565
118572
|
}, q = () => {
|
|
118566
118573
|
k.update(() => {
|
|
118567
|
-
const
|
|
118568
|
-
|
|
118574
|
+
const ue = N.$getNodeByKey(t);
|
|
118575
|
+
ue.productImageSrc = "";
|
|
118569
118576
|
});
|
|
118570
118577
|
};
|
|
118571
|
-
async function V(
|
|
118572
|
-
await H(
|
|
118578
|
+
async function V(ue) {
|
|
118579
|
+
await H(ue);
|
|
118573
118580
|
}
|
|
118574
|
-
const K = (
|
|
118581
|
+
const K = (ue) => {
|
|
118575
118582
|
k.update(() => {
|
|
118576
118583
|
const ve = N.$getNodeByKey(t);
|
|
118577
|
-
ve.productButtonEnabled =
|
|
118584
|
+
ve.productButtonEnabled = ue.target.checked;
|
|
118578
118585
|
});
|
|
118579
|
-
}, te = (
|
|
118586
|
+
}, te = (ue) => {
|
|
118580
118587
|
k.update(() => {
|
|
118581
118588
|
const ve = N.$getNodeByKey(t);
|
|
118582
|
-
ve.productButton =
|
|
118589
|
+
ve.productButton = ue.target.value;
|
|
118583
118590
|
});
|
|
118584
|
-
}, se = (
|
|
118591
|
+
}, se = (ue) => {
|
|
118585
118592
|
k.update(() => {
|
|
118586
118593
|
const ve = N.$getNodeByKey(t);
|
|
118587
|
-
ve.productUrl =
|
|
118594
|
+
ve.productUrl = ue;
|
|
118588
118595
|
});
|
|
118589
|
-
}, fe = (
|
|
118596
|
+
}, fe = (ue) => {
|
|
118590
118597
|
k.update(() => {
|
|
118591
118598
|
const ve = N.$getNodeByKey(t);
|
|
118592
|
-
ve.productRatingEnabled =
|
|
118599
|
+
ve.productRatingEnabled = ue.target.checked;
|
|
118593
118600
|
});
|
|
118594
|
-
}, U = (
|
|
118601
|
+
}, U = (ue) => {
|
|
118595
118602
|
k.update(() => {
|
|
118596
118603
|
const ve = N.$getNodeByKey(t);
|
|
118597
|
-
ve.productStarRating =
|
|
118604
|
+
ve.productStarRating = ue;
|
|
118598
118605
|
});
|
|
118599
|
-
}, F = (
|
|
118600
|
-
|
|
118606
|
+
}, F = (ue) => {
|
|
118607
|
+
ue.preventDefault(), ue.stopPropagation(), S(!0);
|
|
118601
118608
|
};
|
|
118602
118609
|
return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
118603
118610
|
/* @__PURE__ */ y.jsx(
|
|
@@ -118801,7 +118808,7 @@ function $G({
|
|
|
118801
118808
|
handleButtonTextBlur: U,
|
|
118802
118809
|
setFileInputRef: F
|
|
118803
118810
|
}) {
|
|
118804
|
-
const [ae,
|
|
118811
|
+
const [ae, ue] = wt(!1), [ve, Qe] = wt(!1), Xe = (oe) => oe === "transparent" ? "" : nG(Le(oe)).hex(), rt = ({ r: oe, g: Re, b: Wt, a: Ln }) => {
|
|
118805
118812
|
const Dt = Ln / 255;
|
|
118806
118813
|
return Tg({
|
|
118807
118814
|
r: oe * Dt + 255 * (1 - Dt),
|
|
@@ -119083,7 +119090,7 @@ function $G({
|
|
|
119083
119090
|
title: "Image",
|
|
119084
119091
|
type: "button",
|
|
119085
119092
|
onClick: () => {
|
|
119086
|
-
m(),
|
|
119093
|
+
m(), ue(!1), Qe(!1);
|
|
119087
119094
|
},
|
|
119088
119095
|
children: /* @__PURE__ */ y.jsx(KX, { className: "size-[1.4rem]" })
|
|
119089
119096
|
}
|
|
@@ -119096,10 +119103,10 @@ function $G({
|
|
|
119096
119103
|
value: n && T !== "split" ? "" : s,
|
|
119097
119104
|
onPickerChange: (oe) => x(oe, Xe(oe)),
|
|
119098
119105
|
onSwatchChange: (oe) => {
|
|
119099
|
-
x(oe, Xe(oe)),
|
|
119106
|
+
x(oe, Xe(oe)), ue(!1);
|
|
119100
119107
|
},
|
|
119101
119108
|
onTogglePicker: (oe) => {
|
|
119102
|
-
oe && (T !== "split" && g(), s && x(s, Xe(s))),
|
|
119109
|
+
oe && (T !== "split" && g(), s && x(s, Xe(s))), ue(oe), oe && Qe(!oe);
|
|
119103
119110
|
}
|
|
119104
119111
|
}
|
|
119105
119112
|
),
|
|
@@ -119149,7 +119156,7 @@ function $G({
|
|
|
119149
119156
|
_(oe, Xe(oe)), Qe(!1);
|
|
119150
119157
|
},
|
|
119151
119158
|
onTogglePicker: (oe) => {
|
|
119152
|
-
Qe(oe), oe &&
|
|
119159
|
+
Qe(oe), oe && ue(!oe);
|
|
119153
119160
|
}
|
|
119154
119161
|
}
|
|
119155
119162
|
),
|
|
@@ -119266,7 +119273,7 @@ function DDe({
|
|
|
119266
119273
|
const oe = N.$getNodeByKey(a);
|
|
119267
119274
|
oe.backgroundSize = De;
|
|
119268
119275
|
});
|
|
119269
|
-
},
|
|
119276
|
+
}, ue = (De) => {
|
|
119270
119277
|
De.preventDefault(), De.stopPropagation(), M.dispatchCommand(co, { cardKey: a, focusEditor: !1 });
|
|
119271
119278
|
}, ve = I.useFileUpload("image"), Qe = async (De) => {
|
|
119272
119279
|
M.update(() => {
|
|
@@ -119400,7 +119407,7 @@ function DDe({
|
|
|
119400
119407
|
"data-kg-card-toolbar": "signup",
|
|
119401
119408
|
isVisible: W && !z && !Q,
|
|
119402
119409
|
children: /* @__PURE__ */ y.jsxs(fi, { children: [
|
|
119403
|
-
/* @__PURE__ */ y.jsx(ot, { icon: "edit", isActive: !1, label: "Edit", onClick:
|
|
119410
|
+
/* @__PURE__ */ y.jsx(ot, { icon: "edit", isActive: !1, label: "Edit", onClick: ue }),
|
|
119404
119411
|
/* @__PURE__ */ y.jsx(Xn, { hide: !T.createSnippet }),
|
|
119405
119412
|
/* @__PURE__ */ y.jsx(
|
|
119406
119413
|
ot,
|
|
@@ -119912,16 +119919,16 @@ function BDe({
|
|
|
119912
119919
|
const ae = F[0];
|
|
119913
119920
|
if (!ae)
|
|
119914
119921
|
return;
|
|
119915
|
-
let
|
|
119922
|
+
let ue, ve, Qe, Xe, rt;
|
|
119916
119923
|
try {
|
|
119917
|
-
({ thumbnailBlob:
|
|
119924
|
+
({ thumbnailBlob: ue, duration: ve, width: Qe, height: Xe, mimeType: rt } = await FDe(ae));
|
|
119918
119925
|
} catch {
|
|
119919
119926
|
I([{
|
|
119920
119927
|
name: ae.name,
|
|
119921
119928
|
message: `The file type you uploaded is not supported. Please use .${Q.join(", .").toUpperCase()}`
|
|
119922
119929
|
}]);
|
|
119923
119930
|
}
|
|
119924
|
-
x(URL.createObjectURL(
|
|
119931
|
+
x(URL.createObjectURL(ue));
|
|
119925
119932
|
const _t = await _.upload([ae]), qe = (Yt = _t == null ? void 0 : _t[0]) == null ? void 0 : Yt.url;
|
|
119926
119933
|
if (!qe) {
|
|
119927
119934
|
x("");
|
|
@@ -119931,7 +119938,7 @@ function BDe({
|
|
|
119931
119938
|
const Le = N.$getNodeByKey(t);
|
|
119932
119939
|
Le.src = qe, Le.duration = ve, Le.fileName = ae.name, Le.width = Qe, Le.height = Xe, Le.mimeType = rt, Le.customThumbnailSrc || (Le.thumbnailWidth = Qe, Le.thumbnailHeight = Xe);
|
|
119933
119940
|
});
|
|
119934
|
-
const lt = new File([
|
|
119941
|
+
const lt = new File([ue], `${ae.name}.jpg`, { type: "image/jpeg" }), mt = await S.upload([lt], { formData: { url: qe } }), Pt = (tn = mt == null ? void 0 : mt[0]) == null ? void 0 : tn.url;
|
|
119935
119942
|
Pt && f.update(() => {
|
|
119936
119943
|
const Le = N.$getNodeByKey(t);
|
|
119937
119944
|
Le.thumbnailSrc = Pt;
|
|
@@ -119940,10 +119947,10 @@ function BDe({
|
|
|
119940
119947
|
F.target.files[0] && await L(F.target.files);
|
|
119941
119948
|
}, G = async (F) => {
|
|
119942
119949
|
var Xe;
|
|
119943
|
-
const ae = await C.upload(F),
|
|
119944
|
-
|
|
119950
|
+
const ae = await C.upload(F), ue = (Xe = ae == null ? void 0 : ae[0]) == null ? void 0 : Xe.url, { width: ve, height: Qe } = await rp(ue);
|
|
119951
|
+
ue && f.update(() => {
|
|
119945
119952
|
const rt = N.$getNodeByKey(t);
|
|
119946
|
-
rt.customThumbnailSrc =
|
|
119953
|
+
rt.customThumbnailSrc = ue, rt.thumbnailWidth = ve, rt.thumbnailHeight = Qe;
|
|
119947
119954
|
});
|
|
119948
119955
|
}, H = async (F) => {
|
|
119949
119956
|
await G(F.target.files);
|
|
@@ -130418,7 +130425,7 @@ const xQe = [
|
|
|
130418
130425
|
pi.ListItemNode,
|
|
130419
130426
|
Mi.LinkNode,
|
|
130420
130427
|
ro
|
|
130421
|
-
], U1 = xQe, oZe = "1.3.
|
|
130428
|
+
], U1 = xQe, oZe = "1.3.25";
|
|
130422
130429
|
export {
|
|
130423
130430
|
PD as $isAtStartOfDocument,
|
|
130424
130431
|
DD as $isAtTopOfNode,
|