@wix/blog 1.0.697 → 1.0.698

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.
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // context-post-context-provider.ts
21
21
  var context_post_context_provider_exports = {};
22
22
  __export(context_post_context_provider_exports, {
23
- PostProvider: () => Uh,
24
- default: () => Uh,
25
- injectAccessTokenGetter: () => Wh,
26
- usePostContext: () => Ih
23
+ PostProvider: () => Yh,
24
+ default: () => Yh,
25
+ injectAccessTokenGetter: () => Xh,
26
+ usePostContext: () => Hh
27
27
  });
28
28
  module.exports = __toCommonJS(context_post_context_provider_exports);
29
29
 
@@ -4938,19 +4938,33 @@ var Lp = (e6, t2) => {
4938
4938
  return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
4939
4939
  };
4940
4940
  var Rp = eu({ isDev: false, loadMessages: (e6) => Lp(e6, ``), loadDevMessages: (e6) => Lp(e6, `.dev`) });
4941
- var zp = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
4942
- function Bp(e6) {
4941
+ var zp = (e6) => E(O(e6, [{ transformFn: L, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: I, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: R, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
4942
+ var Bp = `https://blog.wixsite.com/blog-demo-posts`;
4943
+ var Vp = A((e6) => async (t2) => {
4944
+ let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${j(t2)}`);
4945
+ if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
4946
+ return zp(await n2.json()).filter((e7) => !e7.url?.startsWith(Bp));
4947
+ });
4948
+ var Hp = async (e6) => {
4949
+ try {
4950
+ return await Vp(e6);
4951
+ } catch (e7) {
4952
+ return console.info(`[blog demo posts]`, `read failed`, e7), [];
4953
+ }
4954
+ };
4955
+ var Up = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
4956
+ function Wp(e6) {
4943
4957
  return M(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
4944
4958
  }
4945
- var Vp = `@wix/auto_sdk_members_members`;
4946
- function Hp(e6) {
4959
+ var Gp = `@wix/auto_sdk_members_members`;
4960
+ function Kp(e6) {
4947
4961
  function t2({ host: t3 }) {
4948
- return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: Vp, migrationOptions: { optInTransformResponse: true }, url: Bp({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: j(e6), transformResponse: (e7) => O(e7, [{ transformFn: D, paths: zp }]) };
4962
+ return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: Gp, migrationOptions: { optInTransformResponse: true }, url: Wp({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: j(e6), transformResponse: (e7) => O(e7, [{ transformFn: D, paths: Up }]) };
4949
4963
  }
4950
4964
  return t2;
4951
4965
  }
4952
- async function Up(e6, t2) {
4953
- let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Hp(T({ id: e6, fieldsets: t2?.fieldsets }));
4966
+ async function qp(e6, t2) {
4967
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Kp(T({ id: e6, fieldsets: t2?.fieldsets }));
4954
4968
  r2?.onSiteCall?.();
4955
4969
  try {
4956
4970
  let e7 = await n2.request(i2);
@@ -4960,43 +4974,43 @@ async function Up(e6, t2) {
4960
4974
  throw r2?.onError?.(e7), t3;
4961
4975
  }
4962
4976
  }
4963
- function Wp(e6) {
4964
- return (t2, n2) => Up(t2, n2, { httpClient: e6 });
4977
+ function Jp(e6) {
4978
+ return (t2, n2) => qp(t2, n2, { httpClient: e6 });
4965
4979
  }
4966
- var Gp = A(Wp);
4967
- var Kp = async (e6) => {
4980
+ var Yp = A(Jp);
4981
+ var Xp = async (e6) => {
4968
4982
  try {
4969
- return await Gp(e6, { fieldsets: [`PUBLIC`] });
4983
+ return await Yp(e6, { fieldsets: [`PUBLIC`] });
4970
4984
  } catch {
4971
4985
  return;
4972
4986
  }
4973
4987
  };
4974
- var qp = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
4975
- var Jp = [{ path: `posts.richContentCompressed` }];
4976
- var Yp = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
4977
- var Xp = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
4978
- function Zp(e6) {
4988
+ var Zp = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
4989
+ var Qp = [{ path: `posts.richContentCompressed` }];
4990
+ var $p = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
4991
+ var em = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
4992
+ function tm(e6) {
4979
4993
  return M(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
4980
4994
  }
4981
- var Qp = `@wix/auto_sdk_blog_posts`;
4982
- function $p(e6) {
4995
+ var nm = `@wix/auto_sdk_blog_posts`;
4996
+ function rm(e6) {
4983
4997
  function t2({ host: t3 }) {
4984
- let n2 = O(e6, [{ transformFn: hn, paths: Xp }]);
4985
- return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Qp, migrationOptions: { optInTransformResponse: true }, url: Zp({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => O(e7, [{ transformFn: D, paths: qp }, { transformFn: gn, paths: Jp }, { transformFn: N, paths: Yp }]) };
4998
+ let n2 = O(e6, [{ transformFn: hn, paths: em }]);
4999
+ return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: nm, migrationOptions: { optInTransformResponse: true }, url: tm({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => O(e7, [{ transformFn: D, paths: Zp }, { transformFn: gn, paths: Qp }, { transformFn: N, paths: $p }]) };
4986
5000
  }
4987
5001
  return t2;
4988
5002
  }
4989
- function em() {
4990
- let e6 = $p({});
5003
+ function im() {
5004
+ let e6 = rm({});
4991
5005
  return { getUrl: (t2) => {
4992
5006
  let { url: n2 } = e6(t2);
4993
5007
  return n2;
4994
5008
  }, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
4995
5009
  }
4996
- var tm = em();
4997
- var nm = (e6) => (t2) => ({ method: `POST`, url: tm.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
5010
+ var am = im();
5011
+ var om = (e6) => (t2) => ({ method: `POST`, url: am.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
4998
5012
  A((e6) => async (t2) => {
4999
- let { data: n2 } = await e6.request(nm(t2)), r2 = {};
5013
+ let { data: n2 } = await e6.request(om(t2)), r2 = {};
5000
5014
  for (let e7 of n2.posts ?? []) {
5001
5015
  let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
5002
5016
  if (!t3 || !n3?.length) continue;
@@ -5005,42 +5019,43 @@ A((e6) => async (t2) => {
5005
5019
  }
5006
5020
  return r2;
5007
5021
  });
5008
- var rm = class extends Error {
5022
+ var sm = class extends Error {
5009
5023
  constructor(e6, t2) {
5010
5024
  super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
5011
5025
  }
5012
5026
  };
5013
- var im = (e6, t2, n2) => {
5027
+ var cm = (e6, t2, n2) => {
5014
5028
  let r2, i2 = new Promise((e7, i3) => {
5015
- r2 = setTimeout(() => i3(new rm(n2, t2)), t2);
5029
+ r2 = setTimeout(() => i3(new sm(n2, t2)), t2);
5016
5030
  });
5017
5031
  return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
5018
5032
  };
5019
- var am = [G.RICH_CONTENT, G.SEO, G.URL, G.CONTENT_TEXT, `TRANSLATIONS`];
5020
- G.RICH_CONTENT, G.URL, G.URL, G.METRICS;
5021
- var om = (e6) => {
5033
+ var lm = [G.RICH_CONTENT, G.SEO, G.URL, G.CONTENT_TEXT, `TRANSLATIONS`];
5034
+ var um = [G.RICH_CONTENT, G.URL];
5035
+ G.URL, G.METRICS;
5036
+ var dm = (e6) => {
5022
5037
  let { status: t2, details: n2 } = e6 ?? {};
5023
5038
  return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
5024
5039
  };
5025
- var sm = (e6, t2) => {
5026
- if (t2 && !om(e6)) throw e6;
5040
+ var fm = (e6, t2) => {
5041
+ if (t2 && !dm(e6)) throw e6;
5027
5042
  };
5028
- var cm = async (e6, t2, n2 = false, r2) => {
5043
+ var pm = async (e6, t2, n2 = false, r2) => {
5029
5044
  try {
5030
5045
  let { post: n3 } = await tc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
5031
5046
  if (n3) return n3;
5032
5047
  } catch (e7) {
5033
- sm(e7, n2);
5048
+ fm(e7, n2);
5034
5049
  }
5035
5050
  try {
5036
5051
  let { items: n3 } = await ac(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
5037
5052
  return n3[0];
5038
5053
  } catch (e7) {
5039
- sm(e7, n2);
5054
+ fm(e7, n2);
5040
5055
  return;
5041
5056
  }
5042
5057
  };
5043
- var lm = async (e6, t2 = false, n2) => {
5058
+ var mm = async (e6, t2 = false, n2) => {
5044
5059
  try {
5045
5060
  let t3 = async (t4) => {
5046
5061
  let { posts: r2 } = await nc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
@@ -5048,12 +5063,12 @@ var lm = async (e6, t2 = false, n2) => {
5048
5063
  };
5049
5064
  return await t3(true) ?? (n2 ? await t3(false) : void 0);
5050
5065
  } catch (e7) {
5051
- sm(e7, t2);
5066
+ fm(e7, t2);
5052
5067
  return;
5053
5068
  }
5054
5069
  };
5055
- var um = async (e6, t2 = false, n2) => (e6 ? await cm(e6, am, t2, n2) : void 0) ?? await lm(am, t2, n2);
5056
- var dm = async (e6) => {
5070
+ var hm = async (e6, t2 = false, n2) => (e6 ? await pm(e6, lm, t2, n2) : void 0) ?? await mm(lm, t2, n2);
5071
+ var gm = async (e6) => {
5057
5072
  try {
5058
5073
  let { metrics: t2 } = await rc(e6);
5059
5074
  return t2;
@@ -5061,51 +5076,52 @@ var dm = async (e6) => {
5061
5076
  return;
5062
5077
  }
5063
5078
  };
5064
- var fm = 100;
5065
- var pm = async () => {
5079
+ var _m = 100;
5080
+ var vm = async () => {
5066
5081
  try {
5067
- let { categories: e6 } = await ai({ paging: { limit: fm } });
5082
+ let { categories: e6 } = await ai({ paging: { limit: _m } });
5068
5083
  return e6 ?? [];
5069
5084
  } catch {
5070
5085
  return [];
5071
5086
  }
5072
5087
  };
5073
- var mm = (e6, t2) => {
5088
+ var ym = (e6, t2) => {
5074
5089
  let { categoryIds: n2 } = e6 ?? {};
5075
5090
  if (!n2?.length) return [];
5076
5091
  let r2 = new Map(t2.map((e7) => [e7._id, e7]));
5077
5092
  return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
5078
5093
  };
5079
- var hm = 30;
5080
- var gm = async (e6) => {
5094
+ var bm = 30;
5095
+ var xm = async (e6) => {
5081
5096
  if (!e6?.length) return [];
5082
5097
  try {
5083
- let { items: t2 } = await _c().in(`_id`, e6).limit(hm).find();
5098
+ let { items: t2 } = await _c().in(`_id`, e6).limit(bm).find();
5084
5099
  return t2 ?? [];
5085
5100
  } catch {
5086
5101
  return [];
5087
5102
  }
5088
5103
  };
5089
- var _m = (e6, t2) => {
5104
+ var Sm = (e6, t2) => {
5090
5105
  let { tagIds: n2 } = e6 ?? {};
5091
5106
  if (!n2?.length) return [];
5092
5107
  let r2 = new Map(t2.map((e7) => [e7._id, e7]));
5093
5108
  return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
5094
5109
  };
5095
- var vm = 1e3;
5096
- var ym = async (e6, t2 = false, n2) => {
5097
- let r2 = pm();
5098
- return bm(await um(e6, t2, n2), r2);
5110
+ var Cm = async (e6, t2) => e6.post ? e6 : { ...e6, demoPost: (await Hp({ paging: { limit: 1, offset: 0 }, fieldsets: um, ...t2 && { language: t2 } }))[0] };
5111
+ var wm = 1e3;
5112
+ var Tm = async (e6, t2 = false, n2) => {
5113
+ let r2 = vm();
5114
+ return Em(await hm(e6, t2, n2), r2);
5099
5115
  };
5100
- var bm = async (e6, t2) => {
5101
- let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Kp(r2) : void 0, n2 ? dm(n2) : void 0, t2, gm(i2), a2 && n2 ? im(Bl(n2, e6?.language ?? void 0), vm, `post-paywall`).catch(() => void 0) : void 0]);
5102
- return { post: e6, author: o2, metrics: s2, categories: mm(e6, c2), tags: _m(e6, l2), ...u2 && { paywall: u2 } };
5116
+ var Em = async (e6, t2) => {
5117
+ let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2] = await Promise.all([r2 ? Xp(r2) : void 0, n2 ? gm(n2) : void 0, t2, xm(i2), a2 && n2 ? cm(Bl(n2, e6?.language ?? void 0), wm, `post-paywall`).catch(() => void 0) : void 0]);
5118
+ return { post: e6, author: o2, metrics: s2, categories: ym(e6, c2), tags: Sm(e6, l2), ...u2 && { paywall: u2 } };
5103
5119
  };
5104
- var xm = (e6) => {
5120
+ var Dm = (e6) => {
5105
5121
  let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
5106
5122
  return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
5107
5123
  };
5108
- var Sm = async (e6, t2) => {
5124
+ var Om = async (e6, t2) => {
5109
5125
  try {
5110
5126
  let { items: n2 } = await ac().eq(`translationId`, e6).eq(`language`, t2).limit(1).find();
5111
5127
  return n2[0]?.slug ?? void 0;
@@ -5113,7 +5129,7 @@ var Sm = async (e6, t2) => {
5113
5129
  return;
5114
5130
  }
5115
5131
  };
5116
- var Cm = class extends import_react.Component {
5132
+ var km = class extends import_react.Component {
5117
5133
  state = { error: void 0 };
5118
5134
  static getDerivedStateFromError(e6) {
5119
5135
  return { error: e6 ?? Error(`Unknown render error`) };
@@ -5127,30 +5143,30 @@ var Cm = class extends import_react.Component {
5127
5143
  return this.props.fallback;
5128
5144
  }
5129
5145
  };
5130
- var wm = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
5131
- var Tm = { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [] };
5132
- var Em = [so.RICH_CONTENT, so.GENERATED_EXCERPT];
5133
- var Dm = A((e6) => () => e6.fetchWithAuth);
5134
- var Om = (e6) => e6 ? Dm() : (...e7) => globalThis.fetch(...e7);
5135
- var km = (e6, t2) => Je({ modules: { draftPosts: si }, auth: { getAuthHeaders: () => ({ headers: { authorization: e6 } }) }, fetch: Om(t2) });
5136
- var Am = (e6) => {
5146
+ var Am = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
5147
+ var jm = { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [] };
5148
+ var Mm = [so.RICH_CONTENT, so.GENERATED_EXCERPT];
5149
+ var Nm = A((e6) => () => e6.fetchWithAuth);
5150
+ var Pm = (e6) => e6 ? Nm() : (...e7) => globalThis.fetch(...e7);
5151
+ var Fm = (e6, t2) => Je({ modules: { draftPosts: si }, auth: { getAuthHeaders: () => ({ headers: { authorization: e6 } }) }, fetch: Pm(t2) });
5152
+ var Im = (e6) => {
5137
5153
  let { _id: t2, title: n2, excerpt: r2, seoSlug: i2, memberId: a2, minutesToRead: o2, categoryIds: s2, tagIds: c2, firstPublishedDate: l2, richContent: u2, media: d2 } = e6 ?? {};
5138
5154
  if (t2) return { _id: t2, title: n2, excerpt: r2 ?? void 0, slug: i2 ?? void 0, memberId: a2 ?? void 0, minutesToRead: o2, categoryIds: s2, tagIds: c2, firstPublishedDate: l2 ?? void 0, richContent: u2, ...d2 && { media: d2 } };
5139
5155
  };
5140
- var jm = (e6) => e6 instanceof Error ? e6.message : String(e6);
5141
- var Mm = async ({ draftPostId: e6, instance: t2 }, n2) => {
5142
- let r2 = pm();
5156
+ var Lm = (e6) => e6 instanceof Error ? e6.message : String(e6);
5157
+ var Rm = async ({ draftPostId: e6, instance: t2 }, n2) => {
5158
+ let r2 = vm();
5143
5159
  try {
5144
- let { draftPost: i2 } = await km(t2, n2).draftPosts.getDraftPost(e6, { fieldsets: Em }), a2 = Am(i2), { memberId: o2, tagIds: s2 } = a2 ?? {}, [c2, l2, u2] = await Promise.all([o2 ? Kp(o2) : void 0, r2, gm(s2)]);
5145
- return { post: a2, author: c2, metrics: void 0, categories: mm(a2, l2), tags: _m(a2, u2) };
5160
+ let { draftPost: i2 } = await Fm(t2, n2).draftPosts.getDraftPost(e6, { fieldsets: Mm }), a2 = Im(i2), { memberId: o2, tagIds: s2 } = a2 ?? {}, [c2, l2, u2] = await Promise.all([o2 ? Xp(o2) : void 0, r2, xm(s2)]);
5161
+ return { post: a2, author: c2, metrics: void 0, categories: ym(a2, l2), tags: Sm(a2, u2) };
5146
5162
  } catch (e7) {
5147
- let t3 = jm(e7);
5148
- return console.error(`[blog-builder] draft preview fetch failed (${t3})`, e7), { ...Tm, reason: t3 };
5163
+ let t3 = Lm(e7);
5164
+ return console.error(`[blog-builder] draft preview fetch failed (${t3})`, e7), { ...jm, reason: t3 };
5149
5165
  }
5150
5166
  };
5151
- var Nm = (0, import_react.createContext)(void 0);
5152
- var Pm = (0, import_react.createContext)(void 0);
5153
- var Fm = (e6) => {
5167
+ var zm = (0, import_react.createContext)(void 0);
5168
+ var Bm = (0, import_react.createContext)(void 0);
5169
+ var Vm = (e6) => {
5154
5170
  let t2;
5155
5171
  try {
5156
5172
  t2 = (0, import_services_manager_react.useService)(kc);
@@ -5159,41 +5175,41 @@ var Fm = (e6) => {
5159
5175
  }
5160
5176
  return Hc(t2, e6);
5161
5177
  };
5162
- var Im = 1e4;
5163
- function Lm(e6) {
5178
+ var Hm = 1e4;
5179
+ function Um(e6) {
5164
5180
  let [t2, n2] = (0, import_react.useState)(void 0);
5165
5181
  return (0, import_react.useEffect)(() => {
5166
5182
  let t3 = Date.now();
5167
- t3 - e6 > Im && (0, import_react.startTransition)(() => n2(t3));
5183
+ t3 - e6 > Hm && (0, import_react.startTransition)(() => n2(t3));
5168
5184
  }, []), t2 ?? e6;
5169
5185
  }
5170
- var Rm = `wix.blog.v3.post`;
5171
- var zm = async (e6) => {
5172
- await Gr({ like: { entityId: e6, fqdn: Rm } });
5186
+ var Wm = `wix.blog.v3.post`;
5187
+ var Gm = async (e6) => {
5188
+ await Gr({ like: { entityId: e6, fqdn: Wm } });
5173
5189
  };
5174
- var Bm = async (e6) => {
5175
- await Kr({ fqdn: Rm, entityId: e6 });
5190
+ var Km = async (e6) => {
5191
+ await Kr({ fqdn: Wm, entityId: e6 });
5176
5192
  };
5177
- var Vm = (e6) => typeof e6 == `number` ? e6 : void 0;
5178
- var Hm = async (e6) => {
5179
- let [t2, n2] = await Promise.allSettled([qr().eq(`fqdn`, Rm).eq(`entityId`, e6).limit(1).find(), rc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
5180
- return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Vm(r2?.likes), viewCount: Vm(r2?.views), commentCount: Vm(r2?.comments) };
5193
+ var qm = (e6) => typeof e6 == `number` ? e6 : void 0;
5194
+ var Jm = async (e6) => {
5195
+ let [t2, n2] = await Promise.allSettled([qr().eq(`fqdn`, Wm).eq(`entityId`, e6).limit(1).find(), rc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
5196
+ return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: qm(r2?.likes), viewCount: qm(r2?.views), commentCount: qm(r2?.comments) };
5181
5197
  };
5182
- var Um = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
5183
- var Wm = `wix-blog:post-like-toggled`;
5184
- var Gm = () => {
5198
+ var Ym = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
5199
+ var Xm = `wix-blog:post-like-toggled`;
5200
+ var Zm = () => {
5185
5201
  let e6 = window;
5186
- return e6[Wm] ??= /* @__PURE__ */ new Map();
5202
+ return e6[Xm] ??= /* @__PURE__ */ new Map();
5187
5203
  };
5188
- var Km = (e6) => {
5189
- Gm().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Wm, { detail: e6 }));
5204
+ var Qm = (e6) => {
5205
+ Zm().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Xm, { detail: e6 }));
5190
5206
  };
5191
- var qm = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
5192
- var Jm = (e6, t2, n2 = false, r2) => {
5193
- let o2 = bc() || n2, [d2, f2] = (0, import_react.useState)(Um), p2 = (0, import_react.useRef)(Um), m2 = (0, import_react.useRef)(t2), h2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), g2 = (0, import_react.useRef)(false), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(void 0), y2 = Dc(), [b2, x2] = (0, import_react.useState)(0);
5207
+ var $m = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
5208
+ var eh = (e6, t2, n2 = false, r2) => {
5209
+ let o2 = bc() || n2, [d2, f2] = (0, import_react.useState)(Ym), p2 = (0, import_react.useRef)(Ym), m2 = (0, import_react.useRef)(t2), h2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), g2 = (0, import_react.useRef)(false), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(void 0), y2 = Dc(), [b2, x2] = (0, import_react.useState)(0);
5194
5210
  (0, import_react.useEffect)(() => {
5195
5211
  let e7 = y2?.addMemberLoginListener?.(() => {
5196
- Gm().clear(), x2((e8) => e8 + 1);
5212
+ Zm().clear(), x2((e8) => e8 + 1);
5197
5213
  });
5198
5214
  return () => {
5199
5215
  e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
@@ -5202,18 +5218,18 @@ var Jm = (e6, t2, n2 = false, r2) => {
5202
5218
  let S2 = (0, import_react.useCallback)((e7) => {
5203
5219
  let t3 = p2.current, n3 = { ...t3, ...e7 };
5204
5220
  Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => f2(n3)));
5205
- }, []), ee2 = (0, import_react.useMemo)(() => ({ get: () => qm(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
5221
+ }, []), ee2 = (0, import_react.useMemo)(() => ({ get: () => $m(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
5206
5222
  h2.current.delete(e7);
5207
5223
  }) }), []);
5208
5224
  (0, import_react.useEffect)(() => {
5209
5225
  m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
5210
5226
  }, [t2]), (0, import_react.useEffect)(() => {
5211
- if (v2.current !== e6 && (v2.current = e6, S2(Um)), _2.current = false, !e6 || o2) {
5227
+ if (v2.current !== e6 && (v2.current = e6, S2(Ym)), _2.current = false, !e6 || o2) {
5212
5228
  S2({ isLikeCountLoaded: true });
5213
5229
  return;
5214
5230
  }
5215
5231
  let t3 = false;
5216
- return Hm(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i2 }) => {
5232
+ return Jm(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i2 }) => {
5217
5233
  t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
5218
5234
  }).catch((n3) => {
5219
5235
  t3 || S2({ isLikeCountLoaded: true }), rl(r2, n3, { feature: el.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
@@ -5224,32 +5240,32 @@ var Jm = (e6, t2, n2 = false, r2) => {
5224
5240
  if (!e6) return;
5225
5241
  let t3 = (e7) => {
5226
5242
  _2.current = true, S2({ liked: e7 });
5227
- }, n3 = Gm().get(e6);
5243
+ }, n3 = Zm().get(e6);
5228
5244
  n3 !== void 0 && t3(n3);
5229
5245
  let r3 = (n4) => {
5230
5246
  let { detail: r4 } = n4;
5231
5247
  r4.postId === e6 && t3(r4.liked);
5232
5248
  };
5233
- return window.addEventListener(Wm, r3), () => window.removeEventListener(Wm, r3);
5249
+ return window.addEventListener(Xm, r3), () => window.removeEventListener(Xm, r3);
5234
5250
  }, [e6, S2]);
5235
5251
  let te2 = (0, import_react.useCallback)(async (t3) => {
5236
5252
  if (!e6 || g2.current) return;
5237
5253
  _2.current = true;
5238
5254
  let n3 = !p2.current.liked;
5239
- if (S2({ liked: n3 }), Km({ postId: e6, liked: n3 }), !o2) {
5255
+ if (S2({ liked: n3 }), Qm({ postId: e6, liked: n3 }), !o2) {
5240
5256
  g2.current = true;
5241
5257
  try {
5242
- await (n3 ? zm(e6) : Bm(e6));
5258
+ await (n3 ? Gm(e6) : Km(e6));
5243
5259
  } catch (t4) {
5244
- S2({ liked: !n3 }), Km({ postId: e6, liked: !n3 }), rl(r2, t4, { feature: el.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
5260
+ S2({ liked: !n3 }), Qm({ postId: e6, liked: !n3 }), rl(r2, t4, { feature: el.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
5245
5261
  } finally {
5246
5262
  g2.current = false;
5247
5263
  }
5248
5264
  }
5249
5265
  }, [e6, o2, r2, S2]);
5250
- return { ...qm(d2, t2), toggleLike: te2, liveLikes: ee2 };
5266
+ return { ...$m(d2, t2), toggleLike: te2, liveLikes: ee2 };
5251
5267
  };
5252
- var Ym = () => {
5268
+ var th = () => {
5253
5269
  try {
5254
5270
  let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(jl);
5255
5271
  return e6 || t2;
@@ -5257,144 +5273,144 @@ var Ym = () => {
5257
5273
  return;
5258
5274
  }
5259
5275
  };
5260
- var Xm = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
5276
+ var nh = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
5261
5277
  var Q = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
5262
- var Zm = (e6, t2) => {
5263
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: Xm(r2, `full`, t2) });
5278
+ var rh = (e6, t2) => {
5279
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: nh(r2, `full`, t2) });
5264
5280
  return { timeToRead: (t3) => e6(Q.timeToRead, { count: t3 }), viewCount: n2(Q.viewCount), commentCount: n2(Q.commentCount), likeCount: n2(Q.likeCount), noPostsEmptyState: () => ({ title: e6(Q.noPostsTitle), description: e6(Q.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(Q.noRelatedPostsTitle), description: e6(Q.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(Q.canvasPostTitle), authorName: () => e6(Q.canvasAuthorName), excerpt: () => e6(Q.canvasExcerpt), content: () => e6(Q.canvasContent), category: () => e6(Q.canvasCategory), categoryNumbered: (t3) => e6(Q.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(Q.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(Q.canvasCoverAlt), authorPhotoAlt: () => e6(Q.canvasAuthorPhotoAlt) } };
5265
5281
  };
5266
- var Qm = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
5267
- var $ = (e6) => ({ text: e6, html: `<p>${Qm(e6)}</p>`, linkList: [] });
5268
- var $m = 6e4;
5269
- var eh = $m * 60;
5270
- var th = eh * 24;
5271
- var nh = th * 7;
5272
- var rh = (e6) => e6 < $m ? [`second`, e6 / 1e3] : e6 < eh ? [`minute`, e6 / $m] : e6 < th ? [`hour`, e6 / eh] : [`day`, e6 / th];
5273
- var ih = (e6, t2, n2 = Date.now()) => {
5282
+ var ih = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
5283
+ var $ = (e6) => ({ text: e6, html: `<p>${ih(e6)}</p>`, linkList: [] });
5284
+ var ah = 6e4;
5285
+ var oh = ah * 60;
5286
+ var sh = oh * 24;
5287
+ var ch = sh * 7;
5288
+ var lh = (e6) => e6 < ah ? [`second`, e6 / 1e3] : e6 < oh ? [`minute`, e6 / ah] : e6 < sh ? [`hour`, e6 / oh] : [`day`, e6 / sh];
5289
+ var uh = (e6, t2, n2 = Date.now()) => {
5274
5290
  let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
5275
- if (i2 >= 0 && i2 < nh) {
5276
- let [e7, n3] = rh(i2);
5291
+ if (i2 >= 0 && i2 < ch) {
5292
+ let [e7, n3] = lh(i2);
5277
5293
  return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
5278
5294
  }
5279
5295
  let a2 = r2.getFullYear() === new Date(n2).getFullYear();
5280
5296
  return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
5281
5297
  };
5282
- var ah = `https://static.wixstatic.com/media/`;
5283
- var oh = `wix:video://`;
5284
- var sh = (e6) => {
5298
+ var dh = `https://static.wixstatic.com/media/`;
5299
+ var fh = `wix:video://`;
5300
+ var ph = (e6) => {
5285
5301
  if (!e6) return;
5286
5302
  let t2 = Number.parseInt(e6, 10);
5287
5303
  return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
5288
5304
  };
5289
- var ch = (e6) => {
5290
- if (!e6.startsWith(oh)) return;
5305
+ var mh = (e6) => {
5306
+ if (!e6.startsWith(fh)) return;
5291
5307
  let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
5292
5308
  if (!r2) return;
5293
5309
  let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
5294
- return { id: decodeURIComponent(r2), posterUrl: a2 ? `${ah}${a2}` : void 0, posterWidth: sh(i2.get(`posterWidth`)), posterHeight: sh(i2.get(`posterHeight`)) };
5310
+ return { id: decodeURIComponent(r2), posterUrl: a2 ? `${dh}${a2}` : void 0, posterWidth: ph(i2.get(`posterWidth`)), posterHeight: ph(i2.get(`posterHeight`)) };
5295
5311
  };
5296
- var lh = (e6) => {
5312
+ var hh = (e6) => {
5297
5313
  let t2 = hl(e6), n2 = e6?.media?.wixMedia?.videoV2;
5298
5314
  if (t2 || !n2) return t2;
5299
- let r2 = ch(n2), i2 = ml(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
5315
+ let r2 = mh(n2), i2 = ml(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
5300
5316
  return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
5301
5317
  };
5302
- var uh = (e6) => {
5318
+ var gh = (e6) => {
5303
5319
  if (!e6) return;
5304
5320
  let t2 = e6 instanceof Date ? e6 : new Date(e6);
5305
5321
  return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
5306
5322
  };
5307
- var dh = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
5308
- var fh = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
5309
- var ph = (e6, t2) => {
5310
- let n2 = fh(e6, t2);
5323
+ var _h = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
5324
+ var vh = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
5325
+ var yh = (e6, t2) => {
5326
+ let n2 = vh(e6, t2);
5311
5327
  return n2 ? { href: n2, target: `_self` } : void 0;
5312
5328
  };
5313
- var mh = { href: `#`, target: `_self` };
5314
- var hh = (e6, t2) => {
5329
+ var bh = { href: `#`, target: `_self` };
5330
+ var xh = (e6, t2) => {
5315
5331
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
5316
- return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: ph(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
5332
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: yh(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
5317
5333
  };
5318
- var gh = 2;
5319
- var _h = (e6) => Array.from({ length: gh }, (t2, n2) => {
5334
+ var Sh = 2;
5335
+ var Ch = (e6) => Array.from({ length: Sh }, (t2, n2) => {
5320
5336
  let r2 = e6.canvas.categoryNumbered(n2 + 1);
5321
- return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: mh, categoryItem: { label: r2, slug: `` } };
5337
+ return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: bh, categoryItem: { label: r2, slug: `` } };
5322
5338
  });
5323
- var vh = (e6, t2) => {
5339
+ var wh = (e6, t2) => {
5324
5340
  let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
5325
- return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: ph(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
5341
+ return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: yh(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
5326
5342
  };
5327
- var yh = 3;
5328
- var bh = (e6) => Array.from({ length: yh }, (t2, n2) => {
5343
+ var Th = 3;
5344
+ var Eh = (e6) => Array.from({ length: Th }, (t2, n2) => {
5329
5345
  let r2 = e6.canvas.tagNumbered(n2 + 1);
5330
- return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: mh, tagItem: { label: r2, slug: `` } };
5346
+ return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: bh, tagItem: { label: r2, slug: `` } };
5331
5347
  });
5332
- var xh = 1;
5333
- var Sh = { views: 120, comments: 4, likes: 12 };
5334
- var Ch = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
5335
- var wh = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
5336
- var Th = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
5337
- var Eh = { nodes: [] };
5338
- var Dh = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Eh, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
5339
- var Oh = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Dh() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: lh(e6), richContent: e6?.richContent ?? Ch(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: sl(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(xh) : ``), publishedDate: $(ih(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: wh(n2?.views, Sh.views, s2, a2.viewCount), commentCount: wh(n2?.comments, Sh.comments, s2, a2.commentCount), likeCount: wh(n2?.likes, Sh.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? _h(a2) : r2.map((e7) => hh(e7, l2.category)), postTags: i2.length === 0 && s2 ? bh(a2) : i2.map((e7) => vh(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && lh(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: uh(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: dh(e6?.minutesToRead) ?? (s2 ? xh : void 0), viewCountValue: Th(n2?.views, Sh.views, s2), commentCountValue: Th(n2?.comments, Sh.comments, s2) };
5340
- var kh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
5341
- let { t: a2 } = sp(), o2 = Ym(), s2 = (0, import_react.useMemo)(() => Zm(a2, o2), [a2, o2]), l2 = Lm(e6.fetchedAt), u2 = Rl(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = Jm(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Fm(Mc), y2 = Fm(`tag`), b2 = (0, import_react.useMemo)(() => xm(e6.post), [e6]), x2 = ql(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5348
+ var Dh = 1;
5349
+ var Oh = { views: 120, comments: 4, likes: 12 };
5350
+ var kh = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
5351
+ var Ah = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
5352
+ var jh = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
5353
+ var Mh = { nodes: [] };
5354
+ var Nh = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, richContent: Mh, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
5355
+ var Ph = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2 }, a2, o2, s2 = false, c2 = Date.now(), l2 = {}) => !e6 && !s2 ? Nh() : { title: $(e6?.title ?? a2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? a2.canvas.excerpt()), coverImage: hh(e6), richContent: e6?.richContent ?? kh(a2.canvas.content()), authorName: $(t2?.profile?.nickname ?? a2.canvas.authorName()), authorImage: sl(t2, a2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? a2.timeToRead(e6.minutesToRead) : s2 ? a2.timeToRead(Dh) : ``), publishedDate: $(uh(e6?.firstPublishedDate ?? new Date(c2), o2, c2)), viewCount: Ah(n2?.views, Oh.views, s2, a2.viewCount), commentCount: Ah(n2?.comments, Oh.comments, s2, a2.commentCount), likeCount: Ah(n2?.likes, Oh.likes, s2, a2.likeCount), postCategories: r2.length === 0 && s2 ? Ch(a2) : r2.map((e7) => xh(e7, l2.category)), postTags: i2.length === 0 && s2 ? Eh(a2) : i2.map((e7) => wh(e7, l2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && hh(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: gh(e6?.firstPublishedDate) ?? (s2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: _h(e6?.minutesToRead) ?? (s2 ? Dh : void 0), viewCountValue: jh(n2?.views, Oh.views, s2), commentCountValue: jh(n2?.comments, Oh.comments, s2) };
5356
+ var Fh = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
5357
+ let { t: a2 } = sp(), o2 = th(), s2 = (0, import_react.useMemo)(() => rh(a2, o2), [a2, o2]), l2 = Um(e6.fetchedAt), u2 = Rl(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = eh(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Vm(Mc), y2 = Vm(`tag`), b2 = (0, import_react.useMemo)(() => Dm(e6.post), [e6]), x2 = ql(), S2 = (0, import_react.useMemo)(() => e6.post?.richContent && e6.paywall ? Gl(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
5342
5358
  return (0, import_react.useMemo)(() => {
5343
- let n3 = Oh(e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5359
+ let n3 = Ph(!e6.post && u2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, u2, l2, { category: v2, tag: y2 });
5344
5360
  return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, postUrl: r2 || !e6.post ? void 0 : Vc(e6.post, i2)?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: l2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !u2 };
5345
5361
  }, [e6, t2, b2, S2, s2, o2, l2, f2, d2, p2, m2, h2, g2, _2, u2, r2, i2, v2, y2]);
5346
5362
  };
5347
- var Ah = (e6) => ({ post: e6, hasError: false });
5348
- var jh = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
5349
- var Mh = (e6) => {
5363
+ var Ih = (e6) => ({ post: e6, hasError: false });
5364
+ var Lh = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
5365
+ var Rh = (e6) => {
5350
5366
  throw e6;
5351
5367
  };
5352
- var Nh = { ...Dh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5368
+ var zh = { ...Nh(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
5353
5369
  }, liveLikes: void 0, postUrl: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, isLoadingPost: true, hasError: false, isEmpty: false };
5354
- var Ph = { ...Nh, isLoadingPost: false, hasError: true, isEmpty: true };
5355
- var Fh = (0, import_react.createContext)(void 0);
5356
- function Ih() {
5357
- let e6 = (0, import_react.useContext)(Fh);
5370
+ var Bh = { ...zh, isLoadingPost: false, hasError: true, isEmpty: true };
5371
+ var Vh = (0, import_react.createContext)(void 0);
5372
+ function Hh() {
5373
+ let e6 = (0, import_react.useContext)(Vh);
5358
5374
  if (!e6) throw Error(`usePostContext must be used within a PostProvider`);
5359
5375
  return e6;
5360
5376
  }
5361
- var Lh = new Promise(() => {
5377
+ var Uh = new Promise(() => {
5362
5378
  });
5363
- var Rh = 2500;
5364
- var zh = (e6) => {
5379
+ var Wh = 2500;
5380
+ var Gh = (e6) => {
5365
5381
  try {
5366
5382
  return decodeURIComponent(e6);
5367
5383
  } catch {
5368
5384
  return e6;
5369
5385
  }
5370
5386
  };
5371
- var Bh = ({ children: e6, postLoadPromise: t2, monitoringClient: n2, slug: r2, language: i2, isPostInPreview: o2 }) => {
5372
- let { post: s2, hasError: c2 } = Kn(t2), l2 = Oc(s2, (0, import_react.useCallback)(() => um(r2, false, i2), [r2, i2]));
5373
- Al(l2, o2, n2), Yl(r2 && l2.post?.slug === zh(r2) && !o2 ? l2.post : void 0, i2, Sm);
5387
+ var Kh = ({ children: e6, postLoadPromise: t2, monitoringClient: n2, slug: r2, language: i2, isPostInPreview: o2 }) => {
5388
+ let { post: s2, hasError: c2 } = Kn(t2), l2 = Oc(s2, (0, import_react.useCallback)(() => hm(r2, false, i2), [r2, i2]));
5389
+ Al(l2, o2, n2), Yl(r2 && l2.post?.slug === Gh(r2) && !o2 ? l2.post : void 0, i2, Om);
5374
5390
  let { _id: u2 } = l2.post ?? {};
5375
5391
  xc(o2 ? void 0 : u2 ?? void 0);
5376
- let d2 = kh({ postWithAuthor: l2, hasError: c2, monitoringClient: n2, isPostInPreview: o2, postPageBase: Uc(r2) });
5377
- return Zc(Yc.postProvider, c2 ? `error` : l2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(Fh.Provider, { value: d2, children: e6 });
5378
- };
5379
- function Vh({ children: e6 }) {
5380
- let n2 = Kc(), r2 = Jc(), i2 = Nl(), a2 = Cc(), { draftPostId: o2, instance: s2 } = n2 ?? {}, l2 = Zl(), u2 = (0, import_react.useMemo)(() => tl(Wn), []), { i18n: d2, locale: f2 } = Ap(Rp), h2 = Tc(() => {
5381
- let e7 = o2 && s2 ? wm(Mm({ draftPostId: o2, instance: s2 }, a2)) : _p({ key: r2 ? `blog-builder:post:${r2}|${i2 ?? ``}` : null, warmupData: l2, fetchData: () => {
5382
- let e8 = ym(r2, a2, i2);
5383
- return wm(il(u2, `post-read`, { feature: el.post }, a2 ? im(e8, Rh, `post`) : e8));
5384
- } }), t2 = e7.then(({ post: e8 }) => xm(e8));
5392
+ let d2 = Fh({ postWithAuthor: l2, hasError: c2, monitoringClient: n2, isPostInPreview: o2, postPageBase: Uc(r2) });
5393
+ return Zc(Yc.postProvider, c2 ? `error` : l2.post ? `data` : `empty`), (0, import_jsx_runtime.jsx)(Vh.Provider, { value: d2, children: e6 });
5394
+ };
5395
+ function qh({ children: e6 }) {
5396
+ let n2 = Kc(), r2 = Jc(), i2 = Nl(), a2 = Cc(), { draftPostId: o2, instance: s2 } = n2 ?? {}, l2 = Rl(), u2 = Zl(), d2 = (0, import_react.useMemo)(() => tl(Wn), []), { i18n: f2, locale: h2 } = Ap(Rp), g2 = Tc(() => {
5397
+ let e7 = o2 && s2 ? Am(Rm({ draftPostId: o2, instance: s2 }, a2)) : _p({ key: r2 ? `blog-builder:post:${r2}|${i2 ?? ``}` : null, warmupData: u2, fetchData: () => {
5398
+ let e8 = Tm(r2, a2, i2).then((e9) => l2 ? Cm(e9, i2) : e9);
5399
+ return Am(il(d2, `post-read`, { feature: el.post }, a2 ? cm(e8, Wh, `post`) : e8));
5400
+ } }), t2 = e7.then(({ post: e8 }) => Dm(e8));
5385
5401
  return t2.catch(() => {
5386
- }), { slug: r2, language: i2, isPostInPreview: !!o2, postLoadPromise: Jn(e7, Ah, a2 ? Mh : jh), relatedSourcePromise: t2 };
5387
- }, [o2, s2, i2, r2, a2, l2, u2]);
5388
- return (0, import_jsx_runtime.jsx)(Nm.Provider, { value: h2.relatedSourcePromise, children: (0, import_jsx_runtime.jsx)(cp, { i18n: d2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Fh.Provider, { value: Nh, children: e6 }), children: [(0, import_jsx_runtime.jsx)(kp, { i18n: d2, locale: f2 }), (0, import_jsx_runtime.jsx)(Cm, { fallback: (0, import_jsx_runtime.jsx)(Fh.Provider, { value: Ph, children: e6 }), feature: el.post, monitoringClient: u2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(Bh, { postLoadPromise: h2.postLoadPromise, monitoringClient: u2, slug: h2.isPostInPreview ? void 0 : h2.slug, language: h2.language, isPostInPreview: h2.isPostInPreview, children: e6 }) })] }) }) });
5402
+ }), { slug: r2, language: i2, isPostInPreview: !!o2, postLoadPromise: Jn(e7, Ih, a2 ? Rh : Lh), relatedSourcePromise: t2 };
5403
+ }, [o2, s2, i2, r2, a2, l2, u2, d2]);
5404
+ return (0, import_jsx_runtime.jsx)(zm.Provider, { value: g2.relatedSourcePromise, children: (0, import_jsx_runtime.jsx)(cp, { i18n: f2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Vh.Provider, { value: zh, children: e6 }), children: [(0, import_jsx_runtime.jsx)(kp, { i18n: f2, locale: h2 }), (0, import_jsx_runtime.jsx)(km, { fallback: (0, import_jsx_runtime.jsx)(Vh.Provider, { value: Bh, children: e6 }), feature: el.post, monitoringClient: d2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(Kh, { postLoadPromise: g2.postLoadPromise, monitoringClient: d2, slug: g2.isPostInPreview ? void 0 : g2.slug, language: g2.language, isPostInPreview: g2.isPostInPreview, children: e6 }) })] }) }) });
5389
5405
  }
5390
- function Hh({ children: e6, value: t2 }) {
5391
- let n2 = (0, import_react.useMemo)(() => t2.isLoadingPost ? Lh : Promise.resolve(t2.relatedPostsSource), [t2.isLoadingPost, t2.relatedPostsSource]);
5392
- return (0, import_jsx_runtime.jsx)(Pm.Provider, { value: t2.relatedPostsSource.currentPostId, children: (0, import_jsx_runtime.jsx)(Nm.Provider, { value: n2, children: (0, import_jsx_runtime.jsx)(Fh.Provider, { value: t2, children: e6 }) }) });
5406
+ function Jh({ children: e6, value: t2 }) {
5407
+ let n2 = (0, import_react.useMemo)(() => t2.isLoadingPost ? Uh : Promise.resolve(t2.relatedPostsSource), [t2.isLoadingPost, t2.relatedPostsSource]);
5408
+ return (0, import_jsx_runtime.jsx)(Bm.Provider, { value: t2.relatedPostsSource.currentPostId, children: (0, import_jsx_runtime.jsx)(zm.Provider, { value: n2, children: (0, import_jsx_runtime.jsx)(Vh.Provider, { value: t2, children: e6 }) }) });
5393
5409
  }
5394
- function Uh({ children: e6, value: t2 }) {
5395
- return t2 === void 0 ? (0, import_jsx_runtime.jsx)(Vh, { children: e6 }) : (0, import_jsx_runtime.jsx)(Hh, { value: t2, children: e6 });
5410
+ function Yh({ children: e6, value: t2 }) {
5411
+ return t2 === void 0 ? (0, import_jsx_runtime.jsx)(qh, { children: e6 }) : (0, import_jsx_runtime.jsx)(Jh, { value: t2, children: e6 });
5396
5412
  }
5397
- var Wh = Ln(`d89e577c-857b-4604-ab4a-9801a3386d40`);
5413
+ var Xh = Ln(`d89e577c-857b-4604-ab4a-9801a3386d40`);
5398
5414
  // Annotate the CommonJS export names for ESM import in node:
5399
5415
  0 && (module.exports = {
5400
5416
  PostProvider,