@restaround/react 1.4.19 → 1.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/index.esm.js +1 -1
- package/dist/models/index.esm.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/modules/branch/models.d.ts +3 -1
- package/dist/modules/branch/models.d.ts +3 -1
- package/dist/utils/modules/branch/models.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../src/utils/image.ts","../src/utils/constants.ts","../src/utils/url.ts","../src/modules/view/constants.ts","../src/store/index.tsx","../src/constants/analytics.ts","../src/utils/category.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/index.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/store/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/components/Image/Image.tsx","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/BackIcon/BackIcon.tsx","../src/components/PublicMenu/Header/BranchInfo/BranchInfo.tsx","../src/components/PublicMenu/Header/BusinessInfo/BusinessInfo.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/modules/product/models.ts","../src/utils/common.ts","../src/modules/addon/models.ts","../src/modules/addon/utils.ts","../src/modules/product/utils.ts","../src/modules/business/models.ts","../src/modules/customer/models.ts","../src/modules/feature/models.ts","../src/modules/subscription/models.ts","../src/modules/table/models.ts","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/pricing.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/pricing.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/pricing.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/pricing.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/pricing.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/pricing.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/modules/customer/hooks.ts","../src/modules/order/hooks.ts","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/FloatingOrdersButton/FloatingOrdersButton.tsx","../src/modules/customer/utils.ts","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/hooks/product.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/modules/product/hooks.ts","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/modules/table/hooks.ts","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Modals/Auth/PhoneStep.tsx","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/utils/menu.ts","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx","../src/modules/subscription/constants.ts","../src/components/Pricing/PricingPlanAmount.tsx","../src/components/Pricing/Pricing.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","export const IMAGE_BASE_URL = \"https://images.restaround.co\";\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n","export const CO_DOMAIN = \"restaround.co\";\nexport const AZ_DOMAIN = \"restaround.az\";\nexport const EE_DOMAIN = \"restaround.ee\";\nexport const NL_DOMAIN = \"restaround.nl\";\n\nexport const DOMAINS = [CO_DOMAIN, AZ_DOMAIN, EE_DOMAIN, NL_DOMAIN]; // Supported domains list\n","import { CO_DOMAIN, DOMAINS } from \"./constants\";\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst domain = DOMAINS.includes(hostname) ? hostname : CO_DOMAIN;\n\tconst locale = language || \"en\";\n\treturn { url: `https://${domain}/${locale}`, domain };\n};\n\nexport const getTLD = (language: string) => {\n\treturn language === \"az\" ? \"az\" : \"co\";\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\tconst tld = getTLD(language);\n\n\treturn `https://app.restaround.${tld}/auth/register?lang=${language}&utm_source=${source}`;\n};\n","export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\"];\nexport const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { createContext, ReactElement, useContext, useMemo } from \"react\";\n\nimport { PublicMenuData } from \"src/models/menu\";\nimport * as branchModels from \"src/modules/branch/models\";\nimport * as viewConstants from \"src/modules/view/constants\";\n\nconst StoreContext = createContext<PublicMenuData>({} as PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: PublicMenuData;\n}) => {\n\tconst contextValue = useMemo<PublicMenuData>(() => {\n\t\tif (isEmpty(value)) return {} as PublicMenuData;\n\n\t\tconst branches = value.branches || [];\n\t\tconst hasSingleBranch = branches.length === 1;\n\n\t\tconst selectedBranch = hasSingleBranch\n\t\t\t? branches[0] || ({} as branchModels.Branch)\n\t\t\t: branches.find((item) => item.id === Number(value.branchId)) || ({} as branchModels.Branch);\n\n\t\treturn {\n\t\t\t...value,\n\t\t\tcurrency: value.currency || viewConstants.DEFAULT_CURRENCY,\n\t\t\tlanguage: value.language || viewConstants.DEFAULT_LANGUAGE,\n\t\t\tselectedBranch,\n\t\t};\n\t}, [value]);\n\n\treturn <StoreContext.Provider value={contextValue}>{children}</StoreContext.Provider>;\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Category, CategoryTranslation } from \"../models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name;\n};\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"restaround_cst_act\", \"restaround_cst_rft\");\n","interface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n","import { OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\ttotalPriceWithTax: 0,\n\ttotalPriceWithoutTax: 0,\n\ttotalTax: 0,\n\tvat: 0,\n\tpaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { isEmpty, priceFormatter, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const calculatSingleAddonTotalPrice = (addon: OrderAddon) => {\n\treturn addon.options.reduce((sum, option) => sum + option.price, 0);\n};\n\nexport function calculateTotalAddonPrice(addons: OrderAddon[] = [], quantity: number = 1): number {\n\tconst totalAddonsPriceForSingleItem = addons.reduce((total, addon) => {\n\t\tconst addonTotal = calculatSingleAddonTotalPrice(addon);\n\t\treturn total + addonTotal;\n\t}, 0);\n\n\treturn quantity * totalAddonsPriceForSingleItem;\n}\n\nexport const getOrderPrice = (order: Order, currency: string, language: string) => {\n\tconst calculateItemTotal = (price: number, quantity: number, addons: OrderAddon[]) => {\n\t\treturn quantity * price + calculateTotalAddonPrice(addons, quantity);\n\t};\n\n\tlet totalWithoutTax = 0;\n\tlet totalTax = 0;\n\n\tfor (const item of order.items) {\n\t\tconst itemTotal = calculateItemTotal(item.price, item.quantity, item.addons);\n\t\ttotalWithoutTax += itemTotal;\n\n\t\tif (order.vat === undefined && item.vat) {\n\t\t\ttotalTax += (itemTotal * item.vat) / 100;\n\t\t}\n\t}\n\n\tif (order.vat !== undefined) {\n\t\ttotalTax = (totalWithoutTax * order.vat) / 100;\n\t}\n\n\tconst totalWithTax = totalWithoutTax + totalTax;\n\n\treturn {\n\t\ttotalWithoutTax,\n\t\ttotalWithoutTaxFormatted: priceFormatter(totalWithoutTax, currency, language),\n\t\ttotalTax,\n\t\ttotalTaxFormatted: priceFormatter(totalTax, currency, language),\n\t\ttotalWithTax,\n\t\ttotalWithTaxFormatted: priceFormatter(totalWithTax, currency, language),\n\t};\n};\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getOrderItemPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity, vat } = orderItem || {};\n\tconst basePrice = variant?.price ?? price;\n\tconst addonsPrice = calculateTotalAddonPrice(addons, 1); // single item's addon price\n\n\tconst itemNetPrice = basePrice + addonsPrice;\n\t// Currently VAT is applied only on basePrice, not on addons\n\t// TODO: Re-evaluate for European market where tax may apply to addons too\n\tconst itemTax = basePrice * (vat / 100);\n\tconst itemGrossPrice = itemNetPrice + itemTax;\n\n\tconst totalNet = itemNetPrice * quantity;\n\tconst totalTax = itemTax * quantity;\n\tconst totalGross = itemGrossPrice * quantity;\n\n\treturn {\n\t\ttotalGross,\n\t\ttotalNet,\n\t\ttotalTax,\n\t\titemGrossPrice,\n\t\titemNetPrice,\n\t\titemTax,\n\t};\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {}\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n","export const BASE_API_URL = \"https://api.restaround.co/api/v1\";\n","import { BASE_API_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst request = async (method: \"POST\" | \"PATCH\" | \"GET\", endpoint: string, body?: any) => {\n\tconst { accessToken } = storage.getAuthToken();\n\tconst url = `${BASE_API_URL}/${endpoint}`;\n\n\tconst response = await fetch(url, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\tAuthorization: accessToken,\n\t\t},\n\t\tcredentials: \"include\",\n\t\tbody: JSON.stringify(body),\n\t});\n\n\tconst data = await response.json();\n\n\tif (!response.ok) {\n\t\tthrow data;\n\t}\n\n\treturn data;\n};\n\nexport const API = {\n\tpost: (endpoint: string, body: any) => request(\"POST\", endpoint, body),\n\tpatch: (endpoint: string, body: any) => request(\"PATCH\", endpoint, body),\n\tget: (endpoint: string) => request(\"GET\", endpoint),\n};\n","import { API } from \"src/services/api\";\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn API.get(\"customer\");\n};\n\nexport const loginCustomer = async (phoneNumber: string): Promise<{ status: number }> => {\n\treturn API.post(\"customer\", { phoneNumber });\n};\n\nexport const verifyOTP = async (otp: string, phoneNumber: string): Promise<AuthResponse> => {\n\treturn API.post(\"otp/verify\", { otp, phoneNumber });\n};\n\nexport const update = async (payload: CustomerUpdatePayload) => {\n\treturn API.patch(\"customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\"\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_URL}/log`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","import { Branch, BranchWorkDays } from \"src/models\";\n\nexport const getVenueName = (\n\tbusinessName: string,\n\thasSingleBranch: boolean,\n\tselectedBranch?: Branch\n): string => {\n\tif (hasSingleBranch) {\n\t\treturn businessName;\n\t}\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport function normalizeRootPath(rootPath: string): string {\n\treturn rootPath.endsWith(\"/\") ? rootPath.slice(0, -1) : rootPath;\n}\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"../view/models\";\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { BranchServes, BranchSettings } from \"./models\";\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst { selectedBranch } = useStoreContext();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst { selectedBranch } = useStoreContext();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst { selectedBranch } = useStoreContext();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst { tableId } = useStoreContext();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\ttotalPriceWithTax: 0,\n\t\ttotalPriceWithoutTax: 0,\n\t\ttotalTax: 0,\n\t\tvat: 0,\n\t\tpaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(false);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t[\"branchId\", \"tableId\"].forEach((field) => {\n\t\t\t\tif (updatedFields[field] && errors?.[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, [field]: null }));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[errors]\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product) || quantity < 0) return;\n\n\t\t\tconst { id: productId, vat = 0, variants, addons, price } = product;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity;\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\tvat,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: { variantId: selectedVariant.id, price: selectedVariant.price },\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation && errors?.items) {\n\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, items: null }));\n\t\t\t}\n\t\t},\n\t\t[errors?.items]\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId || isEmpty(orderItems)) return;\n\n\t\t\t// Filter out order items that do not belong to the given productId\n\t\t\tconst updatedOrderItems = Object.entries(orderItems).reduce(\n\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{} as orderModels.OrderItems\n\t\t\t);\n\n\t\t\t// Update the order items with the remaining items\n\t\t\tsetOrderItems(updatedOrderItems);\n\t\t},\n\t\t[orderItems]\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false) => {\n\t\t\tsetIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep]\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t]\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n","import { DetailedHTMLProps, ImgHTMLAttributes } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport { rgbDataURL } from \"src/utils/image\";\n\ninterface Props extends DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {\n\tplaceholder?: \"blur\" | \"empty\" | `data:image/${string}`;\n\tblurDataURL?: string;\n\tpriority?: boolean;\n\tquality?: number | `${number}`;\n}\n\nconst Image = (props: Props) => {\n\tconst {\n\t\tpriority: _,\n\t\tblurDataURL: __,\n\t\tquality: ___,\n\t\tplaceholder: ____,\n\t\tfetchPriority: _____,\n\t\t...imgProps\n\t} = props;\n\tconst { imageTag } = useStoreContext() || {};\n\n\tif (imageTag) {\n\t\tconst CustomImage: any = imageTag;\n\n\t\treturn (\n\t\t\t<CustomImage\n\t\t\t\t{...props}\n\t\t\t\tquality={props.quality || 100}\n\t\t\t\tplaceholder=\"blur\"\n\t\t\t\tblurDataURL={rgbDataURL(235, 59, 90)}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn <img {...imgProps} />;\n};\n\nexport default Image;\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { useStoreContext } from \"src/store\";\n\nconst Languages = () => {\n\tconst { language, languages, onLanguageSelect } = useStoreContext();\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\n\tconst isBilingual = languages?.length > 1;\n\tconst otherLanguages = languages?.filter?.(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.restaround.co/languages/${code}.svg`;\n\t};\n\n\tconst handleSelectLanguages = (code: string) => {\n\t\tif (onLanguageSelect) onLanguageSelect(code);\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => handleSelectLanguages(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst { language, business } = useStoreContext();\n\tconst handleGoBack = () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tif (!business?.username) return window.history?.back?.();\n\n\t\twindow.location.pathname = `/${language}/${business.username}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import { Column, Flex, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchInfo.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\nimport BackIcon from \"src/components/BackIcon\";\n\ninterface Props {\n\tbranch?: branchModels.Branch;\n\thasSingleBranch?: boolean;\n\tname: menuModels.PublicMenuData[\"name\"];\n\tlogoImage: menuModels.PublicMenuData[\"logoImage\"];\n}\n\nconst BranchInfo = ({ branch, hasSingleBranch = true, name, logoImage }: Props) => {\n\tconst { address, latitude, longitude } = branch || {};\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<Column justifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"} fullHeight fullWidth>\n\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t<Flex.Item>\n\t\t\t\t\t<Image src={logoImage} alt={name} className={styles.logo} width={96} height={96} />\n\t\t\t\t</Flex.Item>\n\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</Column>\n\t\t\t\t</Flex.Item>\n\t\t\t</Flex>\n\t\t</Column>\n\t);\n};\nexport default BranchInfo;\n","import { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessInfo.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\n\ninterface Props {\n\tname: menuModels.PublicMenuData[\"name\"];\n\tlogoImage: menuModels.PublicMenuData[\"logoImage\"];\n}\n\nconst BusinessInfo = ({ name, logoImage }: Props) => (\n\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t<Image src={logoImage} alt={name} className={styles.logo} width={96} height={96} />\n\t\t<div className={styles.info}>\n\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t</div>\n\t</Column>\n);\nexport default BusinessInfo;\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n} from \"@sorocraft/ui/icons\";\nimport { classNames, isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\n\nimport Languages from \"./Languages\";\nimport BranchInfo from \"./BranchInfo\";\nimport BusinessInfo from \"./BusinessInfo\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverPhoto\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n\thasSingleBranch?: boolean;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverPhoto,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n\thasSingleBranch = true,\n}: Props) => {\n\tconst { setModal } = useModalContext();\n\tconst { phone, wifiPassword, openingHours, deliveryHours } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={classNames(styles, { container: true, noBranch })}>\n\t\t\t<Image\n\t\t\t\tsrc={coverPhoto}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t\tpriority\n\t\t\t\tsizes=\"100vw\"\n\t\t\t\tfetchPriority=\"high\"\n\t\t\t\tloading=\"eager\"\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t{noBranch ? (\n\t\t\t\t\t<BusinessInfo name={name} logoImage={logoImage} />\n\t\t\t\t) : (\n\t\t\t\t\t<BranchInfo\n\t\t\t\t\t\tbranch={branch}\n\t\t\t\t\t\thasSingleBranch={hasSingleBranch}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tlogoImage={logoImage}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export const calculateTotalPrice = (price: number = 0, quantity: number = 1, vat: number = 0) => {\n\treturn price * quantity * (1 + vat / 100);\n};\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport {\n\tMenuAddon,\n\tMenuAddonOption,\n\tMenuAddonOptionTranslation,\n\tMenuAddonTranslation,\n} from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): MenuAddonTranslation => {\n\treturn (addon?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonTranslation;\n};\n\nexport const getAddonOptionTranslation = (\n\toption: MenuAddonOption,\n\tlanguage: string\n): MenuAddonOptionTranslation => {\n\treturn (option?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonOptionTranslation;\n};\n\nexport const getOptionPrice = ({\n\toption,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n}: {\n\toption: MenuAddonOption;\n\tcurrency?: string;\n\tlanguage?: string;\n}) => {\n\tconst { price } = option || {};\n\n\treturn {\n\t\ttotalPrice: price,\n\t\tformattedTotalPrice: priceFormatter(price, currency, language),\n\t};\n};\n\nexport const getAddonOptionRawPrice = (addon: MenuAddon, optionId: number): number => {\n\treturn (addon?.options || []).find(({ id }) => id === optionId)?.price || 0;\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn options\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ translations }) => translations.find((t) => t.language === language)?.title || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = options.find(({ id }) => id === optionIds);\n\t\treturn option?.translations.find((t) => t.language === language)?.title || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.translations?.find?.((t) => t.language === language)?.title || \"\";\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { Product, ProductTranslation, ProductVariant, ProductVariantTranslation } from \"./models\";\n\nimport { calculateTotalPrice } from \"src/utils/common\";\nimport { MenuAddon, MenuAddonSelectType } from \"src/modules/addon/models\";\nimport { getAddonOptionRawPrice } from \"src/modules/addon/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string\n): ProductTranslation => {\n\treturn (product?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductTranslation;\n};\n\nexport const getProductRawPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tquantity: number = 1\n) => {\n\tconst { price = 0, vat = 0 } = product || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tcurrency: string,\n\tlanguage: string,\n\tquantity: number = 1\n) => {\n\tconst totalPrice = getProductRawPrice(product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getSelectedOptionsTotalPrice = (\n\tproduct: Product,\n\tselectedAddons: orderModels.SelectedAddons = {},\n\tquantity: number\n): number => {\n\t// Filter addons that are selected by the user\n\tconst selectedAddonsList = (product?.addons || []).filter((addon) =>\n\t\tObject.prototype.hasOwnProperty.call(selectedAddons, addon.id)\n\t);\n\n\t// Calculate the total price\n\tconst optionsTotalPrice = selectedAddonsList.reduce((total: number, addon: MenuAddon) => {\n\t\tconst { id: addonId, selectType } = addon;\n\n\t\t// Handle SINGLE selection\n\t\tif (selectType === MenuAddonSelectType.SINGLE) {\n\t\t\tconst selectedOptionId = selectedAddons[addonId] as number;\n\t\t\treturn total + getAddonOptionRawPrice(addon, selectedOptionId);\n\t\t}\n\n\t\t// Handle MULTIPLE selection\n\t\tconst selectedOptionIds = (selectedAddons[addonId] || []) as number[];\n\t\tconst multipleOptionsPrice = selectedOptionIds.reduce(\n\t\t\t(multipleTotal, optionId) => multipleTotal + getAddonOptionRawPrice(addon, optionId),\n\t\t\t0\n\t\t);\n\n\t\treturn total + multipleOptionsPrice;\n\t}, 0);\n\n\treturn optionsTotalPrice * quantity;\n};\n\nexport const getProductVariantRawPrice = (\n\tvariantId: number,\n\tproduct: Pick<Product, \"variants\" | \"vat\">,\n\tquantity?: number\n) => {\n\tconst variant = getProductVariant(product, variantId);\n\tconst { vat } = product || {};\n\tconst { price } = variant || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductVariantPrice = ({\n\tvariantId,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n\tproduct,\n\tquantity = 1,\n}: {\n\tvariantId: number;\n\tcurrency?: string;\n\tlanguage?: string;\n\tproduct: Pick<Product, \"variants\" | \"vat\">;\n\tquantity?: number;\n}) => {\n\tconst totalPrice = getProductVariantRawPrice(variantId, product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariantTranslation = (\n\tvariant: ProductVariant,\n\tlanguage: string\n): ProductVariantTranslation => {\n\treturn (variant?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductVariantTranslation;\n};\n\nexport const getProductOrderRawPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}): { price: number; optionsPrice: number; total: number } => {\n\tif (isEmpty(product)) return { price: 0, optionsPrice: 0, total: 0 };\n\n\tconst productData: Product = { ...product, vat: noVat ? 0 : product.vat };\n\tconst selectedOptionsTotalPrice = getSelectedOptionsTotalPrice(\n\t\tproductData,\n\t\tselectedAddons,\n\t\tquantity\n\t);\n\tconst price = variantId\n\t\t? getProductVariantRawPrice(variantId, productData, quantity)\n\t\t: getProductRawPrice(productData, quantity);\n\n\treturn {\n\t\tprice,\n\t\toptionsPrice: selectedOptionsTotalPrice,\n\t\ttotal: price + selectedOptionsTotalPrice,\n\t};\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tcurrency,\n\tlanguage,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tcurrency: string;\n\tlanguage: string;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}) => {\n\tconst { total } = getProductOrderRawPrice({\n\t\tproduct,\n\t\tvariantId,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tnoVat,\n\t});\n\n\treturn {\n\t\ttotalPrice: total,\n\t\tformattedTotalPrice: priceFormatter(total, currency, language),\n\t};\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","export enum Feature {\n\tORDER = \"feature_order\",\n}\nexport enum FeatureSegment {\n\tALPHA = \"ALPHA\",\n\tBETA = \"BETA\",\n\tALL = \"ALL\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n\tLIFETIME = \"lifeTime\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n\tribbonText?: string;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import az from \"./az\";\nimport en from \"./en\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\n\nexport default {\n\taz,\n\ten,\n\tru,\n\ttr,\n\tnl,\n\tet,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azərbaycan nömrələri 9 rəqəmli olur və 50, 51, 10, 55, 99, 70, 77 və ya 60 ilə başlamalıdır\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Go to checkout\": \"Ödənişə keç\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tAzerbaijan: \"Azərbaycan\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"Get Started\": \"İndi başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Ağıllı QR Menyu\",\n\t\"Link-in-bio\": \"Bio üçün link\",\n\t\"Menu Analytics\": \"Menyu analitikası\",\n\t\"Unlimited Products\": \"Limitsiz məhsul\",\n\t\"Unlimited Categories\": \"Limitsiz kateqoriya\",\n\t\"Product variants\": \"Məhsul variantları\",\n\t\"Product options\": \"Məhsul əlavələri\",\n\t\"Sales reports\": \"Satış hesabatı\",\n\t\"24/7 Support\": \"24/7 dəstək\",\n\t\"Multiple Branches\": \"Şöbələr\",\n\t\"Order Management\": \"Sifarişlərin idarə edilməsi\",\n\t\"Table Management\": \"Masaların idarə edilməsi\",\n\t\"Mobile App for Owners & Staff\": \"Rəhbərlik və ofisiantlar üçün Mobil tətbiq\",\n\t\"Point of Sale (POS)\": \"POS-kassa\",\n\t\"Delivery Management\": \"Çatdırılmaların idarə edilməsi\",\n\t\"Third-Party Delivery Integrations\": \"Çatdırılma partnyorlarının inteqrasiyası\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay ilə ödəniş\",\n\t\"Event management\": \"Tədbirlərin idarəsi\",\n\t\"Unlimited Users\": \"Limitsiz istifadəçi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylıq plan\",\n\tannually: \"İllik plan\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!\",\n\tAppetizer: \"Lite\",\n\t\"Main Course\": \"Plus\",\n\t\"Unlimited Languages\": \"Limitsiz dil seçimi\",\n\t\"30-day money-back guarantee\": \"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.\",\n\t\"Limited Time Only\": \"Məhdud müddətə\",\n\t\"/ lifetime\": \"/ birdəfəlik\",\n\t\"Try for free\": \"Pulsuz yoxla\",\n\t\"No credit card needed\": \"Kart tələb olunmur\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Азербайджанские номера должны содержать 9 цифр и начинаться с 50, 51, 10, 55, 99, 70, 77 или 60\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Go to checkout\": \"Перейти к оплате\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tAzerbaijan: \"Азербайджан\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"Get Started\": \"Начать\",\n\t\"Choose Plan\": \"Выберите план\",\n\t\"Smart QR Menu\": \"Умное меню по QR-коду\",\n\t\"Link-in-bio\": \"Ссылка в био\",\n\t\"Menu Analytics\": \"Аналитика меню\",\n\t\"Unlimited Users\": \"Неограниченные пользователи\",\n\t\"Unlimited Products\": \"Неограниченные продукты\",\n\t\"Unlimited Categories\": \"Неограниченные категории\",\n\t\"Product variants\": \"Варианты продуктов\",\n\t\"Product options\": \"Дополнения к продукту\",\n\t\"Sales reports\": \"Отчеты о продажах\",\n\t\"24/7 Support\": \"24/7 техническая поддержка\",\n\t\"Multiple Branches\": \"Многочисленные филиалы\",\n\t\"Table Management\": \"Управление столами\",\n\t\"Order Management\": \"Управление заказами\",\n\t\"Mobile App for Owners & Staff\": \"Мобильное приложение для владельцев и персонала\",\n\t\"Point of Sale (POS)\": \"POS-касса\",\n\t\"Delivery Management\": \"Управление доставкой\",\n\t\"Third-Party Delivery Integrations\": \"Интеграция со сторонними поставщиками\",\n\t\"RestaroundPay with Mobile\": \"«RestaroundPay» с мобильного\",\n\t\"Event management\": \"Управление мероприятиями\",\n\t\"/ month\": \"/ месяц\",\n\tmonthly: \"Ежемесячный план\",\n\tannually: \"Годовой план\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Тарифы для любого бизнеса - Простой прайс, больше возможностей!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!\",\n\t\"Unlimited Languages\": \"Неограниченное количество языков\",\n\t\"30-day money-back guarantee\": \"Гарантия возврата денег в течение 30 дней\",\n\t\"Limited Time Only\": \"Только ограниченное время\",\n\t\"/ lifetime\": \"/ разово\",\n\t\"Try for free\": \"Попробуйте бесплатно\",\n\t\"No credit card needed\": \"Кредитная карта не требуется\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbaycan numaraları 9 haneli olmalı ve 50, 51, 10, 55, 99, 70, 77 veya 60 ile başlamalıdır\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Go to checkout\": \"Ödemeye geç\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tAzerbaijan: \"Azerbaycan\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"Get Started\": \"Hemen Başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Akıllı QR Menü\",\n\t\"Link-in-bio\": \"Bio için link\",\n\t\"Menu Analytics\": \"Menü Analitiği\",\n\t\"Unlimited Users\": \"Sınırsız kullanıcı\",\n\t\"Unlimited Products\": \"Sınırsız ürün\",\n\t\"Unlimited Categories\": \"Sınırsız kategori\",\n\t\"Product variants\": \"Ürün çeşitleri\",\n\t\"Product options\": \"Ürün seçenekleri\",\n\t\"Sales reports\": \"Satış raporu\",\n\t\"24/7 Support\": \"24/7 Teknik Destek\",\n\t\"Multiple Branches\": \"Şube Yönetimi\",\n\t\"Table Management\": \"Masa Yönetimi\",\n\t\"Order Management\": \"Sipariş Yönetimi\",\n\t\"Mobile App for Owners & Staff\": \"Patron ve Personel için Mobil Uygulama\",\n\t\"Point of Sale (POS)\": \"POS Adisyon Sistemi\",\n\t\"Delivery Management\": \"Paket sipariş yönetimi\",\n\t\"Third-Party Delivery Integrations\": \"Üçüncü Parti Teslimat Entegrasyonları\",\n\t\"RestaroundPay with Mobile\": \"Mobil ile RestaroundPay\",\n\t\"Event management\": \"Etkinlik yönetimi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylık\",\n\tannually: \"Yıllık\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!\",\n\t\"Unlimited Languages\": \"Sınırsız dil seçeneği\",\n\t\"30-day money-back guarantee\": \"30 gün içinde memnun kalmazsanız, paranız iade.\",\n\t\"Limited Time Only\": \"Sınırlı süreyle\",\n\t\"/ lifetime\": \"/ tek seferlik\",\n\t\"Try for free\": \"Ücretsiz dene\",\n\t\"No credit card needed\": \"Kredi kartı gerekmez\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbeidzjaanse nummers moeten 9 cijfers bevatten en beginnen met 50, 51, 10, 55, 99, 70, 77 of 60\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Go to checkout\": \"Ga naar afrekenen\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tAzerbaijan: \"Azerbeidzjan\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"Get Started\": \"Start nu\",\n\t\"Choose Plan\": \"Kies een plan\",\n\t\"Smart QR Menu\": \"Slimme QR-menu\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menu analyse\",\n\t\"Unlimited Products\": \"Onbeperkte producten\",\n\t\"Unlimited Categories\": \"Onbeperkte categorieën\",\n\t\"Unlimited Users\": \"Onbeperkte gebruikers\",\n\t\"Product variants\": \"Productvarianten\",\n\t\"Product options\": \"Productopties\",\n\t\"Sales reports\": \"Verkooprapporten\",\n\t\"24/7 Support\": \"24/7 ondersteuning\",\n\t\"Multiple Branches\": \"Meerdere vestigingen\",\n\t\"Table Management\": \"Tafelbeheer\",\n\t\"Order Management\": \"Orderbeheer\",\n\t\"Mobile App for Owners & Staff\": \"Mobiele app voor eigenaren en personeel\",\n\t\"Point of Sale (POS)\": \"Kassasysteem (POS)\",\n\t\"Delivery Management\": \"Leveringsbeheer\",\n\t\"Third-Party Delivery Integrations\": \"Integraties van derden\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay met mobiel\",\n\t\"Event management\": \"Beheer van evenementen\",\n\t\"/ month\": \"/ maand\",\n\tmonthly: \"Maandelijks\",\n\tannually: \"Jaarlijks\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!\",\n\t\"Unlimited Languages\": \"Onbeperkt aantal talen\",\n\t\"30-day money-back guarantee\": \"30 dagen niet-goed-geld-terug garantie\",\n\t\"Limited Time Only\": \"Beperkte tijd\",\n\t\"/ lifetime\": \"/ eenmalig\",\n\t\"Try for free\": \"Probeer gratis\",\n\t\"No credit card needed\": \"Geen creditcard nodig\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Aserbaidžaani numbrid peavad olema 9-kohalised ja algama 50, 51, 10, 55, 99, 70, 77 või 60-ga\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Go to checkout\": \"Mine kassasse\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tAzerbaijan: \"Aserbaidžaan\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"Get Started\": \"Alustage\",\n\t\"Choose Plan\": \"Vali plaan\",\n\t\"Smart QR Menu\": \"Nutikas QR-menüü\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menüü Analüütika\",\n\t\"Unlimited Products\": \"Piiramata tooted\",\n\t\"Unlimited Categories\": \"Piiramata kategooriad\",\n\t\"Product variants\": \"Tootevariandid\",\n\t\"Product options\": \"Toote valikud\",\n\t\"Sales reports\": \"Müügiaruanded\",\n\t\"24/7 Support\": \"24/7 tugi\",\n\t\"Multiple Branches\": \"Mitu filiaali\",\n\t\"Table Management\": \"Tabelite haldamine\",\n\t\"Order Management\": \"Tellimuste haldamine\",\n\t\"Mobile App for Owners & Staff\": \"Mobiilirakendus omanikele ja töötajatele\",\n\t\"Point of Sale (POS)\": \"Müügipunkt (POS)\",\n\t\"Delivery Management\": \"Tarnejuhtimine\",\n\t\"Third-Party Delivery Integrations\": \"Kolmanda osapoole tarneintegratsioonid\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay koos mobiiliga\",\n\t\"Event management\": \"Sündmuste haldamine\",\n\t\"Unlimited Users\": \"Piiramatu arv kasutajaid\",\n\t\"/ month\": \"/ kuus\",\n\tmonthly: \"Igakuine\",\n\tannually: \"Igal aastal\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!\",\n\t\"Unlimited Languages\": \"Piiramatu arv keeli\",\n\t\"30-day money-back guarantee\": \"30-päevane raha tagasi garantii\",\n\t\"Limited Time Only\": \"Ainult piiratud ajaks\",\n\t\"/ lifetime\": \"/ eluaegne\",\n\t\"Try for free\": \"Proovi tasuta\",\n\t\"No credit card needed\": \"Krediitkaarti pole vaja\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import { DEFAULT_LANGUAGE, SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale) ? locale : DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst { language } = useStoreContext();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <Text color=\"muted\">{volume}</Text>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<Image\n\t\t\t\t\t\tsrc={getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{available && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available } = product || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\tsrc={getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{available && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nimport { generateOrderItemsId, getOrderItemPrice } from \"./utils\";\nimport { Order, OrderItem, OrderPayload, OrderStep, OrderType, SelectedAddons } from \"./models\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nexport const useOrderPriceDetails = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce(\n\t\t(total, item: OrderItem) => {\n\t\t\tconst { totalGross, totalNet, totalTax } = getOrderItemPrice(item);\n\t\t\treturn {\n\t\t\t\ttotalPriceWithTax: total.totalPriceWithTax + totalGross,\n\t\t\t\ttotalPriceWithoutTax: total.totalPriceWithoutTax + totalNet,\n\t\t\t\ttotalTax: total.totalTax + totalTax,\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\ttotalPriceWithTax: 0,\n\t\t\ttotalPriceWithoutTax: 0,\n\t\t\ttotalTax: 0,\n\t\t}\n\t);\n};\n\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst { selectedBranch, businessId } = useStoreContext();\n\tconst { order, orderItems } = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax } = useOrderPriceDetails();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\n\tconst {\n\t\tworkingDayId,\n\t\ttableId,\n\t\temployeeId,\n\t\torderType,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tvat = 0,\n\t} = { ...order, ...existingOrderData };\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\ttotalPriceWithTax,\n\t\ttotalPriceWithoutTax,\n\t\ttotalTax,\n\t\titems: Object.values(orderItems || {}),\n\t\tvat,\n\t\tpaymentMethod,\n\t\tnote,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce((sum, item) => sum + item.quantity, 0);\n};\n\nexport const useOrderItemsTotalPrice = () => {\n\tconst { orderItems } = useOrderContext();\n\tconst { currency, language } = useStoreContext();\n\n\tconst orderItemsTotalPrice = Object.values(orderItems || {}).reduce((sum, item: OrderItem) => {\n\t\tconst { totalGross } = getOrderItemPrice(item);\n\t\treturn sum + totalGross;\n\t}, 0);\n\n\treturn {\n\t\ttotalPrice: orderItemsTotalPrice,\n\t\tformattedTotalPrice: priceFormatter(orderItemsTotalPrice, currency, language),\n\t};\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useOrderItemPrice = (item: OrderItem) => {\n\tconst { language, currency } = useStoreContext();\n\tconst { totalGross } = getOrderItemPrice(item);\n\n\treturn {\n\t\ttotalPrice: totalGross,\n\t\tformattedTotalPrice: priceFormatter(totalGross, currency, language),\n\t};\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { currency, language } = useStoreContext();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst { totalPrice } = useOrderItemsTotalPrice();\n\n\tif (totalPrice < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t},\n\t\t\t\t[styles[size]]\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\" | \"vat\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\t\t\t\tconst { formattedTotalPrice: formattedTotalVariantPrice } =\n\t\t\t\t\tproductUtils.getProductVariantPrice({\n\t\t\t\t\t\tvariantId: id,\n\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tproduct,\n\t\t\t\t\t});\n\n\t\t\t\tconst { title } = productUtils.getProductVariantTranslation(variant, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={title}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{formattedTotalVariantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst { title } = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{title}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\n\t\t\t\t\t\t\t\tconst { formattedTotalPrice: formattedTotalOptionPrice } =\n\t\t\t\t\t\t\t\t\taddonUtils.getOptionPrice({\n\t\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tconst { title: optionTitle } = addonUtils.getAddonOptionTranslation(\n\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\tlanguage\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{formattedTotalOptionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import { Button, Column, IconButton, Modal, Row } from \"@sorocraft/ui\";\nimport { Close } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n}: Props) => {\n\tconst modalRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\n\tconst { formattedTotalPrice: formattedTotalOrderPrice } = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\tsrc={getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t<Column>\n\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{formattedTotalOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</Column>\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\n\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tonClose: () => void;\n}\n\n// Product modal\nconst ProductDetails = ({ product, onClose }: Props) => {\n\tconst { language, currency } = useStoreContext();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(1);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity]\n\t);\n\n\tuseEffect(() => {\n\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : 1);\n\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t}, [productQuantityInOrder, product]);\n\n\tuseEffect(() => {\n\t\tsetSelectedVariant(null);\n\t\tsetSelectedAddons({});\n\t}, [product]);\n\n\tconst handleSetFocusedSection = (section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t};\n\n\tconst handleSubmit = () => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tif (onClose) onClose();\n\t};\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled]\n\t);\n\n\tconst handleOptionSelect = ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove = false,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => {\n\t\tsetSelectedAddons((prevForm) => {\n\t\t\t// For single selection, directly replace the value\n\t\t\tif (isSingle) {\n\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t}\n\n\t\t\t// Handle multiple selection\n\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\tconst updatedSelection = isRemove\n\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\treturn {\n\t\t\t\t...prevForm,\n\t\t\t\t[addonId]: updatedSelection,\n\t\t\t};\n\t\t});\n\t};\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tonClose={onClose}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks } from \"src/modules/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemsTotalPrice();\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t{formattedTotalPrice}\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import styles from \"./FloatingOrdersButton.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as orderHooks } from \"src/modules/order\";\n\nimport OrderStepper from \"../OrderStepper\";\n\nconst FloatingOrdersButton = () => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\n\tif (totalCount <= 0) return null;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<OrderStepper onClick={() => setIsOrderOpen(true)} actionText={t(\"View order\")} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default FloatingOrdersButton;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { phoneNumber, email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.PHONE: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Go to checkout\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import { API } from \"src/services/api\";\n\nimport { OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn API.post(\"customer/order\", order);\n};\n","import { models as productModels } from \"src/modules/product\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useProductById = (productId: number): productModels.Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as productModels.Product;\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useProductById } from \"src/hooks/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id)\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language)?.title;\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language)?.title)\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { useProductById } from \"src/hooks/product\";\nimport { models as orderModels, utils as orderUtils, hooks as orderHooks } from \"src/modules/order\";\nimport { useStoreContext } from \"src/store\";\nimport { utils as productUtils } from \"src/modules/product\";\nimport { getImageSource } from \"src/utils/image\";\n\nimport Image from \"src/components/Image\";\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst { language } = useStoreContext();\n\tconst { image160 } = product;\n\tconst { title: variantTitle } = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemPrice(item);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<Image\n\t\t\t\t\tsrc={getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useStoreContext } from \"src/store\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst { language } = useStoreContext();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst orderMethods: Method[] = orderTypes.map(\n\t\t({ type, icon, title, isDisabled }, index: number) => ({\n\t\t\tvalue: type,\n\t\t\tisDisabled,\n\t\t\tlabel: (\n\t\t\t\t<Tooltip\n\t\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_FOR_BUSINESS\") : null}\n\t\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t\t>\n\t\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tcolor={type === orderType && !isDisabled ? \"white\" : \"normal\"}\n\t\t\t\t\t\t\twhiteSpace=\"nowrap\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t</Tooltip>\n\t\t\t),\n\t\t})\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalTax: number;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax,\n\ttotalPriceWithTax,\n\ttotalTax,\n\tcurrency,\n\tlanguage,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalPriceWithTaxFormatted = priceFormatter(totalPriceWithTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { Accordion, Column, Input, InputType, Method, Padding, Row } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\n\nconst OrderDrawerDetails = () => {\n\tconst { language, currency } = useStoreContext();\n\tconst {\n\t\torder: { orderType, paymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax } = orderHooks.usePrepareOrder();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } =\n\t\tbranchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !deliveryOrderEnabled || !isDelivering,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !dineInOrderEnabled || !isOpen,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !pickupOrderEnabled || !isOpen,\n\t\t},\n\t];\n\n\tconst paymentMethods: Method[] = [\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CASH,\n\t\t\tlabel: t(\"Cash\"),\n\t\t},\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CARD,\n\t\t\tlabel: t(\"Card\"),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<Row className={styles.paymentMethods}>\n\t\t\t\t{paymentMethods.map(({ label, value }) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tlabel={label as string}\n\t\t\t\t\t\tname=\"paymentMethod\"\n\t\t\t\t\t\tonChange={() => updateOrder({ paymentMethod: value as orderModels.PaymentMethod })}\n\t\t\t\t\t\tchecked={paymentMethod === value}\n\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Row>\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleTagName=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={totalPriceWithoutTax}\n\t\t\t\ttotalPriceWithTax={totalPriceWithTax}\n\t\t\t\ttotalTax={totalTax}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerDetails;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useStoreContext } from \"src/store\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst { hostname, language } = useStoreContext();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport { Column, DivElementMap, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport * as categoryUtils from \"src/utils/category\";\nimport { utils as productUtils } from \"src/modules/product\";\nimport * as menuModels from \"src/models/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { Product, ProductView } from \"src/models\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\nimport ProductDetails from \"../ProductDetails\";\nimport FloatingOrdersButton from \"../FloatingOrdersButton\";\nimport OrderDrawer from \"../OrderDrawer\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [selectedProduct, setSelectedProduct] = useState<Product | null>(null);\n\t\tconst [view, setView] = useState<ProductView>(ProductView.LIST);\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetSelectedProduct(product);\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<Column>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t\t<ProductDetails product={selectedProduct} onClose={() => setSelectedProduct(null)} />\n\t\t\t\t<FloatingOrdersButton />\n\t\t\t\t<OrderDrawer />\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { ReactNode } from \"react\";\nimport { Column, Container, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { models as branchModels, utils as branchUtils } from \"src/modules/branch\";\nimport { getCoverPhotoSource } from \"src/utils/image\";\n\nimport Image from \"src/components/Image\";\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst { business } = useStoreContext();\n\tconst Parent = ({ children, id }: { children: ReactNode; id: number }) => {\n\t\tif (onBranchSelect) {\n\t\t\treturn (\n\t\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tconst clearRootPath = branchUtils.normalizeRootPath(rootPath);\n\n\t\treturn (\n\t\t\t<a href={`${clearRootPath}/${id}`} className={styles.item}>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map((branch) => {\n\t\t\t\t\tconst { id, address, coverPhoto } = branch;\n\t\t\t\t\tconst venueName = branchUtils.getVenueName(business?.name, false, branch);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\t\tcontent: true,\n\t\t\t\t\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{coverPhoto && (\n\t\t\t\t\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\t\t\tsrc={getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\t\t\tpriority\n\t\t\t\t\t\t\t\t\t\t\tsizes=\"100vw\"\n\t\t\t\t\t\t\t\t\t\t\tfetchPriority=\"high\"\n\t\t\t\t\t\t\t\t\t\t\tloading=\"eager\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<Column\n\t\t\t\t\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\t\t\t\t\tfullHeight\n\t\t\t\t\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\t\t\t\t\tgap={0.5}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<h2 className={styles.name}>{venueName}</h2>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Parent>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import {\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tRow,\n\tSelectOption,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { isNumber } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { models as customerModels, utils as customerUtils } from \"src/modules/customer\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { getBaseUrl } from \"src/utils/url\";\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (phoneNumber: string) => void;\n}\n\nconst PhoneStep = ({ formErrors, onChange }: Props) => {\n\tconst countryCodeOptions: SelectOption[] = viewConstants.SUPPORTED_COUNTRIES.map(\n\t\t({ phoneCode }) => ({\n\t\t\tlabel: phoneCode,\n\t\t\tvalue: phoneCode,\n\t\t})\n\t);\n\n\tconst { hostname, language } = useStoreContext();\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst [form, setForm] = useState<customerModels.CustomerAuthPhoneForm>({\n\t\tcountryCode: countryCodeOptions[0].value as string,\n\t\tphoneNumber: \"\",\n\t});\n\n\tconst { url: baseUrl } = getBaseUrl(hostname, language);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst { name, value } = e?.target || {};\n\n\t\tif (!name) return;\n\n\t\tconst trimmedValue = value?.trim() ?? \"\";\n\n\t\tif (name === \"phoneNumber\" && trimmedValue !== \"\" && !isNumber(trimmedValue)) return;\n\n\t\tconst updatedForm = { ...form, [name]: trimmedValue };\n\n\t\tconst preparedPhoneNumber = customerUtils.preparePhoneNumber(updatedForm);\n\t\tonChange(preparedPhoneNumber);\n\n\t\tsetForm(updatedForm);\n\t};\n\n\treturn (\n\t\t<Column gap={1} fullWidth>\n\t\t\t<Row fullWidth alignItems=\"flex-start\">\n\t\t\t\t<Input\n\t\t\t\t\tname=\"countryCode\"\n\t\t\t\t\toptions={countryCodeOptions}\n\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\tclassName={styles.countryCode}\n\t\t\t\t\tvalue={form.countryCode}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t/>\n\t\t\t\t<Input\n\t\t\t\t\tname=\"phoneNumber\"\n\t\t\t\t\tplaceholder={t(\"Phone number\")}\n\t\t\t\t\ttype={InputType.TEL}\n\t\t\t\t\tfullWidth\n\t\t\t\t\tvalue={form.phoneNumber}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\terrorMessage={tError(formErrors.phoneNumber)}\n\t\t\t\t/>\n\t\t\t</Row>\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\nexport default PhoneStep;\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", {\n\t\t\t\t\taddress,\n\t\t\t\t})}\n\t\t\t</Text>\n\t\t\t<OTPInput onChangeOTP={onChange} errorMessage={tError(errorMessage)} inputMode=\"numeric\" />\n\t\t</Column>\n\t);\n};\nexport default OTPStep;\n","import {\n\tButton,\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n\tonCancel: () => void;\n}\n\nconst EmailStep = ({ formErrors, onChange, onCancel }: Props) => {\n\tconst { customer } = useOrderContext();\n\tconst [email, setEmail] = useState(customer?.email || \"\");\n\n\tconst { t: tAuth } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange]\n\t);\n\n\tuseEffect(() => {\n\t\tconst updateEmailIfNeeded = async () => {\n\t\t\tif (customer?.email && customer.email !== email) {\n\t\t\t\tsetEmail(customer.email);\n\t\t\t}\n\t\t};\n\n\t\tupdateEmailIfNeeded();\n\t}, [customer?.email, email]);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t{!email && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={onCancel}\n\t\t\t\t\tlabel={tAuth(\"I don't have an email\")}\n\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t<HoursList title=\"Delivery Hours\" days={deliveryDays} />\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\nimport { DivElementMap, ModalProvider, ModalsMap } from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport { getCoverPhotoSource, getLogoImageSource } from \"src/utils/image\";\nimport { getBaseUrl } from \"src/utils/url\";\nimport { prepareCategoryAndProductMap } from \"src/utils/menu\";\nimport { StoreProvider, useStoreContext } from \"src/store\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { getCategoryNameById } from \"src/utils/category\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { utils as branchUtils } from \"src/modules/branch\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst {\n\t\tname,\n\t\tcoverPhoto,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tselectedBranch,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\thostname,\n\t\tonBranchSelect,\n\t} = useStoreContext();\n\n\tconst hasSingleBranch = branches.length <= 1;\n\tconst categoryProductMap = prepareCategoryAndProductMap(categories, products);\n\n\tconst venueName = branchUtils.getVenueName(name, hasSingleBranch, selectedBranch);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst canUserScroll = useRef<boolean>(true);\n\tconst { url: baseUrl, domain } = getBaseUrl(hostname, language);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language]\n\t);\n\n\tconst handleCategoryFromURL = useCallback(() => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\tuseEffect(() => {\n\t\tgetCustomer();\n\t}, [getCustomer]);\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverPhoto={getCoverPhotoSource(coverPhoto)}\n\t\t\t\tlogoImage={getLogoImageSource(logoImage)}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t\thasSingleBranch={hasSingleBranch}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tcontainerRef={containerRef}\n\t\t\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{!!hostname && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport PhoneStep from \"./PhoneStep\";\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\tphoneNumber: \"\",\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.PHONE\n\t);\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer, customer } = useOrderContext();\n\n\tconst steps = [\n\t\tcustomerModels.CustomerAuthStep.PHONE,\n\t\tcustomerModels.CustomerAuthStep.OTP,\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => {\n\t\tsetModal(null);\n\t};\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentStepIndex = steps.findIndex((step) => step === currentStep) || 0;\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= steps.length) return completeAuth();\n\n\t\tconst nextStep = steps[nextStepIndex];\n\t\tsetCurrentStep(nextStep);\n\t};\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\t// In email step, if customer didn't change the email, continue without doing anything.\n\t\t\tconst isEmailStep = currentStep === customerModels.CustomerAuthStep.EMAIL;\n\t\t\tconst isEmailUnchanged = customer?.email === form.email;\n\t\t\tconst isEmailEmptyButPreviouslySet = !!customer?.email && !form.email;\n\t\t\tif (isEmailStep && (isEmailUnchanged || isEmailEmptyButPreviouslySet)) {\n\t\t\t\treturn goToNextStep();\n\t\t\t}\n\n\t\t\tconst validationErrors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(validationErrors)) return setFormErrors(validationErrors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.PHONE: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.phoneNumber);\n\t\t\t\t\t// TODO: errors field gelir check ele. docs-da var.\n\t\t\t\t\tif (response?.status !== 200) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.phoneNumber);\n\t\t\t\t\tif (!response?.accessToken) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.update({ email: form.email });\n\t\t\t\t\tif (response?.status !== 200) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: string) => (value: string) => {\n\t\t\tsetForm((currentForm) => ({\n\t\t\t\t...currentForm,\n\t\t\t\t[field]: value,\n\t\t\t}));\n\t\t},\n\t\t[]\n\t);\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.phoneNumber}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\treturn (\n\t\t\t\t\t<EmailStep\n\t\t\t\t\t\tonChange={handleChange(\"email\")}\n\t\t\t\t\t\tonCancel={completeAuth}\n\t\t\t\t\t\tformErrors={formErrors}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn <PhoneStep onChange={handleChange(\"phoneNumber\")} formErrors={formErrors} />;\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst { language, selectedBranch } = useStoreContext();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\n\tconst adressError =\n\t\tformErrors.countryCode || formErrors.cityName || formErrors.street || formErrors.houseNumber;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => ({\n\t\t\t...currentForm,\n\t\t\t[name]: value,\n\t\t}));\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber,\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t},\n\t\t[form]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { Category, CategoryProductMap, Product } from \"src/models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: Category[],\n\tproducts: Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n","import { PlanType, PricingPlans } from \"./models\";\n\nexport const PRICING: PricingPlans = {\n\tappetizer: {\n\t\ttitle: \"Appetizer\",\n\t\tprice: {\n\t\t\tmonthly: 9,\n\t\t\tannually: 7,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tmainCourse: {\n\t\ttitle: \"Main Course\",\n\t\tprice: {\n\t\t\tmonthly: 19,\n\t\t\tannually: 15,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tchefsSpecial: {\n\t\ttitle: \"Chef's Special\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 39,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tlifeTime: {\n\t\ttitle: \"Lifetime\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 49,\n\t\t},\n\t\tribbonText: \"Limited Time Only\",\n\t\t// discountedPrice: 0,\n\t},\n};\n\nexport const PRICING_BENEFITS = [\n\t{\n\t\ttitle: \"Smart QR Menu\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Link-in-bio\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Menu Analytics\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Users\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Products\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Categories\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Languages\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product variants\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product options\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Premium Support\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"SEO\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Sales reports\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Table Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Order Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Delivery Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Multiple Branches\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Point of Sale (POS)\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t{\n\t\ttitle: \"Mobile App for Owners & Staff\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t// {\n\t// \ttitle: \"RestaroundPay with Mobile\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Event management\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Third-Party Delivery Integrations\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: false,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// \t[PlanType.LIFETIME]: false,\n\t// },\n];\n\nexport const LIFETIME_PROMO_CODES = [\"LIFETIME_49\"];\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tplan: subscriptionModels.PlanType;\n\tlanguage: string;\n\tinterval: subscriptionModels.PricingInterval;\n\tcurrency: string;\n}\n\nconst PricingPlanAmount = ({ plan, language, interval, currency }: Props) => {\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst { price, discountedPrice } = subscriptionConstants.PRICING[plan];\n\tconst intervalPrice = price[interval];\n\tconst intervalPriceText =\n\t\tplan === subscriptionModels.PlanType.LIFETIME ? \"/ lifetime\" : \"/ month\";\n\n\tif (discountedPrice !== undefined) {\n\t\treturn (\n\t\t\t<Column gap={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<span className={styles.discountedPrice}>\n\t\t\t\t\t\t{priceFormatter(discountedPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className={styles.originalPrice}>\n\t\t\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t</Row>\n\t\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t\t</Column>\n\t\t);\n\t}\n\treturn (\n\t\t<Row gap={0.5}>\n\t\t\t<Text size=\"xxl\" variant=\"bold\">\n\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t</Text>\n\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t</Row>\n\t);\n};\nexport default PricingPlanAmount;\n","import { Card, SVGIcon, UIElementType, Button, Row } from \"@sorocraft/ui\";\nimport { Check, Minus, ShieldDollar } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ReactNode, useState } from \"react\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport { getRegisterUrl } from \"src/utils/url\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\n\nimport PricingPlanAmount from \"./PricingPlanAmount\";\n\ninterface Props {\n\tcurrency: string;\n\tlanguage: string;\n\tisLoading?: boolean;\n\tpromoCode?: string | null;\n\tonPlanSelect?: (plan: subscriptionModels.PlanType) => void;\n\tonIntervalSelect?: (interval: subscriptionModels.PricingInterval) => void;\n}\n\ninterface PlanParentProps {\n\tchildren: ReactNode;\n\tplan: subscriptionModels.PlanType;\n}\n\nconst Pricing = ({\n\tcurrency,\n\tlanguage,\n\tisLoading = false,\n\tonPlanSelect,\n\tonIntervalSelect,\n}: Props) => {\n\tconst [selectedInterval, setSelectedInterval] =\n\t\tuseState<subscriptionModels.PricingInterval>(\"annually\");\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst plans: subscriptionModels.PlanType[] = [\n\t\tsubscriptionModels.PlanType.APPETIZER,\n\t\tsubscriptionModels.PlanType.MAIN_COURSE,\n\t\tsubscriptionModels.PlanType.CHEFS_SPECIAL,\n\t];\n\tconst intervals: Array<subscriptionModels.PricingInterval> = [\"annually\", \"monthly\"];\n\tconst isDashboard = Boolean(onPlanSelect);\n\tconst actionTitle = isDashboard ? \"Choose Plan\" : \"Try for free\";\n\n\tconst handleSelectInterval = (interval: subscriptionModels.PricingInterval) => {\n\t\tsetSelectedInterval(interval);\n\t\tif (onIntervalSelect) {\n\t\t\tonIntervalSelect(interval);\n\t\t}\n\t};\n\n\tconst PlanParent = ({ children, plan }: PlanParentProps) => {\n\t\tconst { ribbonText } = subscriptionConstants.PRICING[plan];\n\t\tconst hasRibbon = Boolean(ribbonText);\n\n\t\tconst commonProps = {\n\t\t\tclassName: classNames(styles, { plan: true, hasRibbon }),\n\t\t\t\"data-ribbon\": t(ribbonText),\n\t\t};\n\n\t\tif (onPlanSelect) {\n\t\t\treturn (\n\t\t\t\t<div {...commonProps} onClick={() => !isLoading && onPlanSelect(plan)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\t{...commonProps}\n\t\t\t\thref={getRegisterUrl(language, `pricing-${plan}`)}\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.intervals}>\n\t\t\t\t{intervals.map((interval) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={interval}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\tinterval: true,\n\t\t\t\t\t\t\tactive: selectedInterval === interval,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonClick={() => handleSelectInterval(interval)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(interval)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className={styles.plans}>\n\t\t\t\t{plans.map((plan) => (\n\t\t\t\t\t<PlanParent key={plan} plan={plan}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<div className={styles.title}>{t(subscriptionConstants.PRICING[plan].title)}</div>\n\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t<PricingPlanAmount\n\t\t\t\t\t\t\t\t\tplan={plan}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\tinterval={selectedInterval}\n\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.action}>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={t(actionTitle)}\n\t\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\ttype={\n\t\t\t\t\t\t\t\t\t\tplan === subscriptionModels.PlanType.MAIN_COURSE\n\t\t\t\t\t\t\t\t\t\t\t? UIElementType.PRIMARY\n\t\t\t\t\t\t\t\t\t\t\t: UIElementType.BORDERED_PRIMARY\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={() => {}}\n\t\t\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.benefits}>\n\t\t\t\t\t\t\t\t{!isDashboard && (\n\t\t\t\t\t\t\t\t\t<Row className={styles.moneyBack} gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={ShieldDollar} size=\"sm\" color={UIElementType.SUCCESS} />\n\t\t\t\t\t\t\t\t\t\t<span>{t(\"No credit card needed\")}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{subscriptionConstants.PRICING_BENEFITS.map((benefit) => (\n\t\t\t\t\t\t\t\t\t<div key={benefit.title} className={styles.benefit}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={benefit[plan] ? Check : Minus} size=\"md\" />{\" \"}\n\t\t\t\t\t\t\t\t\t\t<span>{t(benefit.title)}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</PlanParent>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Pricing;\n"],"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","rejected","result","done","then","apply","SuppressedError","IMAGE_BASE_URL","getImageSource","image","includes","startsWith","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","keyStr","triplet","e1","e2","e3","charAt","CO_DOMAIN","DOMAINS","getBaseUrl","hostname","language","domain","url","getRegisterUrl","source","tld","getTLD","MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","StoreContext","createContext","StoreProvider","children","contextValue","useMemo","isEmpty","branches","selectedBranch","find","item","id","Number","branchId","assign","currency","_jsx","Provider","useStoreContext","useContext","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","getCategoryTranslation","category","_b","_a","translations","storage","Storage","validators","number","AZERBAIJANI_PREFIXES","RegExp","join","test","isValid","error","validatePhoneNumber","phoneNumber","cleaned","replace","countryCode","nationalNumber","slice","validator","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","initialOrder","orderType","totalPriceWithTax","totalPriceWithoutTax","totalTax","vat","paymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","OrderErrors","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","entries","map","addonId","option","optionIds","Array","isArray","sortNumbers","filter","Boolean","getOrderItemPrice","orderItem","price","variant","addons","quantity","basePrice","addonsPrice","reduce","total","addon","addonTotal","options","sum","calculatSingleAddonTotalPrice","calculateTotalAddonPrice","itemNetPrice","itemTax","itemGrossPrice","totalGross","totalNet","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_URL","request","method","endpoint","body","accessToken","getAuthToken","response","fetch","headers","Authorization","credentials","JSON","stringify","data","json","ok","API","update","payload","logException","args_1","errorInfo","trackEvent","message","console","getVenueName","businessName","hasSingleBranch","getHoursForDay","schedule","weekDayIndex","days","day","hours","splitHours","split","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","updatedOrderItems","acc","viewServices.storage","commonServices.logException","file","force","orderUtils.getOrderErrorMessages","useOrderContext","BranchSetting","Image","props","priority","_","blurDataURL","__","quality","___","placeholder","____","fetchPriority","_____","imgProps","imageTag","r","g","b","Languages","languages","onLanguageSelect","isOptionsOpen","setIsOptionsOpen","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","handleSelectLanguages","alt","currentLanguage","BackIcon","size","theme","business","window","username","location","pathname","history","back","SVGIcon","icon","ChevronLeft","BranchInfo","branch","address","latitude","longitude","googleMapLink","Column","justifyContent","fullHeight","fullWidth","Flex","direction","Item","width","height","shrink","href","target","rel","MarkerPin","color","UIElementType","DEFAULT","BusinessInfo","Header","instagram","facebook","whatsapp","telegram","tiktok","setModal","useModalContext","phone","wifiPassword","noBranch","isBusinessHoursAvailable","cover","sizes","loading","content","social","links","IconLink","Phone","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","businessHours","viewConstants.MODALS","params","Clock","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","scrollTo","left","behavior","useEffect","Carousel","onGetRef","ref","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","type","BORDERED_PRIMARY","active","el","ProductView","calculateTotalPrice","MenuAddonSelectType","getAddonTranslation","getAddonOptionTranslation","getAddonOptionRawPrice","getProductTranslation","getProductRawPrice","getProductPrice","totalPrice","formattedTotalPrice","priceFormatter","getProductVariant","getProductVariantRawPrice","getProductVariantTranslation","getProductOrderRawPrice","noVat","optionsPrice","productData","selectedOptionsTotalPrice","selectType","SINGLE","selectedOptionId","multipleTotal","getSelectedOptionsTotalPrice","BusinessSetting","CustomerAuthStep","CustomerAddressType","Feature","FeatureSegment","PlanType","SubscriptionStatus","TableShape","TableStatus","TableLocation","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","FEATURE_NOT_AVAILABLE_FOR_SEGMENT","ORDER_TYPE_DISABLED_FOR_BUSINESS","COUNTRY_REQUIRED","CITY_REQUIRED","STREET_REQUIRED","STREET_NUMBER_REQUIRED","OUT_OF_DELIVERY_RANGE","NO_ORDER_TYPE","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Country","City","Address","Azerbaijan","Floor","Events","monthly","annually","Appetizer","Closed","en","ru","tr","nl","et","common","auth","events","pricing","useTranslation","ns","locale","supportedLocale","key","translation","keys","k","getTranslations","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","productUtils.getProductPrice","hasVariant","hasAddons","hasImage","isClickable","noImage","info","Text","notAvailableText","notAvailable","addToOrder","IconButton","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","onAddProduct","image580","image1024","imageContainer","ProductsGridItemContainer","useCustomerAddress","addresses","usePrepareOrder","existingOrderData","businessId","values","useOrderPriceDetails","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","useTotalOrderItemsCount","useOrderItemsTotalPrice","orderItemsTotalPrice","useDeliveryDistanceError","branchCoordinates","branchHooks.useBranchCoordinates","maxDeliveryDistance","setError","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","minDeliveryAmount","amount","Quantity","isDecreaseDisabled","onIncrease","onDecrease","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","isInPublicMenu","onModalClose","flex","Trash","DANGER","tooltip","ShoppingBag","SUCCESS","ProductVariants","focusedSection","onSelectVariant","containerRef","isVariantsFocused","scrollIntoView","focused","variantsTitle","formattedTotalVariantPrice","productUtils.getProductVariantPrice","title","productUtils.getProductVariantTranslation","Input","label","onChange","checked","InputType","RADIO","noMargin","variantPrice","ProductAddons","onOptionSelect","addonUtils.getAddonTranslation","formattedTotalOptionPrice","addonUtils.getOptionPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","optionPrice","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","onClose","setSelectedVariant","adjustQuantity","onSubmit","modalRef","formattedTotalOrderPrice","productUtils.getProductOrderPrice","handleClickOutside","event","contains","hasVariants","Modal","noBodyPadding","details","choices","close","Close","footer","Button","addAction","disabled","paddingBlock","ProductDetails","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","Math","max","prevForm","previousSelection","updatedSelection","Set","setTimeout","OrderStepper","actionText","isLoading","totalCount","orderHooks.useTotalOrderItemsCount","orderHooks.useOrderItemsTotalPrice","count","Loading","FloatingOrdersButton","validateAddressForm","form","cityName","street","houseNumber","formatAddressLine","additionalNumber","OrderDrawerFooter","isOrderItemsEmpty","orderError","tError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","PRIMARY","getActionText","useProductById","products","ProductQuantity","min","productHooks.useProductQuantity","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","addonTitle","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","variantTitle","orderHooks.useOrderItemPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","SELECT","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","index","orderMethods","position","flexWrap","whiteSpace","MethodSelection","methods","selectedMethod","OrderPaymentSummary","textSize","totalPriceWithoutTaxFormatted","totalPriceWithTaxFormatted","totalTaxFormatted","OrderDrawerDetails","Grid","paymentMethods","CARD","Padding","paddingInline","Accordion","style","noPadding","headerPaddingInline","headerPaddingBlock","titleTagName","OrderDrawerCompleted","Check","align","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","Products","memo","productBlocksRef","onCategoryInView","selectedProduct","setSelectedProduct","view","setView","LIST","views","List","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","top","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","Branches","rootPath","onBranchSelect","Parent","clearRootPath","endsWith","branchUtils.normalizeRootPath","Container","list","venueName","branchUtils.getVenueName","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","ChevronUp","PhoneStep","formErrors","countryCodeOptions","viewConstants.SUPPORTED_COUNTRIES","setForm","baseUrl","handleChange","trimmedValue","trim","isNumber","updatedForm","preparedPhoneNumber","replaceAll","customerUtils.preparePhoneNumber","TEL","errorMessage","terms","OTPStep","OTPInput","onChangeOTP","inputMode","EmailStep","onCancel","email","setEmail","tAuth","newValue","EMAIL","HoursList","weight","isClosed","timeText","BranchBusinessHours","openingDays","deliveryDays","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","otp","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","PHONE","steps","OTP","completeAuth","goToNextStep","currentForm","inline","renderStep","isEmailStep","isEmailUnchanged","isEmailEmptyButPreviouslySet","validationErrors","viewUtils.validatePhoneNumber","checkIsValidEmail","customerUtils.validateForm","status","customerServices.verifyOTP","saveAuthToken","customerServices.update","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","floor","instructions","postCode","initalForm","addressId","adressError","defaultAdressText","closeModal","handleSelectGoogleSuggestion","suggestion","lat","long","customerUtils.validateAddressForm","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","PublicMenu","categories","productMap","push","prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","block","scrollToProductBlock","handleCategoryInView","getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","get","categoryToSelect","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart","PRICING","appetizer","mainCourse","chefsSpecial","lifeTime","ribbonText","PRICING_BENEFITS","APPETIZER","MAIN_COURSE","CHEFS_SPECIAL","LIFETIME","PricingPlanAmount","plan","interval","discountedPrice","subscriptionConstants.PRICING","intervalPrice","intervalPriceText","subscriptionModels.PlanType","originalPrice","Pricing","onPlanSelect","onIntervalSelect","selectedInterval","setSelectedInterval","plans","PlanParent","hasRibbon","commonProps","intervals","handleSelectInterval","benefits","moneyBack","ShieldDollar","subscriptionConstants.PRICING_BENEFITS","benefit"],"mappings":"mtCA0CO,SAASA,GAAOC,EAAGC,GACtB,IAAIC,EAAI,CAAA,EACR,IAAK,IAAIC,KAAKH,EAAOI,OAAOC,UAAUC,eAAeC,KAAKP,EAAGG,IAAMF,EAAEO,QAAQL,GAAK,IAC9ED,EAAEC,GAAKH,EAAEG,IACb,GAAS,MAALH,GAAqD,mBAAjCI,OAAOK,sBACtB,KAAIC,EAAI,EAAb,IAAgBP,EAAIC,OAAOK,sBAAsBT,GAAIU,EAAIP,EAAEQ,OAAQD,IAC3DT,EAAEO,QAAQL,EAAEO,IAAM,GAAKN,OAAOC,UAAUO,qBAAqBL,KAAKP,EAAGG,EAAEO,MACvER,EAAEC,EAAEO,IAAMV,EAAEG,EAAEO,IAF4B,CAItD,OAAOR,CACX,CA8DO,SAASW,GAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,S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,WAFRgb,EAAQhb,gBAjCLyZ,SA2Cd","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/tslib/tslib.es6.js","../src/utils/image.ts","../src/utils/constants.ts","../src/utils/url.ts","../src/modules/view/constants.ts","../src/store/index.tsx","../src/constants/analytics.ts","../src/utils/category.ts","../src/modules/view/services.ts","../src/modules/view/utils.ts","../src/modules/order/models.ts","../src/modules/order/constants.ts","../src/modules/order/utils.ts","../src/constants/env.ts","../src/services/api/index.ts","../src/modules/customer/services.ts","../src/modules/common/services.ts","../src/modules/branch/utils.ts","../src/modules/branch/hooks.ts","../src/modules/store/hooks.ts","../src/store/order.tsx","../src/modules/branch/models.ts","../src/components/Image/Image.tsx","../src/components/PublicMenu/Header/Languages/Languages.tsx","../src/components/BackIcon/BackIcon.tsx","../src/components/PublicMenu/Header/BranchInfo/BranchInfo.tsx","../src/components/PublicMenu/Header/BusinessInfo/BusinessInfo.tsx","../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/modules/product/models.ts","../src/utils/common.ts","../src/modules/addon/models.ts","../src/modules/addon/utils.ts","../src/modules/product/utils.ts","../src/modules/business/models.ts","../src/modules/customer/models.ts","../src/modules/feature/models.ts","../src/modules/subscription/models.ts","../src/modules/table/models.ts","../src/services/translation/locales/index.ts","../src/services/translation/locales/az/index.ts","../src/services/translation/locales/az/error.ts","../src/services/translation/locales/az/common.ts","../src/services/translation/locales/az/order.ts","../src/services/translation/locales/az/customer.ts","../src/services/translation/locales/az/auth.ts","../src/services/translation/locales/az/events.ts","../src/services/translation/locales/az/pricing.ts","../src/services/translation/locales/az/branch.ts","../src/services/translation/locales/en/index.ts","../src/services/translation/locales/en/error.ts","../src/services/translation/locales/en/common.ts","../src/services/translation/locales/en/order.ts","../src/services/translation/locales/en/customer.ts","../src/services/translation/locales/en/auth.ts","../src/services/translation/locales/en/events.ts","../src/services/translation/locales/en/pricing.ts","../src/services/translation/locales/en/branch.ts","../src/services/translation/locales/ru/index.ts","../src/services/translation/locales/ru/error.ts","../src/services/translation/locales/ru/common.ts","../src/services/translation/locales/ru/order.ts","../src/services/translation/locales/ru/customer.ts","../src/services/translation/locales/ru/auth.ts","../src/services/translation/locales/ru/events.ts","../src/services/translation/locales/ru/pricing.ts","../src/services/translation/locales/ru/branch.ts","../src/services/translation/locales/tr/index.ts","../src/services/translation/locales/tr/error.ts","../src/services/translation/locales/tr/common.ts","../src/services/translation/locales/tr/order.ts","../src/services/translation/locales/tr/customer.ts","../src/services/translation/locales/tr/auth.ts","../src/services/translation/locales/tr/events.ts","../src/services/translation/locales/tr/pricing.ts","../src/services/translation/locales/tr/branch.ts","../src/services/translation/locales/nl/index.ts","../src/services/translation/locales/nl/error.ts","../src/services/translation/locales/nl/common.ts","../src/services/translation/locales/nl/order.ts","../src/services/translation/locales/nl/customer.ts","../src/services/translation/locales/nl/auth.ts","../src/services/translation/locales/nl/events.ts","../src/services/translation/locales/nl/pricing.ts","../src/services/translation/locales/nl/branch.ts","../src/services/translation/locales/et/index.ts","../src/services/translation/locales/et/error.ts","../src/services/translation/locales/et/common.ts","../src/services/translation/locales/et/order.ts","../src/services/translation/locales/et/customer.ts","../src/services/translation/locales/et/auth.ts","../src/services/translation/locales/et/events.ts","../src/services/translation/locales/et/pricing.ts","../src/services/translation/locales/et/branch.ts","../src/services/translation/index.ts","../src/hooks/translation.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItem.tsx","../src/components/PublicMenu/ProductsGridItem/ProductsGridItemContainer.tsx","../src/modules/customer/hooks.ts","../src/modules/order/hooks.ts","../src/components/Quantity/Quantity.tsx","../src/components/PublicMenu/ProductInOrder/ProductInOrder.tsx","../src/components/PublicMenu/ProductVariants/ProductVariants.tsx","../src/components/PublicMenu/ProductAddons/ProductAddons.tsx","../src/components/PublicMenu/ProductDetails/ProductDetailsUI.tsx","../src/components/PublicMenu/ProductDetails/ProductDetails.tsx","../src/components/PublicMenu/OrderStepper/OrderStepper.tsx","../src/components/PublicMenu/FloatingOrdersButton/FloatingOrdersButton.tsx","../src/modules/customer/utils.ts","../src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx","../src/modules/order/services.ts","../src/hooks/product.ts","../src/components/PublicMenu/ProductQuantity/ProductQuantity.tsx","../src/modules/product/hooks.ts","../src/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.tsx","../src/components/PublicMenu/OrderListItem/OrderListItem.tsx","../src/components/PublicMenu/OrderItemsList/OrderNoItems.tsx","../src/components/PublicMenu/OrderItemsList/OrderItemsList.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCart.tsx","../src/components/PublicMenu/Customer/CustomerAddress/NoAddressContent/NoAddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/AddressContent/AddressContent.tsx","../src/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTableUI.tsx","../src/components/PublicMenu/OrderDrawer/OrderTable/OrderTable.tsx","../src/modules/table/hooks.ts","../src/components/PublicMenu/OrderMethods/OrderMethods.tsx","../src/components/PublicMenu/OrderPaymentSummary/OrderPaymentSummary.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerDetails.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.tsx","../src/components/PublicMenu/OrderDrawer/OrderDrawer.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/ScrollToTop/ScrollToTop.tsx","../src/components/PublicMenu/Modals/Auth/PhoneStep.tsx","../src/components/PublicMenu/Modals/Auth/OTPStep.tsx","../src/components/PublicMenu/Modals/Auth/EmailStep.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/HoursList/HoursList.tsx","../src/components/PublicMenu/Header/BranchBusinessHours/BranchBusinessHours.tsx","../src/components/PublicMenu/PublicMenu.tsx","../src/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.tsx","../src/components/PublicMenu/Modals/Auth/Auth.tsx","../src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx","../src/components/PublicMenu/Modals/BranchBusinessHours/BranchBusinessHours.tsx","../src/utils/menu.ts","../src/components/Events/EventsToolbar.tsx","../src/components/Events/Events.tsx","../src/modules/subscription/constants.ts","../src/components/Pricing/PricingPlanAmount.tsx","../src/components/Pricing/Pricing.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","export const IMAGE_BASE_URL = \"https://images.restaround.co\";\n\nexport const getImageSource = (image?: string) => {\n\tif (!image) return \"\";\n\n\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\treturn `${IMAGE_BASE_URL}/${image}`;\n};\n\nexport const getLogoImageSource = (logoImage?: string) => {\n\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n};\n\nexport const getCoverPhotoSource = (coverPhoto?: string) => {\n\tif (!coverPhoto) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\tif (coverPhoto.includes(\"base64\") || coverPhoto.startsWith(\"https://\")) return coverPhoto;\n\n\treturn `${IMAGE_BASE_URL}/${coverPhoto}`;\n};\n\nconst keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\nconst triplet = (e1: number, e2: number, e3: number) =>\n\tkeyStr.charAt(e1 >> 2) +\n\tkeyStr.charAt(((e1 & 3) << 4) | (e2 >> 4)) +\n\tkeyStr.charAt(((e2 & 15) << 2) | (e3 >> 6)) +\n\tkeyStr.charAt(e3 & 63);\n\nexport const rgbDataURL = (r: number, g: number, b: number) =>\n\t`data:image/gif;base64,R0lGODlhAQABAPAA${\n\t\ttriplet(0, r, g) + triplet(b, 255, 255)\n\t}/yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`;\n","export const CO_DOMAIN = \"restaround.co\";\nexport const AZ_DOMAIN = \"restaround.az\";\nexport const EE_DOMAIN = \"restaround.ee\";\nexport const NL_DOMAIN = \"restaround.nl\";\n\nexport const DOMAINS = [CO_DOMAIN, AZ_DOMAIN, EE_DOMAIN, NL_DOMAIN]; // Supported domains list\n","import { CO_DOMAIN, DOMAINS } from \"./constants\";\n\nexport const getBaseUrl = (hostname: string, language: string) => {\n\tconst domain = DOMAINS.includes(hostname) ? hostname : CO_DOMAIN;\n\tconst locale = language || \"en\";\n\treturn { url: `https://${domain}/${locale}`, domain };\n};\n\nexport const getTLD = (language: string) => {\n\treturn language === \"az\" ? \"az\" : \"co\";\n};\n\nexport const getRegisterUrl = (language: string, source: string) => {\n\tconst tld = getTLD(language);\n\n\treturn `https://app.restaround.${tld}/auth/register?lang=${language}&utm_source=${source}`;\n};\n","export const MODALS = {\n\tADD_UPDATE_NOTES: \"ADD_UPDATE_NOTES\",\n\tAUTH: \"AUTH\",\n\tADD_UPDATE_ADDRESS: \"ADD_UPDATE_ADDRESS\",\n\tBRANCH_BUSINESS_HOURS: \"BRANCH_BUSINESS_HOURS\",\n};\n\nexport const SUPPORTED_LOCALES = [\"en\", \"az\", \"nl\", \"et\", \"tr\", \"ru\"];\nexport const DEFAULT_LANGUAGE = \"en\";\nexport const DEFAULT_CURRENCY = \"AZN\";\nexport const SUPPORTED_COUNTRIES = [\n\t{\n\t\tname: \"Azerbaijan\",\n\t\tcode: \"AZ\",\n\t\tphoneCode: \"+994\",\n\t},\n];\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { createContext, ReactElement, useContext, useMemo } from \"react\";\n\nimport { PublicMenuData } from \"src/models/menu\";\nimport * as branchModels from \"src/modules/branch/models\";\nimport * as viewConstants from \"src/modules/view/constants\";\n\nconst StoreContext = createContext<PublicMenuData>({} as PublicMenuData);\n\nexport const StoreProvider = ({\n\tchildren,\n\tvalue,\n}: {\n\tchildren: ReactElement;\n\tvalue: PublicMenuData;\n}) => {\n\tconst contextValue = useMemo<PublicMenuData>(() => {\n\t\tif (isEmpty(value)) return {} as PublicMenuData;\n\n\t\tconst branches = value.branches || [];\n\t\tconst hasSingleBranch = branches.length === 1;\n\n\t\tconst selectedBranch = hasSingleBranch\n\t\t\t? branches[0] || ({} as branchModels.Branch)\n\t\t\t: branches.find((item) => item.id === Number(value.branchId)) || ({} as branchModels.Branch);\n\n\t\treturn {\n\t\t\t...value,\n\t\t\tcurrency: value.currency || viewConstants.DEFAULT_CURRENCY,\n\t\t\tlanguage: value.language || viewConstants.DEFAULT_LANGUAGE,\n\t\t\tselectedBranch,\n\t\t};\n\t}, [value]);\n\n\treturn <StoreContext.Provider value={contextValue}>{children}</StoreContext.Provider>;\n};\n\nexport const useStoreContext = () => useContext(StoreContext);\n","const GOAL_BASE_NAME = \"digital_menu\";\n\nexport const CATEGORY_SELECTED = `${GOAL_BASE_NAME}_category_select`;\nexport const CATEGORY_SCROLLED = `${GOAL_BASE_NAME}_category_scroll`;\nexport const PRODUCT_DETAILS = `${GOAL_BASE_NAME}_product_details`;\nexport const PRODUCT_ADD_ORDER = `${GOAL_BASE_NAME}_product_add_cart`;\nexport const PRODUCT_VIEW_CHANGED = `${GOAL_BASE_NAME}_product_view_changed`;\n\nexport const GOALS = [CATEGORY_SELECTED, CATEGORY_SCROLLED, PRODUCT_DETAILS, PRODUCT_ADD_ORDER];\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Category, CategoryTranslation } from \"../models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n\nexport const getCategoryNameById = (\n\tcategoryId: number,\n\tcategories: Category[],\n\tlanguage: string\n): string => {\n\tconst category = categories?.find?.(({ id }) => id === categoryId);\n\n\tif (isEmpty(category)) return \"\";\n\n\tconst { name } = getCategoryTranslation(category, language);\n\n\treturn name;\n};\n","import { Storage } from \"@sorocraft/js-utils\";\n\nexport const storage = new Storage(\"restaround_cst_act\", \"restaround_cst_rft\");\n","interface ValidationResult {\n\tisValid: boolean;\n\terror?: string;\n}\n\ntype Validator = (cleanedNumber: string) => ValidationResult;\n\nconst validators: Record<string, Validator> = {\n\t\"994\": (number) => {\n\t\tconst AZERBAIJANI_PREFIXES = [\"50\", \"51\", \"10\", \"55\", \"99\", \"70\", \"77\", \"60\"];\n\t\tconst pattern = new RegExp(`^(${AZERBAIJANI_PREFIXES.join(\"|\")})\\\\d{7}$`);\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: `Azerbaijani numbers must be 9 digits and start with ${AZERBAIJANI_PREFIXES.join(\n\t\t\t\t\t\", \"\n\t\t\t\t)}`,\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n\n\t\"31\": (number) => {\n\t\tconst pattern = /^\\d{9}$/;\n\n\t\tif (!pattern.test(number)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t\terror: \"Dutch numbers must be exactly 9 digits\",\n\t\t\t};\n\t\t}\n\n\t\treturn { isValid: true };\n\t},\n};\n\nexport function validatePhoneNumber(phoneNumber: string): ValidationResult {\n\tif (!phoneNumber) {\n\t\treturn { isValid: false, error: \"FIELD_REQUIRED\" };\n\t}\n\n\tconst cleaned = phoneNumber.replace(/\\D/g, \"\");\n\n\tconst countryCode = cleaned.startsWith(\"994\") ? \"994\" : cleaned.startsWith(\"31\") ? \"31\" : null;\n\n\tif (!countryCode) {\n\t\treturn { isValid: false, error: \"Unsupported country code\" };\n\t}\n\n\tconst nationalNumber = cleaned.slice(countryCode.length);\n\tconst validator = validators[countryCode];\n\n\treturn validator(nationalNumber);\n}\n","import * as customerModels from \"../customer/models\";\n\nexport enum OrderType {\n\tDINE_IN = \"DINE_IN\",\n\tPICK_UP = \"PICK_UP\",\n\tDELIVERY = \"DELIVERY\",\n}\n\nexport enum OrderStatus {\n\tDRAFT = \"DRAFT\",\n\tPENDING = \"PENDING\",\n\tCONFIRMED = \"CONFIRMED\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tOUT_FOR_DELIVERY = \"OUT_FOR_DELIVERY\",\n\tDELIVERED = \"DELIVERED\",\n\tCOMPLETED = \"COMPLETED\",\n\tCANCELLED = \"CANCELLED\",\n\tFAILED = \"FAILED\",\n}\n\nexport enum OrderItemStatus {\n\tPENDING = \"PENDING\",\n\tPREPARING = \"PREPARING\",\n\tREADY = \"READY\",\n\tSERVED = \"SERVED\",\n}\n\nexport enum PaymentMethod {\n\tCASH = \"CASH\",\n\tCARD = \"CARD\",\n\tWALLET = \"WALLET\",\n\tTERMINAL = \"TERMINAL\",\n}\n\nexport interface OrderAddonOption {\n\toptionId: number;\n\tprice: number;\n}\n\nexport interface OrderAddon {\n\tid?: number;\n\taddonId: number;\n\toptions: OrderAddonOption[];\n}\n\nexport interface SelectedAddons {\n\t[key: number]: number | number[];\n}\n\nexport interface OrderItemVariant {\n\tid?: number;\n\tvariantId: number;\n\tprice: number;\n}\n\nexport interface OrderItem {\n\tid?: number;\n\tproductId: number;\n\torderId?: number;\n\tquantity: number;\n\tprice: number;\n\tvariant?: OrderItemVariant;\n\taddons: OrderAddon[];\n\tnote?: string;\n\tstatus?: OrderItemStatus;\n\tvat?: number;\n\tisPaid?: boolean;\n}\n\nexport interface Order {\n\tid?: number;\n\tbusinessId?: number;\n\tbranchId?: number;\n\tworkingDayId?: number;\n\ttableId?: number;\n\temployeeId?: number;\n\torderType: OrderType;\n\ttotalPriceWithTax: number;\n\ttotalPriceWithoutTax: number;\n\ttotalTax: number;\n\titems: OrderItem[];\n\tstatus?: OrderStatus;\n\tvat?: number;\n\tpaymentMethod?: PaymentMethod;\n\tnote?: string;\n\tcreatedAt?: number;\n\tupdatedAt?: number;\n\tcustomer?: customerModels.Customer;\n}\n\nexport interface OrderItems {\n\t[key: string]: OrderItem;\n}\n\nexport enum OrderStep {\n\tCART = \"CART\",\n\tDETAILS = \"DETAILS\",\n\tCOMPLETED = \"COMPLETED\",\n}\n\nexport interface OrderPayload extends Order {\n\tcustomerAddressId: number;\n\tcustomerId: number;\n}\n","import { OrderStep, PaymentMethod } from \"./models\";\n\nexport const initialOrder = {\n\torderType: null,\n\ttotalPriceWithTax: 0,\n\ttotalPriceWithoutTax: 0,\n\ttotalTax: 0,\n\tvat: 0,\n\tpaymentMethod: PaymentMethod.CASH,\n};\n\nexport const ORDER_STEPS = [OrderStep.CART, OrderStep.DETAILS, OrderStep.COMPLETED];\n\nexport enum OrderErrors {\n\tFIELD_REQUIRED_ERROR = \"This field is required\",\n\tTABLE_NOT_SELECTED = \"Please select a table\",\n\tADDRESS_IS_EMPTY = \"Please enter an address\",\n\tEMPTY_ITEMS = \"Please choose product\",\n\tBRANCH_NOT_SELECTED = \"Please select a branch\",\n}\n","import { isEmpty, priceFormatter, sortNumbers } from \"@sorocraft/js-utils\";\nimport { IconType } from \"@sorocraft/ui\";\nimport { Check, BagCheck, Delivery, Chef, FileCheck, HourglassHalf } from \"@sorocraft/ui/icons\";\n\nimport {\n\tOrder,\n\tOrderAddon,\n\tOrderAddonOption,\n\tOrderItem,\n\tOrderStatus,\n\tOrderType,\n\tSelectedAddons,\n} from \"./models\";\n\nimport * as addonModels from \"../addon/models\";\nimport * as branchModels from \"../branch/models\";\nimport { OrderErrors } from \"./constants\";\n\nexport const calculatSingleAddonTotalPrice = (addon: OrderAddon) => {\n\treturn addon.options.reduce((sum, option) => sum + option.price, 0);\n};\n\nexport function calculateTotalAddonPrice(addons: OrderAddon[] = [], quantity: number = 1): number {\n\tconst totalAddonsPriceForSingleItem = addons.reduce((total, addon) => {\n\t\tconst addonTotal = calculatSingleAddonTotalPrice(addon);\n\t\treturn total + addonTotal;\n\t}, 0);\n\n\treturn quantity * totalAddonsPriceForSingleItem;\n}\n\nexport const getOrderPrice = (order: Order, currency: string, language: string) => {\n\tconst calculateItemTotal = (price: number, quantity: number, addons: OrderAddon[]) => {\n\t\treturn quantity * price + calculateTotalAddonPrice(addons, quantity);\n\t};\n\n\tlet totalWithoutTax = 0;\n\tlet totalTax = 0;\n\n\tfor (const item of order.items) {\n\t\tconst itemTotal = calculateItemTotal(item.price, item.quantity, item.addons);\n\t\ttotalWithoutTax += itemTotal;\n\n\t\tif (order.vat === undefined && item.vat) {\n\t\t\ttotalTax += (itemTotal * item.vat) / 100;\n\t\t}\n\t}\n\n\tif (order.vat !== undefined) {\n\t\ttotalTax = (totalWithoutTax * order.vat) / 100;\n\t}\n\n\tconst totalWithTax = totalWithoutTax + totalTax;\n\n\treturn {\n\t\ttotalWithoutTax,\n\t\ttotalWithoutTaxFormatted: priceFormatter(totalWithoutTax, currency, language),\n\t\ttotalTax,\n\t\ttotalTaxFormatted: priceFormatter(totalTax, currency, language),\n\t\ttotalWithTax,\n\t\ttotalWithTaxFormatted: priceFormatter(totalWithTax, currency, language),\n\t};\n};\n\nexport const generateOrderItemsId = (\n\tproductId: number,\n\tvariantId: number | null,\n\tselectedAddons?: SelectedAddons\n): string => {\n\tif (!productId) throw new Error(\"Product ID is required\");\n\n\t// Build the order items ID base with productId and variantId\n\tlet orderItemsId = `${productId}`;\n\tif (variantId) {\n\t\torderItemsId += `-${variantId}`;\n\t}\n\n\t// Build the addon part of the ID\n\tconst addonIdsPart = Object.entries(selectedAddons || {})\n\t\t.map(([addonId, option]) => {\n\t\t\tif (!addonId || !option) return null; // Skip invalid entries\n\t\t\tconst optionIds = Array.isArray(option)\n\t\t\t\t? sortNumbers(option).filter(Boolean).join(\"-\")\n\t\t\t\t: `${option}`;\n\t\t\tif (!optionIds) return null;\n\t\t\treturn `${addonId}-${optionIds}`;\n\t\t})\n\t\t.filter(Boolean) // Remove null/undefined values\n\t\t.join(\"-\");\n\n\t// Append addonIdsPart if it's not empty\n\tif (addonIdsPart) {\n\t\torderItemsId += `-${addonIdsPart}`;\n\t}\n\n\treturn orderItemsId;\n};\n\nexport const getOrderItemPrice = (orderItem: OrderItem) => {\n\tconst { price, variant, addons, quantity, vat } = orderItem || {};\n\tconst basePrice = variant?.price ?? price;\n\tconst addonsPrice = calculateTotalAddonPrice(addons, 1); // single item's addon price\n\n\tconst itemNetPrice = basePrice + addonsPrice;\n\t// Currently VAT is applied only on basePrice, not on addons\n\t// TODO: Re-evaluate for European market where tax may apply to addons too\n\tconst itemTax = basePrice * (vat / 100);\n\tconst itemGrossPrice = itemNetPrice + itemTax;\n\n\tconst totalNet = itemNetPrice * quantity;\n\tconst totalTax = itemTax * quantity;\n\tconst totalGross = itemGrossPrice * quantity;\n\n\treturn {\n\t\ttotalGross,\n\t\ttotalNet,\n\t\ttotalTax,\n\t\titemGrossPrice,\n\t\titemNetPrice,\n\t\titemTax,\n\t};\n};\n\nexport const getSelectedAddonsFromOrderItems = (item: OrderItem): SelectedAddons => {\n\tconst selectedAddons: SelectedAddons = {};\n\n\tfor (const { addonId, options = [] } of item.addons || []) {\n\t\tconst optionIds = options.map(({ optionId }) => optionId);\n\t\tselectedAddons[addonId] = optionIds.length === 1 ? optionIds[0] : optionIds;\n\t}\n\n\treturn selectedAddons;\n};\n\nexport const getStatusIcon = (status: OrderStatus): IconType => {\n\tswitch (status) {\n\t\tcase OrderStatus.COMPLETED:\n\t\t\treturn Check;\n\t\tcase OrderStatus.DELIVERED:\n\t\t\treturn BagCheck;\n\t\tcase OrderStatus.OUT_FOR_DELIVERY:\n\t\t\treturn Delivery;\n\t\tcase OrderStatus.PREPARING:\n\t\t\treturn Chef;\n\t\tcase OrderStatus.CONFIRMED:\n\t\t\treturn FileCheck;\n\t\tcase OrderStatus.PENDING:\n\t\t\treturn HourglassHalf;\n\n\t\tdefault:\n\t\t\treturn HourglassHalf;\n\t}\n};\n\nexport const buildSelectedAddonsPayload = (\n\tproductAddons: addonModels.MenuAddon[] = [],\n\tselectedAddons: SelectedAddons = {}\n): OrderAddon[] => {\n\treturn Object.entries(selectedAddons).map(([addonIdStr, selected]) => {\n\t\tconst addonId = Number(addonIdStr);\n\t\tconst selectedOptionIds = Array.isArray(selected) ? selected : [selected];\n\n\t\tconst addon = productAddons.find((addon) => addon.id === addonId);\n\t\tif (isEmpty(addon)) {\n\t\t\treturn {\n\t\t\t\taddonId,\n\t\t\t\toptions: [],\n\t\t\t};\n\t\t}\n\n\t\tconst options: OrderAddonOption[] = (addon.options || [])\n\t\t\t.filter((option) => selectedOptionIds.includes(option.id))\n\t\t\t.map((option) => ({\n\t\t\t\toptionId: option.id,\n\t\t\t\tprice: option.price,\n\t\t\t}));\n\n\t\treturn {\n\t\t\taddonId,\n\t\t\toptions,\n\t\t};\n\t});\n};\n\nexport const getDefaultOrderType = (\n\tsettings: branchModels.BranchSettings,\n\tisOpen: boolean,\n\tisDelivering: boolean\n): OrderType | null => {\n\tif (!settings) return null;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\tif (deliveryOrderEnabled && isDelivering) {\n\t\treturn OrderType.DELIVERY;\n\t}\n\n\tif (dineInOrderEnabled && isOpen) {\n\t\treturn OrderType.DINE_IN;\n\t}\n\n\tif (pickupOrderEnabled && isOpen) {\n\t\treturn OrderType.PICK_UP;\n\t}\n\n\treturn null;\n};\n\nexport const getOrderErrorMessages = (field: keyof Order) => {\n\tswitch (field) {\n\t\tcase \"customer\":\n\t\t\treturn OrderErrors.ADDRESS_IS_EMPTY;\n\n\t\tcase \"tableId\":\n\t\t\treturn OrderErrors.TABLE_NOT_SELECTED;\n\n\t\tcase \"items\":\n\t\t\treturn OrderErrors.EMPTY_ITEMS;\n\n\t\tcase \"branchId\":\n\t\t\treturn OrderErrors.BRANCH_NOT_SELECTED;\n\n\t\tdefault:\n\t\t\treturn OrderErrors.FIELD_REQUIRED_ERROR;\n\t}\n};\n","export const BASE_API_URL = \"https://api.restaround.co/api/v1\";\n","import { BASE_API_URL } from \"src/constants/env\";\nimport { storage } from \"src/modules/view/services\";\n\nconst request = async (method: \"POST\" | \"PATCH\" | \"GET\", endpoint: string, body?: any) => {\n\tconst { accessToken } = storage.getAuthToken();\n\tconst url = `${BASE_API_URL}/${endpoint}`;\n\n\tconst response = await fetch(url, {\n\t\tmethod,\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\tAuthorization: accessToken,\n\t\t},\n\t\tcredentials: \"include\",\n\t\tbody: JSON.stringify(body),\n\t});\n\n\tconst data = await response.json();\n\n\tif (!response.ok) {\n\t\tthrow data;\n\t}\n\n\treturn data;\n};\n\nexport const API = {\n\tpost: (endpoint: string, body: any) => request(\"POST\", endpoint, body),\n\tpatch: (endpoint: string, body: any) => request(\"PATCH\", endpoint, body),\n\tget: (endpoint: string) => request(\"GET\", endpoint),\n};\n","import { API } from \"src/services/api\";\nimport * as viewModels from \"../view/models\";\n\nimport { AuthResponse, Customer, CustomerUpdatePayload } from \"./models\";\n\nexport const getCustomer = async (): Promise<Customer> => {\n\treturn API.get(\"customer\");\n};\n\nexport const loginCustomer = async (phoneNumber: string): Promise<{ status: number }> => {\n\treturn API.post(\"customer\", { phoneNumber });\n};\n\nexport const verifyOTP = async (otp: string, phoneNumber: string): Promise<AuthResponse> => {\n\treturn API.post(\"otp/verify\", { otp, phoneNumber });\n};\n\nexport const update = async (payload: CustomerUpdatePayload) => {\n\treturn API.patch(\"customer\", payload);\n};\n\nexport const getCustomerDistance = async (\n\tbranchCoordinates: viewModels.Coordinates,\n\tcustomerCoordinates: viewModels.Coordinates\n) => {\n\t// eslint-disable-next-line no-undef\n\tconst { spherical } = (await google.maps.importLibrary(\n\t\t\"geometry\"\n\t\t// eslint-disable-next-line no-undef\n\t)) as google.maps.GeometryLibrary;\n\t// eslint-disable-next-line no-undef\n\tconst coordinate1 = new google.maps.LatLng(\n\t\tbranchCoordinates.latitude,\n\t\tbranchCoordinates.longitude\n\t);\n\t// eslint-disable-next-line no-undef\n\tconst coordinate2 = new google.maps.LatLng(\n\t\tcustomerCoordinates.latitude,\n\t\tcustomerCoordinates.longitude\n\t);\n\n\tconst distanceInMeters = spherical.computeDistanceBetween(coordinate1, coordinate2);\n\n\treturn distanceInMeters;\n};\n","import { trackEvent } from \"@sorocraft/js-utils\";\n\nimport { BASE_API_URL } from \"src/constants/env\";\n\nexport const logException = async (error: any = null, errorInfo = {}) => {\n\ttry {\n\t\ttrackEvent(\"error\", { message: error?.message });\n\t\treturn await fetch(`${BASE_API_URL}/log`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tcredentials: \"include\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tmessage: error?.message || JSON.stringify(error),\n\t\t\t\t...errorInfo,\n\t\t\t}),\n\t\t});\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t}\n};\n","import { Branch, BranchWorkDays } from \"src/models\";\n\nexport const getVenueName = (\n\tbusinessName: string,\n\thasSingleBranch: boolean,\n\tselectedBranch?: Branch\n): string => {\n\tif (hasSingleBranch) {\n\t\treturn businessName;\n\t}\n\n\tif (selectedBranch?.name) {\n\t\treturn `${businessName} ${selectedBranch.name}`;\n\t}\n\n\treturn businessName;\n};\n\nexport function normalizeRootPath(rootPath: string): string {\n\treturn rootPath.endsWith(\"/\") ? rootPath.slice(0, -1) : rootPath;\n}\n\nexport const getHoursForDay = (schedule: BranchWorkDays, weekDayIndex: number) => {\n\treturn (schedule?.days || []).find(({ day }: any) => day === weekDayIndex)?.hours;\n};\n\nexport const splitHours = (hours: string): number[] => {\n\treturn (hours || \"\").split(\":\").map(Number);\n};\n\nexport const isWithinTimeRange = (timeRange?: { openAt: string; closeAt: string }): boolean => {\n\tif (!timeRange) return false;\n\n\tconst now = new Date();\n\tconst [openH, openM] = splitHours(timeRange.openAt);\n\tconst [closeH, closeM] = splitHours(timeRange.closeAt);\n\n\tconst start = new Date(now);\n\tstart.setHours(openH, openM, 0, 0);\n\n\tconst end = new Date(now);\n\tend.setHours(closeH, closeM, 0, 0);\n\n\t// If the end time is earlier than the start, it means it passes midnight\n\tif (end <= start) {\n\t\t// If now is before end, assume it's the next day\n\t\tif (now < end) {\n\t\t\tstart.setDate(start.getDate() - 1);\n\t\t} else {\n\t\t\tend.setDate(end.getDate() + 1);\n\t\t}\n\t}\n\n\treturn now >= start && now <= end;\n};\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as viewModels from \"../view/models\";\nimport { getHoursForDay, isWithinTimeRange } from \"./utils\";\nimport { BranchServes, BranchSettings } from \"./models\";\n\nexport const useBranchCoordinates = (): viewModels.Coordinates => {\n\tconst { selectedBranch } = useStoreContext();\n\n\treturn { latitude: selectedBranch?.latitude, longitude: selectedBranch?.longitude };\n};\n\nexport const useBranchServes = (): BranchServes => {\n\tconst { selectedBranch } = useStoreContext();\n\tconst { openingHours, deliveryHours } = selectedBranch || {};\n\n\tif (!openingHours?.days || !deliveryHours?.days) {\n\t\treturn { isOpen: false, isDelivering: false };\n\t}\n\n\tconst now = new Date();\n\tconst weekDayIndex = (now.getUTCDay() + 6) % 7; // Mon - 0, Tue - 1, ...\n\n\tconst openHours = getHoursForDay(openingHours, weekDayIndex);\n\tconst deliveryHoursToday = getHoursForDay(deliveryHours, weekDayIndex);\n\n\treturn {\n\t\tisOpen: isWithinTimeRange(openHours),\n\t\tisDelivering: isWithinTimeRange(deliveryHoursToday),\n\t};\n};\n\nexport const useBranchSettings = (): BranchSettings => {\n\tconst { selectedBranch } = useStoreContext();\n\n\treturn selectedBranch?.settings || ({} as BranchSettings);\n};\n\nexport const useMaxDeliveryDistance = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.maxDeliveryDistance;\n};\n\nexport const useMinDeliveryAmount = () => {\n\tconst settings = useBranchSettings();\n\treturn settings.minDeliveryAmount;\n};\n\nexport const useOrderEnabled = (): boolean => {\n\tconst settings = useBranchSettings();\n\n\tif (isEmpty(settings)) return false;\n\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } = settings;\n\n\treturn deliveryOrderEnabled || dineInOrderEnabled || pickupOrderEnabled;\n};\n","// THIS CAN'T BE IMPERTED BY OTHER MODULES\n\nimport { useStoreContext } from \"src/store\";\n\nimport * as orderModels from \"src/modules/order/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nexport const useInitialOrder = ({\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId = undefined,\n}: {\n\tdefaultOrderType: orderModels.OrderType;\n\tdefaultPaymentMethod: orderModels.PaymentMethod;\n\tdefaultBranchId: number;\n}): Partial<orderModels.Order> => {\n\tconst { tableId } = useStoreContext();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst branchSettings = branchHooks.useBranchSettings();\n\n\tconst orderType =\n\t\tdefaultOrderType || orderUtils.getDefaultOrderType(branchSettings, isOpen, isDelivering);\n\n\treturn {\n\t\tbranchId: defaultBranchId,\n\t\torderType,\n\t\ttableId: tableId ? Number(tableId) : undefined,\n\t\ttotalPriceWithTax: 0,\n\t\ttotalPriceWithoutTax: 0,\n\t\ttotalTax: 0,\n\t\tvat: 0,\n\t\tpaymentMethod: defaultPaymentMethod || orderModels.PaymentMethod.CASH,\n\t};\n};\n","import {\n\tcreateContext,\n\tDispatch,\n\tReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tSetStateAction,\n} from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { FormErrors } from \"@sorocraft/ui\";\n\nimport * as productModels from \"src/modules/product/models\";\nimport * as orderModels from \"src/modules/order/models\";\nimport * as customerModels from \"src/modules/customer/models\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderConstants from \"src/modules/order/constants\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as commonServices from \"src/modules/common/services\";\nimport * as viewServices from \"src/modules/view/services\";\nimport * as storeHooks from \"src/modules/store/hooks\";\n\ntype UpdateOrderItemsParams = {\n\tproduct: productModels.Product;\n\tquantity?: number;\n\tvariantId?: number | null;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tnote?: string;\n};\n\ntype OrderContent = {\n\torder: Partial<orderModels.Order>;\n\torderStep: orderModels.OrderStep;\n\torderItems: orderModels.OrderItems;\n\tisOrderOpen: boolean;\n\tcustomer: customerModels.Customer;\n\ttrackingId: string;\n\terrors?: FormErrors;\n\tsetOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;\n\tupdateOrder: (updatedFields: Partial<orderModels.Order>) => void;\n\taddProduct: (params: UpdateOrderItemsParams) => void;\n\tupdateProduct: (params: UpdateOrderItemsParams) => void;\n\tremoveAllProductVariants: (productId: number) => void;\n\tsetIsOrderOpen: Dispatch<SetStateAction<boolean>>;\n\tgetCustomer: () => void;\n\tresetOrder: (force?: boolean) => void;\n\tsetTrackingId: Dispatch<SetStateAction<string>>;\n\tupdateOrderErrors: (field: keyof orderModels.Order) => void;\n\tresetErrors: () => void;\n};\n\ntype OrderProviderProps = {\n\tchildren: ReactNode;\n\tdefaultOrderType?: orderModels.OrderType;\n\tdefaultPaymentMethod?: orderModels.PaymentMethod;\n\tdefaultBranchId?: number;\n};\n\nconst OrderContext = createContext<OrderContent>({\n\torder: orderConstants.initialOrder,\n\torderStep: orderModels.OrderStep.CART,\n\torderItems: {},\n\tisOrderOpen: false,\n\tcustomer: {} as customerModels.Customer,\n\ttrackingId: \"\",\n\terrors: {},\n\tupdateOrder: () => {},\n\tsetOrderStep: () => {},\n\taddProduct: () => {},\n\tupdateProduct: () => {},\n\tremoveAllProductVariants: () => {},\n\tsetIsOrderOpen: () => {},\n\tgetCustomer: () => {},\n\tresetOrder: () => {},\n\tsetTrackingId: () => {},\n\tupdateOrderErrors: () => {},\n\tresetErrors: () => {},\n} satisfies OrderContent);\n\nexport const OrderProvider = ({\n\tchildren,\n\tdefaultOrderType,\n\tdefaultPaymentMethod,\n\tdefaultBranchId,\n}: OrderProviderProps) => {\n\tconst initialOrder = storeHooks.useInitialOrder({\n\t\tdefaultOrderType,\n\t\tdefaultPaymentMethod,\n\t\tdefaultBranchId,\n\t});\n\tconst [customer, setCustomer] = useState<customerModels.Customer>({} as customerModels.Customer);\n\tconst [order, setOrder] = useState<Partial<orderModels.Order>>(initialOrder);\n\tconst [orderStep, setOrderStep] = useState<orderModels.OrderStep>(orderModels.OrderStep.CART);\n\tconst [orderItems, setOrderItems] = useState<orderModels.OrderItems>({});\n\tconst [isOrderOpen, setIsOrderOpen] = useState<boolean>(false);\n\tconst [trackingId, setTrackingId] = useState<string>(\"\");\n\tconst [errors, setErrors] = useState<FormErrors>({});\n\n\tconst updateOrder = useCallback(\n\t\t(updatedFields: Partial<orderModels.Order>) => {\n\t\t\tsetOrder((currentOrder) => ({\n\t\t\t\t...currentOrder,\n\t\t\t\t...updatedFields,\n\t\t\t}));\n\n\t\t\t// Clear proper errors\n\t\t\t[\"branchId\", \"tableId\"].forEach((field) => {\n\t\t\t\tif (updatedFields[field] && errors?.[field]) {\n\t\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, [field]: null }));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t[errors]\n\t);\n\n\tconst updateOrderItems = useCallback(\n\t\t({\n\t\t\tproduct,\n\t\t\tquantity,\n\t\t\tvariantId,\n\t\t\tselectedAddons,\n\t\t\tnote,\n\t\t\tisAddOperation,\n\t\t}: UpdateOrderItemsParams & { isAddOperation: boolean }) => {\n\t\t\tif (isEmpty(product) || quantity < 0) return;\n\n\t\t\tconst { id: productId, vat = 0, variants, addons, price } = product;\n\t\t\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\n\t\t\tsetOrderItems((currentOrderItems) => {\n\t\t\t\tconst existingItem = currentOrderItems[orderItemsId];\n\t\t\t\tconst newQuantity = isAddOperation ? (existingItem?.quantity || 0) + quantity : quantity;\n\n\t\t\t\t// Remove item if quantity is zero\n\t\t\t\tif (newQuantity <= 0) {\n\t\t\t\t\tconst { [orderItemsId]: _, ...remainingOrderItems } = currentOrderItems;\n\t\t\t\t\treturn remainingOrderItems;\n\t\t\t\t}\n\n\t\t\t\tconst selectedVariant = variants.find(({ id }) => id === variantId);\n\t\t\t\tconst selectedAddonsPayload: orderModels.OrderAddon[] =\n\t\t\t\t\torderUtils.buildSelectedAddonsPayload(addons, selectedAddons);\n\n\t\t\t\t// Update or add item\n\t\t\t\treturn {\n\t\t\t\t\t...currentOrderItems,\n\t\t\t\t\t[orderItemsId]: {\n\t\t\t\t\t\tproductId,\n\t\t\t\t\t\tquantity: newQuantity,\n\t\t\t\t\t\tprice,\n\t\t\t\t\t\tnote,\n\t\t\t\t\t\tvat,\n\t\t\t\t\t\t...(!isEmpty(selectedVariant) && {\n\t\t\t\t\t\t\tvariant: { variantId: selectedVariant.id, price: selectedVariant.price },\n\t\t\t\t\t\t}),\n\t\t\t\t\t\taddons: selectedAddonsPayload,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tif (isAddOperation && errors?.items) {\n\t\t\t\tsetErrors((currentErrors) => ({ ...currentErrors, items: null }));\n\t\t\t}\n\t\t},\n\t\t[errors?.items]\n\t);\n\n\tconst addProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: true,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst updateProduct = useCallback(\n\t\t({ product, quantity = 1, variantId, selectedAddons, note }: UpdateOrderItemsParams) => {\n\t\t\treturn updateOrderItems({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tvariantId,\n\t\t\t\tselectedAddons,\n\t\t\t\tnote,\n\t\t\t\tisAddOperation: false,\n\t\t\t});\n\t\t},\n\t\t[updateOrderItems]\n\t);\n\n\tconst removeAllProductVariants = useCallback(\n\t\t(productId: number) => {\n\t\t\tif (!productId || isEmpty(orderItems)) return;\n\n\t\t\t// Filter out order items that do not belong to the given productId\n\t\t\tconst updatedOrderItems = Object.entries(orderItems).reduce(\n\t\t\t\t(acc, [orderItemsId, orderItem]) => {\n\t\t\t\t\tif (orderItem.productId !== productId) {\n\t\t\t\t\t\tacc[orderItemsId] = orderItem;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{} as orderModels.OrderItems\n\t\t\t);\n\n\t\t\t// Update the order items with the remaining items\n\t\t\tsetOrderItems(updatedOrderItems);\n\t\t},\n\t\t[orderItems]\n\t);\n\n\tconst getCustomer = useCallback(async () => {\n\t\ttry {\n\t\t\tconst { accessToken } = viewServices.storage.getAuthToken();\n\t\t\tif (!accessToken) return;\n\n\t\t\tconst response = await customerServices.getCustomer();\n\n\t\t\tif (!response?.id) {\n\t\t\t\tthrow new Error(\"SOMETHING_WENT_WRONG\");\n\t\t\t}\n\n\t\t\tsetCustomer(response);\n\t\t} catch (error) {\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/store/order.tsx\",\n\t\t\t\tmethod: \"getCustomer\",\n\t\t\t});\n\t\t}\n\t}, []);\n\n\tconst resetOrder = useCallback(\n\t\t(force: boolean = false) => {\n\t\t\tsetIsOrderOpen(false);\n\n\t\t\t// clear order if it flow is completed\n\t\t\tif (orderStep === orderModels.OrderStep.COMPLETED || force) {\n\t\t\t\tsetOrder(initialOrder);\n\t\t\t\tsetOrderItems({});\n\t\t\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t\t\t\tsetTrackingId(\"\");\n\t\t\t}\n\t\t},\n\t\t[initialOrder, orderStep]\n\t);\n\n\tconst updateOrderErrors = useCallback((field: keyof orderModels.Order) => {\n\t\tsetErrors((currentErrors) => ({\n\t\t\t...currentErrors,\n\t\t\t[field]: orderUtils.getOrderErrorMessages(field),\n\t\t}));\n\t}, []);\n\n\tconst resetErrors = useCallback(() => {\n\t\tsetErrors({});\n\t}, []);\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\tsetOrderStep,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tsetIsOrderOpen,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t}),\n\t\t[\n\t\t\torder,\n\t\t\torderStep,\n\t\t\torderItems,\n\t\t\tisOrderOpen,\n\t\t\tcustomer,\n\t\t\ttrackingId,\n\t\t\terrors,\n\t\t\tupdateOrder,\n\t\t\taddProduct,\n\t\t\tupdateProduct,\n\t\t\tremoveAllProductVariants,\n\t\t\tgetCustomer,\n\t\t\tresetOrder,\n\t\t\tsetTrackingId,\n\t\t\tupdateOrderErrors,\n\t\t\tresetErrors,\n\t\t]\n\t);\n\n\treturn <OrderContext.Provider value={contextValue}>{children}</OrderContext.Provider>;\n};\n\nexport const useOrderContext = () => useContext(OrderContext);\n","export type BranchWorkHour = {\n\topenAt: string;\n\tcloseAt: string;\n};\n\nexport type BranchWorkDay = {\n\tday: number;\n\thours: BranchWorkHour | null;\n};\n\nexport type BranchWorkDays = {\n\tdays: BranchWorkDay[];\n};\n\nexport interface BranchSettings {\n\tdeliveryOrderEnabled: boolean;\n\tpickupOrderEnabled: boolean;\n\tdineInOrderEnabled: boolean;\n\tmaxDeliveryDistance: number;\n\tminDeliveryAmount: number;\n\tdeliveryFeeAmount: number;\n}\n\nexport enum BranchSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n\tDELIVERY_FEE_AMOUNT = \"deliveryFeeAmount\",\n}\n\nexport interface Branch {\n\tid: number;\n\tname: string;\n\tbusinessId: number;\n\taddress: string;\n\tlongitude?: number;\n\tlatitude?: number;\n\tphone?: string;\n\twifiPassword?: string;\n\tcreatedAt?: number;\n\tcoverPhoto?: string;\n\tsettings?: BranchSettings;\n\topeningHours?: BranchWorkDays;\n\tdeliveryHours?: BranchWorkDays;\n}\n\nexport type BranchServes = {\n\tisOpen: boolean;\n\tisDelivering: boolean;\n};\n","import { DetailedHTMLProps, ImgHTMLAttributes } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport { rgbDataURL } from \"src/utils/image\";\n\ninterface Props extends DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {\n\tplaceholder?: \"blur\" | \"empty\" | `data:image/${string}`;\n\tblurDataURL?: string;\n\tpriority?: boolean;\n\tquality?: number | `${number}`;\n}\n\nconst Image = (props: Props) => {\n\tconst {\n\t\tpriority: _,\n\t\tblurDataURL: __,\n\t\tquality: ___,\n\t\tplaceholder: ____,\n\t\tfetchPriority: _____,\n\t\t...imgProps\n\t} = props;\n\tconst { imageTag } = useStoreContext() || {};\n\n\tif (imageTag) {\n\t\tconst CustomImage: any = imageTag;\n\n\t\treturn (\n\t\t\t<CustomImage\n\t\t\t\t{...props}\n\t\t\t\tquality={props.quality || 100}\n\t\t\t\tplaceholder=\"blur\"\n\t\t\t\tblurDataURL={rgbDataURL(235, 59, 90)}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn <img {...imgProps} />;\n};\n\nexport default Image;\n","import { useState } from \"react\";\nimport { classNames, Row } from \"@sorocraft/ui\";\n\nimport styles from \"./Languages.module.scss\";\n\nimport { useStoreContext } from \"src/store\";\n\nconst Languages = () => {\n\tconst { language, languages, onLanguageSelect } = useStoreContext();\n\tconst [isOptionsOpen, setIsOptionsOpen] = useState(false);\n\n\tconst isBilingual = languages?.length > 1;\n\tconst otherLanguages = languages?.filter?.(({ code }) => code !== language) || [];\n\n\tconst getFlag = (code: string) => {\n\t\treturn `https://images.restaround.co/languages/${code}.svg`;\n\t};\n\n\tconst handleSelectLanguages = (code: string) => {\n\t\tif (onLanguageSelect) onLanguageSelect(code);\n\t};\n\n\tif (!isBilingual) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={() => setIsOptionsOpen(!isOptionsOpen)}>\n\t\t\t<Row alignItems=\"center\" gap={0}>\n\t\t\t\t<Row\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\toptions: true,\n\t\t\t\t\t\tisOpen: isOptionsOpen,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{otherLanguages.map(({ code }) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={getFlag(code)}\n\t\t\t\t\t\t\tclassName={styles.option}\n\t\t\t\t\t\t\tkey={code}\n\t\t\t\t\t\t\tonClick={() => handleSelectLanguages(code)}\n\t\t\t\t\t\t\talt={code}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<img src={getFlag(language)} alt={language || \"\"} className={styles.currentLanguage} />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default Languages;\n","import { IconTheme, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { ChevronLeft } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BackIcon.module.scss\";\n\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tonClick?: () => void;\n\tsize?: SIZE;\n\ttheme?: IconTheme;\n}\n\nconst BackIcon = ({ onClick, size, theme }: Props) => {\n\tconst { language, business } = useStoreContext();\n\tconst handleGoBack = () => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tif (!business?.username) return window.history?.back?.();\n\n\t\twindow.location.pathname = `/${language}/${business.username}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={onClick || handleGoBack}>\n\t\t\t<SVGIcon icon={ChevronLeft} size={size} theme={theme} />\n\t\t</div>\n\t);\n};\nexport default BackIcon;\n","import { Column, Flex, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./BranchInfo.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\nimport BackIcon from \"src/components/BackIcon\";\n\ninterface Props {\n\tbranch?: branchModels.Branch;\n\thasSingleBranch?: boolean;\n\tname: menuModels.PublicMenuData[\"name\"];\n\tlogoImage: menuModels.PublicMenuData[\"logoImage\"];\n}\n\nconst BranchInfo = ({ branch, hasSingleBranch = true, name, logoImage }: Props) => {\n\tconst { address, latitude, longitude } = branch || {};\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\treturn (\n\t\t<Column justifyContent={hasSingleBranch ? \"flex-end\" : \"space-between\"} fullHeight fullWidth>\n\t\t\t{!hasSingleBranch && <BackIcon size=\"lg\" theme=\"dark-theme\" />}\n\t\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\" fullWidth>\n\t\t\t\t<Flex.Item>\n\t\t\t\t\t<Image src={logoImage} alt={name} className={styles.logo} width={96} height={96} />\n\t\t\t\t</Flex.Item>\n\t\t\t\t<Flex.Item shrink className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</Column>\n\t\t\t\t</Flex.Item>\n\t\t\t</Flex>\n\t\t</Column>\n\t);\n};\nexport default BranchInfo;\n","import { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BusinessInfo.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\n\ninterface Props {\n\tname: menuModels.PublicMenuData[\"name\"];\n\tlogoImage: menuModels.PublicMenuData[\"logoImage\"];\n}\n\nconst BusinessInfo = ({ name, logoImage }: Props) => (\n\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t<Image src={logoImage} alt={name} className={styles.logo} width={96} height={96} />\n\t\t<div className={styles.info}>\n\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t</div>\n\t</Column>\n);\nexport default BusinessInfo;\n","import { IconLink, Row, SVGIcon, Tooltip, useModalContext } from \"@sorocraft/ui\";\nimport {\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n\tClock,\n} from \"@sorocraft/ui/icons\";\nimport { classNames, isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport * as menuModels from \"src/models/menu\";\n\nimport Image from \"src/components/Image\";\n\nimport Languages from \"./Languages\";\nimport BranchInfo from \"./BranchInfo\";\nimport BusinessInfo from \"./BusinessInfo\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverPhoto\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n\thasSingleBranch?: boolean;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverPhoto,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n\thasSingleBranch = true,\n}: Props) => {\n\tconst { setModal } = useModalContext();\n\tconst { phone, wifiPassword, openingHours, deliveryHours } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst isBusinessHoursAvailable = !isEmpty(openingHours?.days) || !isEmpty(deliveryHours?.days);\n\n\tconst openBusinessHours = () => {\n\t\tsetModal({\n\t\t\tid: viewConstants.MODALS.BRANCH_BUSINESS_HOURS,\n\t\t\tparams: { openingHours, deliveryHours },\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className={classNames(styles, { container: true, noBranch })}>\n\t\t\t<Image\n\t\t\t\tsrc={coverPhoto}\n\t\t\t\talt={name}\n\t\t\t\tclassName={styles.cover}\n\t\t\t\twidth={1024}\n\t\t\t\theight={400}\n\t\t\t\tpriority\n\t\t\t\tsizes=\"100vw\"\n\t\t\t\tfetchPriority=\"high\"\n\t\t\t\tloading=\"eager\"\n\t\t\t/>\n\t\t\t<div className={styles.content}>\n\t\t\t\t{noBranch ? (\n\t\t\t\t\t<BusinessInfo name={name} logoImage={logoImage} />\n\t\t\t\t) : (\n\t\t\t\t\t<BranchInfo\n\t\t\t\t\t\tbranch={branch}\n\t\t\t\t\t\thasSingleBranch={hasSingleBranch}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tlogoImage={logoImage}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<Languages />\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{isBusinessHoursAvailable && (\n\t\t\t\t\t\t\t\t\t<div className={styles.businessHours} onClick={openBusinessHours}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Clock} size=\"sm\" className={styles.icon} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\ninterface Props {\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tskipTracking?: boolean;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({\n\tcategoryProductMap = [],\n\tlanguage,\n\tselectedCategoryId,\n\tskipTracking = false,\n\tonSelectCategory,\n}: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\tconst carouselRef = useRef<HTMLDivElement>(null);\n\n\tconst scrollToCategoryBlock = useCallback(() => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock || !carouselRef.current) return;\n\n\t\tconst carouselWidth = carouselRef.current.clientWidth;\n\t\tconst categoryLeft = categoryBlock.offsetLeft;\n\t\tconst categoryWidth = categoryBlock.offsetWidth;\n\n\t\tconst scrollLeft = categoryLeft - carouselWidth / 2 + categoryWidth / 2;\n\t\tcarouselRef.current.scrollTo({ left: scrollLeft, behavior: \"smooth\" });\n\t}, [selectedCategoryId]);\n\n\tconst handleSelectCategory = (id: number, name?: string) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t\tif (skipTracking) return;\n\t\ttrackEvent(analyticsConstants.CATEGORY_SELECTED, { name });\n\t};\n\n\tconst handleGetCarouselRef = (ref: RefObject<HTMLDivElement>) => {\n\t\tif (!ref?.current) return;\n\t\tcarouselRef.current = ref.current;\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId, scrollToCategoryBlock]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1} onGetRef={handleGetCarouselRef}>\n\t\t\t\t{(categoryProductMap || []).map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id, name)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\t\tif (el) categoryBlocksRef.current[id] = el;\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n\nexport interface DashboardProduct extends Omit<Product, \"addons\"> {\n\taddons: number[];\n}\n","export const calculateTotalPrice = (price: number = 0, quantity: number = 1, vat: number = 0) => {\n\treturn price * quantity * (1 + vat / 100);\n};\n","export enum MenuAddonSelectType {\n\tSINGLE = \"SINGLE\",\n\tMULTIPLE = \"MULTIPLE\",\n}\n\nexport interface MenuAddonTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOptionTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface MenuAddonOption {\n\tid?: number;\n\tprice: number;\n\ttranslations: MenuAddonOptionTranslation[];\n\tremove?: boolean;\n}\n\nexport interface MenuAddon {\n\tid?: number;\n\tselectType: MenuAddonSelectType;\n\ttranslations: MenuAddonTranslation[];\n\toptions: MenuAddonOption[];\n\tbusinessId?: number;\n}\n","import { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport {\n\tMenuAddon,\n\tMenuAddonOption,\n\tMenuAddonOptionTranslation,\n\tMenuAddonTranslation,\n} from \"./models\";\n\nexport const getAddonTranslation = (addon: MenuAddon, language: string): MenuAddonTranslation => {\n\treturn (addon?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonTranslation;\n};\n\nexport const getAddonOptionTranslation = (\n\toption: MenuAddonOption,\n\tlanguage: string\n): MenuAddonOptionTranslation => {\n\treturn (option?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as MenuAddonOptionTranslation;\n};\n\nexport const getOptionPrice = ({\n\toption,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n}: {\n\toption: MenuAddonOption;\n\tcurrency?: string;\n\tlanguage?: string;\n}) => {\n\tconst { price } = option || {};\n\n\treturn {\n\t\ttotalPrice: price,\n\t\tformattedTotalPrice: priceFormatter(price, currency, language),\n\t};\n};\n\nexport const getAddonOptionRawPrice = (addon: MenuAddon, optionId: number): number => {\n\treturn (addon?.options || []).find(({ id }) => id === optionId)?.price || 0;\n};\n\nexport const getOptionTitles = (\n\toptions: MenuAddonOption[],\n\toptionIds: number | number[],\n\tlanguage: string\n): string => {\n\tif (Array.isArray(optionIds)) {\n\t\treturn options\n\t\t\t.filter(({ id }) => optionIds.includes(id))\n\t\t\t.map(({ translations }) => translations.find((t) => t.language === language)?.title || \"\")\n\t\t\t.filter(Boolean)\n\t\t\t.join(\", \");\n\t} else {\n\t\tconst option = options.find(({ id }) => id === optionIds);\n\t\treturn option?.translations.find((t) => t.language === language)?.title || \"\";\n\t}\n};\n\nexport const getAddonTitle = (addon: MenuAddon, language: string): string => {\n\treturn addon?.translations?.find?.((t) => t.language === language)?.title || \"\";\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\n\nimport { Product, ProductTranslation, ProductVariant, ProductVariantTranslation } from \"./models\";\n\nimport { calculateTotalPrice } from \"src/utils/common\";\nimport { MenuAddon, MenuAddonSelectType } from \"src/modules/addon/models\";\nimport { getAddonOptionRawPrice } from \"src/modules/addon/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const getProductTranslation = (\n\tproduct: Pick<Product, \"translations\">,\n\tlanguage: string\n): ProductTranslation => {\n\treturn (product?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductTranslation;\n};\n\nexport const getProductRawPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tquantity: number = 1\n) => {\n\tconst { price = 0, vat = 0 } = product || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductPrice = (\n\tproduct: Pick<Product, \"price\" | \"vat\">,\n\tcurrency: string,\n\tlanguage: string,\n\tquantity: number = 1\n) => {\n\tconst totalPrice = getProductRawPrice(product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariant = (\n\tproduct: Pick<Product, \"variants\">,\n\tvariantId: number\n): ProductVariant => {\n\treturn product?.variants?.find?.((item) => item.id === variantId) || ({} as ProductVariant);\n};\n\nexport const getSelectedOptionsTotalPrice = (\n\tproduct: Product,\n\tselectedAddons: orderModels.SelectedAddons = {},\n\tquantity: number\n): number => {\n\t// Filter addons that are selected by the user\n\tconst selectedAddonsList = (product?.addons || []).filter((addon) =>\n\t\tObject.prototype.hasOwnProperty.call(selectedAddons, addon.id)\n\t);\n\n\t// Calculate the total price\n\tconst optionsTotalPrice = selectedAddonsList.reduce((total: number, addon: MenuAddon) => {\n\t\tconst { id: addonId, selectType } = addon;\n\n\t\t// Handle SINGLE selection\n\t\tif (selectType === MenuAddonSelectType.SINGLE) {\n\t\t\tconst selectedOptionId = selectedAddons[addonId] as number;\n\t\t\treturn total + getAddonOptionRawPrice(addon, selectedOptionId);\n\t\t}\n\n\t\t// Handle MULTIPLE selection\n\t\tconst selectedOptionIds = (selectedAddons[addonId] || []) as number[];\n\t\tconst multipleOptionsPrice = selectedOptionIds.reduce(\n\t\t\t(multipleTotal, optionId) => multipleTotal + getAddonOptionRawPrice(addon, optionId),\n\t\t\t0\n\t\t);\n\n\t\treturn total + multipleOptionsPrice;\n\t}, 0);\n\n\treturn optionsTotalPrice * quantity;\n};\n\nexport const getProductVariantRawPrice = (\n\tvariantId: number,\n\tproduct: Pick<Product, \"variants\" | \"vat\">,\n\tquantity?: number\n) => {\n\tconst variant = getProductVariant(product, variantId);\n\tconst { vat } = product || {};\n\tconst { price } = variant || {};\n\treturn calculateTotalPrice(price, quantity, vat);\n};\n\nexport const getProductVariantPrice = ({\n\tvariantId,\n\tcurrency = \"USD\",\n\tlanguage = \"en\",\n\tproduct,\n\tquantity = 1,\n}: {\n\tvariantId: number;\n\tcurrency?: string;\n\tlanguage?: string;\n\tproduct: Pick<Product, \"variants\" | \"vat\">;\n\tquantity?: number;\n}) => {\n\tconst totalPrice = getProductVariantRawPrice(variantId, product, quantity);\n\n\treturn {\n\t\ttotalPrice: totalPrice,\n\t\tformattedTotalPrice: priceFormatter(totalPrice, currency, language),\n\t};\n};\n\nexport const getProductVariantTranslation = (\n\tvariant: ProductVariant,\n\tlanguage: string\n): ProductVariantTranslation => {\n\treturn (variant?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as ProductVariantTranslation;\n};\n\nexport const getProductOrderRawPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}): { price: number; optionsPrice: number; total: number } => {\n\tif (isEmpty(product)) return { price: 0, optionsPrice: 0, total: 0 };\n\n\tconst productData: Product = { ...product, vat: noVat ? 0 : product.vat };\n\tconst selectedOptionsTotalPrice = getSelectedOptionsTotalPrice(\n\t\tproductData,\n\t\tselectedAddons,\n\t\tquantity\n\t);\n\tconst price = variantId\n\t\t? getProductVariantRawPrice(variantId, productData, quantity)\n\t\t: getProductRawPrice(productData, quantity);\n\n\treturn {\n\t\tprice,\n\t\toptionsPrice: selectedOptionsTotalPrice,\n\t\ttotal: price + selectedOptionsTotalPrice,\n\t};\n};\n\nexport const getProductOrderPrice = ({\n\tproduct,\n\tvariantId,\n\tquantity = 1,\n\tcurrency,\n\tlanguage,\n\tselectedAddons,\n\tnoVat = false,\n}: {\n\tproduct: Product;\n\tvariantId: number | null;\n\tquantity: number;\n\tcurrency: string;\n\tlanguage: string;\n\tselectedAddons: orderModels.SelectedAddons;\n\tnoVat?: boolean;\n}) => {\n\tconst { total } = getProductOrderRawPrice({\n\t\tproduct,\n\t\tvariantId,\n\t\tquantity,\n\t\tselectedAddons,\n\t\tnoVat,\n\t});\n\n\treturn {\n\t\ttotalPrice: total,\n\t\tformattedTotalPrice: priceFormatter(total, currency, language),\n\t};\n};\n\nexport const getProductAddon = (product: Product, addonId: number): MenuAddon => {\n\treturn (product?.addons || []).find(({ id }) => id === addonId) || ({} as MenuAddon);\n};\n","import * as featureModels from \"../feature/models\";\nimport * as subscriptionModels from \"../subscription/models\";\n\nexport interface BusinessLanguage {\n\tid: number;\n\tcode: string;\n\tbusinessId: number;\n}\n\nexport enum BusinessSetting {\n\tMAX_DELIVERY_DISTANCE = \"maxDeliveryDistance\",\n\tDELIVERY_ORDER_ENABLED = \"deliveryOrderEnabled\",\n\tPICKUP_ORDER_ENABLED = \"pickupOrderEnabled\",\n\tDINE_IN_ORDER_ENABLED = \"dineInOrderEnabled\",\n\tMIN_DELIVERY_AMOUNT = \"minDeliveryAmount\",\n}\n\nexport interface Business {\n\tid: number;\n\tname: string;\n\tusername: string;\n\tavatar64?: string;\n\tavatar128?: string;\n\tavatar256?: string;\n\tcoverPhoto?: string;\n\tinstagram?: string;\n\tfacebook?: string;\n\ttiktok?: string;\n\tcreatedAt?: number;\n\tcurrency: string;\n\tlanguages: BusinessLanguage[];\n\tsubscriptions?: subscriptionModels.Subscription[];\n\tsegment?: featureModels.FeatureSegment;\n}\n","export enum CustomerAuthStep {\n\tPHONE = \"PHONE\",\n\tOTP = \"OTP\",\n\tEMAIL = \"EMAIL\",\n}\n\nexport enum CustomerAddressType {\n\tHOME = \"HOME\",\n\tWORK = \"WORK\",\n\tTRAVEL = \"TRAVEL\",\n}\n\nexport interface CustomerAddress {\n\tid?: number;\n\taddressId?: number; // Update address temporary\n\tcountryCode: string;\n\tcityName: string;\n\tstreet: string;\n\thouseNumber: string;\n\tadditionalNumber?: string;\n\tpostCode?: string;\n\tinstructions?: string;\n\tfloor?: number;\n\tlongitude?: number;\n\tlatitude?: number;\n\ttitle?: string;\n\ttype?: CustomerAddressType;\n}\n\nexport interface CustomerAuthForm {\n\tphoneNumber: string;\n\totp: string;\n\temail: string;\n}\n\nexport interface CustomerAuthPhoneForm {\n\tcountryCode: string;\n\tphoneNumber: string;\n}\n\nexport interface AuthResponse {\n\taccessToken: string;\n\trefreshToken: string;\n}\n\nexport interface Customer {\n\tid?: number;\n\temail: string;\n\tphoneNumber: string;\n\tfullName: string;\n\tsmsVerified?: boolean;\n\temailVerified?: boolean;\n\taddress?: CustomerAddress;\n\taddresses?: CustomerAddress[];\n}\n\nexport type CustomerUpdatePayload = Partial<Customer>;\n","export enum Feature {\n\tORDER = \"feature_order\",\n}\nexport enum FeatureSegment {\n\tALPHA = \"ALPHA\",\n\tBETA = \"BETA\",\n\tALL = \"ALL\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n\tLIFETIME = \"lifeTime\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n\tribbonText?: string;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n\nexport enum SubscriptionStatus {\n\tACTIVE = \"ACTIVE\",\n\tEXPIRED = \"EXPIRED\",\n\tCANCELLED = \"CANCELLED\",\n}\n\nexport type BillingInterval = \"MONTH\" | \"YEAR\";\n\nexport interface Subscription {\n\tid: number;\n\tbillingInterval: BillingInterval;\n\tbillingIntervalCount: number;\n\tstartDate: string;\n\tendDate: string;\n\tinterval: PricingInterval;\n\tstatus: SubscriptionStatus;\n\tbusiness_id?: number;\n\tplanName: string;\n}\n","export enum TableShape {\n\tSQUARE = \"SQUARE\",\n\tCIRCLE = \"CIRCLE\",\n\tRECTANGLE = \"RECTANGLE\",\n\tRECTANGLE_VERTICAL = \"RECTANGLE_VERTICAL\",\n\tSINGLE_AT_BAR = \"SINGLE_AT_BAR\",\n\tOTHER = \"OTHER\",\n}\n\nexport enum TableStatus {\n\tVACANT = \"VACANT\", // Free and available\n\tRESERVED = \"RESERVED\", // Booked but not yet seated\n\tOCCUPIED = \"OCCUPIED\", // Currently in use\n\tBLOCKED = \"BLOCKED\", // Temporarily blocked/unavailable\n\tNEEDS_CLEANING = \"NEEDS_CLEANING\", // Dirty, awaiting cleanup\n\tOUT_OF_SERVICE = \"OUT_OF_SERVICE\", // Permanently unavailable repair/maintenance\n\tPENDING_CONFIRMATION = \"PENDING_CONFIRMATION\", // Reservation not yet confirmed\n\tNO_SHOW = \"NO_SHOW\", // Reserved but guest didn’t arrive\n}\n\nexport enum TableLocation {\n\t// Indoor\n\tMAIN_HALL = \"MAIN_HALL\",\n\tPRIVATE_DINING = \"PRIVATE_DINING\",\n\tVIP_ROOM = \"VIP_ROOM\",\n\tBANQUET_HALL = \"BANQUET_HALL\",\n\tBAR_AREA = \"BAR_AREA\",\n\tLOUNGE = \"LOUNGE\",\n\tOPEN_KITCHEN = \"OPEN_KITCHEN\",\n\tBOOTH_SECTION = \"BOOTH_SECTION\",\n\tMEZZANINE = \"MEZZANINE\",\n\tWINE_CELLAR = \"WINE_CELLAR\",\n\n\t// Outdoor\n\tTERRACE = \"TERRACE\",\n\tPATIO = \"PATIO\",\n\tGARDEN = \"GARDEN\",\n\tCOURTYARD = \"COURTYARD\",\n\tROOFTOP = \"ROOFTOP\",\n\tBALCONY = \"BALCONY\",\n\tSIDEWALK = \"SIDEWALK\",\n\tPOOLSIDE = \"POOLSIDE\",\n\n\t// Special Sections\n\tSMOKING_AREA = \"SMOKING_AREA\",\n\tNON_SMOKING = \"NON_SMOKING\",\n\tFAMILY_SECTION = \"FAMILY_SECTION\",\n\tKIDS_AREA = \"KIDS_AREA\",\n\tWAITING_AREA = \"WAITING_AREA\",\n\tDANCE_FLOOR = \"DANCE_FLOOR\",\n}\n\nexport interface Table {\n\tid: number;\n\tbusinessId: number;\n\tbranchId: number;\n\tname: string;\n\tseatCount: number;\n\tshape: TableShape;\n\tlocation: TableLocation;\n\tstatus: TableStatus;\n}\n\nexport interface TableState {\n\ttables: Table[];\n}\n\nexport type TableForm = Omit<Table, \"id\" | \"businessId\" | \"branchId\"> & {\n\tbranchId: string | number;\n};\n\nexport type TableUpdate = Partial<Omit<Table, \"id\" | \"businessId\">>;\n\nexport type TableFilter = Partial<Pick<Table, \"branchId\" | \"shape\" | \"location\" | \"status\">>;\n\nexport type TableFilterParams = { field: keyof TableFilter; value: TableFilter[keyof TableFilter] };\n","import az from \"./az\";\nimport en from \"./en\";\nimport ru from \"./ru\";\nimport tr from \"./tr\";\nimport nl from \"./nl\";\nimport et from \"./et\";\n\nexport default {\n\taz,\n\ten,\n\tru,\n\ttr,\n\tnl,\n\tet,\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Xəta baş verdi! Zəhmət olmazsa, yenidən cəhd edin.\",\n\tFIELD_REQUIRED: \"Bu xananı doldurmaq mütləqdir\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azərbaycan nömrələri 9 rəqəmli olur və 50, 51, 10, 55, 99, 70, 77 və ya 60 ilə başlamalıdır\",\n\t\"Unsupported country code\": \"Ölkə kodu düzgün deyil\",\n\t\"Invalid OTP\": \"Təsdiq kodu düzgün deyil\",\n\tINVALID_OTP: \"Təsdiq kodu düzgün deyil\",\n\tOTP_RATE_LIMIT_EXCEEDED:\n\t\t\"Təsdiq kodu göndərmək üçün limiti keçmisiniz. Biraz sonra, yenidən yoxlayın\",\n\t\"Invalid Email Address\": \"Email ünvanı düzgün deyil\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu funksiya mövcud tarif planınıza daxil deyil.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sifariş növü aktiv deyil\",\n\tCOUNTRY_REQUIRED: \"Ölkə daxil edilməlidir.\",\n\tCITY_REQUIRED: \"Şəhər daxil edilməlidir.\",\n\tSTREET_REQUIRED: \"Küçə adı daxil edilməlidir.\",\n\tSTREET_NUMBER_REQUIRED: \"Ev nömrəsi daxil edilməlidir.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu filial sizin ünvana çatdırılma etmir.\",\n\tNO_ORDER_TYPE: \"Zəhmət olmazsa, sifariş növünü seçin.\",\n};\n","export default {\n\tSave: \"Yadda saxla\",\n\tCancel: \"Ləğv et\",\n\tContinue: \"Davam et\",\n};\n","export default {\n\t\"View order\": \"Şifarişi göstər\",\n\t\"Remove from order\": \"Sifarişdən sil\",\n\t\"Update order\": \"Sifarişi yenilə\",\n\t\"Add to order\": \"Sifarişə əlavə et\",\n\tAdd: \"Əlavə et\",\n\t\"Your order\": \"Sifarişiniz\",\n\tSubtotal: \"Ümumi\",\n\t\"Empty order\": \"Boş sifariş\",\n\t\"You don't have any items in your order\": \"Sifarişinizdə heç bir məhsul yoxdur\",\n\t\"Add items\": \"Məhsul əlavə et\",\n\t\"Add an order note\": \"Restoran üçün qeyd\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Hər hansısa allergiyanız, xüsusi istəkləriniz və ya əlavə etmək, çıxarmaq istədiyiniz inqrediyentlər varsa, qeyd edin.\",\n\t\"Your Order is Completed!\": \"Sifarişiniz tamamlandı!\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Təşəkkür edirik! Sifarişinizi qəbul etdik, qısa zamanda çatdırılacaq.\",\n\tDelivery: \"Çatdırılma\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al-apar\",\n\tCash: \"Nağd\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Sifarişdəki məhsullar\",\n\tItems: \"Məhsullar\",\n\tTax: \"Vergi\",\n\tTotal: \"Cəm\",\n\t\"Special instructions, allergies, etc.\": \"Xüsusi istəklər, allergiya və s.\",\n\t\"Go to checkout\": \"Ödənişə keç\",\n\t\"Place order\": \"Sifariş et\",\n\tContinue: \"Davam et\",\n\t\"Not available\": \"Mövcud deyil\",\n\t\"In order\": \"Sifarişdə\",\n\t\"Product choices\": \"Seçimlər\",\n\t\"Track order\": \"Sifarişi izlə\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Çatdırılma üçün sifarişiniz minimum {{amount}} olmalıdır\",\n\t\"This field is required\": \"Bu xana mütləq doldurulmalıdır\",\n\t\"Please select a table\": \"Zəhmət olmazsa, masanı seçin\",\n\t\"Please enter an address\": \"Zəhmət olmazsa, ünvanı daxil edin\",\n\t\"Please choose product\": \"Zəhmət olmazsa, məhsul seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masanı seçin\",\n\tCard: \"Kart ilə\",\n\t\"Closed Now\": \"Hazırda bağlıdır\",\n};\n","export default {\n\t\"Unknown address\": \"Ünvan əlavə edilməyib\",\n\t\"No address available\": \"Ünvan əlavə edilməyib\",\n\t\"Update Delivery Address\": \"Çatdırılma ünvanını dəyişin\",\n\tCountry: \"Ölkə\",\n\tCity: \"Şəhər\",\n\t\"Baker Street\": \"Nizami küçəsi\",\n\tAddress: \"Ünvan\",\n\t\"House number\": \"Ev nömrəsi\",\n\t\"Additional number\": \"Mənzil\",\n\t\"Example: Door code is 555\": \"Nümunə: Qapı kodu 555\",\n\t\"Delivery Instructions\": \"Kuryer üçün təlimatlar\",\n\tAzerbaijan: \"Azərbaycan\",\n\tFloor: \"Mərtəbə\",\n\t\"Enter address\": \"Ünvanı daxil edin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesab yarat və ya daxil ol\",\n\t\"Phone number\": \"Mobil nömrə\",\n\t\"I don't have an email\": \"Email ünvanım yoxdur\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} üçün təsdiq kodunu göndərdik\",\n};\n","export default {\n\tEvents: \"Hərəkətlər\",\n\t\"Scrolled to Category\": \"Kateqoriyaya sürüşdürdü\",\n\t\"Category Selected\": \"Kateqoriya seçildi\",\n\t\"Product Details\": \"Məhsul detalına baxıldı\",\n\t\"Product Added to Order\": \"Sifarişə əlavə edildi\",\n};\n","export default {\n\t\"Get Started\": \"İndi başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Ağıllı QR Menyu\",\n\t\"Link-in-bio\": \"Bio üçün link\",\n\t\"Menu Analytics\": \"Menyu analitikası\",\n\t\"Unlimited Products\": \"Limitsiz məhsul\",\n\t\"Unlimited Categories\": \"Limitsiz kateqoriya\",\n\t\"Product variants\": \"Məhsul variantları\",\n\t\"Product options\": \"Məhsul əlavələri\",\n\t\"Sales reports\": \"Satış hesabatı\",\n\t\"24/7 Support\": \"24/7 dəstək\",\n\t\"Multiple Branches\": \"Şöbələr\",\n\t\"Order Management\": \"Sifarişlərin idarə edilməsi\",\n\t\"Table Management\": \"Masaların idarə edilməsi\",\n\t\"Mobile App for Owners & Staff\": \"Rəhbərlik və ofisiantlar üçün Mobil tətbiq\",\n\t\"Point of Sale (POS)\": \"POS-kassa\",\n\t\"Delivery Management\": \"Çatdırılmaların idarə edilməsi\",\n\t\"Third-Party Delivery Integrations\": \"Çatdırılma partnyorlarının inteqrasiyası\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay ilə ödəniş\",\n\t\"Event management\": \"Tədbirlərin idarəsi\",\n\t\"Unlimited Users\": \"Limitsiz istifadəçi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylıq plan\",\n\tannually: \"İllik plan\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Hər biznesə uyğun tariflər - Sadə qiymətlər, daha çox dəyər!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Biznesinizə uyğun tarif planını seçin. Aylıq və ya illik abunə olun, uzunmüddətli planlarla daha çox qazanın!\",\n\tAppetizer: \"Lite\",\n\t\"Main Course\": \"Plus\",\n\t\"Unlimited Languages\": \"Limitsiz dil seçimi\",\n\t\"30-day money-back guarantee\": \"30 gün ərzində narazı qalsanız, ödəniş geri qaytarılır.\",\n\t\"Limited Time Only\": \"Məhdud müddətə\",\n\t\"/ lifetime\": \"/ birdəfəlik\",\n\t\"Try for free\": \"Pulsuz yoxla\",\n\t\"No credit card needed\": \"Kart tələb olunmur\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Bazar ertəsi\",\n\t\"WEEKDAY-1\": \"Çərşənbə axşamı\",\n\t\"WEEKDAY-2\": \"Çərşənbə\",\n\t\"WEEKDAY-3\": \"Cümə axşamı\",\n\t\"WEEKDAY-4\": \"Cümə\",\n\t\"WEEKDAY-5\": \"Şənbə\",\n\t\"WEEKDAY-6\": \"Bazar\",\n\tClosed: \"Bağlıdır\",\n\t\"Opening Hours\": \"İş saatları\",\n\t\"Delivery Hours\": \"Çatdırılma saatları\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Something went wrong! Please try again later\",\n\tFIELD_REQUIRED: \"This field is required\",\n\tINVALID_OTP: \"Invalid OTP\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP limit has exceeded. Please try again later\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"This feature is not available for your current plan.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"This order type is not available for this business.\",\n\tCOUNTRY_REQUIRED: \"Country is required.\",\n\tCITY_REQUIRED: \"City is required.\",\n\tSTREET_REQUIRED: \"Street is required.\",\n\tSTREET_NUMBER_REQUIRED: \"Street number is required.\",\n\tOUT_OF_DELIVERY_RANGE: \"This branch doesn't deliver to your address.\",\n\tNO_ORDER_TYPE: \"Please select an order type.\",\n};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {};\n","export default {\n\t\"WEEKDAY-0\": \"Monday\",\n\t\"WEEKDAY-1\": \"Tuesday\",\n\t\"WEEKDAY-2\": \"Wednesday\",\n\t\"WEEKDAY-3\": \"Thursday\",\n\t\"WEEKDAY-4\": \"Friday\",\n\t\"WEEKDAY-5\": \"Saturday\",\n\t\"WEEKDAY-6\": \"Sunday\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Что-то пошло не так! Пожалуйста, попробуйте позже\",\n\tFIELD_REQUIRED: \"Это поле обязательно для заполнения\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Азербайджанские номера должны содержать 9 цифр и начинаться с 50, 51, 10, 55, 99, 70, 77 или 60\",\n\t\"Unsupported country code\": \"Неподдерживаемый код страны\",\n\t\"Invalid OTP\": \"Неверный код подтверждения\",\n\tINVALID_OTP: \"Неверный код подтверждения\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Превышен лимит кодов. Попробуйте позже\",\n\t\"Invalid Email Address\": \"Неверный адрес электронной почты\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Эта функция недоступна в вашем текущем тарифе.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Этот тип заказа недоступен для этого заведения.\",\n\tCOUNTRY_REQUIRED: \"Страна обязательна.\",\n\tCITY_REQUIRED: \"Город обязателен.\",\n\tSTREET_REQUIRED: \"Улица обязательна.\",\n\tSTREET_NUMBER_REQUIRED: \"Номер дома обязателен.\",\n\tOUT_OF_DELIVERY_RANGE: \"Этот филиал не доставляет по вашему адресу.\",\n\tNO_ORDER_TYPE: \"Пожалуйста, выберите тип заказа.\",\n};\n","export default {\n\tSave: \"Сохранить\",\n\tCancel: \"Отменить\",\n\tContinue: \"Продолжить\",\n};\n","export default {\n\t\"View order\": \"Посмотреть заказ\",\n\t\"Remove from order\": \"Удалить из заказа\",\n\t\"Update order\": \"Обновить заказ\",\n\t\"Add to order\": \"Добавить в заказ\",\n\tAdd: \"Добавить\",\n\t\"Your order\": \"Ваш заказ\",\n\t\"Empty order\": \"Пустой заказ\",\n\t\"You don't have any items in your order\": \"В вашем заказе нет продуктов\",\n\t\"Add items\": \"Добавить продукты\",\n\tSubtotal: \"Итого\",\n\tEvents: \"События\",\n\t\"Product choices\": \"Варианты продукта\",\n\t\"In order\": \"В заказе\",\n\t\"Not available\": \"Не доступен\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Укажите, если у вас есть аллергия, особые пожелания или ингредиенты, которые вы хотите добавить или убрать.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Спасибо! Мы получили ваш заказ и скоро доставим его.\",\n\t\"Go to checkout\": \"Перейти к оплате\",\n\t\"Add an order note\": \"Добавить примечание к заказу\",\n\t\"Your Order is Completed!\": \"Ваш заказ завершен!\",\n\tDelivery: \"Доставка\",\n\t\"Dine in\": \"На месте\",\n\tPickup: \"Самовывоз\",\n\tCash: \"Наличные\",\n\t\"POS Terminal\": \"POS-терминал\",\n\t\"Order summary\": \"Обзор заказа\",\n\tItems: \"Продукты\",\n\tTax: \"Налог\",\n\tTotal: \"Итого\",\n\t\"Special instructions, allergies, etc.\": \"Особые инструкции, аллергии и т.д.\",\n\t\"Place order\": \"Оформить заказ\",\n\tContinue: \"Продолжить\",\n\t\"Track order\": \"Отследить заказ\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Минимальная сумма заказа для доставки — {{amount}}\",\n\t\"This field is required\": \"Это поле обязательно для заполнения\",\n\t\"Please select a table\": \"Пожалуйста, выберите столик\",\n\t\"Please enter an address\": \"Пожалуйста, введите адрес\",\n\t\"Please choose product\": \"Пожалуйста, выберите продукт\",\n\tTable: \"Стол\",\n\t\"Select Table\": \"Выбрать столик\",\n\tCard: \"Картой\",\n\t\"Closed Now\": \"Сейчас закрыто\",\n};\n","export default {\n\t\"Unknown address\": \"Неизвестный адрес\",\n\t\"No address available\": \"Адрес не доступен\",\n\t\"Update Delivery Address\": \"Обновить адрес доставки\",\n\tCountry: \"Страна\",\n\tCity: \"Город\",\n\t\"Baker Street\": \"Улица Низами\",\n\tAddress: \"Адрес\",\n\t\"House number\": \"Номер дома\",\n\t\"Additional number\": \"Квартира\",\n\t\"Example: Door code is 555\": \"Пример: Код двери 555\",\n\t\"Delivery Instructions\": \"Инструкции по доставке\",\n\tAzerbaijan: \"Азербайджан\",\n\tFloor: \"Этаж\",\n\t\"Enter address\": \"Введите адрес\",\n};\n","export default {\n\t\"Create an account or log in\": \"Создайте аккаунт или войдите\",\n\t\"Phone number\": \"Номер телефона\",\n\t\"I don't have an email\": \"У меня нет электронной почты\",\n\t\"We sent a confirmation code to {{address}}\": \"Мы отправили код подтверждения на {{address}}\",\n};\n","export default {\n\tEvents: \"События\",\n\t\"Scrolled to Category\": \"Прокрутил до категории\",\n\t\"Category Selected\": \"Категория выбрана\",\n\t\"Product Details\": \"Детали продукта\",\n\t\"Product Added to Order\": \"Продукт добавлен в заказ\",\n};\n","export default {\n\t\"Get Started\": \"Начать\",\n\t\"Choose Plan\": \"Выберите план\",\n\t\"Smart QR Menu\": \"Умное меню по QR-коду\",\n\t\"Link-in-bio\": \"Ссылка в био\",\n\t\"Menu Analytics\": \"Аналитика меню\",\n\t\"Unlimited Users\": \"Неограниченные пользователи\",\n\t\"Unlimited Products\": \"Неограниченные продукты\",\n\t\"Unlimited Categories\": \"Неограниченные категории\",\n\t\"Product variants\": \"Варианты продуктов\",\n\t\"Product options\": \"Дополнения к продукту\",\n\t\"Sales reports\": \"Отчеты о продажах\",\n\t\"24/7 Support\": \"24/7 техническая поддержка\",\n\t\"Multiple Branches\": \"Многочисленные филиалы\",\n\t\"Table Management\": \"Управление столами\",\n\t\"Order Management\": \"Управление заказами\",\n\t\"Mobile App for Owners & Staff\": \"Мобильное приложение для владельцев и персонала\",\n\t\"Point of Sale (POS)\": \"POS-касса\",\n\t\"Delivery Management\": \"Управление доставкой\",\n\t\"Third-Party Delivery Integrations\": \"Интеграция со сторонними поставщиками\",\n\t\"RestaroundPay with Mobile\": \"«RestaroundPay» с мобильного\",\n\t\"Event management\": \"Управление мероприятиями\",\n\t\"/ month\": \"/ месяц\",\n\tmonthly: \"Ежемесячный план\",\n\tannually: \"Годовой план\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Тарифы для любого бизнеса - Простой прайс, больше возможностей!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Выберите тарифный план, который подходит вашему бизнесу. Подписывайтесь помесячно или ежегодно и экономьте больше с долгосрочными планами!\",\n\t\"Unlimited Languages\": \"Неограниченное количество языков\",\n\t\"30-day money-back guarantee\": \"Гарантия возврата денег в течение 30 дней\",\n\t\"Limited Time Only\": \"Только ограниченное время\",\n\t\"/ lifetime\": \"/ разово\",\n\t\"Try for free\": \"Попробуйте бесплатно\",\n\t\"No credit card needed\": \"Кредитная карта не требуется\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Понедельник\",\n\t\"WEEKDAY-1\": \"Вторник\",\n\t\"WEEKDAY-2\": \"Среда\",\n\t\"WEEKDAY-3\": \"Четверг\",\n\t\"WEEKDAY-4\": \"Пятница\",\n\t\"WEEKDAY-5\": \"Суббота\",\n\t\"WEEKDAY-6\": \"Воскресенье\",\n\tClosed: \"Закрыто\",\n\t\"Opening Hours\": \"Часы работы\",\n\t\"Delivery Hours\": \"Время доставки\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Bir şeyler yanlış gitti! Lütfen daha sonra tekrar deneyin\",\n\tFIELD_REQUIRED: \"Bu alan zorunludur\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbaycan numaraları 9 haneli olmalı ve 50, 51, 10, 55, 99, 70, 77 veya 60 ile başlamalıdır\",\n\t\"Unsupported country code\": \"Desteklenmeyen ülke kodu\",\n\t\"Invalid OTP\": \"Geçersiz doğrulama kodu\",\n\tINVALID_OTP: \"Geçersiz doğrulama kodu\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"OTP sınırı aşıldı. Lütfen daha sonra tekrar deneyin\",\n\t\"Invalid Email Address\": \"Geçersiz e-posta adresi\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Bu özellik mevcut planınızda yer almıyor.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Bu sipariş türü bu işletmede aktif değil.\",\n\tCOUNTRY_REQUIRED: \"Ülke zorunludur.\",\n\tCITY_REQUIRED: \"Şehir zorunludur.\",\n\tSTREET_REQUIRED: \"Sokak adı zorunludur.\",\n\tSTREET_NUMBER_REQUIRED: \"Bina numarası zorunludur.\",\n\tOUT_OF_DELIVERY_RANGE: \"Bu şube sizin adrese teslimat yapmıyor.\",\n\tNO_ORDER_TYPE: \"Lütfen bir sipariş türü seçin.\",\n};\n","export default {\n\tSave: \"Kaydet\",\n\tCancel: \"İptal et\",\n\tContinue: \"Devam et\",\n};\n","export default {\n\t\"View order\": \"Siparişi Görüntüle\",\n\t\"Remove from order\": \"Siparişten Kaldır\",\n\t\"Update order\": \"Siparişi Güncelle\",\n\t\"Add to order\": \"Siparişe Ekle\",\n\tAdd: \"Ekle\",\n\t\"Your order\": \"Siparişiniz\",\n\t\"Empty order\": \"Boş sipariş\",\n\t\"You don't have any items in your order\": \"Siparişinizde hiç bir ürün yok\",\n\t\"Add items\": \"Ürün ekle\",\n\tSubtotal: \"Toplam\",\n\tEvents: \"Olaylar\",\n\t\"Product choices\": \"Seçenekler\",\n\t\"In order\": \"Siparişte\",\n\t\"Not available\": \"Mevcut değil\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Herhangi bir alerjiniz, özel isteğiniz ya da eklemek veya çıkarmak istediğiniz malzemeler varsa belirtin.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Teşekkürler! Siparişinizi aldık, kısa süre içinde teslim edilecek.\",\n\t\"Go to checkout\": \"Ödemeye geç\",\n\t\"Add an order note\": \"Sipariş notu ekle\",\n\t\"Your Order is Completed!\": \"Siparişiniz tamamlandı!\",\n\tDelivery: \"Teslimat\",\n\t\"Dine in\": \"Masaya\",\n\tPickup: \"Al götür\",\n\tCash: \"Nakit\",\n\t\"POS Terminal\": \"POS Terminali\",\n\t\"Order summary\": \"Sipariş özeti\",\n\tItems: \"Ürünler\",\n\tTax: \"Vergi\",\n\tTotal: \"Toplam\",\n\t\"Special instructions, allergies, etc.\": \"Özel talimatlar, alerjiler vb.\",\n\t\"Place order\": \"Sipariş ver\",\n\tContinue: \"Devam et\",\n\t\"Track order\": \"Siparişi takip et\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Teslimat için minimum sipariş tutarı {{amount}} olmalı\",\n\t\"This field is required\": \"Bu alan zorunludur\",\n\t\"Please select a table\": \"Lütfen bir masa seçin\",\n\t\"Please enter an address\": \"Lütfen bir adres girin\",\n\t\"Please choose product\": \"Lütfen bir ürün seçin\",\n\tTable: \"Masa\",\n\t\"Select Table\": \"Masa seçin\",\n\tCard: \"Kart ile\",\n\t\"Closed Now\": \"Şu anda kapalı\",\n};\n","export default {\n\t\"Unknown address\": \"Bilinmeyen adres\",\n\t\"No address available\": \"Adres mevcut değil\",\n\t\"Update Delivery Address\": \"Teslimat adresini güncelle\",\n\tCountry: \"Ülke\",\n\tCity: \"Şehir\",\n\t\"Baker Street\": \"Istiklal Caddesi\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Ev numarası\",\n\t\"Additional number\": \"Daire numarası\",\n\t\"Example: Door code is 555\": \"Örnek: Kapı kodu 555\",\n\t\"Delivery Instructions\": \"Teslimat talimatları\",\n\tAzerbaijan: \"Azerbaycan\",\n\tFloor: \"Kat\",\n\t\"Enter address\": \"Adres girin\",\n};\n","export default {\n\t\"Create an account or log in\": \"Hesap oluştur veya giriş yap\",\n\t\"Phone number\": \"Telefon numarası\",\n\t\"I don't have an email\": \"E-posta adresim yok\",\n\t\"We sent a confirmation code to {{address}}\": \"{{address}} için doğrulama kodu gönderdik\",\n};\n","export default {\n\tEvents: \"Etkinlikler\",\n\t\"Scrolled to Category\": \"Kategoriye kaydırıldı\",\n\t\"Category Selected\": \"Kategori seçildi\",\n\t\"Product Details\": \"Ürün Detayları\",\n\t\"Product Added to Order\": \"Ürün siparişe eklendi\",\n};\n","export default {\n\t\"Get Started\": \"Hemen Başla\",\n\t\"Choose Plan\": \"Planı seçin\",\n\t\"Smart QR Menu\": \"Akıllı QR Menü\",\n\t\"Link-in-bio\": \"Bio için link\",\n\t\"Menu Analytics\": \"Menü Analitiği\",\n\t\"Unlimited Users\": \"Sınırsız kullanıcı\",\n\t\"Unlimited Products\": \"Sınırsız ürün\",\n\t\"Unlimited Categories\": \"Sınırsız kategori\",\n\t\"Product variants\": \"Ürün çeşitleri\",\n\t\"Product options\": \"Ürün seçenekleri\",\n\t\"Sales reports\": \"Satış raporu\",\n\t\"24/7 Support\": \"24/7 Teknik Destek\",\n\t\"Multiple Branches\": \"Şube Yönetimi\",\n\t\"Table Management\": \"Masa Yönetimi\",\n\t\"Order Management\": \"Sipariş Yönetimi\",\n\t\"Mobile App for Owners & Staff\": \"Patron ve Personel için Mobil Uygulama\",\n\t\"Point of Sale (POS)\": \"POS Adisyon Sistemi\",\n\t\"Delivery Management\": \"Paket sipariş yönetimi\",\n\t\"Third-Party Delivery Integrations\": \"Üçüncü Parti Teslimat Entegrasyonları\",\n\t\"RestaroundPay with Mobile\": \"Mobil ile RestaroundPay\",\n\t\"Event management\": \"Etkinlik yönetimi\",\n\t\"/ month\": \"/ Ay\",\n\tmonthly: \"Aylık\",\n\tannually: \"Yıllık\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"İşletmenize uygun abonelik planını seçin. Aylık veya yıllık abone olun, uzun vadeli planlarla daha fazla tasarruf edin!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Her işletmeye uygun esnek planlar - Basit fiyatlandırma, daha fazla avantaj!\",\n\t\"Unlimited Languages\": \"Sınırsız dil seçeneği\",\n\t\"30-day money-back guarantee\": \"30 gün içinde memnun kalmazsanız, paranız iade.\",\n\t\"Limited Time Only\": \"Sınırlı süreyle\",\n\t\"/ lifetime\": \"/ tek seferlik\",\n\t\"Try for free\": \"Ücretsiz dene\",\n\t\"No credit card needed\": \"Kredi kartı gerekmez\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Pazartesi\",\n\t\"WEEKDAY-1\": \"Salı\",\n\t\"WEEKDAY-2\": \"Çarşamba\",\n\t\"WEEKDAY-3\": \"Perşembe\",\n\t\"WEEKDAY-4\": \"Cuma\",\n\t\"WEEKDAY-5\": \"Cumartesi\",\n\t\"WEEKDAY-6\": \"Pazar\",\n\tClosed: \"Kapalı\",\n\t\"Opening Hours\": \"Çalışma saatleri\",\n\t\"Delivery Hours\": \"Teslimat saatleri\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Er is iets misgegaan! Probeer het later opnieuw\",\n\tFIELD_REQUIRED: \"Dit veld is verplicht\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Azerbeidzjaanse nummers moeten 9 cijfers bevatten en beginnen met 50, 51, 10, 55, 99, 70, 77 of 60\",\n\t\"Unsupported country code\": \"Niet-ondersteunde landcode\",\n\t\"Invalid OTP\": \"Ongeldige verificatiecode\",\n\tINVALID_OTP: \"Ongeldige verificatiecode\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Te veel pogingen. Probeer het later opnieuw\",\n\t\"Invalid Email Address\": \"Ongeldig e-mailadres\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"Deze functie is niet beschikbaar in je huidige pakket.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"Dit type bestelling is niet beschikbaar bij dit bedrijf.\",\n\tCOUNTRY_REQUIRED: \"Land is verplicht.\",\n\tCITY_REQUIRED: \"Stad is verplicht.\",\n\tSTREET_REQUIRED: \"Straat is verplicht.\",\n\tSTREET_NUMBER_REQUIRED: \"Huisnummer is verplicht.\",\n\tOUT_OF_DELIVERY_RANGE: \"Deze vestiging bezorgt niet op jouw adres.\",\n\tNO_ORDER_TYPE: \"Selecteer een besteltype.\",\n};\n","export default {\n\tSave: \"Opslaan\",\n\tCancel: \"Annuleren\",\n\tContinue: \"Doorgaan\",\n};\n","export default {\n\t\"View order\": \"Bestelling bekijken\",\n\t\"Remove from order\": \"Uit bestelling verwijderen\",\n\t\"Update order\": \"Bestelling bijwerken\",\n\t\"Add to order\": \"Aan bestelling toevoegen\",\n\tAdd: \"Toevoegen\",\n\t\"Your order\": \"Uw bestelling\",\n\t\"Empty order\": \"Lege bestelling\",\n\t\"You don't have any items in your order\": \"U heeft geen items in uw bestelling\",\n\t\"Add items\": \"Items toevoegen\",\n\tSubtotal: \"Totaal\",\n\tEvents: \"Gebeurtenissen\",\n\t\"Product choices\": \"Productkeuzes\",\n\t\"In order\": \"In bestelling\",\n\t\"Not available\": \"Niet beschikbaar\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Geef eventuele allergieën, speciale wensen of ingrediënten die je wilt toevoegen of weglaten aan.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Bedankt! We hebben je bestelling ontvangen en bezorgen het zo snel mogelijk.\",\n\t\"Go to checkout\": \"Ga naar afrekenen\",\n\t\"Add an order note\": \"Voeg een bestelopmerking toe\",\n\t\"Your Order is Completed!\": \"Je bestelling is voltooid!\",\n\tDelivery: \"Levering\",\n\t\"Dine in\": \"Ter plaatse\",\n\tPickup: \"Meenemen\",\n\tCash: \"Contant\",\n\t\"POS Terminal\": \"POS Terminal\",\n\t\"Order summary\": \"Bestellingsoverzicht\",\n\tItems: \"Items\",\n\tTax: \"Belasting\",\n\tTotal: \"Totaal\",\n\t\"Special instructions, allergies, etc.\": \"Speciale instructies, allergieën, enz.\",\n\t\"Place order\": \"Plaats bestelling\",\n\tContinue: \"Doorgaan\",\n\t\"Track order\": \"Volg je bestelling\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimale bestelbedrag voor bezorging is {{amount}}\",\n\t\"This field is required\": \"Dit veld is verplicht\",\n\t\"Please select a table\": \"Selecteer alstublieft een tafel\",\n\t\"Please enter an address\": \"Vul alstublieft een adres in\",\n\t\"Please choose product\": \"Kies alstublieft een product\",\n\tTable: \"Tafel\",\n\t\"Select Table\": \"Kies tafel\",\n\tCard: \"Met je Betaalpas\",\n\t\"Closed Now\": \"Nu gesloten\",\n};\n","export default {\n\t\"Unknown address\": \"Onbekend adres\",\n\t\"No address available\": \"Geen adres beschikbaar\",\n\t\"Update Delivery Address\": \"Werk het afleveradres bij\",\n\tCountry: \"Land\",\n\tCity: \"Stad\",\n\t\"Baker Street\": \"Dam straat\",\n\tAddress: \"Adres\",\n\t\"House number\": \"Huisnummer\",\n\t\"Additional number\": \"Appartementnummer\",\n\t\"Example: Door code is 555\": \"Voorbeeld: Deurcode is 555\",\n\t\"Delivery Instructions\": \"Leveringsinstructies\",\n\tAzerbaijan: \"Azerbeidzjan\",\n\tFloor: \"Verdieping\",\n\t\"Enter address\": \"Voer adres in\",\n};\n","export default {\n\t\"Create an account or log in\": \"Maak een account aan of log in\",\n\t\"Phone number\": \"Telefoonnummer\",\n\t\"I don't have an email\": \"Ik heb geen e-mailadres\",\n\t\"We sent a confirmation code to {{address}}\":\n\t\t\"We hebben een bevestigingscode gestuurd naar {{address}}\",\n};\n","export default {\n\tEvents: \"Gebeurtenissen\",\n\t\"Scrolled to Category\": \"Gescrld naar categorie\",\n\t\"Category Selected\": \"Categorie geselecteerd\",\n\t\"Product Details\": \"Productdetails\",\n\t\"Product Added to Order\": \"Product aan bestelling toegevoegd\",\n};\n","export default {\n\t\"Get Started\": \"Start nu\",\n\t\"Choose Plan\": \"Kies een plan\",\n\t\"Smart QR Menu\": \"Slimme QR-menu\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menu analyse\",\n\t\"Unlimited Products\": \"Onbeperkte producten\",\n\t\"Unlimited Categories\": \"Onbeperkte categorieën\",\n\t\"Unlimited Users\": \"Onbeperkte gebruikers\",\n\t\"Product variants\": \"Productvarianten\",\n\t\"Product options\": \"Productopties\",\n\t\"Sales reports\": \"Verkooprapporten\",\n\t\"24/7 Support\": \"24/7 ondersteuning\",\n\t\"Multiple Branches\": \"Meerdere vestigingen\",\n\t\"Table Management\": \"Tafelbeheer\",\n\t\"Order Management\": \"Orderbeheer\",\n\t\"Mobile App for Owners & Staff\": \"Mobiele app voor eigenaren en personeel\",\n\t\"Point of Sale (POS)\": \"Kassasysteem (POS)\",\n\t\"Delivery Management\": \"Leveringsbeheer\",\n\t\"Third-Party Delivery Integrations\": \"Integraties van derden\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay met mobiel\",\n\t\"Event management\": \"Beheer van evenementen\",\n\t\"/ month\": \"/ maand\",\n\tmonthly: \"Maandelijks\",\n\tannually: \"Jaarlijks\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Kies een abonnementsplan dat bij jouw bedrijf past. Abonneer je maandelijks of jaarlijks en bespaar meer met een lange termijn plan!\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Flexibele abonnementen voor elk bedrijf - Eenvoudige prijzen, meer waarde!\",\n\t\"Unlimited Languages\": \"Onbeperkt aantal talen\",\n\t\"30-day money-back guarantee\": \"30 dagen niet-goed-geld-terug garantie\",\n\t\"Limited Time Only\": \"Beperkte tijd\",\n\t\"/ lifetime\": \"/ eenmalig\",\n\t\"Try for free\": \"Probeer gratis\",\n\t\"No credit card needed\": \"Geen creditcard nodig\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Maandag\",\n\t\"WEEKDAY-1\": \"Dinsdag\",\n\t\"WEEKDAY-2\": \"Woensdag\",\n\t\"WEEKDAY-3\": \"Donderdag\",\n\t\"WEEKDAY-4\": \"Vrijdag\",\n\t\"WEEKDAY-5\": \"Zaterdag\",\n\t\"WEEKDAY-6\": \"Zondag\",\n\tClosed: \"Gesloten\",\n\t\"Opening Hours\": \"Openingstijden\",\n\t\"Delivery Hours\": \"Bezorgtijden\",\n};\n","import errorNs from \"./error\";\nimport common from \"./common\";\nimport order from \"./order\";\nimport customer from \"./customer\";\nimport auth from \"./auth\";\nimport events from \"./events\";\nimport pricing from \"./pricing\";\nimport branch from \"./branch\";\n\nexport default {\n\terror: errorNs,\n\tcommon,\n\torder,\n\tcustomer,\n\tauth,\n\tevents,\n\tpricing,\n\tbranch,\n};\n","export default {\n\tSOMETHING_WRONG: \"Midagi läks valesti! Palun proovi hiljem uuesti\",\n\tFIELD_REQUIRED: \"See väli on kohustuslik\",\n\t\"Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60\":\n\t\t\"Aserbaidžaani numbrid peavad olema 9-kohalised ja algama 50, 51, 10, 55, 99, 70, 77 või 60-ga\",\n\t\"Unsupported country code\": \"Riigikood ei ole toetatud\",\n\t\"Invalid OTP\": \"Vale kinnituskood\",\n\tINVALID_OTP: \"Vale kinnituskood\",\n\tOTP_RATE_LIMIT_EXCEEDED: \"Kinnituskoodide limiit ületatud. Proovi hiljem uuesti\",\n\t\"Invalid Email Address\": \"Vigane e-posti aadress\",\n\tFEATURE_NOT_AVAILABLE_FOR_SEGMENT: \"See funktsioon ei ole sinu praeguse paketiga saadaval.\",\n\tORDER_TYPE_DISABLED_FOR_BUSINESS: \"See tellimuse tüüp ei ole selles ettevõttes saadaval.\",\n\tCOUNTRY_REQUIRED: \"Riik on kohustuslik.\",\n\tCITY_REQUIRED: \"Linn on kohustuslik.\",\n\tSTREET_REQUIRED: \"Tänav on kohustuslik.\",\n\tSTREET_NUMBER_REQUIRED: \"Maja number on kohustuslik.\",\n\tOUT_OF_DELIVERY_RANGE: \"See filiaal ei toimeta sellele aadressile.\",\n\tNO_ORDER_TYPE: \"Palun vali tellimuse tüüp.\",\n};\n","export default {\n\tSave: \"Salvesta\",\n\tCancel: \"Tühista\",\n\tContinue: \"Jätka\",\n};\n","export default {\n\t\"View order\": \"Vaata tellimust\",\n\t\"Remove from order\": \"Eemalda tellimusest\",\n\t\"Update order\": \"Uuenda tellimust\",\n\t\"Add to order\": \"Lisa tellimusele\",\n\tAdd: \"Lisa\",\n\t\"Your order\": \"Teie tellimus\",\n\t\"Empty order\": \"Tühi tellimus\",\n\t\"You don't have any items in your order\": \"Teie tellimuses pole ühtegi eset\",\n\t\"Add items\": \"Lisa esemeid\",\n\tSubtotal: \"Kokku\",\n\tEvents: \"Sündmused\",\n\t\"Product choices\": \"Tootevalikud\",\n\t\"In order\": \"Tellimuses\",\n\t\"Not available\": \"Ei ole saadaval\",\n\t\"Specify any allergies, special requests, or ingredients you want to add or remove\":\n\t\t\"Kui sul on allergiaid, erisoove või soovid mõnda koostisosa lisada või eemaldada, anna sellest teada.\",\n\t\"Thank you! We've received your order and it will be delivered shortly.\":\n\t\t\"Aitäh! Oleme sinu tellimuse kätte saanud ja toome selle peagi kohale.\",\n\t\"Go to checkout\": \"Mine kassasse\",\n\t\"Add an order note\": \"Lisa tellimuse märkus\",\n\t\"Your Order is Completed!\": \"Teie tellimus on lõpetatud!\",\n\tDelivery: \"Kohaletoimetamine\",\n\t\"Dine in\": \"Sööma jäämine\",\n\tPickup: \"Eemaldamine\",\n\tCash: \"Sularaha\",\n\t\"POS Terminal\": \"POS terminal\",\n\t\"Order summary\": \"Tellimuse kokkuvõte\",\n\tItems: \"Tooted\",\n\tTax: \"Maks\",\n\tTotal: \"Kokku\",\n\t\"Special instructions, allergies, etc.\": \"Erisoovid, allergiad jne.\",\n\t\"Place order\": \"Esita tellimus\",\n\tContinue: \"Jätka\",\n\t\"Track order\": \"Jälgi tellimust\",\n\t\"Minimum order amount for delivery is {{amount}}\":\n\t\t\"Minimaalne tellimuse summa kohaletoimetamiseks on {{amount}}\",\n\t\"This field is required\": \"See väli on kohustuslik\",\n\t\"Please select a table\": \"Palun vali laud\",\n\t\"Please enter an address\": \"Palun sisesta aadress\",\n\t\"Please choose product\": \"Palun vali toode\",\n\tTable: \"Laud\",\n\t\"Select Table\": \"Vali laud\",\n\tCard: \"Kaardiga\",\n\t\"Closed Now\": \"Praegu suletud\",\n};\n","export default {\n\t\"Unknown address\": \"Tundmatu aadress\",\n\t\"No address available\": \"Aadress puudub\",\n\t\"Update Delivery Address\": \"Uuenda kohaletoimetamise aadress\",\n\tCountry: \"Riik\",\n\tCity: \"Linn\",\n\t\"Baker Street\": \"Nizami tänav\",\n\tAddress: \"Aadress\",\n\t\"House number\": \"Majanumber\",\n\t\"Additional number\": \"Korteri number\",\n\t\"Example: Door code is 555\": \"Näide: Uksekood on 555\",\n\t\"Delivery Instructions\": \"Kohaletoimetamise juhised\",\n\tAzerbaijan: \"Aserbaidžaan\",\n\tFloor: \"Põrand\",\n\t\"Enter address\": \"Sisesta aadress\",\n};\n","export default {\n\t\"Create an account or log in\": \"Loo konto või logi sisse\",\n\t\"Phone number\": \"Telefoninumber\",\n\t\"I don't have an email\": \"Mul ei ole e-posti aadressi\",\n\t\"We sent a confirmation code to {{address}}\": \"Saatsime kinnituskoodi aadressile {{address}}\",\n};\n","export default {\n\tEvents: \"Sündmused\",\n\t\"Scrolled to Category\": \"Keriti kategooriasse\",\n\t\"Category Selected\": \"Kategooria valitud\",\n\t\"Product Details\": \"Toote detailid\",\n\t\"Product Added to Order\": \"Toode lisatud tellimusele\",\n};\n","export default {\n\t\"Get Started\": \"Alustage\",\n\t\"Choose Plan\": \"Vali plaan\",\n\t\"Smart QR Menu\": \"Nutikas QR-menüü\",\n\t\"Link-in-bio\": \"Link-in-bio\",\n\t\"Menu Analytics\": \"Menüü Analüütika\",\n\t\"Unlimited Products\": \"Piiramata tooted\",\n\t\"Unlimited Categories\": \"Piiramata kategooriad\",\n\t\"Product variants\": \"Tootevariandid\",\n\t\"Product options\": \"Toote valikud\",\n\t\"Sales reports\": \"Müügiaruanded\",\n\t\"24/7 Support\": \"24/7 tugi\",\n\t\"Multiple Branches\": \"Mitu filiaali\",\n\t\"Table Management\": \"Tabelite haldamine\",\n\t\"Order Management\": \"Tellimuste haldamine\",\n\t\"Mobile App for Owners & Staff\": \"Mobiilirakendus omanikele ja töötajatele\",\n\t\"Point of Sale (POS)\": \"Müügipunkt (POS)\",\n\t\"Delivery Management\": \"Tarnejuhtimine\",\n\t\"Third-Party Delivery Integrations\": \"Kolmanda osapoole tarneintegratsioonid\",\n\t\"RestaroundPay with Mobile\": \"RestaroundPay koos mobiiliga\",\n\t\"Event management\": \"Sündmuste haldamine\",\n\t\"Unlimited Users\": \"Piiramatu arv kasutajaid\",\n\t\"/ month\": \"/ kuus\",\n\tmonthly: \"Igakuine\",\n\tannually: \"Igal aastal\",\n\t\"Flexible Plans for Every Business - Simple Pricing, More Value!\":\n\t\t\"Paindlikud plaanid igale ettevõttele - Lihtne hind, rohkem väärtust!\",\n\t\"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!\":\n\t\t\"Vali tellimus, mis sobib sinu ettevõttele. Telli igakuiselt või kord aastas ning säästa rohkem pikaajaliste plaanidega!\",\n\t\"Unlimited Languages\": \"Piiramatu arv keeli\",\n\t\"30-day money-back guarantee\": \"30-päevane raha tagasi garantii\",\n\t\"Limited Time Only\": \"Ainult piiratud ajaks\",\n\t\"/ lifetime\": \"/ eluaegne\",\n\t\"Try for free\": \"Proovi tasuta\",\n\t\"No credit card needed\": \"Krediitkaarti pole vaja\",\n};\n","export default {\n\t\"WEEKDAY-0\": \"Esmaspäev\",\n\t\"WEEKDAY-1\": \"Teisipäev\",\n\t\"WEEKDAY-2\": \"Kolmapäev\",\n\t\"WEEKDAY-3\": \"Neljapäev\",\n\t\"WEEKDAY-4\": \"Reede\",\n\t\"WEEKDAY-5\": \"Laupäev\",\n\t\"WEEKDAY-6\": \"Pühapäev\",\n\tClosed: \"Suletud\",\n\t\"Opening Hours\": \"Lahtiolekuajad\",\n\t\"Delivery Hours\": \"Kohaletoimetamise ajad\",\n};\n","import { DEFAULT_LANGUAGE, SUPPORTED_LOCALES } from \"src/modules/view/constants\";\nimport locales from \"./locales\";\n\nexport const getTranslations = (locale: string, ns: string) => {\n\ttry {\n\t\tconst supportedLocale = SUPPORTED_LOCALES.includes(locale) ? locale : DEFAULT_LANGUAGE;\n\n\t\tconst translations = locales[supportedLocale as never][ns] || {};\n\n\t\tconst t = (key: string, options?: Record<string, string>) => {\n\t\t\ttry {\n\t\t\t\tconst translation = translations[key] || key;\n\n\t\t\t\tif (options) {\n\t\t\t\t\treturn Object.keys(options).reduce(\n\t\t\t\t\t\t(acc, k) => acc.replace(`{{${k}}}`, options[k]),\n\t\t\t\t\t\ttranslation\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn translation;\n\t\t\t} catch (error) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.error(error);\n\t\t\t\treturn key;\n\t\t\t}\n\t\t};\n\n\t\treturn { t };\n\t} catch (error) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error(error);\n\t\treturn { t: (key: string) => key };\n\t}\n};\n","import { getTranslations } from \"src/services/translation\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useTranslation = (ns: string = \"common\", params?: { language?: string }) => {\n\tconst { language } = useStoreContext();\n\tconst locale = params?.language || language;\n\n\tconst { t } = getTranslations(locale, ns);\n\n\treturn { t };\n};\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n\tonClick?: () => void;\n}\n\nconst ProductsListItem = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\tconst { image160, volume, available } = product || {};\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\tconst hasImage = !!image160;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\taddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tnoImage: !hasImage,\n\t\t\t})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<Row justifyContent=\"space-between\" gap={0}>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<p className={styles.description}>{description}</p>\n\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t{!!volume && <Text color=\"muted\">{volume}</Text>}\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t<Text size=\"xs\" color=\"danger\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{hasImage && (\n\t\t\t\t\t<Image\n\t\t\t\t\t\tsrc={getImageSource(image160)}\n\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\twidth={160}\n\t\t\t\t\t\theight={90}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{available && (\n\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { Column, IconButton, Row, UIElementType, Text } from \"@sorocraft/ui\";\nimport { classNames, trackEvent } from \"@sorocraft/js-utils\";\nimport { Plus } from \"@sorocraft/ui/icons\";\nimport { MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductsGridItem.module.scss\";\n\nimport { utils as productUtils } from \"src/modules/product\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\nconst ProductsGridItem = ({\n\tproduct,\n\tcurrency,\n\tlanguage,\n\tdefaultImage = \"\",\n\tisDashboard = false,\n\tonClick,\n\tonAddProduct,\n}: ProductsGridItemProps) => {\n\tconst { volume, image580, image160, image1024, available } = product || {};\n\tconst image = image580 || image1024 || image160 || defaultImage;\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\tconst { t } = useTranslation(\"order\");\n\n\tconst hasVariant = product?.variants?.length > 0;\n\tconst hasAddons = product?.addons?.length > 0;\n\n\tconst handleAddToOrder = (e: MouseEvent<HTMLElement>) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tif ((hasVariant || hasAddons) && onClick) return onClick();\n\n\t\tonAddProduct({ product });\n\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity: 1 });\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tcontent: true,\n\t\t\t\t\tisClickable: !!onClick,\n\t\t\t\t\tnoImage: !image,\n\t\t\t\t})}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t{image && (\n\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\tsrc={getImageSource(image)}\n\t\t\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\timage: true,\n\t\t\t\t\t\t\t\tnotAvailable: !available,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\twidth={580}\n\t\t\t\t\t\t\theight={326}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t\t<Column gap={0.25}>\n\t\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t\t{!isDashboard && <p className={styles.description}>{description}</p>}\n\n\t\t\t\t\t\t\t<Row className={styles.price} gap={0.5} fullWidth justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t<span>{formattedTotalPrice}</span>\n\t\t\t\t\t\t\t\t{!!volume && (\n\t\t\t\t\t\t\t\t\t<Text color=\"white\" className={styles.volume}>\n\t\t\t\t\t\t\t\t\t\t{volume}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t{!available && (\n\t\t\t\t\t\t\t\t<Text color=\"white\" size=\"xs\" className={styles.notAvailableText}>\n\t\t\t\t\t\t\t\t\t{t(\"Not available\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{available && (\n\t\t\t\t\t<div className={styles.addToOrder}>\n\t\t\t\t\t\t<IconButton onClick={handleAddToOrder} icon={Plus} type={UIElementType.DEFAULT} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default ProductsGridItem;\n","import { useOrderContext } from \"src/store/order\";\n\nimport ProductsGridItem from \"./ProductsGridItem\";\nimport { ProductsGridItemProps } from \"./ProductsGridItem.types\";\n\ntype Props = Omit<ProductsGridItemProps, \"onAddProduct\">;\n\nconst ProductsGridItemContainer = ({ product, currency, language, onClick }: Props) => {\n\tconst { addProduct } = useOrderContext();\n\n\treturn (\n\t\t<ProductsGridItem\n\t\t\tonAddProduct={addProduct}\n\t\t\tproduct={product}\n\t\t\tcurrency={currency}\n\t\t\tlanguage={language}\n\t\t\tonClick={onClick}\n\t\t/>\n\t);\n};\n\nexport default ProductsGridItemContainer;\n","import { useOrderContext } from \"src/store/order\";\n\nimport { Customer, CustomerAddress } from \"./models\";\n\nexport const useAvailableCustomer = (): Customer => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer || ({} as Customer);\n};\n\nexport const useCustomerAddress = (): CustomerAddress => {\n\tconst { customer } = useOrderContext();\n\n\tconst address = customer?.addresses?.[customer?.addresses?.length - 1];\n\n\treturn address || ({} as CustomerAddress);\n};\n\nexport const useCustomerId = (): number => {\n\tconst { customer } = useOrderContext();\n\n\treturn customer?.id;\n};\n","import { isEmpty, priceFormatter } from \"@sorocraft/js-utils\";\nimport { useEffect, useState } from \"react\";\n\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport * as customerServices from \"src/modules/customer/services\";\nimport * as customerHooks from \"src/modules/customer/hooks\";\nimport * as branchHooks from \"src/modules/branch/hooks\";\n\nimport { generateOrderItemsId, getOrderItemPrice } from \"./utils\";\nimport { Order, OrderItem, OrderPayload, OrderStep, OrderType, SelectedAddons } from \"./models\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nexport const useOrderPriceDetails = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce(\n\t\t(total, item: OrderItem) => {\n\t\t\tconst { totalGross, totalNet, totalTax } = getOrderItemPrice(item);\n\t\t\treturn {\n\t\t\t\ttotalPriceWithTax: total.totalPriceWithTax + totalGross,\n\t\t\t\ttotalPriceWithoutTax: total.totalPriceWithoutTax + totalNet,\n\t\t\t\ttotalTax: total.totalTax + totalTax,\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\ttotalPriceWithTax: 0,\n\t\t\ttotalPriceWithoutTax: 0,\n\t\t\ttotalTax: 0,\n\t\t}\n\t);\n};\n\nexport const usePrepareOrder = (existingOrderData: Partial<Order> = {}): OrderPayload => {\n\tconst { selectedBranch, businessId } = useStoreContext();\n\tconst { order, orderItems } = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax } = useOrderPriceDetails();\n\tconst address = customerHooks.useCustomerAddress();\n\tconst customerId = customerHooks.useCustomerId();\n\n\tconst {\n\t\tworkingDayId,\n\t\ttableId,\n\t\temployeeId,\n\t\torderType,\n\t\tpaymentMethod,\n\t\tnote,\n\t\tvat = 0,\n\t} = { ...order, ...existingOrderData };\n\n\treturn {\n\t\tbranchId: selectedBranch?.id,\n\t\tbusinessId,\n\t\tworkingDayId,\n\t\ttableId,\n\t\tcustomerId,\n\t\tcustomerAddressId: address.id,\n\t\temployeeId,\n\t\torderType,\n\t\ttotalPriceWithTax,\n\t\ttotalPriceWithoutTax,\n\t\ttotalTax,\n\t\titems: Object.values(orderItems || {}),\n\t\tvat,\n\t\tpaymentMethod,\n\t\tnote,\n\t};\n};\n\nexport const useTotalOrderItemsCount = () => {\n\tconst { orderItems } = useOrderContext();\n\n\treturn Object.values(orderItems || {}).reduce((sum, item) => sum + item.quantity, 0);\n};\n\nexport const useOrderItemsTotalPrice = () => {\n\tconst { orderItems } = useOrderContext();\n\tconst { currency, language } = useStoreContext();\n\n\tconst orderItemsTotalPrice = Object.values(orderItems || {}).reduce((sum, item: OrderItem) => {\n\t\tconst { totalGross } = getOrderItemPrice(item);\n\t\treturn sum + totalGross;\n\t}, 0);\n\n\treturn {\n\t\ttotalPrice: orderItemsTotalPrice,\n\t\tformattedTotalPrice: priceFormatter(orderItemsTotalPrice, currency, language),\n\t};\n};\n\nexport const useProductQuantityInOrder = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number | null;\n\tselectedAddons: SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\tconst orderItemsId = generateOrderItemsId(productId, variantId, selectedAddons);\n\n\treturn orderItems[orderItemsId]?.quantity || 0;\n};\n\nexport const useProductQuantityInOrderWithAllVariants = (productId: number): number => {\n\tconst { orderItems } = useOrderContext();\n\tif (isEmpty(orderItems) || !productId) return 0;\n\n\t// get all order Items items with the same product id\n\tconst productOrderItems = Object.values(orderItems).filter(\n\t\t(item) => item.productId === productId\n\t);\n\n\t// get the total quantity of all order Items items with the same product id\n\tconst totalQuantity = productOrderItems.reduce((sum, item) => sum + item.quantity, 0);\n\n\treturn totalQuantity;\n};\n\nexport const useOrderItemPrice = (item: OrderItem) => {\n\tconst { language, currency } = useStoreContext();\n\tconst { totalGross } = getOrderItemPrice(item);\n\n\treturn {\n\t\ttotalPrice: totalGross,\n\t\tformattedTotalPrice: priceFormatter(totalGross, currency, language),\n\t};\n};\n\nexport const useDeliveryDistanceError = (): string | null => {\n\tconst { t } = useTranslation(\"error\");\n\tconst branchCoordinates = branchHooks.useBranchCoordinates();\n\tconst maxDeliveryDistance = branchHooks.useMaxDeliveryDistance();\n\tconst { latitude, longitude } = customerHooks.useCustomerAddress();\n\n\tconst [error, setError] = useState<string | null>(null);\n\n\tuseEffect(() => {\n\t\tconst hasValidCustomerAddress = !!latitude && !!longitude;\n\t\tconst hasValidBranchCoordinates = !isEmpty(branchCoordinates);\n\n\t\tconst checkDistance = async () => {\n\t\t\tif (!hasValidCustomerAddress || !hasValidBranchCoordinates) {\n\t\t\t\treturn setError(\"INVALID_ADDRESS\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst distance = await customerServices.getCustomerDistance(branchCoordinates, {\n\t\t\t\t\tlatitude,\n\t\t\t\t\tlongitude,\n\t\t\t\t});\n\n\t\t\t\tsetError(!distance || distance > maxDeliveryDistance ? \"OUT_OF_DELIVERY_RANGE\" : null);\n\t\t\t} catch {\n\t\t\t\tsetError(\"OUT_OF_DELIVERY_RANGE\");\n\t\t\t}\n\t\t};\n\n\t\tcheckDistance();\n\t}, [latitude, longitude, branchCoordinates, maxDeliveryDistance]);\n\n\treturn error ? t(error) : null;\n};\n\nexport const useDeliveryAmountError = (): string | null => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { currency, language } = useStoreContext();\n\tconst minDeliveryAmount = branchHooks.useMinDeliveryAmount();\n\tconst { totalPrice } = useOrderItemsTotalPrice();\n\n\tif (totalPrice < minDeliveryAmount) {\n\t\tconst amount = priceFormatter(minDeliveryAmount, currency, language);\n\t\treturn t(\"Minimum order amount for delivery is {{amount}}\", { amount });\n\t}\n\n\treturn null;\n};\n\nexport const useOrderErrorInDetails = (): string | null => {\n\tconst { order, orderStep } = useOrderContext();\n\tconst deliveryDistanceError = useDeliveryDistanceError();\n\tconst deliveryAmountError = useDeliveryAmountError();\n\tconst { t } = useTranslation(\"error\");\n\n\t// Only check errors at DETAILS step\n\tif (orderStep !== OrderStep.DETAILS) return null;\n\n\tif (!order?.orderType) return t(\"NO_ORDER_TYPE\");\n\tif (order.orderType === OrderType.DELIVERY) return deliveryAmountError || deliveryDistanceError;\n\n\treturn null;\n};\n","import { Row, SIZE, SVGIcon } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { Minus, Plus } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Quantity.module.scss\";\n\ninterface Props {\n\tisDecreaseDisabled?: boolean;\n\tquantity?: number;\n\tsize?: SIZE;\n\tonIncrease: () => void;\n\tonDecrease: () => void;\n}\n\nconst Quantity = ({\n\tisDecreaseDisabled = false,\n\tquantity = 1,\n\tsize = \"md\",\n\tonIncrease,\n\tonDecrease,\n}: Props) => {\n\treturn (\n\t\t<Row\n\t\t\tclassName={classNames(\n\t\t\t\tstyles,\n\t\t\t\t{\n\t\t\t\t\tcontainer: true,\n\t\t\t\t},\n\t\t\t\t[styles[size]]\n\t\t\t)}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\tquantityAction: true,\n\t\t\t\t\tisDisabled: isDecreaseDisabled,\n\t\t\t\t})}\n\t\t\t\tonClick={onDecrease}\n\t\t\t>\n\t\t\t\t<SVGIcon icon={Minus} />\n\t\t\t</div>\n\t\t\t<div className={styles.quantityValue}>{quantity}</div>\n\t\t\t<div className={styles.quantityAction} onClick={onIncrease}>\n\t\t\t\t<SVGIcon icon={Plus} />\n\t\t\t</div>\n\t\t</Row>\n\t);\n};\nexport default Quantity;\n","import { Flex, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { ShoppingBag, Trash } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./ProductInOrder.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tproductId: number;\n\tquantity: number;\n\tisInPublicMenu?: boolean;\n\tlanguage?: string;\n\tonModalClose: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductInOrder = ({\n\tproductId,\n\tquantity,\n\tisInPublicMenu = true,\n\tlanguage,\n\tremoveAllProductVariants,\n\tonModalClose,\n}: Props) => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst handleOpenOrder = () => {\n\t\tsetIsOrderOpen(true);\n\t\tif (onModalClose) onModalClose();\n\t};\n\n\tconst handleRemoveAllFromOrder = () => {\n\t\tremoveAllProductVariants(productId);\n\t};\n\n\tif (quantity <= 0) return null;\n\n\treturn (\n\t\t<Flex className={styles.container} fullWidth justifyContent=\"space-between\" alignItems=\"center\">\n\t\t\t<Flex.Item flex={1} className={styles.title}>\n\t\t\t\t{t(\"In order\")} ({quantity})\n\t\t\t</Flex.Item>\n\n\t\t\t<Flex.Item flex={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={Trash}\n\t\t\t\t\t\tonClick={handleRemoveAllFromOrder}\n\t\t\t\t\t\ttype={UIElementType.DANGER}\n\t\t\t\t\t\ttooltip={t(\"Remove from order\")}\n\t\t\t\t\t/>\n\t\t\t\t\t{isInPublicMenu && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon={ShoppingBag}\n\t\t\t\t\t\t\tonClick={handleOpenOrder}\n\t\t\t\t\t\t\ttype={UIElementType.SUCCESS}\n\t\t\t\t\t\t\ttooltip={t(\"View order\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default ProductInOrder;\n","import { useEffect, useRef } from \"react\";\nimport { Column, Input, InputType, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductVariants.module.scss\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"variants\" | \"vat\">;\n\tselectedVariant: number;\n\tfocusedSection: string;\n\tlanguage: string;\n\tcurrency: string;\n\tonSelectVariant: (id: number) => void;\n}\n\nconst ProductVariants = ({\n\tproduct,\n\tselectedVariant,\n\tfocusedSection,\n\tlanguage,\n\tcurrency,\n\tonSelectVariant,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tconst { variants } = product || {};\n\n\tconst isVariantsFocused = focusedSection === \"variant\";\n\n\tuseEffect(() => {\n\t\tif (isVariantsFocused && containerRef.current) {\n\t\t\tcontainerRef.current.scrollIntoView({ behavior: \"smooth\" });\n\t\t}\n\t}, [focusedSection, isVariantsFocused]);\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tfocused: isVariantsFocused,\n\t\t\t})}\n\t\t\tgap={1}\n\t\t\tfullWidth\n\t\t>\n\t\t\t<div className={styles.variantsTitle} ref={containerRef}>\n\t\t\t\t{t(\"Product choices\")}\n\t\t\t</div>\n\t\t\t{(variants || []).map((variant) => {\n\t\t\t\tconst { id } = variant || {};\n\t\t\t\tconst { formattedTotalPrice: formattedTotalVariantPrice } =\n\t\t\t\t\tproductUtils.getProductVariantPrice({\n\t\t\t\t\t\tvariantId: id,\n\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\tproduct,\n\t\t\t\t\t});\n\n\t\t\t\tconst { title } = productUtils.getProductVariantTranslation(variant, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row\n\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\tjustifyContent=\"space-between\"\n\t\t\t\t\t\tonClick={() => onSelectVariant(id)}\n\t\t\t\t\t\tclassName={styles.variant}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tlabel={title}\n\t\t\t\t\t\t\tname=\"variant\"\n\t\t\t\t\t\t\tonChange={() => onSelectVariant(id)}\n\t\t\t\t\t\t\tchecked={selectedVariant === id}\n\t\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className={styles.variantPrice}>{formattedTotalVariantPrice}</div>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductVariants;\n","import { Column, Input, InputType, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductAddons.module.scss\";\n\nimport { models as productModels } from \"src/modules/product\";\nimport { models as addonModels, utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ninterface Props {\n\tproduct: Pick<productModels.Product, \"addons\">;\n\tselectedAddons: orderModels.SelectedAddons;\n\tlanguage: string;\n\tcurrency: string;\n\tonOptionSelect: (selection: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n}\n\nconst ProductAddons = ({ product, selectedAddons, language, currency, onOptionSelect }: Props) => {\n\tconst { addons } = product || {};\n\n\treturn (\n\t\t<Column className={styles.container} gap={1.5} fullWidth>\n\t\t\t{(addons || []).map((addon) => {\n\t\t\t\tconst { id: addonId, options, selectType } = addon || {};\n\t\t\t\tconst { title } = addonUtils.getAddonTranslation(addon, language);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Column key={addonId}>\n\t\t\t\t\t\t<Text variant=\"bold\">{title}</Text>\n\t\t\t\t\t\t<Column gap={1} fullWidth>\n\t\t\t\t\t\t\t{(options || []).map((option) => {\n\t\t\t\t\t\t\t\tconst { id: optionId } = option || {};\n\n\t\t\t\t\t\t\t\tconst { formattedTotalPrice: formattedTotalOptionPrice } =\n\t\t\t\t\t\t\t\t\taddonUtils.getOptionPrice({\n\t\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\t\tlanguage,\n\t\t\t\t\t\t\t\t\t\tcurrency,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tconst { title: optionTitle } = addonUtils.getAddonOptionTranslation(\n\t\t\t\t\t\t\t\t\toption,\n\t\t\t\t\t\t\t\t\tlanguage\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst isSingle = selectType === addonModels.MenuAddonSelectType.SINGLE;\n\t\t\t\t\t\t\t\tconst checked = isSingle\n\t\t\t\t\t\t\t\t\t? selectedAddons[addonId] === optionId\n\t\t\t\t\t\t\t\t\t: ((selectedAddons[addonId] || []) as number[]).includes(optionId);\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Row key={optionId} justifyContent=\"space-between\" className={styles.option}>\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\tlabel={optionTitle}\n\t\t\t\t\t\t\t\t\t\t\tname={`option-${addonId}`}\n\t\t\t\t\t\t\t\t\t\t\tonChange={() =>\n\t\t\t\t\t\t\t\t\t\t\t\tonOptionSelect({\n\t\t\t\t\t\t\t\t\t\t\t\t\taddonId,\n\t\t\t\t\t\t\t\t\t\t\t\t\toptionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisSingle,\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRemove: !isSingle && checked,\n\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tchecked={checked}\n\t\t\t\t\t\t\t\t\t\t\ttype={isSingle ? InputType.RADIO : InputType.CHECKBOX}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<div className={styles.optionPrice}>{formattedTotalOptionPrice}</div>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t</Column>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default ProductAddons;\n","import { Button, Column, IconButton, Modal, Row } from \"@sorocraft/ui\";\nimport { Close } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useCallback, useRef, MouseEvent, useMemo } from \"react\";\n\nimport styles from \"./ProductDetails.module.scss\";\n\nimport { getImageSource } from \"src/utils/image\";\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport Image from \"src/components/Image\";\nimport Quantity from \"src/components/Quantity\";\nimport ProductInOrder from \"../ProductInOrder\";\nimport ProductVariants from \"../ProductVariants\";\nimport ProductAddons from \"../ProductAddons\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tlanguage: string;\n\tcurrency: string;\n\tselectedVariant: number | null;\n\tfocusedSection: string | null;\n\tselectedAddons: orderModels.SelectedAddons;\n\tisDecreaseDisabled?: boolean;\n\tquantity: number;\n\tactionTitle: string;\n\tisInPublicMenu?: boolean;\n\tproductQuantityInOrderWithAllVariants: number;\n\tonClose: () => void;\n\tsetSelectedVariant: (selectedVariant: number | null) => void;\n\tonOptionSelect: ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => void;\n\tadjustQuantity: (amount: number) => void;\n\tonSubmit: () => void;\n\tremoveAllProductVariants: (productId: number) => void;\n}\n\nconst ProductDetailsUI = ({\n\tproduct,\n\tlanguage,\n\tcurrency,\n\tselectedVariant,\n\tfocusedSection,\n\tselectedAddons,\n\tisDecreaseDisabled,\n\tquantity,\n\tactionTitle,\n\tisInPublicMenu,\n\tproductQuantityInOrderWithAllVariants,\n\tonClose,\n\tsetSelectedVariant,\n\tonOptionSelect,\n\tadjustQuantity,\n\tonSubmit,\n\tremoveAllProductVariants,\n}: Props) => {\n\tconst modalRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst { name, description } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst { formattedTotalPrice } = useMemo(\n\t\t() => productUtils.getProductPrice(product, currency, language),\n\t\t[product, currency, language]\n\t);\n\n\tconst { formattedTotalPrice: formattedTotalOrderPrice } = useMemo(\n\t\t() =>\n\t\t\tproductUtils.getProductOrderPrice({\n\t\t\t\tproduct,\n\t\t\t\tquantity,\n\t\t\t\tlanguage,\n\t\t\t\tcurrency,\n\t\t\t\tvariantId: selectedVariant,\n\t\t\t\tselectedAddons,\n\t\t\t}),\n\t\t[product, quantity, language, currency, selectedVariant, selectedAddons]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (!modalRef?.current?.contains?.(event?.target as Node)) {\n\t\t\t\tif (onClose) onClose();\n\t\t\t}\n\t\t},\n\t\t[onClose]\n\t);\n\n\tif (isEmpty(product)) return null;\n\n\tconst { image1024, volume, variants, addons, available } = product;\n\tconst hasVariants = variants?.length > 0;\n\tconst hasAddons = addons?.length > 0;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Modal\n\t\t\t\tonClose={onClose}\n\t\t\t\tref={modalRef}\n\t\t\t\tnoBodyPadding\n\t\t\t\tsize=\"small\"\n\t\t\t\tcontent={\n\t\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t{image1024 && (\n\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\tsrc={getImageSource(image1024)}\n\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\talt={name || \"product\"}\n\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<Column className={styles.details} gap={1}>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t\t\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t\t\t\t\t\t\t<div className={styles.volume}>{volume}</div>\n\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t{(hasVariants || hasAddons) && (\n\t\t\t\t\t\t\t\t<Column gap={0} className={styles.choices}>\n\t\t\t\t\t\t\t\t\t{hasVariants && (\n\t\t\t\t\t\t\t\t\t\t<ProductVariants\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedVariant={selectedVariant}\n\t\t\t\t\t\t\t\t\t\t\tfocusedSection={focusedSection}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonSelectVariant={setSelectedVariant}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t\t{hasAddons && (\n\t\t\t\t\t\t\t\t\t\t<ProductAddons\n\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\tonOptionSelect={onOptionSelect}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<div className={styles.close}>\n\t\t\t\t\t\t\t<IconButton onClick={onClose} icon={Close} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t<Column>\n\t\t\t\t\t\t<ProductInOrder\n\t\t\t\t\t\t\tproductId={product?.id}\n\t\t\t\t\t\t\tonModalClose={onClose}\n\t\t\t\t\t\t\tisInPublicMenu={isInPublicMenu}\n\t\t\t\t\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\t\t\t\t\tquantity={productQuantityInOrderWithAllVariants}\n\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Row className={styles.addToOrder} gap={0.5}>\n\t\t\t\t\t\t\t<Quantity\n\t\t\t\t\t\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\t\t\t\t\t\tonDecrease={() => adjustQuantity(-1)}\n\t\t\t\t\t\t\t\tonIncrease={() => adjustQuantity(1)}\n\t\t\t\t\t\t\t\tquantity={quantity}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={styles.addAction}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tavailable ? (\n\t\t\t\t\t\t\t\t\t\t<Row fullWidth justifyContent=\"space-between\" gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t\t<span className={styles.actionTitle}>{actionTitle}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{formattedTotalOrderPrice}</span>\n\t\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tt(\"Not available\")\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={onSubmit}\n\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\tdisabled={!available}\n\t\t\t\t\t\t\t\tpaddingBlock={0.5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</Column>\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default ProductDetailsUI;\n","import { trackEvent } from \"@sorocraft/js-utils\";\nimport { useEffect, useMemo, useState, useCallback } from \"react\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { hooks as orderHooks, models as orderModels } from \"src/modules/order\";\n\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport * as analyticsConstants from \"src/constants/analytics\";\n\nimport ProductDetailsUI from \"./ProductDetailsUI\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tonClose: () => void;\n}\n\n// Product modal\nconst ProductDetails = ({ product, onClose }: Props) => {\n\tconst { language, currency } = useStoreContext();\n\tconst { addProduct, updateProduct, removeAllProductVariants } = useOrderContext();\n\tconst [quantity, setQuantity] = useState<number>(1);\n\tconst [isUpdate, setIsUpdate] = useState<boolean>(false);\n\tconst [selectedVariant, setSelectedVariant] = useState<number | null>(null);\n\tconst [focusedSection, setFocusedSection] = useState<string | null>(null);\n\tconst [selectedAddons, setSelectedAddons] = useState<orderModels.SelectedAddons>({});\n\tconst { t } = useTranslation(\"order\");\n\n\tconst productQuantityInOrder = orderHooks.useProductQuantityInOrder({\n\t\tproductId: product?.id,\n\t\tvariantId: selectedVariant,\n\t\tselectedAddons,\n\t});\n\tconst productQuantityInOrderWithAllVariants = orderHooks.useProductQuantityInOrderWithAllVariants(\n\t\tproduct?.id\n\t);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\n\tconst isDecreaseDisabled = isUpdate ? quantity === 0 : quantity === 1;\n\tconst actionTitle = useMemo(\n\t\t() => (isUpdate ? (quantity === 0 ? t(\"Remove from order\") : t(\"Update order\")) : t(\"Add\")),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[isUpdate, quantity]\n\t);\n\n\tuseEffect(() => {\n\t\tsetQuantity(productQuantityInOrder > 0 ? productQuantityInOrder + 1 : 1);\n\t\tsetIsUpdate(productQuantityInOrder > 0);\n\t}, [productQuantityInOrder, product]);\n\n\tuseEffect(() => {\n\t\tsetSelectedVariant(null);\n\t\tsetSelectedAddons({});\n\t}, [product]);\n\n\tconst handleSetFocusedSection = (section: string) => {\n\t\tsetFocusedSection(section);\n\n\t\tsetTimeout(() => {\n\t\t\tsetFocusedSection(null);\n\t\t}, 200);\n\t};\n\n\tconst handleSubmit = () => {\n\t\tconst hasVariant = product?.variants?.length > 0;\n\n\t\tif (hasVariant && !selectedVariant) return handleSetFocusedSection(\"variant\");\n\n\t\tif (isUpdate) {\n\t\t\tupdateProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t} else {\n\t\t\taddProduct({ product, quantity, variantId: selectedVariant, selectedAddons });\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_ADD_ORDER, { name, quantity });\n\t\t}\n\t\tif (onClose) onClose();\n\t};\n\n\tconst adjustQuantity = useCallback(\n\t\t(amount: number) => {\n\t\t\tif (amount === -1 && isDecreaseDisabled) return;\n\n\t\t\tsetQuantity((current) => Math.max(0, current + amount));\n\t\t},\n\t\t[isDecreaseDisabled]\n\t);\n\n\tconst handleOptionSelect = ({\n\t\taddonId,\n\t\toptionId,\n\t\tisSingle,\n\t\tisRemove = false,\n\t}: {\n\t\taddonId: number;\n\t\toptionId: number;\n\t\tisSingle: boolean;\n\t\tisRemove?: boolean;\n\t}) => {\n\t\tsetSelectedAddons((prevForm) => {\n\t\t\t// For single selection, directly replace the value\n\t\t\tif (isSingle) {\n\t\t\t\treturn { ...prevForm, [addonId]: optionId };\n\t\t\t}\n\n\t\t\t// Handle multiple selection\n\t\t\tconst previousSelection = (prevForm[addonId] || []) as number[];\n\t\t\tconst updatedSelection = isRemove\n\t\t\t\t? previousSelection.filter((id) => id !== optionId) // Remove `optionId`\n\t\t\t\t: [...new Set([...previousSelection, optionId])]; // Add `optionId`\n\n\t\t\treturn {\n\t\t\t\t...prevForm,\n\t\t\t\t[addonId]: updatedSelection,\n\t\t\t};\n\t\t});\n\t};\n\n\treturn (\n\t\t<ProductDetailsUI\n\t\t\tproduct={product}\n\t\t\tlanguage={language}\n\t\t\tcurrency={currency}\n\t\t\tselectedVariant={selectedVariant}\n\t\t\tfocusedSection={focusedSection}\n\t\t\tselectedAddons={selectedAddons}\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tquantity={quantity}\n\t\t\tactionTitle={actionTitle}\n\t\t\tonClose={onClose}\n\t\t\tsetSelectedVariant={setSelectedVariant}\n\t\t\tonOptionSelect={handleOptionSelect}\n\t\t\tadjustQuantity={adjustQuantity}\n\t\t\tonSubmit={handleSubmit}\n\t\t\tremoveAllProductVariants={removeAllProductVariants}\n\t\t\tproductQuantityInOrderWithAllVariants={productQuantityInOrderWithAllVariants}\n\t\t\tisInPublicMenu\n\t\t/>\n\t);\n};\nexport default ProductDetails;\n","import { Flex, Loading, Row } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderStepper.module.scss\";\n\nimport { hooks as orderHooks } from \"src/modules/order\";\n\ninterface Props {\n\tonClick?: () => void;\n\tactionText?: string;\n\tisLoading?: boolean;\n\tisDisabled?: boolean;\n}\n\nconst OrderStepper = ({ actionText, isLoading = false, isDisabled = false, onClick }: Props) => {\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemsTotalPrice();\n\n\treturn (\n\t\t<Flex\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tisLoading,\n\t\t\t\tisClickable: !!onClick,\n\t\t\t\tisDisabled,\n\t\t\t})}\n\t\t\tjustifyContent=\"space-between\"\n\t\t\talignItems=\"center\"\n\t\t\tonClick={isLoading || isDisabled ? null : onClick}\n\t\t>\n\t\t\t<Flex.Item flex={1}>\n\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t<div className={styles.count}>{totalCount}</div>\n\t\t\t\t\t<div className={styles.actionText}>{isLoading ? <Loading /> : actionText}</div>\n\t\t\t\t</Row>\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item className={styles.totalPrice} flex={1}>\n\t\t\t\t{formattedTotalPrice}\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n};\nexport default OrderStepper;\n","import styles from \"./FloatingOrdersButton.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as orderHooks } from \"src/modules/order\";\n\nimport OrderStepper from \"../OrderStepper\";\n\nconst FloatingOrdersButton = () => {\n\tconst { setIsOrderOpen } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst totalCount = orderHooks.useTotalOrderItemsCount();\n\n\tif (totalCount <= 0) return null;\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.content}>\n\t\t\t\t<OrderStepper onClick={() => setIsOrderOpen(true)} actionText={t(\"View order\")} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default FloatingOrdersButton;\n","import { FormErrors } from \"@sorocraft/ui\";\nimport { checkIsValidEmail } from \"@sorocraft/js-utils\";\n\nimport * as viewUtils from \"src/modules/view/utils\";\n\nimport {\n\tCustomerAddress,\n\tCustomerAuthForm,\n\tCustomerAuthPhoneForm,\n\tCustomerAuthStep,\n} from \"./models\";\n\nexport const preparePhoneNumber = (form: CustomerAuthPhoneForm) => {\n\tconst phoneNumber = `${form.countryCode}${form.phoneNumber}`.replaceAll(\"+\", \"\");\n\n\treturn phoneNumber;\n};\n\nexport const validateForm = (form: CustomerAuthForm, step: CustomerAuthStep): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { phoneNumber, email, otp } = form || {};\n\n\tswitch (step) {\n\t\tcase CustomerAuthStep.PHONE: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.OTP: {\n\t\t\tconst { isValid, error } = viewUtils.validatePhoneNumber(phoneNumber);\n\t\t\tif (!isValid) errors.phoneNumber = error;\n\n\t\t\tif (!otp || otp.length !== 6) {\n\t\t\t\terrors.otp = \"Invalid OTP\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase CustomerAuthStep.EMAIL: {\n\t\t\tif (!email || !checkIsValidEmail(email)) {\n\t\t\t\terrors.email = \"Invalid Email Address\";\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn errors;\n};\n\nexport const validateAddressForm = (form: CustomerAddress): FormErrors => {\n\tconst errors: FormErrors = {};\n\tconst { countryCode, cityName, street, houseNumber } = form || {};\n\n\tif (!countryCode) errors.countryCode = \"COUNTRY_REQUIRED\";\n\tif (!cityName) errors.cityName = \"CITY_REQUIRED\";\n\tif (!street) errors.street = \"STREET_REQUIRED\";\n\tif (!houseNumber) errors.houseNumber = \"STREET_NUMBER_REQUIRED\";\n\n\treturn errors;\n};\n\nexport const formatCityLine = (fields: (string | undefined)[]) => {\n\treturn (fields || []).filter(Boolean).join(\", \");\n};\n\nexport const formatAddressLine = (\n\tstreet: string,\n\thouseNumber: string,\n\tadditionalNumber: string\n) => {\n\tconst house = [houseNumber, additionalNumber].filter(Boolean).join(\"/\");\n\tconst fullAddress = [street, house].filter(Boolean).join(\" \");\n\n\treturn fullAddress;\n};\n","import { Edit, Plus } from \"@sorocraft/ui/icons\";\nimport {\n\tButton,\n\tColumn,\n\tUIElementType,\n\tText,\n\tuseModalContext,\n\tAlertBox,\n\tTextBanner,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\nimport { useState } from \"react\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as orderModels,\n\tservices as orderServices,\n\thooks as orderHooks,\n\tconstants as orderConstants,\n} from \"src/modules/order\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderStepper from \"../OrderStepper\";\n\ninterface Props {\n\tisOrderItemsEmpty: boolean;\n\torderError: string | null;\n}\n\nconst OrderDrawerFooter = ({ isOrderItemsEmpty = false, orderError }: Props) => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst {\n\t\torder,\n\t\torderStep,\n\t\torderItems,\n\t\tsetOrderStep,\n\t\tsetIsOrderOpen,\n\t\tsetTrackingId,\n\t\tupdateOrderErrors,\n\t\tresetErrors,\n\t} = useOrderContext();\n\tconst { setModal } = useModalContext();\n\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst availableCustomer = customerHooks.useAvailableCustomer();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst orderPayload = orderHooks.usePrepareOrder();\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst orderNote = order?.note;\n\tconst hasOrderNote = !!orderNote;\n\tconst showOrderNote = isOrderEnabled && orderStep === orderModels.OrderStep.CART;\n\tconst isServing = isOpen || isDelivering;\n\tconst isSubmitDisabled = !!orderError || !isServing;\n\n\tconst closeDrawer = () => setIsOrderOpen(false);\n\tconst handleAddNote = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_NOTES, params: { note: orderNote } });\n\t};\n\n\tconst createOrder = async (): Promise<string> => {\n\t\ttry {\n\t\t\tsetAPIError(\"\");\n\t\t\tsetIsLoading(true);\n\t\t\tconst response = await orderServices.createOrder(orderPayload);\n\t\t\treturn response.trackingId;\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/OrderDrawer/OrderDrawerFooter.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t});\n\n\t\t\treturn \"\";\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\tconst goToNextStep = async () => {\n\t\t// Check if customer is logged in\n\t\tif (isEmpty(availableCustomer)) {\n\t\t\treturn setModal({\n\t\t\t\tid: viewConstants.MODALS.AUTH,\n\t\t\t});\n\t\t}\n\n\t\tresetErrors();\n\n\t\tif (orderStep === orderModels.OrderStep.DETAILS) {\n\t\t\tif (\n\t\t\t\torder.orderType === orderModels.OrderType.DELIVERY &&\n\t\t\t\tisEmpty(availableCustomer?.addresses)\n\t\t\t) {\n\t\t\t\treturn updateOrderErrors(\"customer\");\n\t\t\t}\n\n\t\t\tif (order.orderType === orderModels.OrderType.DINE_IN && !order?.tableId) {\n\t\t\t\treturn updateOrderErrors(\"tableId\");\n\t\t\t}\n\n\t\t\tif (isEmpty(orderItems)) {\n\t\t\t\treturn updateOrderErrors(\"items\");\n\t\t\t}\n\n\t\t\tconst orderTrackingId = await createOrder();\n\n\t\t\tif (!orderTrackingId) return;\n\n\t\t\tsetTrackingId(orderTrackingId);\n\t\t}\n\n\t\tconst currentStepIndex =\n\t\t\torderConstants.ORDER_STEPS.findIndex((step) => step === orderStep) || 0;\n\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= orderConstants.ORDER_STEPS.length) return;\n\n\t\tconst nextStep = orderConstants.ORDER_STEPS[nextStepIndex];\n\t\tsetOrderStep(nextStep);\n\t};\n\n\tconst getActionText = () => {\n\t\tif (!isOrderEnabled) return \"Subtotal\";\n\n\t\tif (!isServing) return \"Closed Now\";\n\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.CART:\n\t\t\t\treturn \"Go to checkout\";\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn \"Place order\";\n\n\t\t\tdefault:\n\t\t\t\treturn \"Continue\";\n\t\t}\n\t};\n\n\tconst orderStepperAction = isOrderEnabled && isServing ? goToNextStep : null;\n\n\treturn (\n\t\t<Column className={styles.footer} fullWidth>\n\t\t\t{!!apiError && (\n\t\t\t\t<AlertBox message={tError(apiError)} type=\"error\" onClear={() => setAPIError(\"\")} />\n\t\t\t)}\n\t\t\t{!!orderError && <TextBanner text={orderError} type={UIElementType.DANGER} fullWidth />}\n\t\t\t{showOrderNote && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\thasOrderNote ? (\n\t\t\t\t\t\t\t<Text>{order.note}</Text>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t<Text>{t(\"Add an order note\")}</Text>\n\t\t\t\t\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t\t\t\t\t{t(\"Special instructions, allergies, etc.\")}\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\tonClick={handleAddNote}\n\t\t\t\t\tsize=\"xxxl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttype={UIElementType.LIGHT}\n\t\t\t\t\tclassName={styles.noteButton}\n\t\t\t\t\ticon={hasOrderNote ? Edit : Plus}\n\t\t\t\t\ticonSize=\"md\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={t(\"Add items\")}\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t/>\n\t\t\t) : orderStep !== orderModels.OrderStep.COMPLETED ? (\n\t\t\t\t<OrderStepper\n\t\t\t\t\tactionText={t(getActionText())}\n\t\t\t\t\tonClick={orderStepperAction}\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\tisDisabled={isSubmitDisabled}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerFooter;\n","import { API } from \"src/services/api\";\n\nimport { OrderPayload } from \"./models\";\n\nexport const createOrder = async (\n\torder: OrderPayload\n): Promise<{\n\ttrackingId: string;\n}> => {\n\treturn API.post(\"customer/order\", order);\n};\n","import { models as productModels } from \"src/modules/product\";\nimport { useStoreContext } from \"src/store\";\n\nexport const useProductById = (productId: number): productModels.Product => {\n\tconst { products } = useStoreContext();\n\tconst product = products?.find?.(({ id }) => id === productId);\n\n\treturn (product || {}) as productModels.Product;\n};\n","import { SIZE } from \"@sorocraft/ui\";\n\nimport styles from \"./ProductQuantity.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useProductById } from \"src/hooks/product\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { hooks as productHooks } from \"src/modules/product\";\n\nimport Quantity from \"src/components/Quantity\";\n\ninterface Props {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons?: orderModels.SelectedAddons;\n\tmin?: number;\n\tsize?: SIZE;\n\tisDisabled: boolean;\n}\n\nconst ProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tmin = 1,\n\tsize = \"md\",\n\tselectedAddons,\n\tisDisabled = false,\n}: Props) => {\n\tconst quantity = productHooks.useProductQuantity({ productId, variantId, selectedAddons });\n\tconst product = useProductById(productId);\n\tconst { updateProduct } = useOrderContext();\n\n\tconst isDecreaseDisabled = quantity === min;\n\n\tif (isDisabled) {\n\t\treturn <div className={styles.quantity}>{quantity}</div>;\n\t}\n\n\treturn (\n\t\t<Quantity\n\t\t\tisDecreaseDisabled={isDecreaseDisabled}\n\t\t\tonDecrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity - 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tonIncrease={() =>\n\t\t\t\tupdateProduct({ product, quantity: quantity + 1, variantId, selectedAddons })\n\t\t\t}\n\t\t\tquantity={quantity}\n\t\t\tsize={size}\n\t\t/>\n\t);\n};\nexport default ProductQuantity;\n","import { useOrderContext } from \"src/store/order\";\nimport * as orderUtils from \"src/modules/order/utils\";\nimport * as orderModels from \"src/modules/order/models\";\n\nexport const useProductQuantity = ({\n\tproductId,\n\tvariantId,\n\tselectedAddons,\n}: {\n\tproductId: number;\n\tvariantId?: number;\n\tselectedAddons: orderModels.SelectedAddons;\n}): number => {\n\tconst { orderItems } = useOrderContext();\n\tconst orderItemsId = orderUtils.generateOrderItemsId(productId, variantId, selectedAddons);\n\tconst item = orderItems[orderItemsId];\n\n\treturn item?.quantity || 1;\n};\n","import { ReactNode } from \"react\";\nimport { Text } from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { models as productModels, utils as productUtils } from \"src/modules/product\";\nimport { utils as addonUtils } from \"src/modules/addon\";\nimport { models as orderModels } from \"src/modules/order\";\n\ntype Props = {\n\titem: orderModels.OrderItem;\n\tproduct: productModels.Product;\n\tlanguage: string;\n};\n\nconst OrderItemOptionsInfo = ({ item, product, language }: Props): ReactNode => {\n\treturn (\n\t\t<>\n\t\t\t{(item.addons || []).map(({ addonId, options }) => {\n\t\t\t\tconst addon = productUtils.getProductAddon(product, addonId);\n\t\t\t\tconst addonOptions = addon?.options || [];\n\t\t\t\tconst selectedOptions = addonOptions.filter((option) =>\n\t\t\t\t\toptions?.some(({ optionId }) => optionId === option.id)\n\t\t\t\t);\n\n\t\t\t\tif (isEmpty(addon) || isEmpty(selectedOptions)) return null;\n\n\t\t\t\tconst addonTitle = addonUtils.getAddonTranslation(addon, language)?.title;\n\t\t\t\tconst optionTitles = selectedOptions\n\t\t\t\t\t.map((option) => addonUtils.getAddonOptionTranslation(option, language)?.title)\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\", \");\n\n\t\t\t\tif (!addonTitle || !optionTitles) return null;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Text color=\"muted\" size=\"xs\" key={addonId}>\n\t\t\t\t\t\t{addonTitle}: {optionTitles}\n\t\t\t\t\t</Text>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default OrderItemOptionsInfo;\n","import { Column, Row, Text } from \"@sorocraft/ui\";\nimport { useMemo } from \"react\";\n\nimport styles from \"./OrderListItem.module.scss\";\n\nimport { useProductById } from \"src/hooks/product\";\nimport { models as orderModels, utils as orderUtils, hooks as orderHooks } from \"src/modules/order\";\nimport { useStoreContext } from \"src/store\";\nimport { utils as productUtils } from \"src/modules/product\";\nimport { getImageSource } from \"src/utils/image\";\n\nimport Image from \"src/components/Image\";\nimport ProductQuantity from \"../ProductQuantity\";\nimport OrderItemOptionsInfo from \"./OptionsInfo\";\n\ninterface Props {\n\titem: orderModels.OrderItem;\n\tisDisabled: boolean;\n}\n\nconst OrderListItem = ({ item, isDisabled = false }: Props) => {\n\tconst { productId } = item || {};\n\tconst variantId = item?.variant?.variantId;\n\tconst selectedAddons = orderUtils.getSelectedAddonsFromOrderItems(item);\n\tconst product = useProductById(productId);\n\tconst variant = productUtils.getProductVariant(product, variantId);\n\tconst { language } = useStoreContext();\n\tconst { image160 } = product;\n\tconst { title: variantTitle } = productUtils.getProductVariantTranslation(variant, language);\n\tconst { name } = useMemo(\n\t\t() => productUtils.getProductTranslation(product, language),\n\t\t[product, language]\n\t);\n\tconst { formattedTotalPrice } = orderHooks.useOrderItemPrice(item);\n\n\treturn (\n\t\t<Row className={styles.container} gap={1} alignItems=\"flex-start\">\n\t\t\t{image160 && (\n\t\t\t\t<Image\n\t\t\t\t\tsrc={getImageSource(image160)}\n\t\t\t\t\talt={name || \"menu\"}\n\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\twidth={80}\n\t\t\t\t\theight={45}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className={styles.data}>\n\t\t\t\t<div className={styles.name}>{name}</div>\n\t\t\t\t<Column gap={0}>\n\t\t\t\t\t{!!variantTitle && (\n\t\t\t\t\t\t<Text color=\"muted\" size=\"xs\">\n\t\t\t\t\t\t\t{variantTitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<OrderItemOptionsInfo item={item} product={product} language={language} />\n\t\t\t\t</Column>\n\t\t\t\t<div className={styles.price}>{formattedTotalPrice}</div>\n\t\t\t</div>\n\t\t\t<ProductQuantity\n\t\t\t\tproductId={productId}\n\t\t\t\tvariantId={variantId}\n\t\t\t\tselectedAddons={selectedAddons}\n\t\t\t\tsize=\"sm\"\n\t\t\t\tmin={0}\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t/>\n\t\t</Row>\n\t);\n};\nexport default OrderListItem;\n","import { Column, Text, Description } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst OrderNoItems = () => {\n\tconst { t } = useTranslation(\"order\");\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.noItems}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\tgap={0}\n\t\t>\n\t\t\t<Text variant=\"h2\">{t(\"Empty order\")}</Text>\n\t\t\t<Description text={t(\"You don't have any items in your order\")} />\n\t\t</Column>\n\t);\n};\nexport default OrderNoItems;\n","import { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderItemsList.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\n\nimport OrderListItem from \"../OrderListItem\";\nimport OrderNoItems from \"./OrderNoItems\";\n\ninterface Props {\n\tisDisabled?: boolean;\n}\n\nconst OrderItemsList = ({ isDisabled = false }: Props) => {\n\tconst { orderItems } = useOrderContext();\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t{isOrderItemsEmpty ? (\n\t\t\t\t<OrderNoItems />\n\t\t\t) : (\n\t\t\t\t<div className={styles.items}>\n\t\t\t\t\t{Object.entries(orderItems || {}).map(([itemId, item]) => (\n\t\t\t\t\t\t<OrderListItem key={itemId} item={item} isDisabled={isDisabled} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default OrderItemsList;\n","import styles from \"./OrderDrawer.module.scss\";\n\nimport OrderItemsList from \"../OrderItemsList\";\n\nconst OrderDrawerCart = () => (\n\t<div className={styles.content}>\n\t\t<OrderItemsList />\n\t</div>\n);\nexport default OrderDrawerCart;\n","import { Text, UIElementType } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nconst NoAddressContent = () => {\n\tconst { t } = useTranslation(\"customer\");\n\n\treturn <Text color={UIElementType.DANGER}>{t(\"No address available\")}</Text>;\n};\nexport default NoAddressContent;\n","import { Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { hooks as customerHooks, utils as customerUtils } from \"src/modules/customer\";\n\nconst AddressContent = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { t } = useTranslation(\"customer\");\n\tconst { additionalNumber, street, houseNumber, cityName, countryCode } = address;\n\tconst firstLine = customerUtils.formatAddressLine(street, houseNumber, additionalNumber);\n\tconst secondLine = customerUtils.formatCityLine([cityName, countryCode]);\n\n\treturn (\n\t\t<>\n\t\t\t<Text>{firstLine || t(\"Unknown address\")}</Text>\n\t\t\t{secondLine && (\n\t\t\t\t<Text size=\"sm\" color=\"muted\">\n\t\t\t\t\t{secondLine}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</>\n\t);\n};\nexport default AddressContent;\n","import { Column, Row, SVGIcon, useModalContext } from \"@sorocraft/ui\";\nimport { Edit, MarkerPin } from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./CustomerAddress.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { hooks as customerHooks } from \"src/modules/customer\";\n\nimport NoAddressContent from \"./NoAddressContent\";\nimport AddressContent from \"./AddressContent\";\n\nconst CustomerAddress = () => {\n\tconst address = customerHooks.useCustomerAddress();\n\tconst { setModal } = useModalContext();\n\n\tconst updateAddress = () => {\n\t\tsetModal({ id: viewConstants.MODALS.ADD_UPDATE_ADDRESS });\n\t};\n\n\treturn (\n\t\t<div className={styles.container} onClick={updateAddress}>\n\t\t\t<Row fullWidth alignItems=\"center\">\n\t\t\t\t<SVGIcon icon={MarkerPin} size=\"md\" />\n\t\t\t\t<Column gap={0} fullWidth>\n\t\t\t\t\t{isEmpty(address) ? <NoAddressContent /> : <AddressContent />}\n\t\t\t\t</Column>\n\t\t\t\t<SVGIcon icon={Edit} size=\"sm\" />\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nexport default CustomerAddress;\n","import {\n\tColumn,\n\tRow,\n\tText,\n\tInput,\n\tInputType,\n\tSelectOption,\n\tUIElementType,\n\tonChangeEventType,\n} from \"@sorocraft/ui\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderTable.module.scss\";\n\nimport { models as tableModels } from \"src/modules/table\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useCallback } from \"react\";\n\ninterface Props {\n\tpreDefinedTable: tableModels.Table;\n\ttableOptions: SelectOption[];\n\tselectedTableId: number;\n\terror?: string;\n\tdisableIfPreDefined?: boolean;\n\tlanguage?: string;\n\tonChange: (tableId: number | null) => void;\n}\n\nconst OrderTableUI = ({\n\tpreDefinedTable,\n\ttableOptions,\n\tselectedTableId,\n\terror,\n\tdisableIfPreDefined,\n\tlanguage,\n\tonChange,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst hasPreDefinedTable = !isEmpty(preDefinedTable);\n\n\tconst handleTableChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tonChange(Number(e?.target?.value) || null);\n\t\t},\n\t\t[onChange]\n\t);\n\n\treturn (\n\t\t<Column className={styles.table} fullWidth gap={0.5}>\n\t\t\t<Row fullWidth>\n\t\t\t\t{hasPreDefinedTable && disableIfPreDefined ? (\n\t\t\t\t\t<Text variant=\"bold\">{preDefinedTable.name}</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tname=\"tableId\"\n\t\t\t\t\t\toptions={tableOptions}\n\t\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\t\tclassName={styles.tableInput}\n\t\t\t\t\t\tvalue={selectedTableId}\n\t\t\t\t\t\tonChange={handleTableChange}\n\t\t\t\t\t\tisDisabled={hasPreDefinedTable}\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tplaceholder={t(\"Select Table\")}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Row>\n\t\t\t{error && <Text color={UIElementType.DANGER}>{t(error)}</Text>}\n\t\t</Column>\n\t);\n};\nexport default OrderTableUI;\n","import { SelectOption } from \"@sorocraft/ui\";\n\nimport { hooks as tableHooks } from \"src/modules/table\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useStoreContext } from \"src/store\";\n\nimport OrderTableUI from \"./OrderTableUI\";\n\nconst OrderTable = () => {\n\tconst preDefinedTable = tableHooks.usePreDefinedTable();\n\tconst tables = tableHooks.useList();\n\tconst { order, updateOrder, errors } = useOrderContext();\n\tconst { language } = useStoreContext();\n\n\tconst tableOptions: SelectOption[] = tables.map(({ id, name }) => ({\n\t\tlabel: name,\n\t\tvalue: id,\n\t}));\n\n\treturn (\n\t\t<OrderTableUI\n\t\t\tonChange={(tableId) => updateOrder({ tableId })}\n\t\t\tpreDefinedTable={preDefinedTable}\n\t\t\ttableOptions={tableOptions}\n\t\t\tselectedTableId={order?.tableId}\n\t\t\terror={errors?.tableId}\n\t\t\tlanguage={language}\n\t\t\tdisableIfPreDefined\n\t\t/>\n\t);\n};\nexport default OrderTable;\n","import { useStoreContext } from \"src/store\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport { Table } from \"./models\";\n\nexport const useList = (): Table[] => {\n\tconst { tables } = useStoreContext();\n\n\treturn tables;\n};\n\nexport const usePreDefinedTable = (): Table => {\n\tconst { tableId, tables } = useStoreContext();\n\n\tif (!tableId || isEmpty(tables)) return {} as Table;\n\n\treturn tables.find((table) => Number(table.id) === Number(tableId)) || ({} as Table);\n};\n\nexport const usePreDefinedTableId = (): string => {\n\tconst { tableId } = useStoreContext();\n\n\treturn tableId;\n};\n","import { Method, Row, SVGIcon, Tooltip, Text, MethodSelection, SIZE_LONG } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderMethods.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels } from \"src/modules/order\";\n\nimport { OrderTypeForMethods } from \"./OrderMethods.types\";\n\ninterface Props {\n\torderTypes: OrderTypeForMethods[];\n\torderType: orderModels.OrderType;\n\tsize?: SIZE_LONG;\n\tonSelect: (method: string | number) => void;\n}\n\nconst OrderMethods = ({ orderTypes, orderType, size, onSelect }: Props) => {\n\tconst { t } = useTranslation(\"error\");\n\n\tconst getOrderMethodTooltipPosition = (index: number) => {\n\t\tif (index === 0) return \"right\";\n\t\tif (index + 1 === orderTypes.length) return \"left\";\n\n\t\treturn \"bottom\";\n\t};\n\n\tconst orderMethods: Method[] = orderTypes.map(\n\t\t({ type, icon, title, isDisabled }, index: number) => ({\n\t\t\tvalue: type,\n\t\t\tisDisabled,\n\t\t\tlabel: (\n\t\t\t\t<Tooltip\n\t\t\t\t\thint={isDisabled ? t(\"ORDER_TYPE_DISABLED_FOR_BUSINESS\") : null}\n\t\t\t\t\tposition={getOrderMethodTooltipPosition(index)}\n\t\t\t\t>\n\t\t\t\t\t<Row gap={0.5} flexWrap=\"nowrap\">\n\t\t\t\t\t\t<SVGIcon icon={icon} />\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tcolor={type === orderType && !isDisabled ? \"white\" : \"normal\"}\n\t\t\t\t\t\t\twhiteSpace=\"nowrap\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t</Tooltip>\n\t\t\t),\n\t\t})\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<MethodSelection\n\t\t\t\tmethods={orderMethods}\n\t\t\t\tonSelect={onSelect}\n\t\t\t\tselectedMethod={orderType}\n\t\t\t\tfullWidth\n\t\t\t\tsize={size}\n\t\t\t\tgap={0.5}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderMethods;\n","import { Column, Row, SIZE, Text } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./OrderPaymentSummary.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\ttextSize: SIZE;\n\ttotalPriceWithoutTax: number;\n\ttotalPriceWithTax: number;\n\ttotalTax: number;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst OrderPaymentSummary = ({\n\ttextSize,\n\ttotalPriceWithoutTax,\n\ttotalPriceWithTax,\n\ttotalTax,\n\tcurrency,\n\tlanguage,\n}: Props) => {\n\tconst { t } = useTranslation(\"order\", { language });\n\n\tconst totalPriceWithoutTaxFormatted = priceFormatter(totalPriceWithoutTax, currency, language);\n\tconst totalPriceWithTaxFormatted = priceFormatter(totalPriceWithTax, currency, language);\n\tconst totalTaxFormatted = priceFormatter(totalTax, currency, language);\n\n\treturn (\n\t\t<Column className={styles.container} fullWidth gap={0}>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Items\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalPriceWithoutTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize}>{t(\"Tax\")}</Text>\n\t\t\t\t<Text size={textSize}>{totalTaxFormatted}</Text>\n\t\t\t</Row>\n\t\t\t<Row justifyContent=\"space-between\" className={styles.row}>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{t(\"Total\")}\n\t\t\t\t</Text>\n\t\t\t\t<Text size={textSize} color=\"bold\">\n\t\t\t\t\t{totalPriceWithTaxFormatted}\n\t\t\t\t</Text>\n\t\t\t</Row>\n\t\t</Column>\n\t);\n};\nexport default OrderPaymentSummary;\n","import { Accordion, Column, Input, InputType, Method, Padding, Row } from \"@sorocraft/ui\";\nimport { Delivery, Grid, ShoppingBag } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport CustomerAddress from \"../Customer/CustomerAddress\";\nimport OrderItemsList from \"../OrderItemsList\";\nimport OrderTable from \"./OrderTable\";\nimport OrderMethods from \"../OrderMethods\";\nimport { OrderTypeForMethods } from \"../OrderMethods/OrderMethods.types\";\nimport OrderPaymentSummary from \"../OrderPaymentSummary\";\n\nconst OrderDrawerDetails = () => {\n\tconst { language, currency } = useStoreContext();\n\tconst {\n\t\torder: { orderType, paymentMethod },\n\t\tupdateOrder,\n\t} = useOrderContext();\n\tconst { totalPriceWithTax, totalPriceWithoutTax, totalTax } = orderHooks.usePrepareOrder();\n\tconst { isOpen, isDelivering } = branchHooks.useBranchServes();\n\tconst { deliveryOrderEnabled, dineInOrderEnabled, pickupOrderEnabled } =\n\t\tbranchHooks.useBranchSettings();\n\tconst { t } = useTranslation(\"order\");\n\n\tconst orderTypes: OrderTypeForMethods[] = [\n\t\t{\n\t\t\ttype: orderModels.OrderType.DELIVERY,\n\t\t\ticon: Delivery,\n\t\t\ttitle: t(\"Delivery\"),\n\t\t\tisDisabled: !deliveryOrderEnabled || !isDelivering,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.DINE_IN,\n\t\t\ticon: Grid,\n\t\t\ttitle: t(\"Dine in\"),\n\t\t\tisDisabled: !dineInOrderEnabled || !isOpen,\n\t\t},\n\t\t{\n\t\t\ttype: orderModels.OrderType.PICK_UP,\n\t\t\ticon: ShoppingBag,\n\t\t\ttitle: t(\"Pickup\"),\n\t\t\tisDisabled: !pickupOrderEnabled || !isOpen,\n\t\t},\n\t];\n\n\tconst paymentMethods: Method[] = [\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CASH,\n\t\t\tlabel: t(\"Cash\"),\n\t\t},\n\t\t{\n\t\t\tvalue: orderModels.PaymentMethod.CARD,\n\t\t\tlabel: t(\"Card\"),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Column className={styles.content} gap={1}>\n\t\t\t<OrderMethods\n\t\t\t\torderTypes={orderTypes}\n\t\t\t\torderType={orderType}\n\t\t\t\tsize=\"small\"\n\t\t\t\tonSelect={(method) => updateOrder({ orderType: method as orderModels.OrderType })}\n\t\t\t/>\n\t\t\t{orderType === orderModels.OrderType.DELIVERY && <CustomerAddress />}\n\t\t\t{orderType === orderModels.OrderType.DINE_IN && (\n\t\t\t\t<Padding paddingInline={1} fullWidth>\n\t\t\t\t\t<OrderTable />\n\t\t\t\t</Padding>\n\t\t\t)}\n\t\t\t<Row className={styles.paymentMethods}>\n\t\t\t\t{paymentMethods.map(({ label, value }) => (\n\t\t\t\t\t<Input\n\t\t\t\t\t\tlabel={label as string}\n\t\t\t\t\t\tname=\"paymentMethod\"\n\t\t\t\t\t\tonChange={() => updateOrder({ paymentMethod: value as orderModels.PaymentMethod })}\n\t\t\t\t\t\tchecked={paymentMethod === value}\n\t\t\t\t\t\ttype={InputType.RADIO}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\tkey={value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Row>\n\t\t\t<Accordion\n\t\t\t\ttitle={t(\"Order summary\")}\n\t\t\t\tcontent={<OrderItemsList isDisabled />}\n\t\t\t\tfullWidth\n\t\t\t\tstyle=\"no-shadow\"\n\t\t\t\tnoPadding\n\t\t\t\theaderPaddingInline={1}\n\t\t\t\theaderPaddingBlock={1}\n\t\t\t\ttitleTagName=\"h5\"\n\t\t\t/>\n\t\t\t<OrderPaymentSummary\n\t\t\t\ttextSize=\"sm\"\n\t\t\t\ttotalPriceWithoutTax={totalPriceWithoutTax}\n\t\t\t\ttotalPriceWithTax={totalPriceWithTax}\n\t\t\t\ttotalTax={totalTax}\n\t\t\t\tlanguage={language}\n\t\t\t\tcurrency={currency}\n\t\t\t/>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerDetails;\n","import { Column, Link, Padding, SVGIcon, Text, UIElementType } from \"@sorocraft/ui\";\nimport { Check } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\nimport { useStoreContext } from \"src/store\";\n\nconst OrderDrawerCompleted = () => {\n\tconst { t } = useTranslation(\"order\");\n\tconst { trackingId } = useOrderContext();\n\tconst { hostname, language } = useStoreContext();\n\n\treturn (\n\t\t<Column\n\t\t\tclassName={styles.content}\n\t\t\tfullWidth\n\t\t\tfullHeight\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t>\n\t\t\t<SVGIcon icon={Check} size=\"xxl\" color={UIElementType.SUCCESS} />\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text variant=\"h1\" align=\"center\">\n\t\t\t\t\t{t(\"Your Order is Completed!\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={2}>\n\t\t\t\t<Text align=\"center\">\n\t\t\t\t\t{t(\"Thank you! We've received your order and it will be delivered shortly.\")}\n\t\t\t\t</Text>\n\t\t\t</Padding>\n\t\t\t<Padding paddingInline={5} paddingBlock={2} fullWidth>\n\t\t\t\t<Link\n\t\t\t\t\thref={`https://${hostname}/${language}/order/${trackingId}`}\n\t\t\t\t\ttitle={t(\"Track order\")}\n\t\t\t\t\ttype={UIElementType.PRIMARY}\n\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t/>\n\t\t\t</Padding>\n\t\t</Column>\n\t);\n};\nexport default OrderDrawerCompleted;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { useRef, MouseEvent } from \"react\";\nimport { Drawer } from \"@sorocraft/ui\";\n\nimport styles from \"./OrderDrawer.module.scss\";\n\nimport { useOrderContext } from \"src/store/order\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { models as orderModels, hooks as orderHooks } from \"src/modules/order\";\nimport { hooks as branchHooks } from \"src/modules/branch\";\n\nimport OrderDrawerFooter from \"./OrderDrawerFooter\";\nimport OrderDrawerCart from \"./OrderDrawerCart\";\nimport OrderDrawerDetails from \"./OrderDrawerDetails\";\nimport OrderDrawerCompleted from \"./OrderDrawerCompleted\";\n\nconst OrderDrawer = () => {\n\tconst { isOrderOpen, orderItems } = useOrderContext();\n\tconst { orderStep, setOrderStep, resetOrder } = useOrderContext();\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst { t } = useTranslation(\"order\");\n\tconst orderErrorInDetails = orderHooks.useOrderErrorInDetails();\n\tconst isOrderEnabled = branchHooks.useOrderEnabled();\n\tconst hasOrderErrorInDetails = !!orderErrorInDetails;\n\tconst hasLargeFooter =\n\t\tisOrderEnabled && (orderStep === orderModels.OrderStep.CART || hasOrderErrorInDetails);\n\n\tconst isOrderItemsEmpty = isEmpty(orderItems);\n\n\tconst closeDrawer = () => {\n\t\tresetOrder();\n\t};\n\n\tconst handleClickOutside = (event: MouseEvent<HTMLElement>) => {\n\t\tif (!contentRef?.current?.contains?.(event?.target as Node)) {\n\t\t\tcloseDrawer();\n\t\t}\n\t};\n\n\tconst handleBack = () => {\n\t\tsetOrderStep(orderModels.OrderStep.CART);\n\t};\n\n\tconst renderContent = () => {\n\t\tswitch (orderStep) {\n\t\t\tcase orderModels.OrderStep.DETAILS:\n\t\t\t\treturn <OrderDrawerDetails />;\n\n\t\t\tcase orderModels.OrderStep.COMPLETED:\n\t\t\t\treturn <OrderDrawerCompleted />;\n\n\t\t\tdefault:\n\t\t\t\treturn <OrderDrawerCart />;\n\t\t}\n\t};\n\n\tif (!isOrderOpen) return null;\n\n\treturn (\n\t\t<div className={styles.container} onClick={handleClickOutside}>\n\t\t\t<Drawer\n\t\t\t\tref={contentRef}\n\t\t\t\tonClose={closeDrawer}\n\t\t\t\tisOpen={isOrderOpen}\n\t\t\t\ttitle={t(\"Your order\")}\n\t\t\t\tonBack={orderStep === orderModels.OrderStep.CART ? undefined : handleBack}\n\t\t\t\tcontent={renderContent()}\n\t\t\t\tfooter={\n\t\t\t\t\t<OrderDrawerFooter\n\t\t\t\t\t\tisOrderItemsEmpty={isOrderItemsEmpty}\n\t\t\t\t\t\torderError={orderErrorInDetails}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thasLargeFooter={hasLargeFooter}\n\t\t\t/>\n\t\t</div>\n\t);\n};\nexport default OrderDrawer;\n","import { RefObject, useEffect, memo, useState } from \"react\";\nimport { Column, DivElementMap, IconButton, Row, UIElementType } from \"@sorocraft/ui\";\nimport { trackEvent } from \"@sorocraft/js-utils\";\nimport { Grid, List } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Products.module.scss\";\n\nimport * as categoryUtils from \"src/utils/category\";\nimport { utils as productUtils } from \"src/modules/product\";\nimport * as menuModels from \"src/models/menu\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { Product, ProductView } from \"src/models\";\n\nimport ProductsListItem from \"../ProductsListItem\";\nimport { ProductsGridItemContainer } from \"../ProductsGridItem\";\nimport ProductDetails from \"../ProductDetails\";\nimport FloatingOrdersButton from \"../FloatingOrdersButton\";\nimport OrderDrawer from \"../OrderDrawer\";\n\ninterface Props {\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcontainerRef: RefObject<HTMLDivElement>;\n\tcurrency: string;\n\tlanguage: string;\n\tcategoryProductMap: menuModels.CategoryProductMap[];\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({\n\t\tcategoryProductMap = [],\n\t\tcurrency,\n\t\tlanguage,\n\t\tproductBlocksRef,\n\t\tcontainerRef,\n\t\tonCategoryInView,\n\t}: Props) => {\n\t\tconst [selectedProduct, setSelectedProduct] = useState<Product | null>(null);\n\t\tconst [view, setView] = useState<ProductView>(ProductView.LIST);\n\n\t\tconst views = [\n\t\t\t{\n\t\t\t\ticon: List,\n\t\t\t\ttype: ProductView.LIST,\n\t\t\t},\n\t\t\t{\n\t\t\t\ticon: Grid,\n\t\t\t\ttype: ProductView.GRID,\n\t\t\t},\n\t\t];\n\n\t\tconst handleSelectView = (type: ProductView) => {\n\t\t\tsetView(type);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_VIEW_CHANGED, { name: type });\n\t\t};\n\n\t\tconst handleSelectProduct = (product: Product) => {\n\t\t\tconst { name } = productUtils.getProductTranslation(product, language);\n\t\t\ttrackEvent(analyticsConstants.PRODUCT_DETAILS, { name });\n\n\t\t\tsetSelectedProduct(product);\n\t\t};\n\n\t\tuseEffect(() => {\n\t\t\t// Create an IntersectionObserver instance\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\t// Calculate the center of the viewport\n\t\t\t\t\tconst viewportCenter = (containerRef?.current?.clientHeight || 1000) / 2;\n\n\t\t\t\t\tlet closestCategoryId: string | null = null;\n\t\t\t\t\tlet closestDistance = Infinity;\n\n\t\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\t\tconst rect = entry.boundingClientRect;\n\t\t\t\t\t\t\tconst elementCenter = rect.top + rect.height / 2;\n\t\t\t\t\t\t\tconst distanceToCenter = Math.abs(elementCenter - viewportCenter);\n\n\t\t\t\t\t\t\t// Check if this element is closer to the center\n\t\t\t\t\t\t\tif (distanceToCenter < closestDistance) {\n\t\t\t\t\t\t\t\tclosestDistance = distanceToCenter;\n\t\t\t\t\t\t\t\tclosestCategoryId = entry.target.getAttribute(\"data-category-id\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// Update the active category if it has changed\n\t\t\t\t\tif (closestCategoryId) {\n\t\t\t\t\t\tonCategoryInView(Number(closestCategoryId));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthreshold: 0.1, // Adjust as needed (10% visibility)\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Observe each product block\n\t\t\tObject.entries(productBlocksRef.current || {}).forEach(([categoryId, element]) => {\n\t\t\t\tif (element) {\n\t\t\t\t\telement.setAttribute(\"data-category-id\", categoryId); // Add a data attribute\n\t\t\t\t\tobserver.observe(element);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\t// Cleanup the observer\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, containerRef, onCategoryInView]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Row className={styles.view} alignItems=\"center\">\n\t\t\t\t\t{views.map(({ icon, type }) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\ticon={icon}\n\t\t\t\t\t\t\tonClick={() => handleSelectView(type)}\n\t\t\t\t\t\t\ttype={type === view ? UIElementType.PRIMARY : UIElementType.DEFAULT}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</Row>\n\t\t\t\t<Column>\n\t\t\t\t\t{(categoryProductMap || []).map((category) => {\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\t\t\t\t\t\tconst { id, products } = category;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={id}\n\t\t\t\t\t\t\t\tref={(el) => {\n\t\t\t\t\t\t\t\t\tif (el) {\n\t\t\t\t\t\t\t\t\t\tproductBlocksRef!.current![id] = el;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tdata-category-id={id}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={0}>\n\t\t\t\t\t\t\t\t\t\t{(products || []).map((product) => {\n\t\t\t\t\t\t\t\t\t\t\tif (view === ProductView.GRID) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ProductsGridItemContainer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSelectProduct(product)}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t\t<ProductDetails product={selectedProduct} onClose={() => setSelectedProduct(null)} />\n\t\t\t\t<FloatingOrdersButton />\n\t\t\t\t<OrderDrawer />\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.categoryProductMap === nextProps.categoryProductMap &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nProducts.displayName = \"Products\";\n\nexport default Products;\n","import { ReactNode } from \"react\";\nimport { Column, Container, Row, SVGIcon, UIElementType } from \"@sorocraft/ui\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { MarkerPin } from \"@sorocraft/ui/icons\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport { models as branchModels, utils as branchUtils } from \"src/modules/branch\";\nimport { getCoverPhotoSource } from \"src/utils/image\";\n\nimport Image from \"src/components/Image\";\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst { business } = useStoreContext();\n\tconst Parent = ({ children, id }: { children: ReactNode; id: number }) => {\n\t\tif (onBranchSelect) {\n\t\t\treturn (\n\t\t\t\t<div className={styles.item} onClick={() => onBranchSelect(id)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tconst clearRootPath = branchUtils.normalizeRootPath(rootPath);\n\n\t\treturn (\n\t\t\t<a href={`${clearRootPath}/${id}`} className={styles.item}>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map((branch) => {\n\t\t\t\t\tconst { id, address, coverPhoto } = branch;\n\t\t\t\t\tconst venueName = branchUtils.getVenueName(business?.name, false, branch);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\t\t\tcontent: true,\n\t\t\t\t\t\t\t\t\tnoImage: !coverPhoto,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{coverPhoto && (\n\t\t\t\t\t\t\t\t\t<div className={styles.imageContainer}>\n\t\t\t\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\t\t\t\tsrc={getCoverPhotoSource(coverPhoto)}\n\t\t\t\t\t\t\t\t\t\t\talt={venueName}\n\t\t\t\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\t\t\t\twidth={1024}\n\t\t\t\t\t\t\t\t\t\t\theight={400}\n\t\t\t\t\t\t\t\t\t\t\tpriority\n\t\t\t\t\t\t\t\t\t\t\tsizes=\"100vw\"\n\t\t\t\t\t\t\t\t\t\t\tfetchPriority=\"high\"\n\t\t\t\t\t\t\t\t\t\t\tloading=\"eager\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<Column\n\t\t\t\t\t\t\t\t\tjustifyContent=\"flex-end\"\n\t\t\t\t\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\t\t\t\t\tfullHeight\n\t\t\t\t\t\t\t\t\tclassName={styles.info}\n\t\t\t\t\t\t\t\t\tgap={0.5}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<h2 className={styles.name}>{venueName}</h2>\n\t\t\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5} justifyContent=\"center\" fullWidth>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} color={UIElementType.DEFAULT} />\n\t\t\t\t\t\t\t\t\t\t<span className={styles.address}>{address}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Parent>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { useEffect, useState, useCallback } from \"react\";\nimport { SIZE, IconButton } from \"@sorocraft/ui\";\nimport { ChevronUp } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ScrollToTop.module.scss\";\n\ninterface Props {\n\tsize: SIZE;\n\tzIndex?: number;\n}\n\nconst ScrollToTop = ({ size, zIndex = 100 }: Props) => {\n\tconst [showGoTop, setShowGoTop] = useState(false);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst shouldShow = window.scrollY > 100;\n\n\t\t// Only update state if it actually changes\n\t\tif (shouldShow !== showGoTop) {\n\t\t\tsetShowGoTop(shouldShow);\n\t\t}\n\t}, [showGoTop]);\n\n\tconst handleScrollTop = () => {\n\t\twindow.scrollTo({ left: 0, top: 0, behavior: \"smooth\" });\n\t};\n\n\tuseEffect(() => {\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll);\n\t\t};\n\t}, [handleScroll]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles, {\n\t\t\t\tcontainer: true,\n\t\t\t\tvisible: showGoTop,\n\t\t\t})}\n\t\t\tstyle={{ zIndex }}\n\t\t>\n\t\t\t<IconButton icon={ChevronUp} size={size} onClick={handleScrollTop} />\n\t\t</div>\n\t);\n};\nexport default ScrollToTop;\n","import {\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tRow,\n\tSelectOption,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\nimport { isNumber } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { models as customerModels, utils as customerUtils } from \"src/modules/customer\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { getBaseUrl } from \"src/utils/url\";\nimport { useStoreContext } from \"src/store\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (phoneNumber: string) => void;\n}\n\nconst PhoneStep = ({ formErrors, onChange }: Props) => {\n\tconst countryCodeOptions: SelectOption[] = viewConstants.SUPPORTED_COUNTRIES.map(\n\t\t({ phoneCode }) => ({\n\t\t\tlabel: phoneCode,\n\t\t\tvalue: phoneCode,\n\t\t})\n\t);\n\n\tconst { hostname, language } = useStoreContext();\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst [form, setForm] = useState<customerModels.CustomerAuthPhoneForm>({\n\t\tcountryCode: countryCodeOptions[0].value as string,\n\t\tphoneNumber: \"\",\n\t});\n\n\tconst { url: baseUrl } = getBaseUrl(hostname, language);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst { name, value } = e?.target || {};\n\n\t\tif (!name) return;\n\n\t\tconst trimmedValue = value?.trim() ?? \"\";\n\n\t\tif (name === \"phoneNumber\" && trimmedValue !== \"\" && !isNumber(trimmedValue)) return;\n\n\t\tconst updatedForm = { ...form, [name]: trimmedValue };\n\n\t\tconst preparedPhoneNumber = customerUtils.preparePhoneNumber(updatedForm);\n\t\tonChange(preparedPhoneNumber);\n\n\t\tsetForm(updatedForm);\n\t};\n\n\treturn (\n\t\t<Column gap={1} fullWidth>\n\t\t\t<Row fullWidth alignItems=\"flex-start\">\n\t\t\t\t<Input\n\t\t\t\t\tname=\"countryCode\"\n\t\t\t\t\toptions={countryCodeOptions}\n\t\t\t\t\ttype={InputType.SELECT}\n\t\t\t\t\tclassName={styles.countryCode}\n\t\t\t\t\tvalue={form.countryCode}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t/>\n\t\t\t\t<Input\n\t\t\t\t\tname=\"phoneNumber\"\n\t\t\t\t\tplaceholder={t(\"Phone number\")}\n\t\t\t\t\ttype={InputType.TEL}\n\t\t\t\t\tfullWidth\n\t\t\t\t\tvalue={form.phoneNumber}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\terrorMessage={tError(formErrors.phoneNumber)}\n\t\t\t\t/>\n\t\t\t</Row>\n\t\t\t<div className={styles.terms}>\n\t\t\t\t<div>\n\t\t\t\t\tBy clicking the button above, you agree to our{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/terms`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tTerms of Service\n\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\tand{\" \"}\n\t\t\t\t\t<a href={`${baseUrl}/privacy`} target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\tPrivacy Policy\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Column>\n\t);\n};\nexport default PhoneStep;\n","import { Column, OTPInput, Text } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\taddress: string;\n\terrorMessage: string;\n\tonChange: (otp: string) => void;\n}\n\nconst OTPStep = ({ address, errorMessage, onChange }: Props) => {\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\treturn (\n\t\t<Column gap={2}>\n\t\t\t<Text fullWidth align=\"center\" color=\"muted\">\n\t\t\t\t{t(\"We sent a confirmation code to {{address}}\", {\n\t\t\t\t\taddress,\n\t\t\t\t})}\n\t\t\t</Text>\n\t\t\t<OTPInput onChangeOTP={onChange} errorMessage={tError(errorMessage)} inputMode=\"numeric\" />\n\t\t</Column>\n\t);\n};\nexport default OTPStep;\n","import {\n\tButton,\n\tColumn,\n\tFormErrors,\n\tInput,\n\tInputType,\n\tonChangeEventType,\n\tUIElementType,\n} from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useState } from \"react\";\n\nimport styles from \"./Auth.module.scss\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\ninterface Props {\n\tformErrors: FormErrors;\n\tonChange: (email: string) => void;\n\tonCancel: () => void;\n}\n\nconst EmailStep = ({ formErrors, onChange, onCancel }: Props) => {\n\tconst { customer } = useOrderContext();\n\tconst [email, setEmail] = useState(customer?.email || \"\");\n\n\tconst { t: tAuth } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\n\tconst handleChange = useCallback(\n\t\t(e: onChangeEventType) => {\n\t\t\tconst newValue = e.target?.value ?? \"\";\n\t\t\tsetEmail(newValue);\n\t\t\tonChange(newValue);\n\t\t},\n\t\t[onChange]\n\t);\n\n\tuseEffect(() => {\n\t\tconst updateEmailIfNeeded = async () => {\n\t\t\tif (customer?.email && customer.email !== email) {\n\t\t\t\tsetEmail(customer.email);\n\t\t\t}\n\t\t};\n\n\t\tupdateEmailIfNeeded();\n\t}, [customer?.email, email]);\n\n\treturn (\n\t\t<Column className={styles.container} alignItems=\"center\" gap={0}>\n\t\t\t<Input\n\t\t\t\tname=\"email\"\n\t\t\t\ttype={InputType.EMAIL}\n\t\t\t\tplaceholder=\"Email\"\n\t\t\t\tfullWidth\n\t\t\t\tvalue={email}\n\t\t\t\tonChange={handleChange}\n\t\t\t\terrorMessage={formErrors.email ? tError(formErrors.email) : undefined}\n\t\t\t/>\n\n\t\t\t{!email && (\n\t\t\t\t<Button\n\t\t\t\t\tonClick={onCancel}\n\t\t\t\t\tlabel={tAuth(\"I don't have an email\")}\n\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</Column>\n\t);\n};\n\nexport default EmailStep;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./HoursList.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ntype Props = {\n\ttitle?: string;\n\tdays: branchModels.BranchWorkDay[];\n};\n\nconst HoursList = ({ title, days }: Props) => {\n\tconst { t } = useTranslation(\"branch\");\n\n\tif (isEmpty(days)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={0.5} fullWidth>\n\t\t\t{title && (\n\t\t\t\t<Text weight=\"medium\" className={styles.title}>\n\t\t\t\t\t{t(title)}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{days.map(({ day, hours }) => {\n\t\t\t\tconst isClosed = !hours;\n\t\t\t\tconst timeText = isClosed ? t(\"Closed\") : `${hours.openAt} - ${hours.closeAt}`;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Row key={day} justifyContent=\"space-between\" fullWidth>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\">\n\t\t\t\t\t\t\t{t(`WEEKDAY-${day}`)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text size=\"sm\" whiteSpace=\"nowrap\" color={isClosed ? UIElementType.DANGER : \"normal\"}>\n\t\t\t\t\t\t\t{timeText}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</Row>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Column>\n\t);\n};\nexport default HoursList;\n","import { isEmpty } from \"@sorocraft/js-utils\";\nimport { Column } from \"@sorocraft/ui\";\n\nimport styles from \"./BranchBusinessHours.module.scss\";\n\nimport { models as branchModels } from \"src/modules/branch\";\n\nimport HoursList from \"./HoursList\";\n\ntype Props = {\n\topeningHours: branchModels.Branch[\"openingHours\"];\n\tdeliveryHours: branchModels.Branch[\"deliveryHours\"];\n};\n\nconst BranchBusinessHours = ({ openingHours, deliveryHours }: Props) => {\n\tconst openingDays = openingHours?.days || [];\n\tconst deliveryDays = deliveryHours?.days || [];\n\n\tif (isEmpty(openingDays)) return null;\n\n\treturn (\n\t\t<Column className={styles.container} gap={2}>\n\t\t\t<HoursList days={openingDays} />\n\t\t\t<HoursList title=\"Delivery Hours\" days={deliveryDays} />\n\t\t</Column>\n\t);\n};\n\nexport default BranchBusinessHours;\n","import { isEmpty, trackEvent } from \"@sorocraft/js-utils\";\nimport { DivElementMap, ModalProvider, ModalsMap } from \"@sorocraft/ui\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport { getCoverPhotoSource, getLogoImageSource } from \"src/utils/image\";\nimport { getBaseUrl } from \"src/utils/url\";\nimport { prepareCategoryAndProductMap } from \"src/utils/menu\";\nimport { StoreProvider, useStoreContext } from \"src/store\";\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { getCategoryNameById } from \"src/utils/category\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport { OrderProvider, useOrderContext } from \"src/store/order\";\nimport { utils as branchUtils } from \"src/modules/branch\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\nimport ScrollToTop from \"../ScrollToTop\";\nimport AddUpdateNote from \"./Modals/AddUpdateNote\";\nimport AuthModal from \"./Modals/Auth\";\nimport AddUpdateAddress from \"./Modals/AddUpdateAddress\";\nimport BranchBusinessHours from \"./Modals/BranchBusinessHours\";\n\nconst MODALS_MAP: ModalsMap = {\n\t[viewConstants.MODALS.ADD_UPDATE_NOTES]: AddUpdateNote,\n\t[viewConstants.MODALS.AUTH]: AuthModal,\n\t[viewConstants.MODALS.ADD_UPDATE_ADDRESS]: AddUpdateAddress,\n\t[viewConstants.MODALS.BRANCH_BUSINESS_HOURS]: BranchBusinessHours,\n};\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = () => {\n\tconst { getCustomer } = useOrderContext();\n\tconst {\n\t\tname,\n\t\tcoverPhoto,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tselectedBranch,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\thostname,\n\t\tonBranchSelect,\n\t} = useStoreContext();\n\n\tconst hasSingleBranch = branches.length <= 1;\n\tconst categoryProductMap = prepareCategoryAndProductMap(categories, products);\n\n\tconst venueName = branchUtils.getVenueName(name, hasSingleBranch, selectedBranch);\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst canUserScroll = useRef<boolean>(true);\n\tconst { url: baseUrl, domain } = getBaseUrl(hostname, language);\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\n\t\tif (!productBlock) return;\n\n\t\tsetTimeout(() => {\n\t\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t\t}, 100);\n\n\t\tsetTimeout(() => {\n\t\t\tcanUserScroll.current = true;\n\t\t}, 1000);\n\t};\n\n\tconst handleSelectCategory = useCallback(async (categoryId: number) => {\n\t\tcanUserScroll.current = false;\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t}, []);\n\n\tconst handleCategoryInView = useCallback(\n\t\t(categoryId: number) => {\n\t\t\tif (!canUserScroll?.current) return;\n\t\t\tconst name = getCategoryNameById(categoryId, categories, language);\n\t\t\ttrackEvent(analyticsConstants.CATEGORY_SCROLLED, { name });\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t},\n\t\t[categories, language]\n\t);\n\n\tconst handleCategoryFromURL = useCallback(() => {\n\t\tif (typeof window === \"undefined\") return;\n\n\t\tconst searchParams = new URLSearchParams(window.location.search);\n\t\tconst categoryIdFromURL = Number(searchParams.get(\"category\"));\n\t\tif (!categoryIdFromURL) return;\n\n\t\tconst categoryToSelect = (categories || []).find(({ id }) => id === categoryIdFromURL);\n\t\tif (isEmpty(categoryToSelect)) return;\n\n\t\thandleSelectCategory(categoryIdFromURL);\n\t}, [categories, handleSelectCategory]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line react-hooks/set-state-in-effect\n\t\thandleCategoryFromURL();\n\t}, [handleCategoryFromURL]);\n\n\tuseEffect(() => {\n\t\tgetCustomer();\n\t}, [getCustomer]);\n\n\treturn (\n\t\t<div className={styles.container} ref={containerRef}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverPhoto={getCoverPhotoSource(coverPhoto)}\n\t\t\t\tlogoImage={getLogoImageSource(logoImage)}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t\thasSingleBranch={hasSingleBranch}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tcontainerRef={containerRef}\n\t\t\t\t\t\tcategoryProductMap={categoryProductMap}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t\t<ScrollToTop size=\"md\" zIndex={10} />\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{!!hostname && (\n\t\t\t\t<a rel=\"noopener noreferrer\" target=\"_blank\" href={baseUrl} className={styles.footer}>\n\t\t\t\t\t{domain}\n\t\t\t\t</a>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst PublicMenuWithContext = ({ data }: Props) => {\n\treturn (\n\t\t<StoreProvider value={data}>\n\t\t\t<OrderProvider>\n\t\t\t\t<ModalProvider modalsMap={MODALS_MAP}>\n\t\t\t\t\t<PublicMenu />\n\t\t\t\t</ModalProvider>\n\t\t\t</OrderProvider>\n\t\t</StoreProvider>\n\t);\n};\n\nexport default PublicMenuWithContext;\n","import {\n\tButton,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tRow,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useState } from \"react\";\n\nimport styles from \"./AddUpdateNote.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateNote = ({ params }: ModalComponentProps) => {\n\tconst { modalRef, note } = params;\n\tconst [noteContent, setNoteContent] = useState<string>(note || \"\");\n\tconst { setModal } = useModalContext();\n\tconst { updateOrder } = useOrderContext();\n\tconst { t } = useTranslation(\"order\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSubmit = () => {\n\t\tupdateOrder({ note: noteContent });\n\t\tsetModal(null);\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\theader={<div>{t(\"Add an order note\")}</div>}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.container}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\ttype={InputType.TEXT_AREA}\n\t\t\t\t\t\tplaceholder={t(\n\t\t\t\t\t\t\t\"Specify any allergies, special requests, or ingredients you want to add or remove\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tvalue={noteContent}\n\t\t\t\t\t\tonChange={(e) => setNoteContent(e?.target?.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Row justifyContent=\"flex-end\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={tCommon(\"Cancel\")}\n\t\t\t\t\t\tonClick={closeModal}\n\t\t\t\t\t\ttype={UIElementType.DEFAULT}\n\t\t\t\t\t\tsize=\"md\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button label={tCommon(\"Save\")} onClick={handleSubmit} size=\"md\" />\n\t\t\t\t</Row>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateNote;\n","import {\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFormErrors,\n\tModal,\n\tModalComponentProps,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Auth.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n} from \"src/modules/customer\";\nimport { models as orderModels } from \"src/modules/order\";\nimport { useOrderContext } from \"src/store/order\";\nimport { logException } from \"src/modules/common/services\";\nimport { services as viewServices } from \"src/modules/view\";\n\nimport PhoneStep from \"./PhoneStep\";\nimport OTPStep from \"./OTPStep\";\nimport EmailStep from \"./EmailStep\";\n\nconst Auth = ({ params }: ModalComponentProps) => {\n\tconst [form, setForm] = useState<customerModels.CustomerAuthForm>({\n\t\tphoneNumber: \"\",\n\t\totp: \"\",\n\t\temail: \"\",\n\t});\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst { t } = useTranslation(\"auth\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst [currentStep, setCurrentStep] = useState<customerModels.CustomerAuthStep>(\n\t\tcustomerModels.CustomerAuthStep.PHONE\n\t);\n\tconst { setModal } = useModalContext();\n\tconst { setOrderStep, getCustomer, customer } = useOrderContext();\n\n\tconst steps = [\n\t\tcustomerModels.CustomerAuthStep.PHONE,\n\t\tcustomerModels.CustomerAuthStep.OTP,\n\t\tcustomerModels.CustomerAuthStep.EMAIL,\n\t];\n\n\tconst { modalRef } = params;\n\n\tconst handleClose = () => {\n\t\tsetModal(null);\n\t};\n\n\tconst completeAuth = () => {\n\t\tsetOrderStep(orderModels.OrderStep.DETAILS);\n\t\tsetModal(null);\n\t};\n\n\tconst goToNextStep = () => {\n\t\tconst currentStepIndex = steps.findIndex((step) => step === currentStep) || 0;\n\t\tconst nextStepIndex = currentStepIndex + 1;\n\n\t\tif (nextStepIndex >= steps.length) return completeAuth();\n\n\t\tconst nextStep = steps[nextStepIndex];\n\t\tsetCurrentStep(nextStep);\n\t};\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\t// In email step, if customer didn't change the email, continue without doing anything.\n\t\t\tconst isEmailStep = currentStep === customerModels.CustomerAuthStep.EMAIL;\n\t\t\tconst isEmailUnchanged = customer?.email === form.email;\n\t\t\tconst isEmailEmptyButPreviouslySet = !!customer?.email && !form.email;\n\t\t\tif (isEmailStep && (isEmailUnchanged || isEmailEmptyButPreviouslySet)) {\n\t\t\t\treturn goToNextStep();\n\t\t\t}\n\n\t\t\tconst validationErrors = customerUtils.validateForm(form, currentStep);\n\t\t\tif (!isEmpty(validationErrors)) return setFormErrors(validationErrors);\n\n\t\t\tsetFormErrors({});\n\n\t\t\tswitch (currentStep) {\n\t\t\t\tcase customerModels.CustomerAuthStep.PHONE: {\n\t\t\t\t\tconst response = await customerServices.loginCustomer(form.phoneNumber);\n\t\t\t\t\t// TODO: errors field gelir check ele. docs-da var.\n\t\t\t\t\tif (response?.status !== 200) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\t\tconst response = await customerServices.verifyOTP(form.otp, form.phoneNumber);\n\t\t\t\t\tif (!response?.accessToken) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tviewServices.storage.saveAuthToken(response);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\t\tconst response = await customerServices.update({ email: form.email });\n\t\t\t\t\tif (response?.status !== 200) {\n\t\t\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait getCustomer();\n\t\t\tgoToNextStep();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tlogException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/Auth/Auth.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(field: string) => (value: string) => {\n\t\t\tsetForm((currentForm) => ({\n\t\t\t\t...currentForm,\n\t\t\t\t[field]: value,\n\t\t\t}));\n\t\t},\n\t\t[]\n\t);\n\n\tconst renderStep = () => {\n\t\tswitch (currentStep) {\n\t\t\tcase customerModels.CustomerAuthStep.OTP: {\n\t\t\t\treturn (\n\t\t\t\t\t<OTPStep\n\t\t\t\t\t\taddress={form.phoneNumber}\n\t\t\t\t\t\tonChange={handleChange(\"otp\")}\n\t\t\t\t\t\terrorMessage={formErrors?.otp}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcase customerModels.CustomerAuthStep.EMAIL: {\n\t\t\t\treturn (\n\t\t\t\t\t<EmailStep\n\t\t\t\t\t\tonChange={handleChange(\"email\")}\n\t\t\t\t\t\tonCancel={completeAuth}\n\t\t\t\t\t\tformErrors={formErrors}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\treturn <PhoneStep onChange={handleChange(\"phoneNumber\")} formErrors={formErrors} />;\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Create an account or log in\")}\n\t\t\tonClose={handleClose}\n\t\t\tcontent={\n\t\t\t\t<Column className={styles.content} fullWidth>\n\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{renderStep()}\n\t\t\t\t</Column>\n\t\t\t}\n\t\t\tfooter={<Button label={tCommon(\"Continue\")} onClick={handleSubmit} size=\"lg\" fullWidth />}\n\t\t/>\n\t);\n};\nexport default Auth;\n","import {\n\tAddressAutocomplete,\n\tAlertBox,\n\tButton,\n\tColumn,\n\tFlex,\n\tFormErrors,\n\tGoogleSuggestion,\n\tInput,\n\tInputType,\n\tModal,\n\tModalComponentProps,\n\tonChangeEventType,\n\tText,\n\tUIElementType,\n\tuseModalContext,\n} from \"@sorocraft/ui\";\nimport { useCallback, useState } from \"react\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./AddUpdateAddress.module.scss\";\n\nimport { useTranslation } from \"src/hooks/translation\";\nimport { constants as viewConstants } from \"src/modules/view\";\nimport {\n\tmodels as customerModels,\n\tservices as customerServices,\n\tutils as customerUtils,\n\thooks as customerHooks,\n} from \"src/modules/customer\";\nimport { services as commonServices } from \"src/modules/common\";\nimport { useStoreContext } from \"src/store\";\nimport { useOrderContext } from \"src/store/order\";\n\nconst AddUpdateAddress = ({ params }: ModalComponentProps) => {\n\tconst initialCountryCode = viewConstants.SUPPORTED_COUNTRIES[0].code;\n\n\tconst { getCustomer } = useOrderContext();\n\tconst { language, selectedBranch } = useStoreContext();\n\tconst {\n\t\tid,\n\t\tcountryCode = initialCountryCode,\n\t\tcityName = \"\",\n\t\tstreet = \"\",\n\t\thouseNumber = \"\",\n\t\tfloor,\n\t\tadditionalNumber = \"\",\n\t\tinstructions = \"\",\n\t\tlongitude,\n\t\tlatitude,\n\t\tpostCode,\n\t} = customerHooks.useCustomerAddress();\n\n\tconst initalForm: customerModels.CustomerAddress = {\n\t\taddressId: id,\n\t\tcountryCode,\n\t\tcityName,\n\t\tstreet,\n\t\thouseNumber,\n\t\tadditionalNumber,\n\t\tinstructions,\n\t\tfloor,\n\t\tlatitude,\n\t\tlongitude,\n\t\tpostCode,\n\t};\n\n\tconst { modalRef } = params;\n\tconst { t } = useTranslation(\"customer\");\n\tconst { t: tError } = useTranslation(\"error\");\n\tconst { t: tCommon } = useTranslation(\"common\");\n\tconst { setModal } = useModalContext();\n\tconst [form, setForm] = useState<customerModels.CustomerAddress>(initalForm);\n\tconst [formErrors, setFormErrors] = useState<FormErrors>({});\n\tconst [apiError, setAPIError] = useState<string>(\"\");\n\tconst [isLoading, setIsLoading] = useState<boolean>(false);\n\n\tconst adressError =\n\t\tformErrors.countryCode || formErrors.cityName || formErrors.street || formErrors.houseNumber;\n\n\tconst defaultAdressText = customerUtils.formatAddressLine(\n\t\tinitalForm.street,\n\t\tinitalForm.houseNumber,\n\t\tundefined\n\t);\n\n\tconst handleChange = (e: onChangeEventType) => {\n\t\tconst name = e?.target?.name;\n\t\tconst value = e?.target?.value;\n\n\t\tsetForm((currentForm) => ({\n\t\t\t...currentForm,\n\t\t\t[name]: value,\n\t\t}));\n\t};\n\n\tconst closeModal = () => setModal(null);\n\n\tconst handleSelectGoogleSuggestion = useCallback(\n\t\t(suggestion: GoogleSuggestion) => {\n\t\t\tconst updatedForm = {\n\t\t\t\t...form,\n\t\t\t\tcountryCode: suggestion.countryCode,\n\t\t\t\tcityName: suggestion.cityName,\n\t\t\t\tstreet: suggestion.street,\n\t\t\t\thouseNumber: suggestion.houseNumber,\n\t\t\t\tlatitude: suggestion.lat,\n\t\t\t\tlongitude: suggestion.long,\n\t\t\t\tpostCode: suggestion.postCode,\n\t\t\t};\n\n\t\t\tconst errors = customerUtils.validateAddressForm(updatedForm);\n\n\t\t\tsetForm(updatedForm);\n\t\t\tsetFormErrors(errors);\n\t\t},\n\t\t[form]\n\t);\n\n\tconst handleSubmit = async () => {\n\t\tsetAPIError(\"\");\n\t\ttry {\n\t\t\tconst errors = customerUtils.validateAddressForm(form);\n\t\t\tif (!isEmpty(errors)) return setFormErrors(errors);\n\n\t\t\tsetFormErrors({});\n\t\t\tsetIsLoading(true);\n\n\t\t\tconst response = await customerServices.update({ address: form });\n\t\t\tif (response?.status !== 200) {\n\t\t\t\tthrow new Error(\"SOMETHING_WRONG\");\n\t\t\t}\n\t\t\tgetCustomer();\n\t\t\tcloseModal();\n\t\t} catch (error) {\n\t\t\tsetAPIError(error?.errorCode || \"SOMETHING_WRONG\");\n\t\t\tcommonServices.logException(error, {\n\t\t\t\tfile: \"src/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.tsx\",\n\t\t\t\tmethod: \"handleSubmit\",\n\t\t\t\tpayload: form,\n\t\t\t});\n\t\t} finally {\n\t\t\tsetIsLoading(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\ttitle={t(\"Update Delivery Address\")}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={\n\t\t\t\t<div className={styles.content}>\n\t\t\t\t\t<Column fullWidth>\n\t\t\t\t\t\t{!!apiError && (\n\t\t\t\t\t\t\t<AlertBox\n\t\t\t\t\t\t\t\tmessage={tError(apiError)}\n\t\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t\t\tonClear={() => setAPIError(\"\")}\n\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Column fullWidth gap={0.5}>\n\t\t\t\t\t\t\t<AddressAutocomplete\n\t\t\t\t\t\t\t\tonSelect={handleSelectGoogleSuggestion}\n\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\torigin={{ lat: selectedBranch?.latitude, lng: selectedBranch?.longitude }}\n\t\t\t\t\t\t\t\tnoMargin\n\t\t\t\t\t\t\t\tdefaultAdressText={defaultAdressText}\n\t\t\t\t\t\t\t\tplaceHolder={t(\"Enter address\")}\n\t\t\t\t\t\t\t\tinputLabel={t(\"Address\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{adressError && <Text color={UIElementType.DANGER}>{tError(adressError)}</Text>}\n\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t<Flex gap={1}>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"floor\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Floor\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"7\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.floor}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.floor)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t\t<Flex.Item flex={6}>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tname=\"additionalNumber\"\n\t\t\t\t\t\t\t\t\tlabel={t(\"Additional number\")}\n\t\t\t\t\t\t\t\t\tplaceholder=\"17\"\n\t\t\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\t\t\tvalue={form.additionalNumber}\n\t\t\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\t\t\terrorMessage={tError(formErrors.additionalNumber)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Flex.Item>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname=\"instructions\"\n\t\t\t\t\t\t\tplaceholder={t(\"Example: Door code is 555\")}\n\t\t\t\t\t\t\tlabel={t(\"Delivery Instructions\")}\n\t\t\t\t\t\t\ttype={InputType.TEXT}\n\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\tvalue={form.instructions}\n\t\t\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\t\t\terrorMessage={tError(formErrors.instructions)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<Button\n\t\t\t\t\tlabel={tCommon(\"Save\")}\n\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\tfullWidth\n\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default AddUpdateAddress;\n","import { Modal, ModalComponentProps, useModalContext } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport BranchBusinessHoursUI from \"src/components/PublicMenu/Header/BranchBusinessHours\";\n\nconst BranchBusinessHours = ({ params }: ModalComponentProps) => {\n\tconst { setModal } = useModalContext();\n\tconst { t } = useTranslation(\"branch\");\n\n\tconst { modalRef, openingHours, deliveryHours } = params;\n\n\tconst closeModal = () => setModal(null);\n\n\treturn (\n\t\t<Modal\n\t\t\tref={modalRef}\n\t\t\tonClose={closeModal}\n\t\t\tcontent={<BranchBusinessHoursUI openingHours={openingHours} deliveryHours={deliveryHours} />}\n\t\t\ttitle={t(\"Opening Hours\")}\n\t\t/>\n\t);\n};\nexport default BranchBusinessHours;\n","import { Category, CategoryProductMap, Product } from \"src/models\";\n\nexport const prepareCategoryAndProductMap = (\n\tcategories: Category[],\n\tproducts: Product[]\n): CategoryProductMap[] => {\n\tconst productMap = products.reduce<Record<number, Product[]>>((map, product) => {\n\t\tif (!product.visible) return map;\n\n\t\tconst categoryId = Number(product.categoryId);\n\t\tif (!map[categoryId]) {\n\t\t\tmap[categoryId] = [];\n\t\t}\n\t\tmap[categoryId].push(product);\n\t\treturn map;\n\t}, {});\n\n\treturn categories\n\t\t.map((category) => ({\n\t\t\t...category,\n\t\t\tproducts: (productMap[Number(category.id)] || []) as Product[],\n\t\t}))\n\t\t.filter((category) => category?.products?.length > 0);\n};\n","import { useCallback, useRef } from \"react\";\nimport { CloseDropdownRef, DropDown, DropDownMenuItem, UIElementType } from \"@sorocraft/ui\";\n\nimport styles from \"./Events.module.scss\";\n\nimport * as analyticsConstants from \"src/constants/analytics\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tcurrentGoal: string;\n\tlanguage?: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst EventsToolbar = ({ currentGoal, language, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\tconst closeDropdownRef = useRef<CloseDropdownRef>({});\n\n\tconst getGoalTitle = (goal: string) => {\n\t\tswitch (goal) {\n\t\t\tcase analyticsConstants.CATEGORY_SCROLLED:\n\t\t\t\treturn t(\"Scrolled to Category\");\n\t\t\tcase analyticsConstants.CATEGORY_SELECTED:\n\t\t\t\treturn t(\"Category Selected\");\n\t\t\tcase analyticsConstants.PRODUCT_DETAILS:\n\t\t\t\treturn t(\"Product Details\");\n\t\t\tcase analyticsConstants.PRODUCT_ADD_ORDER:\n\t\t\t\treturn t(\"Product Added to Order\");\n\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t}\n\t};\n\n\tconst handleChange = useCallback(\n\t\t(goal: string) => {\n\t\t\tsetGoal(goal);\n\t\t\tcloseDropdownRef?.current?.close?.();\n\t\t},\n\t\t[setGoal]\n\t);\n\n\treturn (\n\t\t<DropDown\n\t\t\taction={getGoalTitle(currentGoal)}\n\t\t\tactionSize=\"large\"\n\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\tcloseRef={closeDropdownRef}\n\t\t\tmenu={\n\t\t\t\t<div className={styles.toolbarMenu}>\n\t\t\t\t\t{analyticsConstants.GOALS.map((goal) => (\n\t\t\t\t\t\t<DropDownMenuItem key={goal} onClick={() => handleChange(goal)}>\n\t\t\t\t\t\t\t{getGoalTitle(goal)}\n\t\t\t\t\t\t</DropDownMenuItem>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n};\nexport default EventsToolbar;\n","import { Card, BarChart, Loading, BarChartData } from \"@sorocraft/ui\";\n\nimport { useTranslation } from \"src/hooks/translation\";\n\nimport EventsToolbar from \"./EventsToolbar\";\n\ninterface Props {\n\tdata: BarChartData[];\n\tisLoading?: boolean;\n\tlanguage?: string;\n\tgoal: string;\n\tsetGoal: (goal: string) => void;\n}\n\nconst Events = ({ data, isLoading = false, language, goal, setGoal }: Props) => {\n\tconst { t } = useTranslation(\"events\", {\n\t\tlanguage,\n\t});\n\n\treturn (\n\t\t<Card\n\t\t\ttitle={t(\"Events\")}\n\t\t\ttoolbar={<EventsToolbar language={language} currentGoal={goal} setGoal={setGoal} />}\n\t\t>\n\t\t\t{isLoading ? <Loading /> : <BarChart data={data} />}\n\t\t</Card>\n\t);\n};\nexport default Events;\n","import { PlanType, PricingPlans } from \"./models\";\n\nexport const PRICING: PricingPlans = {\n\tappetizer: {\n\t\ttitle: \"Appetizer\",\n\t\tprice: {\n\t\t\tmonthly: 9,\n\t\t\tannually: 7,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tmainCourse: {\n\t\ttitle: \"Main Course\",\n\t\tprice: {\n\t\t\tmonthly: 19,\n\t\t\tannually: 15,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tchefsSpecial: {\n\t\ttitle: \"Chef's Special\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 39,\n\t\t},\n\t\t// discountedPrice: 0,\n\t},\n\tlifeTime: {\n\t\ttitle: \"Lifetime\",\n\t\tprice: {\n\t\t\tmonthly: 49,\n\t\t\tannually: 49,\n\t\t},\n\t\tribbonText: \"Limited Time Only\",\n\t\t// discountedPrice: 0,\n\t},\n};\n\nexport const PRICING_BENEFITS = [\n\t{\n\t\ttitle: \"Smart QR Menu\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Link-in-bio\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Menu Analytics\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Users\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Products\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Categories\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Unlimited Languages\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product variants\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Product options\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Premium Support\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"SEO\",\n\t\t[PlanType.APPETIZER]: true,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Sales reports\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Table Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Order Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Delivery Management\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: true,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Multiple Branches\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: true,\n\t},\n\t{\n\t\ttitle: \"Point of Sale (POS)\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t{\n\t\ttitle: \"Mobile App for Owners & Staff\",\n\t\t[PlanType.APPETIZER]: false,\n\t\t[PlanType.MAIN_COURSE]: false,\n\t\t[PlanType.CHEFS_SPECIAL]: true,\n\t\t[PlanType.LIFETIME]: false,\n\t},\n\t// {\n\t// \ttitle: \"RestaroundPay with Mobile\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Event management\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: true,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// },\n\t// {\n\t// \ttitle: \"Third-Party Delivery Integrations\",\n\t// \t[PlanType.APPETIZER]: false,\n\t// \t[PlanType.MAIN_COURSE]: false,\n\t// \t[PlanType.CHEFS_SPECIAL]: true,\n\t// \t[PlanType.LIFETIME]: false,\n\t// },\n];\n\nexport const LIFETIME_PROMO_CODES = [\"LIFETIME_49\"];\n","import { priceFormatter } from \"@sorocraft/js-utils\";\nimport { Column, Row, Text } from \"@sorocraft/ui\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\nimport { useTranslation } from \"src/hooks/translation\";\n\ninterface Props {\n\tplan: subscriptionModels.PlanType;\n\tlanguage: string;\n\tinterval: subscriptionModels.PricingInterval;\n\tcurrency: string;\n}\n\nconst PricingPlanAmount = ({ plan, language, interval, currency }: Props) => {\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst { price, discountedPrice } = subscriptionConstants.PRICING[plan];\n\tconst intervalPrice = price[interval];\n\tconst intervalPriceText =\n\t\tplan === subscriptionModels.PlanType.LIFETIME ? \"/ lifetime\" : \"/ month\";\n\n\tif (discountedPrice !== undefined) {\n\t\treturn (\n\t\t\t<Column gap={0}>\n\t\t\t\t<Row>\n\t\t\t\t\t<span className={styles.discountedPrice}>\n\t\t\t\t\t\t{priceFormatter(discountedPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className={styles.originalPrice}>\n\t\t\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t\t\t</span>\n\t\t\t\t</Row>\n\t\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t\t</Column>\n\t\t);\n\t}\n\treturn (\n\t\t<Row gap={0.5}>\n\t\t\t<Text size=\"xxl\" variant=\"bold\">\n\t\t\t\t{priceFormatter(intervalPrice, currency, language)}\n\t\t\t</Text>\n\t\t\t<Text size=\"sm\">{t(intervalPriceText)}</Text>\n\t\t</Row>\n\t);\n};\nexport default PricingPlanAmount;\n","import { Card, SVGIcon, UIElementType, Button, Row } from \"@sorocraft/ui\";\nimport { Check, Minus, ShieldDollar } from \"@sorocraft/ui/icons\";\nimport { classNames } from \"@sorocraft/js-utils\";\nimport { ReactNode, useState } from \"react\";\n\nimport styles from \"./Pricing.module.scss\";\n\nimport { getRegisterUrl } from \"src/utils/url\";\nimport { useTranslation } from \"src/hooks/translation\";\nimport {\n\tmodels as subscriptionModels,\n\tconstants as subscriptionConstants,\n} from \"src/modules/subscription\";\n\nimport PricingPlanAmount from \"./PricingPlanAmount\";\n\ninterface Props {\n\tcurrency: string;\n\tlanguage: string;\n\tisLoading?: boolean;\n\tpromoCode?: string | null;\n\tonPlanSelect?: (plan: subscriptionModels.PlanType) => void;\n\tonIntervalSelect?: (interval: subscriptionModels.PricingInterval) => void;\n}\n\ninterface PlanParentProps {\n\tchildren: ReactNode;\n\tplan: subscriptionModels.PlanType;\n}\n\nconst Pricing = ({\n\tcurrency,\n\tlanguage,\n\tisLoading = false,\n\tonPlanSelect,\n\tonIntervalSelect,\n}: Props) => {\n\tconst [selectedInterval, setSelectedInterval] =\n\t\tuseState<subscriptionModels.PricingInterval>(\"annually\");\n\tconst { t } = useTranslation(\"pricing\", {\n\t\tlanguage,\n\t});\n\n\tconst plans: subscriptionModels.PlanType[] = [\n\t\tsubscriptionModels.PlanType.APPETIZER,\n\t\tsubscriptionModels.PlanType.MAIN_COURSE,\n\t\tsubscriptionModels.PlanType.CHEFS_SPECIAL,\n\t];\n\tconst intervals: Array<subscriptionModels.PricingInterval> = [\"annually\", \"monthly\"];\n\tconst isDashboard = Boolean(onPlanSelect);\n\tconst actionTitle = isDashboard ? \"Choose Plan\" : \"Try for free\";\n\n\tconst handleSelectInterval = (interval: subscriptionModels.PricingInterval) => {\n\t\tsetSelectedInterval(interval);\n\t\tif (onIntervalSelect) {\n\t\t\tonIntervalSelect(interval);\n\t\t}\n\t};\n\n\tconst PlanParent = ({ children, plan }: PlanParentProps) => {\n\t\tconst { ribbonText } = subscriptionConstants.PRICING[plan];\n\t\tconst hasRibbon = Boolean(ribbonText);\n\n\t\tconst commonProps = {\n\t\t\tclassName: classNames(styles, { plan: true, hasRibbon }),\n\t\t\t\"data-ribbon\": t(ribbonText),\n\t\t};\n\n\t\tif (onPlanSelect) {\n\t\t\treturn (\n\t\t\t\t<div {...commonProps} onClick={() => !isLoading && onPlanSelect(plan)}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<a\n\t\t\t\t{...commonProps}\n\t\t\t\thref={getRegisterUrl(language, `pricing-${plan}`)}\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</a>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<div className={styles.intervals}>\n\t\t\t\t{intervals.map((interval) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={interval}\n\t\t\t\t\t\tclassName={classNames(styles, {\n\t\t\t\t\t\t\tinterval: true,\n\t\t\t\t\t\t\tactive: selectedInterval === interval,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tonClick={() => handleSelectInterval(interval)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(interval)}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className={styles.plans}>\n\t\t\t\t{plans.map((plan) => (\n\t\t\t\t\t<PlanParent key={plan} plan={plan}>\n\t\t\t\t\t\t<Card>\n\t\t\t\t\t\t\t<div className={styles.title}>{t(subscriptionConstants.PRICING[plan].title)}</div>\n\t\t\t\t\t\t\t<div className={styles.price}>\n\t\t\t\t\t\t\t\t<PricingPlanAmount\n\t\t\t\t\t\t\t\t\tplan={plan}\n\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\tinterval={selectedInterval}\n\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.action}>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={t(actionTitle)}\n\t\t\t\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\t\t\t\tsize=\"xl\"\n\t\t\t\t\t\t\t\t\ttype={\n\t\t\t\t\t\t\t\t\t\tplan === subscriptionModels.PlanType.MAIN_COURSE\n\t\t\t\t\t\t\t\t\t\t\t? UIElementType.PRIMARY\n\t\t\t\t\t\t\t\t\t\t\t: UIElementType.BORDERED_PRIMARY\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={() => {}}\n\t\t\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className={styles.benefits}>\n\t\t\t\t\t\t\t\t{!isDashboard && (\n\t\t\t\t\t\t\t\t\t<Row className={styles.moneyBack} gap={0.5}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={ShieldDollar} size=\"sm\" color={UIElementType.SUCCESS} />\n\t\t\t\t\t\t\t\t\t\t<span>{t(\"No credit card needed\")}</span>\n\t\t\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{subscriptionConstants.PRICING_BENEFITS.map((benefit) => (\n\t\t\t\t\t\t\t\t\t<div key={benefit.title} className={styles.benefit}>\n\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={benefit[plan] ? Check : Minus} size=\"md\" />{\" \"}\n\t\t\t\t\t\t\t\t\t\t<span>{t(benefit.title)}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</PlanParent>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Pricing;\n"],"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","rejected","result","done","then","apply","SuppressedError","IMAGE_BASE_URL","getImageSource","image","includes","startsWith","getLogoImageSource","logoImage","getCoverPhotoSource","coverPhoto","keyStr","triplet","e1","e2","e3","charAt","CO_DOMAIN","DOMAINS","getBaseUrl","hostname","language","domain","url","getRegisterUrl","source","tld","getTLD","MODALS","SUPPORTED_LOCALES","SUPPORTED_COUNTRIES","name","code","phoneCode","StoreContext","createContext","StoreProvider","children","contextValue","useMemo","isEmpty","branches","selectedBranch","find","item","id","Number","branchId","assign","currency","_jsx","Provider","useStoreContext","useContext","GOAL_BASE_NAME","CATEGORY_SELECTED","CATEGORY_SCROLLED","PRODUCT_DETAILS","PRODUCT_ADD_ORDER","PRODUCT_VIEW_CHANGED","GOALS","getCategoryTranslation","category","_b","_a","translations","storage","Storage","validators","number","AZERBAIJANI_PREFIXES","RegExp","join","test","isValid","error","validatePhoneNumber","phoneNumber","cleaned","replace","countryCode","nationalNumber","slice","validator","OrderType","OrderStatus","OrderItemStatus","PaymentMethod","OrderStep","initialOrder","orderType","totalPriceWithTax","totalPriceWithoutTax","totalTax","vat","paymentMethod","CASH","ORDER_STEPS","CART","DETAILS","COMPLETED","OrderErrors","generateOrderItemsId","productId","variantId","selectedAddons","Error","orderItemsId","addonIdsPart","entries","map","addonId","option","optionIds","Array","isArray","sortNumbers","filter","Boolean","getOrderItemPrice","orderItem","price","variant","addons","quantity","basePrice","addonsPrice","reduce","total","addon","addonTotal","options","sum","calculatSingleAddonTotalPrice","calculateTotalAddonPrice","itemNetPrice","itemTax","itemGrossPrice","totalGross","totalNet","getOrderErrorMessages","field","ADDRESS_IS_EMPTY","TABLE_NOT_SELECTED","EMPTY_ITEMS","BRANCH_NOT_SELECTED","FIELD_REQUIRED_ERROR","BASE_API_URL","request","method","endpoint","body","accessToken","getAuthToken","response","fetch","headers","Authorization","credentials","JSON","stringify","data","json","ok","API","update","payload","logException","args_1","errorInfo","trackEvent","message","console","getVenueName","businessName","hasSingleBranch","getHoursForDay","schedule","weekDayIndex","days","day","hours","splitHours","split","isWithinTimeRange","timeRange","now","Date","openH","openM","openAt","closeH","closeM","closeAt","start","setHours","end","setDate","getDate","useBranchServes","openingHours","deliveryHours","isOpen","isDelivering","getUTCDay","openHours","deliveryHoursToday","useBranchSettings","settings","useOrderEnabled","deliveryOrderEnabled","dineInOrderEnabled","pickupOrderEnabled","useInitialOrder","defaultOrderType","defaultPaymentMethod","defaultBranchId","tableId","branchHooks.useBranchServes","branchSettings","branchHooks.useBranchSettings","DELIVERY","DINE_IN","PICK_UP","orderUtils.getDefaultOrderType","undefined","orderModels.PaymentMethod","OrderContext","order","orderConstants.initialOrder","orderStep","orderModels.OrderStep","orderItems","isOrderOpen","customer","trackingId","errors","updateOrder","setOrderStep","addProduct","updateProduct","removeAllProductVariants","setIsOrderOpen","getCustomer","resetOrder","setTrackingId","updateOrderErrors","resetErrors","OrderProvider","storeHooks.useInitialOrder","setCustomer","useState","setOrder","setOrderItems","setErrors","useCallback","updatedFields","currentOrder","forEach","currentErrors","updateOrderItems","product","note","isAddOperation","variants","orderUtils.generateOrderItemsId","currentOrderItems","existingItem","newQuantity","selectedVariant","selectedAddonsPayload","productAddons","addonIdStr","selected","selectedOptionIds","optionId","orderUtils.buildSelectedAddonsPayload","items","updatedOrderItems","acc","viewServices.storage","commonServices.logException","file","force","orderUtils.getOrderErrorMessages","useOrderContext","BranchSetting","Image","props","priority","_","blurDataURL","__","quality","___","placeholder","____","fetchPriority","_____","imgProps","imageTag","r","g","b","Languages","languages","onLanguageSelect","isOptionsOpen","setIsOptionsOpen","isBilingual","otherLanguages","getFlag","className","styles","container","onClick","_jsxs","Row","alignItems","gap","classNames","src","handleSelectLanguages","alt","currentLanguage","BackIcon","size","theme","business","window","username","location","pathname","history","back","SVGIcon","icon","ChevronLeft","BranchInfo","branch","address","latitude","longitude","googleMapLink","Column","justifyContent","fullHeight","fullWidth","Flex","direction","Item","width","height","shrink","href","target","rel","MarkerPin","color","UIElementType","DEFAULT","BusinessInfo","Header","instagram","facebook","whatsapp","telegram","tiktok","setModal","useModalContext","phone","wifiPassword","noBranch","isBusinessHoursAvailable","cover","sizes","loading","content","social","links","IconLink","Phone","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","businessHours","viewConstants.MODALS","params","Clock","Categories","categoryProductMap","selectedCategoryId","skipTracking","onSelectCategory","categoryBlocksRef","useRef","carouselRef","scrollToCategoryBlock","categoryBlock","current","carouselWidth","clientWidth","scrollLeft","offsetLeft","offsetWidth","scrollTo","left","behavior","useEffect","Carousel","onGetRef","ref","CarouselItem","Chip","analyticsConstants.CATEGORY_SELECTED","handleSelectCategory","type","BORDERED_PRIMARY","active","el","ProductView","calculateTotalPrice","MenuAddonSelectType","getAddonTranslation","getAddonOptionTranslation","getAddonOptionRawPrice","getProductTranslation","getProductRawPrice","getProductPrice","totalPrice","formattedTotalPrice","priceFormatter","getProductVariant","getProductVariantRawPrice","getProductVariantTranslation","getProductOrderRawPrice","noVat","optionsPrice","productData","selectedOptionsTotalPrice","selectType","SINGLE","selectedOptionId","multipleTotal","getSelectedOptionsTotalPrice","BusinessSetting","CustomerAuthStep","CustomerAddressType","Feature","FeatureSegment","PlanType","SubscriptionStatus","TableShape","TableStatus","TableLocation","locales","az","SOMETHING_WRONG","FIELD_REQUIRED","INVALID_OTP","OTP_RATE_LIMIT_EXCEEDED","FEATURE_NOT_AVAILABLE_FOR_SEGMENT","ORDER_TYPE_DISABLED_FOR_BUSINESS","COUNTRY_REQUIRED","CITY_REQUIRED","STREET_REQUIRED","STREET_NUMBER_REQUIRED","OUT_OF_DELIVERY_RANGE","NO_ORDER_TYPE","Save","Cancel","Continue","Add","Subtotal","Delivery","Pickup","Cash","Items","Tax","Total","Table","Card","Country","City","Address","Azerbaijan","Floor","Events","monthly","annually","Appetizer","Closed","en","ru","tr","nl","et","common","auth","events","pricing","useTranslation","ns","locale","supportedLocale","key","translation","keys","k","getTranslations","ProductsListItem","image160","volume","available","description","productUtils.getProductTranslation","productUtils.getProductPrice","hasVariant","hasAddons","hasImage","isClickable","noImage","info","Text","notAvailableText","notAvailable","addToOrder","IconButton","preventDefault","stopPropagation","analyticsConstants.PRODUCT_ADD_ORDER","Plus","ProductsGridItem","defaultImage","isDashboard","onAddProduct","image580","image1024","imageContainer","ProductsGridItemContainer","useCustomerAddress","addresses","usePrepareOrder","existingOrderData","businessId","values","useOrderPriceDetails","customerHooks.useCustomerAddress","customerId","customerHooks.useCustomerId","workingDayId","employeeId","customerAddressId","useTotalOrderItemsCount","useOrderItemsTotalPrice","orderItemsTotalPrice","useDeliveryDistanceError","branchCoordinates","branchHooks.useBranchCoordinates","maxDeliveryDistance","setError","hasValidCustomerAddress","hasValidBranchCoordinates","distance","customerCoordinates","spherical","google","maps","importLibrary","coordinate1","LatLng","coordinate2","computeDistanceBetween","customerServices.getCustomerDistance","useDeliveryAmountError","minDeliveryAmount","amount","Quantity","isDecreaseDisabled","onIncrease","onDecrease","quantityAction","isDisabled","Minus","quantityValue","ProductInOrder","isInPublicMenu","onModalClose","flex","Trash","DANGER","tooltip","ShoppingBag","SUCCESS","ProductVariants","focusedSection","onSelectVariant","containerRef","isVariantsFocused","scrollIntoView","focused","variantsTitle","formattedTotalVariantPrice","productUtils.getProductVariantPrice","title","productUtils.getProductVariantTranslation","Input","label","onChange","checked","InputType","RADIO","noMargin","variantPrice","ProductAddons","onOptionSelect","addonUtils.getAddonTranslation","formattedTotalOptionPrice","addonUtils.getOptionPrice","optionTitle","addonUtils.getAddonOptionTranslation","isSingle","addonModels.MenuAddonSelectType","isRemove","CHECKBOX","optionPrice","ProductDetailsUI","actionTitle","productQuantityInOrderWithAllVariants","onClose","setSelectedVariant","adjustQuantity","onSubmit","modalRef","formattedTotalOrderPrice","productUtils.getProductOrderPrice","handleClickOutside","event","contains","hasVariants","Modal","noBodyPadding","details","choices","close","Close","footer","Button","addAction","disabled","paddingBlock","ProductDetails","setQuantity","isUpdate","setIsUpdate","setFocusedSection","setSelectedAddons","productQuantityInOrder","orderHooks.useProductQuantityInOrder","orderHooks.useProductQuantityInOrderWithAllVariants","Math","max","prevForm","previousSelection","updatedSelection","Set","setTimeout","OrderStepper","actionText","isLoading","totalCount","orderHooks.useTotalOrderItemsCount","orderHooks.useOrderItemsTotalPrice","count","Loading","FloatingOrdersButton","validateAddressForm","form","cityName","street","houseNumber","formatAddressLine","additionalNumber","OrderDrawerFooter","isOrderItemsEmpty","orderError","tError","isOrderEnabled","branchHooks.useOrderEnabled","availableCustomer","customerHooks.useAvailableCustomer","orderPayload","orderHooks.usePrepareOrder","setIsLoading","apiError","setAPIError","orderNote","hasOrderNote","showOrderNote","isServing","isSubmitDisabled","createOrder","orderServices.createOrder","errorCode","orderStepperAction","orderModels.OrderType","orderTrackingId","nextStepIndex","orderConstants.ORDER_STEPS","findIndex","nextStep","AlertBox","onClear","TextBanner","text","LIGHT","Edit","iconSize","PRIMARY","getActionText","useProductById","products","ProductQuantity","min","productHooks.useProductQuantity","OrderItemOptionsInfo","_Fragment","productUtils.getProductAddon","selectedOptions","some","addonTitle","optionTitles","OrderListItem","orderUtils.getSelectedAddonsFromOrderItems","productUtils.getProductVariant","variantTitle","orderHooks.useOrderItemPrice","OrderNoItems","noItems","Description","OrderItemsList","itemId","OrderDrawerCart","NoAddressContent","AddressContent","firstLine","customerUtils.formatAddressLine","secondLine","CustomerAddress","OrderTableUI","preDefinedTable","tableOptions","selectedTableId","disableIfPreDefined","hasPreDefinedTable","handleTableChange","table","SELECT","tableInput","OrderTable","tables","tableHooks.usePreDefinedTable","tableHooks.useList","OrderMethods","orderTypes","onSelect","getOrderMethodTooltipPosition","index","orderMethods","position","flexWrap","whiteSpace","MethodSelection","methods","selectedMethod","OrderPaymentSummary","textSize","totalPriceWithoutTaxFormatted","totalPriceWithTaxFormatted","totalTaxFormatted","OrderDrawerDetails","Grid","paymentMethods","CARD","Padding","paddingInline","Accordion","style","noPadding","headerPaddingInline","headerPaddingBlock","titleTagName","OrderDrawerCompleted","Check","align","Link","OrderDrawer","contentRef","orderErrorInDetails","deliveryDistanceError","deliveryAmountError","orderHooks.useOrderErrorInDetails","hasOrderErrorInDetails","hasLargeFooter","closeDrawer","Drawer","onBack","renderContent","Products","memo","productBlocksRef","onCategoryInView","selectedProduct","setSelectedProduct","view","setView","LIST","views","List","GRID","handleSelectProduct","analyticsConstants.PRODUCT_DETAILS","observer","IntersectionObserver","viewportCenter","clientHeight","closestCategoryId","closestDistance","Infinity","entry","isIntersecting","rect","boundingClientRect","elementCenter","top","distanceToCenter","abs","getAttribute","threshold","categoryId","element","setAttribute","observe","disconnect","analyticsConstants.PRODUCT_VIEW_CHANGED","handleSelectView","categoryUtils.getCategoryTranslation","prevProps","nextProps","displayName","Branches","rootPath","onBranchSelect","Parent","clearRootPath","endsWith","branchUtils.normalizeRootPath","Container","list","venueName","branchUtils.getVenueName","ScrollToTop","zIndex","showGoTop","setShowGoTop","handleScroll","shouldShow","scrollY","addEventListener","removeEventListener","visible","ChevronUp","PhoneStep","formErrors","countryCodeOptions","viewConstants.SUPPORTED_COUNTRIES","setForm","baseUrl","handleChange","trimmedValue","trim","isNumber","updatedForm","preparedPhoneNumber","replaceAll","customerUtils.preparePhoneNumber","TEL","errorMessage","terms","OTPStep","OTPInput","onChangeOTP","inputMode","EmailStep","onCancel","email","setEmail","tAuth","newValue","EMAIL","HoursList","weight","isClosed","timeText","BranchBusinessHours","openingDays","deliveryDays","MODALS_MAP","MODALS_ADD_UPDATE_NOTES","noteContent","setNoteContent","tCommon","header","TEXT_AREA","MODALS_AUTH","otp","setFormErrors","currentStep","setCurrentStep","customerModels.CustomerAuthStep","PHONE","steps","OTP","completeAuth","goToNextStep","currentForm","inline","renderStep","isEmailStep","isEmailUnchanged","isEmailEmptyButPreviouslySet","validationErrors","viewUtils.validatePhoneNumber","checkIsValidEmail","customerUtils.validateForm","status","customerServices.verifyOTP","saveAuthToken","customerServices.update","MODALS_ADD_UPDATE_ADDRESS","initialCountryCode","floor","instructions","postCode","initalForm","addressId","adressError","defaultAdressText","closeModal","handleSelectGoogleSuggestion","suggestion","lat","long","customerUtils.validateAddressForm","AddressAutocomplete","origin","lng","placeHolder","inputLabel","TEXT","MODALS_BRANCH_BUSINESS_HOURS","BranchBusinessHoursUI","PublicMenu","categories","productMap","push","prepareCategoryAndProductMap","setSelectedCategoryId","canUserScroll","productBlock","block","scrollToProductBlock","handleCategoryInView","getCategoryNameById","analyticsConstants.CATEGORY_SCROLLED","handleCategoryFromURL","searchParams","URLSearchParams","search","categoryIdFromURL","get","categoryToSelect","PublicMenuWithContext","ModalProvider","modalsMap","EventsToolbar","currentGoal","setGoal","closeDropdownRef","getGoalTitle","goal","DropDown","action","actionSize","closeRef","menu","toolbarMenu","analyticsConstants.GOALS","DropDownMenuItem","toolbar","BarChart","PRICING","appetizer","mainCourse","chefsSpecial","lifeTime","ribbonText","PRICING_BENEFITS","APPETIZER","MAIN_COURSE","CHEFS_SPECIAL","LIFETIME","PricingPlanAmount","plan","interval","discountedPrice","subscriptionConstants.PRICING","intervalPrice","intervalPriceText","subscriptionModels.PlanType","originalPrice","Pricing","onPlanSelect","onIntervalSelect","selectedInterval","setSelectedInterval","plans","PlanParent","hasRibbon","commonProps","intervals","handleSelectInterval","benefits","moneyBack","ShieldDollar","subscriptionConstants.PRICING_BENEFITS","benefit"],"mappings":"mtCA0CO,SAASA,GAAOC,EAAGC,GACtB,IAAIC,EAAI,CAAA,EACR,IAAK,IAAIC,KAAKH,EAAOI,OAAOC,UAAUC,eAAeC,KAAKP,EAAGG,IAAMF,EAAEO,QAAQL,GAAK,IAC9ED,EAAEC,GAAKH,EAAEG,IACb,GAAS,MAALH,GAAqD,mBAAjCI,OAAOK,sBACtB,KAAIC,EAAI,EAAb,IAAgBP,EAAIC,OAAOK,sBAAsBT,GAAIU,EAAIP,EAAEQ,OAAQD,IAC3DT,EAAEO,QAAQL,EAAEO,IAAM,GAAKN,OAAOC,UAAUO,qBAAqBL,KAAKP,EAAGG,EAAEO,MACvER,EAAEC,EAAEO,IAAMV,EAAEG,EAAEO,IAF4B,CAItD,OAAOR,CACX,CA8DO,SAASW,GAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOrB,GAAKmB,EAAOnB,GAAO,CAC3F,SAASwB,EAASH,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOrB,GAAKmB,EAAOnB,GAAO,CAC9F,SAASsB,EAAKG,GAJlB,IAAeJ,EAIaI,EAAOC,KAAOR,EAAQO,EAAOJ,QAJ1CA,EAIyDI,EAAOJ,MAJ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