@ikas/storefront 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/build/__generated__/global-types.d.ts +1 -0
  2. package/build/api/cart/__generated__/getCart.d.ts +2 -2
  3. package/build/api/cart/__generated__/saveItemToCart.d.ts +2 -2
  4. package/build/api/checkout/__generated__/getCheckoutById.d.ts +10 -2
  5. package/build/api/checkout/__generated__/getOrder.d.ts +2 -2
  6. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +2 -2
  7. package/build/api/customer/__generated__/getCustomerOrders.d.ts +2 -2
  8. package/build/components/checkout/components/cart-summary/cart-item/index.d.ts +2 -0
  9. package/build/components/checkout/components/{cart-summary → svg}/arrow-down.d.ts +0 -0
  10. package/build/components/checkout/components/{arrow-left.d.ts → svg/arrow-left.d.ts} +0 -0
  11. package/build/components/checkout/components/{cart-summary → svg}/arrow-right.d.ts +0 -0
  12. package/build/components/checkout/components/{cart-summary → svg}/cross.d.ts +0 -0
  13. package/build/components/checkout/components/{cross.d.ts → svg/discount.d.ts} +2 -2
  14. package/build/components/checkout/components/{external.d.ts → svg/external.d.ts} +0 -0
  15. package/build/components/checkout/components/{cart-summary → svg}/gift.d.ts +0 -0
  16. package/build/components/checkout/components/{ikas.d.ts → svg/ikas.d.ts} +0 -0
  17. package/build/components/checkout/components/{lock.d.ts → svg/lock.d.ts} +0 -0
  18. package/build/components/checkout/components/{cart-summary → svg}/shopping-cart.d.ts +0 -0
  19. package/build/components/checkout/components/{success-circle.d.ts → svg/success-circle.d.ts} +0 -0
  20. package/build/components/checkout/components/{cart-summary → svg}/tag.d.ts +0 -0
  21. package/build/components/checkout/components/{warning.d.ts → svg/warning.d.ts} +0 -0
  22. package/build/components/checkout/model.d.ts +0 -1
  23. package/build/index.css +22 -0
  24. package/build/index.es.css +22 -0
  25. package/build/index.es.js +209 -2288
  26. package/build/index.js +209 -2296
  27. package/build/models/data/checkout/index.d.ts +4 -2
  28. package/build/models/data/order/index.d.ts +6 -0
  29. package/build/pages/index.d.ts +1 -11
  30. package/package.json +3 -9
  31. package/build/pages/api/getComponentDirs.d.ts +0 -3
  32. package/build/pages/api/getTheme.d.ts +0 -3
  33. package/build/pages/api/middleware.d.ts +0 -3
  34. package/build/pages/api/updateTheme.d.ts +0 -9
  35. package/build/pages/api/uploadTheme.d.ts +0 -3
package/build/index.es.js CHANGED
@@ -11,14 +11,6 @@ import NextImage from 'next/image';
11
11
  import Link from 'next/link';
12
12
  import dynamic from 'next/dynamic';
13
13
  import Error$1 from 'next/error';
14
- import Cors from 'cors';
15
- import archiver from 'archiver';
16
- import Stream from 'stream';
17
- import http from 'http';
18
- import Url from 'url';
19
- import https from 'https';
20
- import zlib from 'zlib';
21
- import axios from 'axios';
22
14
 
23
15
  /*! *****************************************************************************
24
16
  Copyright (c) Microsoft Corporation.
@@ -19962,7 +19954,9 @@ var IkasCheckout = /** @class */ (function () {
19962
19954
  this.shippingSettingsId = data.shippingSettingsId;
19963
19955
  this.shippingZoneRateId = data.shippingZoneRateId;
19964
19956
  this.availableShippingMethods = data.availableShippingMethods || [];
19965
- this.customer = data.customer;
19957
+ this.customer = data.customer
19958
+ ? new IkasCheckoutCustomer(data.customer)
19959
+ : null;
19966
19960
  this.billingAddress = data.billingAddress
19967
19961
  ? new IkasOrderAddress(data.billingAddress)
19968
19962
  : null;
@@ -19995,19 +19989,6 @@ var IkasCheckout = /** @class */ (function () {
19995
19989
  get: function () {
19996
19990
  var _a;
19997
19991
  return ((_a = this.cart) === null || _a === void 0 ? void 0 : _a.totalTax) || 0;
19998
- // const cartTotalTax =
19999
- // this.cart?.items.reduce((total, current) => total + current.tax, 0) || 0;
20000
- // const shippingTotalTax =
20001
- // this.shippingLines?.reduce(
20002
- // (total, current) => total + (current.taxValue || 0),
20003
- // 0
20004
- // ) || 0;
20005
- // const giftTotalTax =
20006
- // this.giftPackageLines?.reduce(
20007
- // (total, current) => total + (current.taxValue || 0),
20008
- // 0
20009
- // ) || 0;
20010
- // return cartTotalTax;
20011
19992
  },
20012
19993
  enumerable: false,
20013
19994
  configurable: true
@@ -20057,7 +20038,6 @@ var IkasCheckout = /** @class */ (function () {
20057
20038
  var newDate = new Date();
20058
20039
  newDate.setTime(parseFloat(this.updatedAt));
20059
20040
  return formatDate(newDate);
20060
- // return newDate.toLocaleString("en-GB");
20061
20041
  },
20062
20042
  enumerable: false,
20063
20043
  configurable: true
@@ -20096,6 +20076,17 @@ var IkasCheckout = /** @class */ (function () {
20096
20076
  });
20097
20077
  return IkasCheckout;
20098
20078
  }());
20079
+ var IkasCheckoutCustomer = /** @class */ (function () {
20080
+ function IkasCheckoutCustomer(data) {
20081
+ this.id = data.id || "";
20082
+ this.email = data.email || "";
20083
+ this.firstName = data.firstName || "";
20084
+ this.lastName = data.lastName || "";
20085
+ this.notificationsAccepted = data.notificationsAccepted || false;
20086
+ makeAutoObservable(this);
20087
+ }
20088
+ return IkasCheckoutCustomer;
20089
+ }());
20099
20090
  var IkasShippingMethod;
20100
20091
  (function (IkasShippingMethod) {
20101
20092
  IkasShippingMethod["CLICK_AND_COLLECT"] = "CLICK_AND_COLLECT";
@@ -23480,7 +23471,6 @@ var CheckoutViewModel = /** @class */ (function () {
23480
23471
  this.policyModalTitle = "";
23481
23472
  this.policyModalText = "";
23482
23473
  this.error = null;
23483
- this.customerConsentGranted = false;
23484
23474
  this.init = function () { return __awaiter(_this, void 0, void 0, function () {
23485
23475
  return __generator(this, function (_a) {
23486
23476
  switch (_a.label) {
@@ -23796,10 +23786,10 @@ var CheckoutViewModel = /** @class */ (function () {
23796
23786
  this.createCustomer = function () {
23797
23787
  if (_this.store.customerStore.customer) {
23798
23788
  _this.store.customerStore.customer.addresses.forEach(function (address) { return (address.checkoutSettings = _this.checkoutSettings); });
23799
- _this.checkout.customer = _this.store.customerStore.customer;
23789
+ _this.checkout.customer = new IkasCheckoutCustomer(_this.store.customerStore.customer);
23800
23790
  }
23801
23791
  else if (!_this.checkout.customer)
23802
- _this.checkout.customer = new IkasCustomer({});
23792
+ _this.checkout.customer = new IkasCheckoutCustomer({});
23803
23793
  };
23804
23794
  this.createShippingAddress = function () {
23805
23795
  var _a;
@@ -23920,7 +23910,9 @@ var CheckoutViewModel = /** @class */ (function () {
23920
23910
  var originalValue = value.split(" ").join("");
23921
23911
  if (originalValue.length > MAX_CARD_NUMBER_LENGTH)
23922
23912
  return;
23923
- if (oldOriginalValue.length < 6 && originalValue.length >= 6) {
23913
+ if (oldOriginalValue.length < 6 &&
23914
+ originalValue.length >= 6 &&
23915
+ !_this.installmentInfo) {
23924
23916
  _this.retrieveInstallmentInfo({
23925
23917
  binNumber: originalValue.slice(0, 6),
23926
23918
  paymentGatewayId: _this.checkout.selectedPaymentGateway.id,
@@ -24204,17 +24196,16 @@ var CheckoutViewModel = /** @class */ (function () {
24204
24196
  });
24205
24197
  }); };
24206
24198
  this.onCheckoutTransactionSuccess = function () { return __awaiter(_this, void 0, void 0, function () {
24207
- var _a;
24208
- return __generator(this, function (_b) {
24209
- switch (_b.label) {
24199
+ var _a, _b;
24200
+ return __generator(this, function (_c) {
24201
+ switch (_c.label) {
24210
24202
  case 0:
24211
24203
  localStorage.removeItem(USE_DIFFERENT_ADDRESS_KEY);
24212
- if (!(!this.checkout.hasCustomer && ((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.email) &&
24213
- this.customerConsentGranted)) return [3 /*break*/, 2];
24214
- return [4 /*yield*/, this.store.customerStore.createEmailSubscription(this.checkout.customer.email)];
24204
+ if (!((_a = this.checkout.customer) === null || _a === void 0 ? void 0 : _a.notificationsAccepted)) return [3 /*break*/, 2];
24205
+ return [4 /*yield*/, this.store.customerStore.createEmailSubscription(((_b = this.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "")];
24215
24206
  case 1:
24216
- _b.sent();
24217
- _b.label = 2;
24207
+ _c.sent();
24208
+ _c.label = 2;
24218
24209
  case 2:
24219
24210
  this.changeStep(CheckoutStep.SUCCESS);
24220
24211
  return [2 /*return*/];
@@ -24228,7 +24219,8 @@ var CheckoutViewModel = /** @class */ (function () {
24228
24219
  _this.changeStep(CheckoutStep.SHIPPING);
24229
24220
  };
24230
24221
  this.setCustomerConsentGranted = function (value) {
24231
- _this.customerConsentGranted = value;
24222
+ if (_this.checkout.customer)
24223
+ _this.checkout.customer.notificationsAccepted = value;
24232
24224
  };
24233
24225
  this.setUseDifferentAddress = function (value) {
24234
24226
  _this.useDifferentAddress = value;
@@ -41325,7 +41317,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41325
41317
  return __generator(this, function (_b) {
41326
41318
  switch (_b.label) {
41327
41319
  case 0:
41328
- QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "])));
41320
+ QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n notificationsAccepted\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n id\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n taxLines {\n price\n rate\n }\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n slug\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n appliedOrderLines {\n amount\n appliedQuantity\n orderLineId\n }\n }\n giftPackageLines {\n price\n taxValue\n }\n isGiftPackage\n giftPackageNote\n }\n }\n "])));
41329
41321
  _b.label = 1;
41330
41322
  case 1:
41331
41323
  _b.trys.push([1, 3, , 4]);
@@ -41455,6 +41447,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41455
41447
  email: (_b = checkout.customer) === null || _b === void 0 ? void 0 : _b.email,
41456
41448
  firstName: (_c = checkout.customer) === null || _c === void 0 ? void 0 : _c.firstName,
41457
41449
  lastName: (_d = checkout.customer) === null || _d === void 0 ? void 0 : _d.lastName,
41450
+ notificationsAccepted: checkout.customer.notificationsAccepted || false,
41458
41451
  }
41459
41452
  : null,
41460
41453
  note: checkout.note,
@@ -68829,6 +68822,8 @@ var AddressFormViewModel = /** @class */ (function () {
68829
68822
  _a.districts = _d.sent();
68830
68823
  if (this.districts.length)
68831
68824
  this.address.isDistrictRequired = true;
68825
+ else
68826
+ this.address.isDistrictRequired = false;
68832
68827
  return [3 /*break*/, 4];
68833
68828
  case 3:
68834
68829
  _d.sent();
@@ -69412,7 +69407,7 @@ var SaveAddressCheckboxAndTitle = observer(function (_a) {
69412
69407
  });
69413
69408
 
69414
69409
  var CheckoutStepInfo = function (_a) {
69415
- var _b, _c;
69410
+ var _b, _c, _d;
69416
69411
  var vm = _a.vm;
69417
69412
  var t = useTranslation().t;
69418
69413
  var onEmailChange = useCallback(function (value) {
@@ -69427,7 +69422,7 @@ var CheckoutStepInfo = function (_a) {
69427
69422
  createElement("div", { className: commonStyles.FormSectionTitle },
69428
69423
  createElement("div", { className: commonStyles.Title }, t("checkout-page:contactInfo"))),
69429
69424
  createElement(FormItem, { type: FormItemType.TEXT, inputType: FormItemInputType.EMAIL, label: t("checkout-page:email"), autocomplete: "email", value: ((_b = vm.checkout.customer) === null || _b === void 0 ? void 0 : _b.email) || "", onChange: onEmailChange, hasError: vm.isErrorsVisible && !((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.email), errorText: t("checkout-page:emailError"), tooltipText: t("checkout-page:guestEmailTooltip") }),
69430
- createElement(Checkbox, { value: vm.customerConsentGranted, label: t("checkout-page:customerConsentCta"), onChange: vm.setCustomerConsentGranted }))),
69425
+ createElement(Checkbox, { value: ((_d = vm.checkout.customer) === null || _d === void 0 ? void 0 : _d.notificationsAccepted) || false, label: t("checkout-page:customerConsentCta"), onChange: vm.setCustomerConsentGranted }))),
69431
69426
  createElement(CustomerAddresses$1, { vm: customerAddressesViewModel }),
69432
69427
  !customerAddressesViewModel.editingCustomerAddress && (createElement(Button, { style: {
69433
69428
  width: "100%",
@@ -69719,15 +69714,28 @@ var InputWithButton = function (_a) {
69719
69714
  };
69720
69715
  var InputWithButton$1 = observer(InputWithButton);
69721
69716
 
69722
- var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ"};
69717
+ var styles$e = {"CheckoutItem":"style-module_CheckoutItem__2JjSt","ImageContainer":"style-module_ImageContainer__2K2RG","Image":"style-module_Image__w2Q_P","Right":"style-module_Right__2HN2l","Name":"style-module_Name__nPgw1","LightText":"style-module_LightText__2P69D","Price":"style-module_Price__1Vw31","GrayPrice":"style-module_GrayPrice__2wDyJ","DiscountIcon":"style-module_DiscountIcon__39hOP","DiscountTooltip":"style-module_DiscountTooltip__2hO7z","DiscountAdjustment":"style-module_DiscountAdjustment__3QUlC"};
69718
+
69719
+ var SVGDiscount = function (_a) {
69720
+ var className = _a.className;
69721
+ return (createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className },
69722
+ createElement("circle", { cx: "8", cy: "8", r: "8", fill: "#CFCED3" }),
69723
+ createElement("path", { d: "M10.9167 5.08301L5.08334 10.9163", stroke: "white", "stroke-linecap": "square", "stroke-linejoin": "round" }),
69724
+ createElement("path", { d: "M5.70832 6.75033C6.28362 6.75033 6.74999 6.28396 6.74999 5.70866C6.74999 5.13336 6.28362 4.66699 5.70832 4.66699C5.13303 4.66699 4.66666 5.13336 4.66666 5.70866C4.66666 6.28396 5.13303 6.75033 5.70832 6.75033Z", fill: "white" }),
69725
+ createElement("path", { d: "M10.2917 11.3333C10.867 11.3333 11.3333 10.867 11.3333 10.2917C11.3333 9.71637 10.867 9.25 10.2917 9.25C9.71637 9.25 9.25 9.71637 9.25 10.2917C9.25 10.867 9.71637 11.3333 10.2917 11.3333Z", fill: "white" })));
69726
+ };
69723
69727
 
69724
69728
  var CartItem = observer(function (_a) {
69725
- var _b;
69726
- var currencyCode = _a.currencyCode, cartItem = _a.cartItem;
69729
+ var _b, _c;
69730
+ var vm = _a.vm, currencyCode = _a.currencyCode, cartItem = _a.cartItem;
69727
69731
  var t = useTranslation().t;
69732
+ var adjustments = (_b = vm.checkout.adjustments) === null || _b === void 0 ? void 0 : _b.filter(function (a) {
69733
+ return a.appliedOrderLines &&
69734
+ a.appliedOrderLines.some(function (aol) { return aol.orderLineId === cartItem.id; });
69735
+ });
69728
69736
  return (createElement("div", { className: styles$e.CheckoutItem },
69729
69737
  createElement("div", { className: styles$e.ImageContainer },
69730
- createElement("img", { className: styles$e.Image, src: (_b = cartItem.variant.mainImage) === null || _b === void 0 ? void 0 : _b.thumbnailSrc })),
69738
+ createElement("img", { className: styles$e.Image, src: (_c = cartItem.variant.mainImage) === null || _c === void 0 ? void 0 : _c.thumbnailSrc })),
69731
69739
  createElement("div", { className: styles$e.Right },
69732
69740
  createElement("div", { className: styles$e.Name }, cartItem.variant.name),
69733
69741
  createElement("div", { className: styles$e.LightText }, t("checkout-page:quantity") + ": " + cartItem.quantity),
@@ -69736,7 +69744,10 @@ var CartItem = observer(function (_a) {
69736
69744
  .join(" / ")),
69737
69745
  createElement("div", { className: styles$e.Price },
69738
69746
  !!cartItem.overridenPriceWithQuantity && (createElement("span", { className: styles$e.GrayPrice }, formatMoney(cartItem.overridenPriceWithQuantity, currencyCode))),
69739
- formatMoney(cartItem.finalPriceWithQuantity, currencyCode)))));
69747
+ formatMoney(cartItem.finalPriceWithQuantity, currencyCode),
69748
+ !!(adjustments === null || adjustments === void 0 ? void 0 : adjustments.length) && (createElement("div", { className: styles$e.DiscountIcon, tabIndex: Date.now() },
69749
+ createElement(SVGDiscount, null),
69750
+ createElement("div", { className: styles$e.DiscountTooltip }, adjustments === null || adjustments === void 0 ? void 0 : adjustments.map(function (adjustment, index) { return (createElement("div", { key: index }, adjustment.name + " (-" + formatMoney(adjustment.amount, currencyCode) + ")")); }))))))));
69740
69751
  });
69741
69752
 
69742
69753
  var styles$f = {"TooltipContainer":"style-module_TooltipContainer__1IW8v","Tooltip":"style-module_Tooltip__1Pxw6","TooltipArrow":"style-module_TooltipArrow__1l6q_","Top":"style-module_Top__1_7C6","Bottom":"style-module_Bottom__2qCpQ","Left":"style-module_Left__1T6gj","Right":"style-module_Right__uCMMF"};
@@ -69836,7 +69847,7 @@ var CartSummary = observer(function (_a) {
69836
69847
  createElement("div", { className: styles$g.DetailsContainer, style: detailsContainerStyle },
69837
69848
  createElement("div", { className: styles$g.Details, ref: setDetailsContainer }, cart === null || cart === void 0 ? void 0 :
69838
69849
  cart.items.map(function (item, index) { return (createElement("div", { key: index },
69839
- createElement(CartItem, { cartItem: item, currencyCode: cart.currencyCode }))); }),
69850
+ createElement(CartItem, { vm: vm, cartItem: item, currencyCode: cart.currencyCode }))); }),
69840
69851
  createElement("div", { className: styles$g.Divider }),
69841
69852
  createElement("div", { className: styles$g.SubTotalInfo },
69842
69853
  hasCouponError && (createElement("div", { className: styles$g.NotificationContainer },
@@ -70025,13 +70036,6 @@ var ExpandableSection = function (_a) {
70025
70036
  };
70026
70037
  var ExpandableSection$1 = observer(ExpandableSection);
70027
70038
 
70028
- var SVGCross$1 = function (_a) {
70029
- var className = _a.className;
70030
- return (createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", className: className },
70031
- createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
70032
- createElement("path", { fill: "currentColor", d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" })));
70033
- };
70034
-
70035
70039
  var styles$j = {"ModalContainer":"style-module_ModalContainer__3JCG6","Modal":"style-module_Modal__s3oha","ModalHeader":"style-module_ModalHeader__vEeDs","CloseButton":"style-module_CloseButton__3VdYY","ModalContent":"style-module_ModalContent__2jGi3"};
70036
70040
 
70037
70041
  var Modal = observer(function (_a) {
@@ -70052,7 +70056,7 @@ var Modal = observer(function (_a) {
70052
70056
  createElement("div", { className: styles$j.ModalHeader },
70053
70057
  createElement("div", null, title),
70054
70058
  createElement("div", { className: styles$j.CloseButton, onClick: onClose },
70055
- createElement(SVGCross$1, null))),
70059
+ createElement(SVGCross, null))),
70056
70060
  typeof modalContent === "string" ? (createElement("div", { className: styles$j.ModalContent, dangerouslySetInnerHTML: { __html: modalContent } })) : (createElement("div", { className: styles$j.ModalContent }, modalContent)))));
70057
70061
  });
70058
70062
 
@@ -70394,7 +70398,7 @@ var StockError = observer(function (_a) {
70394
70398
  data.map(function (item, index) {
70395
70399
  var _a;
70396
70400
  return (createElement("div", { key: index },
70397
- createElement(CartItem, { cartItem: item, currencyCode: ((_a = vm.checkout.cart) === null || _a === void 0 ? void 0 : _a.currencyCode) || "" })));
70401
+ createElement(CartItem, { vm: vm, cartItem: item, currencyCode: ((_a = vm.checkout.cart) === null || _a === void 0 ? void 0 : _a.currencyCode) || "" })));
70398
70402
  }),
70399
70403
  createElement("div", { className: styles$l.Actions },
70400
70404
  createElement(Button, { style: {
@@ -71583,1797 +71587,170 @@ var _slug_$3 = /*#__PURE__*/Object.freeze({
71583
71587
  getStaticProps: getStaticProps$h
71584
71588
  });
71585
71589
 
71586
- var cors = Cors();
71587
- function runMiddleware(req, res, fn) {
71588
- return new Promise(function (resolve, reject) {
71589
- fn(req, res, function (result) {
71590
- if (result instanceof Error) {
71591
- return reject(result);
71592
- }
71593
- return resolve(result);
71594
- });
71595
- });
71596
- }
71597
- function corsMiddleware(req, res) {
71598
- return runMiddleware(req, res, cors);
71599
- }
71600
-
71601
- var serverRuntimeConfig = getConfig().serverRuntimeConfig;
71602
- var componentsPath = path$1.join(serverRuntimeConfig.PROJECT_ROOT, "src", "components");
71603
- var getComponentDirs = function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
71604
- var componentDirNames;
71605
- return __generator(this, function (_a) {
71606
- switch (_a.label) {
71607
- case 0: return [4 /*yield*/, corsMiddleware(req, res)];
71608
- case 1:
71609
- _a.sent();
71610
- return [4 /*yield*/, getComponentDirNames()];
71611
- case 2:
71612
- componentDirNames = _a.sent();
71613
- res.statusCode = 200;
71614
- res.setHeader("Content-Type", "application/json");
71615
- res.json({
71616
- componentDirNames: componentDirNames.filter(function (name) { return name !== "__generated__"; }),
71617
- });
71618
- return [2 /*return*/];
71619
- }
71620
- });
71621
- }); };
71622
- var config = {};
71623
- function getComponentDirNames() {
71624
- return new Promise(function (resolve, reject) {
71625
- fs.readdir(componentsPath, function (err, files) {
71626
- if (err) {
71627
- return reject(err);
71628
- }
71629
- resolve(files.filter(function (file) {
71630
- return fs.lstatSync(path$1.join(componentsPath, file)).isDirectory();
71631
- }));
71632
- });
71633
- });
71634
- }
71635
-
71636
- var GetComponentDirs = /*#__PURE__*/Object.freeze({
71637
- __proto__: null,
71638
- getComponentDirs: getComponentDirs,
71639
- config: config
71640
- });
71641
-
71642
- var getTheme = function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
71643
- var theme;
71644
- return __generator(this, function (_a) {
71645
- switch (_a.label) {
71646
- case 0: return [4 /*yield*/, corsMiddleware(req, res)];
71647
- case 1:
71648
- _a.sent();
71649
- return [4 /*yield*/, _getTheme()];
71650
- case 2:
71651
- theme = _a.sent();
71652
- res.statusCode = 200;
71653
- res.setHeader("Content-Type", "application/json");
71654
- res.json({
71655
- theme: theme,
71656
- });
71657
- return [2 /*return*/];
71658
- }
71659
- });
71660
- }); };
71661
- var config$1 = {};
71662
- function _getTheme() {
71663
- return new Promise(function (resolve, reject) {
71664
- var serverRuntimeConfig = getConfig().serverRuntimeConfig;
71665
- var themePath = path$1.join(serverRuntimeConfig.PROJECT_ROOT, "src", "theme.json");
71666
- fs.readFile(themePath, {
71667
- flag: "a+",
71668
- }, function (err, file) {
71669
- if (err) {
71670
- return reject(err);
71671
- }
71672
- var result = file.length ? JSON.parse(file.toString()) : {};
71673
- resolve(result);
71674
- });
71675
- });
71676
- }
71677
-
71678
- var GetTheme = /*#__PURE__*/Object.freeze({
71679
- __proto__: null,
71680
- getTheme: getTheme,
71681
- config: config$1
71682
- });
71683
-
71684
- var serverRuntimeConfig$1 = getConfig().serverRuntimeConfig;
71685
- var updateTheme = function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
71686
- var theme;
71687
- return __generator(this, function (_a) {
71688
- switch (_a.label) {
71689
- case 0: return [4 /*yield*/, corsMiddleware(req, res)];
71690
- case 1:
71691
- _a.sent();
71692
- theme = req.body;
71693
- fs.writeFileSync(path$1.join(serverRuntimeConfig$1.PROJECT_ROOT, "src", "theme.json"), JSON.stringify(theme, null, 2));
71694
- saveCssFile(theme);
71695
- saveComponentsFile(theme);
71696
- res.statusCode = 200;
71697
- res.setHeader("Content-Type", "application/json");
71698
- res.end();
71699
- return [2 /*return*/];
71700
- }
71701
- });
71702
- }); };
71703
- var config$2 = {
71704
- api: {
71705
- bodyParser: {
71706
- sizeLimit: "50mb",
71707
- },
71708
- },
71709
- };
71710
- function saveCssFile(theme) {
71711
- var themeCss = ":root { \r\n";
71712
- theme.settings.colors.map(function (sc) { return (themeCss += sc.key + ": " + sc.color + "; \r\n"); });
71713
- themeCss += " }";
71714
- var generatedFolderPath = path$1.join(serverRuntimeConfig$1.PROJECT_ROOT, "src/styles");
71715
- if (!fs.existsSync(generatedFolderPath)) {
71716
- fs.mkdirSync(generatedFolderPath);
71717
- }
71718
- fs.writeFileSync(path$1.join(generatedFolderPath, "ikas-styles.css"), themeCss);
71719
- }
71720
- function saveComponentsFile(theme) {
71721
- var fileStr = "";
71722
- fileStr += "\r\n";
71723
- var components = theme.components.filter(function (tc) { return tc.id !== "checkout"; });
71724
- // Component imports
71725
- components
71726
- .filter(function (c) { return c.id !== "checkout"; })
71727
- .forEach(function (component, index) {
71728
- fileStr += "import Component" + index + " from \"../" + component.dir + "\" \r\n";
71729
- });
71730
- fileStr += "\r\n";
71731
- fileStr += "\nconst Components = {\n " + components.map(function (component, index) { return "\"" + component.id + "\": Component" + index; }) + "\n};\n ";
71732
- fileStr += "\r\n";
71733
- fileStr += "\r\n";
71734
- fileStr += "export default Components;";
71735
- var generatedFolderPath = path$1.join(serverRuntimeConfig$1.PROJECT_ROOT, "src", "components", "__generated__");
71736
- if (!fs.existsSync(generatedFolderPath)) {
71737
- fs.mkdirSync(generatedFolderPath);
71738
- }
71739
- fs.writeFileSync(path$1.join(generatedFolderPath, "index.js"), fileStr);
71740
- }
71741
-
71742
- var UpdateTheme = /*#__PURE__*/Object.freeze({
71743
- __proto__: null,
71744
- updateTheme: updateTheme,
71745
- config: config$2
71746
- });
71747
-
71748
- // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
71749
-
71750
- // fix for "Readable" isn't a named export issue
71751
- const Readable = Stream.Readable;
71752
-
71753
- const BUFFER = Symbol('buffer');
71754
- const TYPE = Symbol('type');
71755
-
71756
- class Blob {
71757
- constructor() {
71758
- this[TYPE] = '';
71759
-
71760
- const blobParts = arguments[0];
71761
- const options = arguments[1];
71762
-
71763
- const buffers = [];
71764
- let size = 0;
71765
-
71766
- if (blobParts) {
71767
- const a = blobParts;
71768
- const length = Number(a.length);
71769
- for (let i = 0; i < length; i++) {
71770
- const element = a[i];
71771
- let buffer;
71772
- if (element instanceof Buffer) {
71773
- buffer = element;
71774
- } else if (ArrayBuffer.isView(element)) {
71775
- buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
71776
- } else if (element instanceof ArrayBuffer) {
71777
- buffer = Buffer.from(element);
71778
- } else if (element instanceof Blob) {
71779
- buffer = element[BUFFER];
71780
- } else {
71781
- buffer = Buffer.from(typeof element === 'string' ? element : String(element));
71782
- }
71783
- size += buffer.length;
71784
- buffers.push(buffer);
71785
- }
71786
- }
71787
-
71788
- this[BUFFER] = Buffer.concat(buffers);
71789
-
71790
- let type = options && options.type !== undefined && String(options.type).toLowerCase();
71791
- if (type && !/[^\u0020-\u007E]/.test(type)) {
71792
- this[TYPE] = type;
71793
- }
71794
- }
71795
- get size() {
71796
- return this[BUFFER].length;
71797
- }
71798
- get type() {
71799
- return this[TYPE];
71800
- }
71801
- text() {
71802
- return Promise.resolve(this[BUFFER].toString());
71803
- }
71804
- arrayBuffer() {
71805
- const buf = this[BUFFER];
71806
- const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
71807
- return Promise.resolve(ab);
71808
- }
71809
- stream() {
71810
- const readable = new Readable();
71811
- readable._read = function () {};
71812
- readable.push(this[BUFFER]);
71813
- readable.push(null);
71814
- return readable;
71815
- }
71816
- toString() {
71817
- return '[object Blob]';
71818
- }
71819
- slice() {
71820
- const size = this.size;
71821
-
71822
- const start = arguments[0];
71823
- const end = arguments[1];
71824
- let relativeStart, relativeEnd;
71825
- if (start === undefined) {
71826
- relativeStart = 0;
71827
- } else if (start < 0) {
71828
- relativeStart = Math.max(size + start, 0);
71829
- } else {
71830
- relativeStart = Math.min(start, size);
71831
- }
71832
- if (end === undefined) {
71833
- relativeEnd = size;
71834
- } else if (end < 0) {
71835
- relativeEnd = Math.max(size + end, 0);
71836
- } else {
71837
- relativeEnd = Math.min(end, size);
71838
- }
71839
- const span = Math.max(relativeEnd - relativeStart, 0);
71840
-
71841
- const buffer = this[BUFFER];
71842
- const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
71843
- const blob = new Blob([], { type: arguments[2] });
71844
- blob[BUFFER] = slicedBuffer;
71845
- return blob;
71846
- }
71847
- }
71848
-
71849
- Object.defineProperties(Blob.prototype, {
71850
- size: { enumerable: true },
71851
- type: { enumerable: true },
71852
- slice: { enumerable: true }
71853
- });
71854
-
71855
- Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
71856
- value: 'Blob',
71857
- writable: false,
71858
- enumerable: false,
71859
- configurable: true
71860
- });
71861
-
71862
- /**
71863
- * fetch-error.js
71864
- *
71865
- * FetchError interface for operational errors
71866
- */
71867
-
71868
- /**
71869
- * Create FetchError instance
71870
- *
71871
- * @param String message Error message for human
71872
- * @param String type Error type for machine
71873
- * @param String systemError For Node.js system error
71874
- * @return FetchError
71875
- */
71876
- function FetchError(message, type, systemError) {
71877
- Error.call(this, message);
71878
-
71879
- this.message = message;
71880
- this.type = type;
71881
-
71882
- // when err.type is `system`, err.code contains system error code
71883
- if (systemError) {
71884
- this.code = this.errno = systemError.code;
71885
- }
71886
-
71887
- // hide custom error implementation details from end-users
71888
- Error.captureStackTrace(this, this.constructor);
71889
- }
71890
-
71891
- FetchError.prototype = Object.create(Error.prototype);
71892
- FetchError.prototype.constructor = FetchError;
71893
- FetchError.prototype.name = 'FetchError';
71894
-
71895
- let convert;
71896
- try {
71897
- convert = require('encoding').convert;
71898
- } catch (e) {}
71899
-
71900
- const INTERNALS = Symbol('Body internals');
71901
-
71902
- // fix an issue where "PassThrough" isn't a named export for node <10
71903
- const PassThrough = Stream.PassThrough;
71904
-
71905
- /**
71906
- * Body mixin
71907
- *
71908
- * Ref: https://fetch.spec.whatwg.org/#body
71909
- *
71910
- * @param Stream body Readable stream
71911
- * @param Object opts Response options
71912
- * @return Void
71913
- */
71914
- function Body(body) {
71915
- var _this = this;
71916
-
71917
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
71918
- _ref$size = _ref.size;
71919
-
71920
- let size = _ref$size === undefined ? 0 : _ref$size;
71921
- var _ref$timeout = _ref.timeout;
71922
- let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
71923
-
71924
- if (body == null) {
71925
- // body is undefined or null
71926
- body = null;
71927
- } else if (isURLSearchParams(body)) {
71928
- // body is a URLSearchParams
71929
- body = Buffer.from(body.toString());
71930
- } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
71931
- // body is ArrayBuffer
71932
- body = Buffer.from(body);
71933
- } else if (ArrayBuffer.isView(body)) {
71934
- // body is ArrayBufferView
71935
- body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
71936
- } else if (body instanceof Stream) ; else {
71937
- // none of the above
71938
- // coerce to string then buffer
71939
- body = Buffer.from(String(body));
71940
- }
71941
- this[INTERNALS] = {
71942
- body,
71943
- disturbed: false,
71944
- error: null
71945
- };
71946
- this.size = size;
71947
- this.timeout = timeout;
71948
-
71949
- if (body instanceof Stream) {
71950
- body.on('error', function (err) {
71951
- const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
71952
- _this[INTERNALS].error = error;
71953
- });
71954
- }
71955
- }
71956
-
71957
- Body.prototype = {
71958
- get body() {
71959
- return this[INTERNALS].body;
71960
- },
71961
-
71962
- get bodyUsed() {
71963
- return this[INTERNALS].disturbed;
71964
- },
71965
-
71966
- /**
71967
- * Decode response as ArrayBuffer
71968
- *
71969
- * @return Promise
71970
- */
71971
- arrayBuffer() {
71972
- return consumeBody.call(this).then(function (buf) {
71973
- return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
71974
- });
71975
- },
71976
-
71977
- /**
71978
- * Return raw response as Blob
71979
- *
71980
- * @return Promise
71981
- */
71982
- blob() {
71983
- let ct = this.headers && this.headers.get('content-type') || '';
71984
- return consumeBody.call(this).then(function (buf) {
71985
- return Object.assign(
71986
- // Prevent copying
71987
- new Blob([], {
71988
- type: ct.toLowerCase()
71989
- }), {
71990
- [BUFFER]: buf
71991
- });
71992
- });
71993
- },
71994
-
71995
- /**
71996
- * Decode response as json
71997
- *
71998
- * @return Promise
71999
- */
72000
- json() {
72001
- var _this2 = this;
72002
-
72003
- return consumeBody.call(this).then(function (buffer) {
72004
- try {
72005
- return JSON.parse(buffer.toString());
72006
- } catch (err) {
72007
- return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
72008
- }
72009
- });
72010
- },
72011
-
72012
- /**
72013
- * Decode response as text
72014
- *
72015
- * @return Promise
72016
- */
72017
- text() {
72018
- return consumeBody.call(this).then(function (buffer) {
72019
- return buffer.toString();
72020
- });
72021
- },
72022
-
72023
- /**
72024
- * Decode response as buffer (non-spec api)
72025
- *
72026
- * @return Promise
72027
- */
72028
- buffer() {
72029
- return consumeBody.call(this);
72030
- },
72031
-
72032
- /**
72033
- * Decode response as text, while automatically detecting the encoding and
72034
- * trying to decode to UTF-8 (non-spec api)
72035
- *
72036
- * @return Promise
72037
- */
72038
- textConverted() {
72039
- var _this3 = this;
72040
-
72041
- return consumeBody.call(this).then(function (buffer) {
72042
- return convertBody(buffer, _this3.headers);
72043
- });
72044
- }
72045
- };
72046
-
72047
- // In browsers, all properties are enumerable.
72048
- Object.defineProperties(Body.prototype, {
72049
- body: { enumerable: true },
72050
- bodyUsed: { enumerable: true },
72051
- arrayBuffer: { enumerable: true },
72052
- blob: { enumerable: true },
72053
- json: { enumerable: true },
72054
- text: { enumerable: true }
72055
- });
72056
-
72057
- Body.mixIn = function (proto) {
72058
- for (const name of Object.getOwnPropertyNames(Body.prototype)) {
72059
- // istanbul ignore else: future proof
72060
- if (!(name in proto)) {
72061
- const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
72062
- Object.defineProperty(proto, name, desc);
72063
- }
72064
- }
72065
- };
72066
-
72067
- /**
72068
- * Consume and convert an entire Body to a Buffer.
72069
- *
72070
- * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
72071
- *
72072
- * @return Promise
72073
- */
72074
- function consumeBody() {
72075
- var _this4 = this;
72076
-
72077
- if (this[INTERNALS].disturbed) {
72078
- return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
72079
- }
72080
-
72081
- this[INTERNALS].disturbed = true;
72082
-
72083
- if (this[INTERNALS].error) {
72084
- return Body.Promise.reject(this[INTERNALS].error);
72085
- }
72086
-
72087
- let body = this.body;
72088
-
72089
- // body is null
72090
- if (body === null) {
72091
- return Body.Promise.resolve(Buffer.alloc(0));
72092
- }
72093
-
72094
- // body is blob
72095
- if (isBlob(body)) {
72096
- body = body.stream();
72097
- }
72098
-
72099
- // body is buffer
72100
- if (Buffer.isBuffer(body)) {
72101
- return Body.Promise.resolve(body);
72102
- }
72103
-
72104
- // istanbul ignore if: should never happen
72105
- if (!(body instanceof Stream)) {
72106
- return Body.Promise.resolve(Buffer.alloc(0));
72107
- }
72108
-
72109
- // body is stream
72110
- // get ready to actually consume the body
72111
- let accum = [];
72112
- let accumBytes = 0;
72113
- let abort = false;
72114
-
72115
- return new Body.Promise(function (resolve, reject) {
72116
- let resTimeout;
72117
-
72118
- // allow timeout on slow response body
72119
- if (_this4.timeout) {
72120
- resTimeout = setTimeout(function () {
72121
- abort = true;
72122
- reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
72123
- }, _this4.timeout);
72124
- }
72125
-
72126
- // handle stream errors
72127
- body.on('error', function (err) {
72128
- if (err.name === 'AbortError') {
72129
- // if the request was aborted, reject with this Error
72130
- abort = true;
72131
- reject(err);
72132
- } else {
72133
- // other errors, such as incorrect content-encoding
72134
- reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
72135
- }
72136
- });
72137
-
72138
- body.on('data', function (chunk) {
72139
- if (abort || chunk === null) {
72140
- return;
72141
- }
72142
-
72143
- if (_this4.size && accumBytes + chunk.length > _this4.size) {
72144
- abort = true;
72145
- reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
72146
- return;
72147
- }
72148
-
72149
- accumBytes += chunk.length;
72150
- accum.push(chunk);
72151
- });
72152
-
72153
- body.on('end', function () {
72154
- if (abort) {
72155
- return;
72156
- }
72157
-
72158
- clearTimeout(resTimeout);
72159
-
72160
- try {
72161
- resolve(Buffer.concat(accum, accumBytes));
72162
- } catch (err) {
72163
- // handle streams that have accumulated too much data (issue #414)
72164
- reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
72165
- }
72166
- });
72167
- });
72168
- }
72169
-
72170
- /**
72171
- * Detect buffer encoding and convert to target encoding
72172
- * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
72173
- *
72174
- * @param Buffer buffer Incoming buffer
72175
- * @param String encoding Target encoding
72176
- * @return String
72177
- */
72178
- function convertBody(buffer, headers) {
72179
- if (typeof convert !== 'function') {
72180
- throw new Error('The package `encoding` must be installed to use the textConverted() function');
72181
- }
72182
-
72183
- const ct = headers.get('content-type');
72184
- let charset = 'utf-8';
72185
- let res, str;
72186
-
72187
- // header
72188
- if (ct) {
72189
- res = /charset=([^;]*)/i.exec(ct);
72190
- }
72191
-
72192
- // no charset in content type, peek at response body for at most 1024 bytes
72193
- str = buffer.slice(0, 1024).toString();
72194
-
72195
- // html5
72196
- if (!res && str) {
72197
- res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
72198
- }
72199
-
72200
- // html4
72201
- if (!res && str) {
72202
- res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
72203
- if (!res) {
72204
- res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
72205
- if (res) {
72206
- res.pop(); // drop last quote
72207
- }
72208
- }
72209
-
72210
- if (res) {
72211
- res = /charset=(.*)/i.exec(res.pop());
72212
- }
72213
- }
72214
-
72215
- // xml
72216
- if (!res && str) {
72217
- res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
72218
- }
72219
-
72220
- // found charset
72221
- if (res) {
72222
- charset = res.pop();
72223
-
72224
- // prevent decode issues when sites use incorrect encoding
72225
- // ref: https://hsivonen.fi/encoding-menu/
72226
- if (charset === 'gb2312' || charset === 'gbk') {
72227
- charset = 'gb18030';
72228
- }
72229
- }
72230
-
72231
- // turn raw buffers into a single utf-8 buffer
72232
- return convert(buffer, 'UTF-8', charset).toString();
72233
- }
72234
-
72235
- /**
72236
- * Detect a URLSearchParams object
72237
- * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
72238
- *
72239
- * @param Object obj Object to detect by type or brand
72240
- * @return String
72241
- */
72242
- function isURLSearchParams(obj) {
72243
- // Duck-typing as a necessary condition.
72244
- if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
72245
- return false;
72246
- }
72247
-
72248
- // Brand-checking and more duck-typing as optional condition.
72249
- return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
72250
- }
72251
-
72252
- /**
72253
- * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
72254
- * @param {*} obj
72255
- * @return {boolean}
72256
- */
72257
- function isBlob(obj) {
72258
- return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
72259
- }
72260
-
72261
- /**
72262
- * Clone body given Res/Req instance
72263
- *
72264
- * @param Mixed instance Response or Request instance
72265
- * @return Mixed
72266
- */
72267
- function clone(instance) {
72268
- let p1, p2;
72269
- let body = instance.body;
72270
-
72271
- // don't allow cloning a used body
72272
- if (instance.bodyUsed) {
72273
- throw new Error('cannot clone body after it is used');
72274
- }
72275
-
72276
- // check that body is a stream and not form-data object
72277
- // note: we can't clone the form-data object without having it as a dependency
72278
- if (body instanceof Stream && typeof body.getBoundary !== 'function') {
72279
- // tee instance body
72280
- p1 = new PassThrough();
72281
- p2 = new PassThrough();
72282
- body.pipe(p1);
72283
- body.pipe(p2);
72284
- // set instance body to teed body and return the other teed body
72285
- instance[INTERNALS].body = p1;
72286
- body = p2;
72287
- }
72288
-
72289
- return body;
72290
- }
72291
-
72292
- /**
72293
- * Performs the operation "extract a `Content-Type` value from |object|" as
72294
- * specified in the specification:
72295
- * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
72296
- *
72297
- * This function assumes that instance.body is present.
72298
- *
72299
- * @param Mixed instance Any options.body input
72300
- */
72301
- function extractContentType(body) {
72302
- if (body === null) {
72303
- // body is null
72304
- return null;
72305
- } else if (typeof body === 'string') {
72306
- // body is string
72307
- return 'text/plain;charset=UTF-8';
72308
- } else if (isURLSearchParams(body)) {
72309
- // body is a URLSearchParams
72310
- return 'application/x-www-form-urlencoded;charset=UTF-8';
72311
- } else if (isBlob(body)) {
72312
- // body is blob
72313
- return body.type || null;
72314
- } else if (Buffer.isBuffer(body)) {
72315
- // body is buffer
72316
- return null;
72317
- } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
72318
- // body is ArrayBuffer
72319
- return null;
72320
- } else if (ArrayBuffer.isView(body)) {
72321
- // body is ArrayBufferView
72322
- return null;
72323
- } else if (typeof body.getBoundary === 'function') {
72324
- // detect form data input from form-data module
72325
- return `multipart/form-data;boundary=${body.getBoundary()}`;
72326
- } else if (body instanceof Stream) {
72327
- // body is stream
72328
- // can't really do much about this
72329
- return null;
72330
- } else {
72331
- // Body constructor defaults other things to string
72332
- return 'text/plain;charset=UTF-8';
72333
- }
72334
- }
72335
-
72336
- /**
72337
- * The Fetch Standard treats this as if "total bytes" is a property on the body.
72338
- * For us, we have to explicitly get it with a function.
72339
- *
72340
- * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
72341
- *
72342
- * @param Body instance Instance of Body
72343
- * @return Number? Number of bytes, or null if not possible
72344
- */
72345
- function getTotalBytes(instance) {
72346
- const body = instance.body;
72347
-
72348
-
72349
- if (body === null) {
72350
- // body is null
72351
- return 0;
72352
- } else if (isBlob(body)) {
72353
- return body.size;
72354
- } else if (Buffer.isBuffer(body)) {
72355
- // body is buffer
72356
- return body.length;
72357
- } else if (body && typeof body.getLengthSync === 'function') {
72358
- // detect form data input from form-data module
72359
- if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
72360
- body.hasKnownLength && body.hasKnownLength()) {
72361
- // 2.x
72362
- return body.getLengthSync();
72363
- }
72364
- return null;
72365
- } else {
72366
- // body is stream
72367
- return null;
72368
- }
72369
- }
72370
-
72371
- /**
72372
- * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
72373
- *
72374
- * @param Body instance Instance of Body
72375
- * @return Void
72376
- */
72377
- function writeToStream(dest, instance) {
72378
- const body = instance.body;
72379
-
72380
-
72381
- if (body === null) {
72382
- // body is null
72383
- dest.end();
72384
- } else if (isBlob(body)) {
72385
- body.stream().pipe(dest);
72386
- } else if (Buffer.isBuffer(body)) {
72387
- // body is buffer
72388
- dest.write(body);
72389
- dest.end();
72390
- } else {
72391
- // body is stream
72392
- body.pipe(dest);
72393
- }
72394
- }
72395
-
72396
- // expose Promise
72397
- Body.Promise = global.Promise;
72398
-
72399
- /**
72400
- * headers.js
72401
- *
72402
- * Headers class offers convenient helpers
72403
- */
72404
-
72405
- const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
72406
- const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
72407
-
72408
- function validateName(name) {
72409
- name = `${name}`;
72410
- if (invalidTokenRegex.test(name) || name === '') {
72411
- throw new TypeError(`${name} is not a legal HTTP header name`);
72412
- }
72413
- }
72414
-
72415
- function validateValue(value) {
72416
- value = `${value}`;
72417
- if (invalidHeaderCharRegex.test(value)) {
72418
- throw new TypeError(`${value} is not a legal HTTP header value`);
72419
- }
72420
- }
72421
-
72422
- /**
72423
- * Find the key in the map object given a header name.
72424
- *
72425
- * Returns undefined if not found.
72426
- *
72427
- * @param String name Header name
72428
- * @return String|Undefined
72429
- */
72430
- function find(map, name) {
72431
- name = name.toLowerCase();
72432
- for (const key in map) {
72433
- if (key.toLowerCase() === name) {
72434
- return key;
72435
- }
72436
- }
72437
- return undefined;
72438
- }
72439
-
72440
- const MAP = Symbol('map');
72441
- class Headers {
72442
- /**
72443
- * Headers class
72444
- *
72445
- * @param Object headers Response headers
72446
- * @return Void
72447
- */
72448
- constructor() {
72449
- let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
72450
-
72451
- this[MAP] = Object.create(null);
72452
-
72453
- if (init instanceof Headers) {
72454
- const rawHeaders = init.raw();
72455
- const headerNames = Object.keys(rawHeaders);
72456
-
72457
- for (const headerName of headerNames) {
72458
- for (const value of rawHeaders[headerName]) {
72459
- this.append(headerName, value);
72460
- }
72461
- }
72462
-
72463
- return;
72464
- }
72465
-
72466
- // We don't worry about converting prop to ByteString here as append()
72467
- // will handle it.
72468
- if (init == null) ; else if (typeof init === 'object') {
72469
- const method = init[Symbol.iterator];
72470
- if (method != null) {
72471
- if (typeof method !== 'function') {
72472
- throw new TypeError('Header pairs must be iterable');
72473
- }
72474
-
72475
- // sequence<sequence<ByteString>>
72476
- // Note: per spec we have to first exhaust the lists then process them
72477
- const pairs = [];
72478
- for (const pair of init) {
72479
- if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
72480
- throw new TypeError('Each header pair must be iterable');
72481
- }
72482
- pairs.push(Array.from(pair));
72483
- }
72484
-
72485
- for (const pair of pairs) {
72486
- if (pair.length !== 2) {
72487
- throw new TypeError('Each header pair must be a name/value tuple');
72488
- }
72489
- this.append(pair[0], pair[1]);
72490
- }
72491
- } else {
72492
- // record<ByteString, ByteString>
72493
- for (const key of Object.keys(init)) {
72494
- const value = init[key];
72495
- this.append(key, value);
72496
- }
72497
- }
72498
- } else {
72499
- throw new TypeError('Provided initializer must be an object');
72500
- }
72501
- }
72502
-
72503
- /**
72504
- * Return combined header value given name
72505
- *
72506
- * @param String name Header name
72507
- * @return Mixed
72508
- */
72509
- get(name) {
72510
- name = `${name}`;
72511
- validateName(name);
72512
- const key = find(this[MAP], name);
72513
- if (key === undefined) {
72514
- return null;
72515
- }
72516
-
72517
- return this[MAP][key].join(', ');
72518
- }
72519
-
72520
- /**
72521
- * Iterate over all headers
72522
- *
72523
- * @param Function callback Executed for each item with parameters (value, name, thisArg)
72524
- * @param Boolean thisArg `this` context for callback function
72525
- * @return Void
72526
- */
72527
- forEach(callback) {
72528
- let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
72529
-
72530
- let pairs = getHeaders(this);
72531
- let i = 0;
72532
- while (i < pairs.length) {
72533
- var _pairs$i = pairs[i];
72534
- const name = _pairs$i[0],
72535
- value = _pairs$i[1];
72536
-
72537
- callback.call(thisArg, value, name, this);
72538
- pairs = getHeaders(this);
72539
- i++;
72540
- }
72541
- }
72542
-
72543
- /**
72544
- * Overwrite header values given name
72545
- *
72546
- * @param String name Header name
72547
- * @param String value Header value
72548
- * @return Void
72549
- */
72550
- set(name, value) {
72551
- name = `${name}`;
72552
- value = `${value}`;
72553
- validateName(name);
72554
- validateValue(value);
72555
- const key = find(this[MAP], name);
72556
- this[MAP][key !== undefined ? key : name] = [value];
72557
- }
72558
-
72559
- /**
72560
- * Append a value onto existing header
72561
- *
72562
- * @param String name Header name
72563
- * @param String value Header value
72564
- * @return Void
72565
- */
72566
- append(name, value) {
72567
- name = `${name}`;
72568
- value = `${value}`;
72569
- validateName(name);
72570
- validateValue(value);
72571
- const key = find(this[MAP], name);
72572
- if (key !== undefined) {
72573
- this[MAP][key].push(value);
72574
- } else {
72575
- this[MAP][name] = [value];
72576
- }
72577
- }
72578
-
72579
- /**
72580
- * Check for header name existence
72581
- *
72582
- * @param String name Header name
72583
- * @return Boolean
72584
- */
72585
- has(name) {
72586
- name = `${name}`;
72587
- validateName(name);
72588
- return find(this[MAP], name) !== undefined;
72589
- }
72590
-
72591
- /**
72592
- * Delete all header values given name
72593
- *
72594
- * @param String name Header name
72595
- * @return Void
72596
- */
72597
- delete(name) {
72598
- name = `${name}`;
72599
- validateName(name);
72600
- const key = find(this[MAP], name);
72601
- if (key !== undefined) {
72602
- delete this[MAP][key];
72603
- }
72604
- }
72605
-
72606
- /**
72607
- * Return raw headers (non-spec api)
72608
- *
72609
- * @return Object
72610
- */
72611
- raw() {
72612
- return this[MAP];
72613
- }
72614
-
72615
- /**
72616
- * Get an iterator on keys.
72617
- *
72618
- * @return Iterator
72619
- */
72620
- keys() {
72621
- return createHeadersIterator(this, 'key');
72622
- }
72623
-
72624
- /**
72625
- * Get an iterator on values.
72626
- *
72627
- * @return Iterator
72628
- */
72629
- values() {
72630
- return createHeadersIterator(this, 'value');
72631
- }
72632
-
72633
- /**
72634
- * Get an iterator on entries.
72635
- *
72636
- * This is the default iterator of the Headers object.
72637
- *
72638
- * @return Iterator
72639
- */
72640
- [Symbol.iterator]() {
72641
- return createHeadersIterator(this, 'key+value');
72642
- }
72643
- }
72644
- Headers.prototype.entries = Headers.prototype[Symbol.iterator];
72645
-
72646
- Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
72647
- value: 'Headers',
72648
- writable: false,
72649
- enumerable: false,
72650
- configurable: true
72651
- });
72652
-
72653
- Object.defineProperties(Headers.prototype, {
72654
- get: { enumerable: true },
72655
- forEach: { enumerable: true },
72656
- set: { enumerable: true },
72657
- append: { enumerable: true },
72658
- has: { enumerable: true },
72659
- delete: { enumerable: true },
72660
- keys: { enumerable: true },
72661
- values: { enumerable: true },
72662
- entries: { enumerable: true }
72663
- });
72664
-
72665
- function getHeaders(headers) {
72666
- let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
72667
-
72668
- const keys = Object.keys(headers[MAP]).sort();
72669
- return keys.map(kind === 'key' ? function (k) {
72670
- return k.toLowerCase();
72671
- } : kind === 'value' ? function (k) {
72672
- return headers[MAP][k].join(', ');
72673
- } : function (k) {
72674
- return [k.toLowerCase(), headers[MAP][k].join(', ')];
72675
- });
72676
- }
72677
-
72678
- const INTERNAL = Symbol('internal');
72679
-
72680
- function createHeadersIterator(target, kind) {
72681
- const iterator = Object.create(HeadersIteratorPrototype);
72682
- iterator[INTERNAL] = {
72683
- target,
72684
- kind,
72685
- index: 0
72686
- };
72687
- return iterator;
72688
- }
72689
-
72690
- const HeadersIteratorPrototype = Object.setPrototypeOf({
72691
- next() {
72692
- // istanbul ignore if
72693
- if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
72694
- throw new TypeError('Value of `this` is not a HeadersIterator');
72695
- }
72696
-
72697
- var _INTERNAL = this[INTERNAL];
72698
- const target = _INTERNAL.target,
72699
- kind = _INTERNAL.kind,
72700
- index = _INTERNAL.index;
72701
-
72702
- const values = getHeaders(target, kind);
72703
- const len = values.length;
72704
- if (index >= len) {
72705
- return {
72706
- value: undefined,
72707
- done: true
72708
- };
72709
- }
72710
-
72711
- this[INTERNAL].index = index + 1;
72712
-
72713
- return {
72714
- value: values[index],
72715
- done: false
72716
- };
72717
- }
72718
- }, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
72719
-
72720
- Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
72721
- value: 'HeadersIterator',
72722
- writable: false,
72723
- enumerable: false,
72724
- configurable: true
72725
- });
72726
-
72727
- /**
72728
- * Export the Headers object in a form that Node.js can consume.
72729
- *
72730
- * @param Headers headers
72731
- * @return Object
72732
- */
72733
- function exportNodeCompatibleHeaders(headers) {
72734
- const obj = Object.assign({ __proto__: null }, headers[MAP]);
72735
-
72736
- // http.request() only supports string as Host header. This hack makes
72737
- // specifying custom Host header possible.
72738
- const hostHeaderKey = find(headers[MAP], 'Host');
72739
- if (hostHeaderKey !== undefined) {
72740
- obj[hostHeaderKey] = obj[hostHeaderKey][0];
72741
- }
72742
-
72743
- return obj;
72744
- }
72745
-
72746
- /**
72747
- * Create a Headers object from an object of headers, ignoring those that do
72748
- * not conform to HTTP grammar productions.
72749
- *
72750
- * @param Object obj Object of headers
72751
- * @return Headers
72752
- */
72753
- function createHeadersLenient(obj) {
72754
- const headers = new Headers();
72755
- for (const name of Object.keys(obj)) {
72756
- if (invalidTokenRegex.test(name)) {
72757
- continue;
72758
- }
72759
- if (Array.isArray(obj[name])) {
72760
- for (const val of obj[name]) {
72761
- if (invalidHeaderCharRegex.test(val)) {
72762
- continue;
72763
- }
72764
- if (headers[MAP][name] === undefined) {
72765
- headers[MAP][name] = [val];
72766
- } else {
72767
- headers[MAP][name].push(val);
72768
- }
72769
- }
72770
- } else if (!invalidHeaderCharRegex.test(obj[name])) {
72771
- headers[MAP][name] = [obj[name]];
72772
- }
72773
- }
72774
- return headers;
72775
- }
72776
-
72777
- const INTERNALS$1 = Symbol('Response internals');
72778
-
72779
- // fix an issue where "STATUS_CODES" aren't a named export for node <10
72780
- const STATUS_CODES = http.STATUS_CODES;
72781
-
72782
- /**
72783
- * Response class
72784
- *
72785
- * @param Stream body Readable stream
72786
- * @param Object opts Response options
72787
- * @return Void
72788
- */
72789
- class Response {
72790
- constructor() {
72791
- let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
72792
- let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
72793
-
72794
- Body.call(this, body, opts);
72795
-
72796
- const status = opts.status || 200;
72797
- const headers = new Headers(opts.headers);
72798
-
72799
- if (body != null && !headers.has('Content-Type')) {
72800
- const contentType = extractContentType(body);
72801
- if (contentType) {
72802
- headers.append('Content-Type', contentType);
72803
- }
72804
- }
72805
-
72806
- this[INTERNALS$1] = {
72807
- url: opts.url,
72808
- status,
72809
- statusText: opts.statusText || STATUS_CODES[status],
72810
- headers,
72811
- counter: opts.counter
72812
- };
72813
- }
72814
-
72815
- get url() {
72816
- return this[INTERNALS$1].url || '';
72817
- }
72818
-
72819
- get status() {
72820
- return this[INTERNALS$1].status;
72821
- }
72822
-
72823
- /**
72824
- * Convenience property representing if the request ended normally
72825
- */
72826
- get ok() {
72827
- return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
72828
- }
72829
-
72830
- get redirected() {
72831
- return this[INTERNALS$1].counter > 0;
72832
- }
72833
-
72834
- get statusText() {
72835
- return this[INTERNALS$1].statusText;
72836
- }
72837
-
72838
- get headers() {
72839
- return this[INTERNALS$1].headers;
72840
- }
72841
-
72842
- /**
72843
- * Clone this response
72844
- *
72845
- * @return Response
72846
- */
72847
- clone() {
72848
- return new Response(clone(this), {
72849
- url: this.url,
72850
- status: this.status,
72851
- statusText: this.statusText,
72852
- headers: this.headers,
72853
- ok: this.ok,
72854
- redirected: this.redirected
72855
- });
72856
- }
72857
- }
72858
-
72859
- Body.mixIn(Response.prototype);
72860
-
72861
- Object.defineProperties(Response.prototype, {
72862
- url: { enumerable: true },
72863
- status: { enumerable: true },
72864
- ok: { enumerable: true },
72865
- redirected: { enumerable: true },
72866
- statusText: { enumerable: true },
72867
- headers: { enumerable: true },
72868
- clone: { enumerable: true }
72869
- });
72870
-
72871
- Object.defineProperty(Response.prototype, Symbol.toStringTag, {
72872
- value: 'Response',
72873
- writable: false,
72874
- enumerable: false,
72875
- configurable: true
72876
- });
72877
-
72878
- const INTERNALS$2 = Symbol('Request internals');
72879
-
72880
- // fix an issue where "format", "parse" aren't a named export for node <10
72881
- const parse_url = Url.parse;
72882
- const format_url = Url.format;
72883
-
72884
- const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
72885
-
72886
- /**
72887
- * Check if a value is an instance of Request.
72888
- *
72889
- * @param Mixed input
72890
- * @return Boolean
72891
- */
72892
- function isRequest(input) {
72893
- return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
72894
- }
72895
-
72896
- function isAbortSignal(signal) {
72897
- const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
72898
- return !!(proto && proto.constructor.name === 'AbortSignal');
72899
- }
72900
-
72901
- /**
72902
- * Request class
72903
- *
72904
- * @param Mixed input Url or Request instance
72905
- * @param Object init Custom options
72906
- * @return Void
72907
- */
72908
- class Request {
72909
- constructor(input) {
72910
- let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
72911
-
72912
- let parsedURL;
72913
-
72914
- // normalize input
72915
- if (!isRequest(input)) {
72916
- if (input && input.href) {
72917
- // in order to support Node.js' Url objects; though WHATWG's URL objects
72918
- // will fall into this branch also (since their `toString()` will return
72919
- // `href` property anyway)
72920
- parsedURL = parse_url(input.href);
72921
- } else {
72922
- // coerce input to a string before attempting to parse
72923
- parsedURL = parse_url(`${input}`);
72924
- }
72925
- input = {};
72926
- } else {
72927
- parsedURL = parse_url(input.url);
72928
- }
72929
-
72930
- let method = init.method || input.method || 'GET';
72931
- method = method.toUpperCase();
72932
-
72933
- if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
72934
- throw new TypeError('Request with GET/HEAD method cannot have body');
72935
- }
72936
-
72937
- let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
72938
-
72939
- Body.call(this, inputBody, {
72940
- timeout: init.timeout || input.timeout || 0,
72941
- size: init.size || input.size || 0
72942
- });
72943
-
72944
- const headers = new Headers(init.headers || input.headers || {});
72945
-
72946
- if (inputBody != null && !headers.has('Content-Type')) {
72947
- const contentType = extractContentType(inputBody);
72948
- if (contentType) {
72949
- headers.append('Content-Type', contentType);
72950
- }
72951
- }
72952
-
72953
- let signal = isRequest(input) ? input.signal : null;
72954
- if ('signal' in init) signal = init.signal;
72955
-
72956
- if (signal != null && !isAbortSignal(signal)) {
72957
- throw new TypeError('Expected signal to be an instanceof AbortSignal');
72958
- }
72959
-
72960
- this[INTERNALS$2] = {
72961
- method,
72962
- redirect: init.redirect || input.redirect || 'follow',
72963
- headers,
72964
- parsedURL,
72965
- signal
72966
- };
72967
-
72968
- // node-fetch-only options
72969
- this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
72970
- this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
72971
- this.counter = init.counter || input.counter || 0;
72972
- this.agent = init.agent || input.agent;
72973
- }
72974
-
72975
- get method() {
72976
- return this[INTERNALS$2].method;
72977
- }
72978
-
72979
- get url() {
72980
- return format_url(this[INTERNALS$2].parsedURL);
72981
- }
72982
-
72983
- get headers() {
72984
- return this[INTERNALS$2].headers;
72985
- }
72986
-
72987
- get redirect() {
72988
- return this[INTERNALS$2].redirect;
72989
- }
72990
-
72991
- get signal() {
72992
- return this[INTERNALS$2].signal;
72993
- }
72994
-
72995
- /**
72996
- * Clone this request
72997
- *
72998
- * @return Request
72999
- */
73000
- clone() {
73001
- return new Request(this);
73002
- }
73003
- }
73004
-
73005
- Body.mixIn(Request.prototype);
73006
-
73007
- Object.defineProperty(Request.prototype, Symbol.toStringTag, {
73008
- value: 'Request',
73009
- writable: false,
73010
- enumerable: false,
73011
- configurable: true
73012
- });
73013
-
73014
- Object.defineProperties(Request.prototype, {
73015
- method: { enumerable: true },
73016
- url: { enumerable: true },
73017
- headers: { enumerable: true },
73018
- redirect: { enumerable: true },
73019
- clone: { enumerable: true },
73020
- signal: { enumerable: true }
73021
- });
73022
-
73023
- /**
73024
- * Convert a Request to Node.js http request options.
73025
- *
73026
- * @param Request A Request instance
73027
- * @return Object The options object to be passed to http.request
73028
- */
73029
- function getNodeRequestOptions(request) {
73030
- const parsedURL = request[INTERNALS$2].parsedURL;
73031
- const headers = new Headers(request[INTERNALS$2].headers);
73032
-
73033
- // fetch step 1.3
73034
- if (!headers.has('Accept')) {
73035
- headers.set('Accept', '*/*');
73036
- }
73037
-
73038
- // Basic fetch
73039
- if (!parsedURL.protocol || !parsedURL.hostname) {
73040
- throw new TypeError('Only absolute URLs are supported');
73041
- }
73042
-
73043
- if (!/^https?:$/.test(parsedURL.protocol)) {
73044
- throw new TypeError('Only HTTP(S) protocols are supported');
73045
- }
73046
-
73047
- if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
73048
- throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
73049
- }
73050
-
73051
- // HTTP-network-or-cache fetch steps 2.4-2.7
73052
- let contentLengthValue = null;
73053
- if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
73054
- contentLengthValue = '0';
73055
- }
73056
- if (request.body != null) {
73057
- const totalBytes = getTotalBytes(request);
73058
- if (typeof totalBytes === 'number') {
73059
- contentLengthValue = String(totalBytes);
73060
- }
73061
- }
73062
- if (contentLengthValue) {
73063
- headers.set('Content-Length', contentLengthValue);
73064
- }
73065
-
73066
- // HTTP-network-or-cache fetch step 2.11
73067
- if (!headers.has('User-Agent')) {
73068
- headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
73069
- }
73070
-
73071
- // HTTP-network-or-cache fetch step 2.15
73072
- if (request.compress && !headers.has('Accept-Encoding')) {
73073
- headers.set('Accept-Encoding', 'gzip,deflate');
73074
- }
73075
-
73076
- let agent = request.agent;
73077
- if (typeof agent === 'function') {
73078
- agent = agent(parsedURL);
73079
- }
73080
-
73081
- if (!headers.has('Connection') && !agent) {
73082
- headers.set('Connection', 'close');
73083
- }
73084
-
73085
- // HTTP-network fetch step 4.2
73086
- // chunked encoding is handled by Node.js
73087
-
73088
- return Object.assign({}, parsedURL, {
73089
- method: request.method,
73090
- headers: exportNodeCompatibleHeaders(headers),
73091
- agent
73092
- });
73093
- }
73094
-
73095
- /**
73096
- * abort-error.js
73097
- *
73098
- * AbortError interface for cancelled requests
73099
- */
73100
-
73101
- /**
73102
- * Create AbortError instance
73103
- *
73104
- * @param String message Error message for human
73105
- * @return AbortError
73106
- */
73107
- function AbortError(message) {
73108
- Error.call(this, message);
73109
-
73110
- this.type = 'aborted';
73111
- this.message = message;
73112
-
73113
- // hide custom error implementation details from end-users
73114
- Error.captureStackTrace(this, this.constructor);
73115
- }
73116
-
73117
- AbortError.prototype = Object.create(Error.prototype);
73118
- AbortError.prototype.constructor = AbortError;
73119
- AbortError.prototype.name = 'AbortError';
73120
-
73121
- // fix an issue where "PassThrough", "resolve" aren't a named export for node <10
73122
- const PassThrough$1 = Stream.PassThrough;
73123
- const resolve_url = Url.resolve;
73124
-
73125
- /**
73126
- * Fetch function
73127
- *
73128
- * @param Mixed url Absolute url or Request instance
73129
- * @param Object opts Fetch options
73130
- * @return Promise
73131
- */
73132
- function fetch$1(url, opts) {
73133
-
73134
- // allow custom promise
73135
- if (!fetch$1.Promise) {
73136
- throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
73137
- }
73138
-
73139
- Body.Promise = fetch$1.Promise;
73140
-
73141
- // wrap http.request into fetch
73142
- return new fetch$1.Promise(function (resolve, reject) {
73143
- // build request object
73144
- const request = new Request(url, opts);
73145
- const options = getNodeRequestOptions(request);
73146
-
73147
- const send = (options.protocol === 'https:' ? https : http).request;
73148
- const signal = request.signal;
73149
-
73150
- let response = null;
73151
-
73152
- const abort = function abort() {
73153
- let error = new AbortError('The user aborted a request.');
73154
- reject(error);
73155
- if (request.body && request.body instanceof Stream.Readable) {
73156
- request.body.destroy(error);
73157
- }
73158
- if (!response || !response.body) return;
73159
- response.body.emit('error', error);
73160
- };
73161
-
73162
- if (signal && signal.aborted) {
73163
- abort();
73164
- return;
73165
- }
73166
-
73167
- const abortAndFinalize = function abortAndFinalize() {
73168
- abort();
73169
- finalize();
73170
- };
73171
-
73172
- // send request
73173
- const req = send(options);
73174
- let reqTimeout;
73175
-
73176
- if (signal) {
73177
- signal.addEventListener('abort', abortAndFinalize);
73178
- }
71590
+ var tr = {
71591
+ actions: {
71592
+ login: "Giriş Yap",
71593
+ edit: "Düzenle",
71594
+ apply: "Uygula",
71595
+ close: "Kapat",
71596
+ cancel: "Vazgeç",
71597
+ save: "Kaydet",
71598
+ continue: "Devam Et",
71599
+ show: "Göster",
71600
+ hide: "Gizle",
71601
+ sendMessage: "Mesajı Gönder",
71602
+ continueWithShipping: "Kargo ile Devam Et",
71603
+ continueWithPayment: "Ödeme ile Devam Et",
71604
+ completeOrder: "Siparişi Tamamla",
71605
+ backToShopping: "Alışverişe Dön",
71606
+ backToCart: "Sepete Dön",
71607
+ },
71608
+ securePayment: "Güvenli Ödeme",
71609
+ alreadyHaveAnAccount: "Zaten hesabınız var mı?",
73179
71610
 
73180
- function finalize() {
73181
- req.abort();
73182
- if (signal) signal.removeEventListener('abort', abortAndFinalize);
73183
- clearTimeout(reqTimeout);
73184
- }
71611
+ address: "Adres",
71612
+ addressError: "Adres girin",
71613
+ missingAddressFields: "Adres bilgilerinde bazı zorunlu alanlar eksik.",
71614
+ editAddress: "Adres Düzenle",
71615
+ deleteAddress: "Adresi Sil",
71616
+ saveAddressCta: "Bir sonraki işlem için bu adresi kaydet",
71617
+ firstName: "Ad",
71618
+ firstNameError: "Ad girin",
71619
+ lastName: "Soyad",
71620
+ lastNameError: "Soyad girin",
71621
+ identityNumber: "TC Kimlik No",
71622
+ identityNumberError: "TC kimlik no girin",
71623
+ addressTitle: "Adres Başlığı",
71624
+ adressTitleError: "Adres başlığı girin",
71625
+ addressLine2: "Apartman, daire, vb.",
71626
+ postalCode: "Posta Kodu",
71627
+ postalCodeError: "Posta kodu girin",
71628
+ country: "Ülke",
71629
+ countryError: "Ülke seçin",
71630
+ state: "Eyalet",
71631
+ stateError: "Eyalet seçin",
71632
+ city: "İl",
71633
+ cityError: "İl seçin",
71634
+ district: "İlçe",
71635
+ districtError: "İlçe seçin",
71636
+ phone: "Telefon",
71637
+ phoneError: "Geçerli bir telefon girin",
71638
+ companyName: "Firma Adı",
71639
+ taxOffice: "Vergi Dairesi",
71640
+ taxNumber: "Vergi Numarası",
73185
71641
 
73186
- if (request.timeout) {
73187
- req.once('socket', function (socket) {
73188
- reqTimeout = setTimeout(function () {
73189
- reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
73190
- finalize();
73191
- }, request.timeout);
73192
- });
73193
- }
71642
+ shipping: "Kargo",
71643
+ payment: "Ödeme",
71644
+ summary: "Özet",
73194
71645
 
73195
- req.on('error', function (err) {
73196
- reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
73197
- finalize();
73198
- });
71646
+ free: "Ücretsiz",
71647
+ standartShipping: "Standart Kargo",
71648
+ returnPolicy: "Para İade Politikası",
71649
+ privacyPolicy: "Gizlilik Politikası",
71650
+ termsOfService: "Hizmet Şartları",
71651
+ newAddress: "Yeni Adres",
71652
+ billingAddress: "Fatura Adresi",
71653
+ shippingAddress: "Teslimat Adresi",
71654
+ corporateInvoice: "Kurumsal fatura",
71655
+ contactInfo: "İletişim Bilgileri",
71656
+ email: "E-Posta",
71657
+ emailError: "Geçerli bir e-posta girin",
71658
+ guestEmailTooltip: "Sipariş bilgileri bu e-posta adresine gönderilecektir",
71659
+ customerConsentCta: "Beni haberlerden ve özel tekliflerden haberdar et",
71660
+ useShippingForBilling: "Fatura adresim teslimat adresimle aynı",
71661
+ installmentOptions: "Taksit Seçenekleri",
71662
+ singleInstallment: "Tek Çekim",
71663
+ installments: "Taksit",
71664
+ creditCard: "Kredi Kartı",
73199
71665
 
73200
- req.on('response', function (res) {
73201
- clearTimeout(reqTimeout);
73202
-
73203
- const headers = createHeadersLenient(res.headers);
73204
-
73205
- // HTTP fetch step 5
73206
- if (fetch$1.isRedirect(res.statusCode)) {
73207
- // HTTP fetch step 5.2
73208
- const location = headers.get('Location');
73209
-
73210
- // HTTP fetch step 5.3
73211
- const locationURL = location === null ? null : resolve_url(request.url, location);
73212
-
73213
- // HTTP fetch step 5.5
73214
- switch (request.redirect) {
73215
- case 'error':
73216
- reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
73217
- finalize();
73218
- return;
73219
- case 'manual':
73220
- // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
73221
- if (locationURL !== null) {
73222
- // handle corrupted header
73223
- try {
73224
- headers.set('Location', locationURL);
73225
- } catch (err) {
73226
- // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
73227
- reject(err);
73228
- }
73229
- }
73230
- break;
73231
- case 'follow':
73232
- // HTTP-redirect fetch step 2
73233
- if (locationURL === null) {
73234
- break;
73235
- }
73236
-
73237
- // HTTP-redirect fetch step 5
73238
- if (request.counter >= request.follow) {
73239
- reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
73240
- finalize();
73241
- return;
73242
- }
73243
-
73244
- // HTTP-redirect fetch step 6 (counter increment)
73245
- // Create a new Request object.
73246
- const requestOpts = {
73247
- headers: new Headers(request.headers),
73248
- follow: request.follow,
73249
- counter: request.counter + 1,
73250
- agent: request.agent,
73251
- compress: request.compress,
73252
- method: request.method,
73253
- body: request.body,
73254
- signal: request.signal,
73255
- timeout: request.timeout,
73256
- size: request.size
73257
- };
73258
-
73259
- // HTTP-redirect fetch step 9
73260
- if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
73261
- reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
73262
- finalize();
73263
- return;
73264
- }
73265
-
73266
- // HTTP-redirect fetch step 11
73267
- if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
73268
- requestOpts.method = 'GET';
73269
- requestOpts.body = undefined;
73270
- requestOpts.headers.delete('content-length');
73271
- }
73272
-
73273
- // HTTP-redirect fetch step 15
73274
- resolve(fetch$1(new Request(locationURL, requestOpts)));
73275
- finalize();
73276
- return;
73277
- }
73278
- }
71666
+ ackPrivacyPolicy: "Gizlilik Sözleşmesini",
71667
+ ackTermsOfService: "Satış Sözleşmesini",
71668
+ ackPoliciesSentence:
71669
+ "{{ ackPrivacyPolicy }} ve {{ ackTermsOfService }} okudum, onaylıyorum.",
73279
71670
 
73280
- // prepare response
73281
- res.once('end', function () {
73282
- if (signal) signal.removeEventListener('abort', abortAndFinalize);
73283
- });
73284
- let body = res.pipe(new PassThrough$1());
73285
-
73286
- const response_options = {
73287
- url: request.url,
73288
- status: res.statusCode,
73289
- statusText: res.statusMessage,
73290
- headers: headers,
73291
- size: request.size,
73292
- timeout: request.timeout,
73293
- counter: request.counter
73294
- };
71671
+ securePaymentTooltip: "Ödemeler güvenli ve şifrelidir",
71672
+ giftPackage: "Hediye Paketi",
71673
+ giftPackageCta: "Hediye paketi istiyorum",
71674
+ giftPackageCtaPlaceholder: "Hediye mesajınızı giriniz",
73295
71675
 
73296
- // HTTP-network fetch step 12.1.1.3
73297
- const codings = headers.get('Content-Encoding');
73298
-
73299
- // HTTP-network fetch step 12.1.1.4: handle content codings
73300
-
73301
- // in following scenarios we ignore compression support
73302
- // 1. compression support is disabled
73303
- // 2. HEAD request
73304
- // 3. no Content-Encoding header
73305
- // 4. no content response (204)
73306
- // 5. content not modified response (304)
73307
- if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
73308
- response = new Response(body, response_options);
73309
- resolve(response);
73310
- return;
73311
- }
71676
+ paymentMethod: "Ödeme Yöntemi",
71677
+ paymentMethodDiscount: "İndirim",
71678
+ paymentMethodAdditionalPrice: "İşlem Bedeli",
73312
71679
 
73313
- // For Node v6+
73314
- // Be less strict when decoding compressed responses, since sometimes
73315
- // servers send slightly invalid responses that are still accepted
73316
- // by common browsers.
73317
- // Always using Z_SYNC_FLUSH is what cURL does.
73318
- const zlibOptions = {
73319
- flush: zlib.Z_SYNC_FLUSH,
73320
- finishFlush: zlib.Z_SYNC_FLUSH
73321
- };
71680
+ orderSuccessTitle: "Siparişiniz için teşekkür ederiz!",
71681
+ orderSuccessDescription:
71682
+ "Sevgili {{ customerName }}, siparişiniz bize ulaşmıştır. Siparişiniz kargoya verildiğinde sizi e-posta ile bilgilendireceğiz.",
71683
+ orderNoAndDate: "Sipariş No / Tarih",
71684
+ paymentSummary: "Ödeme Özeti",
71685
+ shippingSummary: "Teslimat Özeti",
71686
+ helpCtaQuestion: "Yardıma mı ihtiyacınız var?",
71687
+ helpCta: "Bizimle iletişime geçin",
73322
71688
 
73323
- // for gzip
73324
- if (codings == 'gzip' || codings == 'x-gzip') {
73325
- body = body.pipe(zlib.createGunzip(zlibOptions));
73326
- response = new Response(body, response_options);
73327
- resolve(response);
73328
- return;
73329
- }
71689
+ contactForm: "İletişim Formu",
71690
+ contactFormSent: "Mesaj başarıyla gönderildi",
71691
+ contactFormDescription:
71692
+ "Mesajınızla ilgili olarak size en kısa zamanda e-posta veya telefon aracılığıyla geri dönüş yapılacaktır.",
71693
+ contactFormCta: "Mesajınızı yazın",
73330
71694
 
73331
- // for deflate
73332
- if (codings == 'deflate' || codings == 'x-deflate') {
73333
- // handle the infamous raw deflate response from old servers
73334
- // a hack for old IIS and Apache servers
73335
- const raw = res.pipe(new PassThrough$1());
73336
- raw.once('data', function (chunk) {
73337
- // see http://stackoverflow.com/questions/37519828
73338
- if ((chunk[0] & 0x0F) === 0x08) {
73339
- body = body.pipe(zlib.createInflate());
73340
- } else {
73341
- body = body.pipe(zlib.createInflateRaw());
73342
- }
73343
- response = new Response(body, response_options);
73344
- resolve(response);
73345
- });
73346
- return;
73347
- }
71695
+ orderPackageStatus: {
71696
+ unfulfilled: "Oluşturuldu",
71697
+ readyForShipment: "Kargoya Hazır",
71698
+ fulfilled: "Gönderildi",
71699
+ partiallyFulfilled: "Kısmi Gönderildi",
71700
+ delivered: "Teslim Edildi",
71701
+ unableToDeliver: "Teslim Edilemedi",
71702
+ cancelled: "İptal Edildi",
71703
+ cancelRejected: "İptal Talebi Reddedildi",
71704
+ cancelRequested: "İptal İstendi",
71705
+ refunded: "İade Edildi",
71706
+ refundRequestAccepted: "İade Talebi Onaylandı",
71707
+ refundRejected: "İade Talebi Reddedildi",
71708
+ refundRequested: "İade Talep Edildi",
71709
+ },
73348
71710
 
73349
- // for br
73350
- if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
73351
- body = body.pipe(zlib.createBrotliDecompress());
73352
- response = new Response(body, response_options);
73353
- resolve(response);
73354
- return;
73355
- }
71711
+ quantity: "Adet",
71712
+ cartItemProduct: "ürün",
71713
+ giftCodeErrorTitle: "İndirim Kodu Hatası",
71714
+ giftCodeErrorDescription:
71715
+ "İndirim kodunuz geçersiz veya sepetinizdeki ürünlere uygulanabilir değil. Lütfen kodunuzu kontrol edip tekrar deneyin.",
71716
+ subtotal: "Ara Toplam",
71717
+ total: "Toplam",
71718
+ subtotalTooltip:
71719
+ "Ara toplam, tüm geçerli indirimlerden önce siparişinizin toplam fiyatını yansıtır. kargo ücretini içermez.",
71720
+ cartShippingTitle: "Teslimat / Kargo",
71721
+ cartTaxTitle: "Vergi",
71722
+ cartInterest: "Vade Farkı",
71723
+ couponCode: "İndirim Kodu",
71724
+ addCouponCode: "İndirim kodu ekle",
71725
+ addOrderNote: "Sipariş notu ekle",
71726
+ editOrderNote: "Sipariş notu düzenle",
71727
+ orderNote: "Sipariş Notu",
71728
+ enterPhoneNumber: "Telefon numarası girin",
73356
71729
 
73357
- // otherwise, use response as-is
73358
- response = new Response(body, response_options);
73359
- resolve(response);
73360
- });
71730
+ cardNumber: "Kart Numarası",
71731
+ cardNumberError: "Geçerli bir kart numarası girin",
71732
+ cardHolderName: "Kart Üzerindeki İsim",
71733
+ cardHolderError: "Ad soyad girin",
71734
+ cardExpiry: "Ay / Yıl",
71735
+ cardExpiryError: "Geçerli bir tarih girin",
71736
+ cardCVC: "CVC",
71737
+ cardCVCError: "Geçerli bir güvenlik kodu girin",
71738
+ cardCVCTooltip: "Kartınızın arkasındaki 3 haneli güvenlik kodu",
73361
71739
 
73362
- writeToStream(req, request);
73363
- });
73364
- }
73365
- /**
73366
- * Redirect code matching
73367
- *
73368
- * @param Number code Status code
73369
- * @return Boolean
73370
- */
73371
- fetch$1.isRedirect = function (code) {
73372
- return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
71740
+ errorCustomerRequired:
71741
+ "Bu e-posta adresine ait kayıtlı bir hesap bulunuyor. Lütfen hesabınıza giriş yapınız.",
71742
+ errorNoShipping: "Bulunduğunuz konuma gönderim yapılmamaktadır.",
71743
+ errorPayment:
71744
+ "Ödemeniz alınamadı. Lütfen bilgilerinizi kontrol edip tekrar deneyin.",
71745
+ errorStockTitle: "Stoklar Güncellendi!",
71746
+ errorStockDescription:
71747
+ "Sepetinizdeki bazı ürünlerin stoğu tükenmiştir. Bu ürünleri sepetinizden çıkararak devam etmek ister misiniz?",
71748
+ errorUnknown: "Beklenmedik bir hata oluştu. Lütfen tekrar deneyin.",
73373
71749
  };
73374
71750
 
73375
- // expose Promise
73376
- fetch$1.Promise = global.Promise;
71751
+ var tr$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), tr, {
71752
+ 'default': tr
71753
+ }));
73377
71754
 
73378
71755
  var en = {
73379
71756
  actions: {
@@ -73541,460 +71918,4 @@ var en$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Ob
73541
71918
  'default': en
73542
71919
  }));
73543
71920
 
73544
- var tr = {
73545
- actions: {
73546
- login: "Giriş Yap",
73547
- edit: "Düzenle",
73548
- apply: "Uygula",
73549
- close: "Kapat",
73550
- cancel: "Vazgeç",
73551
- save: "Kaydet",
73552
- continue: "Devam Et",
73553
- show: "Göster",
73554
- hide: "Gizle",
73555
- sendMessage: "Mesajı Gönder",
73556
- continueWithShipping: "Kargo ile Devam Et",
73557
- continueWithPayment: "Ödeme ile Devam Et",
73558
- completeOrder: "Siparişi Tamamla",
73559
- backToShopping: "Alışverişe Dön",
73560
- backToCart: "Sepete Dön",
73561
- },
73562
- securePayment: "Güvenli Ödeme",
73563
- alreadyHaveAnAccount: "Zaten hesabınız var mı?",
73564
-
73565
- address: "Adres",
73566
- addressError: "Adres girin",
73567
- missingAddressFields: "Adres bilgilerinde bazı zorunlu alanlar eksik.",
73568
- editAddress: "Adres Düzenle",
73569
- deleteAddress: "Adresi Sil",
73570
- saveAddressCta: "Bir sonraki işlem için bu adresi kaydet",
73571
- firstName: "Ad",
73572
- firstNameError: "Ad girin",
73573
- lastName: "Soyad",
73574
- lastNameError: "Soyad girin",
73575
- identityNumber: "TC Kimlik No",
73576
- identityNumberError: "TC kimlik no girin",
73577
- addressTitle: "Adres Başlığı",
73578
- adressTitleError: "Adres başlığı girin",
73579
- addressLine2: "Apartman, daire, vb.",
73580
- postalCode: "Posta Kodu",
73581
- postalCodeError: "Posta kodu girin",
73582
- country: "Ülke",
73583
- countryError: "Ülke seçin",
73584
- state: "Eyalet",
73585
- stateError: "Eyalet seçin",
73586
- city: "İl",
73587
- cityError: "İl seçin",
73588
- district: "İlçe",
73589
- districtError: "İlçe seçin",
73590
- phone: "Telefon",
73591
- phoneError: "Geçerli bir telefon girin",
73592
- companyName: "Firma Adı",
73593
- taxOffice: "Vergi Dairesi",
73594
- taxNumber: "Vergi Numarası",
73595
-
73596
- shipping: "Kargo",
73597
- payment: "Ödeme",
73598
- summary: "Özet",
73599
-
73600
- free: "Ücretsiz",
73601
- standartShipping: "Standart Kargo",
73602
- returnPolicy: "Para İade Politikası",
73603
- privacyPolicy: "Gizlilik Politikası",
73604
- termsOfService: "Hizmet Şartları",
73605
- newAddress: "Yeni Adres",
73606
- billingAddress: "Fatura Adresi",
73607
- shippingAddress: "Teslimat Adresi",
73608
- corporateInvoice: "Kurumsal fatura",
73609
- contactInfo: "İletişim Bilgileri",
73610
- email: "E-Posta",
73611
- emailError: "Geçerli bir e-posta girin",
73612
- guestEmailTooltip: "Sipariş bilgileri bu e-posta adresine gönderilecektir",
73613
- customerConsentCta: "Beni haberlerden ve özel tekliflerden haberdar et",
73614
- useShippingForBilling: "Fatura adresim teslimat adresimle aynı",
73615
- installmentOptions: "Taksit Seçenekleri",
73616
- singleInstallment: "Tek Çekim",
73617
- installments: "Taksit",
73618
- creditCard: "Kredi Kartı",
73619
-
73620
- ackPrivacyPolicy: "Gizlilik Sözleşmesini",
73621
- ackTermsOfService: "Satış Sözleşmesini",
73622
- ackPoliciesSentence:
73623
- "{{ ackPrivacyPolicy }} ve {{ ackTermsOfService }} okudum, onaylıyorum.",
73624
-
73625
- securePaymentTooltip: "Ödemeler güvenli ve şifrelidir",
73626
- giftPackage: "Hediye Paketi",
73627
- giftPackageCta: "Hediye paketi istiyorum",
73628
- giftPackageCtaPlaceholder: "Hediye mesajınızı giriniz",
73629
-
73630
- paymentMethod: "Ödeme Yöntemi",
73631
- paymentMethodDiscount: "İndirim",
73632
- paymentMethodAdditionalPrice: "İşlem Bedeli",
73633
-
73634
- orderSuccessTitle: "Siparişiniz için teşekkür ederiz!",
73635
- orderSuccessDescription:
73636
- "Sevgili {{ customerName }}, siparişiniz bize ulaşmıştır. Siparişiniz kargoya verildiğinde sizi e-posta ile bilgilendireceğiz.",
73637
- orderNoAndDate: "Sipariş No / Tarih",
73638
- paymentSummary: "Ödeme Özeti",
73639
- shippingSummary: "Teslimat Özeti",
73640
- helpCtaQuestion: "Yardıma mı ihtiyacınız var?",
73641
- helpCta: "Bizimle iletişime geçin",
73642
-
73643
- contactForm: "İletişim Formu",
73644
- contactFormSent: "Mesaj başarıyla gönderildi",
73645
- contactFormDescription:
73646
- "Mesajınızla ilgili olarak size en kısa zamanda e-posta veya telefon aracılığıyla geri dönüş yapılacaktır.",
73647
- contactFormCta: "Mesajınızı yazın",
73648
-
73649
- orderPackageStatus: {
73650
- unfulfilled: "Oluşturuldu",
73651
- readyForShipment: "Kargoya Hazır",
73652
- fulfilled: "Gönderildi",
73653
- partiallyFulfilled: "Kısmi Gönderildi",
73654
- delivered: "Teslim Edildi",
73655
- unableToDeliver: "Teslim Edilemedi",
73656
- cancelled: "İptal Edildi",
73657
- cancelRejected: "İptal Talebi Reddedildi",
73658
- cancelRequested: "İptal İstendi",
73659
- refunded: "İade Edildi",
73660
- refundRequestAccepted: "İade Talebi Onaylandı",
73661
- refundRejected: "İade Talebi Reddedildi",
73662
- refundRequested: "İade Talep Edildi",
73663
- },
73664
-
73665
- quantity: "Adet",
73666
- cartItemProduct: "ürün",
73667
- giftCodeErrorTitle: "İndirim Kodu Hatası",
73668
- giftCodeErrorDescription:
73669
- "İndirim kodunuz geçersiz veya sepetinizdeki ürünlere uygulanabilir değil. Lütfen kodunuzu kontrol edip tekrar deneyin.",
73670
- subtotal: "Ara Toplam",
73671
- total: "Toplam",
73672
- subtotalTooltip:
73673
- "Ara toplam, tüm geçerli indirimlerden önce siparişinizin toplam fiyatını yansıtır. kargo ücretini içermez.",
73674
- cartShippingTitle: "Teslimat / Kargo",
73675
- cartTaxTitle: "Vergi",
73676
- cartInterest: "Vade Farkı",
73677
- couponCode: "İndirim Kodu",
73678
- addCouponCode: "İndirim kodu ekle",
73679
- addOrderNote: "Sipariş notu ekle",
73680
- editOrderNote: "Sipariş notu düzenle",
73681
- orderNote: "Sipariş Notu",
73682
- enterPhoneNumber: "Telefon numarası girin",
73683
-
73684
- cardNumber: "Kart Numarası",
73685
- cardNumberError: "Geçerli bir kart numarası girin",
73686
- cardHolderName: "Kart Üzerindeki İsim",
73687
- cardHolderError: "Ad soyad girin",
73688
- cardExpiry: "Ay / Yıl",
73689
- cardExpiryError: "Geçerli bir tarih girin",
73690
- cardCVC: "CVC",
73691
- cardCVCError: "Geçerli bir güvenlik kodu girin",
73692
- cardCVCTooltip: "Kartınızın arkasındaki 3 haneli güvenlik kodu",
73693
-
73694
- errorCustomerRequired:
73695
- "Bu e-posta adresine ait kayıtlı bir hesap bulunuyor. Lütfen hesabınıza giriş yapınız.",
73696
- errorNoShipping: "Bulunduğunuz konuma gönderim yapılmamaktadır.",
73697
- errorPayment:
73698
- "Ödemeniz alınamadı. Lütfen bilgilerinizi kontrol edip tekrar deneyin.",
73699
- errorStockTitle: "Stoklar Güncellendi!",
73700
- errorStockDescription:
73701
- "Sepetinizdeki bazı ürünlerin stoğu tükenmiştir. Bu ürünleri sepetinizden çıkararak devam etmek ister misiniz?",
73702
- errorUnknown: "Beklenmedik bir hata oluştu. Lütfen tekrar deneyin.",
73703
- };
73704
-
73705
- var tr$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), tr, {
73706
- 'default': tr
73707
- }));
73708
-
73709
- var serverRuntimeConfig$2 = getConfig().serverRuntimeConfig;
73710
- var themePath = path$1.join(serverRuntimeConfig$2.PROJECT_ROOT);
73711
- var uploadTheme = function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
73712
- var theme, localization, uploadUrl, zipDir, stat, success, err_1;
73713
- return __generator(this, function (_a) {
73714
- switch (_a.label) {
73715
- case 0: return [4 /*yield*/, corsMiddleware(req, res)];
73716
- case 1:
73717
- _a.sent();
73718
- _a.label = 2;
73719
- case 2:
73720
- _a.trys.push([2, 9, , 10]);
73721
- return [4 /*yield*/, getTheme$1()];
73722
- case 3:
73723
- theme = _a.sent();
73724
- return [4 /*yield*/, readLocalizationFiles()];
73725
- case 4:
73726
- localization = _a.sent();
73727
- return [4 /*yield*/, saveTheme(theme, localization)];
73728
- case 5:
73729
- uploadUrl = _a.sent();
73730
- if (!(typeof uploadUrl === "string")) return [3 /*break*/, 8];
73731
- return [4 /*yield*/, archiveThemeCode()];
73732
- case 6:
73733
- zipDir = _a.sent();
73734
- stat = fs.statSync(zipDir);
73735
- return [4 /*yield*/, _uploadTheme(uploadUrl, fs.readFileSync(zipDir), stat.size)];
73736
- case 7:
73737
- success = _a.sent();
73738
- console.log(success);
73739
- if (success) {
73740
- buildTheme();
73741
- }
73742
- deleteThemeZip(zipDir);
73743
- _a.label = 8;
73744
- case 8:
73745
- res.statusCode = 200;
73746
- res.setHeader("Content-Type", "application/json");
73747
- res.json({ status: "ok" });
73748
- return [3 /*break*/, 10];
73749
- case 9:
73750
- err_1 = _a.sent();
73751
- console.log(err_1);
73752
- res.statusCode = 400;
73753
- res.setHeader("Content-Type", "application/json");
73754
- res.json({ status: "failed" });
73755
- return [3 /*break*/, 10];
73756
- case 10: return [2 /*return*/];
73757
- }
73758
- });
73759
- }); };
73760
- var config$3 = {};
73761
- function archiveThemeCode() {
73762
- return __awaiter(this, void 0, void 0, function () {
73763
- var filename, dirname, output, archive, excludedDirs, files;
73764
- return __generator(this, function (_a) {
73765
- switch (_a.label) {
73766
- case 0:
73767
- filename = "theme.zip";
73768
- dirname = path$1.join(serverRuntimeConfig$2.PROJECT_ROOT, filename);
73769
- output = fs.createWriteStream(dirname);
73770
- archive = archiver("zip", {
73771
- zlib: {
73772
- level: 9,
73773
- },
73774
- });
73775
- archive.on("warning", function (err) {
73776
- if (err.code !== "ENOENT") {
73777
- throw err;
73778
- }
73779
- });
73780
- archive.on("error", function (err) {
73781
- throw err;
73782
- });
73783
- archive.pipe(output);
73784
- excludedDirs = ["node_modules", ".next", "out", ".git"];
73785
- files = fs.readdirSync(themePath);
73786
- files.forEach(function (file) {
73787
- var filePath = path$1.join(themePath, file);
73788
- var stat = fs.lstatSync(filePath);
73789
- if (stat.isDirectory()) {
73790
- if (excludedDirs.includes(file))
73791
- return;
73792
- archive.directory(filePath, file);
73793
- }
73794
- else {
73795
- archive.file(filePath, { name: file });
73796
- }
73797
- });
73798
- return [4 /*yield*/, archive.finalize()];
73799
- case 1:
73800
- _a.sent();
73801
- return [2 /*return*/, new Promise(function (resolve) {
73802
- setTimeout(function () {
73803
- resolve(dirname);
73804
- }, 2000);
73805
- })];
73806
- }
73807
- });
73808
- });
73809
- }
73810
- function saveTheme(theme, localization) {
73811
- return __awaiter(this, void 0, void 0, function () {
73812
- var locales, defaultLocale_1, response, responseJSON, err_2;
73813
- return __generator(this, function (_a) {
73814
- switch (_a.label) {
73815
- case 0:
73816
- _a.trys.push([0, 3, , 4]);
73817
- locales = Object.keys(localization);
73818
- defaultLocale_1 = locales.some(function (l) { return l === "en"; }) ? "en" : locales[0];
73819
- return [4 /*yield*/, fetch$1(process.env.NEXT_PUBLIC_UPLOAD_GQL_URL, {
73820
- method: "POST",
73821
- body: JSON.stringify({
73822
- query: /* GraphQL */ "\n mutation saveTheme($saveThemeInput: SaveThemeInput!) {\n saveTheme(input: $saveThemeInput) {\n themeVersionId\n uploadUrl\n }\n }\n ",
73823
- variables: {
73824
- saveThemeInput: {
73825
- id: IkasStorefrontConfig.config.themeId,
73826
- themeJson: JSON.stringify(theme),
73827
- locales: Object.entries(localization).map(function (_a) {
73828
- var locale = _a[0], localeTranslations = _a[1];
73829
- return ({
73830
- isDefaultLocale: locale === defaultLocale_1,
73831
- locale: locale,
73832
- localeJson: JSON.stringify(localeTranslations),
73833
- });
73834
- }),
73835
- },
73836
- },
73837
- }),
73838
- headers: {
73839
- "x-api-key": IkasStorefrontConfig.config.apiKey,
73840
- "Content-Type": "application/json",
73841
- },
73842
- })];
73843
- case 1:
73844
- response = _a.sent();
73845
- return [4 /*yield*/, response.json()];
73846
- case 2:
73847
- responseJSON = _a.sent();
73848
- if (responseJSON.data && responseJSON.data.saveTheme) {
73849
- return [2 /*return*/, responseJSON.data.saveTheme.uploadUrl];
73850
- }
73851
- return [3 /*break*/, 4];
73852
- case 3:
73853
- err_2 = _a.sent();
73854
- console.log(err_2);
73855
- return [3 /*break*/, 4];
73856
- case 4: return [2 /*return*/];
73857
- }
73858
- });
73859
- });
73860
- }
73861
- function _uploadTheme(uploadUrl, file, size) {
73862
- return __awaiter(this, void 0, void 0, function () {
73863
- var config, res, err_3;
73864
- return __generator(this, function (_a) {
73865
- switch (_a.label) {
73866
- case 0:
73867
- config = {
73868
- headers: {
73869
- "Content-Type": "application/zip",
73870
- "Content-Length": size + "",
73871
- },
73872
- };
73873
- _a.label = 1;
73874
- case 1:
73875
- _a.trys.push([1, 3, , 4]);
73876
- return [4 /*yield*/, axios.put(uploadUrl, file, config)];
73877
- case 2:
73878
- res = _a.sent();
73879
- return [2 /*return*/, res.status === 200];
73880
- case 3:
73881
- err_3 = _a.sent();
73882
- console.log(err_3);
73883
- return [2 /*return*/, false];
73884
- case 4: return [2 /*return*/];
73885
- }
73886
- });
73887
- });
73888
- }
73889
- function buildTheme() {
73890
- return __awaiter(this, void 0, void 0, function () {
73891
- var response, responseJSON, err_4;
73892
- return __generator(this, function (_a) {
73893
- switch (_a.label) {
73894
- case 0:
73895
- _a.trys.push([0, 3, , 4]);
73896
- return [4 /*yield*/, fetch$1(process.env.NEXT_PUBLIC_UPLOAD_GQL_URL, {
73897
- method: "POST",
73898
- body: JSON.stringify({
73899
- query: /* GraphQL */ "\n mutation buildTheme($buildThemeThemeId: String!) {\n buildTheme(themeId: $buildThemeThemeId)\n }\n ",
73900
- variables: {
73901
- buildThemeThemeId: IkasStorefrontConfig.config.themeId,
73902
- },
73903
- }),
73904
- headers: {
73905
- "x-api-key": IkasStorefrontConfig.config.apiKey,
73906
- "Content-Type": "application/json",
73907
- },
73908
- })];
73909
- case 1:
73910
- response = _a.sent();
73911
- return [4 /*yield*/, response.json()];
73912
- case 2:
73913
- responseJSON = _a.sent();
73914
- console.log(responseJSON);
73915
- return [3 /*break*/, 4];
73916
- case 3:
73917
- err_4 = _a.sent();
73918
- console.log(err_4);
73919
- return [3 /*break*/, 4];
73920
- case 4: return [2 /*return*/];
73921
- }
73922
- });
73923
- });
73924
- }
73925
- function getTheme$1() {
73926
- return new Promise(function (resolve, reject) {
73927
- var serverRuntimeConfig = getConfig().serverRuntimeConfig;
73928
- var themePath = path$1.join(serverRuntimeConfig.PROJECT_ROOT, "src", "theme.json");
73929
- fs.readFile(themePath, function (err, file) {
73930
- if (err) {
73931
- return reject(err);
73932
- }
73933
- resolve(JSON.parse(file.toString()));
73934
- });
73935
- });
73936
- }
73937
- function deleteThemeZip(zipDir) {
73938
- fs.unlinkSync(zipDir);
73939
- }
73940
- function readLocalizationFiles() {
73941
- return new Promise(function (resolve, reject) {
73942
- var serverRuntimeConfig = getConfig().serverRuntimeConfig;
73943
- var localesPath = path$1.join(serverRuntimeConfig.PROJECT_ROOT, "public", "locales");
73944
- var stripExtension = function (path) {
73945
- return path.length ? path.split(".")[0] : path;
73946
- };
73947
- fs.readdir(localesPath, function (err, files) {
73948
- if (err) {
73949
- return reject(err);
73950
- }
73951
- var localeDirs = files.filter(function (file) {
73952
- return fs.lstatSync(path$1.join(localesPath, file)).isDirectory();
73953
- });
73954
- var locales = {};
73955
- var hasError = false;
73956
- localeDirs.forEach(function (locale) {
73957
- var localeDirPath = path$1.join(serverRuntimeConfig.PROJECT_ROOT, "public", "locales", locale);
73958
- locales[locale] = {};
73959
- try {
73960
- var localeFiles = fs.readdirSync(localeDirPath);
73961
- localeFiles.forEach(function (localeFile) {
73962
- var file = fs.readFileSync(path$1.join(serverRuntimeConfig.PROJECT_ROOT, "public", "locales", locale, localeFile));
73963
- var strippedLocale = stripExtension(locale).toLowerCase();
73964
- var namespace = stripExtension(localeFile).toLowerCase();
73965
- locales[strippedLocale][namespace] = JSON.parse(file.toString());
73966
- if (strippedLocale === "tr") {
73967
- locales[strippedLocale]["checkout-page"] = tr;
73968
- }
73969
- else {
73970
- locales[strippedLocale]["checkout-page"] = en;
73971
- }
73972
- });
73973
- }
73974
- catch (err) {
73975
- console.error(err);
73976
- hasError = true;
73977
- }
73978
- });
73979
- if (hasError)
73980
- reject(null);
73981
- else
73982
- resolve(locales);
73983
- });
73984
- });
73985
- }
73986
-
73987
- var UploadTheme = /*#__PURE__*/Object.freeze({
73988
- __proto__: null,
73989
- uploadTheme: uploadTheme,
73990
- config: config$3
73991
- });
73992
-
73993
- var IkasLocalThemeAPI = {
73994
- GetComponentDirs: GetComponentDirs,
73995
- GetTheme: GetTheme,
73996
- UpdateTheme: UpdateTheme,
73997
- UploadTheme: UploadTheme,
73998
- };
73999
-
74000
- export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasLocalThemeAPI, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };
71921
+ export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutCustomer, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };