@billgangcom/theme-lib 1.110.4 → 1.110.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.
- package/dist/{builder-4Ke7cjNO.cjs → builder-B7hjBRYI.cjs} +2 -2
- package/dist/{builder-CtBMhTyK.js → builder-D_zv5ue0.js} +5 -5
- package/dist/{builder-components-Dz2YlUqA.cjs → builder-components-BjoFBErH.cjs} +1 -1
- package/dist/{builder-components-Bm7ta9iB.js → builder-components-DN-mNdj8.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +293 -6
- package/dist/{charge-C5z1ecd1.cjs → charge-BAP3iPAM.cjs} +1 -1
- package/dist/{charge-APYiCYYq.js → charge-BQUHzEju.js} +6 -6
- package/dist/{checkout-Bher7FGW.cjs → checkout-CUct7uCm.cjs} +1 -1
- package/dist/{checkout-D3Mpwqsj.js → checkout-uzxtu1pZ.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-DgsmVqD7.cjs → index-BBMTjm8A.cjs} +1 -1
- package/dist/{index-Da1yGZge.js → index-BJMeFohP.js} +1 -1
- package/dist/{index-B1QfR20x.cjs → index-BXhAWCRX.cjs} +1 -1
- package/dist/{index-mEkddX3U.cjs → index-CEMbDy4G.cjs} +1 -1
- package/dist/{index-BAFG_paG.js → index-CMECtXvH.js} +5 -5
- package/dist/{index-C8snA9wm.js → index-CX1FV9wS.js} +5 -5
- package/dist/{index-BMaA9qqZ.cjs → index-Cbqz9kIG.cjs} +1 -1
- package/dist/{index-kt3o_lGR.js → index-CzkkQ8sH.js} +5 -5
- package/dist/{index-Crr7n_oM.cjs → index-R_FZBtaZ.cjs} +1 -1
- package/dist/{index-DjOTY2Jm.js → index-hCDY-ip7.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.es.js +16 -16
- package/dist/{order-BDiqGe6L.cjs → order-BOaO9a-C.cjs} +1 -1
- package/dist/{order-DLMk34KA.js → order-CdPcB1OE.js} +5 -5
- package/dist/src/App.d.ts +18 -0
- package/dist/src/abstractions/IBlock.d.ts +14 -0
- package/dist/src/abstractions/ISettings.d.ts +3 -0
- package/dist/src/abstractions/PageContext.d.ts +121 -0
- package/dist/src/abstractions/Variable.d.ts +28 -0
- package/dist/src/abstractions/color-variables.d.ts +48 -0
- package/dist/src/abstractions/index.d.ts +4 -0
- package/dist/src/api/constants.d.ts +8 -0
- package/dist/src/api/index.d.ts +2 -0
- package/dist/src/api/request.d.ts +17 -0
- package/dist/src/assets/icon-registry/IconRegistry.d.ts +22 -0
- package/dist/src/assets/icon-registry/libraryIcons.d.ts +1 -0
- package/dist/src/assets/storefront-icons/index.d.ts +23 -0
- package/dist/src/builder/api/fetchAll.d.ts +1 -0
- package/dist/src/builder/api/fetchData.d.ts +14 -0
- package/dist/src/builder/api/fetchFontsData.d.ts +1 -0
- package/dist/src/builder/api/fetchPagesData.d.ts +1 -0
- package/dist/src/builder/api/index.d.ts +4 -0
- package/dist/src/builder/components/AddSections/index.d.ts +5 -0
- package/dist/src/builder/components/AddSections/utils/index.d.ts +5 -0
- package/dist/src/builder/components/AddSectionsBlock/index.d.ts +7 -0
- package/dist/src/builder/components/BlockColors/index.d.ts +7 -0
- package/dist/src/builder/components/BlockSettings/index.d.ts +2 -0
- package/dist/src/builder/components/BlockSettings/settings.d.ts +7 -0
- package/dist/src/builder/components/BlockSettingsHeader/index.d.ts +8 -0
- package/dist/src/builder/components/ExitButton/index.d.ts +5 -0
- package/dist/src/builder/components/Header/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderButtons/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderDevices/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderPreviewButton/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderSaveButton/api/index.d.ts +2 -0
- package/dist/src/builder/components/HeaderSaveButton/index.d.ts +7 -0
- package/dist/src/builder/components/HeaderSaveButton/utils/index.d.ts +6 -0
- package/dist/src/builder/components/HeaderSettings/index.d.ts +4 -0
- package/dist/src/builder/components/HeaderSettingsLanguage/index.d.ts +4 -0
- package/dist/src/builder/components/HeaderSettingsPages/api/index.d.ts +1 -0
- package/dist/src/builder/components/HeaderSettingsPages/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderSettingsZoom/index.d.ts +5 -0
- package/dist/src/builder/components/HeaderSwitchTheme/index.d.ts +4 -0
- package/dist/src/builder/components/ModifyPage/index.d.ts +5 -0
- package/dist/src/builder/components/Navbar/index.d.ts +1 -0
- package/dist/src/builder/components/Preview/index.d.ts +2 -0
- package/dist/src/builder/components/PreviewBlockSidebar/index.d.ts +2 -0
- package/dist/src/builder/components/PreviewContent/index.d.ts +6 -0
- package/dist/src/builder/components/PreviewHeader/index.d.ts +2 -0
- package/dist/src/builder/components/Sidebar/index.d.ts +4 -0
- package/dist/src/builder/components/SidebarLayer/index.d.ts +7 -0
- package/dist/src/builder/components/SidebarLayers/index.d.ts +10 -0
- package/dist/src/builder/components/SidebarSettings/index.d.ts +2 -0
- package/dist/src/builder/components/SidebarTheme/index.d.ts +4 -0
- package/dist/src/builder/components/ThemeSettings/index.d.ts +4 -0
- package/dist/src/builder/components/ThemeSettingsBorders/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsButtons/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsCategories/index.d.ts +1 -0
- package/dist/src/builder/components/ThemeSettingsColors/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsColors/utils/getDuplicateColors.d.ts +2 -0
- package/dist/src/builder/components/ThemeSettingsColors/utils/index.d.ts +1 -0
- package/dist/src/builder/components/ThemeSettingsCurrentColors/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsCurrentColors/tip.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsCurrentFont/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsFonts/index.d.ts +5 -0
- package/dist/src/builder/components/ThemeSettingsHeaderItem/index.d.ts +7 -0
- package/dist/src/builder/components/ThemeSettingsInputs/index.d.ts +5 -0
- package/dist/src/builder/constants/block-icons.d.ts +18 -0
- package/dist/src/builder/index.d.ts +10 -0
- package/dist/src/builder/layout.d.ts +5 -0
- package/dist/src/builder/store/index.d.ts +6 -0
- package/dist/src/builder/store/useColorPickerStore.d.ts +53 -0
- package/dist/src/builder/store/useDeviceStore.d.ts +7 -0
- package/dist/src/builder/store/useFontsStore.d.ts +20 -0
- package/dist/src/builder/store/useLayoutStore.d.ts +7 -0
- package/dist/src/builder/store/useSubmodalStore.d.ts +21 -0
- package/dist/src/builder/store/useTooltipStore.d.ts +6 -0
- package/dist/src/builder/ui/AnimatedPanel/index.d.ts +7 -0
- package/dist/src/builder/ui/ColorPicker/index.d.ts +11 -0
- package/dist/src/builder/ui/ColorPicker/modal.d.ts +2 -0
- package/dist/src/builder/ui/Loader/index.d.ts +1 -0
- package/dist/src/builder/ui/Notification/index.d.ts +13 -0
- package/dist/src/builder/ui/Picker/index.d.ts +9 -0
- package/dist/src/builder/ui/Radio/index.d.ts +13 -0
- package/dist/src/builder/ui/Submodal/index.d.ts +10 -0
- package/dist/src/builder/ui/Tooltip/index.d.ts +6 -0
- package/dist/src/builder/utils/formatLabel.d.ts +1 -0
- package/dist/src/builder/utils/getDisplayName.d.ts +1 -0
- package/dist/src/builder/utils/getModalPosition.d.ts +4 -0
- package/dist/src/builder/utils/index.d.ts +3 -0
- package/dist/src/components/lazy-pages.d.ts +22 -0
- package/dist/src/constants/aspectRatio.d.ts +11 -0
- package/dist/src/constants/blocks.d.ts +79 -0
- package/dist/src/constants/color-variables.d.ts +48 -0
- package/dist/src/constants/device.d.ts +6 -0
- package/dist/src/constants/font.d.ts +3 -0
- package/dist/src/constants/icon.d.ts +2 -0
- package/dist/src/constants/index.d.ts +13 -0
- package/dist/src/constants/local-host.d.ts +1 -0
- package/dist/src/constants/navbar.d.ts +8 -0
- package/dist/src/constants/notification.d.ts +16 -0
- package/dist/src/constants/pages.d.ts +22 -0
- package/dist/src/constants/radius-variables.d.ts +15 -0
- package/dist/src/constants/text-font-keys.d.ts +3 -0
- package/dist/src/constants/theme-settings.d.ts +154 -0
- package/dist/src/exports.d.ts +17 -0
- package/dist/src/hooks/useIconRegistration.d.ts +37 -0
- package/dist/src/lib/createTicket.d.ts +1 -0
- package/dist/src/lib/generateDynamicStyles.d.ts +2 -0
- package/dist/src/lib/getDynamicRoutes.d.ts +1 -0
- package/dist/src/lib/hotReload.d.ts +1 -0
- package/dist/src/lib/index.d.ts +9 -0
- package/dist/src/lib/injectStylesToDOM.d.ts +1 -0
- package/dist/src/lib/loadCustomFonts.d.ts +1 -0
- package/dist/src/lib/setupDynamicFonts.d.ts +2 -0
- package/dist/src/lib/splitTextIntoSpans.d.ts +1 -0
- package/dist/src/lib/useBuilderPages.d.ts +1 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/pages/active-page/index.d.ts +5 -0
- package/dist/src/pages/balance/balance-modal.d.ts +6 -0
- package/dist/src/pages/balance/index.d.ts +1 -0
- package/dist/src/pages/balance/model.d.ts +6 -0
- package/dist/src/pages/builder/index.d.ts +12 -0
- package/dist/src/pages/builder/utils/index.d.ts +1 -0
- package/dist/src/pages/charge/index.d.ts +1 -0
- package/dist/src/pages/checkout/index.d.ts +2 -0
- package/dist/src/pages/checkout/model.d.ts +1 -0
- package/dist/src/pages/dynamic-error-page/index.d.ts +2 -0
- package/dist/src/pages/dynamic-page/api/index.d.ts +1 -0
- package/dist/src/pages/dynamic-page/index.d.ts +6 -0
- package/dist/src/pages/error-page/api/index.d.ts +7 -0
- package/dist/src/pages/error-page/index.d.ts +1 -0
- package/dist/src/pages/home/index.d.ts +6 -0
- package/dist/src/pages/home/model.d.ts +26 -0
- package/dist/src/pages/maintenance/index.d.ts +2 -0
- package/dist/src/pages/not-found-page/index.d.ts +2 -0
- package/dist/src/pages/order/index.d.ts +1 -0
- package/dist/src/pages/order/model.d.ts +92 -0
- package/dist/src/pages/orders/index.d.ts +1 -0
- package/dist/src/pages/orders/model.d.ts +4 -0
- package/dist/src/pages/rewards/index.d.ts +6 -0
- package/dist/src/pages/router-error-page/index.d.ts +3 -0
- package/dist/src/pages/subscription/index.d.ts +1 -0
- package/dist/src/pages/subscription/model.d.ts +1 -0
- package/dist/src/pages/subscriptions/index.d.ts +1 -0
- package/dist/src/pages/subscriptions/model.d.ts +6 -0
- package/dist/src/pages/ticket/index.d.ts +1 -0
- package/dist/src/pages/ticket/model.d.ts +24 -0
- package/dist/src/pages/tickets/index.d.ts +1 -0
- package/dist/src/pages/tickets/model.d.ts +21 -0
- package/dist/src/pages/top-up-balance/index.d.ts +1 -0
- package/dist/src/pages/validation/index.d.ts +5 -0
- package/dist/src/pages/wrapper-page/index.d.ts +2 -0
- package/dist/src/shared/constants/aspect-ratio.d.ts +11 -0
- package/dist/src/shared/constants/color-variables.d.ts +48 -0
- package/dist/src/shared/constants/icon.d.ts +2 -0
- package/dist/src/shared/constants/index.d.ts +5 -0
- package/dist/src/shared/constants/notification.d.ts +16 -0
- package/dist/src/shared/constants/text-font-keys.d.ts +3 -0
- package/dist/src/storefront/api/auth.d.ts +22 -0
- package/dist/src/storefront/api/charge.d.ts +1 -0
- package/dist/src/storefront/api/coupon.d.ts +2 -0
- package/dist/src/storefront/api/customer.d.ts +6 -0
- package/dist/src/storefront/api/discord.d.ts +8 -0
- package/dist/src/storefront/api/fetchGatewaysDetail.d.ts +1 -0
- package/dist/src/storefront/api/fetchGeneral.d.ts +1 -0
- package/dist/src/storefront/api/fetchThemeAndSettings.d.ts +1 -0
- package/dist/src/storefront/api/fetchWithPages.d.ts +11 -0
- package/dist/src/storefront/api/index.d.ts +19 -0
- package/dist/src/storefront/api/order.d.ts +14 -0
- package/dist/src/storefront/api/postBalanceTopUp.d.ts +2 -0
- package/dist/src/storefront/api/postCashappLink.d.ts +3 -0
- package/dist/src/storefront/api/referral.d.ts +3 -0
- package/dist/src/storefront/api/reviews.d.ts +2 -0
- package/dist/src/storefront/api/rewards.d.ts +2 -0
- package/dist/src/storefront/api/signUpReferral.d.ts +2 -0
- package/dist/src/storefront/api/store.d.ts +6 -0
- package/dist/src/storefront/api/subscription.d.ts +22 -0
- package/dist/src/storefront/api/ticket.d.ts +7 -0
- package/dist/src/storefront/api/transactions.d.ts +5 -0
- package/dist/src/storefront/components/ActivePaymentMethod/index.d.ts +2 -0
- package/dist/src/storefront/components/ActiveSubscriptionProduct/index.d.ts +9 -0
- package/dist/src/storefront/components/Auth/index.d.ts +11 -0
- package/dist/src/storefront/components/Auth/otp-input.d.ts +7 -0
- package/dist/src/storefront/components/AuthModal/index.d.ts +6 -0
- package/dist/src/storefront/components/CancelSubscription/index.d.ts +8 -0
- package/dist/src/storefront/components/CashAppVerify/index.d.ts +7 -0
- package/dist/src/storefront/components/ChangePaymentMethod/index.d.ts +7 -0
- package/dist/src/storefront/components/ChangeSubscriptionPlan/index.d.ts +10 -0
- package/dist/src/storefront/components/ChargeBlocksRenderer/index.d.ts +6 -0
- package/dist/src/storefront/components/ChargeItems/index.d.ts +7 -0
- package/dist/src/storefront/components/ChargeStatusBlock/index.d.ts +10 -0
- package/dist/src/storefront/components/CheckoutFooter/index.d.ts +6 -0
- package/dist/src/storefront/components/CheckoutHeader/index.d.ts +7 -0
- package/dist/src/storefront/components/CheckoutItems/index.d.ts +18 -0
- package/dist/src/storefront/components/CheckoutOperational/index.d.ts +26 -0
- package/dist/src/storefront/components/CheckoutOrderMainData/index.d.ts +10 -0
- package/dist/src/storefront/components/CheckoutPrices/index.d.ts +15 -0
- package/dist/src/storefront/components/CheckoutProduct/index.d.ts +8 -0
- package/dist/src/storefront/components/CheckoutProduct/model.d.ts +1 -0
- package/dist/src/storefront/components/ChoosePlanUpgradeMethod/index.d.ts +9 -0
- package/dist/src/storefront/components/ConnectDiscord/index.d.ts +6 -0
- package/dist/src/storefront/components/ConnectDiscord/model.d.ts +22 -0
- package/dist/src/storefront/components/Coupon/index.d.ts +12 -0
- package/dist/src/storefront/components/CustomFields/index.d.ts +13 -0
- package/dist/src/storefront/components/CustomerDashboard/index.d.ts +2 -0
- package/dist/src/storefront/components/DeliveryItem/index.d.ts +7 -0
- package/dist/src/storefront/components/InsufficientBalance/index.d.ts +8 -0
- package/dist/src/storefront/components/LeaveAReview/index.d.ts +9 -0
- package/dist/src/storefront/components/NoItemsBlock/index.d.ts +8 -0
- package/dist/src/storefront/components/OpenDelivery/index.d.ts +8 -0
- package/dist/src/storefront/components/OrderStatusBlock/index.d.ts +9 -0
- package/dist/src/storefront/components/OrdersTable/index.d.ts +16 -0
- package/dist/src/storefront/components/PageLoading/index.d.ts +7 -0
- package/dist/src/storefront/components/PageTitle/index.d.ts +6 -0
- package/dist/src/storefront/components/Pagination/index.d.ts +15 -0
- package/dist/src/storefront/components/PayPalF&FNote/index.d.ts +8 -0
- package/dist/src/storefront/components/PaymentMethod/checkout-balance-payment-method.d.ts +14 -0
- package/dist/src/storefront/components/PaymentMethod/index.d.ts +16 -0
- package/dist/src/storefront/components/PaymentMethod/model.d.ts +21 -0
- package/dist/src/storefront/components/PaymentMethods/index.d.ts +19 -0
- package/dist/src/storefront/components/PreviewRender/index.d.ts +23 -0
- package/dist/src/storefront/components/ProcessingPayment/index.d.ts +1 -0
- package/dist/src/storefront/components/ReferralBlock/index.d.ts +18 -0
- package/dist/src/storefront/components/ReferralBlock/mask.d.ts +1 -0
- package/dist/src/storefront/components/ReferralBlock/referral-modal.d.ts +7 -0
- package/dist/src/storefront/components/ReferralBlock/step-item.d.ts +8 -0
- package/dist/src/storefront/components/SecuredBySsl/index.d.ts +6 -0
- package/dist/src/storefront/components/Sidebar/card.d.ts +7 -0
- package/dist/src/storefront/components/Sidebar/index.d.ts +4 -0
- package/dist/src/storefront/components/Sidebar/nav-list.d.ts +5 -0
- package/dist/src/storefront/components/StatItem/index.d.ts +15 -0
- package/dist/src/storefront/components/StatusIndicator/index.d.ts +7 -0
- package/dist/src/storefront/components/SubmitReview/index.d.ts +7 -0
- package/dist/src/storefront/components/SubscriptionCoupon/index.d.ts +7 -0
- package/dist/src/storefront/components/SubscriptionExpiration/index.d.ts +6 -0
- package/dist/src/storefront/components/SubscriptionExpirationDate/index.d.ts +2 -0
- package/dist/src/storefront/components/SubscriptionProduct/index.d.ts +7 -0
- package/dist/src/storefront/components/SubscriptionProduct/model.d.ts +9 -0
- package/dist/src/storefront/components/SubscriptionStatusBadge/index.d.ts +5 -0
- package/dist/src/storefront/components/SubscriptionsTable/index.d.ts +11 -0
- package/dist/src/storefront/components/Table/index.d.ts +20 -0
- package/dist/src/storefront/components/TermsOfService/index.d.ts +1 -0
- package/dist/src/storefront/components/TicketRow/index.d.ts +5 -0
- package/dist/src/storefront/components/TrackPayment/index.d.ts +8 -0
- package/dist/src/storefront/components/index.d.ts +53 -0
- package/dist/src/storefront/constants/actions.d.ts +3 -0
- package/dist/src/storefront/constants/api.d.ts +2 -0
- package/dist/src/storefront/constants/index.d.ts +3 -0
- package/dist/src/storefront/constants/referralSteps.d.ts +6 -0
- package/dist/src/storefront/constants/routes.d.ts +15 -0
- package/dist/src/storefront/hooks/index.d.ts +2 -0
- package/dist/src/storefront/hooks/useCart.d.ts +186 -0
- package/dist/src/storefront/hooks/useCopy.d.ts +1 -0
- package/dist/src/storefront/index.d.ts +11 -0
- package/dist/src/storefront/models/balance.d.ts +56 -0
- package/dist/src/storefront/models/charge.d.ts +76 -0
- package/dist/src/storefront/models/checkout.d.ts +21 -0
- package/dist/src/storefront/models/coupon.d.ts +5 -0
- package/dist/src/storefront/models/discord.d.ts +18 -0
- package/dist/src/storefront/models/gateway.d.ts +8 -0
- package/dist/src/storefront/models/index.d.ts +16 -0
- package/dist/src/storefront/models/order.d.ts +139 -0
- package/dist/src/storefront/models/payment.d.ts +16 -0
- package/dist/src/storefront/models/post.d.ts +5 -0
- package/dist/src/storefront/models/price.d.ts +5 -0
- package/dist/src/storefront/models/referral.d.ts +12 -0
- package/dist/src/storefront/models/referralCode.d.ts +3 -0
- package/dist/src/storefront/models/rewards.d.ts +72 -0
- package/dist/src/storefront/models/shop.d.ts +38 -0
- package/dist/src/storefront/models/subscription.d.ts +130 -0
- package/dist/src/storefront/models/transaction.d.ts +12 -0
- package/dist/src/storefront/store/index.d.ts +22 -0
- package/dist/src/storefront/store/useApiStore.d.ts +8 -0
- package/dist/src/storefront/store/useBlocksStore.d.ts +23 -0
- package/dist/src/storefront/store/useCartStore.d.ts +48 -0
- package/dist/src/storefront/store/useChooseImageStore.d.ts +11 -0
- package/dist/src/storefront/store/useConfirmationModalStore.d.ts +10 -0
- package/dist/src/storefront/store/useCustomerDashboardStore.d.ts +37 -0
- package/dist/src/storefront/store/useDiscordStore.d.ts +7 -0
- package/dist/src/storefront/store/useErrorStore.d.ts +12 -0
- package/dist/src/storefront/store/useGeneralStore.d.ts +9 -0
- package/dist/src/storefront/store/useHistoryState.d.ts +20 -0
- package/dist/src/storefront/store/useLayersStore.d.ts +42 -0
- package/dist/src/storefront/store/useModalStore.d.ts +6 -0
- package/dist/src/storefront/store/useNavbarStore.d.ts +7 -0
- package/dist/src/storefront/store/useNotificationStore.d.ts +7 -0
- package/dist/src/storefront/store/usePagesStore.d.ts +33 -0
- package/dist/src/storefront/store/usePaginationPagesStore.d.ts +7 -0
- package/dist/src/storefront/store/usePreviewStore.d.ts +26 -0
- package/dist/src/storefront/store/useSettingsStore.d.ts +12 -0
- package/dist/src/storefront/store/useShareLinkStore.d.ts +6 -0
- package/dist/src/storefront/store/useStorefrontStore.d.ts +23 -0
- package/dist/src/storefront/store/useSubscriptionStore.d.ts +7 -0
- package/dist/src/storefront/store/useThemeSettingsStore.d.ts +21 -0
- package/dist/src/storefront/ui/ActiveBadge/index.d.ts +5 -0
- package/dist/src/storefront/ui/InputRange/index.d.ts +9 -0
- package/dist/src/storefront/ui/ProgressBar/index.d.ts +8 -0
- package/dist/src/storefront/ui/Rating/index.d.ts +8 -0
- package/dist/src/storefront/ui/Timer/index.d.ts +6 -0
- package/dist/src/storefront/ui/index.d.ts +5 -0
- package/dist/src/storefront/utils/MarkdownText.d.ts +5 -0
- package/dist/src/storefront/utils/checkParams.d.ts +5 -0
- package/dist/src/storefront/utils/checkToken.d.ts +1 -0
- package/dist/src/storefront/utils/clearQueryParams.d.ts +1 -0
- package/dist/src/storefront/utils/index.d.ts +16 -0
- package/dist/src/storefront/utils/parseDraftJsText.d.ts +1 -0
- package/dist/src/storefront/utils/recapcha.d.ts +13 -0
- package/dist/src/storefront/utils/resizeManager.d.ts +12 -0
- package/dist/src/storefront/utils/showNotification.d.ts +3 -0
- package/dist/src/storefront/utils/stable-text.d.ts +20 -0
- package/dist/src/storefront/utils/useAdaptiveStyles.d.ts +2 -0
- package/dist/src/storefront/utils/useBalance.d.ts +2 -0
- package/dist/src/storefront/utils/useCart.d.ts +1 -0
- package/dist/src/storefront/utils/useGeneralInfo.d.ts +4 -0
- package/dist/src/storefront/utils/useMarkdownIt.d.ts +2 -0
- package/dist/src/storefront/utils/useTrackingAnalytics.d.ts +2 -0
- package/dist/src/ui/Accordion/index.d.ts +8 -0
- package/dist/src/ui/AlignText/index.d.ts +7 -0
- package/dist/src/ui/BuilderModal/index.d.ts +9 -0
- package/dist/src/ui/Button/index.d.ts +16 -0
- package/dist/src/ui/ButtonSettings/index.d.ts +14 -0
- package/dist/src/ui/ButtonTypeSettings/index.d.ts +11 -0
- package/dist/src/ui/ButtonsSettings/index.d.ts +28 -0
- package/dist/src/ui/ButtonsSettings/popup.d.ts +13 -0
- package/dist/src/ui/CategorySettings/index.d.ts +48 -0
- package/dist/src/ui/Checkbox/index.d.ts +7 -0
- package/dist/src/ui/ChooseImage/api/index.d.ts +2 -0
- package/dist/src/ui/ChooseImage/index.d.ts +17 -0
- package/dist/src/ui/ConfirmationModal/index.d.ts +2 -0
- package/dist/src/ui/ErrorableBlock/index.d.ts +5 -0
- package/dist/src/ui/FormSettings/index.d.ts +65 -0
- package/dist/src/ui/FormSettings/popup.d.ts +70 -0
- package/dist/src/ui/GroupCardModal/index.d.ts +14 -0
- package/dist/src/ui/HeaderButtons/index.d.ts +47 -0
- package/dist/src/ui/Icon/index.d.ts +13 -0
- package/dist/src/ui/Input/index.d.ts +25 -0
- package/dist/src/ui/InputSettings/index.d.ts +22 -0
- package/dist/src/ui/ItemsSettings/index.d.ts +70 -0
- package/dist/src/ui/ItemsSettings/popup.d.ts +84 -0
- package/dist/src/ui/LayoutSettings/index.d.ts +13 -0
- package/dist/src/ui/Link/index.d.ts +10 -0
- package/dist/src/ui/ListingSelector/index.d.ts +134 -0
- package/dist/src/ui/ListingSelector/popup.d.ts +20 -0
- package/dist/src/ui/Loader/index.d.ts +4 -0
- package/dist/src/ui/LoaderBuilder/index.d.ts +2 -0
- package/dist/src/ui/MetaInfoPost/index.d.ts +6 -0
- package/dist/src/ui/Modal/index.d.ts +9 -0
- package/dist/src/ui/NotificationAntistock/index.d.ts +11 -0
- package/dist/src/ui/NotificationBuilder/index.d.ts +13 -0
- package/dist/src/ui/OtherSettings/index.d.ts +15 -0
- package/dist/src/ui/PagesSettings/index.d.ts +26 -0
- package/dist/src/ui/ProductCardButtons/index.d.ts +10 -0
- package/dist/src/ui/ProductCardModal/index.d.ts +10 -0
- package/dist/src/ui/ProductOptions/index.d.ts +13 -0
- package/dist/src/ui/Radio/index.d.ts +14 -0
- package/dist/src/ui/RangeSelector/index.d.ts +11 -0
- package/dist/src/ui/Select/index.d.ts +20 -0
- package/dist/src/ui/Select/utils/index.d.ts +2 -0
- package/dist/src/ui/SelectInfiniteList/index.d.ts +20 -0
- package/dist/src/ui/SelectInfiniteList/utils/index.d.ts +2 -0
- package/dist/src/ui/SelectTypeText/index.d.ts +8 -0
- package/dist/src/ui/ShareLink/index.d.ts +5 -0
- package/dist/src/ui/Switch/index.d.ts +11 -0
- package/dist/src/ui/TextSettings/index.d.ts +20 -0
- package/dist/src/ui/Textarea/index.d.ts +13 -0
- package/dist/src/ui/TextareaSettings/index.d.ts +11 -0
- package/dist/src/ui/Tip/index.d.ts +10 -0
- package/dist/src/ui/TypesText/index.d.ts +7 -0
- package/dist/src/ui/Wrapper/index.d.ts +11 -0
- package/dist/src/ui/index.d.ts +44 -0
- package/dist/{subscription-CfSbneE9.js → subscription-DIDUTEI3.js} +5 -5
- package/dist/{subscription-CN0GP1i3.cjs → subscription-iNnLGi0T.cjs} +1 -1
- package/dist/{ticket-CDRAyz3r.js → ticket-B0VGIvyK.js} +5 -5
- package/dist/{ticket-Disch8gb.cjs → ticket-DXz_-29l.cjs} +1 -1
- package/dist/{top-up-r9pRDkRB.cjs → top-up-B7E7FUjn.cjs} +1 -1
- package/dist/{top-up-DEMHwk2Q.js → top-up-BhB8jhP6.js} +5 -5
- package/dist/ui-components-BTotDG_w.js +6447 -0
- package/dist/ui-components-CWLDlDmG.cjs +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +6 -6
- package/dist/{validation-HSAYPvwb.cjs → validation-BVAD1q1L.cjs} +1 -1
- package/dist/{validation-BwaClAh8.js → validation-jCwzu5MC.js} +5 -5
- package/package.json +3 -2
- package/dist/App-Clwk7ILO.js +0 -315
- package/dist/App-txB8kbk7.cjs +0 -1
- package/dist/ui-components-CDqqhvCf.js +0 -11007
- package/dist/ui-components-DcRUDS1O.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const g=require("./builder-4Ke7cjNO.cjs"),s=require("react/jsx-runtime"),P=require("react"),w=require("./ui-components-DcRUDS1O.cjs");require("./builder-components-Dz2YlUqA.cjs");const Uc=require("./ticket-Disch8gb.cjs");require("react-dom");const Vc=require("./order-BDiqGe6L.cjs"),Od=require("./subscription-CN0GP1i3.cjs");function Md(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ne=Md(P),Fd=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,zc=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(Fd())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})};async function Bd(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const jd=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},Hd=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},Ud=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},_r=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},Vd=()=>_r("dash/info"),zd=()=>_r("dash/dashboard/home"),$d=()=>_r("rewards"),qd=()=>_r("balance"),Zd=()=>_r("balance/top-up/settings"),Wd=()=>_r("referral-system"),Fi=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},Yd=()=>Fi("terms"),Gd=()=>Fi("refund-policy"),Xd=()=>Fi("privacy-policy"),oi=10,Xu=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${oi}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},Bi=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},Qd=e=>Bi("","post",e),Kd=({PageNumber:e})=>Xu({url:"customers/orders",PageNumber:e}),Jd=e=>Bi(e),e2=e=>Bi(e),t2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},n2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},r2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},u2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},a2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},i2=({PageNumber:e})=>Xu({url:"customers/subscriptions",PageNumber:e}),s2=async({id:e,accessToken:t})=>await r2(e,t),o2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},c2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},l2=async(e,t,n,r,u)=>{const a=g.useApiStore.getState().apiUrls,i=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${a.slApi}/v1/public/${i}/tickets/${e}/${t}/answer`;return(await g.request({url:o,method:"post",body:{message:n,recaptcha:r,tsId:u},withToken:!1})).data},d2=({PageNumber:e})=>Xu({url:"customers/tickets",PageNumber:e}),f2=({PageNumber:e})=>Xu({url:"customers/balance/transactions",PageNumber:e}),h2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},p2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},$c=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},qc=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},Zc=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ci=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},m2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:Zc,logoutCustomer:ci,requestOtp:qc},Symbol.toStringTag,{value:"Module"})),b2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},g2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},_2=async()=>{const{data:e}=await Wd();return e},x2=async e=>{const{data:t}=await g2(e);return t},C2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},E2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function T2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const ya="Balance",Sn={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},y2={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},Rs=(e,t)=>{var l;const{productId:n,productVariantId:r,quantity:u,chargeType:a}=t,i=e.find(h=>h.id===n);if(!i)throw new Error("Product does not exist");const o=i.variants.find(h=>h.id===r);if(!o)throw new Error("Variant does not exist");if(a==="RECURRING"&&!o.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(u!==void 0&&((l=o.quantity)!=null&&l.available)&&o.quantity.available<u)throw new Error("Not enough quantity available");const c=g.useCartStore.getState().cart;if(c.parts.length>0){const h=e.find(m=>m.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(m=>m.id===c.parts[0].productVariantId);if(f&&o.price.currency!==f.price.currency)throw new Error("Product have different currency")}return o},k2=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(u=>t>=u.amount);return n.length===0?0:n.reduce((u,a)=>a.amount>u.amount?a:u).percentage},A2=(e,t)=>{let n=0,r=0;return e.forEach(u=>{var m,p;const a=t.find(b=>(b==null?void 0:b.id)===u.productId),i=a==null?void 0:a.variants.find(b=>b.id===u.productVariantId);if(!i)return;const{gateway:o}=g.useCartStore.getState().cart,c=(i==null?void 0:i.gateways)||[],l=c.some(b=>b.name===o&&b.overrodePrice)?(m=c.find(b=>b.name===o))==null?void 0:m.overrodePrice:null;let h=0,f=0;if(u.chargeType==="ONE_TIME"?(h=(l==null?void 0:l.amount)||(i==null?void 0:i.price.amount)||0,f=h*u.quantity):f=i!=null&&i.subscriptionSettings?i.subscriptionSettings.price.amount+(((p=i.subscriptionSettings.entryFee)==null?void 0:p.amount)||0):0,n+=f,u.chargeType==="ONE_TIME"){const b=k2(i,u.quantity),x=f*(1-b/100);r+=x}else r+=f}),{total:n,totalWithVolumeDiscounts:r}},S2=(e,t)=>({isRequired:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),Ps=e=>new Set(e.gateways.map(t=>t.name)),ka={availableGateways:[],requiresSignInGateways:[]},Os=(e,t)=>{if(t.length===0)return ka;const n=e[0];if(!n)return ka;const r=t.find(o=>o.id===n.productId),u=r==null?void 0:r.variants.find(o=>o.id===n.productVariantId);if(!u)return ka;const a=Ps(u);for(const o of e){const c=t.find(f=>f.id===o.productId);if(!c)continue;const l=c.variants.find(f=>f.id===o.productVariantId);if(!l)continue;const h=Ps(l);for(const f of a)h.has(f)||a.delete(f)}return!localStorage.getItem("token")&&a.has(ya)?(a.delete(ya),{availableGateways:[...a],requiresSignInGateways:[ya]}):{availableGateways:[...a],requiresSignInGateways:[]}},Ms=(e,t)=>{if(e.length===0)return[];const r=e.map(a=>{const i=t.find(c=>c.id===a.productId),o=i==null?void 0:i.variants.find(c=>c.id===a.productVariantId);return(o==null?void 0:o.customFields)??[]}).flat().reduce((a,i)=>{const o=a[i.name];return o?(i.required&&!o.required&&(a[i.name]={...i,value:i.defaultValue}),a):(a[i.name]={...i,value:i.defaultValue},a)},{});return Object.values(r).map(a=>({...a,value:""}))},I2=(e,t)=>{const n=t.find(u=>u.id===e.productId),r=n==null?void 0:n.variants.find(u=>u.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(r!=null&&r.subscriptionSettings):!1},nu=()=>{const{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,customerEmail:a,setCart:i,setProducts:o,setCoupon:c,setPending:l,setApplyCouponPending:h}=g.useCartStore(),f=async x=>{var V;h(!0);const{cart:E}=g.useCartStore.getState(),{gateway:_,parts:I}=E,{notifications:k,setNotifications:D}=g.useNotificationStore.getState();_||(h(!1),D([...k,{message:"There should be a gateway for the coupon",status:"error",id:g.v4()}]));const N=I.map(Y=>Y.productId);let v=null;try{const{data:Y}=await b2({gateway:_,couponName:x,productIds:N});v=Y.data,D([...k,{message:"Coupon is applied",status:"success",id:g.v4()}]),i(Z=>({...Z,coupon:x}))}catch(Y){const Z=Y;D([...k,{message:`Coupon is not applied: ${Z.message}`,status:"error",id:g.v4()}]),i(L=>({...L,coupon:null})),c(null),h(!1)}if(h(!1),(V=v==null?void 0:v.restrictToProductIds)!=null&&V.length&&!N.every(Y=>{var Z;return(Z=v==null?void 0:v.restrictToProductIds)==null?void 0:Z.includes(Y)}))throw new Error("Coupon can't be applied to such products");return c(v),v},b={reset(){i({...y2})},addProducts:x=>{const E=g.useCartStore.getState().products,_=x.filter(I=>!E.some(k=>k.id===I.id));o([...E,..._])},addProductToCart:x=>{const E=g.useCartStore.getState().cart;try{Rs(t,x)}catch(I){throw new Error(I)}const _=E.parts.find(I=>I.productId===x.productId&&I.productVariantId===x.productVariantId&&I.chargeType===x.chargeType);if(_)return b.updateQuantityOfProduct({..._,quantity:(_.quantity||1)+(x.quantity||1),chargeType:x.chargeType});if(E.parts.length&&Os([...E.parts,x],t).availableGateways.length===0)throw new Error("No common payment gateways available");i({...E,parts:[...E.parts,x]}),E.coupon&&f(E.coupon)},removeProduct({productId:x,productVariantId:E}){i(_=>({..._,parts:_.parts.filter(I=>I.productId!==x||I.productVariantId!==E)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return Os(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return S2(t,e.parts)},updateQuantityOfProduct(x){Rs(t,x),i(E=>({...E,parts:E.parts.map(_=>_.productId===x.productId&&_.productVariantId===x.productVariantId?{..._,quantity:x.quantity,chargeType:x.chargeType}:_)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:x}=g.useCartStore.getState(),{total:E,totalWithVolumeDiscounts:_}=A2(e.parts,t);let I;const k=_;return x&&x.discount?!x.isFixed&&x.discount===100?I=0:I=x.isFixed?Math.max(0,k-x.discount):k*(1-x.discount/100):_!==E&&(I=_),{total:E,totalWithVolumeDiscounts:_!==E?_:void 0,totalWithDiscount:I}},setGateway(x){i(_=>({..._,gateway:x}));const{isAntistock:E}=g.useGeneralStore.getState();e.coupon&&!E&&f(e.coupon)},setPaymentMethod(x){i(E=>({...E,paymentMethod:x}))},async submitCart(x){l(!0);const{cart:E}=g.useCartStore.getState(),{discordInfo:_}=g.useDiscordStore.getState();let I;if(E.parts&&a&&I2(E.parts[0],t))try{const{data:k}=await t2({gateway:E.gateway,coupon:E.coupon,partOrder:E.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:_!=null&&_.authorized?_.id:null,customerEmail:a,recaptcha:x,customFields:{...E.customFields},tsId:g.useGetTsId()});I=k.data}catch(k){console.error(k)}else try{const{data:k}=await Qd({gateway:E.gateway,parts:[...E.parts],coupon:E.coupon,customerEmail:E.customerEmail,referralCode:localStorage.getItem("referralCode"),recaptcha:x,customFields:{...E.customFields},tsId:g.useGetTsId(),discordSocialConnectId:_!=null&&_.authorized?_.id:null});I=k.data}catch(k){const D=k,{notifications:N,setNotifications:v}=g.useNotificationStore.getState();v([...N,{message:`Failed to create order: ${D.message}`,status:"error",id:g.v4()}])}if(l(!1),I)return I;throw new Error("Failed to create order")},setDiscordSocialConnectId(x){i(E=>({...E,discordSocialConnectId:x}))},setCustomFields(x){i(E=>({...E,customFields:{...x}}))}};return P.useEffect(()=>{i(x=>({...x,customerEmail:a??""}))},[a,i]),{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,applyCoupon:f,...b}},Yn=()=>{const{notifications:e,setNotifications:t}=g.useNotificationStore();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:g.v4()}])}};var li={exports:{}},mu={exports:{}},Ie={};/** @license React v16.13.1
|
|
1
|
+
"use strict";const g=require("./builder-B7hjBRYI.cjs"),s=require("react/jsx-runtime"),P=require("react"),w=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");const Uc=require("./ticket-DXz_-29l.cjs");require("react-dom");const Vc=require("./order-BOaO9a-C.cjs"),Od=require("./subscription-iNnLGi0T.cjs");function Md(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ne=Md(P),Fd=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,zc=({children:e,className:t,as:n="span",...r})=>{const[u,a]=P.useState(!1);return P.useEffect(()=>{typeof window<"u"&&a(Fd())},[]),u?s.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):s.jsx(n,{className:t,...r,children:e})};async function Bd(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const jd=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},Hd=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},Ud=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},_r=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},Vd=()=>_r("dash/info"),zd=()=>_r("dash/dashboard/home"),$d=()=>_r("rewards"),qd=()=>_r("balance"),Zd=()=>_r("balance/top-up/settings"),Wd=()=>_r("referral-system"),Fi=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},Yd=()=>Fi("terms"),Gd=()=>Fi("refund-policy"),Xd=()=>Fi("privacy-policy"),oi=10,Xu=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${oi}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),i=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:i}},Bi=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},Qd=e=>Bi("","post",e),Kd=({PageNumber:e})=>Xu({url:"customers/orders",PageNumber:e}),Jd=e=>Bi(e),e2=e=>Bi(e),t2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},n2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},r2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},u2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},a2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},i2=({PageNumber:e})=>Xu({url:"customers/subscriptions",PageNumber:e}),s2=async({id:e,accessToken:t})=>await r2(e,t),o2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},c2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},l2=async(e,t,n,r,u)=>{const a=g.useApiStore.getState().apiUrls,i=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${a.slApi}/v1/public/${i}/tickets/${e}/${t}/answer`;return(await g.request({url:o,method:"post",body:{message:n,recaptcha:r,tsId:u},withToken:!1})).data},d2=({PageNumber:e})=>Xu({url:"customers/tickets",PageNumber:e}),f2=({PageNumber:e})=>Xu({url:"customers/balance/transactions",PageNumber:e}),h2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},p2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},$c=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(i=>["names",i]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},qc=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},Zc=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:i,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ci=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},m2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:Zc,logoutCustomer:ci,requestOtp:qc},Symbol.toStringTag,{value:"Module"})),b2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},g2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},_2=async()=>{const{data:e}=await Wd();return e},x2=async e=>{const{data:t}=await g2(e);return t},C2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},E2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function T2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const ya="Balance",Sn={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},y2={customerEmail:"",recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},Rs=(e,t)=>{var l;const{productId:n,productVariantId:r,quantity:u,chargeType:a}=t,i=e.find(h=>h.id===n);if(!i)throw new Error("Product does not exist");const o=i.variants.find(h=>h.id===r);if(!o)throw new Error("Variant does not exist");if(a==="RECURRING"&&!o.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(u!==void 0&&((l=o.quantity)!=null&&l.available)&&o.quantity.available<u)throw new Error("Not enough quantity available");const c=g.useCartStore.getState().cart;if(c.parts.length>0){const h=e.find(m=>m.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(m=>m.id===c.parts[0].productVariantId);if(f&&o.price.currency!==f.price.currency)throw new Error("Product have different currency")}return o},k2=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(u=>t>=u.amount);return n.length===0?0:n.reduce((u,a)=>a.amount>u.amount?a:u).percentage},A2=(e,t)=>{let n=0,r=0;return e.forEach(u=>{var m,p;const a=t.find(b=>(b==null?void 0:b.id)===u.productId),i=a==null?void 0:a.variants.find(b=>b.id===u.productVariantId);if(!i)return;const{gateway:o}=g.useCartStore.getState().cart,c=(i==null?void 0:i.gateways)||[],l=c.some(b=>b.name===o&&b.overrodePrice)?(m=c.find(b=>b.name===o))==null?void 0:m.overrodePrice:null;let h=0,f=0;if(u.chargeType==="ONE_TIME"?(h=(l==null?void 0:l.amount)||(i==null?void 0:i.price.amount)||0,f=h*u.quantity):f=i!=null&&i.subscriptionSettings?i.subscriptionSettings.price.amount+(((p=i.subscriptionSettings.entryFee)==null?void 0:p.amount)||0):0,n+=f,u.chargeType==="ONE_TIME"){const b=k2(i,u.quantity),x=f*(1-b/100);r+=x}else r+=f}),{total:n,totalWithVolumeDiscounts:r}},S2=(e,t)=>({isRequired:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(r=>{var a;const u=e.find(i=>(i==null?void 0:i.id)===r.productId);return(a=u==null?void 0:u.variants.find(i=>i.id===r.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),Ps=e=>new Set(e.gateways.map(t=>t.name)),ka={availableGateways:[],requiresSignInGateways:[]},Os=(e,t)=>{if(t.length===0)return ka;const n=e[0];if(!n)return ka;const r=t.find(o=>o.id===n.productId),u=r==null?void 0:r.variants.find(o=>o.id===n.productVariantId);if(!u)return ka;const a=Ps(u);for(const o of e){const c=t.find(f=>f.id===o.productId);if(!c)continue;const l=c.variants.find(f=>f.id===o.productVariantId);if(!l)continue;const h=Ps(l);for(const f of a)h.has(f)||a.delete(f)}return!localStorage.getItem("token")&&a.has(ya)?(a.delete(ya),{availableGateways:[...a],requiresSignInGateways:[ya]}):{availableGateways:[...a],requiresSignInGateways:[]}},Ms=(e,t)=>{if(e.length===0)return[];const r=e.map(a=>{const i=t.find(c=>c.id===a.productId),o=i==null?void 0:i.variants.find(c=>c.id===a.productVariantId);return(o==null?void 0:o.customFields)??[]}).flat().reduce((a,i)=>{const o=a[i.name];return o?(i.required&&!o.required&&(a[i.name]={...i,value:i.defaultValue}),a):(a[i.name]={...i,value:i.defaultValue},a)},{});return Object.values(r).map(a=>({...a,value:""}))},I2=(e,t)=>{const n=t.find(u=>u.id===e.productId),r=n==null?void 0:n.variants.find(u=>u.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(r!=null&&r.subscriptionSettings):!1},nu=()=>{const{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,customerEmail:a,setCart:i,setProducts:o,setCoupon:c,setPending:l,setApplyCouponPending:h}=g.useCartStore(),f=async x=>{var V;h(!0);const{cart:E}=g.useCartStore.getState(),{gateway:_,parts:I}=E,{notifications:k,setNotifications:D}=g.useNotificationStore.getState();_||(h(!1),D([...k,{message:"There should be a gateway for the coupon",status:"error",id:g.v4()}]));const N=I.map(Y=>Y.productId);let v=null;try{const{data:Y}=await b2({gateway:_,couponName:x,productIds:N});v=Y.data,D([...k,{message:"Coupon is applied",status:"success",id:g.v4()}]),i(Z=>({...Z,coupon:x}))}catch(Y){const Z=Y;D([...k,{message:`Coupon is not applied: ${Z.message}`,status:"error",id:g.v4()}]),i(L=>({...L,coupon:null})),c(null),h(!1)}if(h(!1),(V=v==null?void 0:v.restrictToProductIds)!=null&&V.length&&!N.every(Y=>{var Z;return(Z=v==null?void 0:v.restrictToProductIds)==null?void 0:Z.includes(Y)}))throw new Error("Coupon can't be applied to such products");return c(v),v},b={reset(){i({...y2})},addProducts:x=>{const E=g.useCartStore.getState().products,_=x.filter(I=>!E.some(k=>k.id===I.id));o([...E,..._])},addProductToCart:x=>{const E=g.useCartStore.getState().cart;try{Rs(t,x)}catch(I){throw new Error(I)}const _=E.parts.find(I=>I.productId===x.productId&&I.productVariantId===x.productVariantId&&I.chargeType===x.chargeType);if(_)return b.updateQuantityOfProduct({..._,quantity:(_.quantity||1)+(x.quantity||1),chargeType:x.chargeType});if(E.parts.length&&Os([...E.parts,x],t).availableGateways.length===0)throw new Error("No common payment gateways available");i({...E,parts:[...E.parts,x]}),E.coupon&&f(E.coupon)},removeProduct({productId:x,productVariantId:E}){i(_=>({..._,parts:_.parts.filter(I=>I.productId!==x||I.productVariantId!==E)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return Os(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return S2(t,e.parts)},updateQuantityOfProduct(x){Rs(t,x),i(E=>({...E,parts:E.parts.map(_=>_.productId===x.productId&&_.productVariantId===x.productVariantId?{..._,quantity:x.quantity,chargeType:x.chargeType}:_)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:x}=g.useCartStore.getState(),{total:E,totalWithVolumeDiscounts:_}=A2(e.parts,t);let I;const k=_;return x&&x.discount?!x.isFixed&&x.discount===100?I=0:I=x.isFixed?Math.max(0,k-x.discount):k*(1-x.discount/100):_!==E&&(I=_),{total:E,totalWithVolumeDiscounts:_!==E?_:void 0,totalWithDiscount:I}},setGateway(x){i(_=>({..._,gateway:x}));const{isAntistock:E}=g.useGeneralStore.getState();e.coupon&&!E&&f(e.coupon)},setPaymentMethod(x){i(E=>({...E,paymentMethod:x}))},async submitCart(x){l(!0);const{cart:E}=g.useCartStore.getState(),{discordInfo:_}=g.useDiscordStore.getState();let I;if(E.parts&&a&&I2(E.parts[0],t))try{const{data:k}=await t2({gateway:E.gateway,coupon:E.coupon,partOrder:E.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:_!=null&&_.authorized?_.id:null,customerEmail:a,recaptcha:x,customFields:{...E.customFields},tsId:g.useGetTsId()});I=k.data}catch(k){console.error(k)}else try{const{data:k}=await Qd({gateway:E.gateway,parts:[...E.parts],coupon:E.coupon,customerEmail:E.customerEmail,referralCode:localStorage.getItem("referralCode"),recaptcha:x,customFields:{...E.customFields},tsId:g.useGetTsId(),discordSocialConnectId:_!=null&&_.authorized?_.id:null});I=k.data}catch(k){const D=k,{notifications:N,setNotifications:v}=g.useNotificationStore.getState();v([...N,{message:`Failed to create order: ${D.message}`,status:"error",id:g.v4()}])}if(l(!1),I)return I;throw new Error("Failed to create order")},setDiscordSocialConnectId(x){i(E=>({...E,discordSocialConnectId:x}))},setCustomFields(x){i(E=>({...E,customFields:{...x}}))}};return P.useEffect(()=>{i(x=>({...x,customerEmail:a??""}))},[a,i]),{cart:e,products:t,coupon:n,pending:r,applyCouponPending:u,applyCoupon:f,...b}},Yn=()=>{const{notifications:e,setNotifications:t}=g.useNotificationStore();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:g.v4()}])}};var li={exports:{}},mu={exports:{}},Ie={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as Ue, K as $e, r as Ve, M as Kt, N as Bt, O as tn, Q as oo, U as rr, e as Xt, v as Ke, V as De, W as so, p as sn, f as K, X as Ca, Y as kr, Z as We, _ as Re, J as Ge, $ as bt, b as t2, u as n2, a as co, a0 as r2, a1 as u2, a2 as gu, a3 as vi, a4 as a2, a5 as hs, a6 as Tl, a7 as lo, a8 as Ea, a9 as i2 } from "./builder-
|
|
1
|
+
import { j as Ue, K as $e, r as Ve, M as Kt, N as Bt, O as tn, Q as oo, U as rr, e as Xt, v as Ke, V as De, W as so, p as sn, f as K, X as Ca, Y as kr, Z as We, _ as Re, J as Ge, $ as bt, b as t2, u as n2, a as co, a0 as r2, a1 as u2, a2 as gu, a3 as vi, a4 as a2, a5 as hs, a6 as Tl, a7 as lo, a8 as Ea, a9 as i2 } from "./builder-D_zv5ue0.js";
|
|
2
2
|
import { jsx as c, jsxs as C, Fragment as He } from "react/jsx-runtime";
|
|
3
3
|
import * as ue from "react";
|
|
4
4
|
import W, { useEffect as Hn, forwardRef as yl, createElement as et, Component as o2, isValidElement as s2, useState as ze, useRef as Li, useMemo as c2 } from "react";
|
|
5
|
-
import { I as F, e as gt, f as An, g as te, S as l2, M as an, W as d2, h as f2, i as na, j as fo, R as h2 } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import { T as xl } from "./ticket-
|
|
5
|
+
import { I as F, e as gt, f as An, g as te, S as l2, M as an, W as d2, h as f2, i as na, j as fo, R as h2 } from "./ui-components-BTotDG_w.js";
|
|
6
|
+
import "./builder-components-DN-mNdj8.js";
|
|
7
|
+
import { T as xl } from "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
|
-
import { O as kl } from "./order-
|
|
10
|
-
import { S as p2 } from "./subscription-
|
|
9
|
+
import { O as kl } from "./order-CdPcB1OE.js";
|
|
10
|
+
import { S as p2 } from "./subscription-DIDUTEI3.js";
|
|
11
11
|
const m2 = () => typeof document < "u" ? document.documentElement.hasAttribute("translated") || document.documentElement.querySelector(".translated-ltr, .translated-rtl") !== null || // Safari переводчик добавляет мета-тег с name="_translator"
|
|
12
12
|
document.head.querySelector('meta[name="_translator"]') !== null : !1, b2 = ({
|
|
13
13
|
children: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-BAP3iPAM.cjs"),u=require("./builder-B7hjBRYI.cjs"),l=require("react"),_=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const b="_checkoutContainer_thje1_1",S="_loaderContainer_thje1_20",s={checkoutContainer:b,loaderContainer:S},D=()=>{const{isAntistock:r}=u.useGeneralStore(),{cart:t,products:c,pending:d,getTotalAndDiscount:C,getPossibleGateways:h,submitCart:p,setGateway:m,applyCoupon:g,setDiscordSocialConnectId:j,setCustomFields:k,applyCouponPending:y,coupon:i,removeCoupon:q,getDiscordSettings:v,setPaymentMethod:x,reset:f}=n.useCart(),a=l.useMemo(()=>C(),[i,t]),o=u.useNavigate();return l.useEffect(()=>{if(t.parts.length===0){if(r){o("/");return}try{o(-1)}catch{o("/")}}},[t.parts]),d?e.jsx("div",{className:s.checkoutContainer,children:e.jsx("div",{className:s.loaderContainer,children:e.jsx(_.Loader,{})})}):e.jsxs("div",{className:s.checkoutContainer,children:[e.jsx(n.CheckoutItems,{cart:t,products:c,applyCoupon:g,applyCouponPending:y,coupon:i,removeCoupon:q,totalAndDiscount:a}),e.jsx(n.CheckoutOperational,{cart:t,getPossibleGateways:h,setGateway:m,getDiscordSettings:v,products:c,submitCart:p,totalAndDiscount:a,setCustomFieldsToCart:k,setDiscordSocialConnectId:j,setPaymentMethod:x,reset:f,isAntistock:r})]})};exports.Checkout=D;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as j } from "react/jsx-runtime";
|
|
2
|
-
import { u as D, C as N, a as x } from "./charge-
|
|
3
|
-
import { V as A, p as G } from "./builder-
|
|
2
|
+
import { u as D, C as N, a as x } from "./charge-BQUHzEju.js";
|
|
3
|
+
import { V as A, p as G } from "./builder-D_zv5ue0.js";
|
|
4
4
|
import c from "react";
|
|
5
|
-
import { e as P } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket-
|
|
5
|
+
import { e as P } from "./ui-components-BTotDG_w.js";
|
|
6
|
+
import "./builder-components-DN-mNdj8.js";
|
|
7
|
+
import "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
|
|
10
10
|
checkoutContainer: S,
|
package/dist/exports.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-B7hjBRYI.cjs");require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");const t=require("./charge-BAP3iPAM.cjs"),e=require("./ticket-DXz_-29l.cjs"),r=require("./checkout-CUct7uCm.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.MarkdownText=t.MarkdownText;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.parseDraftJsText=t.parseDraftJsText;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useMarkdownIt=t.useMarkdownIt;exports.useReCaptcha=t.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.Checkout=r.Checkout;
|
package/dist/exports.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Y as p, Z as u, _ as c } from "./builder-
|
|
4
|
-
import "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import { M as n, R as f, H as l, u as d, G as x, I as C, F as R } from "./charge-
|
|
7
|
-
import { C as k, c as I, h as T, i as v, r as w, d as M, s as N, u as P, e as b, b as A, a as B } from "./ticket-
|
|
8
|
-
import { Checkout as S } from "./checkout-
|
|
3
|
+
import { Y as p, Z as u, _ as c } from "./builder-D_zv5ue0.js";
|
|
4
|
+
import "./ui-components-BTotDG_w.js";
|
|
5
|
+
import "./builder-components-DN-mNdj8.js";
|
|
6
|
+
import { M as n, R as f, H as l, u as d, G as x, I as C, F as R } from "./charge-BQUHzEju.js";
|
|
7
|
+
import { C as k, c as I, h as T, i as v, r as w, d as M, s as N, u as P, e as b, b as A, a as B } from "./ticket-B0VGIvyK.js";
|
|
8
|
+
import { Checkout as S } from "./checkout-uzxtu1pZ.js";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
export {
|
|
11
11
|
p as AntistockRoutes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-BAP3iPAM.cjs"),t=require("./builder-B7hjBRYI.cjs"),J=require("./ticket-DXz_-29l.cjs"),g=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");require("react-dom");const _="_notifications_1ntnm_1",F="_wrapper_1ntnm_12",j={notifications:_,wrapper:F},z=()=>(i.useEffect(()=>{document.title="Temporarily Unavailable"},[]),s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",overflowY:"scroll",overflowX:"hidden",background:"var(--surface-primary)",color:"var(--text-primary)"},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"center",alignItems:"center",gap:"24px"},children:[s.jsx("h2",{style:{color:"var(--text-primary)",fontSize:"var(--font-heading-h2-size)"},children:"Temporarily Unavailable"}),s.jsx("span",{style:{color:"var(--text-secondary)",fontSize:"var(--font-heading-h3-size)",width:"85%",textAlign:"center"},children:"We're making some quick updates to improve your shopping experience. During this time, browsing and checkout are temporarily unavailable."})]})}));function R(){const c=new URLSearchParams(document.location.search),r=c.get("customerAccessToken"),{setToken:d}=t.useStorefrontStore.getState(),{setDashInfo:u}=t.useCustomerDashboardStore.getState();r&&(c.delete("customerAccessToken"),localStorage.setItem("token",r),d(r),u(null))}const U=({children:c})=>{const r=t.useLocation(),{token:d,setToken:u}=t.useStorefrontStore(),{dashInfo:S,setDashInfo:y}=t.useCustomerDashboardStore(),{shopPassword:f}=t.useStorefrontStore(),v=t.useNavigate(),[l,T]=t.useSearchParams(),{notifications:x}=t.useNotificationStore(),[b,h]=i.useState(!0),{setCustomerEmail:I}=t.useCartStore(),{setThemeSettings:w,themeSettings:N}=t.useThemeSettingsStore(),{settings:C,setSettings:k}=t.useSettingsStore(),{setHeader:D,setFooter:q,setAnnouncement:A}=t.useLayersStore(),{general:o,setGeneral:E,isAntistock:p}=t.useGeneralStore(),{pageContext:L,setPageContext:O}=t.usePagesStore();t.useTrackingAnalytics((o==null?void 0:o.info.id)||localStorage.getItem("shopId")||null,"production",p);const W=async()=>{const e=await J.getDynamicPage(encodeURIComponent("/products"),o==null?void 0:o.info.passwordProtected);if(e){const{data:a}=e;O({...L,listings:a.listings})}};return i.useEffect(()=>{R()},[]),i.useEffect(()=>{const e=localStorage.getItem("token");if(e&&(!d||!S))try{const a=t.jwtDecode(e);y(a),u(e),I(a.email)}catch(a){console.error("Failed to decode token:",a),localStorage.removeItem("token"),u(""),y(null)}},[d,S]),i.useEffect(()=>{const e=l.get("r");e&&(localStorage.setItem("referralCode",e),l.delete("r"),T(l),v({pathname:r.pathname,search:l.toString()},{replace:!0}))},[l,r]),i.useEffect(()=>{!r.pathname.startsWith("/products")&&!r.pathname.startsWith("/admin/builder")&&o&&(o.info.passwordProtected&&f||o.isPasswordValid)&&W()},[o,f]),i.useLayoutEffect(()=>{const e=async()=>{if(h(!0),!o){const n=await P.fetchGeneral(f);if(!n.isPasswordValid&&!r.pathname.includes("/admin/builder")){v("/validation",{state:{from:r.pathname}});return}if(!n.info.passwordProtected){localStorage.removeItem("shopPassword");const{setShopPassword:m}=t.useStorefrontStore.getState();m("")}E(n)}},a=async()=>{h(!0);const{settings:n,theme:m}=(await P.fetchThemeAndSettings()).data;n?(n.settings&&k(n.settings),n.header&&D(JSON.parse(JSON.stringify(n.header))),n.footer&&q(JSON.parse(JSON.stringify(n.footer))),n.announcement&&A(JSON.parse(JSON.stringify(n.announcement)))):k(C),w(m||N),h(!1)};r.pathname.startsWith("/validation")||e(),a()},[]),p&&(o!=null&&o.info.onHold)?s.jsx(z,{}):r.pathname.startsWith("/admin/builder")?s.jsx(s.Fragment,{children:c}):s.jsx(s.Fragment,{children:b?s.jsx("div",{className:j.wrapper,children:s.jsx(g.Loader,{})}):s.jsxs(s.Fragment,{children:[c,x.length>0&&s.jsx("div",{className:j.notifications,children:x.map(e=>s.jsx(g.NotificationBuilder,{type:e.status,message:e.message,timer:e.timer||10,id:e.id,element:p?g.NotificationAntistock:e.component},e.id))})]})})};exports.WrapperPage=U;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-
|
|
2
|
+
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-D_zv5ue0.js";
|
|
3
3
|
import k from "react";
|
|
4
4
|
const B = (i) => {
|
|
5
5
|
const { children: c } = i, { pathname: r } = d(), { setActiveBlock: e } = l(), { setActiveBlock: a } = b(), { setActiveBlock: o } = u();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-CWLDlDmG.cjs");require("react");const s=require("./builder-B7hjBRYI.cjs");require("./builder-components-BjoFBErH.cjs");require("./charge-BAP3iPAM.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const j="_wrapper_1yd2j_1",w="_error_1yd2j_11",_="_title_1yd2j_21",b="_buttons_1yd2j_29",i={wrapper:j,error:w,title:_,buttons:b},S=async e=>{const o=localStorage.getItem("shopId")||void 0,r=localStorage.getItem("draftId"),d=`${s.useApiStore.getState().apiUrls.api}/v2/builder/shops/${o}/drafts/${r}/reset`;return await s.request({url:d,withToken:!0,method:"post",body:e})},x=()=>{const{error:e,setError:o}=s.useErrorStore(),{pages:r}=s.usePagesStore(),{setIsOpen:c}=s.useModalStore(),{title:d,description:m,setOnConfirm:u,setTitle:g,setDescription:p}=s.useConfirmationModalStore(),{setBlocks:h}=s.useLayersStore();async function y(){await S({resetSettings:(e==null?void 0:e.failedSettings)??!1,resetThemeSettings:(e==null?void 0:e.failedThemeSettings)??!1,resetPageIds:(e==null?void 0:e.failedPageIds)??[]}),o(null),h({}),window.location.reload()}async function f(){const a=[];r&&Object.keys(r).map(n=>r[n].id).filter(n=>n!==void 0).map(n=>a.push(n)),await S({resetSettings:!0,resetThemeSettings:!0,resetPageIds:a}),o(null)}return t.jsxs("div",{className:i.wrapper,children:[t.jsxs("div",{className:i.error,children:[t.jsxs("div",{children:[t.jsx("div",{className:i.title,children:"Oops! Something went wrong"}),t.jsx("span",{className:i.message,children:(e==null?void 0:e.message)||""})]}),t.jsxs("div",{className:i.buttons,children:[t.jsx(l.ButtonSettings,{type:"Primary",onClick:y,children:"Reset Settings"}),t.jsx(l.ButtonSettings,{type:"Secondary",onClick:a=>{a.stopPropagation(),g("Reset All Settings"),p("Are you sure you want to reset all settings? This is irreversible."),u(async()=>{await f()})},children:"Reset All Settings"})]})]}),d&&m&&t.jsx(l.BuilderModal,{close:()=>{c(!1),setTimeout(()=>{g(null),p(null),u(null),c(!0)},300)},children:t.jsx(l.ConfirmationModal,{})})]})};exports.ErrorPage=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-B7hjBRYI.cjs"),o=require("react"),l=r=>{const{children:i}=r,{pathname:a}=e.useLocation(),{setActiveBlock:t}=e.useNavbarStore(),{setActiveBlock:s}=e.useThemeSettingsStore(),{setActiveBlock:n}=e.usePreviewStore();return o.useEffect(()=>{switch(n({id:null,neededScroll:!1}),a){case"/admin/builder":t(e.navbarBlocks[0]);break;case"/admin/builder/add":t(e.navbarBlocks[1]);break;case"/admin/builder/theme":t(e.navbarBlocks[2]);break;case"/admin/builder/settings":t(e.navbarBlocks[3]);break;case"/admin/builder/theme/colors":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[0]);break;case"/admin/builder/theme/fonts":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[1]);break;case"/admin/builder/theme/borders":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[2]);break;case"/admin/builder/theme/buttons":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[3]);break;case"/admin/builder/theme/inputs":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[4]);break}},[a]),c.jsx(c.Fragment,{children:i})};exports.ActivePage=l;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { g as i } from "./ui-components-
|
|
2
|
+
import { g as i } from "./ui-components-BTotDG_w.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { p as s, am as a } from "./builder-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket-
|
|
4
|
+
import { p as s, am as a } from "./builder-D_zv5ue0.js";
|
|
5
|
+
import "./builder-components-DN-mNdj8.js";
|
|
6
|
+
import "./charge-BQUHzEju.js";
|
|
7
|
+
import "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const c = "_wrapper_ej209_1", m = "_content_ej209_12", p = "_title_ej209_22", r = {
|
|
10
10
|
wrapper: c,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "./builder-
|
|
2
|
+
import "./builder-D_zv5ue0.js";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { e as r } from "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket-
|
|
4
|
+
import { e as r } from "./ui-components-BTotDG_w.js";
|
|
5
|
+
import "./builder-components-DN-mNdj8.js";
|
|
6
|
+
import "./charge-BQUHzEju.js";
|
|
7
|
+
import "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const f = () => (e.useEffect(() => {
|
|
10
10
|
setTimeout(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-B7hjBRYI.cjs");const r=require("react"),t=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");require("./charge-BAP3iPAM.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const i=()=>(r.useEffect(()=>{setTimeout(()=>{window.location.reload()},500)},[]),e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(t.Loader,{})}));exports.RouterErrorPage=i;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { B as m, a as w, C as _ } from "./ui-components-
|
|
2
|
+
import { B as m, a as w, C as _ } from "./ui-components-BTotDG_w.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { j as I, r as b, s as j, b as v, J as P, k as T, u as k } from "./builder-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket-
|
|
4
|
+
import { j as I, r as b, s as j, b as v, J as P, k as T, u as k } from "./builder-D_zv5ue0.js";
|
|
5
|
+
import "./builder-components-DN-mNdj8.js";
|
|
6
|
+
import "./charge-BQUHzEju.js";
|
|
7
|
+
import "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B = "_buttons_1yd2j_29", i = {
|
|
10
10
|
wrapper: C,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-CWLDlDmG.cjs");require("react");const n=require("./builder-B7hjBRYI.cjs");require("./builder-components-BjoFBErH.cjs");require("./charge-BAP3iPAM.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as N, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import { V as z, Z as U } from "./charge-
|
|
4
|
-
import { M as f, N as T, ab as V, p as F, a6 as G, e as R, O as H, m as M, a as q, u as B, V as X, b as Y, al as Z, ag as K } from "./builder-
|
|
5
|
-
import { g as Q } from "./ticket-
|
|
6
|
-
import { e as $, N as ee,
|
|
7
|
-
import "./builder-components-
|
|
3
|
+
import { V as z, Z as U } from "./charge-BQUHzEju.js";
|
|
4
|
+
import { M as f, N as T, ab as V, p as F, a6 as G, e as R, O as H, m as M, a as q, u as B, V as X, b as Y, al as Z, ag as K } from "./builder-D_zv5ue0.js";
|
|
5
|
+
import { g as Q } from "./ticket-B0VGIvyK.js";
|
|
6
|
+
import { e as $, N as ee, o as te } from "./ui-components-BTotDG_w.js";
|
|
7
|
+
import "./builder-components-DN-mNdj8.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", x = {
|
|
10
10
|
notifications: se,
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./builder.cjs.js"),a=require("./builder-B7hjBRYI.cjs");require("react/jsx-runtime");const c=require("react"),t=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");const r=require("./charge-BAP3iPAM.cjs"),e=require("./ticket-DXz_-29l.cjs");require("react-dom");function u(o){c.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{t.registerIcon(s,i)})},[o])}function g(o){Object.entries(o).forEach(([s,i])=>{t.registerIcon(s,i)})}exports.App=n.App;exports.AntistockRoutes=a.AntistockRoutes;exports.Routes=a.Routes;exports.formatPrice=a.formatPrice;exports.Icon=t.Icon;exports.getRegisteredIcon=t.getRegisteredIcon;exports.getRegisteredIcons=t.getRegisteredIcons;exports.isIconRegistered=t.isIconRegistered;exports.registerIcon=t.registerIcon;exports.MarkdownText=r.MarkdownText;exports.ReCaptchaProvider=r.ReCaptchaProvider;exports.parseDraftJsText=r.parseDraftJsText;exports.useCart=r.useCart;exports.useGeneralInfo=r.useGeneralInfo;exports.useMarkdownIt=r.useMarkdownIt;exports.useReCaptcha=r.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.registerIcons=g;exports.useIconRegistration=u;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import 'non.geist';
|
|
2
|
+
import './src/styles/main.scss';
|
|
3
|
+
export * from './src/App.tsx';
|
|
4
|
+
export * from './src/abstractions';
|
|
5
|
+
export { hotReload, splitTextIntoSpans, useCreateTicket, useBuilderPages } from './src/lib';
|
|
6
|
+
export { useIconRegistration, registerIcons } from './src/hooks/useIconRegistration';
|
|
7
|
+
export { registerIcon, getRegisteredIcon, isIconRegistered, getRegisteredIcons } from '@assets/icon-registry/IconRegistry';
|
|
8
|
+
export { Icon } from './src/ui';
|
|
9
|
+
export { iconNames, type IconNames, ColorVariables, type AspectRatio, aspectRatioOptions, } from './src/shared/constants';
|
|
10
|
+
export { Routes, AntistockRoutes } from './src/storefront/constants/routes';
|
|
11
|
+
export type { Notification, NotificationComponentProps } from './src/shared/constants';
|
|
12
|
+
export type { TypeFontKeys } from './src/shared/constants';
|
|
13
|
+
export { ReCaptchaProvider, useReCaptcha } from './src/storefront/utils/recapcha';
|
|
14
|
+
export { useCart } from './src/storefront/utils/useCart';
|
|
15
|
+
export { useGeneralInfo } from './src/storefront/utils/useGeneralInfo';
|
|
16
|
+
export { showNotification, removeNotification } from './src/storefront/utils/showNotification';
|
|
17
|
+
export { useAdaptiveStyles } from './src/storefront/utils/useAdaptiveStyles';
|
|
18
|
+
export { formatPrice } from './src/storefront/utils';
|
|
19
|
+
export { parseDraftJsText } from './src/storefront/utils/parseDraftJsText';
|
|
20
|
+
export { useBalance } from './src/storefront/utils/useBalance';
|
|
21
|
+
export { useMarkdownIt } from './src/storefront/utils/useMarkdownIt';
|
|
22
|
+
export { MarkdownText } from './src/storefront/utils/MarkdownText';
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Y as h, Z as C, _ as b } from "./builder-CtBMhTyK.js";
|
|
1
|
+
import { App as R } from "./builder.es.js";
|
|
2
|
+
import { Y as g, Z as l, _ as x } from "./builder-D_zv5ue0.js";
|
|
4
3
|
import "react/jsx-runtime";
|
|
5
4
|
import { useEffect as o } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
5
|
+
import { r as t } from "./ui-components-BTotDG_w.js";
|
|
6
|
+
import { I as C, k, m as b, l as T } from "./ui-components-BTotDG_w.js";
|
|
7
|
+
import "./builder-components-DN-mNdj8.js";
|
|
8
|
+
import { M as w, R as A, H as E, u as M, G as N, I as O, F as P } from "./charge-BQUHzEju.js";
|
|
9
|
+
import { C as B, c as G, h as S, i as y, r as D, d as F, s as H, u as J, e as V, b as Y, a as Z } from "./ticket-B0VGIvyK.js";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
function f(e) {
|
|
12
12
|
o(() => {
|
|
@@ -21,20 +21,20 @@ function u(e) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
g as AntistockRoutes,
|
|
25
25
|
R as App,
|
|
26
26
|
B as ColorVariables,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
C as Icon,
|
|
28
|
+
w as MarkdownText,
|
|
29
|
+
A as ReCaptchaProvider,
|
|
30
|
+
l as Routes,
|
|
31
31
|
G as aspectRatioOptions,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
x as formatPrice,
|
|
33
|
+
k as getRegisteredIcon,
|
|
34
|
+
b as getRegisteredIcons,
|
|
35
35
|
S as hotReload,
|
|
36
36
|
y as iconNames,
|
|
37
|
-
|
|
37
|
+
T as isIconRegistered,
|
|
38
38
|
E as parseDraftJsText,
|
|
39
39
|
t as registerIcon,
|
|
40
40
|
u as registerIcons,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),n=require("react"),k=require("./builder-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("react"),k=require("./builder-B7hjBRYI.cjs"),c=require("./charge-BAP3iPAM.cjs"),C=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const B=async(r=1)=>await c.fetchOrders({PageNumber:r}),T=()=>{const[r,d]=n.useState(null),[u,e]=n.useState(null),[x,j]=n.useState(0),{page:g}=k.usePaginationPagesStore(),[N,o]=n.useState(!0);async function v(){o(!0);const{list:h,totalCount:m}=await B(g);d(h),j(m),e(null),o(!1)}async function S(){const h=(r==null?void 0:r.map(y=>y.gatewayName))||[],m=await c.getGatewaysDetail(h);e(m)}return n.useEffect(()=>{!u&&r&&S()},[r,u]),n.useEffect(()=>{v()},[g]),t.jsx(t.Fragment,{children:r!=null&&r.length&&r.length===0?t.jsx(c.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):t.jsxs(t.Fragment,{children:[t.jsx(c.PageTitle,{title:"Orders"}),t.jsx(c.OrdersTable,{orders:r,gatewaysDetail:u,totalCount:x,isLoading:N})]})})},$="_orderPage_gc87l_1",I="_leftSection_gc87l_15",L="_content_gc87l_35",M="_main_gc87l_42",q="_mainAntistock_gc87l_56",F="_orderMainDataAntistock_gc87l_69",W="_timelineBlockAntistock_gc87l_81",E="_footerAntistock_gc87l_92",V="_statusBlock_gc87l_104",G="_timelineBlock_gc87l_81",R="_footer_gc87l_92",U="_rightSection_gc87l_121",z="_header_gc87l_142",H="_productList_gc87l_150",J="_mobileFooter_gc87l_157",K="_loaderContainer_gc87l_166",Q="_orderMainData_gc87l_69",X="_prices_gc87l_181",Y="_headerTitle_gc87l_185",Z="_headerDescription_gc87l_189",a={orderPage:$,leftSection:I,content:L,main:M,mainAntistock:q,orderMainDataAntistock:F,timelineBlockAntistock:W,footerAntistock:E,statusBlock:V,timelineBlock:G,footer:R,rightSection:U,header:z,productList:H,mobileFooter:J,loaderContainer:K,orderMainData:Q,prices:X,headerTitle:Y,headerDescription:Z},ee=()=>{var y,O,w,A,D,P;const{id:r,accessToken:d}=k.useParams(),u=k.useNavigate(),[e,x]=n.useState(),[j,g]=n.useState(!1),N=c.useCopy(),{isAntistock:o}=k.useGeneralStore(),v=((y=e==null?void 0:e.rawPrice)==null?void 0:y.currency)||"USD",S=new Intl.NumberFormat("en-US",{style:"currency",currency:v}),h=n.useMemo(()=>(e==null?void 0:e.partOrders.map(s=>{var _,p;return{id:(s==null?void 0:s.id)||0,image:s.productWithVariant.image,name:(()=>{var f,b;const i=((f=s.productWithVariant)==null?void 0:f.name)||"",l=((b=s.productWithVariant)==null?void 0:b.variantName)||"";return!i&&!l?"":!l||i===l?i:i?`${i} (${l})`:l})(),description:"",price:{quantity:s.quantity,amount:((_=s.productWithVariant)==null?void 0:_.price.amount)||0,currency:(p=s.productWithVariant)==null?void 0:p.price.currency},deliveryCategories:"deliveryCategories"in s?s.deliveryCategories:void 0,customerNote:s.customerNote,chargeType:s.chargeType||"ONE_TIME"}}))||[],[e]),m=async(s,_,p=!1)=>{var l,f;p||g(!0);const{data:i}=await(_?c.fetchAuthorizedOrder(`${s}/${_}`):c.fetchOrder(s));g(!1),i.status!==c.OrderStatus.Completed&&((l=i.charge)==null?void 0:l.status)===c.ChargeStatus.NotPaid&&u(`/charges/${(f=i.charge)==null?void 0:f.id}`,{replace:!0}),x(i)};return n.useLayoutEffect(()=>{if(r&&!d){const s=JSON.parse(localStorage.getItem("orders")||"{}");s[r]&&u(`/orders/${r}/${s[r].fullAccessToken}`)}},[r]),n.useEffect(()=>{r&&m(r,d,!0);const s=setInterval(()=>{r&&m(r,d,!0)},5e3);return()=>{clearInterval(s)}},[r,d]),j?t.jsx("div",{className:a.loaderContainer,children:t.jsx(C.Loader,{})}):t.jsxs("div",{className:a.orderPage,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(c.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${a.main} ${o?a.mainAntistock:""}`,children:[t.jsx(c.OrderStatusBlock,{className:a.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${a.orderMainData} ${o?a.orderMainDataAntistock:""}`,children:[t.jsx(c.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(O=e.charge)==null?void 0:O.gateway,email:e.customer?e.customer.email:((w=e.charge)==null?void 0:w.customerForCharge.email)||"",orderId:e.id}),"accessToken"in e.review&&!o&&t.jsx(c.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(c.TrackPayment,{className:`${a.timelineBlock} ${o?a.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(c.CheckoutFooter,{className:`${a.footer} ${o?a.footerAntistock:""}`})]})]})}),t.jsx("div",{className:a.rightSection,style:o?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:a.content,children:[((A=e==null?void 0:e.charge)==null?void 0:A.name)&&t.jsxs("header",{className:a.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:a.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:a.headerDescription,children:e.charge.description})]}),o?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>N((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:a.productList,children:h.map(s=>t.jsx(c.CheckoutProduct,{product:s,isOrder:!0},s.id))}),o?null:t.jsx(c.CheckoutPrices,{formatter:S,coupon:null,total:((D=e==null?void 0:e.endPrice)==null?void 0:D.amount)||0,discount:0,totalWithDiscount:((P=e==null?void 0:e.endPrice)==null?void 0:P.amount)||0,className:a.prices,isShowSubtotal:!1}),t.jsx(c.CheckoutFooter,{className:a.mobileFooter})]})]})})]})},te=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ee},Symbol.toStringTag,{value:"Module"}));exports.Orders=T;exports.index=te;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as s, Fragment as b, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import n, { useState as $ } from "react";
|
|
3
|
-
import { X as I, a7 as L, p as M, V as F } from "./builder-
|
|
4
|
-
import { f as x, N as W, P as E, O as V, g as j, b as G, c as U, d as q, e as z, L as R, T as H, h as B, i as J, j as X, k as K, l as Q, m as Y, n as Z } from "./charge-
|
|
5
|
-
import { e as ee, g as te, I as ae } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket-
|
|
3
|
+
import { X as I, a7 as L, p as M, V as F } from "./builder-D_zv5ue0.js";
|
|
4
|
+
import { f as x, N as W, P as E, O as V, g as j, b as G, c as U, d as q, e as z, L as R, T as H, h as B, i as J, j as X, k as K, l as Q, m as Y, n as Z } from "./charge-BQUHzEju.js";
|
|
5
|
+
import { e as ee, g as te, I as ae } from "./ui-components-BTotDG_w.js";
|
|
6
|
+
import "./builder-components-DN-mNdj8.js";
|
|
7
|
+
import "./ticket-B0VGIvyK.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = async (a = 1) => await x({ PageNumber: a }), Ie = () => {
|
|
10
10
|
const [a, d] = n.useState(null), [u, e] = $(null), [k, N] = n.useState(0), { page: g } = I(), [v, o] = n.useState(!0);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RouteObject } from 'react-router-dom';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import 'non.geist';
|
|
4
|
+
import './styles/main.scss';
|
|
5
|
+
import { ApiUrls } from './storefront/store';
|
|
6
|
+
interface AppProps {
|
|
7
|
+
blocks: Record<string, any>;
|
|
8
|
+
settings: any;
|
|
9
|
+
header: any;
|
|
10
|
+
footer: any;
|
|
11
|
+
announcement: any;
|
|
12
|
+
routes?: RouteObject[];
|
|
13
|
+
shopLogo?: React.ReactElement;
|
|
14
|
+
apiURLs?: ApiUrls;
|
|
15
|
+
isAntistock?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const App: React.FC<AppProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColorVariables } from './color-variables';
|
|
2
|
+
import type { PageContext } from './PageContext';
|
|
3
|
+
export interface BlockSettings {
|
|
4
|
+
displayName: string;
|
|
5
|
+
isAddable: boolean;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface IBlock {
|
|
9
|
+
blockSettings: BlockSettings;
|
|
10
|
+
blockColors: ColorVariables[];
|
|
11
|
+
renderBlock(settings: Record<string, any>, context: PageContext): JSX.Element;
|
|
12
|
+
renderPreview(settings: Record<string, any>, context: PageContext): JSX.Element;
|
|
13
|
+
renderSettings(context: PageContext): JSX.Element;
|
|
14
|
+
}
|