parity(api,apps): delivery-mode gaps — master OTP, non-blocking SMS, faToEn, v2 cart cap

D20: OTP_MASTER_CODE login bypass read only from the environment, disabled when
unset, audited on every use, with a boot banner while armed. SMS no longer
aborts the boot in production — it warns and declines silently, so no message
can stop an operation.

D19: port Utility::faTOen onto admin-entered mobiles (before the uniqueness
lookup, which could previously be bypassed with Persian digits), and the
create-only welcome SMS, byte-identical to the reference and fire-and-forget.

user-app-v2 was missing the cart stock ceiling entirely: capQty/maxQty, the
un-orderable guard and the qty clamp are ported, leaving v2's own design intact.
The two cart stores are now byte-identical. isVariantOrderable and the
orderable-first default selection ported too.

jest 45/45; typecheck clean on api, admin-panel, user-app, user-app-v2.

[ref: henza_server/app/Http/Controllers/Adm/AdminController.php:333,348,364,378-387]
[ref: henza_server/app/Models/Utility.php:26]

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-09-22 18:35:33 +03:30
co-authored by Claude Opus 5
parent 2194b3d4d9
commit 460cf276b6
128 changed files with 756 additions and 181 deletions
+18 -3
View File
@@ -8,6 +8,7 @@ import { AppModule } from './app.module';
import { prepareDatabase } from './prisma/bootstrap';
import { PrismaExceptionFilter } from './prisma/prisma-exception.filter';
import { assertSmsConfigured } from './modules/sms/sms.service';
import { masterOtpEnabled } from './modules/customer-auth/customer-auth.service';
// serve-static's bundled `mime` version predates .avif, so it falls back to
// application/octet-stream — browsers still render the image (they sniff
@@ -17,11 +18,25 @@ const EXTRA_MIME_TYPES: Record<string, string> = {
};
async function bootstrap() {
// Fail fast rather than start a server on which no customer could log in.
// In production a missing SMS credential throws here; outside production it
// only warns and the codes are logged locally.
// D20 — reports the SMS configuration and never throws. A missing credential
// no longer stops the boot; messages are logged instead of sent.
assertSmsConfigured();
// D20 — a loud, unmissable banner whenever the delivery bypass is armed, so
// it cannot reach the real release unnoticed.
if (masterOtpEnabled()) {
// eslint-disable-next-line no-console
console.warn(
'\n' +
'='.repeat(72) +
'\n ⚠ OTP_MASTER_CODE فعال است — قبل از انتشار اصلی حذف شود\n' +
' ⚠ OTP_MASTER_CODE IS ACTIVE: any active customer can sign in with\n' +
' ⚠ this fixed code. Remove it from the environment before release.\n' +
'='.repeat(72) +
'\n',
);
}
await prepareDatabase();
const app = await NestFactory.create<NestExpressApplication>(AppModule);
@@ -1,9 +1,11 @@
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common';
import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common';
import { CustomerKind, Prisma, VerificationStep } from '@prisma/client';
import * as bcrypt from 'bcryptjs';
import { PrismaService } from '../../prisma/prisma.service';
import { TableService } from '../admin-table/table.service';
import type { TableQueryDto } from '../admin-table/table-query.dto';
import { faToEn } from '../customer-auth/digits';
import { SmsService } from '../sms/sms.service';
/**
* Wholesale ("عمده") customer lists — legacy views/customer/omde/*.
@@ -89,11 +91,41 @@ function verifyStepTwo(step: VerificationStep): number {
@Injectable()
export class AdminCustomersService {
private readonly logger = new Logger(AdminCustomersService.name);
constructor(
private readonly prisma: PrismaService,
private readonly table: TableService,
private readonly sms: SmsService,
) {}
/**
* The welcome SMS the reference sends after every new customer is created
* (AdminController.php:378-387). Byte-identical, including the line order and
* the trailing PWA link; the commented-out Android/iOS lines are not sent
* there and are not sent here.
*
* D20 — awaiting it would let a slow or unconfigured gateway hold up the
* HTTP response, and `send()` already swallows every error, so the result is
* only logged. The reference behaves the same way: `Sms::Send` is fired
* inline and its return value discarded, so a failed message never blocked
* the creation.
*/
private sendWelcomeSms(mobile: string, firstName: string, lastName: string) {
const body =
'هنزا گلد\n' +
`همکار گرامی ${firstName} ${lastName}\n` +
`نام کاربری : ${mobile}\n` +
'لینک pwa \n' +
'https://app.henzagold.com';
void this.sms.send(mobile, body).catch((e: unknown) => {
// send() is documented never to throw; this is belt-and-braces so an
// unexpected rejection can never become an unhandled promise rejection.
this.logger.error(`Welcome SMS to ${mobile} failed: ${String(e)}`);
});
}
private static readonly ALLOWED = [
'id',
'fullName',
@@ -611,7 +643,12 @@ export class AdminCustomersService {
const firstName = String(data.fname ?? data.name ?? '').trim();
const lastName = String(data.lname ?? '').trim();
const fullName = [firstName, lastName].filter(Boolean).join(' ');
const mobile = String(data.mobile ?? '').trim();
// D19 gap 2 — the reference normalises the submitted mobile with
// Utility::faTOen before storing it (AdminController.php:333,364). Without
// this, an operator typing ۰۹۱۲… stores Persian digits and that customer
// can never log in: the app's own faToEn turns the typed number into ASCII
// and the lookup misses.
const mobile = faToEn(String(data.mobile ?? '').trim());
const nationalCode = String(data.national_code ?? data.nationalCode ?? '').trim();
if (!fullName || !mobile) {
@@ -633,7 +670,7 @@ export class AdminCustomersService {
);
}
return this.prisma.customer.create({
const created = await this.prisma.customer.create({
data: {
fullName,
firstName: firstName || null,
@@ -675,6 +712,13 @@ export class AdminCustomersService {
referredByAgentId: (data.reagent_id as string) || null,
},
});
// D19 gap 1 — the reference sends this only on CREATE, guarded by
// `if (!isset($input['id']))` (AdminController.php:378). Fire-and-forget,
// so the operator's save never waits on the gateway.
this.sendWelcomeSms(mobile, firstName, lastName);
return created;
}
async update(id: string, data: Record<string, unknown>) {
@@ -701,7 +745,11 @@ export class AdminCustomersService {
patch.makingChargeOffsetPercent = new Prisma.Decimal(String(data.percent));
}
if (data.mobile !== undefined) patch.mobile = String(data.mobile);
// D19 gap 2 — same normalisation as create(). The reference discards the
// submitted mobile entirely on edit (AdminController.php:348); D19 ruled
// that lock NOT ported, so the field stays editable here and is normalised
// instead. Logged in ISSUES as PERS-01.
if (data.mobile !== undefined) patch.mobile = faToEn(String(data.mobile));
if (data.national_code !== undefined) patch.nationalCode = String(data.national_code);
if (data.city_id !== undefined) {
patch.city = data.city_id ? { connect: { id: String(data.city_id) } } : { disconnect: true };
@@ -4,6 +4,7 @@ import * as bcrypt from 'bcryptjs';
import { PrismaService } from '../../prisma/prisma.service';
import { TableService } from '../admin-table/table.service';
import type { TableQueryDto } from '../admin-table/table-query.dto';
import { faToEn } from '../customer-auth/digits';
/**
* Admin users and the permission matrix — legacy views/user/*, served by
@@ -171,7 +172,11 @@ export class AdminUsersService {
const firstName = String(data.fname ?? data.name ?? '').trim();
const lastName = String(data.lname ?? '').trim();
const fullName = [firstName, lastName].filter(Boolean).join(' ');
const mobile = String(data.mobile ?? '').trim();
// D19 gap 2 — normalise Persian digits, as the reference does with
// Utility::faTOen (AdminController.php:333,364). Done BEFORE the
// uniqueness lookup below: otherwise ۰۹۱۲… and 0912… are different strings
// and the same number could be registered twice.
const mobile = faToEn(String(data.mobile ?? '').trim());
const password = String(data.password ?? '');
const role = data.role as AdminRole | undefined;
@@ -260,7 +265,8 @@ export class AdminUsersService {
}
if (data.mobile !== undefined) {
const mobile = String(data.mobile);
// Normalised before the clash check, for the same reason as create().
const mobile = faToEn(String(data.mobile));
if (mobile !== existing.mobile) {
const clash = await this.prisma.adminUser.findUnique({ where: { mobile } });
if (clash) throw new BadRequestException('این شماره موبایل قبلاً ثبت شده است');
@@ -26,6 +26,26 @@ const SEND_WINDOW_MS = 10 * 60 * 1000;
/** Minimum gap between two sends to the same number. */
const RESEND_COOLDOWN_MS = 60 * 1000;
/**
* D20 — the delivery master OTP.
*
* Read from `OTP_MASTER_CODE` and NEVER hardcoded. Unset or empty disables it
* completely, which is the state every real deployment must be in.
*
* Read through a function rather than a module constant so tests (and a
* restart-free config change) see the current value instead of whatever was in
* the environment when this module was first imported.
*/
export function masterOtpCode(): string | null {
const raw = process.env.OTP_MASTER_CODE?.trim();
return raw ? raw : null;
}
/** Whether the master code is currently armed. */
export function masterOtpEnabled(): boolean {
return masterOtpCode() !== null;
}
@Injectable()
export class CustomerAuthService {
private readonly logger = new Logger(CustomerAuthService.name);
@@ -96,6 +116,39 @@ export class CustomerAuthService {
const mobile = faToEn(rawMobile);
const code = faToEn(rawCode);
// One message for every failure mode, so a caller cannot tell "no code was
// sent" from "wrong code" from "expired". Declared before the master-code
// branch so that path can reject identically.
const reject = () => new UnauthorizedException('کد وارد شده صحیح نیست');
// D20 — the delivery master code. Checked BEFORE the stored challenge so it
// works even when the customer never requested a code (no CustomerOtp row
// exists to compare against). It does not weaken any other rule: the
// customer must still exist, be active and not archived, and the send
// throttle on requestOtp is untouched.
//
// MUST be removed from the environment before the real release — see D20
// and DELIVERY.md.
const master = masterOtpCode();
if (master !== null && code === master) {
const customer = await this.prisma.customer.findFirst({
where: { mobile, isActive: true, isArchived: false },
select: { id: true, mobile: true },
});
if (!customer) throw reject();
// Audited with the mobile, as D20 requires, so every bypass login is
// traceable in the server log.
this.logger.warn(
`OTP_MASTER_CODE used to sign in customer ${customer.id} (mobile ${customer.mobile})`,
);
return {
token: await this.issueToken(customer.id, customer.mobile),
customer: { id: customer.id, mobile: customer.mobile },
};
}
const challenge = await this.prisma.customerOtp.findFirst({
where: { mobile, consumedAt: null },
orderBy: { createdAt: 'desc' },
@@ -106,10 +159,6 @@ export class CustomerAuthService {
},
});
// One message for every failure mode below, so a caller cannot tell "no
// code was sent" from "wrong code" from "expired".
const reject = () => new UnauthorizedException('کد وارد شده صحیح نیست');
if (!challenge) throw reject();
if (challenge.expiresAt.getTime() < Date.now()) throw reject();
@@ -138,25 +187,32 @@ export class CustomerAuthService {
data: { consumedAt: new Date() },
});
return {
token: await this.issueToken(challenge.customer.id, challenge.customer.mobile),
customer: { id: challenge.customer.id, mobile: challenge.customer.mobile },
};
}
/**
* Sign a customer JWT. Shared by the normal verify path and the D20 master
* code so both issue exactly the same token — the bypass grants no extra
* privilege and no longer lifetime.
*
* Reference reused api_token forever once set (:60-62); a fresh token is
* issued on every verify here (T1).
*/
private issueToken(customerId: string, mobile: string): Promise<string> {
const payload: CustomerJwtPayload = {
sub: challenge.customer.id,
mobile: challenge.customer.mobile,
sub: customerId,
mobile,
typ: CUSTOMER_TOKEN_TYPE,
};
// Reference reused api_token forever once set (:60-62); a fresh token is
// issued on every verify here (T1).
const token = await this.jwt.signAsync(payload, {
return this.jwt.signAsync(payload, {
secret: customerJwtSecret(),
// jsonwebtoken types expiresIn as a template-literal union, which a plain
// string from process.env does not satisfy — same cast AuthModule uses.
expiresIn: (process.env.JWT_CUSTOMER_EXPIRES_IN ?? '30d') as `${number}d`,
});
return {
token,
customer: { id: challenge.customer.id, mobile: challenge.customer.mobile },
};
}
/**
@@ -0,0 +1,203 @@
import { UnauthorizedException } from '@nestjs/common';
// @nestjs/jwt v12 ships ESM only, which this CommonJS jest setup cannot load.
// The service is constructed with a hand-built JwtService double anyway, so the
// real module is never used here — stubbing it keeps the suite runnable without
// touching the shared jest config (D19: lowest-risk option).
jest.mock('@nestjs/jwt', () => ({ JwtService: class {} }));
import { CustomerAuthService, masterOtpCode, masterOtpEnabled } from './customer-auth.service';
/**
* D20 — the delivery master OTP.
*
* The three cases the owner specified:
* 1. with OTP_MASTER_CODE set, that code signs an active customer in;
* 2. with the variable absent, the same code is rejected;
* 3. the real, stored code still works.
*
* Plus the guards that must survive the bypass: an inactive or archived
* customer is still refused, and an unknown mobile is still refused.
*
* The service is driven with hand-built doubles rather than a Nest testing
* module, so these run without a database.
*/
describe('OTP_MASTER_CODE (D20)', () => {
const saved = { ...process.env };
/** An active customer whose stored challenge holds the real code "4321". */
const CUSTOMER = { id: 'cus_1', mobile: '09121112233', isActive: true, isArchived: false };
let prisma: {
customer: { findFirst: jest.Mock };
customerOtp: { findFirst: jest.Mock; update: jest.Mock; create: jest.Mock; count: jest.Mock };
};
let jwt: { signAsync: jest.Mock };
let sms: { send: jest.Mock };
let service: CustomerAuthService;
beforeEach(() => {
delete process.env.OTP_MASTER_CODE;
process.env.JWT_CUSTOMER_SECRET = 'test-secret';
prisma = {
customer: { findFirst: jest.fn().mockResolvedValue(CUSTOMER) },
customerOtp: {
findFirst: jest.fn().mockResolvedValue(null),
update: jest.fn().mockResolvedValue({}),
create: jest.fn().mockResolvedValue({}),
count: jest.fn().mockResolvedValue(0),
},
};
jwt = { signAsync: jest.fn().mockResolvedValue('signed.jwt.token') };
sms = { send: jest.fn().mockResolvedValue({ ok: true }) };
service = new CustomerAuthService(
prisma as never,
jwt as never,
sms as never,
);
// The bypass logs every use; keep the test output clean.
jest.spyOn(service['logger'], 'warn').mockImplementation(() => undefined);
});
afterAll(() => {
process.env = { ...saved };
});
describe('the env switch itself', () => {
it('is disabled when the variable is absent', () => {
expect(masterOtpCode()).toBeNull();
expect(masterOtpEnabled()).toBe(false);
});
it('is disabled when the variable is empty or only whitespace', () => {
process.env.OTP_MASTER_CODE = '';
expect(masterOtpEnabled()).toBe(false);
process.env.OTP_MASTER_CODE = ' ';
expect(masterOtpEnabled()).toBe(false);
});
it('is enabled when the variable holds a code', () => {
process.env.OTP_MASTER_CODE = '1379';
expect(masterOtpCode()).toBe('1379');
expect(masterOtpEnabled()).toBe(true);
});
});
describe('1 — the master code signs an active customer in', () => {
it('issues a token without any stored challenge', async () => {
process.env.OTP_MASTER_CODE = '1379';
const result = await service.verifyOtp(CUSTOMER.mobile, '1379', '127.0.0.1');
expect(result.token).toBe('signed.jwt.token');
expect(result.customer).toEqual({ id: CUSTOMER.id, mobile: CUSTOMER.mobile });
// It must not depend on a CustomerOtp row existing.
expect(prisma.customerOtp.findFirst).not.toHaveBeenCalled();
});
it('accepts the master code typed with Persian digits', async () => {
// faToEn runs before the comparison, as it does for a real code.
process.env.OTP_MASTER_CODE = '1379';
await expect(service.verifyOtp(CUSTOMER.mobile, '۱۳۷۹', undefined)).resolves.toMatchObject({
token: 'signed.jwt.token',
});
});
it('logs the bypass with the customer mobile', async () => {
process.env.OTP_MASTER_CODE = '1379';
const warn = jest.spyOn(service['logger'], 'warn');
await service.verifyOtp(CUSTOMER.mobile, '1379', undefined);
expect(warn).toHaveBeenCalledWith(expect.stringContaining(CUSTOMER.mobile));
expect(warn).toHaveBeenCalledWith(expect.stringContaining('OTP_MASTER_CODE'));
});
it('still refuses an inactive or archived customer', async () => {
process.env.OTP_MASTER_CODE = '1379';
// The lookup filters on isActive/isArchived, so it finds nothing.
prisma.customer.findFirst.mockResolvedValue(null);
await expect(service.verifyOtp(CUSTOMER.mobile, '1379', undefined)).rejects.toBeInstanceOf(
UnauthorizedException,
);
});
it('still refuses a mobile that belongs to no customer', async () => {
process.env.OTP_MASTER_CODE = '1379';
prisma.customer.findFirst.mockResolvedValue(null);
await expect(service.verifyOtp('09990000000', '1379', undefined)).rejects.toBeInstanceOf(
UnauthorizedException,
);
});
});
describe('2 — without the env var the same code is rejected', () => {
it('falls through to the normal path and rejects it', async () => {
// No OTP_MASTER_CODE, and no stored challenge to match.
await expect(service.verifyOtp(CUSTOMER.mobile, '1379', undefined)).rejects.toBeInstanceOf(
UnauthorizedException,
);
// It took the ordinary route, which does consult the challenge table.
expect(prisma.customerOtp.findFirst).toHaveBeenCalled();
expect(jwt.signAsync).not.toHaveBeenCalled();
});
it('rejects a code that merely resembles the master one while it is armed', async () => {
process.env.OTP_MASTER_CODE = '1379';
await expect(service.verifyOtp(CUSTOMER.mobile, '1378', undefined)).rejects.toBeInstanceOf(
UnauthorizedException,
);
expect(jwt.signAsync).not.toHaveBeenCalled();
});
});
describe('3 — the real code still works', () => {
/** bcrypt hash of "4321", generated once for this test. */
const bcrypt = require('bcryptjs') as typeof import('bcryptjs');
const challengeWith = async (code: string) => ({
id: 'otp_1',
codeHash: await bcrypt.hash(code, 4),
expiresAt: new Date(Date.now() + 60_000),
attempts: 0,
customer: CUSTOMER,
});
it('verifies a stored code while the master code is armed', async () => {
process.env.OTP_MASTER_CODE = '1379';
prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321'));
const result = await service.verifyOtp(CUSTOMER.mobile, '4321', undefined);
expect(result.token).toBe('signed.jwt.token');
// The real path burns the challenge; the master path never touches it.
expect(prisma.customerOtp.update).toHaveBeenCalledWith(
expect.objectContaining({ data: expect.objectContaining({ consumedAt: expect.any(Date) }) }),
);
});
it('verifies a stored code while the master code is absent', async () => {
prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321'));
await expect(service.verifyOtp(CUSTOMER.mobile, '4321', undefined)).resolves.toMatchObject({
token: 'signed.jwt.token',
});
});
it('still rejects a wrong code and counts the attempt', async () => {
prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321'));
await expect(service.verifyOtp(CUSTOMER.mobile, '0000', undefined)).rejects.toBeInstanceOf(
UnauthorizedException,
);
expect(prisma.customerOtp.update).toHaveBeenCalledWith(
expect.objectContaining({ data: { attempts: { increment: 1 } } }),
);
});
});
});
+27 -15
View File
@@ -2,9 +2,11 @@ import { Logger } from '@nestjs/common';
import { assertSmsConfigured, smsConfig, smsConfigured } from './sms.service';
/**
* Covers the boot-time contract the owner specified:
* Covers the boot-time contract as REVISED by D20:
* * while no key is set, development behaviour is unchanged;
* * in production a missing key is a clear, explicit boot failure.
* * a missing key NEVER stops the boot, in any environment — it warns, and
* sending silently declines. (D14's "fail to boot in production" rule was
* removed by the owner for the delivery.)
*/
describe('SMS configuration', () => {
const saved = { ...process.env };
@@ -71,32 +73,39 @@ describe('SMS configuration', () => {
});
});
describe('assertSmsConfigured', () => {
it('only warns outside production when keys are missing', () => {
/**
* D20 REVERSED the original boot contract. SMS must never stop the server
* from starting, in any environment — an earlier revision of these tests
* asserted the opposite (a throw in production) and is intentionally gone.
*/
describe('assertSmsConfigured (D20 — never throws)', () => {
it('warns outside production when keys are missing', () => {
process.env.NODE_ENV = 'development';
expect(() => assertSmsConfigured(logger)).not.toThrow();
expect(logger.warn).toHaveBeenCalled();
});
it('THROWS in production when keys are missing, naming them', () => {
it('warns in production when keys are missing, naming them, and still boots', () => {
process.env.NODE_ENV = 'production';
expect(() => assertSmsConfigured(logger)).toThrow(/SMS_TREZ_USERNAME/);
expect(() => assertSmsConfigured(logger)).toThrow(/SMS_TREZ_PASSWORD/);
expect(() => assertSmsConfigured(logger)).toThrow(/SMS_TREZ_SENDER_LINE/);
expect(() => assertSmsConfigured(logger)).not.toThrow();
const warned = (logger.warn as jest.Mock).mock.calls.flat().join(' ');
expect(warned).toMatch(/SMS_TREZ_USERNAME/);
expect(warned).toMatch(/SMS_TREZ_PASSWORD/);
expect(warned).toMatch(/SMS_TREZ_SENDER_LINE/);
});
it('passes in production once everything is set', () => {
it('passes silently in production once everything is set', () => {
process.env.NODE_ENV = 'production';
configureFully();
expect(() => assertSmsConfigured(logger)).not.toThrow();
expect(logger.warn).not.toHaveBeenCalled();
});
it('THROWS in production when SMS is explicitly disabled', () => {
// Disabling SMS in production means nobody can log in; that must be a
// deliberate, visible failure rather than a silent one.
it('allows SMS to be explicitly disabled in production', () => {
process.env.NODE_ENV = 'production';
process.env.SMS_PROVIDER = 'none';
expect(() => assertSmsConfigured(logger)).toThrow(/Refusing to start in production/);
expect(() => assertSmsConfigured(logger)).not.toThrow();
expect(logger.warn).toHaveBeenCalled();
});
it('allows SMS to be disabled outside production', () => {
@@ -105,9 +114,12 @@ describe('SMS configuration', () => {
expect(() => assertSmsConfigured(logger)).not.toThrow();
});
it('rejects an unknown provider name outright', () => {
it('warns about an unknown provider name instead of refusing to boot', () => {
process.env.SMS_PROVIDER = 'kavenegar';
expect(() => assertSmsConfigured(logger)).toThrow(/Unknown SMS_PROVIDER/);
expect(() => assertSmsConfigured(logger)).not.toThrow();
expect((logger.warn as jest.Mock).mock.calls.flat().join(' ')).toMatch(
/Unknown SMS_PROVIDER/,
);
});
});
});
+18 -22
View File
@@ -68,30 +68,30 @@ export function smsConfigured(): boolean {
}
/**
* Called from main.ts before the app listens. In production a missing key is
* fatal: without it no customer can log in, and a silent no-op gives no clue
* why. Outside production it is only a warning, so local development works
* with no credentials at all.
* Called from main.ts before the app listens. Reports the SMS configuration
* and NEVER throws.
*
* D20 reversed the earlier rule (D14) that a missing credential should abort
* the boot in production. The server now always starts: a missing or unknown
* provider is a warning, `send()` declines silently and logs, and no message —
* including the welcome SMS — can stop an operation. The trade-off is
* deliberate and accepted: with SMS unconfigured, customers cannot receive a
* login code, which is why `OTP_MASTER_CODE` exists for the delivery.
*/
export function assertSmsConfigured(logger: Logger = new Logger('SmsConfig')): void {
const c = smsConfig();
if (c.provider === 'none') {
const message = 'SMS_PROVIDER=none — no SMS will be sent.';
if (process.env.NODE_ENV === 'production') {
throw new Error(
`${message} Refusing to start in production: customers could not log in. ` +
'Set SMS_PROVIDER=trez and the SMS_TREZ_* variables.',
);
}
logger.warn(message);
logger.warn('SMS_PROVIDER=none — no SMS will be sent.');
return;
}
if (c.provider !== 'trez') {
throw new Error(
`Unknown SMS_PROVIDER "${c.provider}". Supported values: "trez", "none".`,
logger.warn(
`Unknown SMS_PROVIDER "${c.provider}" (supported: "trez", "none"). ` +
'No SMS will be sent.',
);
return;
}
const missing = (
@@ -106,14 +106,10 @@ export function assertSmsConfigured(logger: Logger = new Logger('SmsConfig')): v
if (missing.length === 0) return;
const message = `SMS provider "trez" is selected but these are not set: ${missing.join(', ')}.`;
if (process.env.NODE_ENV === 'production') {
throw new Error(
`${message} Refusing to start in production: no customer could receive a login code. ` +
'Set them, or set SMS_PROVIDER=none to acknowledge that SMS is disabled.',
);
}
logger.warn(`${message} Running in development mode — messages are logged, not sent.`);
logger.warn(
`SMS provider "trez" is selected but these are not set: ${missing.join(', ')}. ` +
'Messages are logged, not sent. Customers cannot receive a login code.',
);
}
@Injectable()
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as f,o as v,p as g,c as s,l as e,s as u,g as p,h as d,f as t,F as y,r as P,I as k,b as C,e as b,v as h,J as x,j as B,_ as V}from"./index-B3AQ-Dpo.js";import{P as w}from"./PageBar-Cvyz5ex2.js";import{a as I}from"./Spinner.vue_vue_type_style_index_0_lang-DKSb2qK3.js";import{S as N}from"./SectionHead-DRSKiTQc.js";import{P as F}from"./ProductCard-BHhIGh81.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-Cz9mrv7p.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BrkU_j90.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CIIQfCa1.js";import"./cartStore-JeDfPEiX.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-DxJlISvB.js";import"./classCallCheck-Bg7rxoGt.js";const S={class:"coll"},j={key:0,class:"coll__grid"},q={key:1,class:"coll__empty"},z=f({__name:"CollectionView",setup(E){const l=x(),o=p(!1),n=p([]),m=d(()=>l.query.page||"مجموعه"),c=d(()=>n.value.filter(r=>r.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{o.value=!0;try{n.value=await g.listProducts()}finally{o.value=!1}}),(r,a)=>{const _=h("container");return t(),s("div",S,[e(w,{title:m.value,"back-to":"search"},null,8,["title"]),e(I,{spinning:o.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(_,{class:"coll__body"},{default:u(()=>[e(N,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),c.value.length?(t(),s("div",j,[(t(!0),s(y,null,P(c.value,i=>(t(),B(F,{key:i.id,value:i},null,8,["value"]))),128))])):o.value?b("",!0):(t(),s("section",q,[e(k,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=C("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),U=V(z,[["__scopeId","data-v-6fdc1b6f"]]);export{U as default};
@@ -1 +0,0 @@
import{d as f,o as v,c as s,l as e,q as u,g as m,h as p,f as o,F as g,r as y,I as P,b as k,e as C,s as b,H as h,j as x,_ as B}from"./index-CZjgV-Yn.js";import{P as V}from"./PageBar-Bkc2Ht1O.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as I}from"./SectionHead-CiwUIGKe.js";import{P as N}from"./ProductCard-Cd-G3dvx.js";import{a as q}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DS8wIDwN.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./cartStore-CoSoowuC.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";const F={class:"coll"},H={key:0,class:"coll__grid"},S={key:1,class:"coll__empty"},j=f({__name:"CollectionView",setup(z){const l=h(),t=m(!1),n=m([]),d=p(()=>l.query.page||"مجموعه"),r=p(()=>n.value.filter(c=>c.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{t.value=!0;try{n.value=await q.listProducts()}finally{t.value=!1}}),(c,a)=>{const _=b("container");return o(),s("div",F,[e(V,{title:d.value,"back-to":"search"},null,8,["title"]),e(w,{spinning:t.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(_,{class:"coll__body"},{default:u(()=>[e(I,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),r.value.length?(o(),s("div",H,[(o(!0),s(g,null,y(r.value,i=>(o(),x(N,{key:i.id,value:i},null,8,["value"]))),128))])):t.value?C("",!0):(o(),s("section",S,[e(P,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=k("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),W=B(j,[["__scopeId","data-v-6fdc1b6f"]]);export{W as default};
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
.dash[data-v-b8482634]{background:#fff;min-height:100vh}.dash__bar[data-v-b8482634]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffd1;-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgba(28,45,86,.05);box-shadow:0 8px 20px -18px #1c2d568c}.dash__barInner[data-v-b8482634]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__brand[data-v-b8482634]{font-size:14.5px;font-weight:800;color:#14161a}.dash__exit[data-v-b8482634]{flex:0 0 auto;width:34px;height:34px;border:0;cursor:pointer;border-radius:11px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4;transition:transform .18s ease}.dash__exit[data-v-b8482634]:active{transform:scale(.92)}.dash__body[data-v-b8482634]{padding-top:58px;padding-bottom:90px}.dash__reveal[data-v-b8482634]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .dash__reveal[data-v-b8482634]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.dash__reveal[data-v-b8482634]{opacity:1;transform:none}.is-revealed .dash__reveal[data-v-b8482634]{transition:none}}.dash__hero[data-v-b8482634]{margin-top:16px;margin-bottom:28px;padding:20px 18px 16px;border-radius:26px;background:linear-gradient(155deg,#14161a,#14161a 55%,#5e1427 130%);color:#fff;box-shadow:0 22px 40px -26px #14161a52}.dash__heroTop[data-v-b8482634]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__heroIdentity[data-v-b8482634]{display:flex;flex-direction:column;gap:3px;min-width:0}.dash__heroName[data-v-b8482634]{font-size:13.5px;font-weight:800}.dash__heroMobile[data-v-b8482634]{font-size:11px;color:#ffffff8c;direction:ltr;text-align:right}.dash__heroSeal[data-v-b8482634]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__heroSeal.is-debtor[data-v-b8482634]{color:#fff;background:#a33c55}.dash__heroSeal.is-creditor[data-v-b8482634]{color:#14161a;background:#ffffffe6}.dash__heroFigure[data-v-b8482634]{margin-top:20px;display:flex;align-items:baseline;gap:8px}.dash__heroNum[data-v-b8482634]{font-size:34px;font-weight:800;letter-spacing:-.5px}.dash__heroUnit[data-v-b8482634]{font-size:12px;font-weight:600;color:#ffffff9e}.dash__heroDebt[data-v-b8482634]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid rgba(255,255,255,.14);font-size:11.5px;color:#ffffff9e}.dash__heroDebt b[data-v-b8482634]{font-size:13px;font-weight:700;color:#fff}.dash__heroDebt i[data-v-b8482634]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__invite[data-v-b8482634]{margin-top:16px;padding:26px 20px;border-radius:26px;background:#14161a;color:#fff;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}.dash__inviteIcon[data-v-b8482634]{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#ffffff1a;margin-bottom:2px}.dash__invite h3[data-v-b8482634]{margin:0;font-size:14px;font-weight:800}.dash__invite p[data-v-b8482634]{margin:0;font-size:11.5px;color:#fff9;max-width:240px}.dash__inviteCta[data-v-b8482634]{margin-top:6px;padding:10px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12px;font-weight:700;color:#14161a;background:#fff;transition:transform .18s ease}.dash__inviteCta[data-v-b8482634]:active{transform:scale(.96)}.dash__rows[data-v-b8482634]{margin-top:0;display:flex;flex-direction:column;gap:9px}.dash__row[data-v-b8482634]{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid #ECEDEF;border-radius:17px;cursor:pointer;background:#fff;font-family:inherit;text-align:right;transition:transform .18s ease,border-color .18s ease}.dash__row[data-v-b8482634]:active{transform:scale(.985);border-color:#7a1b3333}.dash__rowIcon[data-v-b8482634]{flex:0 0 auto;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__rowText[data-v-b8482634]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.dash__rowText b[data-v-b8482634]{font-size:12.5px;font-weight:700;color:#14161a}.dash__rowText small[data-v-b8482634]{font-size:10.5px;color:#8a909c}.dash__rate[data-v-b8482634]{margin-top:14px}
@@ -0,0 +1 @@
.dash[data-v-0633711e]{background:#fff;min-height:100vh}.dash__bar[data-v-0633711e]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffd1;-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgba(28,45,86,.05);box-shadow:0 8px 20px -18px #1c2d568c}.dash__barInner[data-v-0633711e]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__brand[data-v-0633711e]{font-size:14.5px;font-weight:800;color:#14161a}.dash__exit[data-v-0633711e]{flex:0 0 auto;width:34px;height:34px;border:0;cursor:pointer;border-radius:11px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4;transition:transform .18s ease}.dash__exit[data-v-0633711e]:active{transform:scale(.92)}.dash__body[data-v-0633711e]{padding-top:58px;padding-bottom:90px}.dash__reveal[data-v-0633711e]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .dash__reveal[data-v-0633711e]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.dash__reveal[data-v-0633711e]{opacity:1;transform:none}.is-revealed .dash__reveal[data-v-0633711e]{transition:none}}.dash__hero[data-v-0633711e]{margin-top:16px;margin-bottom:28px;padding:20px 18px 16px;border-radius:26px;background:linear-gradient(155deg,#14161a,#14161a 55%,#5e1427 130%);color:#fff;box-shadow:0 22px 40px -26px #14161a52}.dash__heroTop[data-v-0633711e]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__heroIdentity[data-v-0633711e]{display:flex;flex-direction:column;gap:3px;min-width:0}.dash__heroName[data-v-0633711e]{font-size:13.5px;font-weight:800}.dash__heroMobile[data-v-0633711e]{font-size:11px;color:#ffffff8c;direction:ltr;text-align:right}.dash__heroSeal[data-v-0633711e]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__heroSeal.is-debtor[data-v-0633711e]{color:#fff;background:#a33c55}.dash__heroSeal.is-creditor[data-v-0633711e]{color:#14161a;background:#ffffffe6}.dash__heroFigure[data-v-0633711e]{margin-top:20px;display:flex;align-items:baseline;gap:8px}.dash__heroNum[data-v-0633711e]{font-size:34px;font-weight:800;letter-spacing:-.5px}.dash__heroUnit[data-v-0633711e]{font-size:12px;font-weight:600;color:#ffffff9e}.dash__heroDebt[data-v-0633711e]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid rgba(255,255,255,.14);font-size:11.5px;color:#ffffff9e}.dash__heroDebt b[data-v-0633711e]{font-size:13px;font-weight:700;color:#fff}.dash__heroDebt i[data-v-0633711e]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__invite[data-v-0633711e]{margin-top:16px;padding:26px 20px;border-radius:26px;background:#14161a;color:#fff;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}.dash__inviteIcon[data-v-0633711e]{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#ffffff1a;margin-bottom:2px}.dash__invite h3[data-v-0633711e]{margin:0;font-size:14px;font-weight:800}.dash__invite p[data-v-0633711e]{margin:0;font-size:11.5px;color:#fff9;max-width:240px}.dash__inviteCta[data-v-0633711e]{margin-top:6px;padding:10px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12px;font-weight:700;color:#14161a;background:#fff;transition:transform .18s ease}.dash__inviteCta[data-v-0633711e]:active{transform:scale(.96)}.dash__rows[data-v-0633711e]{margin-top:0;display:flex;flex-direction:column;gap:9px}.dash__row[data-v-0633711e]{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid #ECEDEF;border-radius:17px;cursor:pointer;background:#fff;font-family:inherit;text-align:right;transition:transform .18s ease,border-color .18s ease}.dash__row[data-v-0633711e]:active{transform:scale(.985);border-color:#7a1b3333}.dash__rowIcon[data-v-0633711e]{flex:0 0 auto;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__rowText[data-v-0633711e]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.dash__rowText b[data-v-0633711e]{font-size:12.5px;font-weight:700;color:#14161a}.dash__rowText small[data-v-0633711e]{font-size:10.5px;color:#8a909c}.dash__rate[data-v-0633711e]{margin-top:14px}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as l,j as n,s as c,u as _,ao as d,f as r,b as t,A as a,D as o,t as i}from"./index-B3AQ-Dpo.js";const m={class:"mDialog__body"},g={class:"mDialog__art"},D={class:"mDialog__title"},u={class:"mDialog__actions"},h=l({__name:"DialogVant",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(s){return(e,x)=>(r(),n(_(d),{class:"mDialog"},{default:c(()=>[t("div",m,[t("div",g,[a(e.$slots,"img",{},()=>[o(i(s.text2),1)])]),t("div",D,[a(e.$slots,"title",{},()=>[o(i(s.text1),1)])]),t("div",u,[a(e.$slots,"button",{},()=>[o(i(s.text3),1)])])])]),_:3}))}});export{h as _};
@@ -1 +0,0 @@
import{d as l,j as n,q as c,u as _,an as d,f as r,b as t,z as a,C as o,t as i}from"./index-CZjgV-Yn.js";const m={class:"mDialog__body"},g={class:"mDialog__art"},u={class:"mDialog__title"},D={class:"mDialog__actions"},h=l({__name:"DialogVant",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(s){return(e,x)=>(r(),n(_(d),{class:"mDialog"},{default:c(()=>[t("div",m,[t("div",g,[a(e.$slots,"img",{},()=>[o(i(s.text2),1)])]),t("div",u,[a(e.$slots,"title",{},()=>[o(i(s.text1),1)])]),t("div",D,[a(e.$slots,"button",{},()=>[o(i(s.text3),1)])])])]),_:3}))}});export{h as _};
@@ -1 +0,0 @@
import{d as f,o as g,c as o,l as e,q as c,g as m,f as t,F as p,b as i,r as y,I as b,u as h,e as k,v as P,h as C,s as F,j as x,_ as B}from"./index-CZjgV-Yn.js";import{P as V}from"./PageBar-Bkc2Ht1O.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S}from"./SectionHead-CiwUIGKe.js";import{P as I}from"./ProductCard-Cd-G3dvx.js";import{a as N}from"./SingleProduct-DS8wIDwN.js";import{a as $}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-CoSoowuC.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./dialogEmpty1-Caw7F5KL.js";const R={class:"favs"},j={class:"favs__grid"},q={key:1,class:"favs__empty"},z=f({__name:"FavoritesView",setup(E){const d=P(),v=N(),a=m(!1),l=m([]),r=C(()=>l.value.filter(u=>v.isFavorite(u.id)));return g(async()=>{a.value=!0;try{l.value=await $.listProducts()}finally{a.value=!1}}),(u,s)=>{const _=F("container");return t(),o("div",R,[e(V,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(w,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(_,{class:"favs__body"},{default:c(()=>[r.value.length?(t(),o(p,{key:0},[e(S,{title:"ذخیره‌شده‌ها",subtitle:`${r.value.length} محصول`},null,8,["subtitle"]),i("div",j,[(t(!0),o(p,null,y(r.value,n=>(t(),x(I,{key:n.id,value:n},null,8,["value"]))),128))])],64)):a.value?k("",!0):(t(),o("section",q,[e(b,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=i("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),i("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=n=>h(d).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),Y=B(z,[["__scopeId","data-v-a8e72280"]]);export{Y as default};
@@ -0,0 +1 @@
import{d as f,o as g,p as y,c as o,l as e,s as c,g as p,f as t,F as m,b as i,r as b,I as h,u as k,e as P,x as C,h as x,v as F,j as B,_ as V}from"./index-B3AQ-Dpo.js";import{P as w}from"./PageBar-Cvyz5ex2.js";import{a as S}from"./Spinner.vue_vue_type_style_index_0_lang-DKSb2qK3.js";import{S as I}from"./SectionHead-DRSKiTQc.js";import{P as N}from"./ProductCard-BHhIGh81.js";import{a as $}from"./SingleProduct-Cz9mrv7p.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-JeDfPEiX.js";import"./index-DxJlISvB.js";import"./classCallCheck-Bg7rxoGt.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BrkU_j90.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CIIQfCa1.js";import"./dialogEmpty1-Caw7F5KL.js";const R={class:"favs"},j={class:"favs__grid"},z={key:1,class:"favs__empty"},E=f({__name:"FavoritesView",setup(H){const d=C(),v=$(),a=p(!1),l=p([]),r=x(()=>l.value.filter(u=>v.isFavorite(u.id)));return g(async()=>{a.value=!0;try{l.value=await y.listProducts()}finally{a.value=!1}}),(u,s)=>{const _=F("container");return t(),o("div",R,[e(w,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(S,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(_,{class:"favs__body"},{default:c(()=>[r.value.length?(t(),o(m,{key:0},[e(I,{title:"ذخیره‌شده‌ها",subtitle:`${r.value.length} محصول`},null,8,["subtitle"]),i("div",j,[(t(!0),o(m,null,b(r.value,n=>(t(),B(N,{key:n.id,value:n},null,8,["value"]))),128))])],64)):a.value?P("",!0):(t(),o("section",z,[e(h,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=i("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),i("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=n=>k(d).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),X=V(E,[["__scopeId","data-v-a8e72280"]]);export{X as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.otp-single-input{display:flex;align-items:center}.auth[data-v-08d7f1af]{background:#fff;min-height:100vh}.auth__body[data-v-08d7f1af]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-08d7f1af]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-08d7f1af]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-08d7f1af]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-08d7f1af]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-08d7f1af]{padding:18px 16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__otp[data-v-08d7f1af]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-08d7f1af]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:#5b616e}.auth__form[data-v-08d7f1af] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-08d7f1af]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-08d7f1af]:active{transform:scale(.99)}.auth__cta[data-v-08d7f1af]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-08d7f1af]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-08d7f1af]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:#14161a}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.auth[data-v-23baea3e]{background:#fff;min-height:100vh}.auth__body[data-v-23baea3e]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-23baea3e]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-23baea3e]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-23baea3e]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-23baea3e]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-23baea3e]{padding:18px 16px 20px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__form[data-v-23baea3e] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-23baea3e]{width:100%;margin-top:4px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.auth__cta[data-v-23baea3e]:active{transform:scale(.99)}.auth__switch[data-v-23baea3e]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-23baea3e]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}
.otp-single-input{display:flex;align-items:center}.auth[data-v-c130183b]{background:#fff;min-height:100vh}.auth__body[data-v-c130183b]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-c130183b]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-c130183b]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-c130183b]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-c130183b]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-c130183b]{padding:18px 16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__otp[data-v-c130183b]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-c130183b]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:#5b616e}.auth__form[data-v-c130183b] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-c130183b]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-c130183b]:active{transform:scale(.99)}.auth__cta[data-v-c130183b]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-c130183b]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-c130183b]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:#14161a}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.auth[data-v-23baea3e]{background:#fff;min-height:100vh}.auth__body[data-v-23baea3e]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-23baea3e]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-23baea3e]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-23baea3e]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-23baea3e]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-23baea3e]{padding:18px 16px 20px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__form[data-v-23baea3e] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-23baea3e]{width:100%;margin-top:4px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.auth__cta[data-v-23baea3e]:active{transform:scale(.99)}.auth__switch[data-v-23baea3e]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-23baea3e]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{d,f as o,c as i,l as a,u as c,y as P,z as S,n as b,A as k,j as v,e as y,g as u,p as B,B as C,C as E,s as p,F as L,r as I,I as N,b as V,h as $,v as A,_ as F}from"./index-B3AQ-Dpo.js";import{P as z}from"./PageBar-Cvyz5ex2.js";import{E as j,a as h}from"./Spinner.vue_vue_type_style_index_0_lang-DKSb2qK3.js";import{S as D}from"./SectionHead-DRSKiTQc.js";import{P as H}from"./ProductCard-BHhIGh81.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-Cz9mrv7p.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BrkU_j90.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CIIQfCa1.js";import"./cartStore-JeDfPEiX.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-DxJlISvB.js";import"./classCallCheck-Bg7rxoGt.js";const T={class:"flex justify-center items-center empty"},q=d({__name:"EmptyState",props:{description:{},image:{}},setup(e){return(t,s)=>(o(),i("div",T,[a(c(j),{description:"موردی یافت نشد",image:e.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),G="/assets/favoritEmpty-CIK7qR49.svg",K=d({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(e,{emit:t}){const s=t,n=P(),r=u(null);return S(r,()=>{s("fetch")},{distance:50}),(l,m)=>(o(),i("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:b({paddingTop:e.padding||c(n).headerHeight+"px"}),ref_key:"scrollArea",ref:r},[k(l.$slots,"default"),a(h,{cls:"my-[10px]",spinning:e.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),e.flag?(o(),v(q,{key:0,image:c(G)},null,8,["image"])):y("",!0)],4))}});function M(){const e=C({totalPages:0,productList:[],flag:!1});return{productsData:e,getProducts:async(s,n=!1)=>{if(!n){s.value=!0;try{e.productList=await B.listProducts(),e.flag=e.productList.length<1}catch(r){console.log(r)}finally{s.value=!1}}}}}const R={class:"newest"},Z={key:0,class:"newest__grid"},J={key:1,class:"newest__empty"},g=20,O=d({__name:"NewestView",setup(e){const{productsData:t,getProducts:s}=M(),n=u(!1),r=u(!1),l=u(g),m=$(()=>t.productList.slice(0,l.value));E(async()=>{await s(n,!1)});const w=async()=>{if(l.value<t.productList.length){l.value+=g;return}await s(r,!0)};return(Q,f)=>{const x=A("container");return o(),i("div",R,[a(z,{title:"جدیدترین محصولات","back-to":"home"}),a(h,{spinning:n.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[a(K,{class:"newest__scroll",loading:r.value,flag:c(t).flag,padding:"0px",onFetch:w},{default:p(()=>[a(x,{class:"newest__body"},{default:p(()=>[a(D,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),c(t).productList.length?(o(),i("div",Z,[(o(!0),i(L,null,I(m.value,_=>(o(),v(H,{key:_.id,value:_},null,8,["value"]))),128))])):n.value?y("",!0):(o(),i("section",J,[a(N,{icon:"vuesax-linear:box",size:"26"}),f[0]||(f[0]=V("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),ce=F(O,[["__scopeId","data-v-ecd416be"]]);export{ce as default};
-1
View File
@@ -1 +0,0 @@
import{d,f as o,c as i,l as a,u as c,x as P,y as S,n as b,z as k,j as v,e as y,g as u,A as B,B as E,q as p,F as C,r as L,I,b as N,h as V,s as $,_ as A}from"./index-CZjgV-Yn.js";import{P as F}from"./PageBar-Bkc2Ht1O.js";import{E as z,a as h}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as j}from"./SectionHead-CiwUIGKe.js";import{P as q}from"./ProductCard-Cd-G3dvx.js";import{a as D}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DS8wIDwN.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./cartStore-CoSoowuC.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";const H={class:"flex justify-center items-center empty"},T=d({__name:"EmptyState",props:{description:{},image:{}},setup(e){return(t,s)=>(o(),i("div",H,[a(c(z),{description:"موردی یافت نشد",image:e.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),G="/assets/favoritEmpty-CIK7qR49.svg",K=d({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(e,{emit:t}){const s=t,n=P(),r=u(null);return S(r,()=>{s("fetch")},{distance:50}),(l,m)=>(o(),i("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:b({paddingTop:e.padding||c(n).headerHeight+"px"}),ref_key:"scrollArea",ref:r},[k(l.$slots,"default"),a(h,{cls:"my-[10px]",spinning:e.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),e.flag?(o(),v(T,{key:0,image:c(G)},null,8,["image"])):y("",!0)],4))}});function M(){const e=B({totalPages:0,productList:[],flag:!1});return{productsData:e,getProducts:async(s,n=!1)=>{if(!n){s.value=!0;try{e.productList=await D.listProducts(),e.flag=e.productList.length<1}catch(r){console.log(r)}finally{s.value=!1}}}}}const R={class:"newest"},Z={key:0,class:"newest__grid"},J={key:1,class:"newest__empty"},g=20,O=d({__name:"NewestView",setup(e){const{productsData:t,getProducts:s}=M(),n=u(!1),r=u(!1),l=u(g),m=V(()=>t.productList.slice(0,l.value));E(async()=>{await s(n,!1)});const w=async()=>{if(l.value<t.productList.length){l.value+=g;return}await s(r,!0)};return(Q,f)=>{const x=$("container");return o(),i("div",R,[a(F,{title:"جدیدترین محصولات","back-to":"home"}),a(h,{spinning:n.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[a(K,{class:"newest__scroll",loading:r.value,flag:c(t).flag,padding:"0px",onFetch:w},{default:p(()=>[a(x,{class:"newest__body"},{default:p(()=>[a(j,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),c(t).productList.length?(o(),i("div",Z,[(o(!0),i(C,null,L(m.value,_=>(o(),v(q,{key:_.id,value:_},null,8,["value"]))),128))])):n.value?y("",!0):(o(),i("section",J,[a(I,{icon:"vuesax-linear:box",size:"26"}),f[0]||(f[0]=N("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),ue=A(O,[["__scopeId","data-v-ecd416be"]]);export{ue as default};
@@ -1 +1 @@
import{d as a,c as n,l as o,q as i,s as c,f as _,b as e,I as r,_ as f}from"./index-CZjgV-Yn.js";import{P as l}from"./PageBar-Bkc2Ht1O.js";const p={class:"notif"},d={class:"notif__empty"},m=a({__name:"NotificationsView",setup(u){return(x,t)=>{const s=c("container");return _(),n("div",p,[o(l,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",d,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),N=f(m,[["__scopeId","data-v-44d0c9a5"]]);export{N as default};
import{d as a,c as n,l as o,s as i,v as c,f as _,b as e,I as r,_ as f}from"./index-B3AQ-Dpo.js";import{P as l}from"./PageBar-Cvyz5ex2.js";const p={class:"notif"},d={class:"notif__empty"},m=a({__name:"NotificationsView",setup(u){return(v,t)=>{const s=c("container");return _(),n("div",p,[o(l,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",d,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),N=f(m,[["__scopeId","data-v-44d0c9a5"]]);export{N as default};
@@ -1 +1 @@
import{d as r,k as n,ah as p,ai as f,aj as h,ak as w,al as y,am as k,a6 as x,an as c,a5 as g,ad as N,G as S,i as V,c as v,u as P,n as _,q as b,b as l,I as B,A as I,D as z,t as C,f as O,g as D}from"./index-CBZSLIgu.js";const[T,U]=g("notify"),j=["lockScroll","position","show","teleport","zIndex"],q=w({},y,{type:c("danger"),color:String,message:x,position:c("top"),className:k,background:String,lockScroll:Boolean});var A=r({name:T,props:q,emits:["update:show"],setup(e,{emit:o,slots:t}){const a=s=>o("update:show",s);return()=>n(h,p({class:[U([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,duration:.2,"onUpdate:show":a},f(e,j)),{default:()=>[t.default?t.default():e.message]})}});const E=N(A),G={key:0,class:"flex"},$={class:"w-full text-white my-2"},F={class:"w-full flex content-end"},J=r({__name:"NotifyVant",props:{modelValue:{type:Boolean},timeOut:{},text:{},color:{}},emits:["update:modelValue"],setup(e,{emit:o}){const t=D(!0),a=e,s=o;S(()=>a.modelValue,()=>{a.timeOut!==-1&&u()});const u=()=>{setTimeout(()=>{s("update:modelValue",!1)},a.timeOut)};return(d,i)=>e.modelValue?(V(),v("div",G,[n(P(E),{show:t.value,"onUpdate:show":i[0]||(i[0]=m=>t.value=m),style:_(e.color)},{default:b(()=>[l("div",$,[l("div",F,[n(B,{icon:"vuesax-linear:info-circle",class:"ml-[20px] text-white",size:"25"}),l("div",null,[I(d.$slots,"default",{},()=>[z(C(e.text),1)])])])])]),_:3},8,["show","style"])])):O("",!0)}});export{J as _};
import{d as r,l as n,ah as p,ai as f,aj as h,ak as w,al as y,am as x,a6 as g,an as i,a5 as k,ad as N,G as S,f as V,c as v,u as P,n as _,s as b,b as l,I as B,A as I,D as z,t as C,e as O,g as D}from"./index-B3AQ-Dpo.js";const[T,U]=k("notify"),j=["lockScroll","position","show","teleport","zIndex"],A=w({},y,{type:i("danger"),color:String,message:g,position:i("top"),className:x,background:String,lockScroll:Boolean});var E=r({name:T,props:A,emits:["update:show"],setup(e,{emit:o,slots:t}){const a=s=>o("update:show",s);return()=>n(h,p({class:[U([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,duration:.2,"onUpdate:show":a},f(e,j)),{default:()=>[t.default?t.default():e.message]})}});const G=N(E),$={key:0,class:"flex"},q={class:"w-full text-white my-2"},F={class:"w-full flex content-end"},J=r({__name:"NotifyVant",props:{modelValue:{type:Boolean},timeOut:{},text:{},color:{}},emits:["update:modelValue"],setup(e,{emit:o}){const t=D(!0),a=e,s=o;S(()=>a.modelValue,()=>{a.timeOut!==-1&&u()});const u=()=>{setTimeout(()=>{s("update:modelValue",!1)},a.timeOut)};return(d,c)=>e.modelValue?(V(),v("div",$,[n(P(G),{show:t.value,"onUpdate:show":c[0]||(c[0]=m=>t.value=m),style:_(e.color)},{default:b(()=>[l("div",q,[l("div",F,[n(B,{icon:"vuesax-linear:info-circle",class:"ml-[20px] text-white",size:"25"}),l("div",null,[I(d.$slots,"default",{},()=>[z(C(e.text),1)])])])])]),_:3},8,["show","style"])])):O("",!0)}});export{J as _};
@@ -1 +0,0 @@
import{d as r,l as n,ag as p,ah as f,ai as h,aj as w,ak as y,al as g,a5 as x,am as i,a4 as k,ac as N,E as S,f as V,c as v,u as P,n as _,q as b,b as l,I as B,z as I,C as z,t as C,e as O,g as E}from"./index-CZjgV-Yn.js";const[T,U]=k("notify"),j=["lockScroll","position","show","teleport","zIndex"],q=w({},y,{type:i("danger"),color:String,message:x,position:i("top"),className:g,background:String,lockScroll:Boolean});var D=r({name:T,props:q,emits:["update:show"],setup(e,{emit:o,slots:t}){const a=s=>o("update:show",s);return()=>n(h,p({class:[U([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,duration:.2,"onUpdate:show":a},f(e,j)),{default:()=>[t.default?t.default():e.message]})}});const $=N(D),A={key:0,class:"flex"},F={class:"w-full text-white my-2"},G={class:"w-full flex content-end"},J=r({__name:"NotifyVant",props:{modelValue:{type:Boolean},timeOut:{},text:{},color:{}},emits:["update:modelValue"],setup(e,{emit:o}){const t=E(!0),a=e,s=o;S(()=>a.modelValue,()=>{a.timeOut!==-1&&u()});const u=()=>{setTimeout(()=>{s("update:modelValue",!1)},a.timeOut)};return(d,c)=>e.modelValue?(V(),v("div",A,[n(P($),{show:t.value,"onUpdate:show":c[0]||(c[0]=m=>t.value=m),style:_(e.color)},{default:b(()=>[l("div",F,[l("div",G,[n(B,{icon:"vuesax-linear:info-circle",class:"ml-[20px] text-white",size:"25"}),l("div",null,[I(d.$slots,"default",{},()=>[z(C(e.text),1)])])])])]),_:3},8,["show","style"])])):O("",!0)}});export{J as _};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{d as _,c as s,b as a,k as d,I as b,t as u,A as i,i as t,x as p,_ as k}from"./index-CBZSLIgu.js";const h={class:"bar"},f={class:"bar__inner"},m={key:1,class:"bar__spacer","aria-hidden":"true"},B={class:"bar__title"},g={class:"bar__trailing"},v=_({__name:"PageBar",props:{title:{},back:{type:Boolean,default:!0},backTo:{}},setup(e){const o=e,r=p();function l(){o.backTo?r.push({name:o.backTo}):r.back()}return(n,c)=>(t(),s("header",h,[a("div",f,[e.back?(t(),s("button",{key:0,type:"button",class:"bar__btn","aria-label":"بازگشت",onClick:l},[d(b,{icon:"vuesax-linear:arrow-right-1",size:"20"})])):(t(),s("span",m)),a("h1",B,u(e.title),1),a("div",g,[i(n.$slots,"trailing",{},()=>[c[0]||(c[0]=a("span",{class:"bar__spacer","aria-hidden":"true"},null,-1))],!0)])]),i(n.$slots,"below",{},void 0,!0)]))}}),x=k(v,[["__scopeId","data-v-d2d3dfeb"]]);export{x as P};
import{d as _,c as s,b as a,l as d,I as b,t as u,A as i,f as t,x as p,_ as k}from"./index-B3AQ-Dpo.js";const h={class:"bar"},f={class:"bar__inner"},m={key:1,class:"bar__spacer","aria-hidden":"true"},B={class:"bar__title"},g={class:"bar__trailing"},v=_({__name:"PageBar",props:{title:{},back:{type:Boolean,default:!0},backTo:{}},setup(e){const o=e,r=p();function l(){o.backTo?r.push({name:o.backTo}):r.back()}return(n,c)=>(t(),s("header",h,[a("div",f,[e.back?(t(),s("button",{key:0,type:"button",class:"bar__btn","aria-label":"بازگشت",onClick:l},[d(b,{icon:"vuesax-linear:arrow-right-1",size:"20"})])):(t(),s("span",m)),a("h1",B,u(e.title),1),a("div",g,[i(n.$slots,"trailing",{},()=>[c[0]||(c[0]=a("span",{class:"bar__spacer","aria-hidden":"true"},null,-1))],!0)])]),i(n.$slots,"below",{},void 0,!0)]))}}),x=k(v,[["__scopeId","data-v-d2d3dfeb"]]);export{x as P};
@@ -1 +1 @@
import{d as F,k as D,f as t,c as a,F as P,b as o,u as e,w as S,l as p,I as h,X as z,i as N,e as c,t as _,C as V,q as I,j as q,g as E,_ as O}from"./index-CZjgV-Yn.js";import{a as U,S as $}from"./SingleProduct-DS8wIDwN.js";import{u as j}from"./cartStore-CoSoowuC.js";import{D as L}from"./index-Ca8ka09f.js";const M={class:"pc__art"},T=["alt"],X={key:1,class:"pc__artEmpty","aria-hidden":"true"},A=["aria-label"],G={key:2,class:"pc__flag"},H={key:3,class:"pc__flag pc__flag--soft"},J={class:"pc__title"},K={class:"pc__weight"},Q={key:0,class:"pc__meta"},R={key:0,class:"pc__wageOld"},W={class:"pc__wage"},Y=F({__name:"ProductCard",props:{value:{},wageBefore:{}},setup(d){const w=d,r=U(),{image:v,id:i,title:f,min_gram:y,wage:m,is_exist:k,qty:b,isPreOrder:x}=j(w.value),l=E(!1);function C(){l.value=!0}function g(n){return n%1===0?String(n):n.toFixed(2)}return(n,s)=>{const B=D("lazy");return t(),a(P,null,[o("article",{class:"pc",onClick:C},[o("div",M,[e(v)?S((t(),a("img",{key:0,alt:e(f)},null,8,T)),[[B,e(v)]]):(t(),a("div",X,[p(h,{icon:"vuesax-linear:diamonds",size:"26"})])),o("button",{type:"button",class:N(["pc__fav",{"is-on":e(r).isFavorite(e(i))}]),"aria-label":e(r).isFavorite(e(i))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:s[0]||(s[0]=z(u=>e(r).toggle(e(i)),["stop"]))},[p(h,{icon:e(r).isFavorite(e(i))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,A),e(k)?e(x)&&e(b)===0?(t(),a("span",H,"پیش‌سفارش")):c("",!0):(t(),a("span",G,"ناموجود"))]),o("h3",J,_(e(f)),1),o("p",K,[V(_(e(y))+" ",1),s[3]||(s[3]=o("span",{class:"pc__weightUnit"},"گرم",-1))]),e(m)!=null?(t(),a("div",Q,[d.wageBefore!=null?(t(),a("span",R,"اجرت "+_(g(d.wageBefore))+"٪",1)):c("",!0),o("span",W,_(g(e(m)))+"٪ اجرت",1)])):c("",!0)]),p(e(L),{visible:l.value,"onUpdate:visible":s[2]||(s[2]=u=>l.value=u),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:I(()=>[l.value?(t(),q($,{id:e(i),key:e(i),onCloseDrawer:s[1]||(s[1]=u=>l.value=!1)},null,8,["id"])):c("",!0)]),_:1},8,["visible"])],64)}}}),ae=O(Y,[["__scopeId","data-v-ed785ed2"]]);export{ae as P};
import{d as D,k as F,f as t,c as a,F as P,b as o,u as e,w as S,l as p,I as h,Y as z,i as N,e as c,t as _,D as V,s as I,j as E,g as O,_ as U}from"./index-B3AQ-Dpo.js";import{a as $,S as j}from"./SingleProduct-Cz9mrv7p.js";import{u as q}from"./cartStore-JeDfPEiX.js";import{D as L}from"./index-DxJlISvB.js";const M={class:"pc__art"},T=["alt"],Y={key:1,class:"pc__artEmpty","aria-hidden":"true"},A=["aria-label"],G={key:2,class:"pc__flag"},H={key:3,class:"pc__flag pc__flag--soft"},J={class:"pc__title"},K={class:"pc__weight"},Q={key:0,class:"pc__meta"},R={key:0,class:"pc__wageOld"},W={class:"pc__wage"},X=D({__name:"ProductCard",props:{value:{},wageBefore:{}},setup(d){const w=d,r=$(),{image:v,id:i,title:f,min_gram:y,wage:m,is_exist:k,qty:b,isPreOrder:x}=q(w.value),l=O(!1);function C(){l.value=!0}function g(n){return n%1===0?String(n):n.toFixed(2)}return(n,s)=>{const B=F("lazy");return t(),a(P,null,[o("article",{class:"pc",onClick:C},[o("div",M,[e(v)?S((t(),a("img",{key:0,alt:e(f)},null,8,T)),[[B,e(v)]]):(t(),a("div",Y,[p(h,{icon:"vuesax-linear:diamonds",size:"26"})])),o("button",{type:"button",class:N(["pc__fav",{"is-on":e(r).isFavorite(e(i))}]),"aria-label":e(r).isFavorite(e(i))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:s[0]||(s[0]=z(u=>e(r).toggle(e(i)),["stop"]))},[p(h,{icon:e(r).isFavorite(e(i))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,A),e(k)?e(x)&&e(b)===0?(t(),a("span",H,"پیش‌سفارش")):c("",!0):(t(),a("span",G,"ناموجود"))]),o("h3",J,_(e(f)),1),o("p",K,[V(_(e(y))+" ",1),s[3]||(s[3]=o("span",{class:"pc__weightUnit"},"گرم",-1))]),e(m)!=null?(t(),a("div",Q,[d.wageBefore!=null?(t(),a("span",R,"اجرت "+_(g(d.wageBefore))+"٪",1)):c("",!0),o("span",W,_(g(e(m)))+"٪ اجرت",1)])):c("",!0)]),p(e(L),{visible:l.value,"onUpdate:visible":s[2]||(s[2]=u=>l.value=u),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:I(()=>[l.value?(t(),E(j,{id:e(i),key:e(i),onCloseDrawer:s[1]||(s[1]=u=>l.value=!1)},null,8,["id"])):c("",!0)]),_:1},8,["visible"])],64)}}}),ae=U(X,[["__scopeId","data-v-ed785ed2"]]);export{ae as P};
-1
View File
@@ -1 +0,0 @@
import{d as I,D as S,o as E,c as a,l,q as y,g as p,s as V,f as i,b as e,I as f,t,e as _,i as b,h as k,_ as h}from"./index-CZjgV-Yn.js";import{P as C}from"./PageBar-Bkc2Ht1O.js";import{S as N}from"./SectionHead-CiwUIGKe.js";import{a as T}from"./client-WIBW0tF5.js";const g={class:"prof"},B={class:"prof__identity"},D={class:"prof__avatar","aria-hidden":"true"},P={class:"prof__name"},x={key:0,class:"prof__mobile"},R={key:0,class:"prof__block"},w={class:"prof__specs"},F={class:"prof__spec"},z={class:"prof__spec"},M={class:"prof__spec"},O={class:"prof__spec"},U={key:1,class:"prof__empty"},A=I({__name:"ProfileView",setup(L){const c={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده"},u=S(),s=p(null),n=p(!1),v=k(()=>{var r;return((r=s.value)==null?void 0:r.verificationStep)==="VERIFIED"});return E(async()=>{if(u.customerId){n.value=!0;try{s.value=await T.getCustomer(u.customerId)}finally{n.value=!1}}}),(r,o)=>{const m=V("container");return i(),a("div",g,[l(C,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),l(m,{class:"prof__body"},{default:y(()=>{var d;return[e("section",B,[e("div",D,[l(f,{icon:"vuesax-linear:user",size:"30"})]),e("h2",P,t(((d=s.value)==null?void 0:d.fullName)??"—"),1),s.value?(i(),a("p",x,t(s.value.mobile),1)):_("",!0),s.value?(i(),a("span",{key:1,class:b(["prof__seal",v.value?"is-ok":"is-pending"])},t(c[s.value.verificationStep]??s.value.verificationStep),3)):_("",!0)]),s.value?(i(),a("section",R,[l(N,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",w,[e("div",F,[o[0]||(o[0]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,t(s.value.fullName),1)]),e("div",z,[o[1]||(o[1]=e("dt",null,"تلفن همراه",-1)),e("dd",null,t(s.value.mobile),1)]),e("div",M,[o[2]||(o[2]=e("dt",null,"کد ملی",-1)),e("dd",null,t(s.value.nationalCode),1)]),e("div",O,[o[3]||(o[3]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,t(c[s.value.verificationStep]??s.value.verificationStep),1)])])])):n.value?_("",!0):(i(),a("section",U,[l(f,{icon:"vuesax-linear:user",size:"26"}),o[4]||(o[4]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))]))]}),_:1})])}}}),G=h(A,[["__scopeId","data-v-7c544fc5"]]);export{G as default};
+1
View File
@@ -0,0 +1 @@
import{d as S,E,o as I,p as y,c as a,l,s as b,g as c,v as V,f as i,b as e,I as p,t,e as _,i as g,h as k,_ as h}from"./index-B3AQ-Dpo.js";import{P as N}from"./PageBar-Cvyz5ex2.js";import{S as T}from"./SectionHead-DRSKiTQc.js";const B={class:"prof"},C={class:"prof__identity"},P={class:"prof__avatar","aria-hidden":"true"},x={class:"prof__name"},D={key:0,class:"prof__mobile"},R={key:0,class:"prof__block"},w={class:"prof__specs"},F={class:"prof__spec"},M={class:"prof__spec"},z={class:"prof__spec"},L={class:"prof__spec"},O={key:1,class:"prof__empty"},U=S({__name:"ProfileView",setup(A){const d={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده"},f=E(),s=c(null),n=c(!1),v=k(()=>{var r;return((r=s.value)==null?void 0:r.verificationStep)==="VERIFIED"});return I(async()=>{if(f.isLoggedIn){n.value=!0;try{s.value=await y.getMe()}finally{n.value=!1}}}),(r,o)=>{const m=V("container");return i(),a("div",B,[l(N,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),l(m,{class:"prof__body"},{default:b(()=>{var u;return[e("section",C,[e("div",P,[l(p,{icon:"vuesax-linear:user",size:"30"})]),e("h2",x,t(((u=s.value)==null?void 0:u.fullName)??"—"),1),s.value?(i(),a("p",D,t(s.value.mobile),1)):_("",!0),s.value?(i(),a("span",{key:1,class:g(["prof__seal",v.value?"is-ok":"is-pending"])},t(d[s.value.verificationStep]??s.value.verificationStep),3)):_("",!0)]),s.value?(i(),a("section",R,[l(T,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",w,[e("div",F,[o[0]||(o[0]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,t(s.value.fullName),1)]),e("div",M,[o[1]||(o[1]=e("dt",null,"تلفن همراه",-1)),e("dd",null,t(s.value.mobile),1)]),e("div",z,[o[2]||(o[2]=e("dt",null,"کد ملی",-1)),e("dd",null,t(s.value.nationalCode),1)]),e("div",L,[o[3]||(o[3]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,t(d[s.value.verificationStep]??s.value.verificationStep),1)])])])):n.value?_("",!0):(i(),a("section",O,[l(p,{icon:"vuesax-linear:user",size:"26"}),o[4]||(o[4]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))]))]}),_:1})])}}}),q=h(U,[["__scopeId","data-v-adfdabd9"]]);export{q as default};
-1
View File
@@ -1 +0,0 @@
.prof[data-v-7c544fc5]{background:#fff;min-height:100vh}.prof__body[data-v-7c544fc5]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-7c544fc5]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-7c544fc5]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-7c544fc5]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-7c544fc5]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-7c544fc5]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-7c544fc5]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-7c544fc5]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-7c544fc5]{margin-top:26px}.prof__specs[data-v-7c544fc5]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-7c544fc5]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-7c544fc5]:last-child{border-bottom:0}.prof__spec dt[data-v-7c544fc5]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-7c544fc5]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-7c544fc5]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-7c544fc5]{margin:0;font-size:12.5px}
+1
View File
@@ -0,0 +1 @@
.prof[data-v-adfdabd9]{background:#fff;min-height:100vh}.prof__body[data-v-adfdabd9]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-adfdabd9]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-adfdabd9]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-adfdabd9]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-adfdabd9]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-adfdabd9]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-adfdabd9]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-adfdabd9]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-adfdabd9]{margin-top:26px}.prof__specs[data-v-adfdabd9]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-adfdabd9]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-adfdabd9]:last-child{border-bottom:0}.prof__spec dt[data-v-adfdabd9]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-adfdabd9]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-adfdabd9]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-adfdabd9]{margin:0;font-size:12.5px}
@@ -1 +1 @@
import{p as n,j as d}from"./filters-CLL9nGZ2.js";import{d as l,c as s,i as u,b as a,C as m,t as i,u as c,e as _,h as v,f as r,_ as q}from"./index-CZjgV-Yn.js";const f={key:0,class:"rate-strip__value"},y={class:"rate-strip__num"},k={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},B=l({__name:"RateStrip",props:{quote:{},compact:{type:Boolean}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(C,e)=>(r(),s("div",{class:u(["rate-strip",{"is-empty":!t.quote,"rate-strip--compact":t.compact}])},[e[1]||(e[1]=a("div",{class:"rate-strip__label"},[a("span",{class:"rate-strip__dot","aria-hidden":"true"}),m(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),s("div",f,[a("span",y,i(c(n)(p.value)),1),e[0]||(e[0]=a("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),s("div",k,"در انتظار اعلام نرخ")),t.quote?(r(),s("div",x,i(c(d)(t.quote.quotedAt)),1)):_("",!0)],2))}}),h=q(B,[["__scopeId","data-v-0b16738e"]]);export{h as R};
import{p as n,j as d}from"./filters-CLL9nGZ2.js";import{d as l,c as s,i as u,b as a,D as m,t as i,u as c,e as _,h as v,f as r,_ as q}from"./index-B3AQ-Dpo.js";const f={key:0,class:"rate-strip__value"},y={class:"rate-strip__num"},k={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},B=l({__name:"RateStrip",props:{quote:{},compact:{type:Boolean}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(R,e)=>(r(),s("div",{class:u(["rate-strip",{"is-empty":!t.quote,"rate-strip--compact":t.compact}])},[e[1]||(e[1]=a("div",{class:"rate-strip__label"},[a("span",{class:"rate-strip__dot","aria-hidden":"true"}),m(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),s("div",f,[a("span",y,i(c(n)(p.value)),1),e[0]||(e[0]=a("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),s("div",k,"در انتظار اعلام نرخ")),t.quote?(r(),s("div",x,i(c(d)(t.quote.quotedAt)),1)):_("",!0)],2))}}),C=q(B,[["__scopeId","data-v-0b16738e"]]);export{C as R};
@@ -1 +1 @@
import{d as v,a1 as h,E as m,f as t,c as l,l as n,I as r,w as f,a2 as b,b as x,a3 as k,e as I,A as w,g as y,_ as C}from"./index-CZjgV-Yn.js";const S={class:"si"},V=["placeholder"],B=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=w({clear:!1}),e=y(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(N,o)=>(t(),l("div",S,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(x("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:k(s,["enter"])},null,40,V),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):I("",!0)]))}}),D=C(B,[["__scopeId","data-v-8ebd3183"]]);export{D as S};
import{d as v,a2 as h,G as m,f as t,c as l,l as n,I as r,w as f,a3 as b,b as x,a4 as k,e as I,B as w,g as y,_ as B}from"./index-B3AQ-Dpo.js";const C={class:"si"},S=["placeholder"],V=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=w({clear:!1}),e=y(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(N,o)=>(t(),l("div",C,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(x("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:k(s,["enter"])},null,40,S),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):I("",!0)]))}}),D=B(V,[["__scopeId","data-v-8ebd3183"]]);export{D as S};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{d as r,f as t,c as s,b as o,t as a,e as n,C as _,l as d,I as u,_ as b}from"./index-CZjgV-Yn.js";const m={class:"sec"},f={class:"sec__text"},x={class:"sec__title"},h={key:0,class:"sec__sub"},k=r({__name:"SectionHead",props:{title:{},subtitle:{},actionLabel:{}},emits:["action"],setup(e,{emit:i}){const l=i;return(p,c)=>(t(),s("header",m,[o("div",f,[o("h2",x,a(e.title),1),e.subtitle?(t(),s("p",h,a(e.subtitle),1)):n("",!0)]),e.actionLabel?(t(),s("button",{key:0,type:"button",class:"sec__action",onClick:c[0]||(c[0]=v=>l("action"))},[_(a(e.actionLabel)+" ",1),d(u,{icon:"vuesax-linear:arrow-left-2",size:"15"})])):n("",!0)]))}}),C=b(k,[["__scopeId","data-v-e5c65b7c"]]);export{C as S};
import{d as r,f as t,c as s,b as o,t as a,e as n,D as _,l as d,I as u,_ as b}from"./index-B3AQ-Dpo.js";const m={class:"sec"},f={class:"sec__text"},x={class:"sec__title"},h={key:0,class:"sec__sub"},k=r({__name:"SectionHead",props:{title:{},subtitle:{},actionLabel:{}},emits:["action"],setup(e,{emit:i}){const l=i;return(p,c)=>(t(),s("header",m,[o("div",f,[o("h2",x,a(e.title),1),e.subtitle?(t(),s("p",h,a(e.subtitle),1)):n("",!0)]),e.actionLabel?(t(),s("button",{key:0,type:"button",class:"sec__action",onClick:c[0]||(c[0]=v=>l("action"))},[_(a(e.actionLabel)+" ",1),d(u,{icon:"vuesax-linear:arrow-left-2",size:"15"})])):n("",!0)]))}}),N=b(k,[["__scopeId","data-v-e5c65b7c"]]);export{N as S};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as k,E as A,o as C,p as D,c as i,l as r,s as f,j as w,u as E,e as m,g as u,f as l,F as y,b as s,r as L,I as g,t as o,i as p,v as N,_ as M}from"./index-B3AQ-Dpo.js";import{P}from"./PageBar-Cvyz5ex2.js";import{a as O}from"./Spinner.vue_vue_type_style_index_0_lang-DKSb2qK3.js";import{S as B}from"./SectionHead-DRSKiTQc.js";import{j as R,p as U}from"./filters-CLL9nGZ2.js";import{D as I}from"./index-DxJlISvB.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./classCallCheck-Bg7rxoGt.js";const V={class:"tx"},$={class:"tx__list"},Y=["onClick"],j={class:"tx__main"},z={class:"tx__head"},F={class:"tx__kind"},G={key:0,class:"tx__note"},H={class:"tx__foot"},J={class:"tx__date"},K={key:1,class:"tx__empty"},Q={class:"sheet"},W={class:"sheet__specs"},q={class:"sheet__spec"},X={class:"sheet__spec"},Z={class:"sheet__spec"},ss={class:"sheet__spec"},es={class:"sheet__spec"},ts=k({__name:"TransactionsView",setup(os){const x={ORDER_STOCK:"سفارش",ORDER_PRE_ORDER:"سفارش ساخت",REPAYMENT_MELTED_GOLD:"طلای آب‌شده",REPAYMENT_TRANSFER:"حواله",REPAYMENT_CHEQUE:"چک",REPAYMENT_CASH:"پولی",WALLET_BONUS:"پاداش",ADJUSTMENT:"اصلاحیه"},T=A(),_=u(!1),d=u([]),v=u(!1),n=u(null),c=a=>a.direction==="CREDIT",h=a=>a.currency==="GOLD_GRAM"?`${a.amount} گرم`:`${U(a.amount)} ریال`,S=a=>{n.value=a,v.value=!0};return C(async()=>{if(T.isLoggedIn){_.value=!0;try{d.value=await D.getMyLedgerEntries()}finally{_.value=!1}}}),(a,e)=>{const b=N("container");return l(),i("div",V,[r(P,{title:"اسناد","back-to":"userPage::hasSubRoute"}),r(O,{spinning:_.value,tip:"درحال دریافت اطلاعات"},{default:f(()=>[r(b,{class:"tx__body"},{default:f(()=>[d.value.length?(l(),i(y,{key:0},[r(B,{title:"گردش حساب",subtitle:`${d.value.length} سند`},null,8,["subtitle"]),s("div",$,[(l(!0),i(y,null,L(d.value,t=>(l(),i("article",{key:t.id,class:"tx__row",onClick:ns=>S(t)},[s("span",{class:p(["tx__mark",c(t)?"is-in":"is-out"]),"aria-hidden":"true"},[r(g,{icon:c(t)?"vuesax-linear:arrow-down":"vuesax-linear:arrow-up",size:"16"},null,8,["icon"])],2),s("div",j,[s("div",z,[s("h3",F,o(x[t.sourceType]??t.sourceType),1),s("span",{class:p(["tx__amount",c(t)?"is-in":"is-out"])},o(h(t)),3)]),t.note?(l(),i("p",G,o(t.note),1)):m("",!0),s("div",H,[s("span",J,o(E(R)(t.createdAt)),1),s("span",{class:p(["tx__state",{"is-pending":!t.confirmed}])},o(t.confirmed?"تایید شده":"در انتظار تایید"),3)])])],8,Y))),128))])],64)):_.value?m("",!0):(l(),i("section",K,[r(g,{icon:"vuesax-linear:receipt-text",size:"26"}),e[1]||(e[1]=s("p",null,"سندی برای حساب شما ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"]),n.value?(l(),w(E(I),{key:0,visible:v.value,"onUpdate:visible":e[0]||(e[0]=t=>v.value=t),placement:"bottom",closable:!1,height:"420px",class:"rtl",bodyStyle:{padding:0}},{default:f(()=>[s("div",Q,[e[7]||(e[7]=s("h3",{class:"sheet__title"},"جزئیات سند",-1)),s("dl",W,[s("div",q,[e[2]||(e[2]=s("dt",null,"نوع سند",-1)),s("dd",null,o(x[n.value.sourceType]??n.value.sourceType),1)]),s("div",X,[e[3]||(e[3]=s("dt",null,"مبلغ",-1)),s("dd",{class:p(c(n.value)?"is-in":"is-out")},o(h(n.value)),3)]),s("div",Z,[e[4]||(e[4]=s("dt",null,"وضعیت",-1)),s("dd",null,o(n.value.confirmed?"تایید شده":"در انتظار تایید"),1)]),s("div",ss,[e[5]||(e[5]=s("dt",null,"تاریخ",-1)),s("dd",null,o(E(R)(n.value.createdAt)),1)]),s("div",es,[e[6]||(e[6]=s("dt",null,"توضیحات",-1)),s("dd",null,o(n.value.note||"—"),1)])])])]),_:1},8,["visible"])):m("",!0)])}}}),ps=M(ts,[["__scopeId","data-v-d21f0dcb"]]);export{ps as default};
@@ -0,0 +1 @@
.tx[data-v-d21f0dcb]{background:#fff;min-height:100vh}.tx__body[data-v-d21f0dcb]{padding-top:76px;padding-bottom:90px}.tx__list[data-v-d21f0dcb]{display:flex;flex-direction:column;gap:10px}.tx__row[data-v-d21f0dcb]{display:flex;gap:11px;padding:12px;cursor:pointer;background:#fff;border:1px solid #ECEDEF;border-radius:18px;transition:transform .18s ease}.tx__row[data-v-d21f0dcb]:active{transform:scale(.99)}.tx__mark[data-v-d21f0dcb]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center}.tx__mark.is-in[data-v-d21f0dcb]{color:#16a34a;background:#f0fdf4}.tx__mark.is-out[data-v-d21f0dcb]{color:#7a1b33;background:#fbf2f4}.tx__main[data-v-d21f0dcb]{flex:1;min-width:0}.tx__head[data-v-d21f0dcb]{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.tx__kind[data-v-d21f0dcb]{margin:0;font-size:13px;font-weight:700;color:#14161a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx__amount[data-v-d21f0dcb]{font-size:12.5px;font-weight:800;white-space:nowrap}.tx__amount.is-in[data-v-d21f0dcb]{color:#16a34a}.tx__amount.is-out[data-v-d21f0dcb]{color:#7a1b33}.tx__note[data-v-d21f0dcb]{margin:6px 0 0;font-size:11.5px;line-height:1.7;color:#5b616e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tx__foot[data-v-d21f0dcb]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.tx__date[data-v-d21f0dcb]{font-size:11px;color:#8a909c}.tx__state[data-v-d21f0dcb]{font-size:10.5px;font-weight:700;color:#5b616e}.tx__state.is-pending[data-v-d21f0dcb]{color:#916f48}.tx__empty[data-v-d21f0dcb]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.tx__empty p[data-v-d21f0dcb]{margin:0;font-size:12.5px}.sheet[data-v-d21f0dcb]{padding:18px 16px 22px}.sheet__title[data-v-d21f0dcb]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__specs[data-v-d21f0dcb]{margin:0;border:1px solid #ECEDEF;border-radius:16px;overflow:hidden}.sheet__spec[data-v-d21f0dcb]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #F4F5F6}.sheet__spec[data-v-d21f0dcb]:last-child{border-bottom:0}.sheet__spec dt[data-v-d21f0dcb]{margin:0;font-size:12px;color:#8a909c}.sheet__spec dd[data-v-d21f0dcb]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.sheet__spec dd.is-in[data-v-d21f0dcb]{color:#16a34a}.sheet__spec dd.is-out[data-v-d21f0dcb]{color:#7a1b33}
@@ -1 +0,0 @@
.tx[data-v-83b037a9]{background:#fff;min-height:100vh}.tx__body[data-v-83b037a9]{padding-top:76px;padding-bottom:90px}.tx__list[data-v-83b037a9]{display:flex;flex-direction:column;gap:10px}.tx__row[data-v-83b037a9]{display:flex;gap:11px;padding:12px;cursor:pointer;background:#fff;border:1px solid #ECEDEF;border-radius:18px;transition:transform .18s ease}.tx__row[data-v-83b037a9]:active{transform:scale(.99)}.tx__mark[data-v-83b037a9]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center}.tx__mark.is-in[data-v-83b037a9]{color:#16a34a;background:#f0fdf4}.tx__mark.is-out[data-v-83b037a9]{color:#7a1b33;background:#fbf2f4}.tx__main[data-v-83b037a9]{flex:1;min-width:0}.tx__head[data-v-83b037a9]{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.tx__kind[data-v-83b037a9]{margin:0;font-size:13px;font-weight:700;color:#14161a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx__amount[data-v-83b037a9]{font-size:12.5px;font-weight:800;white-space:nowrap}.tx__amount.is-in[data-v-83b037a9]{color:#16a34a}.tx__amount.is-out[data-v-83b037a9]{color:#7a1b33}.tx__note[data-v-83b037a9]{margin:6px 0 0;font-size:11.5px;line-height:1.7;color:#5b616e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tx__foot[data-v-83b037a9]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.tx__date[data-v-83b037a9]{font-size:11px;color:#8a909c}.tx__state[data-v-83b037a9]{font-size:10.5px;font-weight:700;color:#5b616e}.tx__state.is-pending[data-v-83b037a9]{color:#916f48}.tx__empty[data-v-83b037a9]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.tx__empty p[data-v-83b037a9]{margin:0;font-size:12.5px}.sheet[data-v-83b037a9]{padding:18px 16px 22px}.sheet__title[data-v-83b037a9]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__specs[data-v-83b037a9]{margin:0;border:1px solid #ECEDEF;border-radius:16px;overflow:hidden}.sheet__spec[data-v-83b037a9]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #F4F5F6}.sheet__spec[data-v-83b037a9]:last-child{border-bottom:0}.sheet__spec dt[data-v-83b037a9]{margin:0;font-size:12px;color:#8a909c}.sheet__spec dd[data-v-83b037a9]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.sheet__spec dd.is-in[data-v-83b037a9]{color:#16a34a}.sheet__spec dd.is-out[data-v-83b037a9]{color:#7a1b33}
@@ -1 +0,0 @@
import{d as k,D as A,o as C,c as i,l as r,q as f,j as D,u as m,e as E,g as u,f as l,F as R,b as s,r as w,I as T,t as o,i as p,s as N,_ as L}from"./index-CZjgV-Yn.js";import{P}from"./PageBar-Bkc2Ht1O.js";import{a as M}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as O}from"./SectionHead-CiwUIGKe.js";import{j as g,p as B}from"./filters-CLL9nGZ2.js";import{a as I}from"./client-WIBW0tF5.js";import{D as U}from"./index-Ca8ka09f.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./classCallCheck-BSDY9VEy.js";const V={class:"tx"},$={class:"tx__list"},Y=["onClick"],j={class:"tx__main"},z={class:"tx__head"},F={class:"tx__kind"},G={key:0,class:"tx__note"},H={class:"tx__foot"},q={class:"tx__date"},J={key:1,class:"tx__empty"},K={class:"sheet"},Q={class:"sheet__specs"},W={class:"sheet__spec"},X={class:"sheet__spec"},Z={class:"sheet__spec"},ss={class:"sheet__spec"},es={class:"sheet__spec"},ts=k({__name:"TransactionsView",setup(os){const x={ORDER_STOCK:"سفارش",ORDER_PRE_ORDER:"سفارش ساخت",REPAYMENT_MELTED_GOLD:"طلای آب‌شده",REPAYMENT_TRANSFER:"حواله",REPAYMENT_CHEQUE:"چک",REPAYMENT_CASH:"پولی",WALLET_BONUS:"پاداش",ADJUSTMENT:"اصلاحیه"},h=A(),_=u(!1),d=u([]),v=u(!1),n=u(null),c=a=>a.direction==="CREDIT",y=a=>a.currency==="GOLD_GRAM"?`${a.amount} گرم`:`${B(a.amount)} ریال`,S=a=>{n.value=a,v.value=!0};return C(async()=>{if(h.customerId){_.value=!0;try{d.value=await I.getLedgerEntries(h.customerId)}finally{_.value=!1}}}),(a,e)=>{const b=N("container");return l(),i("div",V,[r(P,{title:"اسناد","back-to":"userPage::hasSubRoute"}),r(M,{spinning:_.value,tip:"درحال دریافت اطلاعات"},{default:f(()=>[r(b,{class:"tx__body"},{default:f(()=>[d.value.length?(l(),i(R,{key:0},[r(O,{title:"گردش حساب",subtitle:`${d.value.length} سند`},null,8,["subtitle"]),s("div",$,[(l(!0),i(R,null,w(d.value,t=>(l(),i("article",{key:t.id,class:"tx__row",onClick:ns=>S(t)},[s("span",{class:p(["tx__mark",c(t)?"is-in":"is-out"]),"aria-hidden":"true"},[r(T,{icon:c(t)?"vuesax-linear:arrow-down":"vuesax-linear:arrow-up",size:"16"},null,8,["icon"])],2),s("div",j,[s("div",z,[s("h3",F,o(x[t.sourceType]??t.sourceType),1),s("span",{class:p(["tx__amount",c(t)?"is-in":"is-out"])},o(y(t)),3)]),t.note?(l(),i("p",G,o(t.note),1)):E("",!0),s("div",H,[s("span",q,o(m(g)(t.createdAt)),1),s("span",{class:p(["tx__state",{"is-pending":!t.confirmed}])},o(t.confirmed?"تایید شده":"در انتظار تایید"),3)])])],8,Y))),128))])],64)):_.value?E("",!0):(l(),i("section",J,[r(T,{icon:"vuesax-linear:receipt-text",size:"26"}),e[1]||(e[1]=s("p",null,"سندی برای حساب شما ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"]),n.value?(l(),D(m(U),{key:0,visible:v.value,"onUpdate:visible":e[0]||(e[0]=t=>v.value=t),placement:"bottom",closable:!1,height:"420px",class:"rtl",bodyStyle:{padding:0}},{default:f(()=>[s("div",K,[e[7]||(e[7]=s("h3",{class:"sheet__title"},"جزئیات سند",-1)),s("dl",Q,[s("div",W,[e[2]||(e[2]=s("dt",null,"نوع سند",-1)),s("dd",null,o(x[n.value.sourceType]??n.value.sourceType),1)]),s("div",X,[e[3]||(e[3]=s("dt",null,"مبلغ",-1)),s("dd",{class:p(c(n.value)?"is-in":"is-out")},o(y(n.value)),3)]),s("div",Z,[e[4]||(e[4]=s("dt",null,"وضعیت",-1)),s("dd",null,o(n.value.confirmed?"تایید شده":"در انتظار تایید"),1)]),s("div",ss,[e[5]||(e[5]=s("dt",null,"تاریخ",-1)),s("dd",null,o(m(g)(n.value.createdAt)),1)]),s("div",es,[e[6]||(e[6]=s("dt",null,"توضیحات",-1)),s("dd",null,o(n.value.note||"—"),1)])])])]),_:1},8,["visible"])):E("",!0)])}}}),vs=L(ts,[["__scopeId","data-v-83b037a9"]]);export{vs as default};
-1
View File
@@ -1 +0,0 @@
import{g as d,u as F,h as i,m as S}from"./index-CZjgV-Yn.js";import{a as P}from"./client-WIBW0tF5.js";function W(t){return!t||t.length===0?null:t.reduce((e,s)=>parseFloat(s.defaultWagePercent)<parseFloat(e.defaultWagePercent)?s:e)}function I(t,e){const s=d(t),r=i(()=>{var n,m;return(m=(n=s.value.images)==null?void 0:n[0])==null?void 0:m.url}),o=i(()=>s.value.id),u=i(()=>s.value.title),l=i(()=>s.value.variants),a=d(e??W(F(l))),v=i(()=>a.value?parseFloat(a.value.rashWeightGrams):0),g=i(()=>a.value?parseFloat(a.value.defaultWagePercent):null),x=d(null),h=i(()=>{var n;return((n=a.value)==null?void 0:n.qty)??0}),f=i(()=>{var n;return((n=a.value)==null?void 0:n.isPreOrder)??!1}),y=i(()=>h.value>0||f.value),_=i(()=>s.value.productCode??null),C=d(!1);return{product:s,image:r,id:o,title:u,productCode:_,variants:l,selectedVariant:a,min_gram:v,wage:g,hasDiscountWage:x,qty:h,isPreOrder:f,is_exist:y,has_warranty:C}}const p="appCart";function q(){try{const t=localStorage.getItem(p);return t?JSON.parse(t):[]}catch{return[]}}function c(t){localStorage.setItem(p,JSON.stringify(t))}const G=S("cart",{state:()=>({items:q()}),actions:{async init(){try{const t=await P.listProducts(),e=[];for(const s of this.items){const r=t.find(u=>u.id===s.pid),o=r==null?void 0:r.variants.find(u=>u.id===s.vid);r&&o&&e.push({...s,product:r})}this.items=e,c(this.items)}catch(t){console.log(t)}},addToCart(t){const e=this.find_index(t);e===-1?this.items.push(t):(this.items[e].product=t.product,this.items[e].qty=t.qty),c(this.items)},remove(t){const e=this.find_index(t);e>-1&&this.items.splice(e,1),c(this.items)},updateFeild(t,e,s,r){if(!this.isInCart(s))return!1;const o=e??this.find_index(s);return this.items[o][r]=t,c(this.items),!0},find_index(t){return this.items.findIndex(e=>e.pid===t.pid&&e.vid===t.vid)},isInCart(t){return this.find_index(t)>-1},variant(t){return t.product.variants.find(e=>e.id===t.vid)},total(){return this.items.reduce((t,e)=>{const s=this.variant(e);return t+(s?parseFloat(s.rashWeightGrams)*e.qty:0)},0).toFixed(2)},clear(){this.items=[],c(this.items)}}});export{G as a,I as u};
+1
View File
@@ -0,0 +1 @@
import{g as d,u as F,h as i,m as S,p as P}from"./index-B3AQ-Dpo.js";function W(t){return!t||t.length===0?null:t.reduce((e,s)=>parseFloat(s.defaultWagePercent)<parseFloat(e.defaultWagePercent)?s:e)}function w(t,e){const s=d(t),r=i(()=>{var n,p;return(p=(n=s.value.images)==null?void 0:n[0])==null?void 0:p.url}),o=i(()=>s.value.id),u=i(()=>s.value.title),l=i(()=>s.value.variants),a=d(e??W(F(l))),v=i(()=>a.value?parseFloat(a.value.rashWeightGrams):0),g=i(()=>a.value?parseFloat(a.value.defaultWagePercent):null),x=d(null),h=i(()=>{var n;return((n=a.value)==null?void 0:n.qty)??0}),f=i(()=>{var n;return((n=a.value)==null?void 0:n.isPreOrder)??!1}),y=i(()=>h.value>0||f.value),_=i(()=>s.value.productCode??null),C=d(!1);return{product:s,image:r,id:o,title:u,productCode:_,variants:l,selectedVariant:a,min_gram:v,wage:g,hasDiscountWage:x,qty:h,isPreOrder:f,is_exist:y,has_warranty:C}}const m="appCart";function q(){try{const t=localStorage.getItem(m);return t?JSON.parse(t):[]}catch{return[]}}function c(t){localStorage.setItem(m,JSON.stringify(t))}const I=S("cart",{state:()=>({items:q()}),actions:{async init(){try{const t=await P.listProducts(),e=[];for(const s of this.items){const r=t.find(u=>u.id===s.pid),o=r==null?void 0:r.variants.find(u=>u.id===s.vid);r&&o&&e.push({...s,product:r})}this.items=e,c(this.items)}catch(t){console.log(t)}},addToCart(t){const e=this.find_index(t);e===-1?this.items.push(t):(this.items[e].product=t.product,this.items[e].qty=t.qty),c(this.items)},remove(t){const e=this.find_index(t);e>-1&&this.items.splice(e,1),c(this.items)},updateFeild(t,e,s,r){if(!this.isInCart(s))return!1;const o=e??this.find_index(s);return this.items[o][r]=t,c(this.items),!0},find_index(t){return this.items.findIndex(e=>e.pid===t.pid&&e.vid===t.vid)},isInCart(t){return this.find_index(t)>-1},variant(t){return t.product.variants.find(e=>e.id===t.vid)},total(){return this.items.reduce((t,e)=>{const s=this.variant(e);return t+(s?parseFloat(s.rashWeightGrams)*e.qty:0)},0).toFixed(2)},clear(){this.items=[],c(this.items)}}});export{I as a,w as u};
@@ -1 +1 @@
import{c as l}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";var f=function(n){return setTimeout(n,16)},c=function(n){return clearTimeout(n)};typeof window<"u"&&"requestAnimationFrame"in window&&(f=function(n){return window.requestAnimationFrame(n)},c=function(n){return window.cancelAnimationFrame(n)});var i=0,o=new Map;function u(e){o.delete(e)}function w(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;i+=1;var r=i;function a(t){if(t===0)u(r),e();else{var s=f(function(){a(t-1)});o.set(r,s)}}return a(n),r}w.cancel=function(e){var n=o.get(e);return u(n),c(n)};function m(e,n){for(var r=l({},e),a=0;a<n.length;a+=1){var t=n[a];delete r[t]}return r}function p(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}export{p as _,v as a,m as o,w};
import{c as l}from"./Spinner.vue_vue_type_style_index_0_lang-DKSb2qK3.js";var f=function(n){return setTimeout(n,16)},c=function(n){return clearTimeout(n)};typeof window<"u"&&"requestAnimationFrame"in window&&(f=function(n){return window.requestAnimationFrame(n)},c=function(n){return window.cancelAnimationFrame(n)});var i=0,o=new Map;function u(e){o.delete(e)}function w(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;i+=1;var r=i;function a(t){if(t===0)u(r),e();else{var s=f(function(){a(t-1)});o.set(r,s)}}return a(n),r}w.cancel=function(e){var n=o.get(e);return u(n),c(n)};function m(e,n){for(var r=l({},e),a=0;a<n.length;a+=1){var t=n[a];delete r[t]}return r}function p(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}export{p as _,v as a,m as o,w};
-1
View File
@@ -1 +0,0 @@
const a="/api";async function t(e,r){const s=await fetch(`${a}${e}`,{headers:{"Content-Type":"application/json"},...r});if(!s.ok){const o=await s.text();throw new Error(`API ${e} failed (${s.status}): ${o}`)}return s.json()}const c={listProducts:()=>t("/catalog/products"),listCustomers:()=>t("/customers"),getCustomer:e=>t(`/customers/${e}`),getBalance:e=>t(`/accounting/customers/${e}/balance`),getLedgerEntries:e=>t(`/customers/${e}/ledger-entries`),createOrder:e=>t("/orders",{method:"POST",body:JSON.stringify(e)}),getCustomerOrders:e=>t(`/customers/${e}/orders`),getLatestGoldPrice:(e=750)=>t(`/pricing/latest?karatPerMille=${e}`)};export{c as a};
+1
View File
@@ -0,0 +1 @@
import{a5 as y,d as L,a6 as $,a7 as w,G as A,a8 as B,l as c,g as D,B as N,L as p,a9 as G,q as I,aa as f,ab as M,ac as R,ad as U}from"./index-B3AQ-Dpo.js";const[Y,r,q]=y("pull-refresh"),x=50,C=["pulling","loosing","success"],F={disabled:Boolean,modelValue:Boolean,headHeight:f(x),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:$,successDuration:f(500),animationDuration:f(300)};var X=L({name:Y,props:F,emits:["change","refresh","update:modelValue"],setup(s,{emit:d,slots:o}){let u;const g=D(),T=D(),H=w(g),e=N({status:"normal",distance:0,duration:0}),i=R(),P=()=>{if(s.headHeight!==x)return{height:`${s.headHeight}px`}},h=()=>e.status!=="loading"&&e.status!=="success"&&!s.disabled,k=t=>{const a=+(s.pullDistance||s.headHeight);return t>a&&(t<a*2?t=a+(t-a)/2:t=a*1.5+(t-a*2)/4),Math.round(t)},n=(t,a)=>{const l=+(s.pullDistance||s.headHeight);e.distance=t,a?e.status="loading":t===0?e.status="normal":t<l?e.status="pulling":e.status="loosing",d("change",{status:e.status,distance:t})},m=()=>{const{status:t}=e;return t==="normal"?"":s[`${t}Text`]||q(t)},E=()=>{const{status:t,distance:a}=e;if(o[t])return o[t]({distance:a});const l=[];return C.includes(t)&&l.push(c("div",{class:r("text")},[m()])),t==="loading"&&l.push(c(p,{class:r("loading")},{default:m})),l},V=()=>{e.status="success",setTimeout(()=>{n(0)},+s.successDuration)},v=t=>{u=M(H.value)===0,u&&(e.duration=0,i.start(t))},b=t=>{h()&&v(t)},_=t=>{if(h()){u||v(t);const{deltaY:a}=i;i.move(t),u&&a.value>=0&&i.isVertical()&&(G(t),n(k(a.value)))}},S=()=>{u&&i.deltaY.value&&h()&&(e.duration=+s.animationDuration,e.status==="loosing"?(n(+s.headHeight,!0),d("update:modelValue",!0),I(()=>d("refresh"))):n(0))};return A(()=>s.modelValue,t=>{e.duration=+s.animationDuration,t?n(+s.headHeight,!0):o.success||s.successText?V():n(0,!1)}),B("touchmove",_,{target:T}),()=>{var t;const a={transitionDuration:`${e.duration}ms`,transform:e.distance?`translate3d(0,${e.distance}px, 0)`:""};return c("div",{ref:g,class:r()},[c("div",{ref:T,class:r("track"),style:a,onTouchstartPassive:b,onTouchend:S,onTouchcancel:S},[c("div",{class:r("head"),style:P()},[E()]),(t=o.default)==null?void 0:t.call(o)])])}}});const z=U(X);export{z as P};
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import{a4 as y,d as A,a5 as L,a6 as $,E as p,a7 as w,l as c,g as D,A as N,L as B,a8 as I,p as M,a9 as f,aa as R,ab as U,ac as Y}from"./index-CZjgV-Yn.js";const[C,r,F]=y("pull-refresh"),x=50,G=["pulling","loosing","success"],X={disabled:Boolean,modelValue:Boolean,headHeight:f(x),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:L,successDuration:f(500),animationDuration:f(300)};var j=A({name:C,props:X,emits:["change","refresh","update:modelValue"],setup(s,{emit:d,slots:o}){let u;const g=D(),T=D(),H=$(g),e=N({status:"normal",distance:0,duration:0}),i=U(),P=()=>{if(s.headHeight!==x)return{height:`${s.headHeight}px`}},h=()=>e.status!=="loading"&&e.status!=="success"&&!s.disabled,E=t=>{const a=+(s.pullDistance||s.headHeight);return t>a&&(t<a*2?t=a+(t-a)/2:t=a*1.5+(t-a*2)/4),Math.round(t)},n=(t,a)=>{const l=+(s.pullDistance||s.headHeight);e.distance=t,a?e.status="loading":t===0?e.status="normal":t<l?e.status="pulling":e.status="loosing",d("change",{status:e.status,distance:t})},m=()=>{const{status:t}=e;return t==="normal"?"":s[`${t}Text`]||F(t)},k=()=>{const{status:t,distance:a}=e;if(o[t])return o[t]({distance:a});const l=[];return G.includes(t)&&l.push(c("div",{class:r("text")},[m()])),t==="loading"&&l.push(c(B,{class:r("loading")},{default:m})),l},V=()=>{e.status="success",setTimeout(()=>{n(0)},+s.successDuration)},v=t=>{u=R(H.value)===0,u&&(e.duration=0,i.start(t))},b=t=>{h()&&v(t)},_=t=>{if(h()){u||v(t);const{deltaY:a}=i;i.move(t),u&&a.value>=0&&i.isVertical()&&(I(t),n(E(a.value)))}},S=()=>{u&&i.deltaY.value&&h()&&(e.duration=+s.animationDuration,e.status==="loosing"?(n(+s.headHeight,!0),d("update:modelValue",!0),M(()=>d("refresh"))):n(0))};return p(()=>s.modelValue,t=>{e.duration=+s.animationDuration,t?n(+s.headHeight,!0):o.success||s.successText?V():n(0,!1)}),w("touchmove",_,{target:T}),()=>{var t;const a={transitionDuration:`${e.duration}ms`,transform:e.distance?`translate3d(0,${e.distance}px, 0)`:""};return c("div",{ref:g,class:r()},[c("div",{ref:T,class:r("track"),style:a,onTouchstartPassive:b,onTouchend:S,onTouchcancel:S},[c("div",{class:r("head"),style:P()},[k()]),(t=o.default)==null?void 0:t.call(o)])])}}});const z=Y(j);export{z as P};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -9,7 +9,7 @@
<meta name="background-color" content="#1C2D56" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>طلای منتزر</title>
<script type="module" crossorigin src="/assets/index-CZjgV-Yn.js"></script>
<script type="module" crossorigin src="/assets/index-B3AQ-Dpo.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D-jEuKqG.css">
<link rel="manifest" href="/manifest.webmanifest"></head>
<body style="background-color: #1C2D56">
+1 -1
View File
File diff suppressed because one or more lines are too long
@@ -36,7 +36,13 @@
not last, to land there. Keep both steppers' DOM order in sync if
either one changes. -->
<div class="ci__qty">
<button type="button" class="ci__qtyBtn" aria-label="افزودن" @click="increment">
<button
type="button"
class="ci__qtyBtn"
aria-label="افزودن"
:disabled="!canIncrement"
@click="increment"
>
<Icon icon="vuesax-linear:add" size="16" />
</button>
<span class="ci__qtyValue">{{ value.qty }}</span>
@@ -77,7 +83,13 @@ const emit = defineEmits<{ (e: 'note', value: number): void }>()
const cart = useCartStore()
const index = cart.find_index(props.value)
// Stock ceiling, same rule as the product page: uncapped for a pre-order
// variant, otherwise limited to what is on hand. The store clamps as well.
const maxQty = computed(() => cart.maxQty(props.value))
const canIncrement = computed(() => maxQty.value === null || props.value.qty < maxQty.value)
const increment = () => {
if (!canIncrement.value) return
cart.updateFeild(props.value.qty + 1, index, props.value, 'qty')
}
const decrement = () => {
@@ -149,7 +149,8 @@
:key="item.id"
type="button"
class="pd__chip"
:class="{ 'is-on': selectedVariant?.id === item.id }"
:class="{ 'is-on': selectedVariant?.id === item.id, 'is-out': !isOrderable(item) }"
:disabled="!isOrderable(item)"
@click="selectedVariant = item"
>
{{ item.title }}
@@ -324,7 +325,7 @@ import GallerySlider from './GallerySlider.vue'
import Spinner from '../Spinner.vue'
import NotifyVant from '../NotifyVant.vue'
import DialogVant from '../DialogVant.vue'
import { useProduct } from '../../composables/useProduct'
import { useProduct, isVariantOrderable } from '../../composables/useProduct'
import { useProductDetail } from '../../composables/useProductDetail'
import { useFavoritesStore } from '../../stores/favoritesStore'
import { useFiltersStore } from '../../stores/filtersStore'
@@ -477,7 +478,14 @@ const inCart = computed(() => cart.isInCart(storeProduct.value))
const cartIndex = computed(() => cart.find_index(storeProduct.value))
const cartQty = computed(() => (cartIndex.value > -1 ? cart.items[cartIndex.value].qty : 0))
const increment = () => cart.updateFeild(cartQty.value + 1, cartIndex.value, storeProduct.value, 'qty')
// Stock ceiling: a pre-order variant may exceed what is on hand, anything else
// stops at its qty. The store clamps too — this just keeps the button honest.
const cartMaxQty = computed(() => cart.maxQty(storeProduct.value))
const canIncrement = computed(() => cartMaxQty.value === null || cartQty.value < cartMaxQty.value)
const increment = () => {
if (!canIncrement.value) return
cart.updateFeild(cartQty.value + 1, cartIndex.value, storeProduct.value, 'qty')
}
const decrement = () => {
if (cartQty.value <= 1) {
cart.remove(storeProduct.value)
@@ -486,8 +494,11 @@ const decrement = () => {
cart.updateFeild(cartQty.value - 1, cartIndex.value, storeProduct.value, 'qty')
}
const isOrderable = (v: Parameters<typeof isVariantOrderable>[0]) => isVariantOrderable(v)
const addToCart = () => {
cart.addToCart(storeProduct.value)
// The store refuses an un-orderable variant; only confirm when it accepted.
if (!cart.addToCart(storeProduct.value)) return
notify.value = true
}
@@ -1127,6 +1138,12 @@ onBeforeUnmount(() => {
background: @ink;
border-color: @ink;
}
/* Same treatment as v1's .pd__variant.is-out: an un-orderable weight stays
visible (so the customer can see it exists) but reads as unavailable. */
.pd__chip.is-out {
opacity: 0.45;
cursor: not-allowed;
}
/* ── Blocks ──────────────────────────────────────────────── */
.pd__block {
+12 -1
View File
@@ -21,9 +21,20 @@
import { computed, ref, unref, type Ref } from 'vue'
import type { ProductSummary, ProductVariantSummary } from '../api/client'
/** A variant can be ordered when it has stock, or when it is flagged pre-order. */
export function isVariantOrderable(v: ProductVariantSummary): boolean {
return (v.qty ?? 0) > 0 || Boolean(v.isPreOrder)
}
function getCheapestVariant(variants: ProductVariantSummary[] | undefined): ProductVariantSummary | null {
if (!variants || variants.length === 0) return null
return variants.reduce((cheapest, v) =>
// Prefer something the customer can actually order: defaulting to an
// out-of-stock variant means the page opens on a disabled button even though
// other weights are available. Falls back to the full list when nothing is
// orderable, so the page still shows a selection.
const pool = variants.filter(isVariantOrderable)
const candidates = pool.length ? pool : variants
return candidates.reduce((cheapest, v) =>
parseFloat(v.defaultWagePercent) < parseFloat(cheapest.defaultWagePercent) ? v : cheapest,
)
}
+38 -2
View File
@@ -54,13 +54,42 @@ export const useCartStore = defineStore('cart', {
}
},
addToCart(data: CartItem) {
// Refuse a variant that cannot be ordered — out of stock and not flagged
// pre-order. The same guard the admin cart applies (stores/cart.ts), kept
// here so it holds even if a caller forgets to disable its button.
const target = data.product?.variants?.find((v) => v.id === data.vid)
if (!target) return false
if (!((target.qty ?? 0) > 0 || target.isPreOrder)) return false
const index = this.find_index(data)
if (index === -1) this.items.push(data)
if (index === -1) this.items.push({ ...data, qty: this.capQty(data.qty, target) })
else {
this.items[index].product = data.product
this.items[index].qty = data.qty
this.items[index].qty = this.capQty(data.qty, target)
}
persist(this.items)
return true
},
/**
* Stock ceiling for a cart line. A pre-order variant is orderable beyond
* what is on hand (that is the point of pre-ordering), so it is uncapped;
* anything else stops at its on-hand quantity.
*/
capQty(want: number, variant: { qty?: number; isPreOrder?: boolean }) {
const n = Math.max(1, Math.floor(want) || 1)
if (variant.isPreOrder) return n
const max = variant.qty ?? 0
return max > 0 ? Math.min(n, max) : n
},
/** The ceiling for an item already in the cart; null when uncapped. */
maxQty(item: Pick<CartItem, 'pid' | 'vid'>) {
const i = this.find_index(item)
if (i === -1) return null
const v = this.variant(this.items[i])
if (!v || v.isPreOrder) return null
return (v.qty ?? 0) > 0 ? (v.qty as number) : null
},
remove(item: CartItem) {
const index = this.find_index(item)
@@ -72,6 +101,13 @@ export const useCartStore = defineStore('cart', {
updateFeild(value: unknown, index: number | null, item: Pick<CartItem, 'pid' | 'vid'>, field: keyof CartItem) {
if (!this.isInCart(item)) return false
const i = index ?? this.find_index(item)
// A quantity change is clamped to what is actually in stock (unless the
// variant is pre-orderable), so the ceiling holds no matter which screen
// drives the stepper.
if (field === 'qty') {
const v = this.variant(this.items[i])
value = v ? this.capQty(Number(value), v) : Math.max(1, Number(value) || 1)
}
;(this.items[i] as any)[field] = value
persist(this.items)
return true
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.ci[data-v-46d294a1]{display:flex;gap:14px;padding:16px;background:#fff;border:1px solid #ECEDEF;border-radius:18px}.ci__art[data-v-46d294a1]{flex:0 0 84px;width:84px;height:84px;display:flex;align-items:center;justify-content:center;border-radius:13px;overflow:hidden;background:#f4f5f6}.ci__art img[data-v-46d294a1]{width:90px;height:90px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}.ci__artEmpty[data-v-46d294a1]{width:100%;height:100%;display:grid;place-items:center;color:#8a909c}.ci__main[data-v-46d294a1]{flex:1;min-width:0}.ci__title[data-v-46d294a1]{margin:0;font-size:13px;font-weight:700;color:#14161a;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ci__meta[data-v-46d294a1]{display:flex;align-items:center;gap:7px;padding-top:5px}.ci__weight[data-v-46d294a1]{font-size:11.5px;font-weight:700;color:#22262e}.ci__wage[data-v-46d294a1]{font-size:10.5px;color:#8a909c;padding-inline-start:7px;border-inline-start:1px solid #ECEDEF}.ci__row[data-v-46d294a1]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px}.ci__qty[data-v-46d294a1]{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:999px;background:#f4f5f6;border:1px solid #ECEDEF}.ci__qtyBtn[data-v-46d294a1]{width:27px;height:27px;border:0;cursor:pointer;border-radius:50%;display:grid;place-items:center;color:#22262e;background:#fff;transition:transform .15s ease,color .15s ease}.ci__qtyBtn--danger[data-v-46d294a1]{color:#7a1b33}.ci__qtyBtn[data-v-46d294a1]:active{transform:scale(.9)}.ci__qtyValue[data-v-46d294a1]{min-width:22px;text-align:center;font-size:12.5px;font-weight:700;color:#14161a}.ci__note[data-v-46d294a1]{display:inline-flex;align-items:center;gap:5px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:#7a1b33;white-space:nowrap}.ci__noteText[data-v-46d294a1]{margin:8px 0 0;padding:8px 10px;border-radius:11px;background:#f4f5f6;font-size:11.5px;line-height:1.7;color:#5b616e}.cart[data-v-32f4b537]{background:#fff;min-height:100vh}.cart__body[data-v-32f4b537]{padding-top:76px;padding-bottom:150px}.cart__items[data-v-32f4b537]{display:flex;flex-direction:column;gap:11px;padding-top:16px}.cart__empty[data-v-32f4b537]{margin-top:8px;padding:38px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.cart__empty p[data-v-32f4b537]{margin:0;font-size:12.5px}.cart__emptyCta[data-v-32f4b537]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__done[data-v-32f4b537]{margin-top:20px;padding:34px 22px;border:1px solid #ECEDEF;border-radius:20px;display:flex;flex-direction:column;align-items:center;text-align:center}.cart__doneIcon[data-v-32f4b537]{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.cart__doneTitle[data-v-32f4b537]{margin:14px 0 0;font-size:15px;font-weight:800;color:#14161a}.cart__doneSub[data-v-32f4b537]{margin:8px 0 0;font-size:12.5px;color:#5b616e}.cart__doneSub b[data-v-32f4b537]{color:#14161a}.cart__doneHint[data-v-32f4b537]{margin:5px 0 0;font-size:11.5px;color:#8a909c}.cart__doneCta[data-v-32f4b537]{margin-top:18px;padding:11px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__bar[data-v-32f4b537]{position:fixed;bottom:0;left:0;right:0;z-index:5;background:#ffffffeb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid #ECEDEF;padding-bottom:66px}.cart__barInner[data-v-32f4b537]{max-width:768px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px}.cart__total[data-v-32f4b537]{display:flex;flex-direction:column;gap:3px}.cart__totalLabel[data-v-32f4b537]{font-size:11px;color:#8a909c}.cart__totalValue[data-v-32f4b537]{font-size:16px;font-weight:800;color:#14161a}.cart__totalValue i[data-v-32f4b537]{font-style:normal;font-size:11px;font-weight:600;color:#8a909c;padding-inline-start:3px}.cart__submit[data-v-32f4b537]{flex:1;max-width:200px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.cart__submit[data-v-32f4b537]:active{transform:scale(.98)}.sheet[data-v-32f4b537]{padding:18px 16px 22px}.sheet__title[data-v-32f4b537]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__cta[data-v-32f4b537]{width:100%;padding:12px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a}
.ci[data-v-52807f97]{display:flex;gap:14px;padding:16px;background:#fff;border:1px solid #ECEDEF;border-radius:18px}.ci__art[data-v-52807f97]{flex:0 0 84px;width:84px;height:84px;display:flex;align-items:center;justify-content:center;border-radius:13px;overflow:hidden;background:#f4f5f6}.ci__art img[data-v-52807f97]{width:90px;height:90px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}.ci__artEmpty[data-v-52807f97]{width:100%;height:100%;display:grid;place-items:center;color:#8a909c}.ci__main[data-v-52807f97]{flex:1;min-width:0}.ci__title[data-v-52807f97]{margin:0;font-size:13px;font-weight:700;color:#14161a;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ci__meta[data-v-52807f97]{display:flex;align-items:center;gap:7px;padding-top:5px}.ci__weight[data-v-52807f97]{font-size:11.5px;font-weight:700;color:#22262e}.ci__wage[data-v-52807f97]{font-size:10.5px;color:#8a909c;padding-inline-start:7px;border-inline-start:1px solid #ECEDEF}.ci__row[data-v-52807f97]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px}.ci__qty[data-v-52807f97]{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:999px;background:#f4f5f6;border:1px solid #ECEDEF}.ci__qtyBtn[data-v-52807f97]{width:27px;height:27px;border:0;cursor:pointer;border-radius:50%;display:grid;place-items:center;color:#22262e;background:#fff;transition:transform .15s ease,color .15s ease}.ci__qtyBtn--danger[data-v-52807f97]{color:#7a1b33}.ci__qtyBtn[data-v-52807f97]:active{transform:scale(.9)}.ci__qtyValue[data-v-52807f97]{min-width:22px;text-align:center;font-size:12.5px;font-weight:700;color:#14161a}.ci__note[data-v-52807f97]{display:inline-flex;align-items:center;gap:5px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:#7a1b33;white-space:nowrap}.ci__noteText[data-v-52807f97]{margin:8px 0 0;padding:8px 10px;border-radius:11px;background:#f4f5f6;font-size:11.5px;line-height:1.7;color:#5b616e}.cart[data-v-32f4b537]{background:#fff;min-height:100vh}.cart__body[data-v-32f4b537]{padding-top:76px;padding-bottom:150px}.cart__items[data-v-32f4b537]{display:flex;flex-direction:column;gap:11px;padding-top:16px}.cart__empty[data-v-32f4b537]{margin-top:8px;padding:38px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.cart__empty p[data-v-32f4b537]{margin:0;font-size:12.5px}.cart__emptyCta[data-v-32f4b537]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__done[data-v-32f4b537]{margin-top:20px;padding:34px 22px;border:1px solid #ECEDEF;border-radius:20px;display:flex;flex-direction:column;align-items:center;text-align:center}.cart__doneIcon[data-v-32f4b537]{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.cart__doneTitle[data-v-32f4b537]{margin:14px 0 0;font-size:15px;font-weight:800;color:#14161a}.cart__doneSub[data-v-32f4b537]{margin:8px 0 0;font-size:12.5px;color:#5b616e}.cart__doneSub b[data-v-32f4b537]{color:#14161a}.cart__doneHint[data-v-32f4b537]{margin:5px 0 0;font-size:11.5px;color:#8a909c}.cart__doneCta[data-v-32f4b537]{margin-top:18px;padding:11px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__bar[data-v-32f4b537]{position:fixed;bottom:0;left:0;right:0;z-index:5;background:#ffffffeb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid #ECEDEF;padding-bottom:66px}.cart__barInner[data-v-32f4b537]{max-width:768px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px}.cart__total[data-v-32f4b537]{display:flex;flex-direction:column;gap:3px}.cart__totalLabel[data-v-32f4b537]{font-size:11px;color:#8a909c}.cart__totalValue[data-v-32f4b537]{font-size:16px;font-weight:800;color:#14161a}.cart__totalValue i[data-v-32f4b537]{font-style:normal;font-size:11px;font-weight:600;color:#8a909c;padding-inline-start:3px}.cart__submit[data-v-32f4b537]{flex:1;max-width:200px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.cart__submit[data-v-32f4b537]:active{transform:scale(.98)}.sheet[data-v-32f4b537]{padding:18px 16px 22px}.sheet__title[data-v-32f4b537]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__cta[data-v-32f4b537]{width:100%;padding:12px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a}
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import{d as f,o as v,c as s,k as e,q as u,g as m,h as p,i as o,F as g,r as y,I as k,b as P,f as C,s as b,J as h,v as x,_ as B}from"./index-CBZSLIgu.js";import{P as V}from"./PageBar-BrfQrql1.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-DQwH-Xdy.js";import{S as I}from"./SectionHead-QOHixgma.js";import{P as N}from"./ProductCard-Dj_Eu2VB.js";import{a as q}from"./client-CJxy5iKa.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DssXZ7g8.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BZS-5R5g.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CINs34e0.js";import"./cartStore-CAFgxy6H.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-CUVFR_Bx.js";import"./classCallCheck-R2Fkn3Yh.js";const F={class:"coll"},S={key:0,class:"coll__grid"},z={key:1,class:"coll__empty"},E=f({__name:"CollectionView",setup(H){const l=h(),t=m(!1),n=m([]),d=p(()=>l.query.page||"مجموعه"),r=p(()=>n.value.filter(i=>i.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{t.value=!0;try{n.value=await q.listProducts()}finally{t.value=!1}}),(i,a)=>{const _=b("container");return o(),s("div",F,[e(V,{title:d.value,"back-to":"search"},null,8,["title"]),e(w,{spinning:t.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(_,{class:"coll__body"},{default:u(()=>[e(I,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),r.value.length?(o(),s("div",S,[(o(!0),s(g,null,y(r.value,c=>(o(),x(N,{key:c.id,value:c},null,8,["value"]))),128))])):t.value?C("",!0):(o(),s("section",z,[e(k,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=P("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),W=B(E,[["__scopeId","data-v-4e05d52b"]]);export{W as default};
+1
View File
@@ -0,0 +1 @@
import{d as f,o as v,q as g,c as s,k as e,s as u,g as p,h as d,i as t,F as y,r as k,I as P,b as x,f as C,v as b,K as h,x as B,_ as V}from"./index-DAH9biZS.js";import{P as w}from"./PageBar-LUK1_bA9.js";import{a as I}from"./Spinner.vue_vue_type_style_index_0_lang-V0MPrlo2.js";import{S as N}from"./SectionHead-C2_HAywN.js";import{P as q}from"./ProductCard-WOCas7tY.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-B-c1md76.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CDbw_NBZ.js";import"./DialogVant.vue_vue_type_style_index_0_lang-C5L98I2P.js";import"./cartStore-fT_Tbpm4.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-C1LmW9W3.js";import"./classCallCheck-CSZsSBLe.js";const F={class:"coll"},S={key:0,class:"coll__grid"},z={key:1,class:"coll__empty"},E=f({__name:"CollectionView",setup(H){const l=h(),o=p(!1),n=p([]),m=d(()=>l.query.page||"مجموعه"),i=d(()=>n.value.filter(r=>r.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{o.value=!0;try{n.value=await g.listProducts()}finally{o.value=!1}}),(r,a)=>{const _=b("container");return t(),s("div",F,[e(w,{title:m.value,"back-to":"search"},null,8,["title"]),e(I,{spinning:o.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(_,{class:"coll__body"},{default:u(()=>[e(N,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),i.value.length?(t(),s("div",S,[(t(!0),s(y,null,k(i.value,c=>(t(),B(q,{key:c.id,value:c},null,8,["value"]))),128))])):o.value?C("",!0):(t(),s("section",z,[e(P,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=x("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),U=V(E,[["__scopeId","data-v-4e05d52b"]]);export{U as default};
+1
View File
@@ -0,0 +1 @@
.dash[data-v-072e5edf]{background:#fff;min-height:100vh}.dash__bar[data-v-072e5edf]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffe0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid #ECEDEF}.dash__barInner[data-v-072e5edf]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__barTitle[data-v-072e5edf]{margin:0;font-size:14.5px;font-weight:800;color:#14161a}.dash__barBtn[data-v-072e5edf]{flex:0 0 auto;width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__barBtn[data-v-072e5edf]:active{transform:scale(.94)}.dash__barSpacer[data-v-072e5edf]{display:block;width:38px;height:38px}.dash__body[data-v-072e5edf]{padding-top:76px;padding-bottom:90px}.dash__balance[data-v-072e5edf]{padding:16px;border-radius:20px;background:#14161a;color:#fff;box-shadow:0 14px 30px -22px #14161af2}.dash__balanceHead[data-v-072e5edf]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__eyebrow[data-v-072e5edf]{font-size:11.5px;color:#ffffff9e}.dash__figure[data-v-072e5edf]{padding-top:5px;font-size:25px;font-weight:800;letter-spacing:-.3px}.dash__unit[data-v-072e5edf]{font-size:11.5px;font-weight:600;color:#ffffff9e;padding-inline-start:4px}.dash__seal[data-v-072e5edf]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__seal.is-debtor[data-v-072e5edf]{color:#fff;background:#a33c55}.dash__seal.is-creditor[data-v-072e5edf]{color:#14161a;background:#ffffffe6}.dash__balanceRow[data-v-072e5edf]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:13px;border-top:1px solid rgba(255,255,255,.13)}.dash__rowLabel[data-v-072e5edf]{font-size:11.5px;color:#ffffff9e}.dash__rowValue[data-v-072e5edf]{font-size:13.5px;font-weight:700}.dash__rowValue i[data-v-072e5edf]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__identity[data-v-072e5edf]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding-top:13px;border-top:1px solid rgba(255,255,255,.13)}.dash__name[data-v-072e5edf]{font-size:12.5px;font-weight:700}.dash__mobile[data-v-072e5edf]{font-size:11.5px;color:#ffffff9e;direction:ltr}.dash__invite[data-v-072e5edf]{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.dash__inviteIcon[data-v-072e5edf]{flex:0 0 42px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__inviteCopy[data-v-072e5edf]{flex:1;min-width:0}.dash__inviteCopy h3[data-v-072e5edf]{margin:0;font-size:13px;font-weight:800;color:#14161a}.dash__inviteCopy p[data-v-072e5edf]{margin:4px 0 0;font-size:11.5px;color:#8a909c}.dash__inviteCta[data-v-072e5edf]{flex:0 0 auto;padding:9px 14px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:700;color:#fff;background:#14161a}.dash__section[data-v-072e5edf]{margin-top:26px}.dash__grid[data-v-072e5edf]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.dash__tile[data-v-072e5edf]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 6px;border:1px solid #ECEDEF;border-radius:16px;cursor:pointer;background:#fff;font-family:inherit;transition:transform .18s ease}.dash__tile[data-v-072e5edf]:active{transform:scale(.97)}.dash__tile.is-disabled[data-v-072e5edf]{opacity:.4}.dash__tileIcon[data-v-072e5edf]{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#22262e;background:#f4f5f6}.dash__tileTitle[data-v-072e5edf]{font-size:11px;font-weight:700;color:#22262e}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.dash[data-v-a9e43f33]{background:#fff;min-height:100vh}.dash__bar[data-v-a9e43f33]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffe0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid #ECEDEF}.dash__barInner[data-v-a9e43f33]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__barTitle[data-v-a9e43f33]{margin:0;font-size:14.5px;font-weight:800;color:#14161a}.dash__barBtn[data-v-a9e43f33]{flex:0 0 auto;width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__barBtn[data-v-a9e43f33]:active{transform:scale(.94)}.dash__barSpacer[data-v-a9e43f33]{display:block;width:38px;height:38px}.dash__body[data-v-a9e43f33]{padding-top:76px;padding-bottom:90px}.dash__balance[data-v-a9e43f33]{padding:16px;border-radius:20px;background:#14161a;color:#fff;box-shadow:0 14px 30px -22px #14161af2}.dash__balanceHead[data-v-a9e43f33]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__eyebrow[data-v-a9e43f33]{font-size:11.5px;color:#ffffff9e}.dash__figure[data-v-a9e43f33]{padding-top:5px;font-size:25px;font-weight:800;letter-spacing:-.3px}.dash__unit[data-v-a9e43f33]{font-size:11.5px;font-weight:600;color:#ffffff9e;padding-inline-start:4px}.dash__seal[data-v-a9e43f33]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__seal.is-debtor[data-v-a9e43f33]{color:#fff;background:#a33c55}.dash__seal.is-creditor[data-v-a9e43f33]{color:#14161a;background:#ffffffe6}.dash__balanceRow[data-v-a9e43f33]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:13px;border-top:1px solid rgba(255,255,255,.13)}.dash__rowLabel[data-v-a9e43f33]{font-size:11.5px;color:#ffffff9e}.dash__rowValue[data-v-a9e43f33]{font-size:13.5px;font-weight:700}.dash__rowValue i[data-v-a9e43f33]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__identity[data-v-a9e43f33]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding-top:13px;border-top:1px solid rgba(255,255,255,.13)}.dash__name[data-v-a9e43f33]{font-size:12.5px;font-weight:700}.dash__mobile[data-v-a9e43f33]{font-size:11.5px;color:#ffffff9e;direction:ltr}.dash__invite[data-v-a9e43f33]{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.dash__inviteIcon[data-v-a9e43f33]{flex:0 0 42px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__inviteCopy[data-v-a9e43f33]{flex:1;min-width:0}.dash__inviteCopy h3[data-v-a9e43f33]{margin:0;font-size:13px;font-weight:800;color:#14161a}.dash__inviteCopy p[data-v-a9e43f33]{margin:4px 0 0;font-size:11.5px;color:#8a909c}.dash__inviteCta[data-v-a9e43f33]{flex:0 0 auto;padding:9px 14px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:700;color:#fff;background:#14161a}.dash__section[data-v-a9e43f33]{margin-top:26px}.dash__grid[data-v-a9e43f33]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.dash__tile[data-v-a9e43f33]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 6px;border:1px solid #ECEDEF;border-radius:16px;cursor:pointer;background:#fff;font-family:inherit;transition:transform .18s ease}.dash__tile[data-v-a9e43f33]:active{transform:scale(.97)}.dash__tile.is-disabled[data-v-a9e43f33]{opacity:.4}.dash__tileIcon[data-v-a9e43f33]{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#22262e;background:#f4f5f6}.dash__tileTitle[data-v-a9e43f33]{font-size:11px;font-weight:700;color:#22262e}
@@ -1 +1 @@
import{d as l,v as n,q as r,u as d,ao as c,i as x,b as t,A as o,D as a,t as i}from"./index-CBZSLIgu.js";const f={class:"my-4"},u={class:"w-full flex justify-center"},m={class:"w-full flex justify-center text-[18px] font-semibold"},_={class:"grid grid-cols-2 border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]"},g=l({__name:"DialogVant",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(e){return(s,b)=>(x(),n(d(c),null,{default:r(()=>[t("div",f,[t("div",u,[o(s.$slots,"img",{},()=>[a(i(e.text2),1)])]),t("div",m,[o(s.$slots,"title",{},()=>[a(i(e.text1),1)])]),t("div",_,[o(s.$slots,"button",{},()=>[a(i(e.text3),1)])])])]),_:3}))}});export{g as _};
import{d as l,x as n,s as r,u as d,ap as c,i as x,b as t,B as o,E as a,t as i}from"./index-DAH9biZS.js";const f={class:"my-4"},u={class:"w-full flex justify-center"},m={class:"w-full flex justify-center text-[18px] font-semibold"},_={class:"grid grid-cols-2 border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]"},g=l({__name:"DialogVant",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(e){return(s,p)=>(x(),n(d(c),null,{default:r(()=>[t("div",f,[t("div",u,[o(s.$slots,"img",{},()=>[a(i(e.text2),1)])]),t("div",m,[o(s.$slots,"title",{},()=>[a(i(e.text1),1)])]),t("div",_,[o(s.$slots,"button",{},()=>[a(i(e.text3),1)])])])]),_:3}))}});export{g as _};
-1
View File
@@ -1 +0,0 @@
import{d as f,o as b,c as o,k as e,q as c,g as m,i as t,F as p,b as i,r as g,I as y,u as k,f as h,x as P,h as C,s as x,v as F,_ as B}from"./index-CBZSLIgu.js";import{P as V}from"./PageBar-BrfQrql1.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-DQwH-Xdy.js";import{S}from"./SectionHead-QOHixgma.js";import{P as I}from"./ProductCard-Dj_Eu2VB.js";import{u as N}from"./SingleProduct-DssXZ7g8.js";import{a as $}from"./client-CJxy5iKa.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-CAFgxy6H.js";import"./index-CUVFR_Bx.js";import"./classCallCheck-R2Fkn3Yh.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BZS-5R5g.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CINs34e0.js";import"./dialogEmpty1-Caw7F5KL.js";const R={class:"favs"},q={class:"favs__grid"},z={key:1,class:"favs__empty"},E=f({__name:"FavoritesView",setup(H){const d=P(),v=N(),a=m(!1),l=m([]),r=C(()=>l.value.filter(u=>v.isFavorite(u.id)));return b(async()=>{a.value=!0;try{l.value=await $.listProducts()}finally{a.value=!1}}),(u,s)=>{const _=x("container");return t(),o("div",R,[e(V,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(w,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(_,{class:"favs__body"},{default:c(()=>[r.value.length?(t(),o(p,{key:0},[e(S,{title:"ذخیره‌شده‌ها",subtitle:`${r.value.length} محصول`},null,8,["subtitle"]),i("div",q,[(t(!0),o(p,null,g(r.value,n=>(t(),F(I,{key:n.id,value:n},null,8,["value"]))),128))])],64)):a.value?h("",!0):(t(),o("section",z,[e(y,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=i("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),i("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=n=>k(d).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),Y=B(E,[["__scopeId","data-v-93bb7c6a"]]);export{Y as default};
+1
View File
@@ -0,0 +1 @@
import{d as f,o as y,q as b,c as o,k as e,s as c,g as m,i as t,F as p,b as i,r as g,I as k,u as h,f as P,y as C,h as x,v as F,x as B,_ as V}from"./index-DAH9biZS.js";import{P as w}from"./PageBar-LUK1_bA9.js";import{a as S}from"./Spinner.vue_vue_type_style_index_0_lang-V0MPrlo2.js";import{S as I}from"./SectionHead-C2_HAywN.js";import{P as N}from"./ProductCard-WOCas7tY.js";import{u as $}from"./SingleProduct-B-c1md76.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-fT_Tbpm4.js";import"./index-C1LmW9W3.js";import"./classCallCheck-CSZsSBLe.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CDbw_NBZ.js";import"./DialogVant.vue_vue_type_style_index_0_lang-C5L98I2P.js";import"./dialogEmpty1-Caw7F5KL.js";const R={class:"favs"},q={class:"favs__grid"},z={key:1,class:"favs__empty"},E=f({__name:"FavoritesView",setup(H){const d=C(),v=$(),a=m(!1),l=m([]),r=x(()=>l.value.filter(u=>v.isFavorite(u.id)));return y(async()=>{a.value=!0;try{l.value=await b.listProducts()}finally{a.value=!1}}),(u,s)=>{const _=F("container");return t(),o("div",R,[e(w,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(S,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(_,{class:"favs__body"},{default:c(()=>[r.value.length?(t(),o(p,{key:0},[e(I,{title:"ذخیره‌شده‌ها",subtitle:`${r.value.length} محصول`},null,8,["subtitle"]),i("div",q,[(t(!0),o(p,null,g(r.value,n=>(t(),B(N,{key:n.id,value:n},null,8,["value"]))),128))])],64)):a.value?P("",!0):(t(),o("section",z,[e(k,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=i("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),i("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=n=>h(d).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),X=V(E,[["__scopeId","data-v-93bb7c6a"]]);export{X as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.otp-single-input{display:flex;align-items:center}.auth[data-v-08d7f1af]{background:#fff;min-height:100vh}.auth__body[data-v-08d7f1af]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-08d7f1af]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-08d7f1af]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-08d7f1af]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-08d7f1af]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-08d7f1af]{padding:18px 16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__otp[data-v-08d7f1af]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-08d7f1af]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:#5b616e}.auth__form[data-v-08d7f1af] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-08d7f1af]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-08d7f1af]:active{transform:scale(.99)}.auth__cta[data-v-08d7f1af]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-08d7f1af]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-08d7f1af]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:#14161a}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.auth[data-v-23baea3e]{background:#fff;min-height:100vh}.auth__body[data-v-23baea3e]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-23baea3e]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-23baea3e]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-23baea3e]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-23baea3e]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-23baea3e]{padding:18px 16px 20px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__form[data-v-23baea3e] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-23baea3e]{width:100%;margin-top:4px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.auth__cta[data-v-23baea3e]:active{transform:scale(.99)}.auth__switch[data-v-23baea3e]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-23baea3e]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}
.otp-single-input{display:flex;align-items:center}.auth[data-v-c130183b]{background:#fff;min-height:100vh}.auth__body[data-v-c130183b]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-c130183b]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-c130183b]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-c130183b]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-c130183b]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-c130183b]{padding:18px 16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__otp[data-v-c130183b]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-c130183b]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:#5b616e}.auth__form[data-v-c130183b] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-c130183b]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-c130183b]:active{transform:scale(.99)}.auth__cta[data-v-c130183b]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-c130183b]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-c130183b]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:#14161a}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.auth[data-v-23baea3e]{background:#fff;min-height:100vh}.auth__body[data-v-23baea3e]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-23baea3e]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-23baea3e]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-23baea3e]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-23baea3e]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-23baea3e]{padding:18px 16px 20px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__form[data-v-23baea3e] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-23baea3e]{width:100%;margin-top:4px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.auth__cta[data-v-23baea3e]:active{transform:scale(.99)}.auth__switch[data-v-23baea3e]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-23baea3e]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{P as x}from"./PageBar-LUK1_bA9.js";import{E as P,a as _}from"./Spinner.vue_vue_type_style_index_0_lang-V0MPrlo2.js";import{S}from"./SectionHead-C2_HAywN.js";import{P as k}from"./ProductCard-WOCas7tY.js";import{d,i as n,c,k as o,u as l,z as B,A as C,n as E,B as b,x as v,f as y,g as u,q as L,C as $,D as A,s as p,F,r as I,h as N,v as V,_ as D}from"./index-DAH9biZS.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-B-c1md76.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CDbw_NBZ.js";import"./DialogVant.vue_vue_type_style_index_0_lang-C5L98I2P.js";import"./cartStore-fT_Tbpm4.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-C1LmW9W3.js";import"./classCallCheck-CSZsSBLe.js";const q={class:"flex justify-center items-center empty"},z=d({__name:"EmptyState",props:{description:{},image:{}},setup(t){return(e,a)=>(n(),c("div",q,[o(l(P),{description:"موردی یافت نشد",image:t.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),H="/assets/favoritEmpty-CIK7qR49.svg",T=d({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(t,{emit:e}){const a=e,r=B(),s=u(null);return C(s,()=>{a("fetch")},{distance:50}),(i,m)=>(n(),c("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:E({paddingTop:t.padding||l(r).headerHeight+"px"}),ref_key:"scrollArea",ref:s},[b(i.$slots,"default"),o(_,{cls:"my-[10px]",spinning:t.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),t.flag?(n(),v(z,{key:0,image:l(H)},null,8,["image"])):y("",!0)],4))}});function j(){const t=$({totalPages:0,productList:[],flag:!1});return{productsData:t,getProducts:async(a,r=!1)=>{if(!r){a.value=!0;try{t.productList=await L.listProducts(),t.flag=t.productList.length<1}catch(s){console.log(s)}finally{a.value=!1}}}}}const G={class:"newest"},K={key:0,class:"newest__grid"},g=20,M=d({__name:"NewestView",setup(t){const{productsData:e,getProducts:a}=j(),r=u(!1),s=u(!1),i=u(g),m=N(()=>e.productList.slice(0,i.value));A(async()=>{await a(r,!1)});const h=async()=>{if(i.value<e.productList.length){i.value+=g;return}await a(s,!0)};return(R,Z)=>{const w=V("container");return n(),c("div",G,[o(x,{title:"جدیدترین محصولات","back-to":"home"}),o(_,{spinning:r.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[o(T,{class:"newest__scroll",loading:s.value,flag:l(e).flag,padding:"0px",onFetch:h},{default:p(()=>[o(w,{class:"newest__body"},{default:p(()=>[o(S,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),l(e).productList.length?(n(),c("div",K,[(n(!0),c(F,null,I(m.value,f=>(n(),v(k,{key:f.id,value:f},null,8,["value"]))),128))])):y("",!0)]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),rt=D(M,[["__scopeId","data-v-62cb523e"]]);export{rt as default};
-1
View File
@@ -1 +0,0 @@
import{P as x}from"./PageBar-BrfQrql1.js";import{E as P,a as _}from"./Spinner.vue_vue_type_style_index_0_lang-DQwH-Xdy.js";import{S}from"./SectionHead-QOHixgma.js";import{P as k}from"./ProductCard-Dj_Eu2VB.js";import{d,i as n,c,k as o,u as l,y as B,z as C,n as E,A as b,v,f as y,g as u,B as L,C as $,q as p,F as A,r as F,h as I,s as N,_ as V}from"./index-CBZSLIgu.js";import{a as q}from"./client-CJxy5iKa.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DssXZ7g8.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-BZS-5R5g.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CINs34e0.js";import"./cartStore-CAFgxy6H.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-CUVFR_Bx.js";import"./classCallCheck-R2Fkn3Yh.js";const z={class:"flex justify-center items-center empty"},D=d({__name:"EmptyState",props:{description:{},image:{}},setup(t){return(e,a)=>(n(),c("div",z,[o(l(P),{description:"موردی یافت نشد",image:t.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),H="/assets/favoritEmpty-CIK7qR49.svg",T=d({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(t,{emit:e}){const a=e,r=B(),s=u(null);return C(s,()=>{a("fetch")},{distance:50}),(i,m)=>(n(),c("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:E({paddingTop:t.padding||l(r).headerHeight+"px"}),ref_key:"scrollArea",ref:s},[b(i.$slots,"default"),o(_,{cls:"my-[10px]",spinning:t.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),t.flag?(n(),v(D,{key:0,image:l(H)},null,8,["image"])):y("",!0)],4))}});function j(){const t=L({totalPages:0,productList:[],flag:!1});return{productsData:t,getProducts:async(a,r=!1)=>{if(!r){a.value=!0;try{t.productList=await q.listProducts(),t.flag=t.productList.length<1}catch(s){console.log(s)}finally{a.value=!1}}}}}const G={class:"newest"},K={key:0,class:"newest__grid"},g=20,M=d({__name:"NewestView",setup(t){const{productsData:e,getProducts:a}=j(),r=u(!1),s=u(!1),i=u(g),m=I(()=>e.productList.slice(0,i.value));$(async()=>{await a(r,!1)});const h=async()=>{if(i.value<e.productList.length){i.value+=g;return}await a(s,!0)};return(R,Z)=>{const w=N("container");return n(),c("div",G,[o(x,{title:"جدیدترین محصولات","back-to":"home"}),o(_,{spinning:r.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[o(T,{class:"newest__scroll",loading:s.value,flag:l(e).flag,padding:"0px",onFetch:h},{default:p(()=>[o(w,{class:"newest__body"},{default:p(()=>[o(S,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),l(e).productList.length?(n(),c("div",K,[(n(!0),c(A,null,F(m.value,f=>(n(),v(k,{key:f.id,value:f},null,8,["value"]))),128))])):y("",!0)]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),it=V(M,[["__scopeId","data-v-62cb523e"]]);export{it as default};
@@ -1 +1 @@
import{d as a,c as n,k as o,q as i,s as c,i as _,b as e,I as r,_ as p}from"./index-CBZSLIgu.js";import{P as d}from"./PageBar-BrfQrql1.js";const f={class:"notif"},l={class:"notif__empty"},m=a({__name:"NotificationsView",setup(u){return(x,t)=>{const s=c("container");return _(),n("div",f,[o(d,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",l,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),B=p(m,[["__scopeId","data-v-44d0c9a5"]]);export{B as default};
import{d as a,c as n,k as o,s as i,v as c,i as _,b as e,I as r,_ as p}from"./index-DAH9biZS.js";import{P as d}from"./PageBar-LUK1_bA9.js";const f={class:"notif"},l={class:"notif__empty"},m=a({__name:"NotificationsView",setup(u){return(v,t)=>{const s=c("container");return _(),n("div",f,[o(d,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",l,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),B=p(m,[["__scopeId","data-v-44d0c9a5"]]);export{B as default};
@@ -0,0 +1 @@
import{d as r,k as n,ai as p,aj as f,ak as h,al as w,am as y,an as k,a7 as x,ao as c,a6 as g,ae as N,H as S,i as V,c as v,u as P,n as B,s as _,b as l,I as b,B as I,E as z,t as C,f as O,g as E}from"./index-DAH9biZS.js";const[T,U]=g("notify"),j=["lockScroll","position","show","teleport","zIndex"],D=w({},y,{type:c("danger"),color:String,message:x,position:c("top"),className:k,background:String,lockScroll:Boolean});var H=r({name:T,props:D,emits:["update:show"],setup(e,{emit:o,slots:t}){const a=s=>o("update:show",s);return()=>n(h,p({class:[U([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,duration:.2,"onUpdate:show":a},f(e,j)),{default:()=>[t.default?t.default():e.message]})}});const $=N(H),q={key:0,class:"flex"},A={class:"w-full text-white my-2"},F={class:"w-full flex content-end"},J=r({__name:"NotifyVant",props:{modelValue:{type:Boolean},timeOut:{},text:{},color:{}},emits:["update:modelValue"],setup(e,{emit:o}){const t=E(!0),a=e,s=o;S(()=>a.modelValue,()=>{a.timeOut!==-1&&u()});const u=()=>{setTimeout(()=>{s("update:modelValue",!1)},a.timeOut)};return(d,i)=>e.modelValue?(V(),v("div",q,[n(P($),{show:t.value,"onUpdate:show":i[0]||(i[0]=m=>t.value=m),style:B(e.color)},{default:_(()=>[l("div",A,[l("div",F,[n(b,{icon:"vuesax-linear:info-circle",class:"ml-[20px] text-white",size:"25"}),l("div",null,[I(d.$slots,"default",{},()=>[z(C(e.text),1)])])])])]),_:3},8,["show","style"])])):O("",!0)}});export{J as _};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{d as _,c as s,b as a,l as d,I as b,t as u,z as i,f as t,v as p,_ as k}from"./index-CZjgV-Yn.js";const h={class:"bar"},f={class:"bar__inner"},m={key:1,class:"bar__spacer","aria-hidden":"true"},B={class:"bar__title"},g={class:"bar__trailing"},v=_({__name:"PageBar",props:{title:{},back:{type:Boolean,default:!0},backTo:{}},setup(e){const o=e,r=p();function l(){o.backTo?r.push({name:o.backTo}):r.back()}return(n,c)=>(t(),s("header",h,[a("div",f,[e.back?(t(),s("button",{key:0,type:"button",class:"bar__btn","aria-label":"بازگشت",onClick:l},[d(b,{icon:"vuesax-linear:arrow-right-1",size:"20"})])):(t(),s("span",m)),a("h1",B,u(e.title),1),a("div",g,[i(n.$slots,"trailing",{},()=>[c[0]||(c[0]=a("span",{class:"bar__spacer","aria-hidden":"true"},null,-1))],!0)])]),i(n.$slots,"below",{},void 0,!0)]))}}),I=k(v,[["__scopeId","data-v-d2d3dfeb"]]);export{I as P};
import{d as _,c as s,b as a,k as d,I as b,t as u,B as i,i as t,y as p,_ as k}from"./index-DAH9biZS.js";const h={class:"bar"},f={class:"bar__inner"},B={key:1,class:"bar__spacer","aria-hidden":"true"},m={class:"bar__title"},g={class:"bar__trailing"},y=_({__name:"PageBar",props:{title:{},back:{type:Boolean,default:!0},backTo:{}},setup(e){const o=e,r=p();function l(){o.backTo?r.push({name:o.backTo}):r.back()}return(n,c)=>(t(),s("header",h,[a("div",f,[e.back?(t(),s("button",{key:0,type:"button",class:"bar__btn","aria-label":"بازگشت",onClick:l},[d(b,{icon:"vuesax-linear:arrow-right-1",size:"20"})])):(t(),s("span",B)),a("h1",m,u(e.title),1),a("div",g,[i(n.$slots,"trailing",{},()=>[c[0]||(c[0]=a("span",{class:"bar__spacer","aria-hidden":"true"},null,-1))],!0)])]),i(n.$slots,"below",{},void 0,!0)]))}}),I=k(y,[["__scopeId","data-v-d2d3dfeb"]]);export{I as P};
@@ -1 +1 @@
import{d as D,l as P,i as s,c as i,F as S,b as t,u as e,w as z,k as _,I as f,j as B,e as I,f as d,t as u,q as N,v as V,g as q,h as E,_ as $}from"./index-CBZSLIgu.js";import{u as j,S as L}from"./SingleProduct-DssXZ7g8.js";import{u as M}from"./cartStore-CAFgxy6H.js";import{D as O}from"./index-CUVFR_Bx.js";const U={class:"pc__art"},A=["alt"],G={key:1,class:"pc__artEmpty","aria-hidden":"true"},H=["aria-label"],J={key:2,class:"pc__flag"},K={key:3,class:"pc__flag pc__flag--soft"},Q={class:"pc__body"},R={class:"pc__title"},T={class:"pc__meta"},W={class:"pc__weight"},X={key:0,class:"pc__wage"},Y=D({__name:"ProductCard",props:{value:{}},setup(g){const h=g,n=j(),{image:p,id:a,title:v,min_gram:y,wage:m,is_exist:b,qty:k,isPreOrder:w}=M(h.value),l=q(!1);function x(){l.value=!0}const C=E(()=>{const r=m.value;return r==null?"":r%1===0?String(r):r.toFixed(2)});return(r,o)=>{const F=P("lazy");return s(),i(S,null,[t("article",{class:"pc",onClick:x},[t("div",U,[e(p)?z((s(),i("img",{key:0,alt:e(v)},null,8,A)),[[F,e(p)]]):(s(),i("div",G,[_(f,{icon:"vuesax-linear:diamonds",size:"26"})])),t("button",{type:"button",class:I(["pc__fav",{"is-on":e(n).isFavorite(e(a))}]),"aria-label":e(n).isFavorite(e(a))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:o[0]||(o[0]=B(c=>e(n).toggle(e(a)),["stop"]))},[_(f,{icon:e(n).isFavorite(e(a))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,H),e(b)?e(w)&&e(k)===0?(s(),i("span",K,"پیش‌سفارش")):d("",!0):(s(),i("span",J,"ناموجود"))]),t("div",Q,[t("h3",R,u(e(v)),1),t("div",T,[t("span",W,u(e(y))+" گرم",1),e(m)!=null?(s(),i("span",X,"اجرت "+u(C.value)+"٪",1)):d("",!0)])])]),_(e(O),{visible:l.value,"onUpdate:visible":o[2]||(o[2]=c=>l.value=c),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:N(()=>[l.value?(s(),V(L,{id:e(a),key:e(a),onCloseDrawer:o[1]||(o[1]=c=>l.value=!1)},null,8,["id"])):d("",!0)]),_:1},8,["visible"])],64)}}}),ae=$(Y,[["__scopeId","data-v-5658bc04"]]);export{ae as P};
import{d as D,l as P,i as s,c as i,F as S,b as t,u as e,w as z,k as _,I as f,j as B,e as I,f as d,t as u,s as N,x as V,g as E,h as $,_ as j}from"./index-DAH9biZS.js";import{u as q,S as L}from"./SingleProduct-B-c1md76.js";import{u as M}from"./cartStore-fT_Tbpm4.js";import{D as O}from"./index-C1LmW9W3.js";const U={class:"pc__art"},A=["alt"],G={key:1,class:"pc__artEmpty","aria-hidden":"true"},H=["aria-label"],J={key:2,class:"pc__flag"},K={key:3,class:"pc__flag pc__flag--soft"},Q={class:"pc__body"},R={class:"pc__title"},T={class:"pc__meta"},W={class:"pc__weight"},X={key:0,class:"pc__wage"},Y=D({__name:"ProductCard",props:{value:{}},setup(g){const h=g,n=q(),{image:p,id:a,title:v,min_gram:y,wage:m,is_exist:b,qty:k,isPreOrder:w}=M(h.value),l=E(!1);function x(){l.value=!0}const C=$(()=>{const r=m.value;return r==null?"":r%1===0?String(r):r.toFixed(2)});return(r,o)=>{const F=P("lazy");return s(),i(S,null,[t("article",{class:"pc",onClick:x},[t("div",U,[e(p)?z((s(),i("img",{key:0,alt:e(v)},null,8,A)),[[F,e(p)]]):(s(),i("div",G,[_(f,{icon:"vuesax-linear:diamonds",size:"26"})])),t("button",{type:"button",class:I(["pc__fav",{"is-on":e(n).isFavorite(e(a))}]),"aria-label":e(n).isFavorite(e(a))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:o[0]||(o[0]=B(c=>e(n).toggle(e(a)),["stop"]))},[_(f,{icon:e(n).isFavorite(e(a))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,H),e(b)?e(w)&&e(k)===0?(s(),i("span",K,"پیش‌سفارش")):d("",!0):(s(),i("span",J,"ناموجود"))]),t("div",Q,[t("h3",R,u(e(v)),1),t("div",T,[t("span",W,u(e(y))+" گرم",1),e(m)!=null?(s(),i("span",X,"اجرت "+u(C.value)+"٪",1)):d("",!0)])])]),_(e(O),{visible:l.value,"onUpdate:visible":o[2]||(o[2]=c=>l.value=c),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:N(()=>[l.value?(s(),V(L,{id:e(a),key:e(a),onCloseDrawer:o[1]||(o[1]=c=>l.value=!1)},null,8,["id"])):d("",!0)]),_:1},8,["visible"])],64)}}}),ae=j(Y,[["__scopeId","data-v-5658bc04"]]);export{ae as P};
+1
View File
@@ -0,0 +1 @@
import{d as S,G as I,o as E,q as y,c as a,k as i,s as b,g as c,v as k,i as l,b as e,I as p,t,f as _,e as V,h as g,_ as h}from"./index-DAH9biZS.js";import{P as N}from"./PageBar-LUK1_bA9.js";import{S as T}from"./SectionHead-C2_HAywN.js";const B={class:"prof"},C={class:"prof__identity"},P={class:"prof__avatar","aria-hidden":"true"},x={class:"prof__name"},D={key:0,class:"prof__mobile"},R={key:0,class:"prof__block"},w={class:"prof__specs"},F={class:"prof__spec"},M={class:"prof__spec"},z={class:"prof__spec"},L={class:"prof__spec"},O={key:1,class:"prof__empty"},U=S({__name:"ProfileView",setup(A){const d={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده"},f=I(),s=c(null),n=c(!1),v=g(()=>{var r;return((r=s.value)==null?void 0:r.verificationStep)==="VERIFIED"});return E(async()=>{if(f.isLoggedIn){n.value=!0;try{s.value=await y.getMe()}finally{n.value=!1}}}),(r,o)=>{const m=k("container");return l(),a("div",B,[i(N,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),i(m,{class:"prof__body"},{default:b(()=>{var u;return[e("section",C,[e("div",P,[i(p,{icon:"vuesax-linear:user",size:"30"})]),e("h2",x,t(((u=s.value)==null?void 0:u.fullName)??"—"),1),s.value?(l(),a("p",D,t(s.value.mobile),1)):_("",!0),s.value?(l(),a("span",{key:1,class:V(["prof__seal",v.value?"is-ok":"is-pending"])},t(d[s.value.verificationStep]??s.value.verificationStep),3)):_("",!0)]),s.value?(l(),a("section",R,[i(T,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",w,[e("div",F,[o[0]||(o[0]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,t(s.value.fullName),1)]),e("div",M,[o[1]||(o[1]=e("dt",null,"تلفن همراه",-1)),e("dd",null,t(s.value.mobile),1)]),e("div",z,[o[2]||(o[2]=e("dt",null,"کد ملی",-1)),e("dd",null,t(s.value.nationalCode),1)]),e("div",L,[o[3]||(o[3]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,t(d[s.value.verificationStep]??s.value.verificationStep),1)])])])):n.value?_("",!0):(l(),a("section",O,[i(p,{icon:"vuesax-linear:user",size:"26"}),o[4]||(o[4]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))]))]}),_:1})])}}}),W=h(U,[["__scopeId","data-v-adfdabd9"]]);export{W as default};
-1
View File
@@ -1 +0,0 @@
.prof[data-v-7c544fc5]{background:#fff;min-height:100vh}.prof__body[data-v-7c544fc5]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-7c544fc5]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-7c544fc5]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-7c544fc5]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-7c544fc5]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-7c544fc5]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-7c544fc5]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-7c544fc5]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-7c544fc5]{margin-top:26px}.prof__specs[data-v-7c544fc5]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-7c544fc5]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-7c544fc5]:last-child{border-bottom:0}.prof__spec dt[data-v-7c544fc5]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-7c544fc5]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-7c544fc5]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-7c544fc5]{margin:0;font-size:12.5px}
+1
View File
@@ -0,0 +1 @@
.prof[data-v-adfdabd9]{background:#fff;min-height:100vh}.prof__body[data-v-adfdabd9]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-adfdabd9]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-adfdabd9]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-adfdabd9]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-adfdabd9]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-adfdabd9]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-adfdabd9]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-adfdabd9]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-adfdabd9]{margin-top:26px}.prof__specs[data-v-adfdabd9]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-adfdabd9]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-adfdabd9]:last-child{border-bottom:0}.prof__spec dt[data-v-adfdabd9]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-adfdabd9]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-adfdabd9]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-adfdabd9]{margin:0;font-size:12.5px}
-1
View File
@@ -1 +0,0 @@
import{d as I,E as S,o as E,c as a,k as i,q as y,g as p,s as k,i as l,b as e,I as f,t,f as _,e as V,h as b,_ as h}from"./index-CBZSLIgu.js";import{P as C}from"./PageBar-BrfQrql1.js";import{S as N}from"./SectionHead-QOHixgma.js";import{a as T}from"./client-CJxy5iKa.js";const g={class:"prof"},B={class:"prof__identity"},P={class:"prof__avatar","aria-hidden":"true"},x={class:"prof__name"},D={key:0,class:"prof__mobile"},R={key:0,class:"prof__block"},w={class:"prof__specs"},F={class:"prof__spec"},z={class:"prof__spec"},M={class:"prof__spec"},O={class:"prof__spec"},U={key:1,class:"prof__empty"},A=I({__name:"ProfileView",setup(L){const c={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده"},u=S(),s=p(null),n=p(!1),v=b(()=>{var r;return((r=s.value)==null?void 0:r.verificationStep)==="VERIFIED"});return E(async()=>{if(u.customerId){n.value=!0;try{s.value=await T.getCustomer(u.customerId)}finally{n.value=!1}}}),(r,o)=>{const m=k("container");return l(),a("div",g,[i(C,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),i(m,{class:"prof__body"},{default:y(()=>{var d;return[e("section",B,[e("div",P,[i(f,{icon:"vuesax-linear:user",size:"30"})]),e("h2",x,t(((d=s.value)==null?void 0:d.fullName)??"—"),1),s.value?(l(),a("p",D,t(s.value.mobile),1)):_("",!0),s.value?(l(),a("span",{key:1,class:V(["prof__seal",v.value?"is-ok":"is-pending"])},t(c[s.value.verificationStep]??s.value.verificationStep),3)):_("",!0)]),s.value?(l(),a("section",R,[i(N,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",w,[e("div",F,[o[0]||(o[0]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,t(s.value.fullName),1)]),e("div",z,[o[1]||(o[1]=e("dt",null,"تلفن همراه",-1)),e("dd",null,t(s.value.mobile),1)]),e("div",M,[o[2]||(o[2]=e("dt",null,"کد ملی",-1)),e("dd",null,t(s.value.nationalCode),1)]),e("div",O,[o[3]||(o[3]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,t(c[s.value.verificationStep]??s.value.verificationStep),1)])])])):n.value?_("",!0):(l(),a("section",U,[i(f,{icon:"vuesax-linear:user",size:"26"}),o[4]||(o[4]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))]))]}),_:1})])}}}),G=h(A,[["__scopeId","data-v-7c544fc5"]]);export{G as default};
@@ -1 +1 @@
import{p as c,j as d}from"./filters-CLL9nGZ2.js";import{d as u,c as s,e as _,b as a,D as l,t as i,u as n,f as m,h as v,i as r,_ as q}from"./index-CBZSLIgu.js";const f={key:0,class:"rate-strip__value"},k={class:"rate-strip__num"},y={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},R=u({__name:"RateStrip",props:{quote:{}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(b,e)=>(r(),s("div",{class:_(["rate-strip",{"is-empty":!t.quote}])},[e[1]||(e[1]=a("div",{class:"rate-strip__label"},[a("span",{class:"rate-strip__dot","aria-hidden":"true"}),l(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),s("div",f,[a("span",k,i(n(c)(p.value)),1),e[0]||(e[0]=a("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),s("div",y,"در انتظار اعلام نرخ")),t.quote?(r(),s("div",x,i(n(d)(t.quote.quotedAt)),1)):m("",!0)],2))}}),C=q(R,[["__scopeId","data-v-16b4c8d5"]]);export{C as R};
import{p as c,j as d}from"./filters-CLL9nGZ2.js";import{d as u,c as s,e as _,b as a,E as l,t as i,u as n,f as m,h as v,i as r,_ as q}from"./index-DAH9biZS.js";const f={key:0,class:"rate-strip__value"},k={class:"rate-strip__num"},y={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},R=u({__name:"RateStrip",props:{quote:{}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(b,e)=>(r(),s("div",{class:_(["rate-strip",{"is-empty":!t.quote}])},[e[1]||(e[1]=a("div",{class:"rate-strip__label"},[a("span",{class:"rate-strip__dot","aria-hidden":"true"}),l(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),s("div",f,[a("span",k,i(n(c)(p.value)),1),e[0]||(e[0]=a("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),s("div",y,"در انتظار اعلام نرخ")),t.quote?(r(),s("div",x,i(n(d)(t.quote.quotedAt)),1)):m("",!0)],2))}}),C=q(R,[["__scopeId","data-v-16b4c8d5"]]);export{C as R};
+1
View File
@@ -0,0 +1 @@
import{d as v,a3 as h,H as m,i as t,c as l,k as n,I as r,w as f,a4 as b,b as k,a5 as x,f as C,C as I,g as w,_ as y}from"./index-DAH9biZS.js";const S={class:"si"},V=["placeholder"],B=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=I({clear:!1}),e=w(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(H,o)=>(t(),l("div",S,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(k("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:x(s,["enter"])},null,40,V),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):C("",!0)]))}}),z=y(B,[["__scopeId","data-v-4c50067a"]]);export{z as S};
-1
View File
@@ -1 +0,0 @@
import{d as v,a2 as h,G as m,i as t,c as l,k as n,I as r,w as f,a3 as b,b as k,a4 as x,f as I,B as w,g as y,_ as B}from"./index-CBZSLIgu.js";const C={class:"si"},S=["placeholder"],V=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=w({clear:!1}),e=y(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(N,o)=>(t(),l("div",C,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(k("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:x(s,["enter"])},null,40,S),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):I("",!0)]))}}),D=B(V,[["__scopeId","data-v-4c50067a"]]);export{D as S};

Some files were not shown because too many files have changed in this diff Show More