@gem-sdk/pages 17.0.0-dev.67 → 17.0.0-dev.72

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.
@@ -1 +1 @@
1
- "use strict";exports.PublishedThemePageMetafields=void 0,function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format"}(exports.PublishedThemePageMetafields||(exports.PublishedThemePageMetafields={})),exports.LIBRARY_TYPE_ENUM=void 0,function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(exports.LIBRARY_TYPE_ENUM||(exports.LIBRARY_TYPE_ENUM={}));
1
+ "use strict";exports.PublishedThemePageMetafields=void 0,function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format",_.ILP_DISABLE_GS_FONT="ilp_disable_gs_font"}(exports.PublishedThemePageMetafields||(exports.PublishedThemePageMetafields={})),exports.LIBRARY_TYPE_ENUM=void 0,function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(exports.LIBRARY_TYPE_ENUM||(exports.LIBRARY_TYPE_ENUM={}));
@@ -1 +1 @@
1
- "use strict";var e=require("@gem-sdk/core"),a=require("@gem-sdk/adapter-shopify"),l=require("../google-fonts.js"),t=require("../helpers/gen-css.js"),s=require("../helpers/get-fallback.js"),i=require("../helpers/normalize.js"),o=require("../helpers/parse-json.js"),r=require("@sentry/nextjs"),d=require("../../constants/index.js"),u=require("../helpers/get-metafield.js"),n=require("../custom-fonts.js"),h=require("../helpers/generate-seo-links.js");exports.getHomePagePropsV2=(m,g)=>async()=>{try{let[r,P,p,T]=await Promise.allSettled([m([e.PublishedThemePagesDocument.toString(),{slugType:"STATIC"}]),m([e.StorePropertyDocument.toString()]),g([a.ShopMetaDocument]),m([e.PublishedShopMetasDocument.toString(),{keys:[d.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,d.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===r.status)throw Error(r.reason?.[0]);let f="fulfilled"===T.status?T.value:void 0,c=r.value?.publishedThemePages?.[0],y=r.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!c)throw Error("No data builder found for Home page");let M=i.parseBuilderTemplateV2(c),[b,S,A,I]=await Promise.all([l.getFontStyleFromPageTemplate(M,void 0,c?.pageStyle?.data),l.getFontLinkFromGlobalStyle(c?.pageStyle?.data,void 0),s.getFallbackV2(m,M),n.getCustomFonts(y)]),_=c.isMobile??!1,L=u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,c?.metafields)||f?.publishedShopMetas?.find(e=>e?.key===d.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,C=o.parseJson(u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,c?.metafields)||f?.publishedShopMetas?.find(e=>e?.key===d.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),B="fulfilled"===p.status?p.value:void 0,v="fulfilled"===P.status?P.value:void 0,D=v?.storeProperty?.favicon??"/favicon/favicon-32x32.png",E={defaultTitle:B?.shop.name,title:c?.name??"Home",description:L??B?.shop.description,openGraph:{locale:B?.localization.country.isoCode,title:c?.name??B?.shop.name,description:L??B?.shop.description,images:C?[C]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${v?.storeProperty?.primaryDomain}/`,additionalLinkTags:h.generateSeoLinks({favicon:D,shopMeta:B})},k=B?.localization.language.isoCode??null,O=B?.localization.country.isoCode??null,j=k&&O?`${k}-${O}`:null;return o.serializableJson({id:r.value?.publishedThemePages?.[0]?.id??null,shopID:r.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:t.genCSS(c?.pageStyle?.data,_),fontStyle:S,elementFontStyle:b,builderData:M,swr:{fallback:A},moneyFormat:B?.shop.moneyFormat??null,currency:B?.localization.country.currency.isoCode??null,languageIsoCode:k,countryIsoCode:O,locale:j,swatches:o.parseJson(v?.storeProperty?.swatchesConfig),seo:E,mobileOnly:_,gaTrackingId:u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,c?.metafields)??null,facebookPixelId:u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,c?.metafields)??null,tiktokPixelId:u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,c?.metafields)??null,customCodeHeader:u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,c?.metafields)??null,customCodeBody:u.getPublishedThemePageMetafieldByKey(d.PublishedThemePageMetafields.CUSTOM_CODE_BODY,c?.metafields)??null,pageHandle:c.handle??null,customFonts:I})}catch(e){throw r.captureException(e),e}};
1
+ "use strict";var e=require("@gem-sdk/core"),a=require("@gem-sdk/adapter-shopify"),l=require("../google-fonts.js"),t=require("../helpers/gen-css.js"),s=require("../helpers/get-fallback.js"),i=require("../helpers/normalize.js"),o=require("../helpers/parse-json.js"),d=require("@sentry/nextjs"),r=require("../../constants/index.js"),u=require("../helpers/get-metafield.js"),n=require("../custom-fonts.js"),h=require("../helpers/generate-seo-links.js");exports.getHomePagePropsV2=(m,g)=>async()=>{try{let[d,P,T,p]=await Promise.allSettled([m([e.PublishedThemePagesDocument.toString(),{slugType:"STATIC"}]),m([e.StorePropertyDocument.toString()]),g([a.ShopMetaDocument]),m([e.PublishedShopMetasDocument.toString(),{keys:[r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===d.status)throw Error(d.reason?.[0]);let f="fulfilled"===p.status?p.value:void 0,c=d.value?.publishedThemePages?.[0],y=d.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!c)throw Error("No data builder found for Home page");let M=i.parseBuilderTemplateV2(c),[b,S,_,I]=await Promise.all([l.getFontStyleFromPageTemplate(M,void 0,c?.pageStyle?.data),l.getFontLinkFromGlobalStyle(c?.pageStyle?.data,void 0),s.getFallbackV2(m,M),n.getCustomFonts(y)]),A=c.isMobile??!1,L=u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,c?.metafields)||f?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,B=o.parseJson(u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,c?.metafields)||f?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),C="true"===u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ILP_DISABLE_GS_FONT,c?.metafields),D="fulfilled"===T.status?T.value:void 0,E="fulfilled"===P.status?P.value:void 0,v=E?.storeProperty?.favicon??"/favicon/favicon-32x32.png",O={defaultTitle:D?.shop.name,title:c?.name??"Home",description:L??D?.shop.description,openGraph:{locale:D?.localization.country.isoCode,title:c?.name??D?.shop.name,description:L??D?.shop.description,images:B?[B]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${E?.storeProperty?.primaryDomain}/`,additionalLinkTags:h.generateSeoLinks({favicon:v,shopMeta:D})},k=D?.localization.language.isoCode??null,j=D?.localization.country.isoCode??null,q=k&&j?`${k}-${j}`:null;return o.serializableJson({id:d.value?.publishedThemePages?.[0]?.id??null,shopID:d.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:t.genCSS(c?.pageStyle?.data,A),fontStyle:S,elementFontStyle:b,builderData:M,swr:{fallback:_},moneyFormat:D?.shop.moneyFormat??null,currency:D?.localization.country.currency.isoCode??null,languageIsoCode:k,countryIsoCode:j,locale:q,swatches:o.parseJson(E?.storeProperty?.swatchesConfig),seo:O,mobileOnly:A,disableGsFont:C,gaTrackingId:u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,c?.metafields)??null,facebookPixelId:u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,c?.metafields)??null,tiktokPixelId:u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,c?.metafields)??null,customCodeHeader:u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,c?.metafields)??null,customCodeBody:u.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_BODY,c?.metafields)??null,pageHandle:c.handle??null,customFonts:I})}catch(e){throw d.captureException(e),e}};
@@ -1 +1 @@
1
- "use strict";var e=require("@gem-sdk/core"),a=require("@gem-sdk/adapter-shopify"),l=require("../google-fonts.js"),t=require("../helpers/gen-css.js"),s=require("../helpers/get-fallback.js"),i=require("../helpers/normalize.js"),d=require("../helpers/parse-json.js"),o=require("@sentry/nextjs"),u=require("../custom-fonts.js"),h=require("../helpers/get-metafield.js"),r=require("../../constants/index.js"),n=require("../helpers/generate-seo-links.js");exports.getStaticPagePropsV2=(P,g)=>async m=>{try{let o="STATIC",[T,f,p,c]=await Promise.allSettled([P([e.PublishedThemePagesDocument.toString(),{slug:m,slugType:o}]),P([e.StorePropertyDocument.toString()]),g([a.ShopMetaDocument]),P([e.PublishedShopMetasDocument.toString(),{keys:["source_font",r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,r.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY,r.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===T.status)throw Error(T.reason?.[0]);let M="fulfilled"===c.status?c.value:void 0,b=M?.publishedShopMetas?.find(e=>e?.key==="source_font"),y=M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY),_=M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT),S=T.value.publishedThemePages?.[0],E=T.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!S)throw Error(`No data builder found for slug: /${m}`);let I=i.parseBuilderTemplateV2(S),[C,L,A,O]=await Promise.all([l.getStaticFontFacesFromPageTemplate({pageTemplate:I,sourceFont:b?.value,data:S?.pageStyle?.data}),l.getStaticFontFacesFromGlobalStyle({data:S?.pageStyle?.data,sourceFont:b?.value}),s.getFallbackV2(P,I),u.getCustomFonts(E)]),B=S.isMobile??!1,v=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,N=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_TITLE,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_TITLE)?.value,k=d.parseJson(h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),D=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.NOINDEX_KEY,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.NOINDEX_KEY)?.value,F=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.NOFOLLOW_KEY,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value,K="fulfilled"===p.status?p.value:void 0,R="fulfilled"===f.status?f.value:void 0,Y=R?.storeProperty?.favicon??"/favicon/favicon-32x32.png",j={defaultTitle:K?.shop.name,title:N||S?.name,description:v??K?.shop.description,openGraph:{locale:K?.localization.country.isoCode,title:(N||S?.name)??K?.shop.name,description:v??K?.shop.description,images:k?[k]:[]},noindex:"true"===D,nofollow:"true"===F,canonical:`https://${R?.storeProperty?.primaryDomain}/${m}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:n.generateSeoLinks({favicon:Y,shopMeta:K})},q=K?.localization.language.isoCode??null,G=K?.localization.country.isoCode??null,H=q&&G?`${q}-${G}`:null;return d.serializableJson({id:T.value?.publishedThemePages?.[0]?.id??null,shopID:T.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:t.genCSS(S?.pageStyle?.data,B),fontStyle:L,elementFontStyle:C,builderData:I,pageType:o,moneyFormat:y?.value==="true"?_?.value:K?.shop.moneyFormat??null,currency:K?.localization.country.currency.isoCode??null,languageIsoCode:q,countryIsoCode:G,locale:H,swr:{fallback:A},swatches:d.parseJson(R?.storeProperty?.swatchesConfig),seo:j,mobileOnly:B,gaTrackingId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,S?.metafields)??null,facebookPixelId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,S?.metafields)??null,tiktokPixelId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,S?.metafields)??null,customCodeHeader:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,S?.metafields)??null,customCodeBody:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_BODY,S?.metafields)??null,pageHandle:S.handle??null,customFonts:O,interaction:S?.interaction,pageBackground:i.extractPageBackground(S)})}catch(e){throw o.captureException(e),e}};
1
+ "use strict";var e=require("@gem-sdk/core"),a=require("@gem-sdk/adapter-shopify"),t=require("../google-fonts.js"),l=require("../helpers/gen-css.js"),s=require("../helpers/get-fallback.js"),i=require("../helpers/normalize.js"),d=require("../helpers/parse-json.js"),o=require("@sentry/nextjs"),u=require("../custom-fonts.js"),h=require("../helpers/get-metafield.js"),r=require("../../constants/index.js"),n=require("../helpers/generate-seo-links.js");exports.getStaticPagePropsV2=(P,g)=>async m=>{try{let o="STATIC",[f,T,p,c]=await Promise.allSettled([P([e.PublishedThemePagesDocument.toString(),{slug:m,slugType:o}]),P([e.StorePropertyDocument.toString()]),g([a.ShopMetaDocument]),P([e.PublishedShopMetasDocument.toString(),{keys:["source_font",r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,r.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY,r.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===f.status)throw Error(f.reason?.[0]);let M="fulfilled"===c.status?c.value:void 0,b=M?.publishedShopMetas?.find(e=>e?.key==="source_font"),y=M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.SHOW_PRICE_CURRENCY),_=M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.MONEY_WITH_CURRENCY_FORMAT),S=f.value.publishedThemePages?.[0],E=f.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!S)throw Error(`No data builder found for slug: /${m}`);let I=i.parseBuilderTemplateV2(S),[L,A,C,O]=await Promise.all([t.getStaticFontFacesFromPageTemplate({pageTemplate:I,sourceFont:b?.value,data:S?.pageStyle?.data}),t.getStaticFontFacesFromGlobalStyle({data:S?.pageStyle?.data,sourceFont:b?.value}),s.getFallbackV2(P,I),u.getCustomFonts(E)]),B=S.isMobile??!1,N=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value,v=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_TITLE,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_TITLE)?.value,k=d.parseJson(h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value),D=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.NOINDEX_KEY,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.NOINDEX_KEY)?.value,F=h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.NOFOLLOW_KEY,S?.metafields)||M?.publishedShopMetas?.find(e=>e?.key===r.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value;console.log("\uD83D\uDE80 ~ getStaticPagePropsV2 ~ dataBuilder?.metafields:",S?.metafields);let K="true"===h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ILP_DISABLE_GS_FONT,S?.metafields);console.log("\uD83D\uDE80 ~ getStaticPagePropsV2 ~ disableGsFont 1:",K);let R="fulfilled"===p.status?p.value:void 0,G="fulfilled"===T.status?T.value:void 0,Y=G?.storeProperty?.favicon??"/favicon/favicon-32x32.png",j={defaultTitle:R?.shop.name,title:v||S?.name,description:N??R?.shop.description,openGraph:{locale:R?.localization.country.isoCode,title:(v||S?.name)??R?.shop.name,description:N??R?.shop.description,images:k?[k]:[]},noindex:"true"===D,nofollow:"true"===F,canonical:`https://${G?.storeProperty?.primaryDomain}/${m}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:n.generateSeoLinks({favicon:Y,shopMeta:R})},q=R?.localization.language.isoCode??null,H=R?.localization.country.isoCode??null,w=q&&H?`${q}-${H}`:null;return d.serializableJson({id:f.value?.publishedThemePages?.[0]?.id??null,shopID:f.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:l.genCSS(S?.pageStyle?.data,B),fontStyle:A,elementFontStyle:L,builderData:I,pageType:o,moneyFormat:y?.value==="true"?_?.value:R?.shop.moneyFormat??null,currency:R?.localization.country.currency.isoCode??null,languageIsoCode:q,countryIsoCode:H,locale:w,swr:{fallback:C},swatches:d.parseJson(G?.storeProperty?.swatchesConfig),seo:j,mobileOnly:B,disableGsFont:K,gaTrackingId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID,S?.metafields)??null,facebookPixelId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID,S?.metafields)??null,tiktokPixelId:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID,S?.metafields)??null,customCodeHeader:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_HEADER,S?.metafields)??null,customCodeBody:h.getPublishedThemePageMetafieldByKey(r.PublishedThemePageMetafields.CUSTOM_CODE_BODY,S?.metafields)??null,pageHandle:S.handle??null,customFonts:O,interaction:S?.interaction,pageBackground:i.extractPageBackground(S)})}catch(e){throw o.captureException(e),e}};
@@ -1 +1 @@
1
- "use strict";const e=e=>{let t={};return!function e(t,r={}){if(t){let{childrens:i,dateModified:o,editorConfigs:n,...a}=t;if("section"===a.type)r[a.uid]=a;else{let t=i?.map(e=>e?.uid)??[];r[a.uid]={...a,childrens:t},i&&i.map(t=>e(t,r))}}}(e,t),{...t}},t=(e,t)=>{let r=t?.filter(t=>e?.some(e=>e?.id===t)),i=r?.map(t=>e?.find(e=>e?.id===t))??[],o=e?.filter(e=>(!e?.id||!r?.includes(e.id))&&!e?.deletedAt)??[];return i.concat(o)};function r(r,i){let o=t(r,i),n=o.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return n.map(t=>({uid:t.uid,lazy:!!t.settings?.lazy,priority:!!t.settings?.priority,data:e(t)}))}exports.extractPageBackground=e=>{try{let t=e?.metafields?.find(e=>e?.key==="page_background")?.value;return JSON.parse(t??"{}")}catch{return{}}},exports.normalizeBuilderData=e,exports.normalizePageSectionResponseV2=r,exports.parseBuilderLibraryTemplate=e=>r([...e?.sections??[]],e?.sectionPosition),exports.parseBuilderTemplate=r=>(function(r,i){let o=t(r,i),n=o.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return e({uid:"ROOT",tag:"Root",childrens:n})})([...r?.pageSections??[],...r?.themePageCustomSections??[]],r?.sectionPosition),exports.parseBuilderTemplateV2=e=>r([...e?.pageSections??[],...e?.themePageCustomSections??[],...e?.themeSections??[]],e?.sectionPosition),exports.parseShopLibraryPageTemplate=e=>r([...e?.shopLibrarySections??[]],e?.sectionPosition);
1
+ "use strict";const e=(e,t)=>{if(!e||"object"!=typeof e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let r=e[n];if(!r||"object"!=typeof r)return!1;for(let e of Object.keys(r))if(!t(r[e]))return!1}return!0},t=t=>{let r=t?.advanced;return r&&"object"==typeof r&&("pageType"in r&&delete r.pageType,r.hasBoxShadow&&e(r.hasBoxShadow,e=>!1===e||void 0===e)&&(delete r.hasBoxShadow,delete r.boxShadow)),t},r=e=>{let r={};return!function e(r,n={}){if(r){let{childrens:i,dateModified:o,editorConfigs:a,...s}=r;if(t(s),"section"===s.type)n[s.uid]=s;else{let t=i?.map(e=>e?.uid)??[];n[s.uid]={...s,childrens:t},i&&i.map(t=>e(t,n))}}}(e,r),{...r}},n=new Set(["Image"]),i=e=>{if(!e||"object"!=typeof e||e.advanced?.d?.desktop===!1)return null;if(n.has(e.tag))return e;let t=Array.isArray(e.childrens)?e.childrens:[];for(let e of t){let t=i(e);if(t)return t}return null},o=e=>{if(!e?.length)return e;let t=e.find(e=>!e?.settings?.lazy);if(!t)return e;let r=i(t);return r&&(r.setting=r.setting||{},void 0===r.setting.priority&&(r.setting.priority=!0)),e},a=(e,t)=>{let r=t?.filter(t=>e?.some(e=>e?.id===t)),n=r?.map(t=>e?.find(e=>e?.id===t))??[],i=e?.filter(e=>(!e?.id||!r?.includes(e.id))&&!e?.deletedAt)??[];return n.concat(i)};function s(e,t){let n=a(e,t),i=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);o(i);let s=!1;return i.map(e=>{let t=!!e.settings?.lazy,n=!!e.settings?.priority,i=n;return t||s||(i=!0,s=!0),{uid:e.uid,lazy:t,priority:i,data:r(e)}})}exports.extractPageBackground=e=>{try{let t=e?.metafields?.find(e=>e?.key==="page_background")?.value;return JSON.parse(t??"{}")}catch{return{}}},exports.markLcpImage=o,exports.normalizeBuilderData=r,exports.normalizePageSectionResponseV2=s,exports.parseBuilderLibraryTemplate=e=>s([...e?.sections??[]],e?.sectionPosition),exports.parseBuilderTemplate=e=>(function(e,t){let n=a(e,t),i=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return r({uid:"ROOT",tag:"Root",childrens:i})})([...e?.pageSections??[],...e?.themePageCustomSections??[]],e?.sectionPosition),exports.parseBuilderTemplateV2=e=>s([...e?.pageSections??[],...e?.themePageCustomSections??[],...e?.themeSections??[]],e?.sectionPosition),exports.parseShopLibraryPageTemplate=e=>s([...e?.shopLibrarySections??[]],e?.sectionPosition),exports.stripDefaultAdvancedFields=t;
@@ -1 +1 @@
1
- "use strict";exports.parseJson=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}},exports.serializableJson=r=>JSON.parse(JSON.stringify(r));
1
+ "use strict";exports.parseJson=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}},exports.serializableJson=r=>JSON.parse(JSON.stringify(r)),exports.stableStringify=r=>JSON.stringify(r,(r,t)=>{if(t&&"object"==typeof t&&!Array.isArray(t)){let r={};for(let e of Object.keys(t).sort())r[e]=t[e];return r}return t});
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("next-seo"),s=require("next/dynamic"),i=require("next/head"),n=require("next/router");const d=s(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider));exports.default=({seo:s,components:o,builderData:l,sectionData:c,themeStyle:x,collection:a,fontStyle:u})=>{let j=n.useRouter();return j.isFallback?e.jsx("div",{children:"Loading..."}):e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...s}),e.jsxs(i,{children:[x&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}}),u&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),e.jsx(r.PageProvider,{children:e.jsx(r.BuilderComponentProvider,{components:o,children:e.jsx(r.SectionProvider,{data:c,children:e.jsx(d,{collection:a,children:l&&e.jsx(r.BuilderProvider,{state:l,children:e.jsx(r.Render,{uid:"ROOT"})})})})})})]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("next-seo"),s=require("next/dynamic"),i=require("next/head"),n=require("next/router"),o=require("react"),d=require("@gem-sdk/components");const l=s(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider));exports.default=({seo:s,components:c,builderData:u,sectionData:a,themeStyle:x,collection:j,fontStyle:m})=>{let g=n.useRouter(),h=o.useMemo(()=>c??d.buildPageRegistry(u),[c,u]);return g.isFallback?e.jsx("div",{children:"Loading..."}):e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...s}),e.jsxs(i,{children:[x&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}}),m&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:m}})]}),e.jsx(r.PageProvider,{children:e.jsx(r.BuilderComponentProvider,{components:h,children:e.jsx(r.SectionProvider,{data:a,children:e.jsx(l,{collection:j,children:u&&e.jsx(r.BuilderProvider,{state:u,children:e.jsx(r.Render,{uid:"ROOT"})})})})})})]})};
@@ -1,5 +1,5 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("next/head"),r=require("next/router"),a=require("../libs/parse-html.js"),n=require("react"),l=require("next/dynamic");exports.PreviewTemplate=({components:i,builderData:d,sectionData:o,themeStyle:c,fontStyle:g,elementFontStyle:u,customCodeHeader:p,customFonts:m,pageBackground:h,publicStoreFrontData:x,page:y,collection:j,dynamicCollection:f,dynamicProduct:_})=>{let{disableExternalLinks:v}=t.usePreviewSharePage(),b=r.useRouter(),{t:P}=t.useI18n(),q="custom-code-header",k=l(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),S=y?.type==="GP_COLLECTION"?k:n.Fragment;return(n.useEffect(()=>{let e=document.querySelectorAll(`[class*="${q}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),n.useEffect(()=>{v()},[v]),b.isFallback)?e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(s,{children:[a.parseHtml(q,p,!0),c&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:c}},"global-style"),g&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:g}},"google-fonts"),u&&u.map(t=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),m&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:m}},g),h?.isUsePageBackground&&h?.background&&e.jsx("style",{children:`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),s=require("next/head"),r=require("next/router"),a=require("../libs/parse-html.js"),n=require("react"),l=require("next/dynamic"),i=require("@gem-sdk/components");exports.PreviewTemplate=({components:d,builderData:o,sectionData:c,themeStyle:g,fontStyle:u,elementFontStyle:p,customCodeHeader:m,customFonts:h,pageBackground:x,publicStoreFrontData:y,page:j,collection:f,dynamicCollection:_,dynamicProduct:b})=>{let{disableExternalLinks:v}=t.usePreviewSharePage(),P=r.useRouter(),{t:q}=t.useI18n(),k=n.useMemo(()=>d??i.buildPageRegistry(o),[d,o]),S="custom-code-header",T=l(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),I=j?.type==="GP_COLLECTION"?T:n.Fragment;return(n.useEffect(()=>{let e=document.querySelectorAll(`[class*="${S}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),n.useEffect(()=>{v()},[v]),P.isFallback)?e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs(s,{children:[a.parseHtml(S,m,!0),g&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:g}},"global-style"),u&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}},"google-fonts"),p&&p.map(t=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),h&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:h}},u),x?.isUsePageBackground&&x?.background&&e.jsx("style",{children:`
2
2
  body {
3
- background: ${h.background};
3
+ background: ${x.background};
4
4
  }
5
- `},`page_background_${h?.background}`)]}),e.jsx(t.PageProvider,{publicStoreFrontData:x,dynamicCollection:f,dynamicProduct:_,children:e.jsx(S,{collection:j,children:e.jsx(t.BuilderComponentProvider,{components:i,children:e.jsx("div",{id:"storefront","data-page-name":y?.name,"data-assigned-product-title":_?.productTitle,"data-assigned-collection-title":f?.collectionTitle,children:e.jsx(t.SectionProvider,{data:o,children:e.jsx(t.I18nProvider,{t:P,children:d?.map(s=>e.jsx(e.Fragment,{children:e.jsx(t.BuilderProvider,{state:s.data,lazy:s.lazy,priority:s.priority,isPreview:!0,children:e.jsx(t.Render,{uid:s.uid})},s.uid)}))})})})})})})]})};
5
+ `},`page_background_${x?.background}`)]}),e.jsx(t.PageProvider,{publicStoreFrontData:y,dynamicCollection:_,dynamicProduct:b,children:e.jsx(I,{collection:f,children:e.jsx(t.BuilderComponentProvider,{components:k,children:e.jsx("div",{id:"storefront","data-page-name":j?.name,"data-assigned-product-title":b?.productTitle,"data-assigned-collection-title":_?.collectionTitle,children:e.jsx(t.SectionProvider,{data:c,children:e.jsx(t.I18nProvider,{t:q,children:o?.map(s=>e.jsx(e.Fragment,{children:e.jsx(t.BuilderProvider,{state:s.data,lazy:s.lazy,priority:s.priority,isPreview:!0,children:e.jsx(t.Render,{uid:s.uid})},s.uid)}))})})})})})})]})};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("next-seo"),s=require("next/dynamic"),d=require("next/head"),n=require("next/router");const i=s(()=>import("@gem-sdk/core").then(e=>e.ProductProvider));exports.default=({themeStyle:s,fontStyle:o,seo:l,product:a,components:c,builderData:x,sectionData:u})=>{let j=n.useRouter();return j.isFallback?e.jsx("div",{children:"Loading..."}):e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...l}),e.jsxs(d,{children:[s&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:s}}),o&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:o}})]}),e.jsx(r.PageProvider,{children:e.jsx(r.BuilderComponentProvider,{components:c,children:e.jsx(r.SectionProvider,{data:u,children:e.jsxs(i,{product:a,children:[x&&e.jsx(r.BuilderProvider,{state:x,children:e.jsx(r.Render,{uid:"ROOT"})}),e.jsx(r.AddOn,{name:"sticky-add-to-cart"})]})})})})]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),t=require("next-seo"),s=require("next/dynamic"),d=require("next/head"),n=require("next/router"),i=require("react"),o=require("@gem-sdk/components");const c=s(()=>import("@gem-sdk/core").then(e=>e.ProductProvider));exports.default=({themeStyle:s,fontStyle:l,seo:a,product:u,components:x,builderData:j,sectionData:m})=>{let g=n.useRouter(),h=i.useMemo(()=>x??o.buildPageRegistry(j),[x,j]);return g.isFallback?e.jsx("div",{children:"Loading..."}):e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...a}),e.jsxs(d,{children:[s&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:s}}),l&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:l}})]}),e.jsx(r.PageProvider,{children:e.jsx(r.BuilderComponentProvider,{components:h,children:e.jsx(r.SectionProvider,{data:m,children:e.jsxs(c,{product:u,children:[j&&e.jsx(r.BuilderProvider,{state:j,children:e.jsx(r.Render,{uid:"ROOT"})}),e.jsx(r.AddOn,{name:"sticky-add-to-cart"})]})})})})]})};
@@ -1,5 +1,5 @@
1
- "use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("next-seo"),r=require("next/head"),a=require("next/router"),i=require("../libs/hooks/use-tracking-view.js"),n=require("../libs/parse-html.js"),l=require("../components/builder/Header.js"),o=require("../components/FooterForPostPurchase.js"),d=require("next/script"),c=require("react"),g=require("../libs/hooks/usePageViewedTracking.js");exports.StaticPageV2=({components:u,builderData:p,sectionData:m,seo:h,themeStyle:x,fontStyle:j,elementFontStyle:f,customCodeHeader:y,shopToken:_,pageHandle:v,customFonts:b,isPostPurchase:P,shopName:k,productOffers:q,publicStoreFrontData:S,dynamicDiscountOffer:T,isPreview:N,interaction:H,pageBackground:I,sellingPlanSetting:w,buyerConsentPreCheck:E,id:F,shopID:L,domainTrackingIlp:M})=>{let $=a.useRouter(),{t:A}=s.useI18n(),B=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";i.useTrackingView(_,v,$.isFallback),g.usePageViewedTracking({id:F,shopID:L,domain:M});let C="custom-code-header";if(c.useEffect(()=>{let e=document.querySelectorAll(`[class*="${C}-"]`),s=[];e.length>1&&e.forEach(e=>{let t=e.className;if(s.includes(t)){e.remove();return}s.push(t)})},[]),$.isFallback)return e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let O=(H?.value||[]).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...h}),e.jsxs(r,{children:[n.parseHtml(C,y,!0),x&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"global-style"),j&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:j}},"google-fonts"),f&&f.map(s=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:s}},s)),b&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:b}},j),I?.isUsePageBackground&&I?.background&&e.jsx("style",{children:`
1
+ "use strict";var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),i=require("../libs/hooks/use-tracking-view.js"),n=require("../libs/parse-html.js"),l=require("../components/builder/Header.js"),o=require("../components/FooterForPostPurchase.js"),d=require("next/script"),c=require("react"),u=require("../libs/hooks/usePageViewedTracking.js"),g=require("../libs/helpers/parse-json.js"),p=require("@gem-sdk/components");exports.StaticPageV2=({components:m,builderData:h,sectionData:x,seo:j,themeStyle:y,fontStyle:f,elementFontStyle:_,customCodeHeader:b,shopToken:v,pageHandle:P,customFonts:q,isPostPurchase:k,shopName:S,productOffers:T,publicStoreFrontData:N,dynamicDiscountOffer:H,isPreview:I,interaction:w,pageBackground:M,sellingPlanSetting:E,buyerConsentPreCheck:F,id:L,shopID:$,domainTrackingIlp:R,disableGsFont:A})=>{let B=a.useRouter(),{t:C}=s.useI18n(),V=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";i.useTrackingView(v,P,B.isFallback),u.usePageViewedTracking({id:L,shopID:$,domain:R});let z=c.useMemo(()=>m??p.buildPageRegistry(h),[m,h]),D="custom-code-header";if(c.useEffect(()=>{let e=document.querySelectorAll(`[class*="${D}-"]`),s=[];e.length>1&&e.forEach(e=>{let r=e.className;if(s.includes(r)){e.remove();return}s.push(r)})},[]),B.isFallback)return e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let O=(w?.value||[]).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(r.NextSeo,{...j}),e.jsxs(t,{children:[n.parseHtml(D,b,!0),y&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:y}},"global-style"),f&&!A&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:f}},"google-fonts"),_&&_.map(s=>e.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:s}},s)),q&&e.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:q}},f),M?.isUsePageBackground&&M?.background&&e.jsx("style",{children:`
2
2
  body {
3
- background: ${I.background};
3
+ background: ${M.background};
4
4
  }
5
- `},`page_background_${I?.background}`)]}),e.jsx(s.PageProvider,{productOffers:q,publicStoreFrontData:S,dynamicDiscountOffer:T,sellingPlanMeta:w,buyerConsentChecked:E,children:e.jsx(s.BuilderComponentProvider,{components:u,children:e.jsx(s.I18nProvider,{t:A,children:e.jsxs("div",{className:`${P?"gp-bg-white post-purchase-page":""} `,role:"main",children:[P&&e.jsx(l.default,{pageType:"POST_PURCHASE"}),O&&e.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(H?.value||[])}</div>`}}),e.jsx(s.SectionProvider,{data:m,children:p?.map(t=>e.jsxs(s.BuilderProvider,{state:t.data,lazy:t.lazy,priority:t.priority,isPostPurchase:P,isPreview:N,children:[e.jsx(s.Render,{uid:t.uid}),O&&e.jsx(d,{defer:!0,src:`${B}/assets-v2/gp-flow-action-lip-v7-5.js`})]},t.uid))}),P&&e.jsx(o.default,{shopName:k||""})]})})})})]})};
5
+ `},`page_background_${M?.background}`)]}),e.jsx(s.PageProvider,{productOffers:T,publicStoreFrontData:N,dynamicDiscountOffer:H,sellingPlanMeta:E,buyerConsentChecked:F,children:e.jsx(s.BuilderComponentProvider,{components:z,children:e.jsx(s.I18nProvider,{t:C,children:e.jsxs("div",{className:`${k?"gp-bg-white post-purchase-page":""} `,role:"main",children:[k&&e.jsx(l.default,{pageType:"POST_PURCHASE"}),O&&e.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${g.stableStringify(w?.value||[])}</div>`}}),e.jsx(s.SectionProvider,{data:x,children:h?.map(r=>e.jsxs(s.BuilderProvider,{state:r.data,lazy:r.lazy,priority:r.priority,isPostPurchase:k,isPreview:I,children:[e.jsx(s.Render,{uid:r.uid}),O&&e.jsx(d,{defer:!0,src:`${V}/assets-v2/gp-flow-action-lip-v7-5.js`})]},r.uid))}),k&&e.jsx(o.default,{shopName:S||""})]})})})})]})};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("next-seo"),r=require("next/head"),a=require("next/router");exports.default=({components:n,builderData:l,sectionData:i,seo:d,themeStyle:g,fontStyle:p})=>{let u=a.useRouter();return u.isFallback?e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(t.NextSeo,{...d}),e.jsxs(r,{children:[g&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:g}}),p&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:p}})]}),e.jsx(s.PageProvider,{children:e.jsx(s.BuilderComponentProvider,{components:n,children:e.jsx(s.SectionProvider,{data:i,children:e.jsx(e.Fragment,{children:l&&e.jsx(s.BuilderProvider,{state:l,children:e.jsx(s.Render,{uid:"ROOT"})},"body")})})})})]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),r=require("next-seo"),t=require("next/head"),a=require("next/router"),n=require("react"),i=require("@gem-sdk/components");exports.default=({components:l,builderData:d,sectionData:g,seo:p,themeStyle:o,fontStyle:u})=>{let c=a.useRouter(),x=n.useMemo(()=>l??i.buildPageRegistry(d),[l,d]);return c.isFallback?e.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:e.jsxs("div",{className:"gp-flex gp-gap-2",children:[e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(r.NextSeo,{...p}),e.jsxs(t,{children:[o&&e.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:o}}),u&&e.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),e.jsx(s.PageProvider,{children:e.jsx(s.BuilderComponentProvider,{components:x,children:e.jsx(s.SectionProvider,{data:g,children:e.jsx(e.Fragment,{children:d&&e.jsx(s.BuilderProvider,{state:d,children:e.jsx(s.Render,{uid:"ROOT"})},"body")})})})})]})};
@@ -1 +1 @@
1
- var _,e;!function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format"}(_||(_={})),function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(e||(e={}));export{e as LIBRARY_TYPE_ENUM,_ as PublishedThemePageMetafields};
1
+ var _,e;!function(_){_.CUSTOM_CODE_HEADER="custom_code_header",_.CUSTOM_CODE_BODY="custom_code_body",_.ANALYTICS_GA_TRACKING_ID="analytics_ga_tracking_id",_.ANALYTICS_FB_PIXEL_ID="analytics_fb_pixel_id",_.ANALYTICS_TIKTOK_PIXEL_ID="analytics_tiktok_pixel_id",_.GLOBAL_META_DESCRIPTION="global-meta-description",_.GLOBAL_META_TITLE="global-meta-title",_.GLOBAL_META_THUMBNAIL="global-meta-thumbnail",_.NOINDEX_KEY="noindex",_.NOFOLLOW_KEY="nofollow",_.SHOW_PRICE_CURRENCY="show_price_currency",_.MONEY_WITH_CURRENCY_FORMAT="money_with_currency_format",_.ILP_DISABLE_GS_FONT="ilp_disable_gs_font"}(_||(_={})),function(_){_.TEMPLATES="templates",_.SECTIONS="sections",_.POST_PURCHASE_UPSELL="post-purchase-upsell",_.THEME_SECTIONS="theme-sections",_.EXISTING_PAGES="existing-page",_.OFFER_PAGE_TEMPLATES="offer-page-templates"}(e||(e={}));export{e as LIBRARY_TYPE_ENUM,_ as PublishedThemePageMetafields};
@@ -1 +1 @@
1
- import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as t}from"@gem-sdk/core";import{ShopMetaDocument as l}from"@gem-sdk/adapter-shopify";import{getFontStyleFromPageTemplate as a,getFontLinkFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n}from"../helpers/normalize.js";import{parseJson as m,serializableJson as d}from"../helpers/parse-json.js";import{captureException as p}from"@sentry/nextjs";import{PublishedThemePageMetafields as u}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as f}from"../helpers/get-metafield.js";import{getCustomFonts as c}from"../custom-fonts.js";import{generateSeoLinks as h}from"../helpers/generate-seo-links.js";let g=(g,T)=>async()=>{try{let[p,A,I,_]=await Promise.allSettled([g([e.toString(),{slugType:"STATIC"}]),g([o.toString()]),T([l]),g([t.toString(),{keys:[u.GLOBAL_META_DESCRIPTION,u.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===p.status)throw Error(p.reason?.[0]);let y="fulfilled"===_.status?_.value:void 0,L=p.value?.publishedThemePages?.[0],C=p.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!L)throw Error("No data builder found for Home page");let P=n(L),[S,v,E,M]=await Promise.all([a(P,void 0,L?.pageStyle?.data),s(L?.pageStyle?.data,void 0),r(g,P),c(C)]),O=L.isMobile??!1,D=f(u.GLOBAL_META_DESCRIPTION,L?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_DESCRIPTION)?.value,j=m(f(u.GLOBAL_META_THUMBNAIL,L?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_THUMBNAIL)?.value),k="fulfilled"===I.status?I.value:void 0,B="fulfilled"===A.status?A.value:void 0,b=B?.storeProperty?.favicon??"/favicon/favicon-32x32.png",N={defaultTitle:k?.shop.name,title:L?.name??"Home",description:D??k?.shop.description,openGraph:{locale:k?.localization.country.isoCode,title:L?.name??k?.shop.name,description:D??k?.shop.description,images:j?[j]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${B?.storeProperty?.primaryDomain}/`,additionalLinkTags:h({favicon:b,shopMeta:k})},G=k?.localization.language.isoCode??null,H=k?.localization.country.isoCode??null,w=G&&H?`${G}-${H}`:null;return d({id:p.value?.publishedThemePages?.[0]?.id??null,shopID:p.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:i(L?.pageStyle?.data,O),fontStyle:v,elementFontStyle:S,builderData:P,swr:{fallback:E},moneyFormat:k?.shop.moneyFormat??null,currency:k?.localization.country.currency.isoCode??null,languageIsoCode:G,countryIsoCode:H,locale:w,swatches:m(B?.storeProperty?.swatchesConfig),seo:N,mobileOnly:O,gaTrackingId:f(u.ANALYTICS_GA_TRACKING_ID,L?.metafields)??null,facebookPixelId:f(u.ANALYTICS_FB_PIXEL_ID,L?.metafields)??null,tiktokPixelId:f(u.ANALYTICS_TIKTOK_PIXEL_ID,L?.metafields)??null,customCodeHeader:f(u.CUSTOM_CODE_HEADER,L?.metafields)??null,customCodeBody:f(u.CUSTOM_CODE_BODY,L?.metafields)??null,pageHandle:L.handle??null,customFonts:M})}catch(e){throw p(e),e}};export{g as getHomePagePropsV2};
1
+ import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as t}from"@gem-sdk/core";import{ShopMetaDocument as l}from"@gem-sdk/adapter-shopify";import{getFontStyleFromPageTemplate as a,getFontLinkFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n}from"../helpers/normalize.js";import{parseJson as m,serializableJson as d}from"../helpers/parse-json.js";import{captureException as p}from"@sentry/nextjs";import{PublishedThemePageMetafields as u}from"../../constants/index.js";import{getPublishedThemePageMetafieldByKey as f}from"../helpers/get-metafield.js";import{getCustomFonts as c}from"../custom-fonts.js";import{generateSeoLinks as h}from"../helpers/generate-seo-links.js";let g=(g,T)=>async()=>{try{let[p,_,I,A]=await Promise.allSettled([g([e.toString(),{slugType:"STATIC"}]),g([o.toString()]),T([l]),g([t.toString(),{keys:[u.GLOBAL_META_DESCRIPTION,u.GLOBAL_META_THUMBNAIL]}])]);if("rejected"===p.status)throw Error(p.reason?.[0]);let y="fulfilled"===A.status?A.value:void 0,L=p.value?.publishedThemePages?.[0],S=p.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!L)throw Error("No data builder found for Home page");let C=n(L),[P,E,v,O]=await Promise.all([a(C,void 0,L?.pageStyle?.data),s(L?.pageStyle?.data,void 0),r(g,C),c(S)]),D=L.isMobile??!1,M=f(u.GLOBAL_META_DESCRIPTION,L?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_DESCRIPTION)?.value,B=m(f(u.GLOBAL_META_THUMBNAIL,L?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===u.GLOBAL_META_THUMBNAIL)?.value),j="true"===f(u.ILP_DISABLE_GS_FONT,L?.metafields),k="fulfilled"===I.status?I.value:void 0,N="fulfilled"===_.status?_.value:void 0,b=N?.storeProperty?.favicon??"/favicon/favicon-32x32.png",G={defaultTitle:k?.shop.name,title:L?.name??"Home",description:M??k?.shop.description,openGraph:{locale:k?.localization.country.isoCode,title:L?.name??k?.shop.name,description:M??k?.shop.description,images:B?[B]:[]},additionalMetaTags:[{name:"theme-color",content:"#000000"}],canonical:`https://${N?.storeProperty?.primaryDomain}/`,additionalLinkTags:h({favicon:b,shopMeta:k})},H=k?.localization.language.isoCode??null,w=k?.localization.country.isoCode??null,x=H&&w?`${H}-${w}`:null;return d({id:p.value?.publishedThemePages?.[0]?.id??null,shopID:p.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:i(L?.pageStyle?.data,D),fontStyle:E,elementFontStyle:P,builderData:C,swr:{fallback:v},moneyFormat:k?.shop.moneyFormat??null,currency:k?.localization.country.currency.isoCode??null,languageIsoCode:H,countryIsoCode:w,locale:x,swatches:m(N?.storeProperty?.swatchesConfig),seo:G,mobileOnly:D,disableGsFont:j,gaTrackingId:f(u.ANALYTICS_GA_TRACKING_ID,L?.metafields)??null,facebookPixelId:f(u.ANALYTICS_FB_PIXEL_ID,L?.metafields)??null,tiktokPixelId:f(u.ANALYTICS_TIKTOK_PIXEL_ID,L?.metafields)??null,customCodeHeader:f(u.CUSTOM_CODE_HEADER,L?.metafields)??null,customCodeBody:f(u.CUSTOM_CODE_BODY,L?.metafields)??null,pageHandle:L.handle??null,customFonts:O})}catch(e){throw p(e),e}};export{g as getHomePagePropsV2};
@@ -1 +1 @@
1
- import{PublishedThemePagesDocument as e,StorePropertyDocument as o,PublishedShopMetasDocument as t}from"@gem-sdk/core";import{ShopMetaDocument as a}from"@gem-sdk/adapter-shopify";import{getStaticFontFacesFromPageTemplate as l,getStaticFontFacesFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n,extractPageBackground as d}from"../helpers/normalize.js";import{parseJson as u,serializableJson as p}from"../helpers/parse-json.js";import{captureException as m}from"@sentry/nextjs";import{getCustomFonts as f}from"../custom-fonts.js";import{getPublishedThemePageMetafieldByKey as h}from"../helpers/get-metafield.js";import{PublishedThemePageMetafields as c}from"../../constants/index.js";import{generateSeoLinks as _}from"../helpers/generate-seo-links.js";let T=(T,g)=>async E=>{try{let m="STATIC",[I,A,L,O]=await Promise.allSettled([T([e.toString(),{slug:E,slugType:m}]),T([o.toString()]),g([a]),T([t.toString(),{keys:["source_font",c.GLOBAL_META_DESCRIPTION,c.GLOBAL_META_THUMBNAIL,c.SHOW_PRICE_CURRENCY,c.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===I.status)throw Error(I.reason?.[0]);let y="fulfilled"===O.status?O.value:void 0,C=y?.publishedShopMetas?.find(e=>e?.key==="source_font"),S=y?.publishedShopMetas?.find(e=>e?.key===c.SHOW_PRICE_CURRENCY),M=y?.publishedShopMetas?.find(e=>e?.key===c.MONEY_WITH_CURRENCY_FORMAT),N=I.value.publishedThemePages?.[0],v=I.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!N)throw Error(`No data builder found for slug: /${E}`);let P=n(N),[k,b,R,D]=await Promise.all([l({pageTemplate:P,sourceFont:C?.value,data:N?.pageStyle?.data}),s({data:N?.pageStyle?.data,sourceFont:C?.value}),r(T,P),f(v)]),B=N.isMobile??!1,Y=h(c.GLOBAL_META_DESCRIPTION,N?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_DESCRIPTION)?.value,j=h(c.GLOBAL_META_TITLE,N?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_TITLE)?.value,G=u(h(c.GLOBAL_META_THUMBNAIL,N?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===c.GLOBAL_META_THUMBNAIL)?.value),F=h(c.NOINDEX_KEY,N?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===c.NOINDEX_KEY)?.value,H=h(c.NOFOLLOW_KEY,N?.metafields)||y?.publishedShopMetas?.find(e=>e?.key===c.NOFOLLOW_KEY)?.value,w="fulfilled"===L.status?L.value:void 0,U="fulfilled"===A.status?A.value:void 0,x=U?.storeProperty?.favicon??"/favicon/favicon-32x32.png",K={defaultTitle:w?.shop.name,title:j||N?.name,description:Y??w?.shop.description,openGraph:{locale:w?.localization.country.isoCode,title:(j||N?.name)??w?.shop.name,description:Y??w?.shop.description,images:G?[G]:[]},noindex:"true"===F,nofollow:"true"===H,canonical:`https://${U?.storeProperty?.primaryDomain}/${E}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:_({favicon:x,shopMeta:w})},W=w?.localization.language.isoCode??null,z=w?.localization.country.isoCode??null,$=W&&z?`${W}-${z}`:null;return p({id:I.value?.publishedThemePages?.[0]?.id??null,shopID:I.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:i(N?.pageStyle?.data,B),fontStyle:b,elementFontStyle:k,builderData:P,pageType:m,moneyFormat:S?.value==="true"?M?.value:w?.shop.moneyFormat??null,currency:w?.localization.country.currency.isoCode??null,languageIsoCode:W,countryIsoCode:z,locale:$,swr:{fallback:R},swatches:u(U?.storeProperty?.swatchesConfig),seo:K,mobileOnly:B,gaTrackingId:h(c.ANALYTICS_GA_TRACKING_ID,N?.metafields)??null,facebookPixelId:h(c.ANALYTICS_FB_PIXEL_ID,N?.metafields)??null,tiktokPixelId:h(c.ANALYTICS_TIKTOK_PIXEL_ID,N?.metafields)??null,customCodeHeader:h(c.CUSTOM_CODE_HEADER,N?.metafields)??null,customCodeBody:h(c.CUSTOM_CODE_BODY,N?.metafields)??null,pageHandle:N.handle??null,customFonts:D,interaction:N?.interaction,pageBackground:d(N)})}catch(e){throw m(e),e}};export{T as getStaticPagePropsV2};
1
+ import{PublishedThemePagesDocument as e,StorePropertyDocument as t,PublishedShopMetasDocument as o}from"@gem-sdk/core";import{ShopMetaDocument as l}from"@gem-sdk/adapter-shopify";import{getStaticFontFacesFromPageTemplate as a,getStaticFontFacesFromGlobalStyle as s}from"../google-fonts.js";import{genCSS as i}from"../helpers/gen-css.js";import{getFallbackV2 as r}from"../helpers/get-fallback.js";import{parseBuilderTemplateV2 as n,extractPageBackground as d}from"../helpers/normalize.js";import{parseJson as u,serializableJson as p}from"../helpers/parse-json.js";import{captureException as m}from"@sentry/nextjs";import{getCustomFonts as f}from"../custom-fonts.js";import{getPublishedThemePageMetafieldByKey as c}from"../helpers/get-metafield.js";import{PublishedThemePageMetafields as h}from"../../constants/index.js";import{generateSeoLinks as _}from"../helpers/generate-seo-links.js";let T=(T,g)=>async E=>{try{let m="STATIC",[I,L,A,O]=await Promise.allSettled([T([e.toString(),{slug:E,slugType:m}]),T([t.toString()]),g([l]),T([o.toString(),{keys:["source_font",h.GLOBAL_META_DESCRIPTION,h.GLOBAL_META_THUMBNAIL,h.SHOW_PRICE_CURRENCY,h.MONEY_WITH_CURRENCY_FORMAT]}])]);if("rejected"===I.status)throw Error(I.reason?.[0]);let S="fulfilled"===O.status?O.value:void 0,y=S?.publishedShopMetas?.find(e=>e?.key==="source_font"),C=S?.publishedShopMetas?.find(e=>e?.key===h.SHOW_PRICE_CURRENCY),M=S?.publishedShopMetas?.find(e=>e?.key===h.MONEY_WITH_CURRENCY_FORMAT),P=I.value.publishedThemePages?.[0],N=I.value?.publishedThemePages?.[0]?.themePageCustomFonts;if(!P)throw Error(`No data builder found for slug: /${E}`);let v=n(P),[k,b,B,D]=await Promise.all([a({pageTemplate:v,sourceFont:y?.value,data:P?.pageStyle?.data}),s({data:P?.pageStyle?.data,sourceFont:y?.value}),r(T,v),f(N)]),R=P.isMobile??!1,Y=c(h.GLOBAL_META_DESCRIPTION,P?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_DESCRIPTION)?.value,G=c(h.GLOBAL_META_TITLE,P?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_TITLE)?.value,j=u(c(h.GLOBAL_META_THUMBNAIL,P?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.GLOBAL_META_THUMBNAIL)?.value),F=c(h.NOINDEX_KEY,P?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.NOINDEX_KEY)?.value,H=c(h.NOFOLLOW_KEY,P?.metafields)||S?.publishedShopMetas?.find(e=>e?.key===h.NOFOLLOW_KEY)?.value;console.log("\uD83D\uDE80 ~ getStaticPagePropsV2 ~ dataBuilder?.metafields:",P?.metafields);let w="true"===c(h.ILP_DISABLE_GS_FONT,P?.metafields);console.log("\uD83D\uDE80 ~ getStaticPagePropsV2 ~ disableGsFont 1:",w);let U="fulfilled"===A.status?A.value:void 0,x="fulfilled"===L.status?L.value:void 0,K=x?.storeProperty?.favicon??"/favicon/favicon-32x32.png",W={defaultTitle:U?.shop.name,title:G||P?.name,description:Y??U?.shop.description,openGraph:{locale:U?.localization.country.isoCode,title:(G||P?.name)??U?.shop.name,description:Y??U?.shop.description,images:j?[j]:[]},noindex:"true"===F,nofollow:"true"===H,canonical:`https://${x?.storeProperty?.primaryDomain}/${E}`,additionalMetaTags:[{name:"theme-color",content:"#000000"}],additionalLinkTags:_({favicon:K,shopMeta:U})},z=U?.localization.language.isoCode??null,$=U?.localization.country.isoCode??null,X=z&&$?`${z}-${$}`:null;return p({id:I.value?.publishedThemePages?.[0]?.id??null,shopID:I.value?.publishedThemePages?.[0]?.shopID??null,themeStyle:i(P?.pageStyle?.data,R),fontStyle:b,elementFontStyle:k,builderData:v,pageType:m,moneyFormat:C?.value==="true"?M?.value:U?.shop.moneyFormat??null,currency:U?.localization.country.currency.isoCode??null,languageIsoCode:z,countryIsoCode:$,locale:X,swr:{fallback:B},swatches:u(x?.storeProperty?.swatchesConfig),seo:W,mobileOnly:R,disableGsFont:w,gaTrackingId:c(h.ANALYTICS_GA_TRACKING_ID,P?.metafields)??null,facebookPixelId:c(h.ANALYTICS_FB_PIXEL_ID,P?.metafields)??null,tiktokPixelId:c(h.ANALYTICS_TIKTOK_PIXEL_ID,P?.metafields)??null,customCodeHeader:c(h.CUSTOM_CODE_HEADER,P?.metafields)??null,customCodeBody:c(h.CUSTOM_CODE_BODY,P?.metafields)??null,pageHandle:P.handle??null,customFonts:D,interaction:P?.interaction,pageBackground:d(P)})}catch(e){throw m(e),e}};export{T as getStaticPagePropsV2};
@@ -1 +1 @@
1
- let e=e=>{let t={};return!function e(t,i={}){if(t){let{childrens:r,dateModified:n,editorConfigs:o,...a}=t;if("section"===a.type)i[a.uid]=a;else{let t=r?.map(e=>e?.uid)??[];i[a.uid]={...a,childrens:t},r&&r.map(t=>e(t,i))}}}(e,t),{...t}},t=(e,t)=>{let i=t?.filter(t=>e?.some(e=>e?.id===t)),r=i?.map(t=>e?.find(e=>e?.id===t))??[],n=e?.filter(e=>(!e?.id||!i?.includes(e.id))&&!e?.deletedAt)??[];return r.concat(n)};function i(i,r){let n=t(i,r),o=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return o.map(t=>({uid:t.uid,lazy:!!t.settings?.lazy,priority:!!t.settings?.priority,data:e(t)}))}let r=e=>i([...e?.pageSections??[],...e?.themePageCustomSections??[],...e?.themeSections??[]],e?.sectionPosition),n=i=>(function(i,r){let n=t(i,r),o=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return e({uid:"ROOT",tag:"Root",childrens:o})})([...i?.pageSections??[],...i?.themePageCustomSections??[]],i?.sectionPosition),o=e=>{try{let t=e?.metafields?.find(e=>e?.key==="page_background")?.value;return JSON.parse(t??"{}")}catch{return{}}},a=e=>i([...e?.sections??[]],e?.sectionPosition),s=e=>i([...e?.shopLibrarySections??[]],e?.sectionPosition);export{o as extractPageBackground,e as normalizeBuilderData,i as normalizePageSectionResponseV2,a as parseBuilderLibraryTemplate,n as parseBuilderTemplate,r as parseBuilderTemplateV2,s as parseShopLibraryPageTemplate};
1
+ let e=(e,t)=>{if(!e||"object"!=typeof e)return!1;let r=Object.keys(e);if(!r.length)return!1;for(let n of r){let r=e[n];if(!r||"object"!=typeof r)return!1;for(let e of Object.keys(r))if(!t(r[e]))return!1}return!0},t=t=>{let r=t?.advanced;return r&&"object"==typeof r&&("pageType"in r&&delete r.pageType,r.hasBoxShadow&&e(r.hasBoxShadow,e=>!1===e||void 0===e)&&(delete r.hasBoxShadow,delete r.boxShadow)),t},r=e=>{let r={};return!function e(r,n={}){if(r){let{childrens:i,dateModified:o,editorConfigs:a,...l}=r;if(t(l),"section"===l.type)n[l.uid]=l;else{let t=i?.map(e=>e?.uid)??[];n[l.uid]={...l,childrens:t},i&&i.map(t=>e(t,n))}}}(e,r),{...r}},n=new Set(["Image"]),i=e=>{if(!e||"object"!=typeof e||e.advanced?.d?.desktop===!1)return null;if(n.has(e.tag))return e;let t=Array.isArray(e.childrens)?e.childrens:[];for(let e of t){let t=i(e);if(t)return t}return null},o=e=>{if(!e?.length)return e;let t=e.find(e=>!e?.settings?.lazy);if(!t)return e;let r=i(t);return r&&(r.setting=r.setting||{},void 0===r.setting.priority&&(r.setting.priority=!0)),e},a=(e,t)=>{let r=t?.filter(t=>e?.some(e=>e?.id===t)),n=r?.map(t=>e?.find(e=>e?.id===t))??[],i=e?.filter(e=>(!e?.id||!r?.includes(e.id))&&!e?.deletedAt)??[];return n.concat(i)};function l(e,t){let n=a(e,t),i=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);o(i);let l=!1;return i.map(e=>{let t=!!e.settings?.lazy,n=!!e.settings?.priority,i=n;return t||l||(i=!0,l=!0),{uid:e.uid,lazy:t,priority:i,data:r(e)}})}let s=e=>l([...e?.pageSections??[],...e?.themePageCustomSections??[],...e?.themeSections??[]],e?.sectionPosition),u=e=>(function(e,t){let n=a(e,t),i=n.map(e=>{if(!e?.component)return!1;try{let t=JSON.parse(e.component);return t}catch{return!1}}).filter(Boolean);return r({uid:"ROOT",tag:"Root",childrens:i})})([...e?.pageSections??[],...e?.themePageCustomSections??[]],e?.sectionPosition),c=e=>{try{let t=e?.metafields?.find(e=>e?.key==="page_background")?.value;return JSON.parse(t??"{}")}catch{return{}}},d=e=>l([...e?.sections??[]],e?.sectionPosition),p=e=>l([...e?.shopLibrarySections??[]],e?.sectionPosition);export{c as extractPageBackground,o as markLcpImage,r as normalizeBuilderData,l as normalizePageSectionResponseV2,d as parseBuilderLibraryTemplate,u as parseBuilderTemplate,s as parseBuilderTemplateV2,p as parseShopLibraryPageTemplate,t as stripDefaultAdvancedFields};
@@ -1 +1 @@
1
- let r=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}},e=r=>JSON.parse(JSON.stringify(r));export{r as parseJson,e as serializableJson};
1
+ let r=r=>{if(!r)return null;try{return JSON.parse(r)}catch(r){return null}},e=r=>JSON.parse(JSON.stringify(r)),t=r=>JSON.stringify(r,(r,e)=>{if(e&&"object"==typeof e&&!Array.isArray(e)){let r={};for(let t of Object.keys(e).sort())r[t]=e[t];return r}return e});export{r as parseJson,e as serializableJson,t as stableStringify};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{PageProvider as o,BuilderComponentProvider as l,SectionProvider as n,BuilderProvider as i,Render as d}from"@gem-sdk/core";import{NextSeo as a}from"next-seo";import c from"next/dynamic";import m from"next/head";import{useRouter as s}from"next/router";let h=c(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),p=({seo:c,components:p,builderData:g,sectionData:f,themeStyle:x,collection:y,fontStyle:u})=>{let _=s();return _.isFallback?e("div",{children:"Loading..."}):t(r,{children:[e(a,{...c}),t(m,{children:[x&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}}),u&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),e(o,{children:e(l,{components:p,children:e(n,{data:f,children:e(h,{collection:y,children:g&&e(i,{state:g,children:e(d,{uid:"ROOT"})})})})})})]})};export{p as default};
2
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{PageProvider as o,BuilderComponentProvider as n,SectionProvider as i,BuilderProvider as l,Render as m}from"@gem-sdk/core";import{NextSeo as d}from"next-seo";import c from"next/dynamic";import a from"next/head";import{useRouter as s}from"next/router";import{useMemo as p}from"react";import{buildPageRegistry as h}from"@gem-sdk/components";let f=c(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),g=({seo:c,components:g,builderData:x,sectionData:y,themeStyle:u,collection:k,fontStyle:_})=>{let L=s(),T=p(()=>g??h(x),[g,x]);return L.isFallback?e("div",{children:"Loading..."}):t(r,{children:[e(d,{...c}),t(a,{children:[u&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:u}}),_&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:_}})]}),e(o,{children:e(n,{components:T,children:e(i,{data:y,children:e(f,{collection:k,children:x&&e(l,{state:x,children:e(m,{uid:"ROOT"})})})})})})]})};export{g as default};
@@ -1,5 +1,5 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{usePreviewSharePage as l,useI18n as n,PageProvider as r,BuilderComponentProvider as s,SectionProvider as i,I18nProvider as o,BuilderProvider as d,Render as c}from"@gem-sdk/core";import g from"next/head";import{useRouter as p}from"next/router";import{parseHtml as m}from"../libs/parse-html.js";import{useEffect as u,Fragment as h}from"react";import f from"next/dynamic";let y=({components:y,builderData:_,sectionData:b,themeStyle:x,fontStyle:k,elementFontStyle:v,customCodeHeader:T,customFonts:N,pageBackground:L,publicStoreFrontData:P,page:S,collection:I,dynamicCollection:q,dynamicProduct:C})=>{let{disableExternalLinks:H}=l(),M=p(),{t:j}=n(),F="custom-code-header",$=f(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),w=S?.type==="GP_COLLECTION"?$:h;return(u(()=>{let e=document.querySelectorAll(`[class*="${F}-"]`),t=[];e.length>1&&e.forEach(e=>{let a=e.className;if(t.includes(a)){e.remove();return}t.push(a)})},[]),u(()=>{H()},[H]),M.isFallback)?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[t(g,{children:[m(F,T,!0),x&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"global-style"),k&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:k}},"google-fonts"),v&&v.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),N&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:N}},k),L?.isUsePageBackground&&L?.background&&e("style",{children:`
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{usePreviewSharePage as l,useI18n as n,PageProvider as r,BuilderComponentProvider as s,SectionProvider as i,I18nProvider as o,BuilderProvider as d,Render as c}from"@gem-sdk/core";import m from"next/head";import{useRouter as p}from"next/router";import{parseHtml as g}from"../libs/parse-html.js";import{useMemo as u,useEffect as h,Fragment as f}from"react";import y from"next/dynamic";import{buildPageRegistry as _}from"@gem-sdk/components";let b=({components:b,builderData:x,sectionData:k,themeStyle:v,fontStyle:T,elementFontStyle:N,customCodeHeader:L,customFonts:P,pageBackground:S,publicStoreFrontData:I,page:q,collection:C,dynamicCollection:H,dynamicProduct:M})=>{let{disableExternalLinks:j}=l(),F=p(),{t:$}=n(),w=u(()=>b??_(x),[b,x]),z="custom-code-header",E=y(()=>import("@gem-sdk/core").then(e=>e.CollectionProvider)),O=q?.type==="GP_COLLECTION"?E:f;return(h(()=>{let e=document.querySelectorAll(`[class*="${z}-"]`),t=[];e.length>1&&e.forEach(e=>{let a=e.className;if(t.includes(a)){e.remove();return}t.push(a)})},[]),h(()=>{j()},[j]),F.isFallback)?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[t(m,{children:[g(z,L,!0),v&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:v}},"global-style"),T&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:T}},"google-fonts"),N&&N.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),P&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:P}},T),S?.isUsePageBackground&&S?.background&&e("style",{children:`
2
2
  body {
3
- background: ${L.background};
3
+ background: ${S.background};
4
4
  }
5
- `},`page_background_${L?.background}`)]}),e(r,{publicStoreFrontData:P,dynamicCollection:q,dynamicProduct:C,children:e(w,{collection:I,children:e(s,{components:y,children:e("div",{id:"storefront","data-page-name":S?.name,"data-assigned-product-title":C?.productTitle,"data-assigned-collection-title":q?.collectionTitle,children:e(i,{data:b,children:e(o,{t:j,children:_?.map(t=>e(a,{children:e(d,{state:t.data,lazy:t.lazy,priority:t.priority,isPreview:!0,children:e(c,{uid:t.uid})},t.uid)}))})})})})})})]})};export{y as PreviewTemplate};
5
+ `},`page_background_${S?.background}`)]}),e(r,{publicStoreFrontData:I,dynamicCollection:H,dynamicProduct:M,children:e(O,{collection:C,children:e(s,{components:w,children:e("div",{id:"storefront","data-page-name":q?.name,"data-assigned-product-title":M?.productTitle,"data-assigned-collection-title":H?.collectionTitle,children:e(i,{data:k,children:e(o,{t:$,children:x?.map(t=>e(a,{children:e(d,{state:t.data,lazy:t.lazy,priority:t.priority,isPreview:!0,children:e(c,{uid:t.uid})},t.uid)}))})})})})})})]})};export{b as PreviewTemplate};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{PageProvider as o,BuilderComponentProvider as d,SectionProvider as n,BuilderProvider as i,Render as l,AddOn as a}from"@gem-sdk/core";import{NextSeo as c}from"next-seo";import m from"next/dynamic";import s from"next/head";import{useRouter as h}from"next/router";let p=m(()=>import("@gem-sdk/core").then(e=>e.ProductProvider)),u=({themeStyle:m,fontStyle:u,seo:g,product:y,components:f,builderData:x,sectionData:k})=>{let P=h();return P.isFallback?e("div",{children:"Loading..."}):t(r,{children:[e(c,{...g}),t(s,{children:[m&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:m}}),u&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),e(o,{children:e(d,{components:f,children:e(n,{data:k,children:t(p,{product:y,children:[x&&e(i,{state:x,children:e(l,{uid:"ROOT"})}),e(a,{name:"sticky-add-to-cart"})]})})})})]})};export{u as default};
2
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{PageProvider as o,BuilderComponentProvider as d,SectionProvider as n,BuilderProvider as i,Render as m,AddOn as a}from"@gem-sdk/core";import{NextSeo as l}from"next-seo";import c from"next/dynamic";import s from"next/head";import{useRouter as p}from"next/router";import{useMemo as h}from"react";import{buildPageRegistry as f}from"@gem-sdk/components";let g=c(()=>import("@gem-sdk/core").then(t=>t.ProductProvider)),u=({themeStyle:c,fontStyle:u,seo:y,product:x,components:k,builderData:P,sectionData:_})=>{let L=p(),T=h(()=>k??f(P),[k,P]);return L.isFallback?t("div",{children:"Loading..."}):e(r,{children:[t(l,{...y}),e(s,{children:[c&&t("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:c}}),u&&t("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),t(o,{children:t(d,{components:T,children:t(n,{data:_,children:e(g,{product:x,children:[P&&t(i,{state:P,children:t(m,{uid:"ROOT"})}),t(a,{name:"sticky-add-to-cart"})]})})})})]})};export{u as default};
@@ -1,5 +1,5 @@
1
- import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n as a,PageProvider as r,BuilderComponentProvider as n,I18nProvider as l,SectionProvider as o,BuilderProvider as i,Render as p}from"@gem-sdk/core";import{NextSeo as c}from"next-seo";import m from"next/head";import{useRouter as d}from"next/router";import{useTrackingView as g}from"../libs/hooks/use-tracking-view.js";import{parseHtml as u}from"../libs/parse-html.js";import h from"../components/builder/Header.js";import f from"../components/FooterForPostPurchase.js";import y from"next/script";import{useEffect as _}from"react";import{usePageViewedTracking as b}from"../libs/hooks/usePageViewedTracking.js";let v=({components:v,builderData:k,sectionData:S,seo:x,themeStyle:P,fontStyle:N,elementFontStyle:T,customCodeHeader:j,shopToken:H,pageHandle:I,customFonts:L,isPostPurchase:M,shopName:$,productOffers:w,publicStoreFrontData:E,dynamicDiscountOffer:F,isPreview:q,interaction:A,pageBackground:O,sellingPlanSetting:z,buyerConsentPreCheck:C,id:D,shopID:U,domainTrackingIlp:B})=>{let R=d(),{t:V}=a(),G=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";g(H,I,R.isFallback),b({id:D,shopID:U,domain:B});let J="custom-code-header";if(_(()=>{let e=document.querySelectorAll(`[class*="${J}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),R.isFallback)return e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let X=(A?.value||[]).length>0;return t(s,{children:[e(c,{...x}),t(m,{children:[u(J,j,!0),P&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:P}},"global-style"),N&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:N}},"google-fonts"),T&&T.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),L&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:L}},N),O?.isUsePageBackground&&O?.background&&e("style",{children:`
1
+ import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n as r,PageProvider as a,BuilderComponentProvider as o,I18nProvider as n,SectionProvider as l,BuilderProvider as i,Render as p}from"@gem-sdk/core";import{NextSeo as m}from"next-seo";import c from"next/head";import{useRouter as d}from"next/router";import{useTrackingView as g}from"../libs/hooks/use-tracking-view.js";import{parseHtml as u}from"../libs/parse-html.js";import h from"../components/builder/Header.js";import f from"../components/FooterForPostPurchase.js";import y from"next/script";import{useMemo as _,useEffect as b}from"react";import{usePageViewedTracking as k}from"../libs/hooks/usePageViewedTracking.js";import{stableStringify as v}from"../libs/helpers/parse-json.js";import{buildPageRegistry as x}from"@gem-sdk/components";let S=({components:S,builderData:P,sectionData:j,seo:T,themeStyle:N,fontStyle:H,elementFontStyle:I,customCodeHeader:L,shopToken:M,pageHandle:$,customFonts:w,isPostPurchase:E,shopName:F,productOffers:q,publicStoreFrontData:A,dynamicDiscountOffer:z,isPreview:C,interaction:D,pageBackground:O,sellingPlanSetting:U,buyerConsentPreCheck:B,id:R,shopID:V,domainTrackingIlp:G,disableGsFont:X})=>{let J=d(),{t:K}=r(),Q=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";g(M,$,J.isFallback),k({id:R,shopID:V,domain:G});let W=_(()=>S??x(P),[S,P]),Y="custom-code-header";if(b(()=>{let e=document.querySelectorAll(`[class*="${Y}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),J.isFallback)return e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let Z=(D?.value||[]).length>0;return t(s,{children:[e(m,{...T}),t(c,{children:[u(Y,L,!0),N&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:N}},"global-style"),H&&!X&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:H}},"google-fonts"),I&&I.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),w&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:w}},H),O?.isUsePageBackground&&O?.background&&e("style",{children:`
2
2
  body {
3
3
  background: ${O.background};
4
4
  }
5
- `},`page_background_${O?.background}`)]}),e(r,{productOffers:w,publicStoreFrontData:E,dynamicDiscountOffer:F,sellingPlanMeta:z,buyerConsentChecked:C,children:e(n,{components:v,children:e(l,{t:V,children:t("div",{className:`${M?"gp-bg-white post-purchase-page":""} `,role:"main",children:[M&&e(h,{pageType:"POST_PURCHASE"}),X&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(A?.value||[])}</div>`}}),e(o,{data:S,children:k?.map(s=>t(i,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:M,isPreview:q,children:[e(p,{uid:s.uid}),X&&e(y,{defer:!0,src:`${G}/assets-v2/gp-flow-action-lip-v7-5.js`})]},s.uid))}),M&&e(f,{shopName:$||""})]})})})})]})};export{v as StaticPageV2};
5
+ `},`page_background_${O?.background}`)]}),e(a,{productOffers:q,publicStoreFrontData:A,dynamicDiscountOffer:z,sellingPlanMeta:U,buyerConsentChecked:B,children:e(o,{components:W,children:e(n,{t:K,children:t("div",{className:`${E?"gp-bg-white post-purchase-page":""} `,role:"main",children:[E&&e(h,{pageType:"POST_PURCHASE"}),Z&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${v(D?.value||[])}</div>`}}),e(l,{data:j,children:P?.map(s=>t(i,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:E,isPreview:C,children:[e(p,{uid:s.uid}),Z&&e(y,{defer:!0,src:`${Q}/assets-v2/gp-flow-action-lip-v7-5.js`})]},s.uid))}),E&&e(f,{shopName:F||""})]})})})})]})};export{S as StaticPageV2};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{PageProvider as s,BuilderComponentProvider as l,SectionProvider as n,BuilderProvider as r,Render as i}from"@gem-sdk/core";import{NextSeo as p}from"next-seo";import g from"next/head";import{useRouter as d}from"next/router";let m=({components:m,builderData:c,sectionData:o,seo:h,themeStyle:f,fontStyle:u})=>{let _=d();return _.isFallback?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[e(p,{...h}),t(g,{children:[f&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:f}}),u&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}})]}),e(s,{children:e(l,{components:m,children:e(n,{data:o,children:e(a,{children:c&&e(r,{state:c,children:e(i,{uid:"ROOT"})},"body")})})})})]})};export{m as default};
2
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{PageProvider as s,BuilderComponentProvider as n,SectionProvider as r,BuilderProvider as l,Render as i}from"@gem-sdk/core";import{NextSeo as p}from"next-seo";import g from"next/head";import{useRouter as m}from"next/router";import{useMemo as o}from"react";import{buildPageRegistry as d}from"@gem-sdk/components";let c=({components:c,builderData:f,sectionData:h,seo:u,themeStyle:_,fontStyle:x})=>{let y=m(),b=o(()=>c??d(f),[c,f]);return y.isFallback?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[e(p,{...u}),t(g,{children:[_&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:_}}),x&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:x}})]}),e(s,{children:e(n,{components:b,children:e(r,{data:h,children:e(a,{children:f&&e(l,{state:f,children:e(i,{uid:"ROOT"})},"body")})})})})]})};export{c as default};
@@ -58,7 +58,7 @@ type PageBuilderPropsV2 = {
58
58
  }[];
59
59
  } & Omit<PageBuilderProps, 'builderData'>;
60
60
  type AdditionalPageBuilderProps = {
61
- components: Record<string, React__default.ComponentType<any>>;
61
+ components?: Record<string, React__default.ComponentType<any>>;
62
62
  collection?: any;
63
63
  dynamicCollection?: {
64
64
  collectionId?: string;
@@ -115,6 +115,7 @@ type StaticPagePropsV2 = PageBuilderPropsV2 & {
115
115
  id?: string | null;
116
116
  shopID?: string | null;
117
117
  domainTrackingIlp?: string;
118
+ disableGsFont?: boolean;
118
119
  isPostPurchase?: boolean;
119
120
  shopName?: string;
120
121
  productOffers?: ProductOffer[];
@@ -255,7 +256,7 @@ type SectionData = {
255
256
  [key: string]: any;
256
257
  };
257
258
  declare function normalizePageSectionResponseV2(sections?: ShopType.Maybe<SectionData>[], orders?: string[]): {
258
- uid: string;
259
+ uid: any;
259
260
  lazy: boolean;
260
261
  priority: boolean;
261
262
  data: any;
@@ -268,7 +269,7 @@ type ParseBuilderTemplateV2Props = PublishedThemePageSelectFragment & {
268
269
  }[];
269
270
  };
270
271
  declare const parseBuilderTemplateV2: (data?: ParseBuilderTemplateV2Props) => {
271
- uid: string;
272
+ uid: any;
272
273
  lazy: boolean;
273
274
  priority: boolean;
274
275
  data: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "17.0.0-dev.67",
3
+ "version": "17.0.0-dev.72",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -27,10 +27,10 @@
27
27
  "next": "14.2.35"
28
28
  },
29
29
  "devDependencies": {
30
- "@gem-sdk/core": "17.0.0-dev.66",
31
- "@gem-sdk/plugin-cookie-bar": "17.0.0-dev.38",
32
- "@gem-sdk/plugin-quick-view": "17.0.0-dev.38",
33
- "@gem-sdk/plugin-sticky-add-to-cart": "17.0.0-dev.38"
30
+ "@gem-sdk/core": "17.0.0-dev.71",
31
+ "@gem-sdk/plugin-cookie-bar": "17.0.0-dev.71",
32
+ "@gem-sdk/plugin-quick-view": "17.0.0-dev.71",
33
+ "@gem-sdk/plugin-sticky-add-to-cart": "17.0.0-dev.71"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "next": "14.2.35"