@gem-sdk/core 4.0.20 → 4.1.6

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.
Files changed (70) hide show
  1. package/dist/cjs/components/ComponentToolbarPreview.js +1 -1
  2. package/dist/cjs/components/ComponentWrapper.js +1 -1
  3. package/dist/cjs/components/ComponentWrapperPreview.js +1 -1
  4. package/dist/cjs/components/InteractionSuffix.js +1 -1
  5. package/dist/cjs/components/Render.js +1 -1
  6. package/dist/cjs/components/Render.liquid.js +9 -9
  7. package/dist/cjs/components/RenderCustomCode.js +1 -1
  8. package/dist/cjs/components/ai-generator/AIContentGenerator.js +1 -1
  9. package/dist/cjs/components/ai-generator/components/PickProduct.js +1 -1
  10. package/dist/cjs/components/animation/AnimationWrapper.js +1 -0
  11. package/dist/cjs/components/resize/Spacing.js +1 -1
  12. package/dist/cjs/components/theme-section/CreateThemeSection.js +1 -1
  13. package/dist/cjs/contexts/ProductContext.js +1 -1
  14. package/dist/cjs/helpers/create-store-front-fetcher.js +1 -0
  15. package/dist/cjs/helpers/interaction/index.js +1 -1
  16. package/dist/cjs/helpers/third-party/appConfig.js +1 -1
  17. package/dist/cjs/helpers/third-party/appSetting.js +1 -1
  18. package/dist/cjs/helpers/third-party/constant.js +1 -1
  19. package/dist/cjs/helpers/tracking/gtag.js +1 -1
  20. package/dist/cjs/helpers/verify-external-link.js +1 -0
  21. package/dist/cjs/hooks/animation/animations.js +2 -0
  22. package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -1
  23. package/dist/cjs/hooks/animation/useLivePageAnimation.js +2 -0
  24. package/dist/cjs/hooks/articles/useArticlesQuery.js +1 -1
  25. package/dist/cjs/hooks/shop/use-collection-query.js +1 -1
  26. package/dist/cjs/hooks/shop/use-products-query.js +1 -1
  27. package/dist/cjs/hooks/useAnimations.js +1 -1
  28. package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -1
  29. package/dist/cjs/hooks/usePreviewSharePage.js +1 -0
  30. package/dist/cjs/hooks/useProduct.js +1 -1
  31. package/dist/cjs/hooks/useRenderMode.js +1 -0
  32. package/dist/cjs/index.js +1 -1
  33. package/dist/cjs/types/animations.js +1 -1
  34. package/dist/cjs/types/builder.js +1 -0
  35. package/dist/esm/components/ComponentToolbarPreview.js +1 -1
  36. package/dist/esm/components/ComponentWrapper.js +1 -1
  37. package/dist/esm/components/ComponentWrapperPreview.js +1 -1
  38. package/dist/esm/components/InteractionSuffix.js +1 -1
  39. package/dist/esm/components/Render.js +1 -1
  40. package/dist/esm/components/Render.liquid.js +1 -1
  41. package/dist/esm/components/RenderCustomCode.js +2 -2
  42. package/dist/esm/components/ai-generator/AIContentGenerator.js +1 -1
  43. package/dist/esm/components/ai-generator/components/PickProduct.js +1 -1
  44. package/dist/esm/components/animation/AnimationWrapper.js +1 -0
  45. package/dist/esm/components/resize/Spacing.js +1 -1
  46. package/dist/esm/components/theme-section/CreateThemeSection.js +1 -1
  47. package/dist/esm/contexts/ProductContext.js +1 -1
  48. package/dist/esm/helpers/create-store-front-fetcher.js +1 -0
  49. package/dist/esm/helpers/interaction/index.js +1 -1
  50. package/dist/esm/helpers/third-party/appConfig.js +1 -1
  51. package/dist/esm/helpers/third-party/appSetting.js +1 -1
  52. package/dist/esm/helpers/third-party/constant.js +1 -1
  53. package/dist/esm/helpers/tracking/gtag.js +1 -1
  54. package/dist/esm/helpers/verify-external-link.js +1 -0
  55. package/dist/esm/hooks/animation/animations.js +2 -0
  56. package/dist/esm/hooks/animation/useApplyAnimation.js +1 -1
  57. package/dist/esm/hooks/animation/useLivePageAnimation.js +2 -0
  58. package/dist/esm/hooks/articles/useArticlesQuery.js +1 -1
  59. package/dist/esm/hooks/shop/use-collection-query.js +1 -1
  60. package/dist/esm/hooks/shop/use-products-query.js +1 -1
  61. package/dist/esm/hooks/useAnimations.js +1 -1
  62. package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -1
  63. package/dist/esm/hooks/usePreviewSharePage.js +1 -0
  64. package/dist/esm/hooks/useProduct.js +1 -1
  65. package/dist/esm/hooks/useRenderMode.js +1 -0
  66. package/dist/esm/index.js +1 -1
  67. package/dist/esm/types/animations.js +1 -1
  68. package/dist/esm/types/builder.js +1 -0
  69. package/dist/types/index.d.ts +42 -10
  70. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as n,useMemo as l,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{ThemeSectionStatusWrapper as p}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as u}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as m}from"./constant.js";import{AIContentGenerator as g}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as f}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import"swr";import"../helpers/convert.js";import{useShopStore as w}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let b=i.isThemeSection,S=!!i.isShopifySection,L=w(t=>t.storefrontUrl),M=w(t=>t.pageType),x=d(t=>t.getParents),Z=d(t=>t.getItem("ROOT")),y=d(t=>t.isThemeSectionEditor),[R,H]=n(null),[P,V]=n(!1),[T,E]=n(!1),[A,B]=n([]),[I,j]=n("top"),[k,$]=n(!1),[F,O]=n(!1),[U,D]=n(""),[G,_]=n(""),[z,N]=n({width:"",text:""}),[q,J]=n(!1),K=C(t=>t.interactionData),Q=l(()=>"POST_PURCHASE"===M,[M]),{checkDisableDelete:W,getTooltipText:X,checkDisableDuplicate:Y}=u(i.uid,i.tag||""),tt=["ProductTitle","ProductDescription","ProductPrice"],te=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],to=[...tt,...te],ti=(t,e)=>{let o=A.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},tn=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&ti(e,t)?t:t.parentElement?tn(t.parentElement,o):void 0},tl=r(()=>Z?.childrens?.length||0,[Z?.childrens?.length]),tr=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?j("bottom"):j("top")}},[i.tag]),ta=l(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return L?L.match(t)?.[1]:""},[L]),td=l(()=>`https://admin.shopify.com/store/${ta}`,[ta]),tC=l(()=>U?`${td}/products/${U}`:"",[td,U]),tc=l(()=>G?`${td}/articles/${G.replace("gid://shopify/Article/","")}`:"",[G,td]),ts=l(()=>K?.isSelectOnPage,[K?.isSelectOnPage]),tp=l(()=>K?.settingType,[K?.settingType]),th=l(()=>K?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tp,[K?.item?.targets,i.uid,tp]),tu=l(()=>K?.item?.self?.uid===i.uid&&K?.item?.self.type!=="PAGE"&&"TRIGGER"===tp,[K?.item?.self?.type,K?.item?.self?.uid,i.uid,tp]),tm=l(()=>!th&&!tu,[th,tu]),tg=l(()=>k||S,[k,S]),tf=l(()=>q||S||tl()>25&&"Section"===i.tag,[tl,q,S,i.tag]),tv=r(t=>{let e=t.detail;if(e?.articleId&&_(e.articleId),e?.productId&&D(e.productId),e?.componentUid==i.uid){O(!0),tr(),Q&&($(W()),N(X()),J(Y()));let t=x(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&y||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);B(t)}else O(!1),B([]),V(!1)},[i.uid,Q,x,W,X,Y,y,tr]);if(a(()=>(window.addEventListener("editor:active-component",tv),()=>{window.removeEventListener("editor:active-component",tv)}),[tv]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tw=()=>"Section"!==i.tag?-1:Z?.childrens?.length?Z.childrens.findIndex(t=>t==i.uid):-1,tb=t=>{let e=t?.childrens?.length??0;return"Row"===t.label?`Row ${e} col${1===e?"":"s"}`:t.label},tS=t=>{if(!A.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(P)E(!1),V(!1);else{let t=tn(o,o);if(t)E(!0);else{let t=o.getBoundingClientRect();t.top<36*A.length?E(!0):E(!1)}V(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!P}});window.dispatchEvent(i)},tL=()=>{if(te.includes(i.tag)){window.open(tc,"_blank");return}if(tt.includes(i.tag)){window.open(tC,"_blank");return}window.open(td,"_blank")},tM=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:b,isShopifySection:S}});return window.dispatchEvent(e),!1},tx=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:b,isShopifySection:S}});return window.dispatchEvent(e),!1},tZ=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},ty=()=>{H(null),window.removeEventListener("editor:close-add-section-popup",ty)},tR=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),tl()>=25)return!1;let o=t.target;if(o){H(e);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ty)}return!1},tH=()=>{if(S)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return tl()>=20?`${t?"Section":i?.name} ${tw()+1}/25`:t?`Section ${tw()+1}`:i?.name},tP=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!b||!!y)&&m.includes(e)};return t(e,{children:[!("Section"==i.tag&&y)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!b||y,"data-toolbar-shopify-section":"Section"==i.tag&&!!S,"data-toolbar-limit":tw()>=25,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tS(t),"aria-hidden":"true",children:[tu&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),th&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),F&&tm&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tH(),F&&S&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:i.customLabel||i.label}),F&&"Section"!==i.tag&&A.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":P,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),F&&P&&A.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":y,"data-toolbar-parent-revert":T,style:{top:T?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tb(e)})]},e.uid)),F&&!ts&&t(e,{children:[" ","Section"===i.tag&&!i.isThemeSection&&"STATIC"!==M&&"POST_PURCHASE"!==M&&!i.isShopifySection&&25>tw()&&o(c,{...i}),tP()&&o(g,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tZ(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),to.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:"Edit content in Shopify",position:"top",onClick:tL,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&tl()>=25||S,text:S?"Disabled. Please edit in Shopify Editor":"Page has reached Shopify’s 25 section-limit",position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tf,onClick:tf?void 0:t=>tx(t),"aria-hidden":"true",className:tf?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tg?null:tM(t),enable:tg,"data-toolbar-disable":tg,text:S?"Disabled. Please edit in Shopify Editor":z.text,width:z.width,position:S?"bottom":I,"aria-hidden":"true",className:tg?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==M&&"POST_PURCHASE"!==M&&25>tw()&&o(p,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!b||y,"data-outline-shopify-section":"Section"==i.tag&&!!S,"data-outline-limit":tw()>=25},"outline-"+i.uid),"Section"==i.tag&&!y&&t(e,{children:[o(s,{enable:tl()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":tl()>=25,"data-toolbar-add-open":"above"==R,onClick:t=>tR(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(s,{enable:tl()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":tl()>=25,"data-toolbar-add-open":"below"==R,onClick:t=>tR(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),m.includes(i.tag)&&F&&o(f,{...i}),F&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
2
+ import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as n,useMemo as l,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{ThemeSectionStatusWrapper as p}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as u}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as m}from"./constant.js";import{AIContentGenerator as g}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as f}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import"swr";import"../helpers/convert.js";import{useShopStore as b}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let w=i.isThemeSection,S=!!i.isShopifySection,L=b(t=>t.storefrontUrl),M=b(t=>t.pageType),x=d(t=>t.getParents),Z=d(t=>t.getItem("ROOT")),y=d(t=>t.isThemeSectionEditor),[R,H]=n(null),[P,V]=n(!1),[T,E]=n(!1),[A,j]=n([]),[B,I]=n("top"),[k,$]=n(!1),[F,O]=n(!1),[U,D]=n(""),[G,_]=n(""),[z,N]=n({width:"",text:""}),[q,J]=n(!1),K=C(t=>t.interactionData),Q=l(()=>"POST_PURCHASE"===M,[M]),{checkDisableDelete:W,getTooltipText:X,checkDisableDuplicate:Y}=u(i.uid,i.tag||""),tt=["ProductTitle","ProductDescription","ProductPrice"],te=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],to=[...tt,...te],ti=(t,e)=>{let o=A.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},tn=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&ti(e,t)?t:t.parentElement?tn(t.parentElement,o):void 0},tl=r(()=>Z?.childrens?.length||0,[Z?.childrens?.length]),tr=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?I("bottom"):I("top")}},[i.tag]),ta=l(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return L?L.match(t)?.[1]:""},[L]),td=l(()=>`https://admin.shopify.com/store/${ta}`,[ta]),tC=l(()=>U?`${td}/products/${U}`:"",[td,U]),tc=l(()=>G?`${td}/articles/${G.replace("gid://shopify/Article/","")}`:"",[G,td]),ts=l(()=>K?.isSelectOnPage,[K?.isSelectOnPage]),tp=l(()=>K?.settingType,[K?.settingType]),th=l(()=>K?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tp,[K?.item?.targets,i.uid,tp]),tu=l(()=>K?.item?.self?.uid===i.uid&&K?.item?.self.type!=="PAGE"&&"TRIGGER"===tp,[K?.item?.self?.type,K?.item?.self?.uid,i.uid,tp]),tm=l(()=>!th&&!tu,[th,tu]),tg=l(()=>k||S,[k,S]),tf=l(()=>q||S||tl()>25&&"Section"===i.tag,[tl,q,S,i.tag]),tv=r(t=>{let e=t.detail;if(e?.articleId&&_(e.articleId),e?.productId&&D(e.productId),e?.componentUid==i.uid){O(!0),tr(),Q&&($(W()),N(X()),J(Y()));let t=x(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&y||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);j(t)}else O(!1),j([]),V(!1)},[i.uid,Q,x,W,X,Y,y,tr]);if(a(()=>(window.addEventListener("editor:active-component",tv),()=>{window.removeEventListener("editor:active-component",tv)}),[tv]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tb=()=>"Section"!==i.tag?-1:Z?.childrens?.length?Z.childrens.findIndex(t=>t==i.uid):-1,tw=t=>{let e=t?.childrens?.length??0;return"Row"===t.label?`Row ${e} col${1===e?"":"s"}`:t.label},tS=t=>{if(!A.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(P)E(!1),V(!1);else{let t=tn(o,o);if(t)E(!0);else{let t=o.getBoundingClientRect();t.top<36*A.length?E(!0):E(!1)}V(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!P}});window.dispatchEvent(i)},tL=()=>{if(te.includes(i.tag)){window.open(tc,"_blank");return}if(tt.includes(i.tag)){window.open(tC,"_blank");return}window.open(td,"_blank")},tM=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:w,isShopifySection:S}});return window.dispatchEvent(e),!1},tx=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:w,isShopifySection:S}});return window.dispatchEvent(e),!1},tZ=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},ty=()=>{H(null),window.removeEventListener("editor:close-add-section-popup",ty)},tR=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),tl()>=25)return!1;let o=t.target;if(o){H(e);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ty)}return!1},tH=()=>{if(S)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return tl()>=20?`${t?"Section":i?.name} ${tb()+1}/25`:t?`Section ${tb()+1}`:i?.name},tP=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!w||!!y)&&m.includes(e)};return t(e,{children:[!("Section"==i.tag&&y)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!w||y,"data-toolbar-shopify-section":"Section"==i.tag&&!!S,"data-toolbar-limit":tb()>=25,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tS(t),"aria-hidden":"true",children:[tu&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),th&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),F&&tm&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tH(),F&&S&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:i.customLabel||i.label}),F&&"Section"!==i.tag&&A.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":P,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),F&&P&&A.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":y,"data-toolbar-parent-revert":T,style:{top:T?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tw(e)})]},e.uid)),F&&!ts&&t(e,{children:[" ","Section"===i.tag&&!i.isThemeSection&&"STATIC"!==M&&"POST_PURCHASE"!==M&&!i.isShopifySection&&25>tb()&&o(c,{...i}),tP()&&o(g,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tZ(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),to.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:"Edit content in Shopify",position:"top",onClick:tL,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&tl()>=25||S,text:S?"Disabled. Please edit in Shopify Editor":"Page has reached Shopify’s 25 section-limit",position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tf,onClick:tf?void 0:t=>tx(t),"aria-hidden":"true",className:tf?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tg?null:tM(t),enable:tg,"data-toolbar-disable":tg,text:S?"Disabled. Please edit in Shopify Editor":z.text,width:z.width,position:S?"bottom":B,"aria-hidden":"true",className:tg?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==M&&"POST_PURCHASE"!==M&&25>tb()&&o(p,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!w||y,"data-outline-shopify-section":"Section"==i.tag&&!!S,"data-outline-limit":tb()>=25},"outline-"+i.uid),"Section"==i.tag&&!y&&t(e,{children:[o(s,{enable:tl()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":tl()>=25,"data-toolbar-add-open":"above"==R,onClick:t=>tR(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(s,{enable:tl()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":tl()>=25,"data-toolbar-add-open":"below"==R,onClick:t=>tR(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),m.includes(i.tag)&&F&&o(f,{...i}),F&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{isValidElement as a}from"react";import{composeAdvanceStyle as d}from"../helpers/compose-advance-style.js";import{disableWrap as i}from"./constant.js";import n from"./RenderCustomCode.js";let ComponentWrapper=({children:s,pageType:o,...p})=>{if("section"===p.type)return null;let c=d(p.advanced,p.tag,o),l=p.advanced,m=()=>{let e={};return p.advanced?.displayInitInteraction!==void 0&&(e={"display-init":p.advanced?.displayInitInteraction===!1?"hide":"show","gp-interaction-wrapper":""}),e};return i.includes(p.tag)&&a(s)?e(t,{children:[r(n,{uid:p.uid,advanced:l}),r(s.type,{className:l?.cssClass,...s.props,style:c,advanced:l,builderAttrs:{...s.props.builderAttrs,...m()}})]}):e(t,{children:[r(n,{uid:p.uid,advanced:l}),r("div",{style:c,...m(),className:`${p.uid} ${l?.cssClass}`,children:s})]})};export{ComponentWrapper as default};
2
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{isValidElement as a}from"react";import{composeAdvanceStyle as n}from"../helpers/compose-advance-style.js";import{disableWrap as i}from"./constant.js";import d from"./RenderCustomCode.js";import{useRenderMode as s}from"../hooks/useRenderMode.js";import o from"./animation/AnimationWrapper.js";let ComponentWrapper=({children:p,pageType:l,...c})=>{let{isPreviewSharePageMode:m}=s();if("section"===c.type)return null;let u=n(c.advanced,c.tag,l),f=c.advanced,{animation:v}=f??{},h=v?.desktop?.enabled||v?.tablet?.enabled||v?.mobile?.enabled,b=()=>{let e={};return c.advanced?.displayInitInteraction!==void 0&&(e={"display-init":c.advanced?.displayInitInteraction===!1?"hide":"show","gp-interaction-wrapper":""}),e},y=r("div",{style:u,className:`${c.uid} ${f?.cssClass}`,...b(),children:p});return i.includes(c.tag)&&a(p)&&(y=e(t,{children:[r(d,{uid:c.uid,advanced:f}),r(p.type,{className:f?.cssClass,...p.props,style:u,advanced:f,builderAttrs:{...p.props.builderAttrs,...b()}})]})),h&&m&&(y=r(o,{settings:v,tag:c.tag??"",children:y})),e(t,{children:[r(d,{uid:c.uid,advanced:f}),y]})};export{ComponentWrapper as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{memo as a,useEffect as n,isValidElement as i}from"react";import{composeAdvanceStyle as r}from"../helpers/compose-advance-style.js";import{useInteraction as p}from"../hooks/useInteraction.js";import{disableWrap as d,excludeApplyStyle as s}from"./constant.js";import l from"./RenderCustomCode.js";import m from"./ComponentToolbarPreview.js";import"zustand";import{cls as c}from"../helpers/cls.js";import"swr";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{usePageType as C}from"../hooks/shop.js";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import h from"./ComponentAnimation.js";let ComponentWrapperPreview=({children:a,...g})=>{n(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:g.uid}});window.dispatchEvent(e)},[g.uid]);let{getAnimationByUid:f}=p(),b=f(g.uid);b&&(g.advanced={...g.advanced,animation:{desktop:b,tablet:b,mobile:b}});let u=C();if("section"===g.type)return null;let v={};if("Section"===g.tag&&g.isThemeSection&&(v["data-theme-section"]=!0),"Section"===g.tag&&g.isShopifySection&&(v["data-shopify-section"]=!0,v["data-toolbar-wrap"]=!0),g.editorConfigs){let e=g.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(v["data-placeholder-not-append-before-after"]=!0),e.placeholder?.notAppendLeftRight&&(v["data-placeholder-not-append-left-right"]=!0),e.toolbar?.parent&&(v["data-toolbar-parent"]=!0),e.component?.noDelete&&(v["data-component-no-delete"]=!0),e.component?.noDuplicate&&(v["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(v["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(v["data-component-no-setting"]=!0),e.component?.isThirdParty&&(v["data-component-is-third-party"]=!0),e.toolbar?.hide&&(v["data-toolbar-hide"]=!0),e.slots?.children&&(v["data-slots-children"]=!0),e.toolbar?.hide||(v["data-toolbar-wrap"]=!0)}g?.editorConfigs?.toolbar?.hide||(v["data-toolbar-wrap"]=!0);let w=e=>"GP_FUNNEL_PAGE"===u&&["ProductList","Header"].includes(e),y=r(g.advanced,g.tag,u),j=g.advanced,x={...v,"data-uid":g.uid,"data-component-type":"component","data-component-tag":g.tag,"data-component-label":g.label,"data-not-droppable":w(g.tag)?"true":"false"},S=({name:t,visibility:a})=>e("div",{className:c("gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]",{"gp-opacity-60":!a}),children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{d:"M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",fill:"#95BF47"}),o("path",{d:"M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",fill:"#5E8E3E"}),o("path",{d:"M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",fill:"white"})]}),o("span",{className:"gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",children:t})]});return d.includes(g.tag)&&i(a)?e(t,{children:[o(h,{...g}),o(l,{uid:g.uid,advanced:j}),e(a.type,{className:j?.cssClass,...a.props,style:y,builderAttrs:x,advanced:j,children:[g.isShopifySection?o(S,{name:g.name??"",visibility:!!g.isShopifyVisibility}):a.props.children,o(m,{...g})]})]}):e(t,{children:[o(h,{...g}),o(l,{uid:g.uid,advanced:j}),e("div",{style:s.includes(g.tag)?{"--mb":y?.["--mb"],"--mb-tablet":y?.["--mb-tablet"],"--mb-mobile":y?.["--mb-mobile"]}:y,className:`${g.uid} ${g.advanced?.cssClass?g.advanced?.cssClass:""}`,...x,children:[!s.includes(g.tag)&&a,i(a)&&s.includes(g.tag)&&o(a.type,{...a.props,style:y,advanced:j}),o(m,{...g})]})]})};var ComponentWrapperPreview$1=a(ComponentWrapperPreview);export{ComponentWrapperPreview$1 as default};
2
+ import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{memo as a,useEffect as i,isValidElement as n}from"react";import{composeAdvanceStyle as r}from"../helpers/compose-advance-style.js";import{useInteraction as p}from"../hooks/useInteraction.js";import{disableWrap as d,excludeApplyStyle as s}from"./constant.js";import l from"./RenderCustomCode.js";import m from"./ComponentToolbarPreview.js";import"zustand";import{cls as c}from"../helpers/cls.js";import"swr";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{usePageType as C}from"../hooks/shop.js";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import h from"./ComponentAnimation.js";let ComponentWrapperPreview=({children:a,...g})=>{i(()=>{let e=new CustomEvent("editor:component:render",{bubbles:!0,detail:{componentUid:g.uid}});window.dispatchEvent(e)},[g.uid]);let{getAnimationByUid:f}=p(),u=f(g.uid);u&&(g.advanced={...g.advanced,animation:{desktop:u,tablet:u,mobile:u}});let b=C();if("section"===g.type)return null;let v={};if("Section"===g.tag&&g.isThemeSection&&(v["data-theme-section"]=!0),"Section"===g.tag&&g.isShopifySection&&(v["data-shopify-section"]=!0,v["data-toolbar-wrap"]=!0),g.editorConfigs){let e=g.editorConfigs;e.placeholder?.notAppendBeforeAfter&&(v["data-placeholder-not-append-before-after"]=!0),e.placeholder?.notAppendLeftRight&&(v["data-placeholder-not-append-left-right"]=!0),e.toolbar?.parent&&(v["data-toolbar-parent"]=!0),e.component?.noDelete&&(v["data-component-no-delete"]=!0),e.component?.noDuplicate&&(v["data-component-no-duplicate"]=!0),e.component?.noDragDrop&&(v["data-component-no-drag-drop"]=!0),e.component?.noSetting&&(v["data-component-no-setting"]=!0),e.component?.isThirdParty&&(v["data-component-is-third-party"]=!0),e.toolbar?.hide&&(v["data-toolbar-hide"]=!0),e.slots?.children&&(v["data-slots-children"]=!0),e.toolbar?.hide||(v["data-toolbar-wrap"]=!0)}g?.editorConfigs?.toolbar?.hide||(v["data-toolbar-wrap"]=!0);let y=e=>"GP_FUNNEL_PAGE"===b&&["ProductList","Header"].includes(e),w=r(g.advanced,g.tag,b),j=g.advanced,x={...v,"data-uid":g.uid,"data-component-type":"component","data-component-tag":g.tag,"data-component-label":g.label,"data-not-droppable":y(g.tag)?"true":"false"},S=({name:t,visibility:a})=>e("div",{className:c("gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]",{"gp-opacity-60":!a}),children:[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{d:"M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",fill:"#95BF47"}),o("path",{d:"M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",fill:"#5E8E3E"}),o("path",{d:"M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",fill:"white"})]}),o("span",{className:"gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",children:t})]});return d.includes(g.tag)&&n(a)?e(t,{children:[o(h,{...g}),o(l,{uid:g.uid,advanced:j}),e(a.type,{className:j?.cssClass,...a.props,style:w,builderAttrs:x,advanced:j,children:[g.isShopifySection?o(S,{name:g.name??"",visibility:!!g.isShopifyVisibility}):a.props.children,o(m,{...g})]})]}):e(t,{children:[o(h,{...g}),o(l,{uid:g.uid,advanced:j}),e("div",{style:s.includes(g.tag)?{"--mb":w?.["--mb"],"--mb-tablet":w?.["--mb-tablet"],"--mb-mobile":w?.["--mb-mobile"]}:w,className:`${g.uid} ${g.advanced?.cssClass?g.advanced?.cssClass:""}`,...x,children:[!s.includes(g.tag)&&a,n(a)&&s.includes(g.tag)&&o(a.type,{...a.props,style:w,advanced:j}),o(m,{...g})]})]})};var ComponentWrapperPreview$1=a(ComponentWrapperPreview);export{ComponentWrapperPreview$1 as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t,Fragment as e}from"react/jsx-runtime";import"zustand";import"react";import{usePageStore as r}from"../contexts/PageContext.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import"classnames";import"dayjs";import{useInteraction as i}from"../helpers/interaction/index.js";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";let InteractionSuffix=({uid:o})=>{let{closeSelectOnPage:n,selectInteractionElement:a}=i(),p=r(t=>t.interactionData?.settingType||""),s=r(t=>t.interactionData?.isSelectOnPage),m=t=>{a({$target:t.target,componentUid:o,settingType:p}),n()};return t(e,{children:s&&t("button",{className:"gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",onClick:m,"data-setup-interaction":!0,children:"TRIGGER"===p?"Set as trigger":"Set as target"})})};export{InteractionSuffix};
2
+ import{jsx as t,Fragment as e}from"react/jsx-runtime";import"zustand";import"react";import{usePageStore as r}from"../contexts/PageContext.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import"classnames";import"dayjs";import{useInteraction as i}from"../helpers/interaction/index.js";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let InteractionSuffix=({uid:o})=>{let{closeSelectOnPage:p,selectInteractionElement:s}=i(),n=r(t=>t.interactionData?.settingType||""),a=r(t=>t.interactionData?.isSelectOnPage),m=t=>{s({$target:t.target,componentUid:o,settingType:n}),p()};return t(e,{children:a&&t("button",{className:"gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",onClick:m,"data-setup-interaction":!0,children:"TRIGGER"===n?"Set as trigger":"Set as target"})})};export{InteractionSuffix};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{memo as n,useMemo as o}from"react";import{ErrorBoundary as d}from"react-error-boundary";import{useBuilderComponent as i}from"../contexts/BuilderComponent.js";import{useBuilderStore as s}from"../contexts/BuilderContext.js";import a from"./ComponentWrapper.js";import l from"./RenderSection.js";let Render=({uid:n,...m})=>{let c=s(e=>e.getItem(n)),p=i(c?.tag),u=s(e=>e.getIsPostPurchase()),g=s(e=>e.getIsPreview()),y=o(()=>u?"POST_PURCHASE":void 0,[u]);return c?c?.type==="section"?e(l,{sectionId:c.uid}):e(d,{fallbackRender:({error:n,resetErrorBoundary:o})=>r(t,{children:[e("span",{"aria-label":"Error message",children:n.message}),e("button",{type:"button",onClick:o,children:"Try again"})]}),children:e(a,{...c,pageType:y,children:c?.childrens?.length?e(p,{builderProps:{uid:n,builderData:c,isPreview:g},styles:c.styles,setting:c.settings,advanced:c.advanced,...m,children:c.childrens.map(r=>e(RenderMemo,{parentStyle:m?.parentStyle,uid:r},r))}):e(p,{builderProps:{uid:n,builderData:c,isPreview:g},styles:c.styles,setting:c.settings,advanced:c.advanced,...m})})},c.uid):null},RenderMemo=n(Render);RenderMemo.displayName="RenderMemo";export{RenderMemo as default};
2
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{memo as n,useMemo as d}from"react";import{ErrorBoundary as i}from"react-error-boundary";import{useBuilderComponent as o}from"../contexts/BuilderComponent.js";import{useBuilderStore as s}from"../contexts/BuilderContext.js";import a from"./ComponentWrapper.js";import l from"./RenderSection.js";let Render=({uid:n,...m})=>{let c=s(e=>e.getItem(n)),p=o(c?.tag),u=s(e=>e.getIsPostPurchase()),g=s(e=>e.getIsPreview()),y=d(()=>u?"POST_PURCHASE":void 0,[u]);return c?c?.type==="section"?e(l,{sectionId:c.uid}):e(i,{fallbackRender:({error:n,resetErrorBoundary:d})=>r(t,{children:[e("span",{"aria-label":"Error message",children:n.message}),e("button",{type:"button",onClick:d,children:"Try again"})]}),children:e(a,{...c,pageType:y,children:c?.childrens?.length?e(p,{builderProps:{uid:n,builderData:c,isPreview:g},styles:c.styles,setting:c.settings,advanced:c.advanced,...m,children:c.childrens.map(r=>e(RenderMemo,{parentStyle:m?.parentStyle,uid:r,"bundle-item":m?.["bundle-item"]},r))}):e(p,{builderProps:{uid:n,builderData:c,isPreview:g},styles:c.styles,setting:c.settings,advanced:c.advanced,...m})})},c.uid):null},RenderMemo=n(Render);RenderMemo.displayName="RenderMemo";export{RenderMemo as default};
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"react-transition-group";import"@gem-sdk/core";import{disableWrap as t,customRenderChildren as n}from"./constant.js";import"classnames";import"dayjs";import{composeAdvanceStyle as r}from"../helpers/compose-advance-style.js";import{baseAssetURL as i,isLocalEnv as s}from"../helpers/convert.js";import{RenderIf as d,template as a}from"../helpers/render.js";let componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList","ProductVariants"],Render=({uid:e,builder:i,components:s,parentId:l,extraFiles:o={},pageContext:p,additionalSettings:c,...u})=>{let m=i[e],g=s[m?.tag];if(!g||!m||m?.type==="section")return{liquid:"",extraFiles:o};{let o={extraFiles:{}},h=r(m.advanced,m.tag),b="";b=t.includes(m.tag)?d(m?.childrens?.length,()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,style:h,advanced:m.advanced,parentId:componentsRenderWithParentId.includes(m.tag)?l:null,pageContext:p,...c,...u,builderAttrs:{...u.builderAttrs},rawChildren:m.childrens.map(e=>({...i[e],uid:e,builder:i,components:s,customProps:o,pageContext:p,...c})),children:n.includes(m.tag)?"":WrapRenderChildren({uid:e,customProps:o},m.childrens.map(e=>RenderChildren({uid:e,builder:i,components:s,customProps:o,parentTag:m.tag,pageContext:p,...c})))}),()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,advanced:m.advanced,style:h,isText:!!componentTexts.includes(m.tag)||null,parentId:componentsRenderWithParentId.includes(m.tag)?l:null,pageContext:p,...u,builderAttrs:{...u.builderAttrs}})):a`<div gp-el-wrapper style="${componentIconList.includes(m.tag)?"":h}" class="${m.uid} ${m?.childrens?.length||"IconListItemHoz"!==m.tag?"":"hidden"}">
2
+ import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"@gem-sdk/core";import{disableWrap as t,customRenderChildren as n}from"./constant.js";import"classnames";import"dayjs";import{composeAdvanceStyle as r}from"../helpers/compose-advance-style.js";import{baseAssetURL as i,isLocalEnv as s}from"../helpers/convert.js";import{RenderIf as d,template as a}from"../helpers/render.js";let componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList","ProductVariants"],Render=({uid:e,builder:i,components:s,parentId:l,extraFiles:o={},pageContext:p,additionalSettings:c,...u})=>{let m=i[e],g=s[m?.tag];if(!g||!m||m?.type==="section")return{liquid:"",extraFiles:o};{let o={extraFiles:{}},h=r(m.advanced,m.tag),b="";b=t.includes(m.tag)?d(m?.childrens?.length,()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,style:h,advanced:m.advanced,parentId:componentsRenderWithParentId.includes(m.tag)?l:null,pageContext:p,...c,...u,builderAttrs:{...u.builderAttrs},rawChildren:m.childrens.map(e=>({...i[e],uid:e,builder:i,components:s,customProps:o,pageContext:p,...c})),children:n.includes(m.tag)?"":WrapRenderChildren({uid:e,customProps:o},m.childrens.map(e=>RenderChildren({uid:e,builder:i,components:s,customProps:o,parentTag:m.tag,pageContext:p,...c})))}),()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,advanced:m.advanced,style:h,isText:!!componentTexts.includes(m.tag)||null,parentId:componentsRenderWithParentId.includes(m.tag)?l:null,pageContext:p,...u,builderAttrs:{...u.builderAttrs}})):a`<div gp-el-wrapper style="${componentIconList.includes(m.tag)?"":h}" class="${m.uid} ${m?.childrens?.length||"IconListItemHoz"!==m.tag?"":"hidden"}">
3
3
  ${d(m?.childrens?.length,()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,advanced:{...componentUsingAdvanced.includes(m.tag)?m?.advanced:{},cssClass:m?.advanced?.cssClass},pageContext:p,...c,...u,builderAttrs:{...u.builderAttrs},rawChildren:m.childrens.map(e=>({...i[e],uid:e,builder:i,components:s,customProps:o,pageContext:p,...c})),children:n.includes(m.tag)?"":WrapRenderChildren({uid:e,customProps:o},m.childrens.map(e=>RenderChildren({uid:e,builder:i,components:s,customProps:o,parentTag:m.tag,pageContext:p,...c})))}),()=>g({builderProps:{uid:e,builderData:m},styles:m.styles,setting:m.settings,advanced:{...componentUsingAdvanced.includes(m.tag)?m?.advanced:{},cssClass:m?.advanced?.cssClass},pageContext:p,...c,isText:!!componentTexts.includes(m.tag)||null,style:componentIconList.includes(m.tag)?h:null,...u,builderAttrs:{...u.builderAttrs}}))}
4
4
  </div>`;let{cssCode:f,jsCode:v}=RenderCustomCode(m);return f&&(b+=f),v&&(b+=v),{liquid:b=appendAnimation(m,b),extraFiles:o.extraFiles}}},RenderCustomCode=e=>{let{css:t,javascript:n,rootClassName:r}=e.advanced?.editorData||{},i=t?.replaceAll(r,e.uid),s=n?.replaceAll(r,e.uid),l=d(!!t,a`
5
5
  <style id="${`custom-css-${e?.uid}`}">
@@ -1,6 +1,6 @@
1
1
  'use client';
2
- import{jsxs as r,Fragment as t,jsx as o}from"react/jsx-runtime";import e from"next/head";import s from"next/script";import{useMemo as i}from"react";import"zustand";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{useEditorMode as m}from"../hooks/shop.js";import"classnames";import"dayjs";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";let RenderCustomCode=({uid:a,advanced:p})=>{let n=m(),{css:l,javascript:c,rootClassName:d}=p?.editorData||{},u=l?.replaceAll(d,a),h=c?.replaceAll(d,a),j={css:`custom-css-${a}`,javascript:`custom-js-${a}`},f=i(()=>`
2
+ import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import e from"next/head";import s from"next/script";import{useMemo as i}from"react";import"zustand";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{useEditorMode as m}from"../hooks/shop.js";import"classnames";import"dayjs";import"../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let RenderCustomCode=({uid:p,advanced:a})=>{let n=m(),{css:l,javascript:c,rootClassName:d}=a?.editorData||{},u=l?.replaceAll(d,p),h=c?.replaceAll(d,p),j={css:`custom-css-${p}`,javascript:`custom-js-${p}`},y=i(()=>`
3
3
  try {
4
4
  ${h}
5
5
  } catch(err){}
6
- `,[h]);return r(t,{children:[o(e,{children:!!l&&o("style",{id:j.css,dangerouslySetInnerHTML:{__html:u}})}),!!c&&"edit"!==n&&o(s,{id:j.javascript,dangerouslySetInnerHTML:{__html:f}})]})};export{RenderCustomCode as default};
6
+ `,[h]);return t(r,{children:[o(e,{children:!!l&&o("style",{id:j.css,dangerouslySetInnerHTML:{__html:u}})}),!!c&&"edit"!==n&&o(s,{id:j.javascript,dangerouslySetInnerHTML:{__html:y}})]})};export{RenderCustomCode as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useState as p,useRef as r,useCallback as n,useEffect as i}from"react";import{AIIcon as g}from"./icons/AIIcon.js";import{CloseIcon as s}from"./icons/CloseIcon.js";import{ShowMoreIcon as a}from"./icons/ShowMoreIcon.js";import{WarningIcon as l}from"./icons/WarningIcon.js";import{UpgradeIcon as m}from"./icons/UpgradeIcon.js";import{PickProduct as c}from"./components/PickProduct.js";import{ToneAndVoice as d}from"./components/ToneAndVoice.js";import u from"classnames";import{useListenEventGenerate as h}from"./hooks/useListenEventGenerate.js";import{useGettingGenerateRequest as f}from"./hooks/useGettingGenerateRequest.js";import{useFlipPopup as x}from"./hooks/useFlipPopup.js";import{useCheckingProductInside as b}from"./hooks/useCheckingProductInside.js";import"zustand";import{useI18nStore as v}from"../../contexts/I18nContext.js";import"react-transition-group";import"@gem-sdk/core";import{useShopStore as w}from"../../contexts/ShopContext.js";import j from"dayjs";import"swr";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";let AIContentGenerator=({...N})=>{let[C,k]=p(!1),[y,I]=p(!1),A=r(null),G=r(null),S=r(null),B=r(null),F=j().add(1,"month").startOf("month").format("DD MMM"),{t:P}=v(),{popupPositionX:D,popupPositionY:E,isValidating:M,bodyMaxHeight:L}=x(C,{genTool:A,genPopup:G,genPopupHeader:S,genButtonWrapper:B}),{isGenerating:U,onGenerate:z,onOpenProductElementSettings:V,goToPricing:W}=h({uid:N.uid,tag:String(N.tag)}),{getRequestBody:H,prompt:Q,changeProductName:R,changePrompt:T,changeTone:Y}=f(),{productElement:$,checkSectionHasProduct:q}=b(A),O=w(e=>e.generateContentLimitation),J=()=>{k(!C)},K=()=>{k(!1)},X=e=>{T(e.target.value)},Z=n(e=>{let t=e.detail;if(t?.componentUid!==N.uid){K();return}q()},[N.uid,q]),_=()=>{I(!y)},ee=()=>{let e=H();z(e),K()},et=()=>{V($.uid??"")};return i(()=>{U||K()},[U]),i(()=>{if($.productId){I(!1);return}I(!0)},[$]),i(()=>(window.addEventListener("editor:active-component",Z),()=>{window.removeEventListener("editor:active-component",Z)}),[Z]),e("div",{className:"gp-gen-content-toolbar-wrapper gp-relative",ref:A,children:[t("div",{className:"gp-gen-content-btn gp-border-r gp-pr-1 gp-mr-1",children:e("button",{className:u({"gp-toolbar-ai-active":C},"gp-p-1 gp-text-xs gp-flex gp-gap-1 gp-items-center gp-rounded-md hover:gp-bg-[#3B3B3B] gp-font-medium"),onClick:J,children:[t(g,{}),P("AI Content")]})}),e("div",{className:u({"gp-hidden":!C,"gp-right-0":"Section"===N.tag||"right"===D,"gp-left-0":"left"===D&&"Section"!==N.tag,"gp-top-8":"top"===E,"gp-bottom-8":"bottom"===E,"!gp-visible":!M},"gp-absolute gp-invisible gp-rounded-lg gp-bg-[#151515] gp-w-[312px] !gp-max-w-[312px] !gp-cursor-default"),ref:G,children:[e("div",{className:"gp-flex gp-items-center gp-justify-between gp-px-4 gp-py-[10px]",ref:S,children:[t("span",{className:"gp-font-medium gp-text-sm",children:"Write with GemAI"}),t("button",{className:"gp-p-2 gp-cursor-pointer hover:gp-bg-[#3B3B3B] gp-rounded-md",onClick:K,children:t(s,{})})]}),t("div",{className:u({"gp-overflow-auto":null!==L},"gp-pt-2 gp-text-left gp-px-4 scrollbar:gp-w-1 scrollbar-thumb:gp-bg-[#999] scrollbar-thumb:gp-rounded-xl"),style:{maxHeight:null!==L?`${L}px`:"auto"},children:O?.isAllow?e(o,{children:[t("div",{className:"gp-mb-4",children:t("span",{className:"gp-text-xs",children:"What would you like to describe here?"})}),t("div",{className:"gp-mb-4 gp-flex",children:t("textarea",{className:"gp-p-2 gp-bg-[#333333] gp-rounded-lg gp-w-full gp-text-xs gp-text-white placeholder:gp-text-[#AAAAAA] gp-resize-none focus-visible:gp-outline-none",placeholder:"e.g: generate feature benefits",rows:4,value:Q,onChange:X})}),e("div",{className:u({"gp-hidden":!y},"gp-mb-4 gp-gap-4 gp-flex gp-flex-col"),children:[t(d,{changeToneAndVoice:Y}),t(c,{changeProductName:R,openProductSetting:et,productId:$.productId})]}),t("div",{children:e("button",{className:"gp-flex gp-justify-center gp-items-center gp-w-full gp-bg-[#333333] gp-py-2 gp-rounded-lg gp-gap-2 gp-text-xs gp-font-medium",onClick:_,children:["Show more",t("span",{className:u({"gp-rotate-180":y}),children:t(a,{})})]})})]}):e("div",{className:"gp-flex gp-gap-2 gp-p-3 gp-rounded-xl gp-bg-[#FDB913] gp-bg-opacity-20",children:[t("div",{className:"gp-flex-none gp-w-7 gp-h-7 gp-rounded-lg gp-bg-[#FFB800] gp-flex gp-justify-center gp-items-center",children:t(l,{})}),e("p",{className:"gp-text-xs gp-whitespace-normal",children:["You've reached ",O?.maxGenerateCount,"/",O?.maxGenerateCount," rewrites of your AI generative this month.",t("br",{}),"Resets on ",F,"."]})]})}),t("div",{className:"gp-p-4",ref:B,children:O?.isAllow?t("button",{className:"gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:ee,children:U?"Generating...":"Generate"}):e("button",{className:"gp-flex gp-items-center gp-gap-2 gp-justify-center gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:W,children:[t(m,{}),O?.nextQuota?`Upgrade to generate ${O?.nextQuota} rewrites`:"You have reached limit this month"]})})]})]})};export{AIContentGenerator};
2
+ import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import{useState as p,useRef as r,useCallback as n,useEffect as i}from"react";import{AIIcon as g}from"./icons/AIIcon.js";import{CloseIcon as s}from"./icons/CloseIcon.js";import{ShowMoreIcon as a}from"./icons/ShowMoreIcon.js";import{WarningIcon as l}from"./icons/WarningIcon.js";import{UpgradeIcon as m}from"./icons/UpgradeIcon.js";import{PickProduct as c}from"./components/PickProduct.js";import{ToneAndVoice as d}from"./components/ToneAndVoice.js";import u from"classnames";import{useListenEventGenerate as h}from"./hooks/useListenEventGenerate.js";import{useGettingGenerateRequest as f}from"./hooks/useGettingGenerateRequest.js";import{useFlipPopup as x}from"./hooks/useFlipPopup.js";import{useCheckingProductInside as b}from"./hooks/useCheckingProductInside.js";import"zustand";import{useI18nStore as v}from"../../contexts/I18nContext.js";import"react-transition-group";import"@gem-sdk/core";import{useShopStore as w}from"../../contexts/ShopContext.js";import j from"dayjs";import"swr";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let AIContentGenerator=({...N})=>{let[C,y]=p(!1),[k,I]=p(!1),A=r(null),G=r(null),S=r(null),B=r(null),F=j().add(1,"month").startOf("month").format("DD MMM"),{t:P}=v(),{popupPositionX:D,popupPositionY:E,isValidating:M,bodyMaxHeight:L}=x(C,{genTool:A,genPopup:G,genPopupHeader:S,genButtonWrapper:B}),{isGenerating:U,onGenerate:z,onOpenProductElementSettings:V,goToPricing:W}=h({uid:N.uid,tag:String(N.tag)}),{getRequestBody:H,prompt:Q,changeProductName:R,changePrompt:T,changeTone:Y}=f(),{productElement:$,checkSectionHasProduct:q}=b(A),O=w(e=>e.generateContentLimitation),J=()=>{y(!C)},K=()=>{y(!1)},X=e=>{T(e.target.value)},Z=n(e=>{let t=e.detail;if(t?.componentUid!==N.uid){K();return}q()},[N.uid,q]),_=()=>{I(!k)},ee=()=>{let e=H();z(e),K()},et=()=>{V($.uid??"")};return i(()=>{U||K()},[U]),i(()=>{if($.productId){I(!1);return}I(!0)},[$]),i(()=>(window.addEventListener("editor:active-component",Z),()=>{window.removeEventListener("editor:active-component",Z)}),[Z]),e("div",{className:"gp-gen-content-toolbar-wrapper gp-relative",ref:A,children:[t("div",{className:"gp-gen-content-btn gp-border-r gp-pr-1 gp-mr-1",children:e("button",{className:u({"gp-toolbar-ai-active":C},"gp-p-1 gp-text-xs gp-flex gp-gap-1 gp-items-center gp-rounded-md hover:gp-bg-[#3B3B3B] gp-font-medium"),onClick:J,children:[t(g,{}),P("AI Content")]})}),e("div",{className:u({"gp-hidden":!C,"gp-right-0":"Section"===N.tag||"right"===D,"gp-left-0":"left"===D&&"Section"!==N.tag,"gp-top-8":"top"===E,"gp-bottom-8":"bottom"===E,"!gp-visible":!M},"gp-absolute gp-invisible gp-rounded-lg gp-bg-[#151515] gp-w-[312px] !gp-max-w-[312px] !gp-cursor-default"),ref:G,children:[e("div",{className:"gp-flex gp-items-center gp-justify-between gp-px-4 gp-py-[10px]",ref:S,children:[t("span",{className:"gp-font-medium gp-text-sm",children:"Write with GemAI"}),t("button",{className:"gp-p-2 gp-cursor-pointer hover:gp-bg-[#3B3B3B] gp-rounded-md",onClick:K,children:t(s,{})})]}),t("div",{className:u({"gp-overflow-auto":null!==L},"gp-pt-2 gp-text-left gp-px-4 scrollbar:gp-w-1 scrollbar-thumb:gp-bg-[#999] scrollbar-thumb:gp-rounded-xl"),style:{maxHeight:null!==L?`${L}px`:"auto"},children:O?.isAllow?e(o,{children:[t("div",{className:"gp-mb-4",children:t("span",{className:"gp-text-xs",children:"What would you like to describe here?"})}),t("div",{className:"gp-mb-4 gp-flex",children:t("textarea",{className:"gp-p-2 gp-bg-[#333333] gp-rounded-lg gp-w-full gp-text-xs gp-text-white placeholder:gp-text-[#AAAAAA] gp-resize-none focus-visible:gp-outline-none",placeholder:"e.g: generate feature benefits",rows:4,value:Q,onChange:X})}),e("div",{className:u({"gp-hidden":!k},"gp-mb-4 gp-gap-4 gp-flex gp-flex-col"),children:[t(d,{changeToneAndVoice:Y}),t(c,{changeProductName:R,openProductSetting:et,productId:$.productId})]}),t("div",{children:e("button",{className:"gp-flex gp-justify-center gp-items-center gp-w-full gp-bg-[#333333] gp-py-2 gp-rounded-lg gp-gap-2 gp-text-xs gp-font-medium",onClick:_,children:["Show more",t("span",{className:u({"gp-rotate-180":k}),children:t(a,{})})]})})]}):e("div",{className:"gp-flex gp-gap-2 gp-p-3 gp-rounded-xl gp-bg-[#FDB913] gp-bg-opacity-20",children:[t("div",{className:"gp-flex-none gp-w-7 gp-h-7 gp-rounded-lg gp-bg-[#FFB800] gp-flex gp-justify-center gp-items-center",children:t(l,{})}),e("p",{className:"gp-text-xs gp-whitespace-normal",children:["You've reached ",O?.maxGenerateCount,"/",O?.maxGenerateCount," rewrites of your AI generative this month.",t("br",{}),"Resets on ",F,"."]})]})}),t("div",{className:"gp-p-4",ref:B,children:O?.isAllow?t("button",{className:"gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:ee,children:U?"Generating...":"Generate"}):e("button",{className:"gp-flex gp-items-center gp-gap-2 gp-justify-center gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:W,children:[t(m,{}),O?.nextQuota?`Upgrade to generate ${O?.nextQuota} rewrites`:"You have reached limit this month"]})})]})]})};export{AIContentGenerator};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as p,useMemo as a,useEffect as o}from"react";import{SearchIcon as s}from"../icons/SearchIcon.js";import{useListProductQuery as i}from"../../../hooks/shop/use-products-query.js";import l from"classnames";import"zustand";import"react-transition-group";import"@gem-sdk/core";import"swr";import"dayjs";import"../../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{useProductQuery as c}from"../../../hooks/shop/use-product-query.js";import"vanilla-lazyload";import"../../../hooks/useCartUI.js";import"../../../hooks/useStickyStore.js";let PickProduct=g=>{let[d,n]=r(g.productId?void 0:{first:8}),{data:m,isLoading:u,isValidating:h,size:f,setSize:x}=i(d,{revalidateFirstPage:!1}),{data:b}=c(g.productId),[N,v]=r(),[I,k]=r(!1),w=p(null),P=p(null),j=()=>{g.productId||k(!I)},y=e=>{v(e),k(!1)},S=e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{let t=e.target.value??"";if(t){n({first:8,where:{titleContainsFold:t}});return}n({first:8})},200)},C=()=>{g.openProductSetting()},z=e=>{let t=e.target;t.scrollHeight-t.scrollTop===t.clientHeight&&(P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{x(f+1)},50))},T=a(()=>m?.reduce((e,t)=>[...e,...t.products?.edges??[]],[])??[],[m]);o(()=>{if(T.length&&!N&&!g.productId){let e=T[0]?.node;e&&v({id:e?.id,name:e?.title,image:e.featuredImage?.src})}},[T,N,g.productId]),o(()=>{N&&N.name&&g.changeProductName(N.name)},[N,g]),o(()=>{b&&v({id:b.id,name:b.title,image:b.featuredImage?.src})},[b]);let F="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif";return e("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[t("p",{className:"gp-py-2 gp-text-xs",children:"Product"}),e("div",{className:"gp-relative",children:[!u||N?e("button",{className:l({"gp-cursor-default":g.productId},"gp-flex gp-gap-2 gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs"),onClick:j,children:[t("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:N?.image||F,alt:"product_image"}),t("span",{className:"gp-truncate gp-max-w-[210px]",children:N?.name})]}):t("div",{children:t("span",{className:"gp-text-xs",children:"Getting products..."})}),g.productId&&t("div",{className:"gp-mt-2 gp-text-xs",children:e("p",{children:["You can manage it in"," ",t("button",{className:"gp-text-[#8AA4FF] gp-cursor-pointer hover:gp-underline",onClick:C,children:"Product element"})]})}),I&&e("div",{className:"gp-absolute gp-w-full gp-top-16 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:[e("div",{className:"gp-flex gp-items-center gp-gap-2 gp-p-2",children:[t(s,{}),t("input",{className:"gp-bg-transparent gp-w-full focus-visible:!gp-outline-none gp-text-xs",placeholder:"Search product...",onChange:S})]}),e("div",{className:"gp-max-h-[168px] gp-overflow-auto scrollbar:gp-w-1 scrollbar-thumb:gp-bg-[#999] scrollbar-thumb:gp-rounded-xl",onScroll:z,children:[T?.map(r=>e("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-2 gp-items-center",onClick:()=>{y({id:r.node?.id,name:r.node?.title,image:r.node?.featuredImage?.src})},children:[t("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:r.node?.featuredImage?.src||F,alt:"product_image"}),t("span",{className:"gp-truncate gp-max-w-[210px] gp-text-xs",children:r.node?.title})]},r.node?.id)),u||h&&t("div",{className:"gp-p-2",children:t("span",{className:"gp-text-xs",children:"Getting products..."})})]})]})]})]})};export{PickProduct};
2
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as p,useMemo as a,useEffect as o}from"react";import{SearchIcon as s}from"../icons/SearchIcon.js";import{useListProductQuery as i}from"../../../hooks/shop/use-products-query.js";import l from"classnames";import"zustand";import"react-transition-group";import"@gem-sdk/core";import"swr";import"dayjs";import"../../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{useProductQuery as c}from"../../../hooks/shop/use-product-query.js";import"vanilla-lazyload";import"../../../hooks/useCartUI.js";import"../../../hooks/useStickyStore.js";import"../../../types/builder.js";import"../../../types/custom.js";import"../../../types/animations.js";let PickProduct=g=>{let[d,n]=r(g.productId?void 0:{first:8}),{data:m,isLoading:u,isValidating:h,size:f,setSize:x}=i(d,{revalidateFirstPage:!1}),{data:b}=c(g.productId),[N,v]=r(),[I,k]=r(!1),w=p(null),j=p(null),y=()=>{g.productId||k(!I)},P=e=>{v(e),k(!1)},S=e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{let t=e.target.value??"";if(t){n({first:8,where:{titleContainsFold:t}});return}n({first:8})},200)},C=()=>{g.openProductSetting()},z=e=>{let t=e.target;t.scrollHeight-t.scrollTop===t.clientHeight&&(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{x(f+1)},50))},T=a(()=>m?.reduce((e,t)=>[...e,...t.products?.edges??[]],[])??[],[m]);o(()=>{if(T.length&&!N&&!g.productId){let e=T[0]?.node;e&&v({id:e?.id,name:e?.title,image:e.featuredImage?.src})}},[T,N,g.productId]),o(()=>{N&&N.name&&g.changeProductName(N.name)},[N,g]),o(()=>{b&&v({id:b.id,name:b.title,image:b.featuredImage?.src})},[b]);let F="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif";return e("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[t("p",{className:"gp-py-2 gp-text-xs",children:"Product"}),e("div",{className:"gp-relative",children:[!u||N?e("button",{className:l({"gp-cursor-default":g.productId},"gp-flex gp-gap-2 gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs"),onClick:y,children:[t("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:N?.image||F,alt:"product_image"}),t("span",{className:"gp-truncate gp-max-w-[210px]",children:N?.name})]}):t("div",{children:t("span",{className:"gp-text-xs",children:"Getting products..."})}),g.productId&&t("div",{className:"gp-mt-2 gp-text-xs",children:e("p",{children:["You can manage it in"," ",t("button",{className:"gp-text-[#8AA4FF] gp-cursor-pointer hover:gp-underline",onClick:C,children:"Product element"})]})}),I&&e("div",{className:"gp-absolute gp-w-full gp-top-16 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:[e("div",{className:"gp-flex gp-items-center gp-gap-2 gp-p-2",children:[t(s,{}),t("input",{className:"gp-bg-transparent gp-w-full focus-visible:!gp-outline-none gp-text-xs",placeholder:"Search product...",onChange:S})]}),e("div",{className:"gp-max-h-[168px] gp-overflow-auto scrollbar:gp-w-1 scrollbar-thumb:gp-bg-[#999] scrollbar-thumb:gp-rounded-xl",onScroll:z,children:[T?.map(r=>e("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-2 gp-items-center",onClick:()=>{P({id:r.node?.id,name:r.node?.title,image:r.node?.featuredImage?.src})},children:[t("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:r.node?.featuredImage?.src||F,alt:"product_image"}),t("span",{className:"gp-truncate gp-max-w-[210px] gp-text-xs",children:r.node?.title})]},r.node?.id)),u||h&&t("div",{className:"gp-p-2",children:t("span",{className:"gp-text-xs",children:"Getting products..."})})]})]})]})]})};export{PickProduct};
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{useLivePageAnimation as t}from"../../hooks/animation/useLivePageAnimation.js";import{useRef as e}from"react";let AnimationWrapper=({children:i,settings:n,tag:o})=>{let a=e(null);return t(a,n,o),r("div",{ref:a,style:{display:"contents"},children:i})};export{AnimationWrapper as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t,Fragment as e,jsxs as r}from"react/jsx-runtime";import{useRef as n,useState as o,useCallback as i,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as l}from"../../contexts/BuilderPreviewContext.js";import{DEVICES as s}from"../../constants/device.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{usePageType as u}from"../../hooks/shop.js";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";function Spacing(c){let d=l(t=>t.isThemeSectionEditor),m=u(),p=n(null),g=n(null),v=n(null),b=n(!1),f=n(0),w=n(0),h=n(null),[y,E]=o(0),[S,L]=o(!1),C=n(null),j=t=>{let e=t.clientY,r=Math.ceil(e-f.current),n=w.current||0,o=n+r>=0?`${n+r}px`:"0px";return{newValue:o}},x=t=>{if(p.current&&g.current){let{newValue:e}=j(t);g.current.style.height=e,p.current.style.top=e;let r=p.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=e,U(e))}},T=()=>{z()},k=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{b.current=!0;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(t),document.addEventListener("mousemove",x),document.addEventListener("mouseup",T)},100)},z=()=>{v.current&&clearTimeout(v.current),b.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),p.current){let t=getComputedStyle(p.current),e=t.top,r=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:c.uid,marginBottom:e}});window.dispatchEvent(r)}let e=p.current?.closest("[data-toolbar-wrap]");e&&(e.style.marginBottom=""),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T)},P=(t,e)=>{let r=t.children.length;if(r)for(let n=0;n<r;n++){let r=t.children[n];if(r){let t=r.getAttribute(e);if(t)return r}}},A=t=>{let e=t.getAttribute("data-component-tag");return"Row"===e||"Product"===e},B=i(t=>{let e=p.current?.closest("[data-toolbar-wrap]");if(!e)return;let r=P(e,"data-toolbar");if(!r)return;let n=r.getAttribute("data-toolbar-active");if(!n)return;let o=getComputedStyle(e),i=P(e,"data-spacing"),a=i?.querySelector("[data-spacing-margin-bottom]")||null;if(a&&g.current&&p.current){let r=o.marginBottom;if(t&&U(r),0>parseFloat(r)&&(r="0"),g.current.style.height=r,p.current.style.top=r,a.setAttribute("data-spacing-margin-bottom-active","true"),A(e))g.current.style.left="0";else{let t=o.paddingLeft,e=`-${t}`,r=`translate(${e}, -100%)`;g.current.style.left=e,p.current.style.transform=r}}},[]),U=t=>{let e=parseFloat(t);E(e),L(!0),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{L(!1)},2e3);let r=e<=28&&e>=0?e/2+16:e>28?0:16;h.current&&(h.current.style.transform=`translateY(${r}px)`)},$=usePrevious(c.advanced?.["spacing-setting"]);a(()=>{let t=F($,c.advanced?.["spacing-setting"]);B(t)},[$,c.advanced,B]);let F=(t,e)=>s.some(r=>JSON.stringify(t?.[r]?.margin?.bottom)!==JSON.stringify(e?.[r]?.margin?.bottom)),M=i(()=>{B()},[B]);return a(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>B),window.addEventListener("editor:toolbar:update-padding-left",()=>B),window.addEventListener("resize",M),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>B),window.removeEventListener("editor:toolbar:update-padding-left",()=>B),window.removeEventListener("resize",M)}),[M,B]),t(e,{children:"Section"!==c.tag&&"POST_PURCHASE"!==m&&t("div",{"data-spacing":!0,"data-spacing-theme-section":d,className:"gp-absolute gp-w-full gp-bottom-0",children:r("div",{"data-spacing-margin-bottom":!0,children:[r("div",{"data-spacing-margin-bottom-bg":!0,ref:g,children:[t("div",{"data-spacing-margin-bottom-value":!0}),t("div",{"data-active":S,"data-value-number":!0,ref:h,children:y})]}),t("div",{ref:p,"data-spacing-margin-bottom-drag":!0,onMouseDown:t=>{if(p.current){let e=getComputedStyle(p.current);f.current=t.clientY,w.current=parseFloat(e.top),k()}},onMouseUp:()=>{z()},role:"presentation"})]})})})}let usePrevious=t=>{let e=n();return a(()=>{e.current=t},[t]),e.current};export{Spacing as default};
2
+ import{jsx as t,Fragment as e,jsxs as r}from"react/jsx-runtime";import{useRef as o,useState as n,useCallback as i,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as s}from"../../contexts/BuilderPreviewContext.js";import{DEVICES as l}from"../../constants/device.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{usePageType as u}from"../../hooks/shop.js";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";function Spacing(c){let d=s(t=>t.isThemeSectionEditor),m=u(),p=o(null),g=o(null),v=o(null),b=o(!1),f=o(0),w=o(0),h=o(null),[y,E]=n(0),[S,j]=n(!1),L=o(null),C=t=>{let e=t.clientY,r=Math.ceil(e-f.current),o=w.current||0,n=o+r>=0?`${o+r}px`:"0px";return{newValue:n}},x=t=>{if(p.current&&g.current){let{newValue:e}=C(t);g.current.style.height=e,p.current.style.top=e;let r=p.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=e,U(e))}},T=()=>{z()},k=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{b.current=!0;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(t),document.addEventListener("mousemove",x),document.addEventListener("mouseup",T)},100)},z=()=>{v.current&&clearTimeout(v.current),b.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),p.current){let t=getComputedStyle(p.current),e=t.top,r=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:c.uid,marginBottom:e}});window.dispatchEvent(r)}let e=p.current?.closest("[data-toolbar-wrap]");e&&(e.style.marginBottom=""),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T)},P=(t,e)=>{let r=t.children.length;if(r)for(let o=0;o<r;o++){let r=t.children[o];if(r){let t=r.getAttribute(e);if(t)return r}}},A=t=>{let e=t.getAttribute("data-component-tag");return"Row"===e||"Product"===e},B=i(t=>{let e=p.current?.closest("[data-toolbar-wrap]");if(!e)return;let r=P(e,"data-toolbar");if(!r)return;let o=r.getAttribute("data-toolbar-active");if(!o)return;let n=getComputedStyle(e),i=P(e,"data-spacing"),a=i?.querySelector("[data-spacing-margin-bottom]")||null;if(a&&g.current&&p.current){let r=n.marginBottom;if(t&&U(r),0>parseFloat(r)&&(r="0"),g.current.style.height=r,p.current.style.top=r,a.setAttribute("data-spacing-margin-bottom-active","true"),A(e))g.current.style.left="0";else{let t=n.paddingLeft,e=`-${t}`,r=`translate(${e}, -100%)`;g.current.style.left=e,p.current.style.transform=r}}},[]),U=t=>{let e=parseFloat(t);E(e),j(!0),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{j(!1)},2e3);let r=e<=28&&e>=0?e/2+16:e>28?0:16;h.current&&(h.current.style.transform=`translateY(${r}px)`)},$=usePrevious(c.advanced?.["spacing-setting"]);a(()=>{let t=F($,c.advanced?.["spacing-setting"]);B(t)},[$,c.advanced,B]);let F=(t,e)=>l.some(r=>JSON.stringify(t?.[r]?.margin?.bottom)!==JSON.stringify(e?.[r]?.margin?.bottom)),M=i(()=>{B()},[B]);return a(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>B),window.addEventListener("editor:toolbar:update-padding-left",()=>B),window.addEventListener("resize",M),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>B),window.removeEventListener("editor:toolbar:update-padding-left",()=>B),window.removeEventListener("resize",M)}),[M,B]),t(e,{children:"Section"!==c.tag&&"POST_PURCHASE"!==m&&t("div",{"data-spacing":!0,"data-spacing-theme-section":d,className:"gp-absolute gp-w-full gp-bottom-0",children:r("div",{"data-spacing-margin-bottom":!0,children:[r("div",{"data-spacing-margin-bottom-bg":!0,ref:g,children:[t("div",{"data-spacing-margin-bottom-value":!0}),t("div",{"data-active":S,"data-value-number":!0,ref:h,children:y})]}),t("div",{ref:p,"data-spacing-margin-bottom-drag":!0,onMouseDown:t=>{if(p.current){let e=getComputedStyle(p.current);f.current=t.clientY,w.current=parseFloat(e.top),k()}},onMouseUp:()=>{z()},role:"presentation"})]})})})}let usePrevious=t=>{let e=o();return a(()=>{e.current=t},[t]),e.current};export{Spacing as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{useRef as r,useState as o}from"react";import{ThemeSectionTooltip as n}from"./ThemeSectionTooltip.js";import"zustand";import{useI18nStore as a}from"../../contexts/I18nContext.js";import{useShopStore as c}from"../../contexts/ShopContext.js";import"swr";import"swr/infinite";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";let SHOW_TOOLTIP_TIMEOUT=600,NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP=1,LIMIT_PLANS=["starter","trial","trial2022"],CreateThemeSection=({...s})=>{let{t:l}=a(),m=c(e=>e.plan),d=c(e=>e.createThemeSectionCount),p=c(e=>e.limitCreateThemeSection),h=LIMIT_PLANS.includes(m??""),u=h||p?.isLimit,C=u||void 0===d||d<1,T=r(),[v,S]=o(!1),b=()=>{C&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{S(!0)},600))},w=()=>{C&&(T.current&&clearTimeout(T.current),S(!1))},f=(e,t)=>{e.preventDefault(),e.stopPropagation(),t?.disabled||(u?E():F(),T.current&&clearTimeout(T.current),S(!1))},E=()=>{let e=new CustomEvent("editor:toolbar:upgrade",{bubbles:!0});window.dispatchEvent(e)},F=()=>{let e=new CustomEvent("editor:toolbar:create-theme-section",{bubbles:!0,detail:{componentUid:s.uid}});window.dispatchEvent(e)};return e(t,{children:i(n,{isFreeLimit:h,limitCreateThemeSection:p,isShow:v,isRender:C,onActions:f,onMouseEnter:b,onMouseLeave:w,children:[C&&e("div",{"data-toolbar-create-theme-section":!0,children:"You can create reusable sections"}),e("div",{"data-toolbar-active-create-theme-section-wrapper":!0,children:i("div",{"data-toolbar-active-create-theme-section":!0,onClick:e=>f(e,{disabled:!!u}),"aria-hidden":"true",children:[i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e("path",{d:"M1 2C1 1.44772 1.44772 1 2 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H2C1.44772 7 1 6.55228 1 6V2Z",fill:"#F9F9F9"}),e("path",{d:"M9 10C9 9.44772 9.44772 9 10 9H14C14.5523 9 15 9.44772 15 10V14C15 14.5523 14.5523 15 14 15H10C9.44772 15 9 14.5523 9 14V10Z",fill:"#F9F9F9"}),e("path",{d:"M2 9C1.44772 9 1 9.44772 1 10V14C1 14.5523 1.44772 15 2 15H6C6.55228 15 7 14.5523 7 14V10C7 9.44772 6.55228 9 6 9H2Z",fill:"#F9F9F9"})]}),e("p",{children:l("Create Theme Section")})]})})]})})};export{CreateThemeSection};
2
+ import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{useRef as r,useState as o}from"react";import{ThemeSectionTooltip as n}from"./ThemeSectionTooltip.js";import"zustand";import{useI18nStore as a}from"../../contexts/I18nContext.js";import{useShopStore as s}from"../../contexts/ShopContext.js";import"swr";import"swr/infinite";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let SHOW_TOOLTIP_TIMEOUT=600,NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP=1,LIMIT_PLANS=["starter","trial","trial2022"],CreateThemeSection=({...c})=>{let{t:m}=a(),l=s(e=>e.plan),d=s(e=>e.createThemeSectionCount),p=s(e=>e.limitCreateThemeSection),h=LIMIT_PLANS.includes(l??""),u=h||p?.isLimit,C=u||void 0===d||d<1,T=r(),[v,S]=o(!1),b=()=>{C&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{S(!0)},600))},w=()=>{C&&(T.current&&clearTimeout(T.current),S(!1))},f=(e,t)=>{e.preventDefault(),e.stopPropagation(),t?.disabled||(u?E():j(),T.current&&clearTimeout(T.current),S(!1))},E=()=>{let e=new CustomEvent("editor:toolbar:upgrade",{bubbles:!0});window.dispatchEvent(e)},j=()=>{let e=new CustomEvent("editor:toolbar:create-theme-section",{bubbles:!0,detail:{componentUid:c.uid}});window.dispatchEvent(e)};return e(t,{children:i(n,{isFreeLimit:h,limitCreateThemeSection:p,isShow:v,isRender:C,onActions:f,onMouseEnter:b,onMouseLeave:w,children:[C&&e("div",{"data-toolbar-create-theme-section":!0,children:"You can create reusable sections"}),e("div",{"data-toolbar-active-create-theme-section-wrapper":!0,children:i("div",{"data-toolbar-active-create-theme-section":!0,onClick:e=>f(e,{disabled:!!u}),"aria-hidden":"true",children:[i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e("path",{d:"M1 2C1 1.44772 1.44772 1 2 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H2C1.44772 7 1 6.55228 1 6V2Z",fill:"#F9F9F9"}),e("path",{d:"M9 10C9 9.44772 9.44772 9 10 9H14C14.5523 9 15 9.44772 15 10V14C15 14.5523 14.5523 15 14 15H10C9.44772 15 9 14.5523 9 14V10Z",fill:"#F9F9F9"}),e("path",{d:"M2 9C1.44772 9 1 9.44772 1 10V14C1 14.5523 1.44772 15 2 15H6C6.55228 15 7 14.5523 7 14V10C7 9.44772 6.55228 9 6 9H2Z",fill:"#F9F9F9"})]}),e("p",{children:m("Create Theme Section")})]})})]})})};export{CreateThemeSection};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useId as r,useMemo as o,useContext as i,createContext as s}from"react";import{useStore as d,createStore as a}from"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import{checkInStock as p}from"../helpers/variant.js";import"react-transition-group";import"@gem-sdk/core";import"classnames";import"dayjs";import{flattenConnection as n}from"../helpers/flatten-connection.js";import"../helpers/convert.js";let ProductContext=s(null),createProductStoreProvider=e=>a((t,r)=>({...e,updateProperty:(e,r)=>{t(t=>({properties:t.properties?.map(t=>t.key===e?{...t,...r}:t)}))},setUseProductCompareAtPrice:e=>{t({useProductCompareAtPrice:e})},setShouldRequireUploadMessage:e=>{t({shouldRequireUploadMessage:e})},setRequireUpload:e=>{t({requireUpload:e})},addProperty:e=>{let o=r().properties;o?.some(t=>t.key===e.key)||t(t=>({properties:[...t.properties??[],e]}))},removeProperty:e=>{t(t=>({properties:t.properties?.filter(t=>t.key!==e)}))},setQuantity:e=>{t({quantity:e>0?e:1})},setProductFeaturedImage:e=>{t({featuredImageGlobal:e})},incrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t+1}})},decrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t>2?t-1:1}})},setSelectedOption:(e,r)=>{t(t=>e&&r?{selectedOptions:{...t?.selectedOptions,[e]:r}}:t)},forceSelectedOption:e=>{t(t=>({selectedOptions:{...t?.selectedOptions,...e}}))},updateIsSubmit:e=>{t({isSubmit:e})},setHasUpdatePriceFollowQuantity:e=>{t({updatePrice:e})},setHasPreSelected:e=>{t({hasPreSelected:e})},setIsChangeSelectedOption:e=>{t({isChangeSelectedOption:e})}})),ProductProvider=({children:i,product:s,initialVariantId:d,initialVariantBaseId:a,quantity:u=1,isSyncProduct:l,hasPreSelected:c})=>{let m=r(),P=o(()=>{let e,t={};if(s){let r=n(s.variants),o=r[0],i=r.find(e=>p(e)),u=r.find(e=>e?.id===d||e?.baseID===a)??i??o;t=u?.selectedOptions?.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{}),e=s.medias?.edges.find(e=>e.node?.id===u?.mediaId)?.node??s.featuredImage}return createProductStoreProvider({product:s,quantity:u,selectedOptions:t,uiqueId:m,featuredImageGlobal:e,isSyncProduct:l,hasPreSelected:c})},[s,u,m,l,c,d]);return e(ProductContext.Provider,{value:P,children:e(t,{children:i})})},useProductStore=(e,t)=>{let r=i(ProductContext);if(!r)throw Error("Element of product must be used inside a Product");return d(r,e,t)};export{ProductProvider,useProductStore};
2
+ import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useId as r,useMemo as o,useContext as i,createContext as s}from"react";import{useStore as d,createStore as a}from"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import{checkInStock as p}from"../helpers/variant.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"@gem-sdk/core";import"classnames";import"dayjs";import{flattenConnection as n}from"../helpers/flatten-connection.js";import"../helpers/convert.js";let ProductContext=s(null),createProductStoreProvider=e=>a((t,r)=>({...e,updateProperty:(e,r)=>{t(t=>({properties:t.properties?.map(t=>t.key===e?{...t,...r}:t)}))},setUseProductCompareAtPrice:e=>{t({useProductCompareAtPrice:e})},setShouldRequireUploadMessage:e=>{t({shouldRequireUploadMessage:e})},setRequireUpload:e=>{t({requireUpload:e})},addProperty:e=>{let o=r().properties;o?.some(t=>t.key===e.key)||t(t=>({properties:[...t.properties??[],e]}))},removeProperty:e=>{t(t=>({properties:t.properties?.filter(t=>t.key!==e)}))},setQuantity:e=>{t({quantity:e>0?e:1})},setProductFeaturedImage:e=>{t({featuredImageGlobal:e})},incrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t+1}})},decrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t>2?t-1:1}})},setSelectedOption:(e,r)=>{t(t=>e&&r?{selectedOptions:{...t?.selectedOptions,[e]:r}}:t)},forceSelectedOption:e=>{t(t=>({selectedOptions:{...t?.selectedOptions,...e}}))},updateIsSubmit:e=>{t({isSubmit:e})},setHasUpdatePriceFollowQuantity:e=>{t({updatePrice:e})},setHasPreSelected:e=>{t({hasPreSelected:e})},setIsChangeSelectedOption:e=>{t({isChangeSelectedOption:e})}})),ProductProvider=({children:i,product:s,initialVariantId:d,initialVariantBaseId:a,quantity:u=1,isSyncProduct:m,hasPreSelected:l})=>{let c=r(),P=o(()=>{let e,t={};if(s){let r=n(s.variants),o=r[0],i=r.find(e=>p(e)),u=r.find(e=>e?.id===d||e?.baseID===a)??i??o;t=u?.selectedOptions?.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{}),e=s.medias?.edges.find(e=>e.node?.id===u?.mediaId)?.node??s.featuredImage}return createProductStoreProvider({product:s,quantity:u,selectedOptions:t,uiqueId:c,featuredImageGlobal:e,isSyncProduct:m,hasPreSelected:l})},[s,u,c,m,l,d]);return e(ProductContext.Provider,{value:P,children:e(t,{children:i})})},useProductStore=(e,t)=>{let r=i(ProductContext);if(!r)throw Error("Element of product must be used inside a Product");return d(r,e,t)};export{ProductProvider,useProductStore};
@@ -0,0 +1 @@
1
+ let createStoreFrontFetcher=e=>async t=>{let[o,r,n]=t,a={"Content-Type":"application/json","X-GemX-Shop-Token":e.token};return fetch(e.endpoint,{method:"POST",headers:a,body:JSON.stringify({query:o,variables:r,operationName:n})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)},hasPublicStoreFrontData=e=>!!(e&&e.token&&e.endpoint);export{createStoreFrontFetcher,hasPublicStoreFrontData};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{useRef as t,useMemo as e,useCallback as n}from"react";import"react/jsx-runtime";import"zustand";import{usePageStore as i}from"../../contexts/PageContext.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import"classnames";import"dayjs";import"../convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";let useInteraction=()=>{let r=t(),o=i(t=>t.setInteractionIsSelectOnPage),a=i(t=>t.sidebarMode),s=i(t=>t.interactionData?.selectType),c=i(t=>t.interactionData);function l(t,e){return!(t instanceof Document)&&t?.matches(e)?t:t?.querySelector(e)}let d=(t,e,n)=>{let i=t=>{let e=t.detail;n&&n(e)};return t.addEventListener(e,i),()=>t.removeEventListener(e,i)},u=({event:t,selector:e,elementRef:n},i)=>{let o=l(n?.current||r.current||document,e);if(o)return d(o,t,i)},m=({event:t,data:e,selector:n,element:i})=>{let r=i||document.body?.querySelector(n);if(!r)return;let o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:{data:e}});r.dispatchEvent(o)},p=(t,e,n)=>{if(!t)return;let i=t.getAttribute("gp-data-interaction"),r=JSON.parse(i||"{}");t.setAttribute("gp-data-interaction",JSON.stringify({...r,[e]:n}))},g=(t,e)=>{let n=t.getAttribute("gp-data-interaction"),i=JSON.parse(n||"{}");return{previousData:i[e],interactionDataJson:i}},b=()=>{o(!1);let t=new CustomEvent("editor:interaction:change-select-on-page",{bubbles:!0,detail:!1});window.dispatchEvent(t)},w=t=>{let e=new CustomEvent("editor:interaction:change-select-mode",{bubbles:!0,detail:t});window.dispatchEvent(e)},v=({componentUid:t,settingType:e,$target:n})=>{let i=new CustomEvent("editor:interaction:select-element",{bubbles:!0,detail:{componentUid:t,settingType:e,$target:n}});window.dispatchEvent(i)},f=e(()=>"interaction"===a&&(!c?.isSelectOnPage||"PAGE"===s),[a,c?.isSelectOnPage,s]),E=e(()=>c?.isSelectOnPage,[c?.isSelectOnPage]),S=n(t=>{if(window.interactionLoaded){t();return}window.addEventListener("gp:flow-actions-loaded",()=>{t()})},[]);return{onListener:u,trigger:m,saveToElementInteractionData:p,closeSelectOnPage:b,ref:r,findElementIncludingSelf:l,getInteractionPreviousData:g,changeSelectMode:w,selectInteractionElement:v,isInteractionMode:f,isSelectOnPage:E,interactionListenerLoaded:S}};export{useInteraction};
2
+ import{useRef as t,useMemo as e,useCallback as i}from"react";import"react/jsx-runtime";import"zustand";import{usePageStore as n}from"../../contexts/PageContext.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import"classnames";import"dayjs";import"../convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let useInteraction=()=>{let r=t(),o=n(t=>t.setInteractionIsSelectOnPage),a=n(t=>t.sidebarMode),s=n(t=>t.interactionData?.selectType),c=n(t=>t.interactionData);function l(t,e){return!(t instanceof Document)&&t?.matches(e)?t:t?.querySelector(e)}let d=(t,e,i)=>{let n=t=>{let e=t.detail;i&&i(e)};return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},m=({event:t,selector:e,elementRef:i},n)=>{let o=l(i?.current||r.current||document,e);if(o)return d(o,t,n)},p=({event:t,data:e,selector:i,element:n})=>{let r=n||document.body?.querySelector(i);if(!r)return;let o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:{data:e}});r.dispatchEvent(o)},u=(t,e,i)=>{if(!t)return;let n=t.getAttribute("gp-data-interaction"),r=JSON.parse(n||"{}");t.setAttribute("gp-data-interaction",JSON.stringify({...r,[e]:i}))},b=(t,e)=>{let i=t.getAttribute("gp-data-interaction"),n=JSON.parse(i||"{}");return{previousData:n[e],interactionDataJson:n}},g=()=>{o(!1);let t=new CustomEvent("editor:interaction:change-select-on-page",{bubbles:!0,detail:!1});window.dispatchEvent(t)},w=t=>{let e=new CustomEvent("editor:interaction:change-select-mode",{bubbles:!0,detail:t});window.dispatchEvent(e)},v=({componentUid:t,settingType:e,$target:i})=>{let n=new CustomEvent("editor:interaction:select-element",{bubbles:!0,detail:{componentUid:t,settingType:e,$target:i}});window.dispatchEvent(n)},f=e(()=>"interaction"===a&&(!c?.isSelectOnPage||"PAGE"===s),[a,c?.isSelectOnPage,s]),y=e(()=>c?.isSelectOnPage,[c?.isSelectOnPage]),E=i(t=>{if(window.interactionLoaded){t();return}window.addEventListener("gp:flow-actions-loaded",()=>{t()})},[]);return{onListener:m,trigger:p,saveToElementInteractionData:u,closeSelectOnPage:g,ref:r,findElementIncludingSelf:l,getInteractionPreviousData:b,changeSelectMode:w,selectInteractionElement:v,isInteractionMode:f,isSelectOnPage:y,interactionListenerLoaded:E}};export{useInteraction};
@@ -1 +1 @@
1
- let RechargeSubscriptionsConfig={RechargeSubscriptions:{appName:"recharge-subscriptions",appId:"371eed76-0b44-4869-9813-730372ea378e"}},BonLoyaltyRewardsReferralsConfig={BonLoyaltyRewardsReferrals:{appName:"bon-loyalty",appId:"63496a04-c097-48d1-8c11-475aec24b12e"}},SubifySubscriptionsConfig={SubifySubscriptionsApp:{appName:"subify-subscriptions-app",appId:"bc0dba25-cd46-4841-bea4-6bdfe9ac815f"}},SelleasyConfig={Selleasy:{appName:"selleasy",appId:"790c1a03-a71f-4bc1-9869-00dad526d3c2"}},LoopSubscriptionsConfig={LoopSubscriptions:{appName:"loop-subscriptions",appId:"267a7c64-5cb3-4552-b817-5485165f0a0b"}},SkioSubscriptionsYcS20Config={SkioSubscriptionsYcS20:{appName:"skio-subscriptions-yc-s20",appId:"de50f7a4-0bb0-4d4c-84e2-c03dce83436d"}},ShopifyFormsConfig={ShopifyForms:{appName:"forms",appId:"8744a304-fcb1-4347-b211-bb6b4759a76a"}},ReviewxpoProductReviewsAppConfig={ReviewxpoProductReviewsApp:{appName:"reviewxpo-product-reviews-app",appId:"3e3d94fa-8b53-4134-942c-f7662dc9282f"}},PumperBundlesVolumeDiscountConfig={PumperBundlesVolumeDiscount:{appName:"pumper-bundle-qty",appId:"0856870d-2aca-4b1e-a662-cf1797f61270"}},UnlimitedBundlesDiscountsConfig={UnlimitedBundlesDiscounts:{appName:"unlimited-bundles",appId:"d33d0f48-dee0-42a0-b156-2a5dce91814a"}},KiteFreeGiftDiscountConfig={KiteFreeGiftDiscount:{appName:"kite-free-gift-discounts",appId:"2c7302c4-455d-4078-a829-48563ba26089"}},FastBundleBundlesDiscountsConfig={FastBundleBundlesDiscounts:{appName:"fast-bundle",appId:"9e87fbe2-9041-4c23-acf5-322413994cef"}},SimpleBundlesKitsConfig={SimpleBundlesKits:{appName:"simple-bundles-kits",appId:"e553276b-36b2-446d-b80a-aa47fe5f96ac"}},EasyBundleBuilderSkailamaConfig={EasyBundleBuilderSkailama:{appName:"easy-bundles",appId:"05b1325c-6303-4da5-8e2f-b13ab2a50e1a"}},PreorderNowPreOrderPqConfig={PreorderNowPreOrderPq:{appName:"preorder-now-pre-order-pq",appId:"551fab2c-3af6-4a8f-ba21-736a71cb4540"}},FlyBundlesUpsellsFbtConfig={FlyBundlesUpsellsFbt:{appName:"fly-bundles-upsell",appId:"26807bdc-c2ed-4a25-afb2-06e6b1ebf843"}},JunipProductReviewsUgcConfig={JunipProductReviewsUgc:{appName:"junip-product-reviews-ugc",appId:"dc14f5a8-ed15-41b1-ad08-cfba23f9789b"}},PreorderNowWodPresaleConfig={PreorderNowWodPresale:{appName:"preorder-now-wod-presale",appId:"fdf17d17-ef12-4a7b-8383-20cc1fc2a4b6"}},YotpoReviewsV3UgcConfig={YotpoReviews:{appName:"yotpo-product-reviews-ugc",appId:"eb7dfd7d-db44-4334-bc49-c893b51b36cf"}},WhatmoreShoppableVideosreelConfig={WhatmoreShoppableVideosreel:{appName:"whatmore-shoppable-videos",appId:"20db8a72-315a-4364-8885-64219ee48303"}},ProductOptionsCustomizerConfig={ProductOptionsCustomizer:{appName:"product-options-customizer",appId:"6857ca6c-35eb-4b6f-9d58-a039f31d9406"}},AppointmentBookingCowlendarConfig={AppointmentBookingCowlendar:{appName:"cowlendar-booking",appId:"6d8b8f6a-9b3c-42b8-b2e6-a758c38d45bf"}},BoldSubscriptionsConfig={BoldSubscriptions:{appName:"bold-subscriptions",appId:"9ceb49f0-5fe5-4b5e-943d-f8af8985167d"}},SproutPlantTreesGrowSalesConfig={SproutPlantTreesGrowSales:{appName:"sprout-plant-trees",appId:"7db5ee24-2195-4099-b98e-1547c600e4aa"}},InstasellShoppableInstagramConfig={InstasellShoppableInstagram:{appName:"instasell-instagram-gallery",appId:"38d643ac-410a-4b2c-a727-6125ff08e444"}},GrowaveConfig={Growave:{appName:"growave-loyalty-wishlist",appId:"b3d2efbe-110a-4e27-84a8-1f2ed63996a4"}},LoloyalLoyaltyReferralsConfig={LoloyalLoyaltyReferrals:{appName:"loloyal-com",appId:"930ac91f-2bf2-4655-9ba0-574771f782d6"}},PowerfulContactFormBuilderConfig={PowerfulContactFormBuilder:{appName:"powerful-form-builder",appId:"e4bcb1eb-35b2-42e6-bc37-bfe0e1542c9d"}},WishlistKingConfig={WishlistKing:{appName:"wishlist-king",appId:"194f5011-a43c-4b22-b12e-eaf20dc4506a"}},GloboProductOptionsVariantConfig={GloboProductOptionsVariant:{appName:"globo-product-option",appId:"fdc9fad5-1a0f-4bd4-9c8a-1af6a6eef6b8"}},KachingBundlesConfig={KachingBundles:{appName:"kaching-bundles",appId:"6c637362-a106-4a32-94ac-94dcfd68cdb8"}},BestBuyFulfillmentConfig={BestBuyFulfillment:{appName:"best-buy-fulfillment",appId:"d9839db8-b94c-4590-ac73-3469abe7ed9b"}},AftershipEmailMarketingsmsConfig={AftershipEmailMarketingsms:{appName:"aftership-email-marketing-sms",appId:"2db13273-f8db-4274-be89-c86a3352fb70"}},SegunoEmailMarketingConfig={SegunoEmailMarketing:{appName:"seguno-email",appId:"db65571f-fa4d-473d-baa2-283a96dc76bc"}},TrustooConfig={Trustoo:{appName:"trustoo-io-reviews",appId:"c8f15077-6475-4e86-ad06-b66038d5ba2c"}},LooxReviewsConfig={LooxReviews:{appName:"loox-reviews",appId:"5c3b337f-fd14-4df5-b1d6-80ec13e6e28e"}},SeoantTrustBadgesIconConfig={SeoantTrustBadgesIcon:{appName:"seoant-trust-badges",appId:"f42f2346-5d14-4b41-a8b9-4b6ee352262e"}},TrustreviewsProductReviewsConfig={TrustreviewsProductReviews:{appName:"trustreviews",appId:"56d0fe1b-e701-4cff-8f84-466a26e09adb"}},MyappgurusProductReviewsConfig={MyappgurusProductReviews:{appName:"mag-product-reviews",appId:"0cf5caa0-e138-46b8-999b-520d16633e4c"}},HulkProductOptionsConfig={HulkProductOptions:{appName:"hulk-product-options",appId:"380168ef-9475-4244-a291-f66b189208b5"}},TrustshopProductReviewsConfig={TrustshopProductReviews:{appName:"trustshop-reviews",appId:"18b0c4cc-5411-4b6e-922d-34fdc2f30ab9"}},StampedConfig={Stamped:{appName:"stamped-reviews",appId:"a103faaf-2125-4b0e-89fa-de5149736723"}},BoostAISearchDiscoveryConfig={BoostAISearchDiscovery:{appName:"boost-ai-search-discovery",appId:"7fc998ae-a150-4367-bab8-505d8a4503f7"}},EssentialCountdownTimerBarConfig={EssentialCountdownTimerBar:{appName:"essential-countdown",appId:"722378e8-5a70-4eae-aa89-9e44e8e9f6de"}},EssentialAnnouncementBarConfig={EssentialAnnouncementBar:{appName:"essential-announcement",appId:"93b5429f-c8d6-4c33-ae14-250fd84f361b"}},OkendoReviewsLoyaltyConfig={OkendoReviewsLoyalty:{appName:"okendo",appId:"bb689e69-ea70-4661-8fb7-ad24a2e23c29"}},EstimatedDeliveryDatePlusConfig={EstimatedDeliveryDatePlus:{appName:"estimated-delivery-date-plus",appId:"4a0685bc-c234-45b2-8382-5ad6a8e3e3fd"}},HextomCountdownTimerBarConfig={HextomCountdownTimerBar:{appName:"hextom-shipping-bar",appId:"7ef5d9af-75a2-45c7-9b1b-f9240ee488e9"}},TrustBadgesBearConfig={TrustBadgesBear:{appName:"trust-badges-bear",appId:"163a9b59-0ec2-4cb7-bf5c-31408b4a9420"}},TrustedsiteTrustBadgesConfig={TrustedsiteTrustBadges:{appName:"trustedsite-trust-badges",appId:"3b73cc66-a9ae-4fcb-8ffb-743993d42e56"}},GloColorSwatchvariantImageConfig={GloColorSwatchvariantImage:{appName:"glo-color-swatch",appId:"4394f710-096c-4021-bbde-8ebb26057c11"}},BfSizeChartSizeGuideConfig={BfSizeChartSizeGuide:{appName:"bf-size-charts",appId:"47ee4f2e-eb5e-41af-9beb-e2786646bf2a"}},HextomFreeShippingBarConfig={HextomFreeShippingBar:{appName:"hextom-shipping-bar",appId:"7ef5d9af-75a2-45c7-9b1b-f9240ee488e9"}},ShopifySubscriptionsConfig={ShopifySubscriptions:{appName:"subscriptions",appId:"a3bfe9ec-96f8-4508-a003-df608a36d2ad"}},QikifyUpsellConfig={QikifyUpsell:{appName:"q-discount-free-gift",appId:"2e94b962-8172-4839-8ad9-7837eb8b017a"}},EcoboostifyShoppableReelUgcConfig={EcoboostifyShoppableReelUgc:{appName:"ecoboostify",appId:"24110205-fc49-453b-ac2b-ceea2bf6a8f3"}},AppstleBundlesDiscountsConfig={AppstleBundlesDiscounts:{appName:"appstle-bundles",appId:"8909921b-2d24-4d68-9b12-9d045d3dcb0a"}},ReleasitConfig={Releasit:{appName:"releasit-cod-form",appId:"72faf214-4174-4fec-886b-0d0e8d3af9a2"}},AovFreeGiftBuyXGetYBogoConfig={AovFreeGiftBuyXGetYBogo:{appName:"aov-free-gift-bxgy",appId:"de98edfe-90fa-4145-8a57-1055e0058723"}},ParcelPanelOrderTrackingConfig={ParcelPanel:{appName:"parcel-panel",appId:"fc785c3f-90e0-4c98-a20c-7cde9ba5e4b5"}},KoalaBundleDiscountConfig={KoalaBundleQuantityDiscount:{appName:"upsell-koala-bundles",appId:"2b951f75-113f-4fca-bdf3-c92703235716"}};export{AftershipEmailMarketingsmsConfig,AovFreeGiftBuyXGetYBogoConfig,AppointmentBookingCowlendarConfig,AppstleBundlesDiscountsConfig,BestBuyFulfillmentConfig,BfSizeChartSizeGuideConfig,BoldSubscriptionsConfig,BonLoyaltyRewardsReferralsConfig,BoostAISearchDiscoveryConfig,EasyBundleBuilderSkailamaConfig,EcoboostifyShoppableReelUgcConfig,EssentialAnnouncementBarConfig,EssentialCountdownTimerBarConfig,EstimatedDeliveryDatePlusConfig,FastBundleBundlesDiscountsConfig,FlyBundlesUpsellsFbtConfig,GloColorSwatchvariantImageConfig,GloboProductOptionsVariantConfig,GrowaveConfig,HextomCountdownTimerBarConfig,HextomFreeShippingBarConfig,HulkProductOptionsConfig,InstasellShoppableInstagramConfig,JunipProductReviewsUgcConfig,KachingBundlesConfig,KiteFreeGiftDiscountConfig,KoalaBundleDiscountConfig,LoloyalLoyaltyReferralsConfig,LoopSubscriptionsConfig,LooxReviewsConfig,MyappgurusProductReviewsConfig,OkendoReviewsLoyaltyConfig,ParcelPanelOrderTrackingConfig,PowerfulContactFormBuilderConfig,PreorderNowPreOrderPqConfig,PreorderNowWodPresaleConfig,ProductOptionsCustomizerConfig,PumperBundlesVolumeDiscountConfig,QikifyUpsellConfig,RechargeSubscriptionsConfig,ReleasitConfig,ReviewxpoProductReviewsAppConfig,SegunoEmailMarketingConfig,SelleasyConfig,SeoantTrustBadgesIconConfig,ShopifyFormsConfig,ShopifySubscriptionsConfig,SimpleBundlesKitsConfig,SkioSubscriptionsYcS20Config,SproutPlantTreesGrowSalesConfig,StampedConfig,SubifySubscriptionsConfig,TrustBadgesBearConfig,TrustedsiteTrustBadgesConfig,TrustooConfig,TrustreviewsProductReviewsConfig,TrustshopProductReviewsConfig,UnlimitedBundlesDiscountsConfig,WhatmoreShoppableVideosreelConfig,WishlistKingConfig,YotpoReviewsV3UgcConfig};
1
+ let RechargeSubscriptionsConfig={RechargeSubscriptions:{appName:"recharge-subscriptions",appId:"371eed76-0b44-4869-9813-730372ea378e"}},BonLoyaltyRewardsReferralsConfig={BonLoyaltyRewardsReferrals:{appName:"bon-loyalty",appId:"63496a04-c097-48d1-8c11-475aec24b12e"}},SubifySubscriptionsConfig={SubifySubscriptionsApp:{appName:"subify-subscriptions-app",appId:"bc0dba25-cd46-4841-bea4-6bdfe9ac815f"}},SelleasyConfig={Selleasy:{appName:"selleasy",appId:"790c1a03-a71f-4bc1-9869-00dad526d3c2"}},LoopSubscriptionsConfig={LoopSubscriptions:{appName:"loop-subscriptions",appId:"267a7c64-5cb3-4552-b817-5485165f0a0b"}},SkioSubscriptionsYcS20Config={SkioSubscriptionsYcS20:{appName:"skio-subscriptions-yc-s20",appId:"de50f7a4-0bb0-4d4c-84e2-c03dce83436d"}},ShopifyFormsConfig={ShopifyForms:{appName:"forms",appId:"8744a304-fcb1-4347-b211-bb6b4759a76a"}},ReviewxpoProductReviewsAppConfig={ReviewxpoProductReviewsApp:{appName:"reviewxpo-product-reviews-app",appId:"3e3d94fa-8b53-4134-942c-f7662dc9282f"}},PumperBundlesVolumeDiscountConfig={PumperBundlesVolumeDiscount:{appName:"pumper-bundle-qty",appId:"0856870d-2aca-4b1e-a662-cf1797f61270"}},UnlimitedBundlesDiscountsConfig={UnlimitedBundlesDiscounts:{appName:"unlimited-bundles",appId:"d33d0f48-dee0-42a0-b156-2a5dce91814a"}},KiteFreeGiftDiscountConfig={KiteFreeGiftDiscount:{appName:"kite-free-gift-discounts",appId:"2c7302c4-455d-4078-a829-48563ba26089"}},FastBundleBundlesDiscountsConfig={FastBundleBundlesDiscounts:{appName:"fast-bundle",appId:"9e87fbe2-9041-4c23-acf5-322413994cef"}},SimpleBundlesKitsConfig={SimpleBundlesKits:{appName:"simple-bundles-kits",appId:"e553276b-36b2-446d-b80a-aa47fe5f96ac"}},EasyBundleBuilderSkailamaConfig={EasyBundleBuilderSkailama:{appName:"easy-bundles",appId:"05b1325c-6303-4da5-8e2f-b13ab2a50e1a"}},PreorderNowPreOrderPqConfig={PreorderNowPreOrderPq:{appName:"preorder-now-pre-order-pq",appId:"551fab2c-3af6-4a8f-ba21-736a71cb4540"}},FlyBundlesUpsellsFbtConfig={FlyBundlesUpsellsFbt:{appName:"fly-bundles-upsell",appId:"26807bdc-c2ed-4a25-afb2-06e6b1ebf843"}},JunipProductReviewsUgcConfig={JunipProductReviewsUgc:{appName:"junip-product-reviews-ugc",appId:"dc14f5a8-ed15-41b1-ad08-cfba23f9789b"}},PreorderNowWodPresaleConfig={PreorderNowWodPresale:{appName:"preorder-now-wod-presale",appId:"fdf17d17-ef12-4a7b-8383-20cc1fc2a4b6"}},YotpoReviewsV3UgcConfig={YotpoReviews:{appName:"yotpo-product-reviews-ugc",appId:"eb7dfd7d-db44-4334-bc49-c893b51b36cf"}},WhatmoreShoppableVideosreelConfig={WhatmoreShoppableVideosreel:{appName:"whatmore-shoppable-videos",appId:"20db8a72-315a-4364-8885-64219ee48303"}},ProductOptionsCustomizerConfig={ProductOptionsCustomizer:{appName:"product-options-customizer",appId:"6857ca6c-35eb-4b6f-9d58-a039f31d9406"}},AppointmentBookingCowlendarConfig={AppointmentBookingCowlendar:{appName:"cowlendar-booking",appId:"6d8b8f6a-9b3c-42b8-b2e6-a758c38d45bf"}},BoldSubscriptionsConfig={BoldSubscriptions:{appName:"bold-subscriptions",appId:"9ceb49f0-5fe5-4b5e-943d-f8af8985167d"}},SproutPlantTreesGrowSalesConfig={SproutPlantTreesGrowSales:{appName:"sprout-plant-trees",appId:"7db5ee24-2195-4099-b98e-1547c600e4aa"}},InstasellShoppableInstagramConfig={InstasellShoppableInstagram:{appName:"instasell-instagram-gallery",appId:"38d643ac-410a-4b2c-a727-6125ff08e444"}},GrowaveConfig={Growave:{appName:"growave-loyalty-wishlist",appId:"b3d2efbe-110a-4e27-84a8-1f2ed63996a4"}},LoloyalLoyaltyReferralsConfig={LoloyalLoyaltyReferrals:{appName:"loloyal-com",appId:"930ac91f-2bf2-4655-9ba0-574771f782d6"}},PowerfulContactFormBuilderConfig={PowerfulContactFormBuilder:{appName:"powerful-form-builder",appId:"e4bcb1eb-35b2-42e6-bc37-bfe0e1542c9d"}},WishlistKingConfig={WishlistKing:{appName:"wishlist-king",appId:"194f5011-a43c-4b22-b12e-eaf20dc4506a"}},GloboProductOptionsVariantConfig={GloboProductOptionsVariant:{appName:"globo-product-option",appId:"fdc9fad5-1a0f-4bd4-9c8a-1af6a6eef6b8"}},KachingBundlesConfig={KachingBundles:{appName:"kaching-bundles",appId:"6c637362-a106-4a32-94ac-94dcfd68cdb8"}},BestBuyFulfillmentConfig={BestBuyFulfillment:{appName:"best-buy-fulfillment",appId:"d9839db8-b94c-4590-ac73-3469abe7ed9b"}},AftershipEmailMarketingsmsConfig={AftershipEmailMarketingsms:{appName:"aftership-email-marketing-sms",appId:"2db13273-f8db-4274-be89-c86a3352fb70"}},SegunoEmailMarketingConfig={SegunoEmailMarketing:{appName:"seguno-email",appId:"db65571f-fa4d-473d-baa2-283a96dc76bc"}},TrustooConfig={Trustoo:{appName:"trustoo-io-reviews",appId:"c8f15077-6475-4e86-ad06-b66038d5ba2c"}},LooxReviewsConfig={LooxReviews:{appName:"loox-reviews",appId:"5c3b337f-fd14-4df5-b1d6-80ec13e6e28e"}},SeoantTrustBadgesIconConfig={SeoantTrustBadgesIcon:{appName:"seoant-trust-badges",appId:"f42f2346-5d14-4b41-a8b9-4b6ee352262e"}},TrustreviewsProductReviewsConfig={TrustreviewsProductReviews:{appName:"trustreviews",appId:"56d0fe1b-e701-4cff-8f84-466a26e09adb"}},MyappgurusProductReviewsConfig={MyappgurusProductReviews:{appName:"mag-product-reviews",appId:"0cf5caa0-e138-46b8-999b-520d16633e4c"}},HulkProductOptionsConfig={HulkProductOptions:{appName:"hulk-product-options",appId:"380168ef-9475-4244-a291-f66b189208b5"}},TrustshopProductReviewsConfig={TrustshopProductReviews:{appName:"trustshop-reviews",appId:"18b0c4cc-5411-4b6e-922d-34fdc2f30ab9"}},StampedConfig={Stamped:{appName:"stamped-reviews",appId:"a103faaf-2125-4b0e-89fa-de5149736723"}},BoostAISearchDiscoveryConfig={BoostAISearchDiscovery:{appName:"boost-ai-search-discovery",appId:"7fc998ae-a150-4367-bab8-505d8a4503f7"}},EssentialCountdownTimerBarConfig={EssentialCountdownTimerBar:{appName:"essential-countdown",appId:"722378e8-5a70-4eae-aa89-9e44e8e9f6de"}},EssentialAnnouncementBarConfig={EssentialAnnouncementBar:{appName:"essential-announcement",appId:"93b5429f-c8d6-4c33-ae14-250fd84f361b"}},OkendoReviewsLoyaltyConfig={OkendoReviewsLoyalty:{appName:"okendo",appId:"bb689e69-ea70-4661-8fb7-ad24a2e23c29"}},EstimatedDeliveryDatePlusConfig={EstimatedDeliveryDatePlus:{appName:"estimated-delivery-date-plus",appId:"4a0685bc-c234-45b2-8382-5ad6a8e3e3fd"}},HextomCountdownTimerBarConfig={HextomCountdownTimerBar:{appName:"hextom-shipping-bar",appId:"7ef5d9af-75a2-45c7-9b1b-f9240ee488e9"}},TrustBadgesBearConfig={TrustBadgesBear:{appName:"trust-badges-bear",appId:"163a9b59-0ec2-4cb7-bf5c-31408b4a9420"}},TrustedsiteTrustBadgesConfig={TrustedsiteTrustBadges:{appName:"trustedsite-trust-badges",appId:"3b73cc66-a9ae-4fcb-8ffb-743993d42e56"}},GloColorSwatchvariantImageConfig={GloColorSwatchvariantImage:{appName:"glo-color-swatch",appId:"4394f710-096c-4021-bbde-8ebb26057c11"}},BfSizeChartSizeGuideConfig={BfSizeChartSizeGuide:{appName:"bf-size-charts",appId:"47ee4f2e-eb5e-41af-9beb-e2786646bf2a"}},HextomFreeShippingBarConfig={HextomFreeShippingBar:{appName:"hextom-shipping-bar",appId:"7ef5d9af-75a2-45c7-9b1b-f9240ee488e9"}},ShopifySubscriptionsConfig={ShopifySubscriptions:{appName:"subscriptions",appId:"a3bfe9ec-96f8-4508-a003-df608a36d2ad"}},QikifyUpsellConfig={QikifyUpsell:{appName:"q-discount-free-gift",appId:"2e94b962-8172-4839-8ad9-7837eb8b017a"}},EcoboostifyShoppableReelUgcConfig={EcoboostifyShoppableReelUgc:{appName:"ecoboostify",appId:"24110205-fc49-453b-ac2b-ceea2bf6a8f3"}},AppstleBundlesDiscountsConfig={AppstleBundlesDiscounts:{appName:"appstle-bundles",appId:"8909921b-2d24-4d68-9b12-9d045d3dcb0a"}},ReleasitConfig={Releasit:{appName:"releasit-cod-form",appId:"72faf214-4174-4fec-886b-0d0e8d3af9a2"}},AovFreeGiftBuyXGetYBogoConfig={AovFreeGiftBuyXGetYBogo:{appName:"aov-free-gift-bxgy",appId:"de98edfe-90fa-4145-8a57-1055e0058723"}},ParcelPanelOrderTrackingConfig={ParcelPanel:{appName:"parcel-panel",appId:"fc785c3f-90e0-4c98-a20c-7cde9ba5e4b5"}},KoalaBundleDiscountConfig={KoalaBundleQuantityDiscount:{appName:"upsell-koala-bundles",appId:"2b951f75-113f-4fca-bdf3-c92703235716"}},AovBundlesVolumeDiscountsConfig={AovBundlesVolumeDiscounts:{appName:"aov-ai-bundle",appId:"0335d423-143c-4ad7-b224-99a1db74a9ee"}},UppromoteAffiliateMarketingConfig={UppromoteAffiliateMarketing:{appName:"uppromote-affiliate",appId:"64c32457-930d-4cb9-9641-e24c0d9cf1f4"}};export{AftershipEmailMarketingsmsConfig,AovBundlesVolumeDiscountsConfig,AovFreeGiftBuyXGetYBogoConfig,AppointmentBookingCowlendarConfig,AppstleBundlesDiscountsConfig,BestBuyFulfillmentConfig,BfSizeChartSizeGuideConfig,BoldSubscriptionsConfig,BonLoyaltyRewardsReferralsConfig,BoostAISearchDiscoveryConfig,EasyBundleBuilderSkailamaConfig,EcoboostifyShoppableReelUgcConfig,EssentialAnnouncementBarConfig,EssentialCountdownTimerBarConfig,EstimatedDeliveryDatePlusConfig,FastBundleBundlesDiscountsConfig,FlyBundlesUpsellsFbtConfig,GloColorSwatchvariantImageConfig,GloboProductOptionsVariantConfig,GrowaveConfig,HextomCountdownTimerBarConfig,HextomFreeShippingBarConfig,HulkProductOptionsConfig,InstasellShoppableInstagramConfig,JunipProductReviewsUgcConfig,KachingBundlesConfig,KiteFreeGiftDiscountConfig,KoalaBundleDiscountConfig,LoloyalLoyaltyReferralsConfig,LoopSubscriptionsConfig,LooxReviewsConfig,MyappgurusProductReviewsConfig,OkendoReviewsLoyaltyConfig,ParcelPanelOrderTrackingConfig,PowerfulContactFormBuilderConfig,PreorderNowPreOrderPqConfig,PreorderNowWodPresaleConfig,ProductOptionsCustomizerConfig,PumperBundlesVolumeDiscountConfig,QikifyUpsellConfig,RechargeSubscriptionsConfig,ReleasitConfig,ReviewxpoProductReviewsAppConfig,SegunoEmailMarketingConfig,SelleasyConfig,SeoantTrustBadgesIconConfig,ShopifyFormsConfig,ShopifySubscriptionsConfig,SimpleBundlesKitsConfig,SkioSubscriptionsYcS20Config,SproutPlantTreesGrowSalesConfig,StampedConfig,SubifySubscriptionsConfig,TrustBadgesBearConfig,TrustedsiteTrustBadgesConfig,TrustooConfig,TrustreviewsProductReviewsConfig,TrustshopProductReviewsConfig,UnlimitedBundlesDiscountsConfig,UppromoteAffiliateMarketingConfig,WhatmoreShoppableVideosreelConfig,WishlistKingConfig,YotpoReviewsV3UgcConfig};