@magicstoreai/hydrogen 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CATALOGUE.md +931 -0
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/core.cjs +746 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +252 -0
- package/dist/core.d.ts +252 -0
- package/dist/core.js +706 -0
- package/dist/core.js.map +1 -0
- package/dist/index.cjs +1046 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +790 -0
- package/dist/index.d.ts +790 -0
- package/dist/index.js +1000 -0
- package/dist/index.js.map +1 -0
- package/dist/seo.cjs +101 -0
- package/dist/seo.cjs.map +1 -0
- package/dist/seo.d.cts +83 -0
- package/dist/seo.d.ts +83 -0
- package/dist/seo.js +73 -0
- package/dist/seo.js.map +1 -0
- package/dist/server.cjs +172 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +67 -0
- package/dist/server.d.ts +67 -0
- package/dist/server.js +139 -0
- package/dist/server.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/analytics.ts","../src/cart.ts","../src/storage.ts","../src/money.ts","../src/session.ts","../src/variants.ts","../src/wishlist.ts","../src/react/context.tsx","../src/react/components.tsx","../src/react/hooks.ts","../src/react/product.tsx"],"sourcesContent":["export * from './core';\nexport { Image, Money, Pagination, paginationState } from './react/components';\nexport type { PaginationState } from './react/components';\nexport { MagicStoreProvider, useMagicStore, useShop, useStorefrontClient } from './react/context';\nexport type { MagicStore, MagicStoreProviderProps, Shop } from './react/context';\nexport {\n useAnalytics,\n useCart,\n useCustomer,\n useVariantSelection,\n useWishlist,\n} from './react/hooks';\nexport { ProductProvider, useProduct } from './react/product';\nexport { MagicStoreError } from '@magicstoreai/storefront-client';\n","import type { Schema, StorefrontClient, operations } from '@magicstoreai/storefront-client';\nimport type { KeyValueStorage } from './storage';\n\ntype EventsBody = NonNullable<\n operations['analyticsEventsStore']['requestBody']\n>['content']['application/json'];\nexport type AnalyticsEvent = EventsBody['events'][number];\nexport type AnalyticsEventType = Schema<'StorefrontEventType'>;\nexport type AnalyticsPayload = AnalyticsEvent['payload'];\n\n/** The API takes up to this many events per batch. */\nconst BATCH_LIMIT = 50;\n\n/**\n * The visitor's id for the shop's analytics and funnel: a UUID minted once per visitor and kept.\n * The same value goes out as `X-Session-Id`, which ties carts and orders to the visit.\n */\nexport function visitorSessionId(storage: KeyValueStorage, key = 'magicstore.session-id'): string {\n const existing = storage.get(key);\n if (existing !== null && /^[0-9a-f-]{36}$/i.test(existing)) {\n return existing;\n }\n const id = globalThis.crypto.randomUUID();\n storage.set(key, id);\n return id;\n}\n\n/**\n * What the visitor looks at, sent in batches (`POST /analytics/events`). Cart and checkout steps\n * are recorded by the server — never report them. Failures are dropped: analytics must never get\n * in the way of shopping.\n */\nexport class AnalyticsController {\n private queue: AnalyticsEvent[] = [];\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n constructor(\n private readonly client: StorefrontClient,\n private readonly sessionId: string,\n private readonly options: { flushAfterMs?: number; context?: AnalyticsPayload } = {},\n ) {}\n\n /** A page view — starts the session with its first-touch attribution (UTM, click ids, referrer). */\n pageView(path: string, extra: AnalyticsPayload = {}): void {\n this.track('PAGE_VIEW', { path: path.slice(0, 255), ...extra });\n }\n\n productView(productId: string, variantId?: string | null): void {\n this.track('PRODUCT_VIEW', { productId, variantId: variantId ?? null });\n }\n\n collectionView(collectionId: string): void {\n this.track('COLLECTION_VIEW', { collectionId });\n }\n\n search(query: string, resultsCount?: number): void {\n this.track('SEARCH', { query: query.slice(0, 255), resultsCount: resultsCount ?? null });\n }\n\n custom(name: string, properties?: Record<string, unknown>): void {\n this.track('CUSTOM', {\n name: name.slice(0, 64),\n properties: properties ?? null,\n } as AnalyticsPayload);\n }\n\n track(type: AnalyticsEventType, payload: AnalyticsPayload): void {\n this.queue.push({\n type,\n sessionId: this.sessionId,\n occurredAt: new Date().toISOString(),\n payload: { ...this.options.context, ...payload },\n });\n if (this.queue.length >= BATCH_LIMIT) {\n void this.flush();\n return;\n }\n this.timer ??= setTimeout(() => void this.flush(), this.options.flushAfterMs ?? 2000);\n }\n\n /** Sends what is queued now — call it when the page is hidden. */\n async flush(): Promise<void> {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n while (this.queue.length > 0) {\n const events = this.queue.splice(0, BATCH_LIMIT);\n try {\n await this.client.analyticsEventsStore({ body: { events } });\n } catch {\n // Dropped on purpose.\n }\n }\n }\n}\n\n/** The first-touch attribution a landing URL carries, for the first `pageView`. */\nexport function attributionFrom(url: URL, referrer?: string): AnalyticsPayload {\n const param = (name: string): string | null => url.searchParams.get(name)?.slice(0, 255) || null;\n return {\n utmSource: param('utm_source'),\n utmMedium: param('utm_medium'),\n utmCampaign: param('utm_campaign'),\n utmTerm: param('utm_term'),\n utmContent: param('utm_content'),\n utmId: param('utm_id'),\n gclid: param('gclid'),\n fbclid: param('fbclid'),\n referrer: referrer ? referrer.slice(0, 255) : null,\n };\n}\n","import {\n MagicStoreError,\n type Schema,\n type StorefrontClient,\n} from '@magicstoreai/storefront-client';\nimport { Observable, type KeyValueStorage } from './storage';\n\nexport type Cart = Schema<'Cart'>;\nexport type CartLine = Schema<'CartLine'>;\nexport type CartAttribute = { key: string; value: string | null };\n\n/** A line to add: the product, its variant (null for a product without variants) and how many. */\nexport interface CartLineInput {\n productId: string;\n variantId?: string | null;\n quantity?: number;\n attributes?: CartAttribute[];\n}\n\nexport interface CartState {\n cart: Cart | null;\n /** `loading` while the stored cart is fetched; `updating` while a change is on its way. */\n status: 'idle' | 'loading' | 'updating';\n /** The last change that failed — the cart is back to what the server holds. */\n error: MagicStoreError | null;\n}\n\n/** A cart id the server no longer serves: forget it and start a new cart on the next add. */\nconst GONE = new Set(['CART_NOT_FOUND', 'CART_CLOSED']);\n\n/**\n * The visitor's cart. Its id is a capability and lives only in storage; the cart itself always\n * comes from the server, so prices, discounts and availability are the server's. Quantity changes\n * show at once and roll back if the server refuses them. Changes run one after another.\n */\nexport class CartController extends Observable<CartState> {\n private queue: Promise<unknown> = Promise.resolve();\n\n constructor(\n private readonly client: StorefrontClient,\n private readonly storage: KeyValueStorage,\n private readonly key = 'magicstore.cart-id',\n ) {\n // A stored id means a cart is on its way: say so, not \"empty\". The server cannot know.\n super(\n { cart: null, status: storage.get(key) === null ? 'idle' : 'loading', error: null },\n { cart: null, status: 'loading', error: null },\n );\n }\n\n get cart(): Cart | null {\n return this.get().cart;\n }\n\n get cartId(): string | null {\n return this.storage.get(this.key);\n }\n\n /** Fetches the stored cart, if any. A cart that is gone is forgotten. */\n load(): Promise<Cart | null> {\n return this.enqueue(async () => {\n const id = this.cartId;\n if (id === null) {\n this.patch({ status: 'idle' });\n return null;\n }\n this.patch({ status: 'loading' });\n try {\n const { data } = await this.client.cartsShow({ path: { id } });\n return this.adopt(data);\n } catch (error) {\n return this.fail(error, null);\n }\n });\n }\n\n /** Adds lines; the first add creates the cart. */\n addLines(lines: CartLineInput[]): Promise<Cart | null> {\n return this.mutate(null, (id) => {\n const body = { lines: lines.map(toLine) };\n return id === null\n ? this.client.cartsStore({ body })\n : this.client.cartsLinesStore({ path: { id }, body });\n });\n }\n\n /** The line's quantity outright; 0 removes it. Shown at once, rolled back if refused. */\n updateLine(lineId: string, quantity: number): Promise<Cart | null> {\n return this.mutate(\n (cart) => withQuantity(cart, lineId, quantity),\n (id) =>\n this.client.cartsLinesUpdate({ path: { id: required(id), lineId }, body: { quantity } }),\n );\n }\n\n removeLine(lineId: string): Promise<Cart | null> {\n return this.mutate(\n (cart) => withQuantity(cart, lineId, 0),\n (id) => this.client.cartsLinesDestroy({ path: { id: required(id), lineId } }),\n );\n }\n\n /** The cart's codes as a whole — `[]` takes the code off. A code that does not apply is kept, flagged. */\n setDiscountCodes(discountCodes: string[]): Promise<Cart | null> {\n return this.mutate(null, (id) =>\n this.client.cartsDiscountCodes({ path: { id: required(id) }, body: { discountCodes } }),\n );\n }\n\n setNote(note: string | null): Promise<Cart | null> {\n return this.mutate(null, (id) =>\n this.client.cartsNote({ path: { id: required(id) }, body: { note } }),\n );\n }\n\n setAttributes(attributes: CartAttribute[]): Promise<Cart | null> {\n return this.mutate(null, (id) =>\n this.client.cartsAttributes({ path: { id: required(id) }, body: { attributes } }),\n );\n }\n\n /** The gift promotion chosen from `cart.giftOptions`; null takes it off. */\n setGift(promotionId: string | null): Promise<Cart | null> {\n return this.mutate(null, (id) =>\n this.client.cartsGift({ path: { id: required(id) }, body: { promotionId } }),\n );\n }\n\n /** Points to spend on this cart (signed-in customers). */\n setPoints(points: number): Promise<Cart | null> {\n return this.mutate(null, (id) =>\n this.client.cartsPoints({ path: { id: required(id) }, body: { points } }),\n );\n }\n\n /**\n * After sign-in: the cart becomes the customer's. When they already had an open cart, this one\n * merges into it and the answer is THAT cart — its id replaces the stored one.\n */\n attachCustomer(): Promise<Cart | null> {\n return this.enqueue(async () => {\n const id = this.cartId;\n if (id === null) {\n return null;\n }\n this.patch({ status: 'updating' });\n try {\n const { data } = await this.client.cartsBuyerIdentity({ path: { id } });\n return this.adopt(data);\n } catch (error) {\n return this.fail(error, this.cart);\n }\n });\n }\n\n /** After sign-out: the cart is the customer's, not this visitor's any more. */\n forget(): void {\n this.storage.remove(this.key);\n this.set({ cart: null, status: 'idle', error: null });\n }\n\n /** Shows `optimistic` at once (when given), sends the change, and adopts the server's cart or rolls back. */\n private mutate(\n optimistic: ((cart: Cart) => Cart) | null,\n send: (id: string | null) => Promise<{ data: Cart }>,\n ): Promise<Cart | null> {\n return this.enqueue(async () => {\n const before = this.cart;\n this.patch({\n status: 'updating',\n error: null,\n cart: optimistic !== null && before !== null ? optimistic(before) : before,\n });\n try {\n const { data } = await send(this.cartId);\n return this.adopt(data);\n } catch (error) {\n return this.fail(error, before);\n }\n });\n }\n\n private adopt(cart: Cart): Cart {\n this.storage.set(this.key, cart.id);\n this.set({ cart, status: 'idle', error: null });\n return cart;\n }\n\n private fail(error: unknown, rollback: Cart | null): never {\n const failure =\n error instanceof MagicStoreError\n ? error\n : new MagicStoreError({\n status: 0,\n code: 'NETWORK_ERROR',\n message: String(error),\n requestId: '',\n });\n if (GONE.has(failure.code)) {\n this.storage.remove(this.key);\n this.set({ cart: null, status: 'idle', error: failure });\n } else {\n this.set({ cart: rollback, status: 'idle', error: failure });\n }\n throw failure;\n }\n\n private patch(state: Partial<CartState>): void {\n this.set({ ...this.get(), ...state });\n }\n\n private enqueue<T>(task: () => Promise<T>): Promise<T> {\n const run = this.queue.then(task, task);\n this.queue = run.catch(() => undefined);\n return run;\n }\n}\n\nfunction toLine(line: CartLineInput) {\n return {\n productId: line.productId,\n variantId: line.variantId ?? null,\n quantity: line.quantity ?? 1,\n attributes: line.attributes ?? [],\n };\n}\n\nfunction required(id: string | null): string {\n if (id === null) {\n throw new MagicStoreError({\n status: 404,\n code: 'CART_NOT_FOUND',\n message: 'There is no cart yet.',\n requestId: '',\n });\n }\n return id;\n}\n\n/** The cart as it will look once the server has the new quantity (totals stay the server's). */\nfunction withQuantity(cart: Cart, lineId: string, quantity: number): Cart {\n const lines =\n quantity <= 0\n ? cart.lines.filter((line) => line.id !== lineId)\n : cart.lines.map((line) => (line.id === lineId ? { ...line, quantity } : line));\n return { ...cart, lines, totalQuantity: lines.reduce((sum, line) => sum + line.quantity, 0) };\n}\n","/** Where the SDK keeps what outlives a page: the customer session, the cart id, the guest wishlist. */\nexport interface KeyValueStorage {\n get(key: string): string | null;\n set(key: string, value: string): void;\n remove(key: string): void;\n}\n\n/** In memory — for tests, the server, and when the browser refuses storage. */\nexport function memoryStorage(initial: Record<string, string> = {}): KeyValueStorage {\n const values = new Map(Object.entries(initial));\n return {\n get: (key) => values.get(key) ?? null,\n set: (key, value) => void values.set(key, value),\n remove: (key) => void values.delete(key),\n };\n}\n\n/**\n * `localStorage` when the browser allows it; memory otherwise (server render, private mode,\n * blocked site data). Every access is guarded: storage can throw at any time.\n */\nexport function browserStorage(): KeyValueStorage {\n const fallback = memoryStorage();\n const local = (): Storage | null => {\n try {\n return typeof window === 'undefined' ? null : window.localStorage;\n } catch {\n return null;\n }\n };\n return {\n get(key) {\n try {\n return local()?.getItem(key) ?? fallback.get(key);\n } catch {\n return fallback.get(key);\n }\n },\n set(key, value) {\n try {\n const storage = local();\n if (storage) {\n storage.setItem(key, value);\n return;\n }\n } catch {\n // Quota or a blocked store: keep it for this page at least.\n }\n fallback.set(key, value);\n },\n remove(key) {\n try {\n local()?.removeItem(key);\n } catch {\n // Nothing to do.\n }\n fallback.remove(key);\n },\n };\n}\n\nexport function readJson<T>(storage: KeyValueStorage, key: string): T | null {\n const raw = storage.get(key);\n if (raw === null) {\n return null;\n }\n try {\n return JSON.parse(raw) as T;\n } catch {\n storage.remove(key);\n return null;\n }\n}\n\n/**\n * A tiny observable value — what the React hooks subscribe to. `serverValue` is what a server render\n * and hydration see: storage is browser-only, so both must render the same \"not known yet\" state\n * and let the stored one arrive after hydration (otherwise React reports a hydration mismatch).\n */\nexport class Observable<T> {\n private listeners = new Set<() => void>();\n private readonly serverValue: T;\n\n constructor(\n private value: T,\n serverValue?: T,\n ) {\n this.serverValue = serverValue ?? value;\n }\n\n get(): T {\n return this.value;\n }\n\n protected set(value: T): void {\n this.value = value;\n for (const listener of [...this.listeners]) {\n listener();\n }\n }\n\n subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n };\n\n getSnapshot = (): T => this.value;\n\n getServerSnapshot = (): T => this.serverValue;\n}\n","import type { Schema } from '@magicstoreai/storefront-client';\n\nexport type Money = Schema<'Money'>;\nexport type MoneyFormat = Schema<'Shop'>['moneyFormat'];\n\n/**\n * The currency word per locale — the same templates the MagicStore dashboard renders with.\n * `{amount}` is the grouped number. A currency or locale not listed falls back to its code.\n */\nconst TEMPLATES: Record<string, Record<string, string>> = {\n ru: {\n UZS: '{amount} сум',\n USD: '${amount}',\n KGS: '{amount} сом',\n KZT: '{amount} ₸',\n RUB: '{amount} ₽',\n },\n uz: {\n UZS: '{amount} so‘m',\n USD: '${amount}',\n KGS: '{amount} som',\n KZT: '{amount} ₸',\n RUB: '{amount} ₽',\n },\n en: {\n UZS: '{amount} UZS',\n USD: '${amount}',\n KGS: '{amount} KGS',\n KZT: '{amount} ₸',\n RUB: '{amount} ₽',\n },\n};\n\nfunction template(currencyCode: string, locale: string): string {\n const language = locale.toLowerCase().split(/[-_]/)[0] ?? 'ru';\n return (TEMPLATES[language] ?? TEMPLATES['ru']!)[currencyCode] ?? `{amount} ${currencyCode}`;\n}\n\n/** The currency's symbol or word in a locale: `сум`, `so‘m`, `$`. */\nexport function currencySymbol(currencyCode: string, locale: string): string {\n return template(currencyCode, locale).replace('{amount}', '').trim();\n}\n\n/**\n * `12500.00` → `12 500`: groups of three separated by a space, the fraction kept only when it is\n * not zero. The amount is never rounded here — the API already applied the shop's rounding, and\n * the string is exactly what will be charged.\n */\nexport function groupAmount(amount: string): string {\n const negative = amount.startsWith('-');\n const [integer = '0', fraction = ''] = amount.replace(/^[-+]/, '').split('.');\n const grouped = integer.replace(/^0+(?=\\d)/, '').replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n const kept = /^0*$/.test(fraction) ? '' : `.${fraction}`;\n return `${negative ? '-' : ''}${grouped}${kept}`;\n}\n\n/**\n * Money as the shop shows it: `shop.moneyFormat.format` places the symbol or the code, and a shop\n * with no format uses the currency's own convention (`12 500 сум`, `$129.99`).\n */\nexport function formatMoney(\n money: Money,\n options: { locale: string; format?: MoneyFormat | null },\n): string {\n const amount = groupAmount(money.amount);\n const symbol = currencySymbol(money.currencyCode, options.locale);\n\n switch (options.format?.format) {\n case 'SYMBOL_AFTER':\n return `${amount} ${symbol}`.trim();\n case 'SYMBOL_BEFORE':\n return `${symbol} ${amount}`.trim();\n case 'CODE_AFTER':\n return `${amount} ${money.currencyCode}`;\n default:\n return template(money.currencyCode, options.locale).replace('{amount}', amount);\n }\n}\n\n/** The amount as a number, for arithmetic you must do on the client (sorting, a progress bar). */\nexport function moneyAmount(money: Money): number {\n return Number(money.amount);\n}\n","import {\n MagicStoreError,\n type Schema,\n type StorefrontClient,\n} from '@magicstoreai/storefront-client';\nimport { Observable, readJson, type KeyValueStorage } from './storage';\n\nexport type CustomerSession = Schema<'CustomerSession'>;\nexport type Customer = Schema<'Customer'>;\n\nexport interface SessionState {\n session: CustomerSession | null;\n}\n\n/** Refresh this long before the access token expires, so a call never leaves with a dead one. */\nconst REFRESH_AHEAD_MS = 60_000;\n\n/**\n * The signed-in customer and their tokens. The access token lives an hour and is refreshed on\n * demand; the refresh token works once, so concurrent callers share one refresh.\n */\nexport class CustomerSessionController extends Observable<SessionState> {\n private refreshing: Promise<string | null> | null = null;\n private client: StorefrontClient | null = null;\n\n constructor(\n private readonly storage: KeyValueStorage,\n private readonly key = 'magicstore.customer-session',\n private readonly now: () => number = () => Date.now(),\n ) {\n super({ session: readJson<CustomerSession>(storage, key) }, { session: null });\n }\n\n /** The client the session signs in and refreshes through (created with this controller's token). */\n attach(client: StorefrontClient): void {\n this.client = client;\n }\n\n get session(): CustomerSession | null {\n return this.get().session;\n }\n\n get customer(): Customer | null {\n return this.session?.customer ?? null;\n }\n\n /** The bearer for the next call: refreshed when it is about to expire; null when signed out. */\n accessToken = async (): Promise<string | null> => {\n const session = this.session;\n if (session === null) {\n return null;\n }\n if (Date.parse(session.expiresAt) - this.now() > REFRESH_AHEAD_MS) {\n return session.accessToken;\n }\n return this.refresh();\n };\n\n /** One refresh at a time: every caller waiting meanwhile gets its result. */\n refresh(): Promise<string | null> {\n this.refreshing ??= this.doRefresh().finally(() => {\n this.refreshing = null;\n });\n return this.refreshing;\n }\n\n private async doRefresh(): Promise<string | null> {\n const session = this.session;\n if (session === null) {\n return null;\n }\n if (Date.parse(session.refreshTokenExpiresAt) <= this.now()) {\n this.store(null);\n return null;\n }\n try {\n const { data } = await this.requireClient().authTokenRefresh(\n { body: { refreshToken: session.refreshToken } },\n { customerToken: null },\n );\n this.store(data);\n return data.accessToken;\n } catch (error) {\n if (error instanceof MagicStoreError && error.status === 401) {\n // Used, expired or revoked: this sign-in is over.\n this.store(null);\n return null;\n }\n // No answer: keep the session; the call goes out with the token it has.\n return session.accessToken;\n }\n }\n\n /** Texts a sign-in code. */\n async requestOtp(phone: string): Promise<Schema<'OtpChallenge'>> {\n const { data } = await this.requireClient().authOtp(\n { body: { phone } },\n { customerToken: null },\n );\n return data;\n }\n\n async verifyOtp(phone: string, code: string, referralCode?: string): Promise<CustomerSession> {\n const body = referralCode === undefined ? { phone, code } : { phone, code, referralCode };\n return this.signedIn(\n this.requireClient().authOtpVerification({ body }, { customerToken: null }),\n );\n }\n\n async signInWithTelegram(initData: string, referralCode?: string): Promise<CustomerSession> {\n const body = referralCode === undefined ? { initData } : { initData, referralCode };\n return this.signedIn(this.requireClient().authTelegram({ body }, { customerToken: null }));\n }\n\n async signInWithOq(oqToken: string): Promise<CustomerSession> {\n return this.signedIn(\n this.requireClient().authOq({ body: { oqToken } }, { customerToken: null }),\n );\n }\n\n async signInWithClick(webSession: string): Promise<CustomerSession> {\n return this.signedIn(\n this.requireClient().authClick({ body: { webSession } }, { customerToken: null }),\n );\n }\n\n /** Ends this sign-in on the server too; signed out locally whatever the server says. */\n async signOut(): Promise<void> {\n const session = this.session;\n this.store(null);\n if (session === null) {\n return;\n }\n try {\n await this.requireClient().authTokenDestroy(undefined, {\n customerToken: session.accessToken,\n });\n } catch {\n // Already expired or unreachable: the tokens die on their own.\n }\n }\n\n /** The customer as the server has them now (after a profile change). */\n async reloadCustomer(): Promise<Customer | null> {\n if (this.session === null) {\n return null;\n }\n const { data } = await this.requireClient().customerShow();\n const current = this.session;\n if (current !== null) {\n this.store({ ...current, customer: data });\n }\n return data;\n }\n\n private async signedIn(call: Promise<{ data: CustomerSession }>): Promise<CustomerSession> {\n const { data } = await call;\n this.store(data);\n return data;\n }\n\n private store(session: CustomerSession | null): void {\n if (session === null) {\n this.storage.remove(this.key);\n } else {\n this.storage.set(this.key, JSON.stringify(session));\n }\n this.set({ session });\n }\n\n private requireClient(): StorefrontClient {\n if (this.client === null) {\n throw new Error('CustomerSessionController is not attached to a client.');\n }\n return this.client;\n }\n}\n","import type { Schema } from '@magicstoreai/storefront-client';\n\nexport type ProductVariant = Schema<'ProductVariant'>;\nexport type ProductOption = Schema<'ProductOption'>;\n\n/** What variant selection needs of a product — `Product` and `ProductDetail` both fit. */\nexport interface SelectableProduct {\n options: ProductOption[];\n variants: ProductVariant[];\n}\n\nexport type SelectedOptions = Record<string, string>;\n\nexport function optionsOf(variant: ProductVariant): SelectedOptions {\n return Object.fromEntries(variant.selectedOptions.map((option) => [option.name, option.value]));\n}\n\n/** The variant whose options are exactly these, or null while the selection is incomplete. */\nexport function variantFor(\n product: SelectableProduct,\n selected: SelectedOptions,\n): ProductVariant | null {\n return (\n product.variants.find((variant) =>\n variant.selectedOptions.every((option) => selected[option.name] === option.value),\n ) ?? null\n );\n}\n\n/**\n * Where selection starts: the given variant, else the first one for sale, else the first one.\n * A product with a single variant and no options is always \"selected\".\n */\nexport function initialSelection(\n product: SelectableProduct,\n variantId?: string | null,\n): SelectedOptions {\n const start =\n product.variants.find((variant) => variant.id === variantId) ??\n product.variants.find((variant) => variant.availableForSale) ??\n product.variants[0];\n return start ? optionsOf(start) : {};\n}\n\n/**\n * Whether picking `value` for `name` — keeping the other choices — lands on a variant for sale.\n * What a storefront uses to grey out a size that is sold out in the chosen colour.\n */\nexport function isOptionValueAvailable(\n product: SelectableProduct,\n selected: SelectedOptions,\n name: string,\n value: string,\n): boolean {\n const candidate = { ...selected, [name]: value };\n return product.variants.some(\n (variant) =>\n variant.availableForSale &&\n variant.selectedOptions.every(\n (option) => candidate[option.name] === undefined || candidate[option.name] === option.value,\n ),\n );\n}\n\n/**\n * Choosing a value keeps the other choices when that combination exists; otherwise it moves to the\n * closest variant that has the new value (for sale first), so the selection never dead-ends.\n */\nexport function selectOption(\n product: SelectableProduct,\n selected: SelectedOptions,\n name: string,\n value: string,\n): SelectedOptions {\n const candidate = { ...selected, [name]: value };\n if (variantFor(product, candidate) !== null) {\n return candidate;\n }\n const withValue = product.variants.filter((variant) =>\n variant.selectedOptions.some((option) => option.name === name && option.value === value),\n );\n const score = (variant: ProductVariant): number =>\n variant.selectedOptions.filter((option) => selected[option.name] === option.value).length +\n (variant.availableForSale ? 0.5 : 0);\n const best = [...withValue].sort((a, b) => score(b) - score(a))[0];\n return best ? optionsOf(best) : candidate;\n}\n","import type { StorefrontClient } from '@magicstoreai/storefront-client';\nimport { Observable, readJson, type KeyValueStorage } from './storage';\n\nexport interface WishlistState {\n /** Product ids, most recent first. */\n productIds: string[];\n /** Whose list it is: a guest's lives in this browser, a customer's on the server. */\n owner: 'guest' | 'customer';\n status: 'idle' | 'loading';\n}\n\n/** The server keeps up to this many; a guest list is capped the same. */\nexport const WISHLIST_LIMIT = 500;\n\n/**\n * Saved products. A guest's list is kept in this browser; on sign-in it moves into the customer's\n * list on the server and the local copy is cleared. Changes show at once and roll back if refused.\n */\nexport class WishlistController extends Observable<WishlistState> {\n constructor(\n private readonly client: StorefrontClient,\n private readonly storage: KeyValueStorage,\n private readonly key = 'magicstore.guest-wishlist',\n ) {\n super(\n { productIds: readJson<string[]>(storage, key) ?? [], owner: 'guest', status: 'idle' },\n { productIds: [], owner: 'guest', status: 'idle' },\n );\n }\n\n has(productId: string): boolean {\n return this.get().productIds.includes(productId);\n }\n\n async add(productId: string): Promise<void> {\n if (this.has(productId)) {\n return;\n }\n const before = this.get().productIds;\n this.setIds([productId, ...before].slice(0, WISHLIST_LIMIT));\n if (this.get().owner === 'guest') {\n return;\n }\n try {\n await this.client.customerWishlistAdd({ path: { productId } });\n } catch (error) {\n this.setIds(before);\n throw error;\n }\n }\n\n async remove(productId: string): Promise<void> {\n const before = this.get().productIds;\n this.setIds(before.filter((id) => id !== productId));\n if (this.get().owner === 'guest') {\n return;\n }\n try {\n await this.client.customerWishlistRemove({ path: { productId } });\n } catch (error) {\n this.setIds(before);\n throw error;\n }\n }\n\n toggle(productId: string): Promise<void> {\n return this.has(productId) ? this.remove(productId) : this.add(productId);\n }\n\n /** After sign-in: the guest's products join the customer's list, then the list is the server's. */\n async signedIn(): Promise<void> {\n const guest = this.get().owner === 'guest' ? this.get().productIds : [];\n this.set({ ...this.get(), owner: 'customer', status: 'loading' });\n for (const productId of [...guest].reverse()) {\n try {\n await this.client.customerWishlistAdd({ path: { productId } });\n } catch {\n // A product that is gone or hidden is simply not saved.\n }\n }\n this.storage.remove(this.key);\n await this.reload();\n }\n\n /** After sign-out: back to an empty guest list — the customer's list stays on the server. */\n signedOut(): void {\n this.storage.remove(this.key);\n this.set({ productIds: [], owner: 'guest', status: 'idle' });\n }\n\n /** The customer's list as the server has it. */\n async reload(): Promise<void> {\n if (this.get().owner === 'guest') {\n return;\n }\n const ids: string[] = [];\n for await (const product of this.client.paginate('customerWishlistIndex', {\n query: { perPage: 100 },\n })) {\n ids.push(product.id);\n if (ids.length >= WISHLIST_LIMIT) {\n break;\n }\n }\n this.set({ productIds: ids, owner: 'customer', status: 'idle' });\n }\n\n private setIds(productIds: string[]): void {\n if (this.get().owner === 'guest') {\n this.storage.set(this.key, JSON.stringify(productIds));\n }\n this.set({ ...this.get(), productIds });\n }\n}\n","import {\n createStorefrontClient,\n type Schema,\n type StorefrontClient,\n type StorefrontClientOptions,\n} from '@magicstoreai/storefront-client';\nimport {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\nimport { AnalyticsController, visitorSessionId } from '../analytics';\nimport { CartController } from '../cart';\nimport { CustomerSessionController } from '../session';\nimport { browserStorage, type KeyValueStorage } from '../storage';\nimport { WishlistController } from '../wishlist';\n\nexport type Shop = Schema<'Shop'>;\n\nexport interface MagicStore {\n client: StorefrontClient;\n /** Null until `/shop` has loaded, unless the page passed `shop` in. */\n shop: Shop | null;\n locale: string;\n session: CustomerSessionController;\n cart: CartController;\n wishlist: WishlistController;\n analytics: AnalyticsController;\n sessionId: string;\n}\n\nconst MagicStoreContext = createContext<MagicStore | null>(null);\n\nexport interface MagicStoreProviderProps extends Pick<\n StorefrontClientOptions,\n 'shopDomain' | 'baseUrl' | 'storefrontToken' | 'fetch' | 'retry'\n> {\n /** The language the storefront renders in; the shop's default when omitted. */\n locale?: string;\n /** The shop, when the page already has it (server-rendered) — saves a `/shop` call. */\n shop?: Shop;\n /** Where the session, cart id and guest wishlist are kept; `localStorage` by default. */\n storage?: KeyValueStorage;\n children: ReactNode;\n}\n\n/**\n * The root of a storefront: one client, and the customer, cart, wishlist and analytics built on it.\n * On sign-in the cart becomes the customer's and the guest wishlist moves into their list; on\n * sign-out both are left behind with the customer.\n *\n * @example\n * // app/providers.tsx ('use client'); `shop` comes from a server-side `api.shop()`.\n * <MagicStoreProvider shopDomain=\"shop.example.uz\" shop={shop} locale=\"ru\">\n * {children}\n * </MagicStoreProvider>\n */\nexport function MagicStoreProvider(props: MagicStoreProviderProps) {\n const { children, locale: localeProp, shop: shopProp } = props;\n const created = useRef<Omit<MagicStore, 'shop' | 'locale'> | null>(null);\n\n if (created.current === null) {\n const storage = props.storage ?? browserStorage();\n const session = new CustomerSessionController(storage);\n const sessionId = visitorSessionId(storage);\n const client = createStorefrontClient({\n ...(props.shopDomain !== undefined && { shopDomain: props.shopDomain }),\n ...(props.baseUrl !== undefined && { baseUrl: props.baseUrl }),\n ...(props.storefrontToken !== undefined && { storefrontToken: props.storefrontToken }),\n ...(props.fetch !== undefined && { fetch: props.fetch }),\n ...(props.retry !== undefined && { retry: props.retry }),\n ...(localeProp !== undefined && { locale: localeProp }),\n customerToken: session.accessToken,\n headers: { 'X-Session-Id': sessionId },\n });\n session.attach(client);\n created.current = {\n client,\n session,\n sessionId,\n cart: new CartController(client, storage),\n wishlist: new WishlistController(client, storage),\n analytics: new AnalyticsController(client, sessionId),\n };\n }\n const core = created.current;\n\n const [shop, setShop] = useState<Shop | null>(shopProp ?? null);\n useEffect(() => {\n if (shopProp !== undefined) {\n setShop(shopProp);\n return;\n }\n let active = true;\n core.client.shop().then(\n ({ data }) => active && setShop(data),\n () => undefined,\n );\n return () => {\n active = false;\n };\n }, [core, shopProp]);\n\n // The stored cart and the customer's wishlist, once; then follow sign-in and sign-out.\n useEffect(() => {\n void core.cart.load().catch(() => undefined);\n let signedIn = core.session.session !== null;\n if (signedIn) {\n void core.wishlist.signedIn().catch(() => undefined);\n }\n return core.session.subscribe(() => {\n const now = core.session.session !== null;\n if (now && !signedIn) {\n void core.cart.attachCustomer().catch(() => undefined);\n void core.wishlist.signedIn().catch(() => undefined);\n } else if (!now && signedIn) {\n core.cart.forget();\n core.wishlist.signedOut();\n }\n signedIn = now;\n });\n }, [core]);\n\n // Queued analytics leave when the page is hidden.\n useEffect(() => {\n if (typeof document === 'undefined') {\n return;\n }\n const onHide = (): void => {\n if (document.visibilityState === 'hidden') {\n void core.analytics.flush();\n }\n };\n document.addEventListener('visibilitychange', onHide);\n return () => document.removeEventListener('visibilitychange', onHide);\n }, [core]);\n\n const locale = localeProp ?? shop?.defaultLocale ?? 'ru';\n const value = useMemo<MagicStore>(() => ({ ...core, shop, locale }), [core, shop, locale]);\n\n return <MagicStoreContext.Provider value={value}>{children}</MagicStoreContext.Provider>;\n}\n\n/**\n * Everything the provider holds: client, shop, locale and the controllers. Throws outside\n * `<MagicStoreProvider>`.\n *\n * @example\n * const { locale, sessionId } = useMagicStore();\n */\nexport function useMagicStore(): MagicStore {\n const store = useContext(MagicStoreContext);\n if (store === null) {\n throw new Error('useMagicStore must be used inside <MagicStoreProvider>.');\n }\n return store;\n}\n\n/**\n * The typed API client, for anything the hooks do not cover.\n *\n * @example\n * const client = useStorefrontClient();\n * const { data } = await client.searchSuggestions({ query: { q } });\n */\nexport function useStorefrontClient(): StorefrontClient {\n return useMagicStore().client;\n}\n\n/**\n * The shop (`GET /shop`): name, currency, money format, locales, features, branding…\n *\n * @example\n * const shop = useShop();\n * return <span>{shop?.name}</span>;\n */\nexport function useShop(): Shop | null {\n return useMagicStore().shop;\n}\n","import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';\nimport type { Schema } from '@magicstoreai/storefront-client';\nimport { formatMoney, type Money as MoneyValue } from '../money';\nimport { useMagicStore } from './context';\n\ntype MoneyProps<As extends ElementType> = {\n data: MoneyValue | null | undefined;\n as?: As;\n /** What to render for a missing price (the API sends null for \"unknown\", never 0). */\n fallback?: ReactNode;\n} & Omit<ComponentPropsWithoutRef<As>, 'children'>;\n\n/**\n * A price as the shop shows it (`shop.moneyFormat`, the storefront's locale).\n *\n * @example\n * <Money data={product.price} fallback={<span>—</span>} />\n */\nexport function Money<As extends ElementType = 'span'>({\n data,\n as,\n fallback = null,\n ...rest\n}: MoneyProps<As>) {\n const { shop, locale } = useMagicStore();\n if (data === null || data === undefined) {\n return <>{fallback}</>;\n }\n const Tag: ElementType = as ?? 'span';\n return <Tag {...rest}>{formatMoney(data, { locale, format: shop?.moneyFormat ?? null })}</Tag>;\n}\n\ntype ImageProps = {\n data: Schema<'Image'> | null | undefined;\n /** Used when the image has no alt text of its own. */\n alt?: string;\n fallback?: ReactNode;\n} & Omit<ComponentPropsWithoutRef<'img'>, 'src' | 'alt'>;\n\n/**\n * An API image with lazy loading by default. Its intrinsic size is set (no layout shift) unless\n * you pass `width` / `height` to draw it at another size, e.g. a 64×64 cart thumbnail.\n *\n * @example\n * <Image data={product.featuredImage} alt={product.title} fallback={<div className=\"noimg\" />} />\n */\nexport function Image({\n data,\n alt = '',\n fallback = null,\n loading = 'lazy',\n decoding = 'async',\n width,\n height,\n ...rest\n}: ImageProps) {\n if (data === null || data === undefined) {\n return <>{fallback}</>;\n }\n const size =\n width !== undefined || height !== undefined\n ? { width, height }\n : { width: data.width ?? undefined, height: data.height ?? undefined };\n return (\n <img\n src={data.url}\n alt={data.altText ?? alt}\n {...size}\n loading={loading}\n decoding={decoding}\n {...rest}\n />\n );\n}\n\nexport type Pagination = Schema<'Pagination'>;\n\nexport interface PaginationState {\n page: number;\n totalPages: number;\n hasPreviousPage: boolean;\n hasNextPage: boolean;\n previousPage: number | null;\n nextPage: number | null;\n /** Page numbers around the current one, with `null` for a gap: `[1, null, 4, 5, 6, null, 12]`. */\n pages: Array<number | null>;\n}\n\nexport function paginationState(meta: Pagination, around = 1): PaginationState {\n const { page, totalPages } = meta;\n const wanted = new Set([1, totalPages]);\n for (let p = page - around; p <= page + around; p++) {\n if (p >= 1 && p <= totalPages) {\n wanted.add(p);\n }\n }\n const sorted = [...wanted].filter((p) => p >= 1).sort((a, b) => a - b);\n const pages: Array<number | null> = [];\n sorted.forEach((p, index) => {\n const previous = sorted[index - 1];\n if (previous !== undefined && p - previous > 1) {\n pages.push(null);\n }\n pages.push(p);\n });\n return {\n page,\n totalPages,\n hasPreviousPage: page > 1,\n hasNextPage: meta.hasNextPage,\n previousPage: page > 1 ? page - 1 : null,\n nextPage: meta.hasNextPage ? page + 1 : null,\n pages,\n };\n}\n\n/**\n * Headless pagination over `meta.pagination`: you render the links, it does the arithmetic.\n *\n * @example\n * <Pagination meta={products.meta.pagination}>\n * {({ pages }) =>\n * pages.map((page, i) =>\n * page === null ? <span key={i}>…</span> : <a key={i} href={`?page=${page}`}>{page}</a>,\n * )\n * }\n * </Pagination>\n */\nexport function Pagination({\n meta,\n around,\n children,\n}: {\n meta: Pagination;\n around?: number;\n children: (state: PaginationState) => ReactNode;\n}) {\n return <>{children(paginationState(meta, around))}</>;\n}\n","import { useCallback, useMemo, useState, useSyncExternalStore } from 'react';\nimport type { CartLineInput, CartAttribute } from '../cart';\nimport { useMagicStore } from './context';\nimport {\n initialSelection,\n isOptionValueAvailable,\n selectOption,\n variantFor,\n type SelectableProduct,\n type SelectedOptions,\n} from '../variants';\n\n/**\n * The signed-in customer and every way to sign in and out.\n *\n * @wraps CustomerSessionController\n * @example\n * const { customer, isSignedIn, requestOtp, verifyOtp, signOut } = useCustomer();\n * await requestOtp('+998901234567');\n * await verifyOtp('+998901234567', code);\n */\nexport function useCustomer() {\n const { session } = useMagicStore();\n const state = useSyncExternalStore(\n session.subscribe,\n session.getSnapshot,\n session.getServerSnapshot,\n );\n\n return {\n customer: state.session?.customer ?? null,\n isSignedIn: state.session !== null,\n requestOtp: (phone: string) => session.requestOtp(phone),\n verifyOtp: (phone: string, code: string, referralCode?: string) =>\n session.verifyOtp(phone, code, referralCode),\n signInWithTelegram: (initData: string, referralCode?: string) =>\n session.signInWithTelegram(initData, referralCode),\n signInWithOq: (oqToken: string) => session.signInWithOq(oqToken),\n signInWithClick: (webSession: string) => session.signInWithClick(webSession),\n signOut: () => session.signOut(),\n reload: () => session.reloadCustomer(),\n };\n}\n\n/**\n * The visitor's cart and every change to it. The first `addLines` creates the cart.\n *\n * @wraps CartController\n * @example\n * const { cart, totalQuantity, status, error, addLine } = useCart();\n * await addLine({ productId: product.id, variantId: selectedVariant?.id ?? null, quantity: 1 });\n */\nexport function useCart() {\n const { cart } = useMagicStore();\n const state = useSyncExternalStore(cart.subscribe, cart.getSnapshot, cart.getServerSnapshot);\n\n return {\n ...state,\n totalQuantity: state.cart?.totalQuantity ?? 0,\n addLines: (lines: CartLineInput[]) => cart.addLines(lines),\n addLine: (line: CartLineInput) => cart.addLines([line]),\n updateLine: (lineId: string, quantity: number) => cart.updateLine(lineId, quantity),\n removeLine: (lineId: string) => cart.removeLine(lineId),\n setDiscountCodes: (codes: string[]) => cart.setDiscountCodes(codes),\n setNote: (note: string | null) => cart.setNote(note),\n setAttributes: (attributes: CartAttribute[]) => cart.setAttributes(attributes),\n setGift: (promotionId: string | null) => cart.setGift(promotionId),\n setPoints: (points: number) => cart.setPoints(points),\n };\n}\n\n/**\n * Saved products: a guest's in this browser, a customer's on the server (merged at sign-in).\n *\n * @wraps WishlistController\n * @example\n * const wishlist = useWishlist();\n * <button aria-pressed={wishlist.has(product.id)} onClick={() => wishlist.toggle(product.id)}>♥</button>\n */\nexport function useWishlist() {\n const { wishlist } = useMagicStore();\n const state = useSyncExternalStore(\n wishlist.subscribe,\n wishlist.getSnapshot,\n wishlist.getServerSnapshot,\n );\n\n return {\n ...state,\n has: (productId: string) => state.productIds.includes(productId),\n add: (productId: string) => wishlist.add(productId),\n remove: (productId: string) => wishlist.remove(productId),\n toggle: (productId: string) => wishlist.toggle(productId),\n };\n}\n\n/**\n * Reports what the visitor looks at. Stable across renders.\n *\n * @wraps AnalyticsController\n * @example\n * const analytics = useAnalytics();\n * useEffect(() => analytics.productView(product.id), [analytics, product.id]);\n */\nexport function useAnalytics() {\n return useMagicStore().analytics;\n}\n\n/**\n * Options → variant. `selectedVariant` is null only while a choice is missing; `isAvailable` says\n * whether a value leads to a variant for sale given the other choices.\n *\n * @example\n * const { selectedOptions, selectedVariant, setOption, isAvailable } = useVariantSelection(product);\n * <button disabled={!isAvailable('Size', 'M')} onClick={() => setOption('Size', 'M')}>M</button>\n */\nexport function useVariantSelection(product: SelectableProduct, initialVariantId?: string | null) {\n const [selected, setSelected] = useState<SelectedOptions>(() =>\n initialSelection(product, initialVariantId),\n );\n const selectedVariant = useMemo(() => variantFor(product, selected), [product, selected]);\n\n const setOption = useCallback(\n (name: string, value: string) =>\n setSelected((current) => selectOption(product, current, name, value)),\n [product],\n );\n const isAvailable = useCallback(\n (name: string, value: string) => isOptionValueAvailable(product, selected, name, value),\n [product, selected],\n );\n\n return { selectedOptions: selected, selectedVariant, setOption, isAvailable };\n}\n","import { createContext, useContext, type ReactNode } from 'react';\nimport type { SelectableProduct } from '../variants';\nimport { useVariantSelection } from './hooks';\n\ntype ProductContextValue = ReturnType<typeof useVariantSelection> & { product: SelectableProduct };\n\nconst ProductContext = createContext<ProductContextValue | null>(null);\n\n/**\n * Shares one product's variant selection with everything under it (options, price, add-to-cart).\n *\n * @example\n * <ProductProvider product={product}>\n * <VariantPicker />\n * <AddToCart />\n * </ProductProvider>\n */\nexport function ProductProvider<P extends SelectableProduct>({\n product,\n initialVariantId,\n children,\n}: {\n product: P;\n initialVariantId?: string | null;\n children: ReactNode;\n}) {\n const selection = useVariantSelection(product, initialVariantId);\n return (\n <ProductContext.Provider value={{ ...selection, product }}>{children}</ProductContext.Provider>\n );\n}\n\n/**\n * The product and variant selection of the nearest `<ProductProvider>`; throws outside one.\n *\n * @example\n * const { product, selectedVariant } = useProduct();\n * return <Money data={selectedVariant?.price ?? product.price} />;\n */\nexport function useProduct(): ProductContextValue {\n const value = useContext(ProductContext);\n if (value === null) {\n throw new Error('useProduct must be used inside <ProductProvider>.');\n }\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWA,IAAM,cAAc;AAMb,SAAS,iBAAiB,SAA0B,MAAM,yBAAiC;AAChG,QAAM,WAAW,QAAQ,IAAI,GAAG;AAChC,MAAI,aAAa,QAAQ,mBAAmB,KAAK,QAAQ,GAAG;AAC1D,WAAO;AAAA,EACT;AACA,QAAM,KAAK,WAAW,OAAO,WAAW;AACxC,UAAQ,IAAI,KAAK,EAAE;AACnB,SAAO;AACT;AAOO,IAAM,sBAAN,MAA0B;AAAA,EAI/B,YACmB,QACA,WACA,UAAiE,CAAC,GACnF;AAHiB;AACA;AACA;AAAA,EAChB;AAAA,EAHgB;AAAA,EACA;AAAA,EACA;AAAA,EANX,QAA0B,CAAC;AAAA,EAC3B,QAA8C;AAAA;AAAA,EAStD,SAAS,MAAc,QAA0B,CAAC,GAAS;AACzD,SAAK,MAAM,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;AAAA,EAChE;AAAA,EAEA,YAAY,WAAmB,WAAiC;AAC9D,SAAK,MAAM,gBAAgB,EAAE,WAAW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OAAO,EAAE,GAAG,WAAW,QAAQ,GAAI,UAAS;AAEzE;AASO,SAAS,aAAkC;AAChD,QAAM,YAAQ,0BAAW,cAAc;AACvC,MAAI,UAAU,MAAM;AAClB,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AACA,SAAO;AACT;;;AXhCA,IAAAC,4BAAgC;","names":["import_storefront_client","import_storefront_client","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_storefront_client"]}
|